浏览代码

feature 修改名称

xiahan 1 年之前
父节点
当前提交
6d5d587f05

+ 2 - 2
rw-training/training-common/src/main/java/com/rongwei/trainingcommon/sys/dao/UserDemandSurveyDao.java

@@ -1,12 +1,12 @@
 package com.rongwei.trainingcommon.sys.dao;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.rongwei.training.domain.UserDemandSurveyDo;
+import com.rongwei.training.domain.DemandSurveyContentDo;
 
 /**
  * @Entity com.rongwei.training.domain.UserDemandSurvey
  */
-public interface UserDemandSurveyDao extends BaseMapper<UserDemandSurveyDo> {
+public interface DemandSurveyContentDao extends BaseMapper<DemandSurveyContentDo> {
 
 }
 

+ 11 - 0
rw-training/training-common/src/main/java/com/rongwei/trainingcommon/sys/service/DemandSurveyContentService.java

@@ -0,0 +1,11 @@
+package com.rongwei.trainingcommon.sys.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.rongwei.training.domain.DemandSurveyContentDo;
+
+/**
+ *
+ */
+public interface DemandSurveyContentService extends IService<DemandSurveyContentDo> {
+
+}

+ 0 - 11
rw-training/training-common/src/main/java/com/rongwei/trainingcommon/sys/service/UserDemandSurveyService.java

@@ -1,11 +0,0 @@
-package com.rongwei.trainingcommon.sys.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import com.rongwei.training.domain.UserDemandSurveyDo;
-
-/**
- *
- */
-public interface UserDemandSurveyService extends IService<UserDemandSurveyDo> {
-
-}

+ 20 - 0
rw-training/training-common/src/main/java/com/rongwei/trainingcommon/sys/service/impl/DemandSurveyContentContentServiceImpl.java

@@ -0,0 +1,20 @@
+package com.rongwei.trainingcommon.sys.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.rongwei.training.domain.DemandSurveyContentDo;
+import com.rongwei.trainingcommon.sys.dao.DemandSurveyContentDao;
+import com.rongwei.trainingcommon.sys.service.DemandSurveyContentService;
+import org.springframework.stereotype.Service;
+
+/**
+ *
+ */
+@Service
+public class DemandSurveyContentContentServiceImpl extends ServiceImpl<DemandSurveyContentDao, DemandSurveyContentDo>
+        implements DemandSurveyContentService {
+
+}
+
+
+
+

+ 16 - 16
rw-training/training-common/src/main/java/com/rongwei/trainingcommon/sys/service/impl/TrainingDemandServiceImpl.java

@@ -57,7 +57,7 @@ public class TrainingDemandServiceImpl implements TrainingDemandService {
     @Autowired
     private TrainingDemandTempBackupsServiceImpl trainingDemandTempBackupsServiceImpl;
     @Autowired
-    private UserDemandSurveyServiceImpl userDemandSurveyServiceImpl;
+    private DemandSurveyContentContentServiceImpl demandSurveyContentServiceImpl;
 
     @Autowired
     private TraningCommonDao traningCommonDao;
@@ -80,7 +80,7 @@ public class TrainingDemandServiceImpl implements TrainingDemandService {
             log.error("调查问卷 :{}已发布无法再次发布", trainingDemandSurveyDo.getName());
             return R.error("调查问卷已发布");
         }
-        List<UserDemandSurveyDo> saveUserDemandSurveyDos = new ArrayList<>();
+        List<DemandSurveyContentDo> saveDemandSurveyContentDos = new ArrayList<>();
         /******************************获取参与此次问卷的用户信息*********************************************/
         Set<String> participantUserId = getParticipantUser(trainingDemandSurveyDo);
         log.info("参与本次温泉调查的员工数为:{}", participantUserId.size());
@@ -121,7 +121,7 @@ public class TrainingDemandServiceImpl implements TrainingDemandService {
         List<TrainingDemandTempBackupsDo> saveDemandTempBackupsDo = new ArrayList<>();
         int num = 1;
         int questionNum= 1;
-        UserDemandSurveyDo addDemandSurveyDo;
+        DemandSurveyContentDo addDemandSurveyDo;
         for (int i = 0; i < surveyTempDetailDos.size(); i++) {
             /************ 问卷调查模板内容备份*************/
             TrainingDemandSurveyTempDetailDo surveyTempDetail = surveyTempDetailDos.get(i);
@@ -164,13 +164,13 @@ public class TrainingDemandServiceImpl implements TrainingDemandService {
                 });
                 saveDemandQuestionOptionBackupsDos.addAll(addOptions);
                 // 生成用户问卷
-                saveUserDemandSurveyDos.add(generateUserDemandSurvey(num, questionBackupsDo, trainingDemandTempBackupsDo,
+                saveDemandSurveyContentDos.add(generateUserDemandSurvey(num, questionBackupsDo, trainingDemandTempBackupsDo,
                         saveDemandSurveyBackupsDo, addOptions));
                 num++;
             }
         }
         for (int k = 0; k < saveDemandSurveyCustomDetailBackupsDos.size(); k++) {
-            addDemandSurveyDo = new UserDemandSurveyDo();
+            addDemandSurveyDo = new DemandSurveyContentDo();
             addDemandSurveyDo.setId(SecurityUtil.getUUID());
             addDemandSurveyDo.setNum(num);
             addDemandSurveyDo.setSurverid(saveDemandSurveyBackupsDo.getId());
@@ -178,13 +178,13 @@ public class TrainingDemandServiceImpl implements TrainingDemandService {
             addDemandSurveyDo.setQuestionid(saveDemandSurveyCustomDetailBackupsDos.get(k).getId());
             addDemandSurveyDo.setQuestionname(saveDemandSurveyCustomDetailBackupsDos.get(k).getContent());
             addDemandSurveyDo.setQuestiontype(saveDemandSurveyCustomDetailBackupsDos.get(k).getQuestiontype());
-            saveUserDemandSurveyDos.add(addDemandSurveyDo);
+            saveDemandSurveyContentDos.add(addDemandSurveyDo);
             num++;
         }
         // 数据存表
         saveData(saveDemandSurveyBackupsDo, saveDemandSurveyCustomDetailBackupsDos,
                 saveDemandQuestionBackupsDos, saveDemandQuestionOptionBackupsDos,
-                saveUserDemandSurveyDos, saveDemandTempBackupsDo, trainingDemandSurveyDo);
+                saveDemandSurveyContentDos, saveDemandTempBackupsDo, trainingDemandSurveyDo);
         return R.ok();
     }
 
@@ -195,7 +195,7 @@ public class TrainingDemandServiceImpl implements TrainingDemandService {
      * @param saveDemandSurveyCustomDetailBackupsDos 培训内容自定义调查表
      * @param saveDemandQuestionBackupsDos
      * @param saveDemandQuestionOptionBackupsDos
-     * @param saveUserDemandSurveyDos
+     * @param saveDemandSurveyContentDos
      * @param saveDemandTempBackupsDo
      */
     @Transactional
@@ -203,7 +203,7 @@ public class TrainingDemandServiceImpl implements TrainingDemandService {
                          List<TrainingDemandSurveyCustomDetailBackupsDo> saveDemandSurveyCustomDetailBackupsDos,
                          List<TrainingDemandQuestionBackupsDo> saveDemandQuestionBackupsDos,
                          List<TrainingDemandQuestionOptionBackupsDo> saveDemandQuestionOptionBackupsDos,
-                         List<UserDemandSurveyDo> saveUserDemandSurveyDos,
+                         List<DemandSurveyContentDo> saveDemandSurveyContentDos,
                          List<TrainingDemandTempBackupsDo> saveDemandTempBackupsDo,
                          TrainingDemandSurveyDo trainingDemandSurveyDo) {
         trainingDemandQuestionBackupsServiceImpl.saveOrUpdateBatch(saveDemandQuestionBackupsDos);
@@ -211,7 +211,7 @@ public class TrainingDemandServiceImpl implements TrainingDemandService {
         trainingDemandSurveyBackupsServiceImpl.saveOrUpdate(saveDemandSurveyBackupsDo);
         trainingDemandSurveyCustomDetailBackupsServiceImpl.saveOrUpdateBatch(saveDemandSurveyCustomDetailBackupsDos);
         trainingDemandTempBackupsServiceImpl.saveOrUpdateBatch(saveDemandTempBackupsDo);
-        userDemandSurveyServiceImpl.saveOrUpdateBatch(saveUserDemandSurveyDos);
+        demandSurveyContentServiceImpl.saveOrUpdateBatch(saveDemandSurveyContentDos);
         trainingDemandSurveyDo.setState(RELEASE);
         trainingDemandSurveyDo.setReleasetime(new Date());
         trainingDemandSurveyDao.updateById(trainingDemandSurveyDo);
@@ -222,12 +222,12 @@ public class TrainingDemandServiceImpl implements TrainingDemandService {
      *
      * @return
      */
-    private UserDemandSurveyDo generateUserDemandSurvey(int num,
-                                                        TrainingDemandQuestionBackupsDo questionBackupsDo,
-                                                        TrainingDemandTempBackupsDo trainingDemandTempBackupsDo,
-                                                        TrainingDemandSurveyBackupsDo trainingDemandSurveyBackupsDo,
-                                                        List<TrainingDemandQuestionOptionBackupsDo> addOptions) {
-        UserDemandSurveyDo demandSurveyDo = new UserDemandSurveyDo();
+    private DemandSurveyContentDo generateUserDemandSurvey(int num,
+                                                           TrainingDemandQuestionBackupsDo questionBackupsDo,
+                                                           TrainingDemandTempBackupsDo trainingDemandTempBackupsDo,
+                                                           TrainingDemandSurveyBackupsDo trainingDemandSurveyBackupsDo,
+                                                           List<TrainingDemandQuestionOptionBackupsDo> addOptions) {
+        DemandSurveyContentDo demandSurveyDo = new DemandSurveyContentDo();
         demandSurveyDo.setId(SecurityUtil.getUUID());
         demandSurveyDo.setNum(num);
         demandSurveyDo.setSurverid(trainingDemandSurveyBackupsDo.getId());

+ 0 - 20
rw-training/training-common/src/main/java/com/rongwei/trainingcommon/sys/service/impl/UserDemandSurveyServiceImpl.java

@@ -1,20 +0,0 @@
-package com.rongwei.trainingcommon.sys.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.rongwei.training.domain.UserDemandSurveyDo;
-import com.rongwei.trainingcommon.sys.dao.UserDemandSurveyDao;
-import com.rongwei.trainingcommon.sys.service.UserDemandSurveyService;
-import org.springframework.stereotype.Service;
-
-/**
- *
- */
-@Service
-public class UserDemandSurveyServiceImpl extends ServiceImpl<UserDemandSurveyDao, UserDemandSurveyDo>
-        implements UserDemandSurveyService {
-
-}
-
-
-
-

+ 2 - 3
rw-training/training-entity/src/main/java/com/rongwei/training/domain/UserDemandSurveyDo.java

@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import java.io.Serializable;
-import java.util.Date;
 
 import com.rongwei.rwcommon.base.BaseDo;
 import lombok.Data;
@@ -13,9 +12,9 @@ import lombok.Data;
  * 用户问卷调查情况表
  * @TableName user_demand_survey
  */
-@TableName(value ="user_demand_survey")
+@TableName(value ="demand_survey_content")
 @Data
-public class UserDemandSurveyDo extends BaseDo implements Serializable {
+public class DemandSurveyContentDo extends BaseDo implements Serializable {
     /**
      * 主键
      */