Browse Source

任务的标签管理

master
陈裕财 3 years ago
parent
commit
54927e934b
  1. 13
      xm-core/src/main/java/com/xm/core/ctrl/XmQuestionHandleController.java
  2. 6
      xm-core/src/main/java/com/xm/core/service/XmTaskService.java

13
xm-core/src/main/java/com/xm/core/ctrl/XmQuestionHandleController.java

@ -1,6 +1,7 @@
package com.xm.core.ctrl; package com.xm.core.ctrl;
import com.mdp.core.entity.Tips; import com.mdp.core.entity.Tips;
import com.mdp.core.err.BizException;
import com.mdp.core.utils.RequestUtils; import com.mdp.core.utils.RequestUtils;
import com.mdp.mybatis.PageUtils; import com.mdp.mybatis.PageUtils;
import com.xm.core.entity.XmQuestionHandle; import com.xm.core.entity.XmQuestionHandle;
@ -9,10 +10,8 @@ import io.swagger.annotations.*;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore; import springfox.documentation.annotations.ApiIgnore;
import java.util.HashMap; import java.util.HashMap;
@ -85,8 +84,7 @@ public class XmQuestionHandleController {
} }
/**
@ApiOperation( value = "新增一条xm_question_handle信息",notes="addXmQuestionHandle,主键如果为空,后台自动生成") @ApiOperation( value = "新增一条xm_question_handle信息",notes="addXmQuestionHandle,主键如果为空,后台自动生成")
@ApiResponses({ @ApiResponses({
@ApiResponse(code = 200,response=XmQuestionHandle.class,message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'},data:数据对象}") @ApiResponse(code = 200,response=XmQuestionHandle.class,message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'},data:数据对象}")
@ -108,7 +106,7 @@ public class XmQuestionHandleController {
} }
xmQuestionHandleService.insert(xmQuestionHandle); xmQuestionHandleService.insert(xmQuestionHandle);
m.put("data",xmQuestionHandle); m.put("data",xmQuestionHandle);
}catch (BizException e) {
}catch (BizException e) {
tips=e.getTips(); tips=e.getTips();
logger.error("",e); logger.error("",e);
}catch (Exception e) { }catch (Exception e) {
@ -118,7 +116,6 @@ public class XmQuestionHandleController {
m.put("tips", tips); m.put("tips", tips);
return m; return m;
} }
*/
/** /**
@ApiOperation( value = "删除一条xm_question_handle信息",notes="delXmQuestionHandle,仅需要上传主键字段") @ApiOperation( value = "删除一条xm_question_handle信息",notes="delXmQuestionHandle,仅需要上传主键字段")

6
xm-core/src/main/java/com/xm/core/service/XmTaskService.java

@ -252,6 +252,12 @@ public class XmTaskService extends BaseService {
} }
xmTask.setLtime(new Date()); xmTask.setLtime(new Date());
this.updateSomeFieldByPk(xmTask); this.updateSomeFieldByPk(xmTask);
if(xmTaskVo.getSkills()!=null && xmTaskVo.getSkills().size()>0){
for (XmTaskSkill skill : xmTaskVo.getSkills()) {
skill.setTaskId(xmTaskVo.getId());
}
this.xmTaskSkillService.insertOrDelete(xmTaskVo.getSkills());
}
if(StringUtils.hasText(xmTaskDb.getParentTaskid())){ if(StringUtils.hasText(xmTaskDb.getParentTaskid())){
pushService.pushXmTask(xmTaskDb); pushService.pushXmTask(xmTaskDb);
} }

Loading…
Cancel
Save