Commit f132e617 by 徐高华

朋友圈

parent 549b4df4
......@@ -55,6 +55,7 @@ public class QwMomentController {
*/
@RequestMapping("add")
@ResponseBody
@GicLogRecord(value = "${#logValue}", category = GicLogRecordCategoryEnum.QW_MOMENT, optType = GicLogRecordOptTypeEnum.QW_MOMENT_ADD, userFunc = LogRecordUserServiceImpl.class, optPage = "企微朋友圈-朋友圈列表-新建页面")
public RestResponse<String> add(@RequestBody QwMomentPlanQO qo){
logger.info("新建任务={}", JSONObject.toJSONString(qo));
QwMomentPlanDTO plan = EntityUtil.changeEntityByJSON(QwMomentPlanDTO.class,qo) ;
......@@ -64,6 +65,8 @@ public class QwMomentController {
plan.setCreatorId(loginUser.getClerkId());
plan.setCreatorName(loginUser.getClerkName());
ServiceResponse<QwMomentPlanDTO> resp = this.qwMomentApiService.save(plan) ;
String logContent = "新增企微朋友圈活动【" + resp.getResult().getTitle() + "-" + resp.getResult().getPlanId() + "】";
GicLogRecordEvaluationContext.putAttribute("logValue", logContent);
return RestResponse.successResult(resp.getResult().getPlanId()+"") ;
}
......@@ -73,10 +76,11 @@ public class QwMomentController {
*/
@RequestMapping("update")
@ResponseBody
// @GicLogRecord(value = "${#logValue}", category = GicLogRecordCategoryEnum.CLERKTASK, optType = GicLogRecordOptTypeEnum.CLERKTASK_EIDT, userFunc = LogRecordUserServiceImpl.class, optPage = "营销-导购任务")
@GicLogRecord(value = "${#logValue}", category = GicLogRecordCategoryEnum.QW_MOMENT, optType = GicLogRecordOptTypeEnum.QW_MOMENT_EIDT, userFunc = LogRecordUserServiceImpl.class, optPage = "企微朋友圈-朋友圈列表-编辑页面")
public RestResponse<String> update(@RequestBody QwMomentPlanQO qo) {
logger.info("更新任务={}", JSONObject.toJSONString(qo));
if(null == qo.getPlanId()) {
GicLogRecordEvaluationContext.noWriteLog();
return RestResponse.failure("9999","活动id为空") ;
}
QwMomentPlanDTO plan = EntityUtil.changeEntityByJSON(QwMomentPlanDTO.class,qo) ;
......@@ -86,6 +90,8 @@ public class QwMomentController {
plan.setCreatorId(loginUser.getClerkId());
plan.setCreatorName(loginUser.getClerkName());
ServiceResponse<QwMomentPlanDTO> resp = this.qwMomentApiService.save(plan) ;
String logContent = "编辑企微朋友圈活动【" + resp.getResult().getTitle() + "-" + resp.getResult().getPlanId() + "】";
GicLogRecordEvaluationContext.putAttribute("logValue", logContent);
return RestResponse.successResult(resp.getResult().getPlanId()+"") ;
}
......@@ -95,7 +101,7 @@ public class QwMomentController {
*/
@RequestMapping("del")
@ResponseBody
//@GicLogRecord(value = "${#logValue}", category = GicLogRecordCategoryEnum.CLERKTASK, optType = GicLogRecordOptTypeEnum.CLERKTASK_DEL, userFunc = LogRecordUserServiceImpl.class, optPage = "营销-导购任务")
@GicLogRecord(value = "${#logValue}", category = GicLogRecordCategoryEnum.QW_MOMENT, optType = GicLogRecordOptTypeEnum.QW_MOMENT_DEL, userFunc = LogRecordUserServiceImpl.class, optPage = "企微朋友圈-朋友圈列表")
public RestResponse<Void> del(Long planId){
ServiceResponse<QwMomentPlanDTO> resp = this.qwMomentApiService.detail(planId) ;
if(null == resp.getResult()) {
......@@ -103,7 +109,7 @@ public class QwMomentController {
return RestResponse.failure("9999","活动不存在") ;
}
this.qwMomentApiService.del(planId) ;
String logContent = "【" + resp.getResult().getTitle() + "-" + planId + "】活动被删除";
String logContent = "删除企微朋友圈活动任务【" + resp.getResult().getTitle() + "-" + planId + "】";
GicLogRecordEvaluationContext.putAttribute("logValue", logContent);
return RestResponse.successResult() ;
}
......@@ -114,7 +120,7 @@ public class QwMomentController {
*/
@RequestMapping("stop")
@ResponseBody
//@GicLogRecord(value = "${#logValue}", category = GicLogRecordCategoryEnum.CLERKTASK, optType = GicLogRecordOptTypeEnum.CLERKTASK_STOP, userFunc = LogRecordUserServiceImpl.class, optPage = "营销-导购任务")
@GicLogRecord(value = "${#logValue}", category = GicLogRecordCategoryEnum.QW_MOMENT, optType = GicLogRecordOptTypeEnum.QW_MOMENT_STOP, userFunc = LogRecordUserServiceImpl.class, optPage = "企微朋友圈-朋友圈列表")
public RestResponse<Void> stop(Long planId){
ServiceResponse<QwMomentPlanDTO> resp = this.qwMomentApiService.detail(planId) ;
if(null == resp.getResult()) {
......@@ -122,7 +128,7 @@ public class QwMomentController {
return RestResponse.failure("9999","活动不存在") ;
}
this.qwMomentApiService.stop(planId) ;
String logContent = "【" + resp.getResult().getTitle() + "-" + planId + "】活动被终止";
String logContent = "终止企微朋友圈活动【" + resp.getResult().getTitle() + "-" + planId + "】";
GicLogRecordEvaluationContext.putAttribute("logValue", logContent);
return RestResponse.successResult() ;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment