|
@@ -11,6 +11,7 @@ import com.diagbot.service.QuestionInfoService;
|
|
|
import com.diagbot.service.impl.ModuleDetailServiceImpl;
|
|
|
import com.diagbot.util.DateUtil;
|
|
|
import com.diagbot.util.StringUtil;
|
|
|
+import com.diagbot.util.UserUtils;
|
|
|
import com.diagbot.vo.AddModuleDetailVO;
|
|
|
import com.diagbot.vo.AddModuleInfoVO;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -69,14 +70,14 @@ public class ModuleDetailFacade extends ModuleDetailServiceImpl {
|
|
|
* @return
|
|
|
*/
|
|
|
public Boolean saveOrUpdateInfos(AddModuleInfoVO addModuleInfoVO,Long moduleId){
|
|
|
- /*String userId = UserUtils.getCurrentPrincipleID();*/
|
|
|
+ String userId = UserUtils.getCurrentPrincipleID();
|
|
|
Date now = DateUtil.now();
|
|
|
//如果该模板添加过明细,先删除
|
|
|
UpdateWrapper<ModuleDetail> moduleDetailUpdateWrapper = new UpdateWrapper<>();
|
|
|
moduleDetailUpdateWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
|
|
|
.eq("module_id",moduleId)
|
|
|
.set("is_deleted",IsDeleteEnum.Y.getKey())
|
|
|
- .set("modifier","1"/*userId*/)
|
|
|
+ .set("modifier",userId)
|
|
|
.set("gmt_modified",now);
|
|
|
this.update(new ModuleDetail(),moduleDetailUpdateWrapper);
|
|
|
//查询自定义标签的id
|
|
@@ -104,8 +105,8 @@ public class ModuleDetailFacade extends ModuleDetailServiceImpl {
|
|
|
addModuleDetailVO.setQuestionId(questionIdMap.get(addModuleDetailVO.getText()));
|
|
|
if(addModuleDetailVO.getQuestionId() == null){
|
|
|
addquestionInfo = new QuestionInfo();
|
|
|
- addquestionInfo.setModifier("1");
|
|
|
- addquestionInfo.setCreator("1");
|
|
|
+ addquestionInfo.setModifier(userId);
|
|
|
+ addquestionInfo.setCreator(userId);
|
|
|
addquestionInfo.setGmtCreate(now);
|
|
|
addquestionInfo.setGmtModified(now);
|
|
|
addquestionInfo.setTagType(TagTypeEnum.T8.getKey());
|
|
@@ -133,8 +134,8 @@ public class ModuleDetailFacade extends ModuleDetailServiceImpl {
|
|
|
for(int i = 0; i < addModuleInfoVO.getModelDetils().size(); i++){
|
|
|
moduleDetail = new ModuleDetail();
|
|
|
moduleDetail.setModuleId(moduleId);
|
|
|
- moduleDetail.setCreator("1"/*userId*/);
|
|
|
- moduleDetail.setModifier("1"/*userId*/);
|
|
|
+ moduleDetail.setCreator(userId);
|
|
|
+ moduleDetail.setModifier(userId);
|
|
|
moduleDetail.setGmtCreate(now);
|
|
|
moduleDetail.setGmtModified(now);
|
|
|
moduleDetail.setOrderNo(i+1);
|