Browse Source

修改配置

吴树波 2 weeks ago
parent
commit
23e5e92051

+ 104 - 0
fs-company/src/main/java/com/fs/company/controller/CompanyWxDialogController.java

@@ -0,0 +1,104 @@
+package com.fs.company.controller;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.domain.R;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.company.domain.CompanyWxDialog;
+import com.fs.company.service.ICompanyWxDialogService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 添加微信话术Controller
+ * 
+ * @author fs
+ * @date 2024-12-06
+ */
+@RestController
+@RequestMapping("/company/wxDialog")
+public class CompanyWxDialogController extends BaseController
+{
+    @Autowired
+    private ICompanyWxDialogService companyWxDialogService;
+
+    /**
+     * 查询添加微信话术列表
+     */
+    @PreAuthorize("@ss.hasPermi('company:wxDialog:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(CompanyWxDialog companyWxDialog)
+    {
+        startPage();
+        List<CompanyWxDialog> list = companyWxDialogService.selectCompanyWxDialogList(companyWxDialog);
+        return getDataTable(list);
+    }
+
+    @PreAuthorize("@ss.hasPermi('company:wxDialog:list')")
+    @GetMapping("/listAll")
+    public R listAll(CompanyWxDialog companyWxDialog){
+        return R.ok().put("data", companyWxDialogService.selectCompanyWxDialogList(companyWxDialog));
+    }
+
+    /**
+     * 导出添加微信话术列表
+     */
+    @PreAuthorize("@ss.hasPermi('company:wxDialog:export')")
+    @Log(title = "添加微信话术", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(CompanyWxDialog companyWxDialog)
+    {
+        List<CompanyWxDialog> list = companyWxDialogService.selectCompanyWxDialogList(companyWxDialog);
+        ExcelUtil<CompanyWxDialog> util = new ExcelUtil<CompanyWxDialog>(CompanyWxDialog.class);
+        return util.exportExcel(list, "wxDialog");
+    }
+
+    /**
+     * 获取添加微信话术详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('company:wxDialog:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(companyWxDialogService.selectCompanyWxDialogById(id));
+    }
+
+    /**
+     * 新增添加微信话术
+     */
+    @PreAuthorize("@ss.hasPermi('company:wxDialog:add')")
+    @Log(title = "添加微信话术", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody CompanyWxDialog companyWxDialog)
+    {
+        return toAjax(companyWxDialogService.insertCompanyWxDialog(companyWxDialog));
+    }
+
+    /**
+     * 修改添加微信话术
+     */
+    @PreAuthorize("@ss.hasPermi('company:wxDialog:edit')")
+    @Log(title = "添加微信话术", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody CompanyWxDialog companyWxDialog)
+    {
+        return toAjax(companyWxDialogService.updateCompanyWxDialog(companyWxDialog));
+    }
+
+    /**
+     * 删除添加微信话术
+     */
+    @PreAuthorize("@ss.hasPermi('company:wxDialog:remove')")
+    @Log(title = "添加微信话术", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(companyWxDialogService.deleteCompanyWxDialogByIds(ids));
+    }
+}

+ 120 - 0
fs-company/src/main/java/com/fs/company/controller/CompanyWxUserGroupController.java

@@ -0,0 +1,120 @@
+package com.fs.company.controller;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.ServletUtils;
+import com.fs.common.utils.poi.ExcelUtil;
+import com.fs.core.security.LoginUser;
+import com.fs.core.web.service.TokenService;
+import com.fs.wxUser.domain.CompanyWxUserGroup;
+import com.fs.wxUser.service.ICompanyWxUserGroupService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 个微 分组Controller
+ *
+ * @author fs
+ * @date 2024-10-25
+ */
+@RestController
+@RequestMapping("/company/wxUserGroup")
+public class CompanyWxUserGroupController extends BaseController
+{
+    @Autowired
+    private ICompanyWxUserGroupService companyWxUserGroupService;
+    @Autowired
+    private TokenService tokenService;
+    /**
+     * 查询个微 分组列表
+     */
+    @PreAuthorize("@ss.hasPermi('company:wxUserGroup:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(CompanyWxUserGroup companyWxUserGroup)
+    {
+        startPage();
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        companyWxUserGroup.setCompanyId(loginUser.getCompany().getCompanyId());
+        List<CompanyWxUserGroup> list = companyWxUserGroupService.selectCompanyWxUserGroupList(companyWxUserGroup);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出个微 分组列表
+     */
+    @PreAuthorize("@ss.hasPermi('company:wxUserGroup:export')")
+    @Log(title = "个微 分组", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(CompanyWxUserGroup companyWxUserGroup)
+    {
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        companyWxUserGroup.setCompanyId(loginUser.getCompany().getCompanyId());
+        List<CompanyWxUserGroup> list = companyWxUserGroupService.selectCompanyWxUserGroupList(companyWxUserGroup);
+        ExcelUtil<CompanyWxUserGroup> util = new ExcelUtil<CompanyWxUserGroup>(CompanyWxUserGroup.class);
+        return util.exportExcel(list, "个微 分组数据");
+    }
+
+    /**
+     * 获取个微 分组详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('company:wxUserGroup:query')")
+    @GetMapping(value = "/{groupId}")
+    public AjaxResult getInfo(@PathVariable("groupId") Long groupId)
+    {
+        return AjaxResult.success(companyWxUserGroupService.selectCompanyWxUserGroupByGroupId(groupId));
+    }
+
+    /**
+     * 新增个微 分组
+     */
+    @PreAuthorize("@ss.hasPermi('company:wxUserGroup:add')")
+    @Log(title = "个微 分组", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody CompanyWxUserGroup companyWxUserGroup)
+    {
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        companyWxUserGroup.setCompanyId(loginUser.getCompany().getCompanyId());
+        return toAjax(companyWxUserGroupService.insertCompanyWxUserGroup(companyWxUserGroup));
+    }
+
+    /**
+     * 修改个微 分组
+     */
+    @PreAuthorize("@ss.hasPermi('company:wxUserGroup:edit')")
+    @Log(title = "个微 分组", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody CompanyWxUserGroup companyWxUserGroup)
+    {
+        return toAjax(companyWxUserGroupService.updateCompanyWxUserGroup(companyWxUserGroup));
+    }
+
+    /**
+     * 删除个微 分组
+     */
+    @PreAuthorize("@ss.hasPermi('company:wxUserGroup:remove')")
+    @Log(title = "个微 分组", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{groupIds}")
+    public AjaxResult remove(@PathVariable Long[] groupIds)
+    {
+        return toAjax(companyWxUserGroupService.deleteCompanyWxUserGroupByGroupIds(groupIds));
+    }
+
+
+    //查询个微分组-添加sop任务-个微-选择的分组(不要权限版)
+    @GetMapping("/sopList")
+    public TableDataInfo sopList(CompanyWxUserGroup companyWxUserGroup)
+    {
+        startPage();
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        companyWxUserGroup.setCompanyId(loginUser.getCompany().getCompanyId());
+        List<CompanyWxUserGroup> list = companyWxUserGroupService.selectCompanyWxUserGroupList(companyWxUserGroup);
+        return getDataTable(list);
+    }
+
+}

+ 57 - 61
fs-service-system/src/main/java/com/fs/sop/service/impl/QwSopTempServiceImpl.java

@@ -55,8 +55,7 @@ import java.util.stream.Collectors;
  */
 @Service
 @AllArgsConstructor
-public class QwSopTempServiceImpl implements IQwSopTempService
-{
+public class QwSopTempServiceImpl implements IQwSopTempService {
     private final QwSopTempMapper qwSopTempMapper;
     private final FastGptChatReplaceWordsMapper fastGptChatReplaceWordsMapper;
     private final IQwSopTempRulesService qwSopTempRulesService;
@@ -76,10 +75,10 @@ public class QwSopTempServiceImpl implements IQwSopTempService
      * @return sop模板
      */
     @Override
-    public QwSopTemp selectQwSopTempById(String id){
+    public QwSopTemp selectQwSopTempById(String id) {
 //        QwSopTemp qwSopTemp = qwSopTempMapper.selectQwSopTempById(id);
         QwSopTemp qwSopTemp = qwSopTempMapper.selectQwSopTempById(id);
-        if(qwSopTemp == null) return null;
+        if (qwSopTemp == null) return null;
         List<QwSopTempDay> qwSopTempDays = qwSopTempDayService.listByTempId(id);
         qwSopTemp.setList(qwSopTempDays);
 //        List<QwSopTempRules> rulesList = qwSopTempRulesService.listByTempId(id);
@@ -107,8 +106,7 @@ public class QwSopTempServiceImpl implements IQwSopTempService
      * @return sop模板
      */
     @Override
-    public List<QwSopTemp> selectQwSopTempList(QwSopTemp qwSopTemp)
-    {
+    public List<QwSopTemp> selectQwSopTempList(QwSopTemp qwSopTemp) {
         return qwSopTempMapper.selectQwSopTempList(qwSopTemp);
     }
 
@@ -119,7 +117,7 @@ public class QwSopTempServiceImpl implements IQwSopTempService
      * @return 结果
      */
     @Override
-    public int insertQwSopTemp(QwSopTemp qwSopTemp){
+    public int insertQwSopTemp(QwSopTemp qwSopTemp) {
         qwSopTemp.setId(UUID.randomUUID().toString());
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         qwSopTemp.setCreateTime(sdf.format(new Date()));
@@ -145,7 +143,7 @@ public class QwSopTempServiceImpl implements IQwSopTempService
      * @return 结果
      */
     @Override
-    public int updateQwSopTemp(QwSopTemp qwSopTemp){
+    public int updateQwSopTemp(QwSopTemp qwSopTemp) {
         return qwSopTempMapper.updateQwSopTemp(qwSopTemp);
     }
 
@@ -156,8 +154,7 @@ public class QwSopTempServiceImpl implements IQwSopTempService
      * @return 结果
      */
     @Override
-    public int deleteQwSopTempByIds(String[] ids)
-    {
+    public int deleteQwSopTempByIds(String[] ids) {
         return qwSopTempMapper.deleteQwSopTempByIds(ids);
     }
 
@@ -183,8 +180,7 @@ public class QwSopTempServiceImpl implements IQwSopTempService
      * @return 结果
      */
     @Override
-    public int deleteQwSopTempById(String id)
-    {
+    public int deleteQwSopTempById(String id) {
         return qwSopTempMapper.deleteQwSopTempById(id);
     }
 
@@ -213,11 +209,11 @@ public class QwSopTempServiceImpl implements IQwSopTempService
             day.setSorts(day.getDayNum());
             day.setList(new ArrayList<>());
             List<String> timeList = new ArrayList<>();
-            if(temp.getTimeList() != null){
+            if (temp.getTimeList() != null) {
                 timeList = JSON.parseArray(JSON.toJSONString(temp.getTimeList()), String.class);
             }
             DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HH:mm");
-            if(e.getViewStartTime() == null){
+            if (e.getViewStartTime() == null) {
                 e.setViewStartTime(LocalTime.of(9, 0));
             }
             timeList.add(0, e.getViewStartTime().format(formatter));
@@ -234,11 +230,11 @@ public class QwSopTempServiceImpl implements IQwSopTempService
                 rules.setVideoId(e.getVideoId());
                 rules.setSorts(sorts.getAndIncrement());
                 // 设置消息类型
-                if(rules.getSorts() == 0){
+                if (rules.getSorts() == 0) {
                     rules.setCourseType(0);
-                }else if(rules.getSorts() == 1){
+                } else if (rules.getSorts() == 1) {
                     rules.setCourseType(1);
-                }else{
+                } else {
                     rules.setCourseType(4);
                 }
                 QwSopTempContent content = new QwSopTempContent();
@@ -270,15 +266,14 @@ public class QwSopTempServiceImpl implements IQwSopTempService
         CourseConfig courseConfig = JSON.parseObject(sysConfig.getConfigValue(), CourseConfig.class);
         List<Long> videoIdList = PubFun.listToNewList(ruleList, QwSopTempRules::getVideoId);
         Map<Long, Optional<BigDecimal>> redMap;
-        if(!videoIdList.isEmpty()){
+        if (!videoIdList.isEmpty()) {
             List<FsUserCourseVideoRedPackage> redPackageList = fsUserCourseVideoRedPackageService.listByCompanyIdAndVideoIds(temp.getCompanyId(), videoIdList);
             redMap = redPackageList.stream().collect(Collectors.groupingBy(FsUserCourseVideoRedPackage::getVideoId, Collectors.mapping(FsUserCourseVideoRedPackage::getRedPacketMoney, Collectors.reducing((e1, e2) -> e1))));
-        }else{
+        } else {
             redMap = new HashMap<>();
         }
-
-
-            FsUserCourseVideoRedPackage red = new FsUserCourseVideoRedPackage();List<FsUserCourseVideoRedPackage> redPackage = ruleList.stream().filter(e -> e.getVideoId() != null && e.getSorts() == 0).map(e -> {
+        FsUserCourseVideoRedPackage red = new FsUserCourseVideoRedPackage();
+        List<FsUserCourseVideoRedPackage> redPackage = ruleList.stream().filter(e -> e.getVideoId() != null && e.getSorts() == 0).map(e -> {
             red.setCompanyId(temp.getCompanyId());
             red.setVideoId(e.getVideoId());
             red.setRedPacketMoney(redMap.getOrDefault(e.getVideoId(), Optional.of(courseConfig.getRedPackageMoney())).orElse(BigDecimal.ZERO));
@@ -292,15 +287,15 @@ public class QwSopTempServiceImpl implements IQwSopTempService
     @Override
     public List<QwSopTempRedPackageVo> redList(String id) {
         List<QwSopTempDay> dayList = qwSopTempRulesService.listByTempIdAll(id);
-        if(CollectionUtils.isEmpty(dayList)){
+        if (CollectionUtils.isEmpty(dayList)) {
             return Collections.emptyList();
         }
         List<QwSopTempRules> rules = dayList.stream()
-                .filter(e->e!= null && e.getList()!=null)
+                .filter(e -> e != null && e.getList() != null)
                 .flatMap(e -> e.getList().stream())
                 .filter(Objects::nonNull)
                 .collect(Collectors.toList());
-        if(rules.isEmpty()){
+        if (rules.isEmpty()) {
             return Collections.emptyList();
         }
         List<FsUserCourseVideoRedPackage> redPackageList = fsUserCourseVideoRedPackageService.listByRuleIds(PubFun.listToNewList(rules, QwSopTempRules::getId));
@@ -309,19 +304,19 @@ public class QwSopTempServiceImpl implements IQwSopTempService
         Map<Long, FsUserCourseVideo> videoMap = PubFun.listToMapByGroupObject(videoList, FsUserCourseVideo::getVideoId);
         return rules.stream()
                 .filter(e -> e.getVideoId() != null && redMap.containsKey(e.getVideoId()) && videoMap.containsKey(e.getVideoId())).map(e -> {
-            FsUserCourseVideoRedPackage red = redMap.get(e.getVideoId());
-            FsUserCourseVideo video = videoMap.get(e.getVideoId());
-            QwSopTempRedPackageVo vo = new QwSopTempRedPackageVo();
-            vo.setId(red.getId());
-            vo.setRuleId(e.getId());
-            vo.setName(e.getName());
-            vo.setVideoId(e.getVideoId());
-            vo.setVideoName(video.getTitle());
-            vo.setCompanyId(red.getCompanyId());
-            vo.setRedPacketMoney(red.getRedPacketMoney());
-            vo.setDataType(red.getDataType());
-            return vo;
-        }).collect(Collectors.toList());
+                    FsUserCourseVideoRedPackage red = redMap.get(e.getVideoId());
+                    FsUserCourseVideo video = videoMap.get(e.getVideoId());
+                    QwSopTempRedPackageVo vo = new QwSopTempRedPackageVo();
+                    vo.setId(red.getId());
+                    vo.setRuleId(e.getId());
+                    vo.setName(e.getName());
+                    vo.setVideoId(e.getVideoId());
+                    vo.setVideoName(video.getTitle());
+                    vo.setCompanyId(red.getCompanyId());
+                    vo.setRedPacketMoney(red.getRedPacketMoney());
+                    vo.setDataType(red.getDataType());
+                    return vo;
+                }).collect(Collectors.toList());
     }
 
     @Override
@@ -344,7 +339,7 @@ public class QwSopTempServiceImpl implements IQwSopTempService
         SysConfig sysConfig = sysConfigService.selectConfigByConfigKey("course.config");
         CourseConfig courseConfig = JSON.parseObject(sysConfig.getConfigValue(), CourseConfig.class);
         List<CourseConfig.DisabledTimeVo> disabledTimeList = courseConfig.getDisabledTimeList();
-        if(disabledTimeList == null){
+        if (disabledTimeList == null) {
             return Collections.emptyList();
         }
         return TimeCalculator.calculateAvailableTimes(disabledTimeList);
@@ -355,7 +350,7 @@ public class QwSopTempServiceImpl implements IQwSopTempService
     public int update(QwSopTemp qwSopTemp) {
         QwSopTemp temp = qwSopTempMapper.selectById(qwSopTemp.getId());
         int i = qwSopTempMapper.updateById(qwSopTemp);
-        if(!Objects.equals(temp.getGap(), qwSopTemp.getGap())){
+        if (!Objects.equals(temp.getGap(), qwSopTemp.getGap())) {
             // 重新排序
             reorder(qwSopTemp.getId());
         }
@@ -367,14 +362,14 @@ public class QwSopTempServiceImpl implements IQwSopTempService
         List<QwSopTempRules> list = day.getList();
         List<QwSopTempContent> collect = list.stream().flatMap(e -> e.getSettingList().stream()).collect(Collectors.toList());
         List<QwSopTempContent> voiceList = collect.stream().filter(e -> e.getContentType() == 7).collect(Collectors.toList());
-        if(!voiceList.isEmpty()){
+        if (!voiceList.isEmpty()) {
 //            day.setVoice(1);
         }
         qwSopTempDayService.saveOrUpdate(day);
         qwSopTempRulesService.removeByDayId(day.getId());
         qwSopTempContentService.removeByDayId(day.getId());
 
-        list.forEach(item-> item.setDayId(day.getId()));
+        list.forEach(item -> item.setDayId(day.getId()));
         processAndReplaceContent(list);
         QwSopTempRules rules = list.get(0);
         String tempId = rules.getTempId();
@@ -392,19 +387,19 @@ public class QwSopTempServiceImpl implements IQwSopTempService
         reorder(day.getTempId());
         Map<String, Object> map = new HashMap<>();
         map.put("id", day.getId());
-        if(!voiceList.isEmpty()){
+        if (!voiceList.isEmpty()) {
             rocketMQTemplate.syncSend("voice-generation", JSON.toJSONString(VoiceVo.builder().type(0).id(day.getId().toString()).build()));
         }
 
         return map;
     }
 
-    private void processAndReplaceContent(List<QwSopTempRules> tempSettings){
+    private void processAndReplaceContent(List<QwSopTempRules> tempSettings) {
         List<FastGptChatReplaceWords> words = fastGptChatReplaceWordsMapper.selectAllFastGptChatReplaceWords();
         //循环天
-        tempSettings.forEach(settingList->{
+        tempSettings.forEach(settingList -> {
             //循环单日
-            settingList.getSettingList().forEach(item->{
+            settingList.getSettingList().forEach(item -> {
                 JSONObject obj = JSON.parseObject(item.getContent());
                 List<String> list = Arrays.asList("linkTitle", "linkDescribe", "desc", "nickname", "value");
                 list.stream().filter(obj::containsKey).forEach(key -> {
@@ -417,25 +412,26 @@ public class QwSopTempServiceImpl implements IQwSopTempService
 
     @Override
     public void delRules(Long id) {
-        if(id == null) return;
+        if (id == null) return;
         QwSopTempDay day = qwSopTempDayService.info(id);
-        if(day == null) return;
+        if (day == null) return;
         qwSopTempDayService.removeById(day.getId());
         qwSopTempContentService.removeByDayId(day.getId());
         reorder(day.getTempId());
     }
+
     @Override
     public QwSopTempDay selectRulesInfo(Long id) {
         QwSopTempDay day = qwSopTempDayService.info(id);
         List<QwSopTempRules> rulesList = qwSopTempRulesService.listByDayId(id);
-        if(CollectionUtils.isNotEmpty(rulesList)){
+        if (CollectionUtils.isNotEmpty(rulesList)) {
             List<QwSopTempContent> contentList = qwSopTempContentService.listByRulesIds(PubFun.listToNewList(rulesList, QwSopTempRules::getId));
             Map<Long, List<QwSopTempContent>> contentMap = PubFun.listToMapByGroupList(contentList, QwSopTempContent::getRulesId);
             rulesList.forEach(e -> {
                 List<QwSopTempContent> contents = contentMap.get(e.getId());
-                if(CollectionUtils.isNotEmpty(contents)){
+                if (CollectionUtils.isNotEmpty(contents)) {
                     e.setSetting(contents.stream()
-                            .filter(c-> c!=null && StringUtils.isNotBlank(c.getContent()))
+                            .filter(c -> c != null && StringUtils.isNotBlank(c.getContent()))
                             .map(c -> JSON.parseObject(c.getContent())).collect(Collectors.toList()));
                 }
             });
@@ -447,7 +443,7 @@ public class QwSopTempServiceImpl implements IQwSopTempService
     @Override
     public List<QwSopTemp> selectQwSopTempListNew(QwSopTemp qwSopTemp) {
         List<QwSopTemp> list = qwSopTempMapper.selectQwSopTempListNew(qwSopTemp);
-        if(qwSopTemp.isCuoser()){
+        if (qwSopTemp.isCuoser()) {
             List<QwSopTempRules> rulesList = qwSopTempRulesService.selectByTemplateIds(PubFun.listToNewList(list, QwSopTemp::getId));
             rulesList.sort(Comparator.comparing(
                     e -> {
@@ -476,18 +472,18 @@ public class QwSopTempServiceImpl implements IQwSopTempService
         qwSopTemp.setId(newId);
         qwSopTempMapper.insertQwSopTemp(qwSopTemp);
         List<QwSopTempDay> dayList = qwSopTempRulesService.listByTempIdAll(oldId);
-        if(dayList.isEmpty()) return;
+        if (dayList.isEmpty()) return;
         List<QwSopTempRules> ruleList = dayList.stream().filter(e -> e.getList() != null).flatMap(e -> e.getList().stream()).collect(Collectors.toList());
-        if(ruleList.isEmpty()) return;
+        if (ruleList.isEmpty()) return;
         List<FsUserCourseVideoRedPackage> redList = fsUserCourseVideoRedPackageService.selectByRuleIds(PubFun.listToNewList(ruleList, QwSopTempRules::getId));
         Map<Long, FsUserCourseVideoRedPackage> redMap = PubFun.listToMapByGroupObject(redList, FsUserCourseVideoRedPackage::getRuleId);
         dayList.forEach(day -> {
             day.setTempId(newId);
-            if(day.getList() != null && !day.getList().isEmpty()){
+            if (day.getList() != null && !day.getList().isEmpty()) {
                 day.getList().forEach(e -> {
                     e.setRed(redMap.get(e.getId()));
                     e.setTempId(newId);
-                    if(e.getSettingList() != null && !e.getSettingList().isEmpty()){
+                    if (e.getSettingList() != null && !e.getSettingList().isEmpty()) {
                         e.getSettingList().forEach(item -> {
                             item.setTempId(newId);
                         });
@@ -503,9 +499,9 @@ public class QwSopTempServiceImpl implements IQwSopTempService
             item.setRulesId(e.getId());
             item.setDayId(e.getDayId());
         }));
-        qwSopTempContentService.insertBatch(collect.stream().flatMap(e ->e.getSettingList().stream()).collect(Collectors.toList()));
+        qwSopTempContentService.insertBatch(collect.stream().flatMap(e -> e.getSettingList().stream()).collect(Collectors.toList()));
         List<FsUserCourseVideoRedPackage> redSaveList = collect.stream().filter(e -> e.getRed() != null).peek(e -> e.getRed().setRuleId(e.getId())).map(QwSopTempRules::getRed).collect(Collectors.toList());
-        if(!redSaveList.isEmpty()){
+        if (!redSaveList.isEmpty()) {
             fsUserCourseVideoRedPackageService.batchSaveCompanyRedPackage(redSaveList);
         }
     }
@@ -521,7 +517,7 @@ public class QwSopTempServiceImpl implements IQwSopTempService
     public void sortDay(List<SortDayVo> list) {
         Collection<QwSopTempDay> days = qwSopTempDayService.listByIds(PubFun.listToNewList(list, SortDayVo::getId));
         Map<Long, Integer> dayMap = list.stream().collect(Collectors.toMap(SortDayVo::getId, SortDayVo::getDayNum));
-        if(days.stream().anyMatch(e -> !dayMap.containsKey(e.getId()))){
+        if (days.stream().anyMatch(e -> !dayMap.containsKey(e.getId()))) {
             throw new BaseException("数据错误!");
         }
         days.forEach(day -> day.setDayNum(dayMap.get(day.getId())));
@@ -535,10 +531,10 @@ public class QwSopTempServiceImpl implements IQwSopTempService
 
 
     @DataSource(DataSourceType.SOP)
-    private void reorder(String tempId){
+    private void reorder(String tempId) {
         QwSopTemp qwSopTemp = qwSopTempMapper.selectQwSopTempById(tempId);
         List<QwSopTempDay> days = qwSopTempDayService.listByTempId(tempId);
-        if(days.isEmpty()) return;
+        if (days.isEmpty()) return;
         for (int i = 0; i < days.size(); i++) {
             QwSopTempDay entity = days.get(i);
             entity.setSorts(i);

+ 2 - 2
fs-service-system/src/main/resources/application-config-dev.yml

@@ -99,8 +99,8 @@ wx:
       port: 6379
       timeout: 2000
     configs:
-      - appId: wx961fadab9bcb792b # 第一个公众号的appid  //公众号名称:云联
-        secret: eddde2a1d4ca0c6c443a67e542b6864c
+      - appId: wx93ce67750e3cfba3 # 第一个公众号的appid  //公众号名称:云联
+        secret: 659fafaace3ca1c4df1bffac173a9bd7
         token: PPKOdAlCoMO # 接口配置里的Token值
         aesKey: Eswa6VjwtVMCcw03qZy6fWllgrv5aytIA1SZPEU0kU2 # 接口配置里的EncodingAESKey值
 jpush: