Commit 2f57bca9 by 徐高华

log

parent e907eef8
......@@ -7,6 +7,8 @@ import java.util.Map;
import java.util.stream.Collectors;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -51,6 +53,8 @@ import com.gic.web.common.utils.SessionContextUtils;
@RequestMapping("/hm/link")
public class HmLinkController {
private static final Logger logger = LoggerFactory.getLogger(HmLinkController.class);
@Autowired
private HmLinkApiService hmLinkApiService;
@Autowired
......@@ -71,15 +75,17 @@ public class HmLinkController {
dto.setWxEnterpriseId(loginUser.getWxEnterpriseId());
dto.setEnterpriseId(loginUser.getEnterpriseId());
ServiceResponse<String> resp = this.hmLinkApiService.save(dto);
if (resp.isSuccess()) {
// if (resp.isSuccess()) {
String logContent = "新增引流链接【" + resp.getResult() + "-" + dto.getName() + "】";
logger.info(logContent);
GicLogRecordEvaluationContext.putAttribute("logValue", logContent);
GicLogRecordEvaluationContext.putOptTargetId(AuthWebRequestUtil.getLoginUser().getClerkId());
}
// }
return RestResponse.successResult();
}
@RequestMapping("update")
@GicLogRecord(value = "${#logValue}", category = GicLogRecordCategoryEnum.RECHAGE_CENTER, optType = GicLogRecordOptTypeEnum.RECHAGE_MODIFY_OPT, userFunc = LogRecordUserService.class, optPage = "活码")
public RestResponse<Object> update(@RequestBody HmLinkDTO dto) {
Long linkId = dto.getLinkId();
WebLoginDTO loginUser = AuthWebRequestUtil.getLoginUser();
......@@ -90,6 +96,9 @@ public class HmLinkController {
dto.setModifierName(loginUser.getClerkName());
this.hmLinkApiService.save(dto);
String logContent = this.getLog(oldDTO, dto);
logger.info(logContent);
GicLogRecordEvaluationContext.putAttribute("logValue", logContent);
GicLogRecordEvaluationContext.putOptTargetId(AuthWebRequestUtil.getLoginUser().getClerkId());
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