|
|
@@ -25,6 +25,8 @@
|
|
|
<result column="audit_" property="audit" />
|
|
|
<result column="audit_name_" property="auditName" />
|
|
|
<result column="audit_time_" property="auditTime" />
|
|
|
+ <result column="organ_id_" property="organId" />
|
|
|
+ <result column="organ_name_" property="organName" />
|
|
|
<result column="status_" property="status" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
|
|
|
</resultMap>
|
|
|
|
|
|
@@ -42,10 +44,10 @@
|
|
|
<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.CloudCoachPaymentProgram" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
|
|
INSERT INTO cloud_coach_payment_program (name_,remark_,member_num_,user_num_,
|
|
|
payment_user_num_,period_,member_rank_setting_id_,actual_amount_,original_amount_,
|
|
|
- operator_,create_time_,update_time_,tenant_id_,memo_,status_)
|
|
|
+ operator_,create_time_,update_time_,tenant_id_,memo_,status_,organ_id_)
|
|
|
VALUES(#{name},#{remark},#{memberNum},#{userNum},#{paymentUserNum},#{period,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
#{memberRankSettingId},#{actualAmount},#{originalAmount},#{operator},
|
|
|
- NOW(),NOW(),#{tenantId},#{memo},#{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler})
|
|
|
+ NOW(),NOW(),#{tenantId},#{memo},#{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{organId})
|
|
|
</insert>
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
|
@@ -57,6 +59,9 @@
|
|
|
<if test="memo != null">
|
|
|
memo_ = #{memo},
|
|
|
</if>
|
|
|
+ <if test="organId != null">
|
|
|
+ organ_id_ = #{organId},
|
|
|
+ </if>
|
|
|
<if test="audit != null">
|
|
|
audit_ = #{audit},
|
|
|
</if>
|
|
|
@@ -109,6 +114,9 @@
|
|
|
|
|
|
<sql id="queryPageSql">
|
|
|
<where>
|
|
|
+ <if test="organId != null and organId != ''">
|
|
|
+ AND FIND_IN_SET(ccpp.organ_id_,#{organId})
|
|
|
+ </if>
|
|
|
<if test="tenantId != null">
|
|
|
AND ccpp.tenant_id_ = #{tenantId}
|
|
|
</if>
|
|
|
@@ -129,7 +137,9 @@
|
|
|
|
|
|
<!-- 分页查询 -->
|
|
|
<select id="queryPage" resultMap="CloudCoachPaymentProgram" parameterType="map">
|
|
|
- SELECT ccpp.*,su.real_name_ operator_name_,su1.real_name_ audit_name_ FROM cloud_coach_payment_program ccpp
|
|
|
+ SELECT ccpp.*,su.real_name_ operator_name_,su1.real_name_ audit_name_,o.name_ organ_name_
|
|
|
+ FROM cloud_coach_payment_program ccpp
|
|
|
+ LEFT JOIN organization o ON o.id_ = ccpp.organ_id_
|
|
|
LEFT JOIN sys_user su ON su.id_ = ccpp.operator_
|
|
|
LEFT JOIN sys_user su1 ON su1.id_ = ccpp.audit_
|
|
|
<include refid="queryPageSql"/>
|
|
|
@@ -140,6 +150,7 @@
|
|
|
<!-- 查询当前表的总记录数 -->
|
|
|
<select id="queryCount" resultType="int">
|
|
|
SELECT COUNT(DISTINCT ccpp.id_) FROM cloud_coach_payment_program ccpp
|
|
|
+ LEFT JOIN organization o ON o.id_ = ccpp.organ_id_
|
|
|
<include refid="queryPageSql"/>
|
|
|
</select>
|
|
|
<select id="getLock" resultMap="CloudCoachPaymentProgram">
|