Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
open-source
/
chejia-smart-service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 021061f1
authored
May 11, 2021
by
tyfanchz
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
状态码、实体类修改
1 parent
8d202881
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
29 deletions
src/main/java/cn/com/glsx/smart/common/exception/ResultEnum.java
src/main/java/cn/com/glsx/smart/modules/entity/SmartProduct.java
src/main/java/cn/com/glsx/smart/modules/entity/SmartProductType.java
src/main/java/cn/com/glsx/smart/modules/entity/SmartSysCode.java
src/main/java/cn/com/glsx/smart/modules/entity/SmartSysFile.java
src/main/java/cn/com/glsx/smart/common/exception/ResultEnum.java
View file @
021061f
package
cn
.
com
.
glsx
.
smart
.
common
.
exception
;
import
com.glsx.plat.exception.SystemMessage
;
/**
* <p>Description: 业务码
* <p>Project: chejia-smart
...
...
@@ -12,20 +14,9 @@ public enum ResultEnum {
ERROR
(
500
,
"系统异常"
),
PARAM_ERROR
(
1001
,
"参数错误"
),
PARAM_ERROR_2
(
1001
,
"参数错误:%s"
),
PARAM_EMPTY
(
1001
,
"参数错误:%s 不能为空"
),
ID_NOT_FOUND
(
1002
,
"ID不存在"
),
PRODUCT_NOT_FOUND
(
2001
,
"产品ID不存在"
),
PRODUCT_NAME_DUPLICATE
(
2002
,
"产品名称重复"
),
PRODUCT_TYPE_NOT_FOUND
(
3001
,
"产品类型ID不存在"
),
PRODUCT_TYPE_NAME_DUPLICATE
(
3002
,
"产品类型名称重复"
),
DEVICE_NOT_FOUND
(
4001
,
"设备信息不存在"
),
USER_NOT_FOUND
(
5001
,
"用户信息不存在"
),
DEVICE_SUBSCRIBE_ERROR
(
5002
,
"用户设备订阅失败"
),
/**
* 车钥匙服务相关业务异常错误码,错误信息
*/
...
...
@@ -51,6 +42,16 @@ public enum ResultEnum {
CAR_KEY_BATCH_DELETE
(
10110020
,
"数据库异常:钥匙批量删除"
),
CAR_KEY_SHARE_STATUS_CLOSE
(
10110021
,
"数据库异常:批量关闭分享钥匙"
),
CAR_KEY_PAGE
(
10110022
,
"页数,每页大小必须大于0"
),
PRODUCT_NOT_FOUND
(
10120001
,
"产品ID不存在"
),
PRODUCT_NAME_DUPLICATE
(
10120002
,
"产品名称重复"
),
PRODUCT_TYPE_NOT_FOUND
(
10130001
,
"产品类型ID不存在"
),
PRODUCT_TYPE_NAME_DUPLICATE
(
10130002
,
"产品类型名称重复"
),
DEVICE_NOT_FOUND
(
10140001
,
"设备信息不存在"
),
USER_NOT_FOUND
(
10140002
,
"用户信息不存在"
),
DEVICE_SUBSCRIBE_ERROR
(
10140003
,
"用户设备订阅失败"
),
;
private
final
Integer
code
;
...
...
@@ -61,6 +62,11 @@ public enum ResultEnum {
this
.
message
=
message
;
}
ResultEnum
(
SystemMessage
systemMessage
)
{
this
.
code
=
systemMessage
.
getCode
();
this
.
message
=
systemMessage
.
getMsg
();
}
public
Integer
getCode
()
{
return
code
;
}
...
...
src/main/java/cn/com/glsx/smart/modules/entity/SmartProduct.java
View file @
021061f
package
cn
.
com
.
glsx
.
smart
.
modules
.
entity
;
import
cn.com.glsx.smart.modules.model.BaseDTO
;
import
lombok.Data
;
import
javax.persistence.*
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
javax.persistence.Transient
;
import
java.io.Serializable
;
import
java.util.Date
;
import
lombok.Data
;
/**
* <p>Description:
...
...
@@ -20,7 +23,7 @@ import java.util.Date;
*/
@Data
@Table
(
name
=
"smart_product"
)
public
class
SmartProduct
extends
BaseDTO
{
public
class
SmartProduct
implements
Serializable
{
/**
* 图标 url
*/
...
...
src/main/java/cn/com/glsx/smart/modules/entity/SmartProductType.java
View file @
021061f
package
cn
.
com
.
glsx
.
smart
.
modules
.
entity
;
import
cn.com.glsx.smart.modules.model.BaseDTO
;
import
lombok.Data
;
import
javax.persistence.*
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
javax.persistence.Transient
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
import
lombok.Data
;
/**
* <p>Description:
...
...
@@ -21,7 +24,7 @@ import java.util.List;
*/
@Data
@Table
(
name
=
"smart_product_type"
)
public
class
SmartProductType
extends
BaseDTO
{
public
class
SmartProductType
implements
Serializable
{
/**
* 一级分类
*/
...
...
src/main/java/cn/com/glsx/smart/modules/entity/SmartSysCode.java
View file @
021061f
package
cn
.
com
.
glsx
.
smart
.
modules
.
entity
;
import
cn.com.glsx.smart.modules.model.BaseDTO
;
import
lombok.Data
;
import
javax.persistence.*
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
javax.persistence.Transient
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
import
lombok.Data
;
/**
* <p>Description:
...
...
@@ -21,7 +24,7 @@ import java.util.List;
*/
@Data
@Table
(
name
=
"smart_sys_code"
)
public
class
SmartSysCode
extends
BaseDTO
{
public
class
SmartSysCode
implements
Serializable
{
/**
*
*/
...
...
src/main/java/cn/com/glsx/smart/modules/entity/SmartSysFile.java
View file @
021061f
package
cn
.
com
.
glsx
.
smart
.
modules
.
entity
;
import
lombok.Data
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
java.io.Serializable
;
import
java.util.Date
;
import
lombok.Data
;
/**
* <p>Description:
...
...
@@ -22,7 +22,7 @@ import java.util.Date;
*/
@Data
@Table
(
name
=
"smart_sys_file"
)
public
class
SmartSysFile
{
public
class
SmartSysFile
implements
Serializable
{
/**
* 标识ID
*/
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment