Browse Source

Merge remote-tracking branch 'origin/saas' into saas

hgw 3 năm trước cách đây
mục cha
commit
e5063aec51

+ 0 - 27
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/MusicGroupPaymentCalenderDao.java

@@ -83,23 +83,6 @@ public interface MusicGroupPaymentCalenderDao extends BaseDAO<Long, MusicGroupPa
     int queryIntersectionByDate(@Param("musicGroupId") String musicGroupId, @Param("startTime") String startTime, @Param("endTime") String endTime);
 
     /**
-     * @param musicGroupId:
-     * @param payUserType:
-     * @param paymentValidStartDate:
-     * @param paymentValidEndDate:
-     * @return int
-     * @describe 根据指定乐团的有效日期查询交集
-     * @apiNote 时光荏苒,认真工作的时间总是过得很快,而我、享受这一刻!
-     * @author zouxuan
-     * @date 2020/9/21
-     * @time 10:46
-     */
-    int queryIntersectionByValidDate(@Param("musicGroupId") String musicGroupId, @Param("payUserType") PayUserType payUserType,
-                                     @Param("paymentValidStartDate") Date paymentValidStartDate,
-                                     @Param("paymentValidEndDate") Date paymentValidEndDate,
-                                     @Param("calenderId") Long calenderId);
-
-    /**
      * @param configValue:
      * @return void
      * @describe 获取指定时间后的缴费信息
@@ -119,16 +102,6 @@ public interface MusicGroupPaymentCalenderDao extends BaseDAO<Long, MusicGroupPa
     List<CalenderPushDto> getMusicCalenderPushDto(@Param("configValue") String configValue, @Param("format") String format);
 
     /**
-     * @param musicGroupId:
-     * @return com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender
-     * @describe 获取乐团下未使用的最早的缴费记录
-     * @author Joburgess
-     * @date 2020.10.27
-     */
-    MusicGroupPaymentCalender getMusicGroupUnusedFirstPaymentCalender(@Param("musicGroupId") String musicGroupId,
-                                                                      @Param("studentIds") List<Integer> studentIds);
-
-    /**
      * @param calenderIds:
      * @return com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender
      * @describe 获取指定缴费日历中下未使用的最早的缴费记录

+ 1 - 35
mec-biz/src/main/resources/config/mybatis/MusicGroupPaymentCalenderMapper.xml

@@ -317,7 +317,7 @@
         SELECT mgpc.*
         FROM music_group_payment_calender mgpc
         <include refid="queryPageSql"/>
-        ORDER BY mgpc.payment_valid_start_date_,mgpc.id_ DESC
+        ORDER BY mgpc.id_ DESC
         <include refid="global.limit"/>
     </select>
 
@@ -396,19 +396,6 @@
         AND (DATE_FORMAT(mgpcd.start_payment_date_,'%Y-%m-%d') between #{startTime} AND #{endTime}
         OR DATE_FORMAT(mgpcd.deadline_payment_date_,'%Y-%m-%d') between #{startTime} AND #{endTime})
     </select>
-    <select id="queryIntersectionByValidDate" resultType="java.lang.Integer">
-        SELECT COUNT(*) FROM music_group_payment_calender mgpc
-        WHERE music_group_id_ = #{musicGroupId}
-        AND (payment_valid_end_date_ IS NULL OR payment_valid_start_date_ BETWEEN #{paymentValidStartDate} AND #{paymentValidEndDate}
-        OR payment_valid_end_date_ BETWEEN #{paymentValidStartDate} AND #{paymentValidEndDate}) AND payment_valid_start_date_ IS NOT NULL
-        AND mgpc.payment_type_ NOT IN ('SPAN_GROUP_CLASS_ADJUST','ADD_STUDENT','ADD_COURSE') AND mgpc.batch_no_ IS NOT NULL
-        <if test="payUserType != null">
-        	and pay_user_type_ = #{payUserType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
-        </if>
-        <if test="calenderId != null">
-            AND mgpc.id_ != #{calenderId}
-        </if>
-    </select>
     <select id="queryCalenderByDay" resultType="java.util.Map">
         SELECT mgpcd.music_group_payment_calender_id_ 'key',COUNT(mgpcd.payment_status_) 'value'
         FROM music_group_payment_calender_detail mgpcd
@@ -461,25 +448,6 @@
         WHERE mg.payment_valid_end_date_ IS NOT NULL AND
         DATEDIFF(mg.payment_valid_end_date_,#{format}) = #{configValue}
     </select>
-    <select id="getMusicGroupUnusedFirstPaymentCalender" resultMap="MusicGroupPaymentCalender">
-        SELECT
-            mgpc.*
-        FROM
-            music_group_payment_calender_detail mgpcd
-            LEFT JOIN music_group_payment_calender mgpc ON mgpcd.music_group_payment_calender_id_ = mgpc.id_
-            LEFT JOIN music_group_payment_calender_course_settings mgpccs ON mgpc.id_ = mgpccs.music_group_payment_calender_id_
-        WHERE
-            mgpcd.music_group_payment_calender_id_ = mgpccs.music_group_payment_calender_id_
-            AND mgpc.music_group_id_ = #{musicGroupId}
-            AND mgpcd.use_in_course_ = 0
-            AND mgpcd.user_id_ IN
-            <foreach collection="studentIds" item="studentId" open="(" close=")" separator=",">
-                #{studentId}
-            </foreach>
-        ORDER BY
-            mgpc.payment_valid_start_date_
-            LIMIT 1;
-    </select>
     <select id="getUnusedFirstPaymentCalenderWithCalenders" resultMap="MusicGroupPaymentCalender">
         SELECT * FROM music_group_payment_calender mgpc
         WHERE id_ IN
@@ -616,7 +584,6 @@
         FROM music_group mg
         LEFT JOIN music_group_payment_calender mgpc ON mgpc.music_group_id_ = mg.id_
         AND mgpc.status_ IN ('NO','OPEN','OVER')
-        AND DATE_FORMAT(NOW(),'%Y-%m-%d') >= DATE_FORMAT(mgpc.payment_valid_start_date_,'%Y-%m-%d')
         LEFT JOIN music_group_payment_calender_detail mgpcd ON mgpc.id_ = mgpcd.music_group_payment_calender_id_ AND mgpcd.user_id_ = #{userId}
         WHERE FIND_IN_SET(mg.id_,#{musicGroupId}) AND mgpc.batch_no_ IS NOT NULL AND mgpc.pay_user_type_ = 'STUDENT'
         GROUP BY mg.id_
@@ -627,7 +594,6 @@
         FROM music_group mg
         LEFT JOIN music_group_payment_calender mgpc ON mgpc.music_group_id_ = mg.id_
         AND mgpc.status_ IN ('NO','OPEN','OVER')
-        AND DATE_FORMAT(NOW(),'%Y-%m-%d') >= DATE_FORMAT(mgpc.payment_valid_start_date_,'%Y-%m-%d')
         LEFT JOIN music_group_payment_calender_detail mgpcd ON mgpc.id_ = mgpcd.music_group_payment_calender_id_
         WHERE mg.id_ = #{musicGroupId} AND mgpcd.expect_amount_ > 0 AND mgpc.batch_no_ IS NOT NULL AND mgpc.pay_user_type_ = 'STUDENT' AND mgpcd.user_id_ IN
         <foreach collection="studentId" item="item" separator="," open="(" close=")">

+ 2 - 1
mec-biz/src/main/resources/config/mybatis/SysTenantConfigMapper.xml

@@ -79,7 +79,8 @@
     SELECT * FROM sys_config
   </select>
   <select id="queryALl" resultMap="com.ym.mec.biz.dal.dao.SysConfigDao.SysConfig">
-    SELECT sc.id_,sc.param_name_,sc.group_,CASE WHEN stc.id_ IS NULL THEN sc.paran_value_ ELSE stc.param_value_ END paran_value_ FROM sys_config sc
+    SELECT sc.id_,sc.param_name_,sc.group_,CASE WHEN stc.id_ IS NULL THEN sc.paran_value_ ELSE stc.param_value_ END paran_value_,stc.create_on_
+    FROM sys_config sc
     LEFT JOIN sys_tenant_config stc ON sc.id_ = stc.sys_config_id_ AND stc.tenant_id_ = #{tenantId}
     <where>
       <if test="group != null">

+ 1 - 1
mec-web/src/main/java/com/ym/mec/web/controller/TaskController.java

@@ -369,7 +369,7 @@ public class TaskController extends BaseController {
 	// 更新乐团学员缴费状态
 	@GetMapping("/updateMusicGroupStudentFeeStatus")
 	public void updateMusicGroupStudentFeeStatus() {
-		musicGroupPaymentCalenderService.autoUpdateMusicGroupStudentFeeStatus();
+//		musicGroupPaymentCalenderService.autoUpdateMusicGroupStudentFeeStatus();
 	}
 
 	// 推送教师异常考勤