mirror of
https://gitee.com/jzsw-it/yexuejc-base.git
synced 2025-08-14 06:29:31 +08:00
1.1.7
This commit is contained in:
parent
605d697c4f
commit
763bc7b47a
@ -1,13 +1,13 @@
|
|||||||
<component name="libraryTable">
|
<component name="libraryTable">
|
||||||
<library name="Maven: javax.validation:validation-api:1.1.0.Final">
|
<library name="Maven: javax.validation:validation-api:1.1.0.Final">
|
||||||
<CLASSES>
|
<CLASSES>
|
||||||
<root url="jar://J:/localRepo/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final.jar!/" />
|
<root url="jar://$MAVEN_REPOSITORY$/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final.jar!/" />
|
||||||
</CLASSES>
|
</CLASSES>
|
||||||
<JAVADOC>
|
<JAVADOC>
|
||||||
<root url="jar://J:/localRepo/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final-javadoc.jar!/" />
|
<root url="jar://$MAVEN_REPOSITORY$/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final-javadoc.jar!/" />
|
||||||
</JAVADOC>
|
</JAVADOC>
|
||||||
<SOURCES>
|
<SOURCES>
|
||||||
<root url="jar://J:/localRepo/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final-sources.jar!/" />
|
<root url="jar://$MAVEN_REPOSITORY$/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final-sources.jar!/" />
|
||||||
</SOURCES>
|
</SOURCES>
|
||||||
</library>
|
</library>
|
||||||
</component>
|
</component>
|
@ -1,6 +1,13 @@
|
|||||||
yexuejc-base 更新记录
|
yexuejc-base 更新记录
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
#### version :1.1.7
|
||||||
|
**time:2018-8-17 11:22:50** <br/>
|
||||||
|
**branch:** master <br/>
|
||||||
|
**update:** <br/>
|
||||||
|
>1. 优化ApiVO
|
||||||
|
#
|
||||||
|
|
||||||
#### version :1.1.6
|
#### version :1.1.6
|
||||||
**time:2018-7-7 11:32:56** <br/>
|
**time:2018-7-7 11:32:56** <br/>
|
||||||
**branch:** master <br/>
|
**branch:** master <br/>
|
||||||
|
2
pom.xml
2
pom.xml
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>com.yexuejc.base</groupId>
|
<groupId>com.yexuejc.base</groupId>
|
||||||
<artifactId>yexuejc-base</artifactId>
|
<artifactId>yexuejc-base</artifactId>
|
||||||
<version>1.1.6</version>
|
<version>1.1.7</version>
|
||||||
|
|
||||||
<name>${project.artifactId}</name>
|
<name>${project.artifactId}</name>
|
||||||
|
|
||||||
|
@ -35,6 +35,7 @@ public class ApiVO implements Serializable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 使用默认返回code
|
* 使用默认返回code
|
||||||
|
*
|
||||||
* @param status
|
* @param status
|
||||||
* @param msg
|
* @param msg
|
||||||
*/
|
*/
|
||||||
@ -55,6 +56,20 @@ public class ApiVO implements Serializable {
|
|||||||
this.msgs = msg;
|
this.msgs = msg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ApiVO setStatus(STATUS status, String code, String msg) {
|
||||||
|
this.status = status;
|
||||||
|
this.code = code;
|
||||||
|
this.msgs = StrUtil.isNotEmpty(msg) ? new String[]{msg} : null;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ApiVO setStatus(STATUS status, String code, String[] msg) {
|
||||||
|
this.status = status;
|
||||||
|
this.code = code;
|
||||||
|
this.msgs = msg;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public enum STATUS {
|
public enum STATUS {
|
||||||
/**
|
/**
|
||||||
* 成功
|
* 成功
|
||||||
@ -93,36 +108,24 @@ public class ApiVO implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private Object object2;
|
private Object object2;
|
||||||
|
|
||||||
public <T extends Object> void setObject1(T obj) {
|
public <T extends Object> ApiVO setObject1(T obj) {
|
||||||
object1 = obj;
|
object1 = obj;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public <T extends Object> T getObject1(Class<T> clazz) {
|
public <T extends Object> T getObject1(Class<T> clazz) {
|
||||||
return (T) object1;
|
return (T) object1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public <T extends Object> void setObject2(T obj) {
|
public <T extends Object> ApiVO setObject2(T obj) {
|
||||||
object2 = obj;
|
object2 = obj;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public <T extends Object> T getObject2(Class<T> clazz) {
|
public <T extends Object> T getObject2(Class<T> clazz) {
|
||||||
return (T) object2;
|
return (T) object2;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ApiVO setStatus(STATUS status, String code, String msg) {
|
|
||||||
this.status = status;
|
|
||||||
this.code = code;
|
|
||||||
this.msgs = StrUtil.isNotEmpty(msg) ? new String[]{msg} : null;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ApiVO setStatus(STATUS status, String code, String[] msg) {
|
|
||||||
this.status = status;
|
|
||||||
this.code = code;
|
|
||||||
this.msgs = msg;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isSucc() {
|
public boolean isSucc() {
|
||||||
if (STATUS.S.name().equals(status.name())) {
|
if (STATUS.S.name().equals(status.name())) {
|
||||||
return true;
|
return true;
|
||||||
@ -137,8 +140,9 @@ public class ApiVO implements Serializable {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMsg(String msg) {
|
public ApiVO setMsg(String msg) {
|
||||||
this.msgs = StrUtil.isNotEmpty(msg) ? new String[]{msg} : null;
|
this.msgs = StrUtil.isNotEmpty(msg) ? new String[]{msg} : null;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isFail() {
|
public boolean isFail() {
|
||||||
@ -149,8 +153,9 @@ public class ApiVO implements Serializable {
|
|||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCode(String code) {
|
public ApiVO setCode(String code) {
|
||||||
this.code = code;
|
this.code = code;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -162,12 +167,14 @@ public class ApiVO implements Serializable {
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setStatus(STATUS status) {
|
public ApiVO setStatus(STATUS status) {
|
||||||
this.status = status;
|
this.status = status;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMsgs(String[] msgs) {
|
public ApiVO setMsgs(String[] msgs) {
|
||||||
this.msgs = msgs;
|
this.msgs = msgs;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String[] getMsgs() {
|
public String[] getMsgs() {
|
||||||
|
@ -6,6 +6,7 @@ import java.io.Serializable;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 基类VO
|
* 基类VO
|
||||||
|
*
|
||||||
* @PackageName: com.yexuejc.util.base.pojo
|
* @PackageName: com.yexuejc.util.base.pojo
|
||||||
* @Description:
|
* @Description:
|
||||||
* @author: maxf
|
* @author: maxf
|
||||||
@ -15,16 +16,16 @@ public class BaseVO implements Serializable {
|
|||||||
|
|
||||||
private static final long serialVersionUID = -1442656950873492155L;
|
private static final long serialVersionUID = -1442656950873492155L;
|
||||||
|
|
||||||
public static interface Add {
|
public interface Add {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static interface Del {
|
public interface Del {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static interface Mdfy {
|
public interface Mdfy {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static interface Srch {
|
public interface Srch {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user