优惠券+异常全局处理
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.chaozhanggui.system.cashierservice.sign;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.chaozhanggui.system.cashierservice.exception.IError;
|
||||
import com.chaozhanggui.system.cashierservice.util.DESUtil;
|
||||
|
||||
import java.util.List;
|
||||
@@ -143,4 +144,12 @@ public class Result {
|
||||
dto.setIcon(CodeEnum.FAIL.getIcon());
|
||||
return dto;
|
||||
}
|
||||
public static Result failure(IError error) {
|
||||
Result dto = new Result();
|
||||
dto.setMsg(error.getErrorMessage());
|
||||
dto.setEncrypt(false);
|
||||
dto.setCode(error.getErrorCode());
|
||||
dto.setIcon(CodeEnum.FAIL.getIcon());
|
||||
return dto;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user