This commit is contained in:
韩鹏辉
2024-03-21 10:17:54 +08:00
parent c7e46f3504
commit b96a251fd8
296 changed files with 34548 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
package com.chaozhanggui.system.cashierservice.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author DJH
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface OpLog {
/**
* 操作日志code
* @return 操作code
*/
String opCode() default "";
/**
* 操作日志-详情
* @return 操作详情
*/
String opDetail() default "";
/**
* 操作日志名称
* @return 操作名称
*/
String opName() default "";
}

View File

@@ -0,0 +1,41 @@
package com.chaozhanggui.system.cashierservice.annotation;
/**
* 响应码枚举参考HTTP状态码的语义
*/
public enum ResultCode {
//成功
SUCCESS(200),
//失败
FAIL(400),
//未认证(签名错误)
UNAUTHORIZED(401),
//未认证(签名错误)
PARAM_ERROR(422),
// 403
FORBIDDEN(403),
//接口不存在
NOT_FOUND(404),
//服务器内部错误
INTERNAL_SERVER_ERROR(500),
// 服务不可达
SERVICE_UNAVAILABLE(503),
//未认证(签名错误)
NOT_TOKEN(401),
//无数据
UNDEFINDE(201),
/**
* 交易未知 查询交易结果
*/
TRANSUNKNOW(202);
private final int code;
ResultCode(int code) {
this.code = code;
}
public int code() {
return code;
}
}