Просмотр исходного кода

鹤颜堂红包记录增加营期数据

yfh 1 месяц назад
Родитель
Сommit
b2dc00b37a

+ 7 - 1
fs-admin/src/main/java/com/fs/course/controller/FsCourseRedPacketLogController.java

@@ -9,9 +9,11 @@ import com.fs.common.core.domain.R;
 import com.fs.common.core.domain.model.LoginUser;
 import com.fs.common.utils.ServletUtils;
 import com.fs.course.config.CourseConfig;
+import com.fs.course.domain.FsUserCoursePeriod;
 import com.fs.course.mapper.FsUserCourseMapper;
 import com.fs.course.mapper.FsUserCourseVideoMapper;
 import com.fs.course.param.FsCourseRedPacketLogParam;
+import com.fs.course.service.IFsUserCoursePeriodService;
 import com.fs.course.vo.FsCourseRedPacketLogListPVO;
 import com.fs.framework.web.service.TokenService;
 import com.fs.his.utils.PhoneUtil;
@@ -52,6 +54,9 @@ public class FsCourseRedPacketLogController extends BaseController
 {
     @Autowired
     private IFsCourseRedPacketLogService fsCourseRedPacketLogService;
+
+    @Autowired
+    private IFsUserCoursePeriodService fsUserCoursePeriodService;
     @Autowired
     FsUserCourseMapper fsUserCourseMapper;
     @Autowired
@@ -82,7 +87,8 @@ public class FsCourseRedPacketLogController extends BaseController
 
         List<FsCourseRedPacketLogListPVO> list = fsCourseRedPacketLogService.selectFsCourseRedPacketLogListVO(fsCourseRedPacketLog);
         for (FsCourseRedPacketLogListPVO fsCourseRedPacketLogListPVO : list) {
-
+            FsUserCoursePeriod fsUserCoursePeriod = fsUserCoursePeriodService.selectFsUserCoursePeriodById(fsCourseRedPacketLogListPVO.getPeriodId().longValue());
+            fsCourseRedPacketLogListPVO.setPeriodName(fsUserCoursePeriod.getPeriodName());
             fsCourseRedPacketLogListPVO.setPhone(PhoneUtil.decryptAutoPhoneMk(fsCourseRedPacketLogListPVO.getPhone()));
         }
         return R.ok().put("data",new PageInfo<>(list));

+ 1 - 0
fs-service/src/main/java/com/fs/course/mapper/FsCourseRedPacketLogMapper.java

@@ -124,6 +124,7 @@ public interface FsCourseRedPacketLogMapper
             "<if test = ' maps.nickName !=null '> and u.nick_name  like concat('%', #{maps.nickName}, '%') </if>" +
             "<if test = ' maps.courseId !=null '> and l.course_id = #{maps.courseId} </if>" +
             "<if test = ' maps.videoId !=null '> and l.video_id = #{maps.videoId} </if>" +
+            "<if test = ' maps.periodId !=null '> and l.period_id = #{maps.periodId} </if>" +
             "<if test = ' maps.status !=null '> and l.status = #{maps.status} </if>" +
             "<if test = \"maps.phone !=null and maps.phone != '' \"> and u.phone = #{maps.phone} </if>" +
             "<if test = ' maps.qwUserId !=null '> and l.qw_user_id = #{maps.qwUserId} </if>" +

+ 5 - 0
fs-service/src/main/java/com/fs/course/param/FsCourseRedPacketLogParam.java

@@ -23,6 +23,11 @@ public class FsCourseRedPacketLogParam {
 
     private Long videoId;
 
+    /**
+     * 营期id
+     */
+    private Long periodId;
+
     private Long status;
 
     private String phone;

+ 5 - 0
fs-service/src/main/java/com/fs/course/param/PeriodStatisticCountParam.java

@@ -18,6 +18,11 @@ public class PeriodStatisticCountParam implements Serializable {
     @ApiModelProperty(value = "营期id")
     private Long periodId;
 
+    /**
+     * 营期名称
+     */
+    private String periodName;
+
     /**
      * 训练营Id
      */

+ 7 - 1
fs-service/src/main/java/com/fs/course/vo/FsCourseRedPacketLogListPVO.java

@@ -72,7 +72,13 @@ public class FsCourseRedPacketLogListPVO extends BaseEntity
 
 
     @Excel(name = "发送方式")
-    private Integer sendType; //归属发送方式:1 个微  2 企微
+    private Integer sendType;
+
+//    @Excel(name = "营期id")
+    private Long periodId;
+
+    @Excel(name = "营期名称")
+    private String periodName;
 
 
     /** 创建时间 */

+ 1 - 0
fs-service/src/main/resources/mapper/course/FsUserCoursePeriodMapper.xml

@@ -397,6 +397,7 @@
             <if test="trainingCampId != null">and `period`.training_camp_id = #{trainingCampId}</if>
             <if test="userId != null">and watch.user_id = #{userId}</if>
             <if test="periodId != null">and `period`.period_id = #{periodId}</if>
+            <if test="periodName != null  and periodName != ''"> and `period`.period_name like concat('%', #{periodName}, '%')</if>
         </where>
         group by
         `period`.period_id