-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
code push => 1.修改BaseServerController 2.添加ErrorCode
- Loading branch information
Showing
3 changed files
with
56 additions
and
2 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
common/src/main/java/com/toocol/common/system/ErrorCode.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.toocol.common.system; | ||
|
||
import lombok.AllArgsConstructor; | ||
|
||
/** | ||
* @author Joezeo | ||
* @date 2021/5/3 18:16 | ||
*/ | ||
@AllArgsConstructor | ||
public enum ErrorCode { | ||
/** | ||
* 传来的请求必要参数不全 | ||
*/ | ||
NECESSARY_PARAM_IS_MISSING(1001, "传来的请求必要参数不全") | ||
; | ||
|
||
public int code; | ||
|
||
public String desc; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
common/src/main/java/com/toocol/common/web/ParamCheck.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.toocol.common.web; | ||
|
||
import org.springframework.stereotype.Repository; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* @author Joezeo | ||
* @date 2021/5/3 18:00 | ||
*/ | ||
@Target(ElementType.TYPE) | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Repository | ||
public @interface ParamCheck { | ||
String[] params(); | ||
} |