售后日志优化

plp
chenchen 3 years ago
parent 3f33ca2d6b
commit 75afab1f86

@ -1,26 +1,29 @@
package cn.iocoder.yudao.module.trade.enums.aftersale;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
/**
*
*
* @author
* @since 2023/6/13 13:53
*/
// TODO @chenchen可以 lombok 简化构造方法,和 get 方法
@RequiredArgsConstructor
@Getter
public enum AfterSaleOperateTypeEnum {
/**
*
*/
APPLY("用户申请"),
APPLY(0, "用户申请"),
;
// 类型
private final Integer type;
// 描述
private final String description;
AfterSaleOperateTypeEnum(String description) {
this.description = description;
}
public String description() {
return description;
}

@ -49,7 +49,6 @@ public class TradeAfterSaleLogDO extends BaseDO {
* {@link TradeAfterSaleDO#getId()}
*/
private Long afterSaleId;
// todo @CHENCHEN: 改成 Integer 哈;主要未来改文案,不好洗 log 存的字段;
/**
*
*

@ -4,15 +4,14 @@ import cn.iocoder.yudao.module.trade.framework.aftersalelog.core.aop.AfterSaleLo
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
// TODO @chenchen改成 aftersale 好点哈;
/**
* trade afterSaleLog Configuration
* trade afterSale Configuration
*
* @author
* @since 2023/6/18 11:09
*/
@Configuration(proxyBeanMethods = false)
public class AfterSaleLogConfiguration {
public class AfterSaleConfiguration {
@Bean
public AfterSaleLogAspect afterSaleLogAspect() {

@ -31,12 +31,13 @@ import static java.util.Arrays.asList;
@Aspect
public class AfterSaleLogAspect {
private final static String OPERATE_TYPE = "operateType";
private final static String ID = "id";
private final static String CONTENT = "content";
@Resource
private AfterSaleLogService afterSaleLogService;
// TODO chenchen: 这个分 3 行把;
private final static String OPERATE_TYPE = "operateType", ID = "id", CONTENT = "content";
/**
*
*/

@ -398,14 +398,6 @@ public class TradeAfterSaleServiceImpl implements TradeAfterSaleService, AfterSa
this.createLog(logDTO);
}
// TODO @CHENCHEN这个注释写在接口就好了补充重复写哈@date 应该是 @since
/**
*
*
* @param logDTO
* @author
* @date 2023/6/12 14:18
*/
@Override
@Async
public void createLog(TradeAfterSaleLogCreateReqDTO logDTO) {
@ -417,8 +409,7 @@ public class TradeAfterSaleServiceImpl implements TradeAfterSaleService, AfterSa
.setOperateType(logDTO.getOperateType())
.setContent(logDTO.getContent());
tradeAfterSaleLogMapper.insert(afterSaleLog);
// TODO @CHENCHEN代码排版哈空格要正确
}catch (Exception exception){
} catch (Exception exception) {
log.error("[createLog][request({}) 日志记录错误]", toJsonString(logDTO), exception);
}
}

Loading…
Cancel
Save