Explorar el Código

Merge remote-tracking branch 'origin/Payment-Configuration' into Payment-Configuration

xgb hace 1 semana
padre
commit
7d367ceee4

+ 18 - 0
fs-qwhook/src/main/java/com/fs/app/controller/ApisFsUserCourseVideoController.java

@@ -1,9 +1,11 @@
 package com.fs.app.controller;
 
 import com.alibaba.fastjson.JSONObject;
+import com.fs.common.annotation.Log;
 import com.fs.common.annotation.RepeatSubmit;
 import com.fs.common.core.controller.BaseController;
 import com.fs.common.core.domain.R;
+import com.fs.common.enums.BusinessType;
 import com.fs.course.domain.FsUserCourse;
 import com.fs.course.param.FsCourseLinkCreateParam;
 import com.fs.course.param.FsCourseLinkMiniParam;
@@ -175,5 +177,21 @@ public class ApisFsUserCourseVideoController extends BaseController {
 
         return fsUserCourseVideoService.createRoomMiniLink(param);
     }
+    /**
+     * 创建 注册链接
+     */
+
+    @RepeatSubmit
+    @PostMapping("/createZcMiniLink")
+    @Log(title = "createZcMiniLink", businessType = BusinessType.INSERT)
+    public R createZcMiniLink(@RequestBody  FsCourseLinkMiniParam param) {
+        if (StringUtil.strIsNullOrEmpty(param.getCorpId())){
+            return R.error("企业id不能为空");
+        }
 
+        if (StringUtil.strIsNullOrEmpty(param.getQwUserId())){
+            return R.error("用户id不能为空");
+        }
+        return fsUserCourseVideoService.createZcMiniLink(param);
+    }
 }

+ 18 - 0
fs-qwhook/src/main/java/com/fs/app/controller/FsUserCourseVideoController.java

@@ -1,9 +1,11 @@
 package com.fs.app.controller;
 
 import com.alibaba.fastjson.JSONObject;
+import com.fs.common.annotation.Log;
 import com.fs.common.annotation.RepeatSubmit;
 import com.fs.common.core.domain.R;
 import com.fs.common.core.domain.ResponseResult;
+import com.fs.common.enums.BusinessType;
 import com.fs.course.domain.FsUserCourse;
 import com.fs.course.param.FsCourseLinkCreateParam;
 import com.fs.course.param.FsCourseLinkMiniParam;
@@ -181,5 +183,21 @@ public class FsUserCourseVideoController {
 
         return fsUserCourseVideoService.createRoomMiniLink(param);
     }
+    /**
+     * 创建 注册链接
+     */
 
+    @RepeatSubmit
+    @PostMapping("/createZcMiniLink")
+    @Log(title = "createZcMiniLink", businessType = BusinessType.INSERT)
+    public R createZcMiniLink(@RequestBody  FsCourseLinkMiniParam param) {
+        if (StringUtil.strIsNullOrEmpty(param.getCorpId())){
+            return R.error("企业id不能为空");
+        }
+
+        if (StringUtil.strIsNullOrEmpty(param.getQwUserId())){
+            return R.error("用户id不能为空");
+        }
+        return fsUserCourseVideoService.createZcMiniLink(param);
+    }
 }

+ 11 - 4
fs-service/src/main/java/com/fs/course/mapper/FsUserCourseVideoMapper.java

@@ -3,10 +3,7 @@ package com.fs.course.mapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.fs.course.domain.FsUserCourseVideo;
 import com.fs.course.domain.FsVideoResource;
-import com.fs.course.param.CourseVideoUpdates;
-import com.fs.course.param.FsCourseListBySidebarParam;
-import com.fs.course.param.FsUserCourseVideoListUParam;
-import com.fs.course.param.FsUserCourseVideoParam;
+import com.fs.course.param.*;
 import com.fs.course.param.newfs.UserCourseVideoPageParam;
 import com.fs.course.vo.*;
 import com.fs.course.vo.newfs.FsUserCourseVideoPageListVO;
@@ -282,4 +279,14 @@ public interface FsUserCourseVideoMapper extends BaseMapper<FsUserCourseVideo> {
 
     @Select("select * from fs_video_resource where hsy_vid is not null")
     List<FsVideoResource> selectVideoByVid();
+
+    /**
+     * 下架
+     */
+    int batchDown(String[] videoIds);
+
+    /**
+     * 批量修改视频封面
+     */
+    int batchEditCover(BatchEditCoverParam param);
 }

+ 21 - 0
fs-service/src/main/java/com/fs/course/param/BatchEditCoverParam.java

@@ -0,0 +1,21 @@
+package com.fs.course.param;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotEmpty;
+import java.util.List;
+
+@Data
+public class BatchEditCoverParam {
+    /**
+     * 封面图
+     */
+    @NotBlank(message = "封面图不能为空")
+    private String thumbnail;
+    /**
+     * 视频小节
+     */
+    @NotEmpty(message = "小节ID不能为空")
+    private List<Long> videoIds;
+}

+ 4 - 0
fs-service/src/main/java/com/fs/course/param/FsCourseLinkMiniParam.java

@@ -25,5 +25,9 @@ public class FsCourseLinkMiniParam {
     * 客户的小程序id
     */
     private Long fsUserId;
+    /**
+     * 群id
+     */
+    private String chatId;
 
 }

+ 12 - 0
fs-service/src/main/java/com/fs/course/service/IFsUserCourseVideoService.java

@@ -245,4 +245,16 @@ public interface IFsUserCourseVideoService extends IService<FsUserCourseVideo> {
     R createRoomMiniLinkByCourse(FsCourseLinkRoomNewParam param);
 
     void updateMediaPublishStatus(String vid);
+
+    /**
+     * 视频下架
+     */
+    int batchDown(String[] videoIds);
+
+    /**
+     * 批量修改视频封面
+     */
+    int batchEditCover(BatchEditCoverParam param);
+
+    R createZcMiniLink(FsCourseLinkMiniParam param);
 }

+ 218 - 75
fs-service/src/main/java/com/fs/course/service/impl/FsCourseWatchLogServiceImpl.java

@@ -70,6 +70,7 @@ import java.time.ZoneId;
 import java.time.format.DateTimeFormatter;
 import java.time.temporal.ChronoUnit;
 import java.util.*;
+import java.util.function.Function;
 import java.util.stream.Collectors;
 
 /**
@@ -1197,108 +1198,250 @@ public class FsCourseWatchLogServiceImpl extends ServiceImpl<FsCourseWatchLogMap
 
     @Override
     public List<FsCourseWatchLogListVO> selectFsCourseWatchLogListVOexport(FsCourseWatchLogListParam param) {
+        try {
+            // 1. 参数预处理
+            if (!preprocessPeriodIds(param)) {
+                return Collections.emptyList();
+            }
 
+            // 2. 查询主数据
+            List<FsCourseWatchLogListVO> list = fsCourseWatchLogMapper.selectFsCourseWatchLogListVOexport(param);
+            if (CollectionUtils.isEmpty(list)) {
+                return list;
+            }
 
-        if (param.getSendType()==1&& param.getPeriodETime()!=null && param.getPeriodSTime()!=null) {
-            List<Long> periodIds = userCoursePeriodDaysService.selectFsUserCoursePeriodDaysByTime(param.getPeriodSTime(), param.getPeriodETime());
+            // 3. 批量处理所有数据
+            enrichListData(list);
 
-            if (!periodIds.isEmpty()){
-                List<Long> longs = userCoursePeriodService.selectFsUserCoursePeriodListByPeriodId(periodIds, param.getCompanyId());
-                if (!longs.isEmpty()){
-                    param.setPeriodIds(longs);
-                }else {
-                    return new ArrayList<>();
-                }
-            }else {
-                return new ArrayList<>();
-            }
+            return list;
+        } catch (Exception e) {
+            log.error("导出课程观看日志列表失败", e);
+            return Collections.emptyList();
+        }
+    }
+    /**
+     * 预处理营期ID
+     */
+    private boolean preprocessPeriodIds(FsCourseWatchLogListParam param) {
+        if (param.getSendType() != 1 || param.getPeriodETime() == null || param.getPeriodSTime() == null) {
+            return true;
+        }
 
+        List<Long> periodIds = userCoursePeriodDaysService.selectFsUserCoursePeriodDaysByTime(
+                param.getPeriodSTime(), param.getPeriodETime());
+        if (CollectionUtils.isEmpty(periodIds)) {
+            return false;
         }
 
-        List<FsCourseWatchLogListVO> list = fsCourseWatchLogMapper.selectFsCourseWatchLogListVOexport(param);
+        List<Long> filteredPeriodIds = userCoursePeriodService.selectFsUserCoursePeriodListByPeriodId(
+                periodIds, param.getCompanyId());
+        if (CollectionUtils.isEmpty(filteredPeriodIds)) {
+            return false;
+        }
 
-        //查询所有营期
-        List<FsUserCoursePeriod> fsUserCoursePeriods = userCoursePeriodService.selectFsUserCoursePeriodList(new FsUserCoursePeriod());
+        param.setPeriodIds(filteredPeriodIds);
+        return true;
+    }
+    private void enrichListData(List<FsCourseWatchLogListVO> list) {
+        // 批量预加载所有营期
+        Map<Long, String> periodNameMap = buildPeriodNameMap();
+
+        // 收集所有需要查询的ID
+        Set<Long> userIds = new HashSet<>();
+        Set<Long> companyIds = new HashSet<>();
+        Set<Long> companyUserIds = new HashSet<>();
+        Set<Long> courseIds = new HashSet<>();
+        Set<Long> videoIds = new HashSet<>();
+        Set<String> qwUserIds = new HashSet<>();
+        Set<Long> qwContactIds = new HashSet<>();
 
         for (FsCourseWatchLogListVO item : list) {
-            //营期名称
-            if (ObjectUtils.isNotNull(item.getPeriodId())) {
-                // 获取匹配的periodName
-                String periodName = fsUserCoursePeriods.stream()
-                        .filter(period -> item.getPeriodId().equals(period.getPeriodId()))
-                        .map(FsUserCoursePeriod::getPeriodName)
-                        .findFirst()
-                        .orElse("无营期名称");
-                item.setPeriodIdName(periodName);
-            }else {
-                item.setPeriodIdName("自动发课无营期名称");
-            }
+            if (item.getUserId() != null) userIds.add(item.getUserId());
+            if (item.getCompanyId() != null) companyIds.add(Long.valueOf(item.getCompanyId()));
+            if (item.getCompanyUserId() != null) companyUserIds.add(item.getCompanyUserId());
+            if (item.getCourseId() != null) courseIds.add(item.getCourseId());
+            if (item.getVideoId() != null) videoIds.add(item.getVideoId());
+            if (StringUtils.isNotBlank(item.getQwUserId())) qwUserIds.add(item.getQwUserId());
+            if (item.getQwExternalContactId() != null) qwContactIds.add(Long.valueOf(item.getQwExternalContactId()));
+        }
 
-            // 项目
-            if(ObjectUtils.isNotNull(item.getProject())) {
-                String sysCourseProject = DictUtils.getDictLabel("sys_course_project", String.valueOf(item.getProject()));
-                if(StringUtils.isNotBlank(sysCourseProject)){
-                    item.setProjectName(sysCourseProject);
+        // 批量查询(使用单条查询方法,但减少重复查询)
+        Map<Long, FsUser> userMap = batchLoadEntities(userIds, fsUserCacheService::selectFsUserById);
+        Map<Long, Company> companyMap = batchLoadEntities(companyIds, id -> companyCacheService.selectCompanyById(Long.valueOf(id)));
+        Map<Long, CompanyUser> companyUserMap = batchLoadEntities(companyUserIds, companyUserCacheService::selectCompanyUserById);
+        Map<Long, FsUserCourse> courseMap = batchLoadEntities(courseIds, fsUserCourseCacheService::selectFsUserCourseByCourseId);
+        Map<Long, FsUserCourseVideo> videoMap = batchLoadEntities(videoIds, fsUserCourseVideoCacheService::selectFsUserCourseVideoByVideoId);
+        Map<String, String> qwUserNameMap = batchLoadQwUserNames(qwUserIds);
+        Map<Long, String> qwExternalContactMap = batchLoadQwExternalContacts(qwContactIds);
+
+        // 处理每个条目
+        for (FsCourseWatchLogListVO item : list) {
+            enrichItemData(item, periodNameMap, userMap, companyMap, companyUserMap,
+                    courseMap, videoMap, qwUserNameMap, qwExternalContactMap);
+        }
+    }
+
+    /**
+     * 批量加载实体数据(使用现有的单条查询方法)
+     */
+    private <K, V> Map<K, V> batchLoadEntities(Set<K> ids, Function<K, V> loader) {
+        if (CollectionUtils.isEmpty(ids)) {
+            return Collections.emptyMap();
+        }
+
+        Map<K, V> result = new HashMap<>();
+        for (K id : ids) {
+            try {
+                V value = loader.apply(id);
+                if (value != null) {
+                    result.put(id, value);
                 }
+            } catch (Exception e) {
+                log.warn("加载数据失败,ID: {}", id, e);
             }
-            // 用户名
-            if(ObjectUtils.isNotNull(item.getUserId())) {
-                FsUser fsUser = fsUserCacheService.selectFsUserById(item.getUserId());
-                if(ObjectUtils.isNotNull(fsUser)){
-                    item.setExternalUserName(String.format("%s_%d",fsUser.getNickName(),fsUser.getUserId()));
-                    item.setFsNickName(fsUser.getNickName());
-                    item.setFsAvatar(fsUser.getAvatar());
+        }
+        return result;
+    }
+
+    /**
+     * 批量加载企微用户名
+     */
+    private Map<String, String> batchLoadQwUserNames(Set<String> qwUserIds) {
+        Map<String, String> result = new HashMap<>();
+        for (String qwUserId : qwUserIds) {
+            try {
+                String name = qwUserCacheService.queryQwUserNameByUserId(qwUserId);
+                if (StringUtils.isNotBlank(name)) {
+                    result.put(qwUserId, name);
                 }
+            } catch (Exception e) {
+                log.warn("加载企微用户失败,ID: {}", qwUserId, e);
             }
-            // 公司名
-            if(ObjectUtils.isNotNull(item.getCompanyId())){
-                Company company = companyCacheService.selectCompanyById(Long.valueOf(item.getCompanyId()));
-                if(ObjectUtils.isNotNull(company)){
-                    item.setCompanyName(String.format("%s_%d", company.getCompanyName(), company.getCompanyId()));
+        }
+        return result;
+    }
+
+    /**
+     * 批量加载企微外部联系人
+     */
+    private Map<Long, String> batchLoadQwExternalContacts(Set<Long> contactIds) {
+        Map<Long, String> result = new HashMap<>();
+        for (Long contactId : contactIds) {
+            try {
+                String name = qwExternalContactCacheService.selectQwExternalContactById(contactId);
+                if (StringUtils.isNotBlank(name)) {
+                    result.put(contactId, name);
                 }
+            } catch (Exception e) {
+                log.warn("加载企微外部联系人失败,ID: {}", contactId, e);
             }
+        }
+        return result;
+    }
 
-            // 销售名
-            if(ObjectUtils.isNotNull(item.getCompanyUserId())){
-                CompanyUser companyUser = companyUserCacheService.selectCompanyUserById(item.getCompanyUserId());
-                if(ObjectUtils.isNotNull(companyUser)){
-                    item.setCompanyUserName(String.format("%s_%d", companyUser.getNickName(), companyUser.getUserId()));
-                }
+    /**
+     * 构建营期名称映射
+     */
+    private Map<Long, String> buildPeriodNameMap() {
+        List<FsUserCoursePeriod> periods = userCoursePeriodService.selectFsUserCoursePeriodList(new FsUserCoursePeriod());
+        return periods.stream()
+                .collect(Collectors.toMap(
+                        FsUserCoursePeriod::getPeriodId,
+                        FsUserCoursePeriod::getPeriodName,
+                        (v1, v2) -> v1
+                ));
+    }
+
+    /**
+     * 处理单个条目的数据
+     */
+    private void enrichItemData(FsCourseWatchLogListVO item,
+                                Map<Long, String> periodNameMap,
+                                Map<Long, FsUser> userMap,
+                                Map<Long, Company> companyMap,
+                                Map<Long, CompanyUser> companyUserMap,
+                                Map<Long, FsUserCourse> courseMap,
+                                Map<Long, FsUserCourseVideo> videoMap,
+                                Map<String, String> qwUserNameMap,
+                                Map<Long, String> qwExternalContactMap) {
+
+        // 设置营期名称
+        if (item.getPeriodId() != null) {
+            String periodName = periodNameMap.get(item.getPeriodId());
+            item.setPeriodIdName(periodName != null ? periodName : "无营期名称");
+        } else {
+            item.setPeriodIdName("自动发课无营期名称");
+        }
+
+        // 设置项目名称
+        if (item.getProject() != null) {
+            String projectName = DictUtils.getDictLabel("sys_course_project",
+                    String.valueOf(item.getProject()));
+            if (StringUtils.isNotBlank(projectName)) {
+                item.setProjectName(projectName);
             }
+        }
 
-            // 课程
-            if(ObjectUtils.isNotNull(item.getCourseId())){
-                FsUserCourse course = fsUserCourseCacheService.selectFsUserCourseByCourseId(item.getCourseId());
-                if(ObjectUtils.isNotNull(course)){
-                    item.setCourseName(course.getCourseName());
-                }
+        // 设置用户信息
+        if (item.getUserId() != null) {
+            FsUser user = userMap.get(item.getUserId());
+            if (user != null) {
+                item.setExternalUserName(String.format("%s_%d", user.getNickName(), user.getUserId()));
+                item.setFsNickName(user.getNickName());
+                item.setFsAvatar(user.getAvatar());
             }
-            // 小节
-            if(ObjectUtils.isNotNull(item.getVideoId())){
-                FsUserCourseVideo fsUserCourseVideo = fsUserCourseVideoCacheService.selectFsUserCourseVideoByVideoId(item.getVideoId());
-                if(ObjectUtils.isNotNull(fsUserCourseVideo)){
-                    item.setVideoName(fsUserCourseVideo.getTitle());
-                }
+        }
+
+        // 设置公司信息
+        if (item.getCompanyId() != null) {
+            Company company = companyMap.get(item.getCompanyId());
+            if (company != null) {
+                item.setCompanyName(String.format("%s_%d",
+                        company.getCompanyName(), company.getCompanyId()));
             }
+        }
 
-            // 企微用户名
-            if(ObjectUtils.isNotNull(item.getQwUserId())){
-                String qwUserName = qwUserCacheService.queryQwUserNameByUserId(item.getQwUserId());
-                if(StringUtils.isNotBlank(qwUserName)){
-                    item.setQwUserName(qwUserName);
-                }
+        // 设置销售信息
+        if (item.getCompanyUserId() != null) {
+            CompanyUser companyUser = companyUserMap.get(item.getCompanyUserId());
+            if (companyUser != null) {
+                item.setCompanyUserName(String.format("%s_%d",
+                        companyUser.getNickName(), companyUser.getUserId()));
             }
+        }
 
-            // 企微外部联系人
-            if(ObjectUtils.isNotNull(item.getQwExternalContactId())){
-                String qwExternalContactName = qwExternalContactCacheService.selectQwExternalContactById(Long.valueOf(item.getQwExternalContactId()));
-                if(StringUtils.isNotBlank(qwExternalContactName)){
-                    item.setExternalUserName(qwExternalContactName);
-                }
+        // 设置课程信息
+        if (item.getCourseId() != null) {
+            FsUserCourse course = courseMap.get(item.getCourseId());
+            if (course != null) {
+                item.setCourseName(course.getCourseName());
             }
+        }
 
+        // 设置视频信息
+        if (item.getVideoId() != null) {
+            FsUserCourseVideo video = videoMap.get(item.getVideoId());
+            if (video != null) {
+                item.setVideoName(video.getTitle());
+            }
+        }
+
+        // 设置企微用户信息
+        if (StringUtils.isNotBlank(item.getQwUserId())) {
+            String qwUserName = qwUserNameMap.get(item.getQwUserId());
+            if (StringUtils.isNotBlank(qwUserName)) {
+                item.setQwUserName(qwUserName);
+            }
+        }
+
+        // 设置企微外部联系人信息
+        if (item.getQwExternalContactId() != null) {
+            String contactName = qwExternalContactMap.get(item.getQwExternalContactId());
+            if (StringUtils.isNotBlank(contactName)) {
+                // 注意:这里会覆盖之前设置的外部用户名
+                item.setExternalUserName(contactName);
+            }
         }
-        return list;
     }
 
     @Override

+ 80 - 1
fs-service/src/main/java/com/fs/course/service/impl/FsUserCourseVideoServiceImpl.java

@@ -126,7 +126,7 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
     private String signProjectName;
     @Value("${isNewWxMerchant}")
     private Boolean isNewWxMerchant;
-
+    private static final String registeredRealLink = "/pages_course/register.html?link=";
     @Autowired
     private OpenIMService openIMService;
     @Autowired
@@ -4452,5 +4452,84 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
             }
         }
     }
+
+    /**
+     * 视频下架
+     */
+    @Override
+    public int batchDown(String[] videoIds) {
+        return baseMapper.batchDown(videoIds);
+    }
+
+    /**
+     * 批量修改视频封面
+     */
+    @Override
+    public int batchEditCover(BatchEditCoverParam param) {
+        return baseMapper.batchEditCover(param);
+    }
+
+
+    @Override
+    public R createZcMiniLink(FsCourseLinkMiniParam param) {
+
+        QwUser qwUser = qwExternalContactService.getQwUserByRedis(param.getCorpId().trim(), param.getQwUserId().trim());
+
+        if (qwUser==null||qwUser.getCompanyId()==null||qwUser.getCompanyUserId()==null){
+            return R.error("员工未绑定 客服公司 或 客服 请先绑定");
+        }
+
+        QwCompany qwCompany = iQwCompanyService.getQwCompanyByRedis(param.getCorpId());
+
+        if (qwCompany == null ) {
+            return  R.error().put("msg","企业不存在,请联系管理员");
+        }
+        FsCourseLink link = createFsCourseLink(param.getCorpId(), new Date(), qwUser.getId(),
+                String.valueOf(qwUser.getCompanyUserId()), String.valueOf(qwUser.getCompanyId()), param.getExternalUserId(), 3, param.getChatId());
+        FsCourseRealLink courseMap = new FsCourseRealLink();
+        BeanUtils.copyProperties(link, courseMap);
+
+        String realLinkFull = registeredRealLink + JSON.toJSONString(courseMap);
+        link.setRealLink(realLinkFull);
+
+        link.setUpdateTime(new Date());
+        //存短链-
+        fsCourseLinkMapper.insertFsCourseLink(link);
+
+        //生成注册链接
+//        String linkByMiniApp = createLinkByMiniApp(new Date(), param.getCourseId(), param.getVideoId(), qwUser, param.getExternalUserId(),2,null,1);
+        JSONObject news = new JSONObject(true);
+        news.put("miniprogramAppid", qwCompany.getMiniAppId());
+        news.put("miniprogramTitle", "点击注册");
+        news.put("miniprogramPage", link.getRealLink());
+        news.put("miniprogramPicUrl", "https://cos.his.cdwjyyh.com/fs/20251008/15512254ec6747949f45071f0338df79.png");
+
+        return R.ok().put("data",news);
+    }
+
+    public FsCourseLink createFsCourseLink(String corpId, Date sendTime,  Long qwUserId,
+                                           String companyUserId, String companyId, Long externalId, Integer type,String chatId) {
+        // 手动创建 FsCourseLink 对象,避免使用 BeanUtils.copyProperties
+        FsCourseLink link = new FsCourseLink();
+        link.setCompanyId(Long.parseLong(companyId));
+        link.setQwUserId(qwUserId);
+        link.setCompanyUserId(Long.parseLong(companyUserId));
+        link.setCorpId(corpId);
+        link.setChatId(chatId);
+        link.setQwExternalId(externalId);
+        link.setLinkType(type); //小程序
+        link.setUNo(UUID.randomUUID().toString());
+        String randomString = generateRandomStringWithLock();
+        if (StringUtil.strIsNullOrEmpty(randomString)) {
+            link.setLink(UUID.randomUUID().toString().replace("-", ""));
+        } else {
+            link.setLink(randomString);
+        }
+
+        link.setCreateTime(sendTime);
+
+        return link;
+    }
+
 }
 

+ 2 - 2
fs-service/src/main/java/com/fs/his/service/impl/FsUserServiceImpl.java

@@ -717,8 +717,8 @@ public class FsUserServiceImpl implements IFsUserService {
             if (item.getPhone() != null) {
                 item.setPhone(ParseUtils.parsePhone(item.getPhone()));
             }
-            if (item.getStatus() != null) {
-                String userStatus = DictUtils.getDictLabel("user_status", String.valueOf(item.getStatus()));
+            if (item.getStatus() != null) {//project_user_status user_status
+                String userStatus = DictUtils.getDictLabel("project_user_status", String.valueOf(item.getStatus()));
                 if (StringUtils.isNotBlank(userStatus)) {
                     item.setStatusText(userStatus);
                 }

+ 14 - 0
fs-service/src/main/resources/mapper/course/FsUserCourseVideoMapper.xml

@@ -503,4 +503,18 @@
            and video.is_del = 0  and video.course_id= #{courseId}
             limit 1
     </select>
+
+    <update id="batchDown" parameterType="String">
+        update fs_user_course_video set is_on_put = 1 where video_id in
+        <foreach item="videoId" collection="array" open="(" separator="," close=")">
+            #{videoId}
+        </foreach>
+    </update>
+
+    <update id="batchEditCover" parameterType="com.fs.course.param.BatchEditCoverParam">
+        update fs_user_course_video set thumbnail = #{thumbnail} where video_id in
+        <foreach item="videoId" collection="videoIds" open="(" separator="," close=")">
+            #{videoId}
+        </foreach>
+    </update>
 </mapper>

+ 6 - 3
fs-service/src/main/resources/mapper/his/FsUserMapper.xml

@@ -273,8 +273,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             AND fs_user_company_user.project_id = #{projectId}
         </if>
         <if test="keyword != null and keyword !='' ">
-            AND (fs_user.nick_name LIKE concat('%',#{keyword},'%')
-            or  fs_user.phone LIKE concat('%',#{keyword},'%')
+            AND (fs_user.nick_name   LIKE concat('%',#{keyword} COLLATE utf8mb4_unicode_ci,'%')
+            or  fs_user.phone  LIKE concat('%',#{keyword} COLLATE utf8mb4_unicode_ci,'%')
             )
         </if>
         <if test="registerStartTime != null and registerStartTime !='' ">
@@ -362,7 +362,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         fs_user.create_time,
         fs_user.remark,
         ucu.id,
-        ucu.status,
+        ucu.`status`,
         ucu.company_user_id,
         ucu.company_id,
         ucu.project_id,
@@ -376,6 +376,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="userId != null">
                 AND fs_user.user_id = #{userId}
             </if>
+            <if test="status != null">
+                AND ucu.status = #{status}
+            </if>
             <if test="companyId != null">
                 AND ucu.company_id = #{companyId}
             </if>