|
@@ -63,15 +63,6 @@
|
|
|
VALUES (#{organId},#{studentId}, #{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{level}, #{time}, #{amount}, #{refundAmount},
|
|
|
#{status},#{orderId},#{platformOrderId},#{startTime},#{endTime}, #{remark}, NOW(), NOW(),#{musicGroupId},#{activeRemark},#{tenantId})
|
|
|
</insert>
|
|
|
- <insert id="batchInsert">
|
|
|
- INSERT INTO cloud_teacher_order (organ_id_,student_id_, type_, level_, time_, amount_,status_,
|
|
|
- remark_,create_time_, update_time_,tenant_id_)
|
|
|
- VALUES
|
|
|
- <foreach collection="userIds" item="userId" separator=",">
|
|
|
- (#{bean.organId},#{userId},#{bean.type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{bean.level},
|
|
|
- #{bean.time}, #{bean.amount},#{bean.status},#{bean.remark},NOW(),NOW(),#{bean.tenantId})
|
|
|
- </foreach>
|
|
|
- </insert>
|
|
|
<update id="update" parameterType="com.ym.mec.biz.dal.entity.CloudTeacherOrder">
|
|
|
<!--@mbg.generated-->
|
|
|
update cloud_teacher_order
|
|
@@ -349,8 +340,17 @@
|
|
|
left join student s on cto.student_id_ = s.user_id_
|
|
|
left join sys_user u on cto.student_id_ = u.id_
|
|
|
left join subject sj on s.subject_id_list_ = sj.id_
|
|
|
+ <if test="musicGroupId != null and musicGroupId != ''">
|
|
|
+ left join student_registration sr ON cto.student_id_ = sr.user_id_
|
|
|
+ </if>
|
|
|
<where>
|
|
|
cto.status_ = #{status} AND cto.tenant_id_ = #{tenantId}
|
|
|
+ <if test="organIds != null and organIds != ''">
|
|
|
+ AND FIND_IN_SET(u.organ_id_ , #{organIds})
|
|
|
+ </if>
|
|
|
+ <if test="musicGroupId != null and musicGroupId != ''">
|
|
|
+ AND sr.music_group_id_ = #{musicGroupId}
|
|
|
+ </if>
|
|
|
<if test="queryCondition != null and queryCondition != ''">
|
|
|
AND (u.username_ LIKE CONCAT('%', #{queryCondition}, '%') or u.phone_ = #{queryCondition} or u.id_ = #{queryCondition})
|
|
|
</if>
|
|
@@ -366,8 +366,17 @@
|
|
|
left join student s on cto.student_id_ = s.user_id_
|
|
|
left join sys_user u on cto.student_id_ = u.id_
|
|
|
left join subject sj on s.subject_id_list_ = sj.id_
|
|
|
+ <if test="musicGroupId != null and musicGroupId != ''">
|
|
|
+ left join student_registration sr ON cto.student_id_ = sr.user_id_
|
|
|
+ </if>
|
|
|
<where>
|
|
|
cto.status_ = #{status} AND cto.tenant_id_ = #{tenantId}
|
|
|
+ <if test="organIds != null and organIds != ''">
|
|
|
+ AND FIND_IN_SET(u.organ_id_ , #{organIds})
|
|
|
+ </if>
|
|
|
+ <if test="musicGroupId != null and musicGroupId != ''">
|
|
|
+ AND sr.music_group_id_ = #{musicGroupId}
|
|
|
+ </if>
|
|
|
<if test="queryCondition != null and queryCondition != ''">
|
|
|
AND (u.username_ LIKE CONCAT('%', #{queryCondition}, '%') or u.phone_ = #{queryCondition} or u.id_ = #{queryCondition})
|
|
|
</if>
|