Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rs-cloud-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周健威
rs-cloud-platform
Commits
101ae0c5
Commit
101ae0c5
authored
Dec 17, 2020
by
unset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加订单信息接口,添加相关字段
parent
cfea602b
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
598 additions
and
389 deletions
+598
-389
ResultCode.java
...thub/wxiaoqi/security/common/util/process/ResultCode.java
+3
-180
resultcod.properties
...common/src/main/resources/properties/resultcod.properties
+5
-183
ConfirmReceivedDto.java
...om/upyuns/platform/rs/website/dto/ConfirmReceivedDto.java
+25
-0
OrderInvoiceDto.java
...a/com/upyuns/platform/rs/website/dto/OrderInvoiceDto.java
+24
-0
OrderEInvoice.java
.../com/upyuns/platform/rs/website/entity/OrderEInvoice.java
+11
-1
OrderInfo.java
...java/com/upyuns/platform/rs/website/entity/OrderInfo.java
+25
-0
OrderInvoiceStatusEnum.java
...yuns/platform/rs/website/type/OrderInvoiceStatusEnum.java
+66
-0
OrderShippingStatusEnum.java
...uns/platform/rs/website/type/OrderShippingStatusEnum.java
+62
-0
OrderStatusEnum.java
.../com/upyuns/platform/rs/website/type/OrderStatusEnum.java
+68
-0
OrderEInvoiceBiz.java
.../com/upyuns/platform/rs/website/biz/OrderEInvoiceBiz.java
+11
-0
OrderInfoBiz.java
...java/com/upyuns/platform/rs/website/biz/OrderInfoBiz.java
+274
-20
OrderItemBiz.java
...java/com/upyuns/platform/rs/website/biz/OrderItemBiz.java
+12
-1
OrderInfoWebController.java
...orm/rs/website/controller/web/OrderInfoWebController.java
+12
-4
No files found.
ace-common/src/main/java/com/github/wxiaoqi/security/common/util/process/ResultCode.java
View file @
101ae0c5
...
@@ -8,53 +8,11 @@ public class ResultCode {
...
@@ -8,53 +8,11 @@ public class ResultCode {
////////////////////////////参数相关///////////////////////////
////////////////////////////参数相关///////////////////////////
//参数非法,请修改
//参数非法,请修改
public
static
int
PARAM_ILLEGAL_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"PARAM_ILLEGAL_CODE"
));
public
static
int
PARAM_ILLEGAL_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"PARAM_ILLEGAL_CODE"
));
//参数时效已过时,不能使用X
public
static
int
PARAM_EPIRE_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"PARAM_EXPIRE_CODE"
));
public
static
int
VEHICLE_IS_BOOKED
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"VEHICLE_IS_BOOKED"
));
// 操作成功
// 操作成功
public
static
int
SUCCESS_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"SUCCESS_CODE"
));
public
static
int
SUCCESS_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"SUCCESS_CODE"
));
// 操作失败
// 操作失败
public
static
int
FAILED_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"FAILED_CODE"
));
public
static
int
FAILED_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"FAILED_CODE"
));
//IM消息删除失败
public
static
int
IM_DELETE_FAIL_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"IM_DELETE_FAIL_CODE"
));
public
static
int
IM_MSG_NOT_EXIST_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"IM_MSG_NOT_EXIST_CODE"
));
// 车辆预定失败,请重试
public
static
int
BOOKED_FAILED_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"BOOKED_FAILED_CODE"
));
//预定时间不能为空 DATE_TIME_IS_NULL
public
static
int
DATE_TIME_IS_NULL
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"DATE_TIME_IS_NULL"
));
// 预定时间不能小于当前时间
public
static
int
ONLY_BOOK_FROM_TODAY
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"ONLY_BOOK_FROM_TODAY"
));
public
static
int
END_TIME_FROM_TODAY
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"END_TIME_FROM_TODAY"
));
// 只能预定两个月内的车辆
public
static
int
ONLY_BOOK_TWO_MONTH
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"ONLY_BOOK_TWO_MONTH"
));
// 只能取消预定两个月内的车辆
public
static
int
ONLY_UNBOOK_TWO_MONTH
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"ONLY_UNBOOK_TWO_MONTH"
));
// 添加车辆太多
public
static
int
ADD_VEHICLE_MORE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"ADD_VEHICLE_MORE"
));
// 停靠公司不能为空
public
static
int
RET_COMPANY_CAN_NOT_BE_NULL
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"RET_COMPANY_CAN_NOT_BE_NULL"
));
// 车牌不能为空
public
static
int
NUMBER_PLAT_CAN_NOT_BE_NULL
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"NUMBER_PLAT_CAN_NOT_BE_NULL"
));
// 选择日期不可取消预定
public
static
int
VEHICLE_CAN_NOT_UNBOOK
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"VEHICLE_CAN_NOT_UNBOOK"
));
//预定日期为空
public
static
int
BOOKED_DATE_IS_EMPTY
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"BOOKED_DATE_IS_EMPTY"
));
public
static
int
TODAY_CAN_NOT_BOOK
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"TODAY_CAN_NOT_BOOK"
));
// 添加车辆失败,请重试
public
static
int
ADD_VEHICLE_FAIL
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"ADD_VEHICLE_FAIL"
));
// 修改车辆失败,请重试
public
static
int
UPDATE_VEHICLE_FAIL
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"UPDATE_VEHICLE_FAIL"
));
// 操作失败
// 操作失败
public
static
int
NULL_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"NULL_CODE"
));
public
static
int
NULL_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"NULL_CODE"
));
// 操作出现异常
// 操作出现异常
...
@@ -73,32 +31,6 @@ public class ResultCode {
...
@@ -73,32 +31,6 @@ public class ResultCode {
public
static
int
WXAPI_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"WXAPI_CODE"
));
public
static
int
WXAPI_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"WXAPI_CODE"
));
// 微信用户不存在
// 微信用户不存在
public
static
int
WXNOTEXIST_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"WXNOTEXIST_CODE"
));
public
static
int
WXNOTEXIST_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"WXNOTEXIST_CODE"
));
// ajax请求,用户未登录
public
static
int
AJAX_WECHAT_NOTEXIST_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"AJAX_WECHAT_NOTEXIST_CODE"
));
// 手机号已绑定人脸
public
static
int
FACE_BIND_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"FACE_BIND_CODE"
));
// 手机号未绑定人脸
public
static
int
FACE_NOTBIND_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"FACE_NOTBIND_CODE"
));
// 人脸识别失败
public
static
int
FACE_NOTEXIST_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"FACE_NOTEXIST_CODE"
));
// 人脸比对失败
public
static
int
FACE_COMPARE_FAILED_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"FACE_COMPARE_FAILED_CODE"
));
// 人脸+眼睛识别失败
public
static
int
EYE_NOTEXIST_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"EYE_NOTEXIST_CODE"
));
// redis中的token过期或者为空
public
static
int
REDIS_TOKEN_NULL_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"REDIS_TOKEN_NULL_CODE"
));
// 手机号码已被使用
public
static
int
PHONE_EXIST_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"PHONE_EXIST_CODE"
));
// 获取app用户失败
public
static
int
GET_APPUSER_FAILED_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"GET_APPUSER_FAILED_CODE"
));
// 用户不存在
// 用户不存在
public
static
int
USER_NOTEXIST_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"USER_NOTEXIST_CODE"
));
public
static
int
USER_NOTEXIST_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"USER_NOTEXIST_CODE"
));
...
@@ -106,128 +38,19 @@ public class ResultCode {
...
@@ -106,128 +38,19 @@ public class ResultCode {
// 用户已存在
// 用户已存在
public
static
int
USER_EXIST_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"USER_EXIST_CODE"
));
public
static
int
USER_EXIST_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"USER_EXIST_CODE"
));
// 手机号已绑定人脸
public
static
int
WX_BIND_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"WX_BIND_CODE"
));
// 人脸已绑定手机号
public
static
int
FACE_BIND_PHONE_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"FACE_BIND_PHONE_CODE"
));
// 新增组织失败
public
static
int
ORG_INSERT_FAILED_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"ORG_INSERT_FAILED_CODE"
));
// 更新组织信息失败
public
static
int
ORG_UPDATE_FAILED_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"ORG_UPDATE_FAILED_CODE"
));
// 新增角色信息失败
public
static
int
ROLE_INSERT_FAILED_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"ROLE_INSERT_FAILED_CODE"
));
// 更新组织信息失败
public
static
int
ROLE_UPDATE_FAILED_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"ROLE_UPDATE_FAILED_CODE"
));
// 组织下已存在超级管理员角色
public
static
int
ROLE_SUPER_ISEXIST_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"ROLE_SUPER_ISEXIST_CODE"
));
// 角色不存在
public
static
int
ROLE_NOTEXIST_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"ROLE_NOTEXIST_CODE"
));
// 没有操作菜单的权限
public
static
int
NOT_MENU_AUTH_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"NOT_MENU_AUTH_CODE"
));
// 新增权限失败
public
static
int
INSERT_AUTH_FAILED_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"INSERT_AUTH_FAILED_CODE"
));
// 更新权限失败
public
static
int
UPDATE_AUTH_FAILED_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"UPDATE_AUTH_FAILED_CODE"
));
// 角色权限不存在
public
static
int
ROLE_NOTEXIST_AUTH_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"ROLE_NOTEXIST_AUTH_CODE"
));
// 无一级角色
public
static
int
NOT_HAVE_LEVEL1
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"NOT_HAVE_LEVEL1"
));
// 账户已存在
public
static
int
ACCOUNT_ISEXIST_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"ACCOUNT_ISEXIST_CODE"
));
// 账户不存在
public
static
int
ACCOUNT_NOT_EXIST_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"ACCOUNT_NOT_EXIST_CODE"
));
// 账户不存在
// 账户不存在
public
static
int
ORG_DONTHAVE_PUBLIC_CODE
=
Integer
public
static
int
ORG_DONTHAVE_PUBLIC_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"ORG_DONTHAVE_PUBLIC_CODE"
));
.
valueOf
(
SystemProperty
.
getResultConfig
(
"ORG_DONTHAVE_PUBLIC_CODE"
));
// 组织超级管理员已存在
public
static
int
ACCOUNT_FIRST_ISEXIST_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"ACCOUNT_FIRST_ISEXIST_CODE"
));
// 昵称格式有误,请填写正确昵称
public
static
int
NICKNAME_NULL_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"NICKNAME_NULL_CODE"
));
// 账户已禁用
public
static
int
ACCOUNTINFO_ISDEL
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"ACCOUNTINFO_ISDEL"
));
// // 监控设备不存在
// public static int DEVICE_NOTEXIST_CODE = Integer.valueOf(SystemProperty.getResultConfig("DEVICE_NOTEXIST_CODE"));
// // 设备access_token获取失败
// public static int DEVICE_TOKEN_NOTEXIST_CODE = Integer
// .valueOf(SystemProperty.getResultConfig("DEVICE_TOKEN_NOTEXIST_CODE"));
// 操作频繁提示
public
static
int
API_MAX_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"API_MAX_CODE"
));
// 公众号不存在
public
static
int
PUBLIC_NOTEXIST_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"PUBLIC_NOTEXIST_CODE"
));
// 公众号不存在
public
static
int
REPEAT_SUB_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"REPEAT_SUB_CODE"
));
// 身份证信息已存在
public
static
int
IDNUM_ISEXIST_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"IDNUM_ISEXIST_CODE"
));
// 身份证信息已存在
public
static
int
IDCARD_INVALID_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"IDCARD_INVALID_CODE"
));
// 企业个人简历不存在
public
static
int
CORP_VITA_NOTEXIST
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"CORP_VITA_NOTEXIST"
));
// 企业个人简历不完善
public
static
int
CORP_VITA_INCOMPLETET
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"CORP_VITA_INCOMPLETET"
));
// 简历有效期内已投
public
static
int
VITA_DELIVERED
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"VITA_DELIVERED"
));
// 岗位已下架
public
static
int
POST_END_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"POST_END_CODE"
));
// 客服下存在粉丝
public
static
int
SERVICE_HAS_FANS
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"SERVICE_HAS_FANS"
));
// 未找到客服信息
public
static
int
NOT_FIND_SERVICE_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"NOT_FIND_SERVICE_CODE"
));
// 非客服身份
public
static
int
NOT_SERVICE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"NOT_SERVICE"
));
// 圈子模块resultInfo类型返回正确码
public
static
int
SCRM_RESULTINFO_SUCCESS_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"SCRM_RESULTINFO_SUCCESS_CODE"
));
// 市接口无数据返回
public
static
int
NO_SELECT_BY_RS
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"NO_SELECT_BY_RS"
));
// 未绑定社保卡
public
static
int
NOT_BIND_SOCIAL_CARD
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"NOT_BIND_SOCIAL_CARD"
));
// 操作失败
public
static
int
STOCK_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"STOCK_CODE"
));
public
static
int
GET_AUTH_INFO_FAILED_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"GET_AUTH_INFO_FAILED_CODE"
));
public
static
int
GET_AUTH_INFO_FAILED_CODE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"GET_AUTH_INFO_FAILED_CODE"
));
public
static
int
WRONG_FORMAT_OF_ID_CARD
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"WRONG_FORMAT_OF_ID_CARD"
));
public
static
int
WRONG_FORMAT_OF_ID_CARD
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"WRONG_FORMAT_OF_ID_CARD"
));
public
static
int
INCOMPLETE_DATA
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"INCOMPLETE_DATA"
));
public
static
int
INCOMPLETE_DATA
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"INCOMPLETE_DATA"
));
/* ----------------------------------------------------订单相关---------------------------------------------------------- */
public
static
int
ORDER_NOT_EXIST
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"ORDER_NOT_EXIST"
));
public
static
String
getMsg
(
int
code
)
{
public
static
String
getMsg
(
int
code
)
{
return
SystemProperty
.
getResultConfig
(
String
.
valueOf
(
code
));
return
SystemProperty
.
getResultConfig
(
String
.
valueOf
(
code
));
}
}
...
...
ace-common/src/main/resources/properties/resultcod.properties
View file @
101ae0c5
...
@@ -6,10 +6,6 @@ SUCCESS_CODE=200
...
@@ -6,10 +6,6 @@ SUCCESS_CODE=200
#操作失败
#操作失败
FAILED_CODE
=
1001
FAILED_CODE
=
1001
1001
=
操作失败
1001
=
操作失败
IM_DELETE_FAIL_CODE
=
10011
10011
=
删除消息失败
IM_MSG_NOT_EXIST_CODE
=
10012
10012
=
消息不存在
#数据已存在
#数据已存在
EXIST_CODE
=
1002
EXIST_CODE
=
1002
1002
=
数据已存在
1002
=
数据已存在
...
@@ -22,12 +18,11 @@ NULL_CODE=1003
...
@@ -22,12 +18,11 @@ NULL_CODE=1003
#操作出现异常
#操作出现异常
EXCEPTION_CODE
=
1004
EXCEPTION_CODE
=
1004
1004
=
操作出现异常
1004
=
操作出现异常
#操作频繁,稍后再试
API_MAX_CODE
=
1005
1005
=
操作频繁,稍后再试
#rstoken已失效
#rstoken已失效
RSTOKEN_EXPIRED_CODE
=
1006
RSTOKEN_EXPIRED_CODE
=
1006
1006
=
rstoken已失效
1006
=
rstoken已失效
#rstoken为空
#rstoken为空
RSTOKEN_NULL_CODE
=
1007
RSTOKEN_NULL_CODE
=
1007
1007
=
rstoken为空
1007
=
rstoken为空
...
@@ -37,63 +32,14 @@ RSTOKEN_NULL_CODE=1007
...
@@ -37,63 +32,14 @@ RSTOKEN_NULL_CODE=1007
DB_OPERATION_FAIL_CODE
=
1008
DB_OPERATION_FAIL_CODE
=
1008
1008
=
数据库操作失败
1008
=
数据库操作失败
VEHICLE_IS_BOOKED
=
10080
10080
=
车辆已经被预定
#参数非法
#参数非法
PARAM_ILLEGAL_CODE
=
1011
PARAM_ILLEGAL_CODE
=
1011
1011
=
参数非法,请修改
1011
=
参数非法,请修改
#参数时效已过时
PARAM_EXPIRE_CODE
=
1010
1010
=
参数时效已过时,不能使用
#请求微信接口失败
#请求微信接口失败
WXAPI_CODE
=
2001
WXAPI_CODE
=
2001
#微信用不不存在
#微信用不不存在
WXNOTEXIST_CODE
=
2003
WXNOTEXIST_CODE
=
2003
#公众号不存在
PUBLIC_NOTEXIST_CODE
=
2004
2004
=
公众号不存在
#ajax请求,用户未登录
AJAX_WECHAT_NOTEXIST_CODE
=
2005
2005
=
ajax请求,用户未登录
#手机号已绑定人脸
FACE_BIND_CODE
=
3000
3000
=
手机号已绑定人脸
#手机号未绑定人脸
FACE_NOTBIND_CODE
=
3001
3001
=
手机号未绑定人脸
#人脸识别失败
FACE_NOTEXIST_CODE
=
3002
3002
=
人脸识别失败
#人脸比对失败
FACE_COMPARE_FAILED_CODE
=
3003
3003
=
人脸比对失败
#人脸已绑定手机号码
FACE_BIND_PHONE_CODE
=
3004
3004
=
人脸已绑定手机号
#人脸已绑定手机号码
EYE_NOTEXIST_CODE
=
3005
3005
=
识别失败
#登陆token过期
REDIS_TOKEN_NULL_CODE
=
4001
4001
=
登陆token过期
#手机号已绑定微信
WX_BIND_CODE
=
4002
4002
=
手机号已绑定微信
#获取用户失败
GET_APPUSER_FAILED_CODE
=
4003
4003
=
获取用户失败
#手机号码已被使用
#手机号码已被使用
PHONE_EXIST_CODE
=
5001
PHONE_EXIST_CODE
=
5001
...
@@ -107,101 +53,15 @@ USER_NOTEXIST_CODE=5002
...
@@ -107,101 +53,15 @@ USER_NOTEXIST_CODE=5002
USER_EXIST_CODE
=
5003
USER_EXIST_CODE
=
5003
5003
=
用户不存在
5003
=
用户不存在
ORG_INSERT_FAILED_CODE
=
6001
6001
=
新增组织失败
ORG_UPDATE_FAILED_CODE
=
6002
6002
=
更新组织信息失败
ROLE_INSERT_FAILED_CODE
=
7001
7001
=
新增角色信息失败
ROLE_UPDATE_FAILED_CODE
=
7002
7002
=
更新角色信息失败
ROLE_SUPER_ISEXIST_CODE
=
7003
7003
=
该组织已存在一级管理员角色
ROLE_NOTEXIST_CODE
=
7004
7004
=
角色不存在
NOT_HAVE_LEVEL1
=
7005
7005
=
该组织无一级角色,请先创建
NOT_MENU_AUTH_CODE
=
8001
8001
=
没有操作该菜单的权限
INSERT_AUTH_FAILED_CODE
=
8003
8003
=
新增权限失败
UPDATE_AUTH_FAILED_CODE
=
8002
8002
=
更新权限失败
ROLE_NOTEXIST_AUTH_CODE
=
8004
8004
=
角色权限不存在
ACCOUNT_ISEXIST_CODE
=
9001
ACCOUNT_ISEXIST_CODE
=
9001
9001
=
账户已存在
9001
=
账户已存在
ACCOUNT_FIRST_ISEXIST_CODE
=
9002
ACCOUNT_FIRST_ISEXIST_CODE
=
9002
9002
=
该组织已存在超级管理员账户
9002
=
该组织已存在超级管理员账户
ACCOUNT_NOT_EXIST_CODE
=
9003
9003
=
账户不存在
NOT_FIND_SERVICE_CODE
=
9004
9004
=
未找到客服信息
ORG_DONTHAVE_PUBLIC_CODE
=
9005
ORG_DONTHAVE_PUBLIC_CODE
=
9005
9005
=
该组织暂未配置公众号信息,请先配置!
9005
=
该组织暂未配置公众号信息,请先配置!
NICKNAME_NULL_CODE
=
9006
9006
=
昵称格式有误,请填写正确昵称
ACCOUNTINFO_ISDEL
=
9007
9007
=
账户已禁用
#DEVICE_NOTEXIST_CODE=1005
#1005=监控设备不存在
#DEVICE_TOKEN_NOTEXIST_CODE=1006
#1005=设备access_token获取失败
REPEAT_SUB_CODE
=
1008
#身份证信息已采集
IDNUM_ISEXIST_CODE
=
10001
#身份证已过去
IDCARD_INVALID_CODE
=
10002
#企业个人简历不存在
CORP_VITA_NOTEXIST
=
20001
20001
=
个人简历不存在,请先创建简历
#企业个人简历不完善
CORP_VITA_INCOMPLETET
=
20002
20002
=
个人简历不完善,请先完善简历
#简历在有效时间内已投递
VITA_DELIVERED
=
20003
#岗位已下架
POST_END_CODE
=
20004
20004
=
该岗位已下架
#客服存在粉丝
SERVICE_HAS_FANS
=
40001
40001
=
请先转移该客服的粉丝!
#客服
NOT_SERVICE
=
40002
40002
=
当前用户不是客服身份!
#圈子模块resultInfo类型返回正确码
SCRM_RESULTINFO_SUCCESS_CODE
=
10344
#市接口无数据返回
NO_SELECT_BY_RS
=
1010
#还未绑定社保卡
NOT_BIND_SOCIAL_CARD
=
3010
#库存不足
STOCK_CODE
=
201
#获取用户认证信息失败
GET_AUTH_INFO_FAILED_CODE
=
4004
GET_AUTH_INFO_FAILED_CODE
=
4004
4004
=
获取用户认证信息失败!
4004
=
获取用户认证信息失败!
#证件件格式
#证件件格式
...
@@ -211,44 +71,6 @@ WRONG_FORMAT_OF_ID_CARD=4005
...
@@ -211,44 +71,6 @@ WRONG_FORMAT_OF_ID_CARD=4005
INCOMPLETE_DATA
=
4006
INCOMPLETE_DATA
=
4006
4006
=
资料不齐全!
4006
=
资料不齐全!
BOOKED_FAILED_CODE
=
4007
####################################订单相关################################
4007
=
车辆预定失败,请重试!
ORDER_NOT_EXIST
=
20001
20001
=
该订单不存在!
ONLY_BOOK_FROM_TODAY
=
4008
\ No newline at end of file
4008
=
预定时间不能小于当前时间
ADD_VEHICLE_FAIL
=
4009
4009
=
添加车辆失败,请重试
UPDATE_VEHICLE_FAIL
=
4010
4010
=
修改车辆失败,请重试
DATE_TIME_IS_NULL
=
4011
4011
=
预定时间不能为空
ONLY_BOOK_TWO_MONTH
=
4012
4012
=
最多提前三个月预约
ONLY_UNBOOK_TWO_MONTH
=
4013
4013
=
只能取消预定两月内的车辆
VEHICLE_CAN_NOT_UNBOOK
=
4014
4014
=
选择日期不可取消预定
BOOKED_DATE_IS_EMPTY
=
4015
4015
=
预定日期为空
TODAY_CAN_NOT_BOOK
=
4016
4016
=
当天不可预定
ADD_VEHICLE_MORE
=
4017
4017
=
添加车辆过多,请分批添加
RET_COMPANY_CAN_NOT_BE_NULL
=
4018
4018
=
停靠公司不能为空
NUMBER_PLAT_CAN_NOT_BE_NULL
=
4019
4019
=
车牌不能为空
END_TIME_FROM_TODAY
=
4020
4020
=
结束时间不能小于开始时间
\ No newline at end of file
rs-website/rs-website-api/src/main/java/com/upyuns/platform/rs/website/dto/ConfirmReceivedDto.java
0 → 100644
View file @
101ae0c5
package
com
.
upyuns
.
platform
.
rs
.
website
.
dto
;
import
lombok.Data
;
/**
* @ClassName : ConfirmReceivedDto
* @Description : 确认收货
* @Author : jiaoruizhen
* @Date: 2020-12-17 14:01
*/
@Data
public
class
ConfirmReceivedDto
{
//订单号
Long
orderId
;
/**
* 快递单号
*/
String
trackingNumber
;
/**
* 快递单图片
*/
String
trackingImg
;
}
rs-website/rs-website-api/src/main/java/com/upyuns/platform/rs/website/dto/OrderInvoiceDto.java
0 → 100644
View file @
101ae0c5
package
com
.
upyuns
.
platform
.
rs
.
website
.
dto
;
import
lombok.Data
;
/**
* @ClassName : OrderInvoiceDto
* @Description : 订单发票
* @Author : jiaoruizhen
* @Date: 2020-12-17 15:23
*/
@Data
public
class
OrderInvoiceDto
{
/**
* 订单号
*/
private
Long
orderId
;
/**
* 发票链接
*/
private
String
invoiceUrl
;
}
rs-website/rs-website-api/src/main/java/com/upyuns/platform/rs/website/entity/OrderEInvoice.java
View file @
101ae0c5
...
@@ -167,6 +167,16 @@ public class OrderEInvoice implements Serializable {
...
@@ -167,6 +167,16 @@ public class OrderEInvoice implements Serializable {
@Column
(
name
=
"content_title"
)
@Column
(
name
=
"content_title"
)
@ApiModelProperty
(
value
=
"发票内容"
)
@ApiModelProperty
(
value
=
"发票内容"
)
private
String
contentTitle
;
private
String
contentTitle
;
/**
* 快递单号
*/
String
trackingNumber
;
/**
* 快递单图片
*/
String
trackingImg
;
}
}
rs-website/rs-website-api/src/main/java/com/upyuns/platform/rs/website/entity/OrderInfo.java
View file @
101ae0c5
...
@@ -3,6 +3,7 @@ package com.upyuns.platform.rs.website.entity;
...
@@ -3,6 +3,7 @@ package com.upyuns.platform.rs.website.entity;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
javax.persistence.*
;
import
javax.persistence.*
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
...
@@ -191,5 +192,29 @@ public class OrderInfo implements Serializable {
...
@@ -191,5 +192,29 @@ public class OrderInfo implements Serializable {
*/
*/
private
Integer
invoiceStatus
;
private
Integer
invoiceStatus
;
/**
* 发票ID
*/
private
Integer
invoiceId
;
/**
* 快递单号
*/
String
trackingNumber
;
/**
* 快递单图片
*/
String
trackingImg
;
/**
* 取消备注
*/
String
cancelRemark
;
@Transient
private
List
<
OrderItem
>
orderItemList
;
@Transient
OrderEInvoice
orderEInvoice
;
}
}
rs-website/rs-website-api/src/main/java/com/upyuns/platform/rs/website/type/OrderInvoiceStatusEnum.java
0 → 100644
View file @
101ae0c5
package
com
.
upyuns
.
platform
.
rs
.
website
.
type
;
import
lombok.Data
;
/**
* @ClassName : OrderInvoiceStatus
* @Description : 订单发票状态
* @Author : jiaoruizhen
* @Date: 2020-12-17 15:39
* 发票状态: 1、未开发票,2、已开发票, 3、已发货, 4、已收货、5、退回, 6、已完成
*/
public
enum
OrderInvoiceStatusEnum
{
INVOICE_NO_OPEN
(
1
,
"未开发票"
),
INVOICE_OPEN
(
2
,
"已开发票"
),
INVOICE_SEND
(
3
,
"已发货"
),
INVOICE_RECEIVED
(
4
,
"已收货"
),
INVOICE_REFUND
(
5
,
"退回"
),
INVOICE_COMPLETE
(
6
,
"已完成"
),
;
private
Integer
type
;
private
String
msg
;
OrderInvoiceStatusEnum
(
Integer
type
,
String
msg
)
{
this
.
type
=
type
;
this
.
msg
=
msg
;
}
public
Integer
getType
()
{
return
type
;
}
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
}
public
String
getMsg
()
{
return
msg
;
}
public
void
setMsg
(
String
msg
)
{
this
.
msg
=
msg
;
}
public
static
<
T
extends
OrderInvoiceStatusEnum
>
String
getType
(
Integer
code
,
Class
<
T
>
t
)
{
for
(
T
item
:
t
.
getEnumConstants
())
{
if
(
item
.
getType
().
equals
(
code
))
{
return
item
.
getMsg
();
}
}
return
""
;
}
public
static
OrderInvoiceStatusEnum
getByCode
(
Integer
code
)
{
for
(
OrderInvoiceStatusEnum
v
:
values
())
{
if
(
v
.
getType
()
==
code
)
{
return
v
;
}
}
return
null
;
}
public
static
String
getProductStatusEnum
(
Integer
code
)
{
return
getType
(
code
,
OrderInvoiceStatusEnum
.
class
);
}
}
rs-website/rs-website-api/src/main/java/com/upyuns/platform/rs/website/type/OrderShippingStatusEnum.java
0 → 100644
View file @
101ae0c5
package
com
.
upyuns
.
platform
.
rs
.
website
.
type
;
/**
* @ClassName : OrderStatusEnum
* @Description : 订单发货状态
* @Author : jiaoruizhen
* 订单发货状态:0待发货,1已发货,2收货,3退货,
* @Date: 2020-12-12 16:50
*/
public
enum
OrderShippingStatusEnum
{
ORDER_NO_SEND
(
0
,
"待发货"
),
ORDER_SEND
(
1
,
"已发货"
),
ORDER_RECEIVED
(
2
,
"已收货"
),
ORDER_REFUND
(
3
,
"退货"
);
private
Integer
type
;
private
String
msg
;
OrderShippingStatusEnum
(
Integer
type
,
String
msg
)
{
this
.
type
=
type
;
this
.
msg
=
msg
;
}
public
Integer
getType
()
{
return
type
;
}
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
}
public
String
getMsg
()
{
return
msg
;
}
public
void
setMsg
(
String
msg
)
{
this
.
msg
=
msg
;
}
public
static
<
T
extends
OrderShippingStatusEnum
>
String
getType
(
Integer
code
,
Class
<
T
>
t
)
{
for
(
T
item
:
t
.
getEnumConstants
())
{
if
(
item
.
getType
().
equals
(
code
))
{
return
item
.
getMsg
();
}
}
return
""
;
}
public
static
OrderShippingStatusEnum
getByCode
(
Integer
code
)
{
for
(
OrderShippingStatusEnum
v
:
values
())
{
if
(
v
.
getType
()
==
code
)
{
return
v
;
}
}
return
null
;
}
public
static
String
getProductStatusEnum
(
Integer
code
)
{
return
getType
(
code
,
OrderShippingStatusEnum
.
class
);
}
}
rs-website/rs-website-api/src/main/java/com/upyuns/platform/rs/website/type/OrderStatusEnum.java
0 → 100644
View file @
101ae0c5
package
com
.
upyuns
.
platform
.
rs
.
website
.
type
;
/**
* @ClassName : OrderStatusEnum
* @Description : 订单状态
* @Author : jiaoruizhen
* 订单状态:0、定制订单无价格 1--创建订单,2--待付款,3--已支付,4--已发货, 5--已收货, 6、已完成 -1、删除,-2、取消, -3 退款
* @Date: 2020-12-12 16:50
*/
public
enum
OrderStatusEnum
{
ORDER_NO_PRICE
(
0
,
"定制订单无价格"
),
ORDER_CREATED
(
1
,
"创建订单"
),
ORDER_UNPAID
(
2
,
"待付款"
),
ORDER_PAID
(
3
,
"已支付"
),
ORDER_SEND
(
4
,
"已发货"
),
ORDER_RECEIVED
(
5
,
"已收货"
),
ORDER_COMPLETE
(
6
,
"已完成"
),
ORDER_DELETE
(-
1
,
"删除"
),
ORDER_CANCEL
(-
2
,
"取消"
),
ORDER_REFUND
(-
3
,
"退款"
);
private
Integer
type
;
private
String
msg
;
OrderStatusEnum
(
Integer
type
,
String
msg
)
{
this
.
type
=
type
;
this
.
msg
=
msg
;
}
public
Integer
getType
()
{
return
type
;
}
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
}
public
String
getMsg
()
{
return
msg
;
}
public
void
setMsg
(
String
msg
)
{
this
.
msg
=
msg
;
}
public
static
<
T
extends
OrderStatusEnum
>
String
getType
(
Integer
code
,
Class
<
T
>
t
)
{
for
(
T
item
:
t
.
getEnumConstants
())
{
if
(
item
.
getType
().
equals
(
code
))
{
return
item
.
getMsg
();
}
}
return
""
;
}
public
static
OrderStatusEnum
getByCode
(
Integer
code
)
{
for
(
OrderStatusEnum
v
:
values
())
{
if
(
v
.
getType
()
==
code
)
{
return
v
;
}
}
return
null
;
}
public
static
String
getProductStatusEnum
(
Integer
code
)
{
return
getType
(
code
,
OrderStatusEnum
.
class
);
}
}
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/biz/OrderEInvoiceBiz.java
View file @
101ae0c5
...
@@ -3,6 +3,7 @@ package com.upyuns.platform.rs.website.biz;
...
@@ -3,6 +3,7 @@ package com.upyuns.platform.rs.website.biz;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.copier.CopyOptions
;
import
cn.hutool.core.bean.copier.CopyOptions
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.upyuns.platform.rs.website.entity.OrderItem
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.upyuns.platform.rs.website.entity.OrderEInvoice
;
import
com.upyuns.platform.rs.website.entity.OrderEInvoice
;
...
@@ -52,4 +53,14 @@ public class OrderEInvoiceBiz extends BaseBiz<OrderEInvoiceMapper, OrderEInvoice
...
@@ -52,4 +53,14 @@ public class OrderEInvoiceBiz extends BaseBiz<OrderEInvoiceMapper, OrderEInvoice
return
mapper
.
selectByExample
(
example
);
return
mapper
.
selectByExample
(
example
);
}
}
/**
* 根据ID查询所有订单发票
* @param idList
* @return
*/
public
List
<
OrderEInvoice
>
getOrderEInvoice
(
List
<
Integer
>
idList
)
{
Example
example
=
new
Example
(
OrderEInvoice
.
class
);
example
.
createCriteria
().
andIn
(
"id"
,
idList
);
return
mapper
.
selectByExample
(
example
);
}
}
}
\ No newline at end of file
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/biz/OrderInfoBiz.java
View file @
101ae0c5
...
@@ -7,18 +7,22 @@ import com.github.wxiaoqi.security.admin.feign.UserFeign;
...
@@ -7,18 +7,22 @@ import com.github.wxiaoqi.security.admin.feign.UserFeign;
import
com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO
;
import
com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.util.OrderUtil
;
import
com.github.wxiaoqi.security.common.util.OrderUtil
;
import
com.github.wxiaoqi.security.common.util.Query
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.upyuns.platform.rs.universal.constant.DictionaryKey
;
import
com.upyuns.platform.rs.universal.constant.DictionaryKey
;
import
com.upyuns.platform.rs.universal.entity.Dictionary
;
import
com.upyuns.platform.rs.universal.entity.Dictionary
;
import
com.upyuns.platform.rs.universal.feign.ThirdFeign
;
import
com.upyuns.platform.rs.universal.feign.ThirdFeign
;
import
com.upyuns.platform.rs.website.dto.ItemInfoDto
;
import
com.upyuns.platform.rs.website.dto.*
;
import
com.upyuns.platform.rs.website.dto.OrderInfoDto
;
import
com.upyuns.platform.rs.website.dto.UserOrderDto
;
import
com.upyuns.platform.rs.website.entity.*
;
import
com.upyuns.platform.rs.website.entity.*
;
import
com.upyuns.platform.rs.website.mapper.OrderItemMapper
;
import
com.upyuns.platform.rs.website.mapper.OrderItemMapper
;
import
com.upyuns.platform.rs.website.type.OrderInvoiceStatusEnum
;
import
com.upyuns.platform.rs.website.type.OrderShippingStatusEnum
;
import
com.upyuns.platform.rs.website.type.OrderStatusEnum
;
import
com.upyuns.platform.rs.website.type.OrderTypeEnum
;
import
com.upyuns.platform.rs.website.type.OrderTypeEnum
;
import
com.upyuns.platform.rs.website.vo.ItemInfoVo
;
import
com.upyuns.platform.rs.website.vo.ItemInfoVo
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.regexp.RE
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -30,7 +34,9 @@ import javax.servlet.http.HttpServletRequest;
...
@@ -30,7 +34,9 @@ import javax.servlet.http.HttpServletRequest;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.concurrent.atomic.AtomicReference
;
import
java.util.stream.Collectors
;
/**
/**
* 订单信息
* 订单信息
...
@@ -129,7 +135,13 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
...
@@ -129,7 +135,13 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
* @param userOrderDto
* @param userOrderDto
* @return
* @return
*/
*/
public
List
<
OrderInfo
>
getUserOrder
(
UserOrderDto
userOrderDto
)
{
public
ObjectRestResponse
getUserOrder
(
UserOrderDto
userOrderDto
)
{
AppUserDTO
appUserDTO
=
userFeign
.
userDetailByToken
(
request
.
getHeader
(
"Authorization"
)).
getData
();
if
(
appUserDTO
==
null
)
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
RSTOKEN_EXPIRED_CODE
,
ResultCode
.
getMsg
(
ResultCode
.
RSTOKEN_EXPIRED_CODE
));
}
appUserDTO
.
setUserid
(
appUserDTO
.
getUserid
());
Query
query
=
new
Query
(
userOrderDto
);
Example
example
=
new
Example
(
OrderInfo
.
class
);
Example
example
=
new
Example
(
OrderInfo
.
class
);
Example
orderItemExample
=
new
Example
(
OrderItem
.
class
);
Example
orderItemExample
=
new
Example
(
OrderItem
.
class
);
Example
.
Criteria
orderInfoCriteria
=
example
.
createCriteria
();
Example
.
Criteria
orderInfoCriteria
=
example
.
createCriteria
();
...
@@ -148,13 +160,76 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
...
@@ -148,13 +160,76 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
}
}
orderInfoCriteria
.
andNotEqualTo
(
"status"
,
-
1
);
orderInfoCriteria
.
andNotEqualTo
(
"status"
,
-
1
);
example
.
orderBy
(
"updTime"
).
desc
();
example
.
orderBy
(
"updTime"
).
desc
();
List
<
OrderInfo
>
orderInfoList
=
mapper
.
selectByExample
(
example
);
PageDataVO
<
OrderInfo
>
pageDataVO
=
PageDataVO
.
pageInfo
(
query
,
()
->
mapper
.
selectByExample
(
example
));
if
(
orderInfoList
!=
null
)
{
if
(
pageDataVO
!=
null
&&
pageDataVO
.
getData
()
!=
null
)
{
fillOrderItem
(
pageDataVO
.
getData
());
fillOrderEInvoice
(
pageDataVO
.
getData
());
return
ObjectRestResponse
.
succ
(
pageDataVO
);
}
return
ObjectRestResponse
.
succ
(
new
PageDataVO
<>());
}
/**
* 填充订单发票信息
* @param orderInfoList
*/
private
void
fillOrderEInvoice
(
List
<
OrderInfo
>
orderInfoList
)
{
List
<
Integer
>
orderInvoiceIdList
=
orderInfoList
.
stream
().
map
(
OrderInfo:
:
getInvoiceId
).
collect
(
Collectors
.
toList
());
if
(
orderInvoiceIdList
!=
null
&&
orderInvoiceIdList
.
size
()
>
0
)
{
List
<
OrderEInvoice
>
orderEInvoiceList
=
orderEInvoiceBiz
.
getOrderEInvoice
(
orderInvoiceIdList
);
if
(
orderEInvoiceList
!=
null
&&
orderEInvoiceList
.
size
()
>
0
)
{
Map
<
Integer
,
List
<
OrderEInvoice
>>
map
=
orderEInvoiceList
.
stream
().
collect
(
Collectors
.
groupingBy
(
OrderEInvoice:
:
getId
));
if
(
map
!=
null
&&
map
.
size
()
>
0
)
{
orderInfoList
.
parallelStream
().
forEach
(
orderInfo
->
{
orderInfo
.
setOrderEInvoice
(
map
.
get
(
orderInfo
.
getInvoiceId
()).
get
(
0
));
});
}
}
}
}
/**
* 查询订单详情
* @param orderId
* @return
*/
public
OrderInfo
getOrderDetail
(
Long
orderId
)
{
Example
example
=
new
Example
(
OrderInfo
.
class
);
example
.
createCriteria
().
andEqualTo
(
"orderId"
,
orderId
).
andNotEqualTo
(
"status"
,
-
1
).
andNotEqualTo
(
"status"
,
-
2
);
OrderInfo
orderInfo
=
mapper
.
selectOneByExample
(
example
);
if
(
orderInfo
==
null
)
{
return
null
;
}
if
(
orderInfo
.
getInvoiceId
()
!=
null
)
{
OrderEInvoice
orderEInvoice
=
orderEInvoiceBiz
.
selectById
(
orderInfo
.
getInvoiceId
());
if
(
orderEInvoice
!=
null
)
{
orderInfo
.
setOrderEInvoice
(
orderEInvoice
);
}
}
List
<
OrderItem
>
orderItemList
=
orderItemBiz
.
getByOrderId
(
orderInfo
.
getOrderId
());
if
(
orderItemList
!=
null
&&
orderItemList
.
size
()
>
0
)
{
orderInfo
.
setOrderItemList
(
orderItemList
);
}
}
return
new
ArrayList
<>()
;
return
orderInfo
;
}
}
/**
* 填充订单商品
* @param orderInfoList
*/
private
void
fillOrderItem
(
List
<
OrderInfo
>
orderInfoList
)
{
List
<
Long
>
orderIdList
=
orderInfoList
.
stream
().
map
(
OrderInfo:
:
getOrderId
).
collect
(
Collectors
.
toList
());
List
<
OrderItem
>
orderItemList
=
orderItemBiz
.
getAllByOrderId
(
orderIdList
);
if
(
orderItemList
!=
null
)
{
Map
<
Long
,
List
<
OrderItem
>>
map
=
orderItemList
.
stream
().
collect
(
Collectors
.
groupingBy
(
OrderItem:
:
getOrderId
));
if
(
map
!=
null
&&
map
.
size
()
>
0
)
{
orderInfoList
.
parallelStream
().
forEach
(
orderInfo
->
{
orderInfo
.
setOrderItemList
(
map
.
get
(
orderInfo
.
getOrderId
()));
});
}
}
}
/**
/**
* 提交订单
* 提交订单
...
@@ -277,19 +352,6 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
...
@@ -277,19 +352,6 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
if
(
orderInfo
.
getFee
()
!=
null
)
{
if
(
orderInfo
.
getFee
()
!=
null
)
{
orderInfo
.
setTotalAmount
(
orderInfo
.
getAmount
().
add
(
orderInfo
.
getFee
()));
orderInfo
.
setTotalAmount
(
orderInfo
.
getAmount
().
add
(
orderInfo
.
getFee
()));
}
}
orderInfo
.
setSendType
(
orderInfoDto
.
getSendType
());
orderInfo
.
setType
(
1
);
/**
* 新增订单
*/
orderInfo
.
setOrderNo
(
OrderUtil
.
GetOrderNumber
(
""
,
OrderUtil
.
APP_MID
));
generateOrder
(
orderInfo
);
orderItemList
.
parallelStream
().
forEach
(
orderItem
->
{
if
(
orderItem
!=
null
)
{
orderItem
.
setOrderId
(
orderInfo
.
getOrderId
());
orderItemBiz
.
insertSelective
(
orderItem
);
}
});
//订单发票信息
//订单发票信息
if
(
orderInfoDto
.
getUserInvoiceId
()
!=
null
)
{
if
(
orderInfoDto
.
getUserInvoiceId
()
!=
null
)
{
...
@@ -310,10 +372,202 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
...
@@ -310,10 +372,202 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
orderEInvoice
.
setContentTitle
(
orderInfoDto
.
getInvoiceContent
());
orderEInvoice
.
setContentTitle
(
orderInfoDto
.
getInvoiceContent
());
}
}
orderEInvoiceBiz
.
addUpdate
(
orderEInvoice
);
orderEInvoiceBiz
.
addUpdate
(
orderEInvoice
);
orderInfo
.
setInvoiceStatus
(
2
);
orderInfo
.
setInvoiceId
(
orderEInvoice
.
getId
());
}
}
orderInfo
.
setSendType
(
orderInfoDto
.
getSendType
());
orderInfo
.
setType
(
1
);
/**
* 新增订单
*/
orderInfo
.
setOrderNo
(
OrderUtil
.
GetOrderNumber
(
""
,
OrderUtil
.
APP_MID
));
generateOrder
(
orderInfo
);
orderItemList
.
parallelStream
().
forEach
(
orderItem
->
{
if
(
orderItem
!=
null
)
{
orderItem
.
setOrderId
(
orderInfo
.
getOrderId
());
orderItemBiz
.
insertSelective
(
orderItem
);
}
});
return
ObjectRestResponse
.
succ
();
}
/**
* 确认收货
* @return
*/
public
ObjectRestResponse
confirmReceived
(
Long
orderId
)
{
if
(
orderId
==
null
)
{
return
ObjectRestResponse
.
paramIsEmpty
();
}
OrderInfo
orderInfo
=
selectById
(
orderId
);
if
(
orderInfo
==
null
||
orderInfo
.
getStatus
().
equals
(
OrderStatusEnum
.
ORDER_DELETE
.
getType
()))
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
ORDER_NOT_EXIST
,
ResultCode
.
getMsg
(
ResultCode
.
ORDER_NOT_EXIST
));
}
if
(!
orderInfo
.
getStatus
().
equals
(
OrderStatusEnum
.
ORDER_SEND
.
getType
()))
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
FAILED_CODE
,
"订单状态错误"
);
}
orderInfo
.
setShippingStatus
(
OrderShippingStatusEnum
.
ORDER_RECEIVED
.
getType
());
orderInfo
.
setStatus
(
OrderStatusEnum
.
ORDER_RECEIVED
.
getType
());
updateSelectiveByIdRe
(
orderInfo
);
return
ObjectRestResponse
.
succ
();
}
/**
* 发货
* @return
*/
public
ObjectRestResponse
orderSend
(
ConfirmReceivedDto
confirmReceivedDto
)
{
if
(
confirmReceivedDto
==
null
||
confirmReceivedDto
.
getOrderId
()
==
null
||
StringUtils
.
isBlank
(
confirmReceivedDto
.
getTrackingNumber
()))
{
return
ObjectRestResponse
.
paramIsEmpty
();
}
OrderInfo
orderInfo
=
selectById
(
confirmReceivedDto
.
getOrderId
());
if
(
orderInfo
==
null
||
orderInfo
.
getStatus
().
equals
(
OrderStatusEnum
.
ORDER_DELETE
.
getType
()))
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
ORDER_NOT_EXIST
,
ResultCode
.
getMsg
(
ResultCode
.
ORDER_NOT_EXIST
));
}
if
(!
orderInfo
.
getStatus
().
equals
(
OrderStatusEnum
.
ORDER_PAID
.
getType
()))
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
FAILED_CODE
,
"订单状态错误"
);
}
orderInfo
.
setShippingStatus
(
OrderShippingStatusEnum
.
ORDER_SEND
.
getType
());
orderInfo
.
setStatus
(
OrderStatusEnum
.
ORDER_SEND
.
getType
());
orderInfo
.
setTrackingNumber
(
confirmReceivedDto
.
getTrackingNumber
());
orderInfo
.
setTrackingImg
(
confirmReceivedDto
.
getTrackingImg
());
updateSelectiveByIdRe
(
orderInfo
);
return
ObjectRestResponse
.
succ
();
}
/**
* 开发票
* @return
*/
public
ObjectRestResponse
setInvoice
(
OrderInvoiceDto
orderInvoiceDto
)
{
if
(
orderInvoiceDto
==
null
||
orderInvoiceDto
.
getOrderId
()
==
null
||
StringUtils
.
isBlank
(
orderInvoiceDto
.
getInvoiceUrl
()))
{
return
ObjectRestResponse
.
paramIsEmpty
();
}
OrderInfo
orderInfo
=
selectById
(
orderInvoiceDto
.
getOrderId
());
if
(
orderInfo
==
null
||
orderInfo
.
getStatus
().
equals
(
OrderStatusEnum
.
ORDER_DELETE
.
getType
()))
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
ORDER_NOT_EXIST
,
ResultCode
.
getMsg
(
ResultCode
.
ORDER_NOT_EXIST
));
}
if
(
orderInfo
.
getInvoiceId
()
!=
null
)
{
OrderEInvoice
orderEInvoice
=
orderEInvoiceBiz
.
selectById
(
orderInfo
.
getInvoiceId
());
if
(
orderEInvoice
==
null
)
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
FAILED_CODE
,
"订单发票不存在"
);
}
}
orderEInvoice
.
setStatus
(
OrderInvoiceStatusEnum
.
INVOICE_OPEN
.
getType
());
orderEInvoice
.
setInvoiceUrl
(
orderInvoiceDto
.
getInvoiceUrl
());
orderEInvoiceBiz
.
updateSelectiveByIdRe
(
orderEInvoice
);
orderInfo
.
setInvoiceStatus
(
OrderInvoiceStatusEnum
.
INVOICE_OPEN
.
getType
());
updateSelectiveByIdRe
(
orderInfo
);
}
else
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
FAILED_CODE
,
"订单未开票"
);
}
}
return
ObjectRestResponse
.
succ
();
}
/**
* 发票发货
* @param confirmReceivedDto
* @return
*/
public
ObjectRestResponse
invoiceSend
(
ConfirmReceivedDto
confirmReceivedDto
)
{
if
(
confirmReceivedDto
==
null
||
confirmReceivedDto
.
getOrderId
()
==
null
||
StringUtils
.
isBlank
(
confirmReceivedDto
.
getTrackingNumber
()))
{
return
ObjectRestResponse
.
paramIsEmpty
();
}
OrderInfo
orderInfo
=
selectById
(
confirmReceivedDto
.
getOrderId
());
if
(
orderInfo
==
null
||
orderInfo
.
getStatus
().
equals
(
OrderStatusEnum
.
ORDER_DELETE
.
getType
()))
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
ORDER_NOT_EXIST
,
ResultCode
.
getMsg
(
ResultCode
.
ORDER_NOT_EXIST
));
}
if
(!
orderInfo
.
getInvoiceStatus
().
equals
(
OrderInvoiceStatusEnum
.
INVOICE_OPEN
.
getType
()))
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
FAILED_CODE
,
"订单状态错误"
);
}
OrderEInvoice
orderEInvoice
=
orderEInvoiceBiz
.
selectById
(
orderInfo
.
getInvoiceId
());
if
(
orderEInvoice
==
null
)
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
FAILED_CODE
,
"订单发票不存在"
);
}
orderEInvoice
.
setTrackingNumber
(
confirmReceivedDto
.
getTrackingNumber
());
orderEInvoice
.
setTrackingImg
(
confirmReceivedDto
.
getTrackingImg
());
orderEInvoiceBiz
.
updateSelectiveByIdRe
(
orderEInvoice
);
orderInfo
.
setInvoiceStatus
(
OrderInvoiceStatusEnum
.
INVOICE_SEND
.
getType
());
updateSelectiveByIdRe
(
orderInfo
);
return
ObjectRestResponse
.
succ
();
return
ObjectRestResponse
.
succ
();
}
}
/**
* 订单发票确认收货
* @param orderId
* @return
*/
public
ObjectRestResponse
confirmOrderInvoice
(
Long
orderId
)
{
if
(
orderId
==
null
)
{
return
ObjectRestResponse
.
paramIsEmpty
();
}
OrderInfo
orderInfo
=
selectById
(
orderId
);
if
(
orderInfo
==
null
||
orderInfo
.
getStatus
().
equals
(
OrderStatusEnum
.
ORDER_DELETE
.
getType
()))
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
ORDER_NOT_EXIST
,
ResultCode
.
getMsg
(
ResultCode
.
ORDER_NOT_EXIST
));
}
if
(!
orderInfo
.
getInvoiceStatus
().
equals
(
OrderInvoiceStatusEnum
.
INVOICE_SEND
.
getType
()))
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
FAILED_CODE
,
"订单状态错误"
);
}
orderInfo
.
setInvoiceStatus
(
OrderInvoiceStatusEnum
.
INVOICE_RECEIVED
.
getType
());
updateSelectiveByIdRe
(
orderInfo
);
return
ObjectRestResponse
.
succ
();
}
/**
* 取消订单
* @param orderId
* @param remark
* @return
*/
public
ObjectRestResponse
cancelOrder
(
Long
orderId
,
String
remark
)
{
if
(
orderId
==
null
)
{
return
ObjectRestResponse
.
paramIsEmpty
();
}
OrderInfo
orderInfo
=
selectById
(
orderId
);
if
(
orderInfo
==
null
||
orderInfo
.
getStatus
().
equals
(
OrderStatusEnum
.
ORDER_DELETE
.
getType
()))
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
ORDER_NOT_EXIST
,
ResultCode
.
getMsg
(
ResultCode
.
ORDER_NOT_EXIST
));
}
//订单状态为待支付前, 直接改变状态
if
(
orderInfo
.
getStatus
()
<
3
)
{
orderInfo
.
setStatus
(
OrderStatusEnum
.
ORDER_CANCEL
.
getType
());
}
else
if
(
orderInfo
.
getStatus
()
==
3
)
{
//订单已支付
orderInfo
.
setStatus
(
OrderStatusEnum
.
ORDER_CANCEL
.
getType
());
//todo 执行退款操作
}
else
if
(
orderInfo
.
getStatus
()
>
3
)
{
//已发货订单不可取消
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
FAILED_CODE
,
"订单不可取消"
);
}
if
(
StringUtils
.
isNotBlank
(
remark
))
{
orderInfo
.
setCancelRemark
(
remark
);
}
updateSelectiveByIdRe
(
orderInfo
);
return
ObjectRestResponse
.
succ
();
}
/**
* 删除订单
* @param orderId
* @return
*/
public
ObjectRestResponse
deleteOrder
(
Long
orderId
)
{
if
(
orderId
==
null
)
{
return
ObjectRestResponse
.
paramIsEmpty
();
}
OrderInfo
orderInfo
=
selectById
(
orderId
);
if
(
orderInfo
==
null
||
orderInfo
.
getStatus
().
equals
(
OrderStatusEnum
.
ORDER_DELETE
.
getType
()))
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
ORDER_NOT_EXIST
,
ResultCode
.
getMsg
(
ResultCode
.
ORDER_NOT_EXIST
));
}
orderInfo
.
setStatus
(
OrderStatusEnum
.
ORDER_DELETE
.
getType
());
updateSelectiveByIdRe
(
orderInfo
);
return
ObjectRestResponse
.
succ
();
}
}
}
\ No newline at end of file
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/biz/OrderItemBiz.java
View file @
101ae0c5
...
@@ -20,7 +20,7 @@ import java.util.List;
...
@@ -20,7 +20,7 @@ import java.util.List;
public
class
OrderItemBiz
extends
BaseBiz
<
OrderItemMapper
,
OrderItem
>
{
public
class
OrderItemBiz
extends
BaseBiz
<
OrderItemMapper
,
OrderItem
>
{
/**
/**
* 根据订单
号
查询所有订单商品
* 根据订单
ID
查询所有订单商品
* @param orderIdList
* @param orderIdList
* @return
* @return
*/
*/
...
@@ -30,4 +30,15 @@ public class OrderItemBiz extends BaseBiz<OrderItemMapper,OrderItem> {
...
@@ -30,4 +30,15 @@ public class OrderItemBiz extends BaseBiz<OrderItemMapper,OrderItem> {
return
mapper
.
selectByExample
(
example
);
return
mapper
.
selectByExample
(
example
);
}
}
/**
* 根据订单ID
* @param OrderId
* @return
*/
public
List
<
OrderItem
>
getByOrderId
(
Long
OrderId
)
{
Example
example
=
new
Example
(
OrderItem
.
class
);
example
.
createCriteria
().
andEqualTo
(
"orderId"
,
OrderId
);
return
mapper
.
selectByExample
(
example
);
}
}
}
\ No newline at end of file
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/controller/web/OrderInfoWebController.java
View file @
101ae0c5
...
@@ -5,13 +5,11 @@ import com.github.wxiaoqi.security.common.rest.BaseController;
...
@@ -5,13 +5,11 @@ import com.github.wxiaoqi.security.common.rest.BaseController;
import
com.upyuns.platform.rs.website.biz.OrderInfoBiz
;
import
com.upyuns.platform.rs.website.biz.OrderInfoBiz
;
import
com.upyuns.platform.rs.website.dto.ConfirmOrderDto
;
import
com.upyuns.platform.rs.website.dto.ConfirmOrderDto
;
import
com.upyuns.platform.rs.website.dto.OrderInfoDto
;
import
com.upyuns.platform.rs.website.dto.OrderInfoDto
;
import
com.upyuns.platform.rs.website.dto.UserOrderDto
;
import
com.upyuns.platform.rs.website.entity.OrderInfo
;
import
com.upyuns.platform.rs.website.entity.OrderInfo
;
import
com.upyuns.platform.rs.website.service.ConfirmOrderService
;
import
com.upyuns.platform.rs.website.service.ConfirmOrderService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
@RestController
@RequestMapping
(
"orderInfo/web"
)
@RequestMapping
(
"orderInfo/web"
)
...
@@ -29,4 +27,14 @@ public class OrderInfoWebController extends BaseController<OrderInfoBiz,OrderInf
...
@@ -29,4 +27,14 @@ public class OrderInfoWebController extends BaseController<OrderInfoBiz,OrderInf
public
ObjectRestResponse
submitOrder
(
@RequestBody
OrderInfoDto
orderInfoDto
)
{
public
ObjectRestResponse
submitOrder
(
@RequestBody
OrderInfoDto
orderInfoDto
)
{
return
baseBiz
.
submitOrder
(
orderInfoDto
);
return
baseBiz
.
submitOrder
(
orderInfoDto
);
}
}
@GetMapping
(
value
=
"getOrderList"
)
public
ObjectRestResponse
getUserOrder
(
UserOrderDto
userOrderDto
)
{
return
baseBiz
.
getUserOrder
(
userOrderDto
);
}
@GetMapping
(
value
=
"detail"
)
public
ObjectRestResponse
getDetail
(
Long
id
)
{
return
ObjectRestResponse
.
succ
(
baseBiz
.
getOrderDetail
(
id
));
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment