Jelajahi Sumber

术后修改为书签频次和间隔字段支持置空处理

wangzl 3 bulan lalu
induk
melakukan
09747aed1b

+ 1 - 1
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/common/repository/BizQuestionGroupRepository.java

@@ -25,7 +25,7 @@ public interface BizQuestionGroupRepository extends BaseMapper<BizQuestionGroupP
 
    List<AppQuestionAndDeptListVO> selectQuestionAndDeptList();
 
-   List<AppQuestionAndDeptListVO> selectQuestionAndDeptList(@Param("deptId") String deptId);
+   List<AppQuestionAndDeptListVO> selectQuestionAndDeptListByDeptId(@Param("deptId") String deptId);
 
 
    List<BizDeptUnlinkQuestionVO> queryAllUnlink(@Param("query") BizDeptUnlinkQuestionQueryDTO query);

+ 1 - 1
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/common/service/impl/BizQuestionAnswerServiceImpl.java

@@ -172,7 +172,7 @@ public class BizQuestionAnswerServiceImpl implements IBizQuestionAnswerService {
 
     @Override
     public List<AppQuestionAndDeptListVO> queryQuestionList(String deptId) {
-        return bizQuestionGroupRepository.selectQuestionAndDeptList(deptId);
+        return bizQuestionGroupRepository.selectQuestionAndDeptListByDeptId(deptId);
     }
 
     /**

+ 3 - 0
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/common/service/impl/BizQuestionGroupServiceImpl.java

@@ -127,6 +127,7 @@ public class BizQuestionGroupServiceImpl implements IBizQuestionGroupService {
     @Transactional(rollbackFor = Exception.class)
     @Override
     public boolean updateBizQuestionGroupById(BizQuestionGroupDTO source) {
+        String currentUserId = LoginUserStrategy.tr.getCurrentUserId();
         if(QuestionGroupTypeEnums.PRE.equals(source.getType())){
             source.setFrequency(null);
             source.setInterval(null);
@@ -147,6 +148,8 @@ public class BizQuestionGroupServiceImpl implements IBizQuestionGroupService {
         Map<String, Object> stringObjectMap = BeanUtil.beanToMap(source, MD5_FIELDS);
         bizQuestionGroupPO.setVersion(oldQuestionGroup.getVersion() + 1);
         bizQuestionGroupPO.setMd5(DigestUtil.md5Hex(stringObjectMap.toString()));
+        bizQuestionGroupPO.setUpdateTime(new Date());
+        bizQuestionGroupPO.setUpdateBy(currentUserId);
         return baseRepository.updateQuestionGroupById(bizQuestionGroupPO) != 0;
     }
 

+ 4 - 2
tr-modules/tr-module-smartFollowUp/src/main/resources/mapper/smart/BizQuestionGroupMapper.xml

@@ -10,7 +10,9 @@
             type      = #{source.type},
             interval  = #{source.interval},
             frequency = #{source.frequency},
-            md5       = #{source.md5}
+            md5       = #{source.md5},
+            update_time = #{source.updateTime},
+            update_by = #{source.updateBy}
         where id = #{source.id}
     </update>
 
@@ -26,7 +28,7 @@
         JOIN biz_question_dept bqd ON bqg.ID = bqd.question_group_id
     </select>
 
-    <select id="selectQuestionAndDeptList"
+    <select id="selectQuestionAndDeptListByDeptId"
             resultType="cn.tr.module.smart.app.controller.vo.AppQuestionAndDeptListVO">
         SELECT
         bqg.id AS questionGroupId,