shangke 2 rokov pred
rodič
commit
bc2e970731

+ 13 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/VipGroupSalaryQueryInfo.java

@@ -1,9 +1,11 @@
 package com.ym.mec.biz.dal.page;
 
+import com.ym.mec.biz.dal.enums.GroupType;
 import com.ym.mec.common.page.QueryInfo;
 import io.swagger.annotations.ApiModelProperty;
 
 import java.util.Date;
+import java.util.Optional;
 
 /**
  * @Author Joburgess
@@ -23,6 +25,9 @@ public class VipGroupSalaryQueryInfo extends QueryInfo {
     @ApiModelProperty(value = "结束时间")
     private Date endTime;
 
+    @ApiModelProperty(value = "课类型")
+    private String groupType;
+
     public Long getVipGroupId() {
         return vipGroupId;
     }
@@ -54,4 +59,12 @@ public class VipGroupSalaryQueryInfo extends QueryInfo {
     public void setEndTime(Date endTime) {
         this.endTime = endTime;
     }
+
+    public String getGroupType() {
+        return Optional.ofNullable(groupType).orElse(GroupType.VIP.getCode());
+    }
+
+    public void setGroupType(String groupType) {
+        this.groupType = groupType;
+    }
 }

+ 13 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/page/VipGroupTeachingRecordQueryInfo.java

@@ -1,9 +1,11 @@
 package com.ym.mec.biz.dal.page;
 
+import com.ym.mec.biz.dal.enums.GroupType;
 import com.ym.mec.common.page.QueryInfo;
 import io.swagger.annotations.ApiModelProperty;
 
 import java.util.Date;
+import java.util.Optional;
 
 /**
  * @Author Joburgess
@@ -26,6 +28,9 @@ public class VipGroupTeachingRecordQueryInfo extends QueryInfo {
     @ApiModelProperty(value = "vip课状态")
     private String status;
 
+    @ApiModelProperty(value = "课类型")
+    private String groupType;
+
     public Long getVipGroupId() {
         return vipGroupId;
     }
@@ -65,4 +70,12 @@ public class VipGroupTeachingRecordQueryInfo extends QueryInfo {
     public void setStatus(String status) {
         this.status = status;
     }
+
+    public String getGroupType() {
+        return Optional.ofNullable(groupType).orElse(GroupType.VIP.getCode());
+    }
+
+    public void setGroupType(String groupType) {
+        this.groupType = groupType;
+    }
 }

+ 3 - 1
mec-biz/src/main/resources/config/mybatis/CourseScheduleTeacherSalaryMapper.xml

@@ -263,7 +263,9 @@
 	<sql id="vipGroupSalaryQueryCondition">
 		<where>
 			vg.id_=#{vipGroupId}
-			AND cs.group_type_='VIP'
+			<if test="groupType != null">
+				AND cs.group_type_= #{groupType}
+			</if>
 			<if test="startTime!=null and endTime!=null">
 				AND (cs.class_date_ BETWEEN #{startTime} AND #{endTime})
 			</if>

+ 7 - 2
mec-biz/src/main/resources/config/mybatis/VipGroupMapper.xml

@@ -563,7 +563,9 @@
         LEFT JOIN sys_user su ON cgsm.user_id_=su.id_
         LEFT JOIN sys_user_cash_account suaa ON cgsm.user_id_=suaa.user_id_
         WHERE cg.music_group_id_=#{vipGroupId}
-        AND cg.group_type_='VIP'
+        <if test="groupType != null">
+            AND cg.group_type_= #{groupType}
+        </if>
         AND cgsm.user_id_ IS NOT NULL
         ORDER BY su.id_
         <include refid="global.limit"/>
@@ -644,7 +646,10 @@
 
     <sql id="teachingRecordQueryCondition">
         <where>
-            cs.music_group_id_=#{vipGroupId} AND cs.group_type_='VIP'
+            cs.music_group_id_=#{vipGroupId}
+            <if test="groupType != null">
+                AND cs.group_type_= #{groupType}
+            </if>
             <if test="startTime!=null and endTime!=null">
                 AND (cs.class_date_ BETWEEN #{startTime} AND #{endTime})
             </if>