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
9c947f36
Commit
9c947f36
authored
Dec 17, 2020
by
xiaosl
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://113.105.137.151:22280/zhoujw/rs-cloud-platform
into dev
parents
17297993
6f84994c
Changes
31
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
1013 additions
and
673 deletions
+1013
-673
ResultCode.java
...thub/wxiaoqi/security/common/util/process/ResultCode.java
+3
-180
resultcod.properties
...common/src/main/resources/properties/resultcod.properties
+5
-183
AppUserManageDTO.java
...m/github/wxiaoqi/security/admin/dto/AppUserManageDTO.java
+5
-0
AppUserManageBiz.java
...m/github/wxiaoqi/security/admin/biz/AppUserManageBiz.java
+133
-109
AppUsersManageController.java
...wxiaoqi/security/admin/rest/AppUsersManageController.java
+5
-10
AppUserDetailMapper.xml
...e-admin/src/main/resources/mapper/AppUserDetailMapper.xml
+3
-0
RscpAreaImageTotal.java
...uns/platform/rs/datacenter/entity/RscpAreaImageTotal.java
+4
-3
RscpImageDataTotal.java
...uns/platform/rs/datacenter/entity/RscpImageDataTotal.java
+5
-1
DatacenterFeign.java
.../upyuns/platform/rs/datacenter/fegin/DatacenterFeign.java
+5
-2
ImageDataVO.java
...a/com/upyuns/platform/rs/datacenter/pojo/ImageDataVO.java
+12
-0
RscpImageDataTotalController.java
...form/rs/datacenter/rest/RscpImageDataTotalController.java
+32
-3
ConfirmReceivedDto.java
...om/upyuns/platform/rs/website/dto/ConfirmReceivedDto.java
+25
-0
ItemInfoDto.java
.../java/com/upyuns/platform/rs/website/dto/ItemInfoDto.java
+1
-1
OrderInfoDto.java
...java/com/upyuns/platform/rs/website/dto/OrderInfoDto.java
+5
-1
OrderInvoiceDto.java
...a/com/upyuns/platform/rs/website/dto/OrderInvoiceDto.java
+24
-0
CustomForm.java
...ava/com/upyuns/platform/rs/website/entity/CustomForm.java
+7
-0
OrderEInvoice.java
.../com/upyuns/platform/rs/website/entity/OrderEInvoice.java
+11
-1
OrderInfo.java
...java/com/upyuns/platform/rs/website/entity/OrderInfo.java
+173
-137
OrderItem.java
...java/com/upyuns/platform/rs/website/entity/OrderItem.java
+1
-1
ShoppingCartInfo.java
...m/upyuns/platform/rs/website/entity/ShoppingCartInfo.java
+1
-1
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
ItemInfoVo.java
...in/java/com/upyuns/platform/rs/website/vo/ItemInfoVo.java
+1
-1
OrderEInvoiceBiz.java
.../com/upyuns/platform/rs/website/biz/OrderEInvoiceBiz.java
+11
-0
OrderInfoBiz.java
...java/com/upyuns/platform/rs/website/biz/OrderInfoBiz.java
+282
-25
OrderItemBiz.java
...java/com/upyuns/platform/rs/website/biz/OrderItemBiz.java
+25
-0
ShoppingCartInfoBiz.java
...m/upyuns/platform/rs/website/biz/ShoppingCartInfoBiz.java
+2
-2
CustomFormWebController.java
...rm/rs/website/controller/web/CustomFormWebController.java
+19
-3
OrderInfoWebController.java
...orm/rs/website/controller/web/OrderInfoWebController.java
+12
-4
ConfirmOrderService.java
...yuns/platform/rs/website/service/ConfirmOrderService.java
+5
-5
No files found.
ace-common/src/main/java/com/github/wxiaoqi/security/common/util/process/ResultCode.java
View file @
9c947f36
...
@@ -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 @
9c947f36
...
@@ -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
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/dto/AppUserManageDTO.java
View file @
9c947f36
...
@@ -73,6 +73,11 @@ public class AppUserManageDTO {
...
@@ -73,6 +73,11 @@ public class AppUserManageDTO {
* 真实姓名
* 真实姓名
*/
*/
private
String
realName
;
private
String
realName
;
/**
* 状态:0-启用,1-禁用
*/
private
Integer
status
;
// /**
// /**
// * 接收前台时间范围
// * 接收前台时间范围
// */
// */
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppUserManageBiz.java
View file @
9c947f36
...
@@ -12,6 +12,7 @@ import com.github.wxiaoqi.security.admin.vo.AppUserVo;
...
@@ -12,6 +12,7 @@ import com.github.wxiaoqi.security.admin.vo.AppUserVo;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.beanutils.BeanUtilsBean
;
import
org.apache.commons.beanutils.BeanUtilsBean
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
...
@@ -37,113 +38,136 @@ import java.util.stream.Collectors;
...
@@ -37,113 +38,136 @@ import java.util.stream.Collectors;
@Slf4j
@Slf4j
public
class
AppUserManageBiz
extends
BaseBiz
<
AppUserDetailMapper
,
AppUserDetail
>
{
public
class
AppUserManageBiz
extends
BaseBiz
<
AppUserDetailMapper
,
AppUserDetail
>
{
@Autowired
@Autowired
private
AppUserLoginMapper
appUserLoginMapper
;
private
AppUserLoginMapper
appUserLoginMapper
;
@Autowired
@Autowired
private
AppUserDetailBiz
appUserDetailBiz
;
private
AppUserDetailBiz
appUserDetailBiz
;
/**
/**
* 根据条件查询
* 根据条件查询
*
*
* @param appUserManageDTO 查询条件
* @param appUserManageDTO 查询条件
* @return
* @return
*/
*/
public
PageInfo
<
AppUserManageVo
>
findAllByQuery
(
AppUserManageDTO
appUserManageDTO
)
{
public
PageInfo
<
AppUserManageVo
>
findAllByQuery
(
AppUserManageDTO
appUserManageDTO
)
{
if
(
Objects
.
nonNull
(
appUserManageDTO
.
getRegistrationTimeEnd
())){
if
(
Objects
.
nonNull
(
appUserManageDTO
.
getRegistrationTimeEnd
()))
{
long
registerEndTime
=
appUserManageDTO
.
getRegistrationTimeEnd
()+(
24
*
60
*
60
);
long
registerEndTime
=
appUserManageDTO
.
getRegistrationTimeEnd
()
+
(
24
*
60
*
60
);
appUserManageDTO
.
setRegistrationTimeEnd
(
registerEndTime
);
appUserManageDTO
.
setRegistrationTimeEnd
(
registerEndTime
);
}
}
PageHelper
.
startPage
(
appUserManageDTO
.
getPage
(),
appUserManageDTO
.
getLimit
());
PageHelper
.
startPage
(
appUserManageDTO
.
getPage
(),
appUserManageDTO
.
getLimit
());
List
<
AppUserManageVo
>
appUserManageVos
=
mapper
.
selectAppUser
(
appUserManageDTO
);
List
<
AppUserManageVo
>
appUserManageVos
=
mapper
.
selectAppUser
(
appUserManageDTO
);
PageInfo
<
AppUserManageVo
>
pageInfo
=
PageInfo
.
of
(
appUserManageVos
);
PageInfo
<
AppUserManageVo
>
pageInfo
=
PageInfo
.
of
(
appUserManageVos
);
if
(
pageInfo
.
getList
()==
null
||
pageInfo
.
getList
().
size
()==
0
)
{
if
(
pageInfo
.
getList
()
==
null
||
pageInfo
.
getList
().
size
()
==
0
)
{
return
pageInfo
;
return
new
PageInfo
<>();
}
}
throw
new
BaseException
(
"User error!"
);
return
pageInfo
;
}
}
/**
/**
* 禁用账户
* 禁用账户
* @param id
*
*/
* @param id
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
deleteAppUser
(
Integer
id
,
Integer
isDel
)
{
@Transactional
(
rollbackFor
=
Exception
.
class
)
AppUserLogin
appUserLogin
=
new
AppUserLogin
();
public
void
deleteAppUser
(
Integer
id
,
Integer
isDel
)
{
//修改为禁用并设置修改时间
AppUserLogin
appUserLogin
=
new
AppUserLogin
();
appUserLogin
.
setIsdel
(
isDel
);
//修改为禁用并设置修改时间
appUserLogin
.
setUpdatetime
(
System
.
currentTimeMillis
());
appUserLogin
.
setIsdel
(
isDel
);
Example
example
=
new
Example
(
AppUserLogin
.
class
);
appUserLogin
.
setUpdatetime
(
System
.
currentTimeMillis
());
Example
.
Criteria
criteria
=
example
.
createCriteria
();
Example
example
=
new
Example
(
AppUserLogin
.
class
);
criteria
.
andEqualTo
(
"id"
,
id
);
Example
.
Criteria
criteria
=
example
.
createCriteria
();
appUserLoginMapper
.
updateByExampleSelective
(
appUserLogin
,
example
);
criteria
.
andEqualTo
(
"id"
,
id
);
appUserLoginMapper
.
updateByExampleSelective
(
appUserLogin
,
example
);
//设置
AppUserDetail
appUserDetail
=
new
AppUserDetail
();
//设置
appUserDetail
.
setIsdel
(
isDel
);
AppUserDetail
appUserDetail
=
new
AppUserDetail
();
appUserDetail
.
setUpdatetime
(
System
.
currentTimeMillis
());
appUserDetail
.
setIsdel
(
isDel
);
Example
detailExample
=
new
Example
(
AppUserLogin
.
class
);
appUserDetail
.
setUpdatetime
(
System
.
currentTimeMillis
());
Example
.
Criteria
detailCriteria
=
detailExample
.
createCriteria
();
Example
detailExample
=
new
Example
(
AppUserLogin
.
class
);
criteria
.
andEqualTo
(
"id"
,
id
);
Example
.
Criteria
detailCriteria
=
detailExample
.
createCriteria
();
mapper
.
updateByExampleSelective
(
appUserDetail
,
detailCriteria
);
criteria
.
andEqualTo
(
"id"
,
id
);
}
mapper
.
updateByExampleSelective
(
appUserDetail
,
detailCriteria
);
}
/**
* 查询一条
/**
* @param id
* 查询一条
* @return
*
*/
* @param id
public
AppUserVo
findOneById
(
Integer
id
)
{
* @return
return
mapper
.
getUserInfo
(
id
);
*/
}
public
AppUserVo
findOneById
(
Integer
id
)
{
return
mapper
.
getUserInfo
(
id
);
/**
}
*保存
* @param appUserVo
*/
/**
@Transactional
(
rollbackFor
=
Exception
.
class
)
* 启用禁用
public
void
save
(
AppUserVo
appUserVo
)
{
*
AppUserLogin
appUserLogin
=
new
AppUserLogin
();
* @param appUserLogin
AppUserDetail
appUserDetail
=
new
AppUserDetail
();
* @return
*/
try
{
public
ObjectRestResponse
updateStatus
(
AppUserLogin
appUserLogin
)
{
BeanUtilsBean
.
getInstance
().
copyProperties
(
appUserLogin
,
appUserVo
);
if
(
appUserLogin
==
null
||
appUserLogin
.
getId
()
==
null
||
appUserLogin
.
getStatus
()
==
null
)
{
BeanUtilsBean
.
getInstance
().
copyProperties
(
appUserDetail
,
appUserVo
);
return
ObjectRestResponse
.
paramIsEmpty
();
}
if
(
appUserVo
.
getUserid
()
==
null
||
appUserVo
.
getUserid
()
==
0
)
{
AppUserLogin
old
=
appUserLoginMapper
.
selectByPrimaryKey
(
appUserLogin
.
getId
());
//设置登录用户信息
if
(
old
==
null
||
old
.
getIsdel
()
==
1
)
{
appUserLogin
.
setIsdel
(
0
);
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
NOTEXIST_CODE
,
ResultCode
.
getMsg
(
ResultCode
.
NOTEXIST_CODE
));
appUserLogin
.
setCreatetime
(
System
.
currentTimeMillis
());
}
appUserLogin
.
setCertificationStatus
(
0
);
old
.
setStatus
(
appUserLogin
.
getStatus
());
appUserLogin
.
setStatus
(
0
);
appUserLoginMapper
.
updateByPrimaryKeySelective
(
old
);
//设置用户详情
return
ObjectRestResponse
.
succ
();
appUserDetail
.
setIsdel
(
0
);
}
if
(
appUserDetail
.
getIsMember
()
==
null
)
{
appUserDetail
.
setIsMember
(
0
);
/**
}
* 保存
*
appUserLoginMapper
.
insertSelective
(
appUserLogin
);
* @param appUserVo
mapper
.
insertSelective
(
appUserDetail
);
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
}
else
{
public
void
save
(
AppUserVo
appUserVo
)
{
appUserLogin
.
setUpdatetime
(
System
.
currentTimeMillis
());
AppUserLogin
appUserLogin
=
new
AppUserLogin
();
appUserDetail
.
setUpdatetime
(
System
.
currentTimeMillis
());
AppUserDetail
appUserDetail
=
new
AppUserDetail
();
appUserLoginMapper
.
updateByPrimaryKeySelective
(
appUserLogin
);
mapper
.
updateByPrimaryKeySelective
(
appUserDetail
);
try
{
}
BeanUtilsBean
.
getInstance
().
copyProperties
(
appUserLogin
,
appUserVo
);
}
catch
(
Exception
e
)
{
BeanUtilsBean
.
getInstance
().
copyProperties
(
appUserDetail
,
appUserVo
);
log
.
error
(
e
.
getMessage
(),
e
);
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
if
(
appUserVo
.
getUserid
()
==
null
||
appUserVo
.
getUserid
()
==
0
)
{
}
//设置登录用户信息
}
appUserLogin
.
setIsdel
(
0
);
appUserLogin
.
setCreatetime
(
System
.
currentTimeMillis
());
public
AppUserManageVo
findUserInfoById
(
Integer
userId
)
{
appUserLogin
.
setCertificationStatus
(
0
);
AppUserManageVo
appUserManageVo
=
new
AppUserManageVo
();
appUserLogin
.
setStatus
(
0
);
List
<
AppUserManageVo
>
appUserManageVos
=
mapper
.
selectAppUserManage
(
userId
);
//设置用户详情
if
(
CollectionUtils
.
isEmpty
(
appUserManageVos
)){
appUserDetail
.
setIsdel
(
0
);
return
appUserManageVo
;
if
(
appUserDetail
.
getIsMember
()
==
null
)
{
}
appUserDetail
.
setIsMember
(
0
);
return
appUserManageVos
.
get
(
0
);
}
}
appUserLoginMapper
.
insertSelective
(
appUserLogin
);
mapper
.
insertSelective
(
appUserDetail
);
}
else
{
appUserLogin
.
setUpdatetime
(
System
.
currentTimeMillis
());
appUserDetail
.
setUpdatetime
(
System
.
currentTimeMillis
());
appUserLoginMapper
.
updateByPrimaryKeySelective
(
appUserLogin
);
mapper
.
updateByPrimaryKeySelective
(
appUserDetail
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
}
}
public
AppUserManageVo
findUserInfoById
(
Integer
userId
)
{
AppUserManageVo
appUserManageVo
=
new
AppUserManageVo
();
List
<
AppUserManageVo
>
appUserManageVos
=
mapper
.
selectAppUserManage
(
userId
);
if
(
CollectionUtils
.
isEmpty
(
appUserManageVos
))
{
return
appUserManageVo
;
}
return
appUserManageVos
.
get
(
0
);
}
}
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/AppUsersManageController.java
View file @
9c947f36
...
@@ -49,8 +49,6 @@ public class AppUsersManageController extends BaseController<AppUserManageBiz,Ap
...
@@ -49,8 +49,6 @@ public class AppUsersManageController extends BaseController<AppUserManageBiz,Ap
@Autowired
@Autowired
protected
UserAuthConfig
userAuthConfig
;
protected
UserAuthConfig
userAuthConfig
;
@Autowired
private
PublicController
publicController
;
@Autowired
@Autowired
private
UserAuthUtil
userAuthUtil
;
private
UserAuthUtil
userAuthUtil
;
...
@@ -63,15 +61,12 @@ public class AppUsersManageController extends BaseController<AppUserManageBiz,Ap
...
@@ -63,15 +61,12 @@ public class AppUsersManageController extends BaseController<AppUserManageBiz,Ap
*/
*/
@PostMapping
(
"/findAll"
)
@PostMapping
(
"/findAll"
)
public
ObjectRestResponse
<
PageInfo
<
AppUserManageVo
>>
findAllByQuery
(
@RequestBody
AppUserManageDTO
appUserManageDTO
)
throws
Exception
{
public
ObjectRestResponse
<
PageInfo
<
AppUserManageVo
>>
findAllByQuery
(
@RequestBody
AppUserManageDTO
appUserManageDTO
)
throws
Exception
{
String
token
=
userAuthConfig
.
getToken
(
request
);
ObjectRestResponse
objectRestResponse
=
publicController
.
userinfoByToken
(
token
);
User
user
=
(
User
)
objectRestResponse
.
getData
();
if
(
user
==
null
){
throw
new
BaseException
(
"User error!"
);
}
// if (ALL_PERMISSIONS.equals(user.getDataAll())) {
return
ObjectRestResponse
.
succ
(
baseBiz
.
findAllByQuery
(
appUserManageDTO
));
return
ObjectRestResponse
.
succ
(
baseBiz
.
findAllByQuery
(
appUserManageDTO
));
// }
}
@PostMapping
(
value
=
"updateStatus"
)
public
ObjectRestResponse
updateStatus
(
@RequestBody
AppUserLogin
appUserLogin
)
{
return
baseBiz
.
updateStatus
(
appUserLogin
);
}
}
/**
/**
...
...
ace-modules/ace-admin/src/main/resources/mapper/AppUserDetailMapper.xml
View file @
9c947f36
...
@@ -217,6 +217,9 @@
...
@@ -217,6 +217,9 @@
<if
test=
"userId!=null"
>
<if
test=
"userId!=null"
>
and l.id=#{userId}
and l.id=#{userId}
</if>
</if>
<if
test=
"status != null"
>
and l.status = #{status}
</if>
<if
test=
"postionState != null"
>
<if
test=
"postionState != null"
>
<choose>
<choose>
<when
test=
"postionState == 6"
>
<when
test=
"postionState == 6"
>
...
...
rs-datacenter/rs-datacenter-api/src/main/java/com/upyuns/platform/rs/datacenter/entity/RscpAreaImageTotal.java
View file @
9c947f36
...
@@ -77,8 +77,9 @@ public class RscpAreaImageTotal implements java.io.Serializable {
...
@@ -77,8 +77,9 @@ public class RscpAreaImageTotal implements java.io.Serializable {
private
String
imageArea
;
private
String
imageArea
;
/** dataId */
/** dataId */
/** imageYear */
@ApiModelProperty
(
value
=
""
)
@ApiModelProperty
(
value
=
""
)
private
Stri
ng
dataId
;
private
Lo
ng
dataId
;
/** imageCloudage */
/** imageCloudage */
@ApiModelProperty
(
value
=
""
)
@ApiModelProperty
(
value
=
""
)
...
@@ -383,7 +384,7 @@ public class RscpAreaImageTotal implements java.io.Serializable {
...
@@ -383,7 +384,7 @@ public class RscpAreaImageTotal implements java.io.Serializable {
*
*
* @return dataId
* @return dataId
*/
*/
public
Stri
ng
getDataId
()
{
public
Lo
ng
getDataId
()
{
return
this
.
dataId
;
return
this
.
dataId
;
}
}
...
@@ -392,7 +393,7 @@ public class RscpAreaImageTotal implements java.io.Serializable {
...
@@ -392,7 +393,7 @@ public class RscpAreaImageTotal implements java.io.Serializable {
*
*
* @param dataId
* @param dataId
*/
*/
public
void
setDataId
(
Stri
ng
dataId
)
{
public
void
setDataId
(
Lo
ng
dataId
)
{
this
.
dataId
=
dataId
;
this
.
dataId
=
dataId
;
}
}
...
...
rs-datacenter/rs-datacenter-api/src/main/java/com/upyuns/platform/rs/datacenter/entity/RscpImageDataTotal.java
View file @
9c947f36
...
@@ -19,7 +19,7 @@ public class RscpImageDataTotal implements java.io.Serializable {
...
@@ -19,7 +19,7 @@ public class RscpImageDataTotal implements java.io.Serializable {
/** 标识id */
/** 标识id */
@ApiModelProperty
(
value
=
"标识id"
)
@ApiModelProperty
(
value
=
"标识id"
)
private
Stri
ng
id
;
private
Lo
ng
id
;
/** 编号 */
/** 编号 */
@ApiModelProperty
(
value
=
"编号"
)
@ApiModelProperty
(
value
=
"编号"
)
...
@@ -277,4 +277,8 @@ public class RscpImageDataTotal implements java.io.Serializable {
...
@@ -277,4 +277,8 @@ public class RscpImageDataTotal implements java.io.Serializable {
@ApiModelProperty
(
value
=
""
)
@ApiModelProperty
(
value
=
""
)
private
Integer
imageYear
;
private
Integer
imageYear
;
/** imageYear */
@ApiModelProperty
(
value
=
""
)
private
Long
dataId
;
}
}
\ No newline at end of file
rs-datacenter/rs-datacenter-api/src/main/java/com/upyuns/platform/rs/datacenter/fegin/DatacenterFeign.java
View file @
9c947f36
...
@@ -3,10 +3,13 @@ package com.upyuns.platform.rs.datacenter.fegin;
...
@@ -3,10 +3,13 @@ package com.upyuns.platform.rs.datacenter.fegin;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.upyuns.platform.rs.datacenter.entity.RscpAreaInfo
;
import
com.upyuns.platform.rs.datacenter.entity.RscpAreaInfo
;
import
com.upyuns.platform.rs.datacenter.entity.RscpImageDataTotal
;
import
com.upyuns.platform.rs.datacenter.entity.RscpImageDataTotal
;
import
com.upyuns.platform.rs.datacenter.pojo.ImageDataVO
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
java.util.List
;
/**
/**
* ${DESCRIPTION}
* ${DESCRIPTION}
...
@@ -20,6 +23,6 @@ public interface DatacenterFeign {
...
@@ -20,6 +23,6 @@ public interface DatacenterFeign {
@RequestMapping
(
value
=
"/web/areaInfo/app/unauth/Fegin/queryByCodeFegin"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/web/areaInfo/app/unauth/Fegin/queryByCodeFegin"
,
method
=
RequestMethod
.
GET
)
public
ObjectRestResponse
<
RscpAreaInfo
>
queryByCode
(
String
areaCode
);
public
ObjectRestResponse
<
RscpAreaInfo
>
queryByCode
(
String
areaCode
);
@RequestMapping
(
value
=
"/web/imageData/app/unauth/Fegin/queryById"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/web/imageData/app/unauth/Fegin/queryById
s
"
,
method
=
RequestMethod
.
GET
)
public
ObjectRestResponse
<
RscpImageDataTotal
>
queryById
(
String
id
);
public
ObjectRestResponse
<
List
<
ImageDataVO
>>
queryByIds
(
String
ids
);
}
}
rs-datacenter/rs-datacenter-api/src/main/java/com/upyuns/platform/rs/datacenter/pojo/ImageDataVO.java
0 → 100644
View file @
9c947f36
package
com
.
upyuns
.
platform
.
rs
.
datacenter
.
pojo
;
import
com.upyuns.platform.rs.datacenter.entity.RscpAreaImageTotal
;
import
com.upyuns.platform.rs.datacenter.entity.RscpImageDataTotal
;
import
lombok.Data
;
import
java.math.BigDecimal
;
@Data
public
class
ImageDataVO
extends
RscpAreaImageTotal
{
BigDecimal
price
=
BigDecimal
.
ZERO
;
}
rs-datacenter/rs-datacenter-server/src/main/java/com/upyuns/platform/rs/datacenter/rest/RscpImageDataTotalController.java
View file @
9c947f36
package
com
.
upyuns
.
platform
.
rs
.
datacenter
.
rest
;
package
com
.
upyuns
.
platform
.
rs
.
datacenter
.
rest
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
...
@@ -14,7 +15,11 @@ import com.github.wxiaoqi.security.common.util.result.JsonResultUtil;
...
@@ -14,7 +15,11 @@ import com.github.wxiaoqi.security.common.util.result.JsonResultUtil;
import
com.github.wxiaoqi.security.common.vo.PageParam
;
import
com.github.wxiaoqi.security.common.vo.PageParam
;
import
com.upyuns.platform.rs.datacenter.biz.RscpAreaImageTotalBiz
;
import
com.upyuns.platform.rs.datacenter.biz.RscpAreaImageTotalBiz
;
import
com.upyuns.platform.rs.datacenter.biz.RscpImageDataTotalBiz
;
import
com.upyuns.platform.rs.datacenter.biz.RscpImageDataTotalBiz
;
import
com.upyuns.platform.rs.datacenter.biz.RscpImagePriceBiz
;
import
com.upyuns.platform.rs.datacenter.entity.RscpAreaImageTotal
;
import
com.upyuns.platform.rs.datacenter.entity.RscpImageDataTotal
;
import
com.upyuns.platform.rs.datacenter.entity.RscpImageDataTotal
;
import
com.upyuns.platform.rs.datacenter.entity.RscpImagePrice
;
import
com.upyuns.platform.rs.datacenter.pojo.ImageDataVO
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.Data
;
import
lombok.Data
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -27,6 +32,8 @@ import java.math.BigDecimal;
...
@@ -27,6 +32,8 @@ import java.math.BigDecimal;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.List
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
constant
.
CommonConstants
.
SYS_TRUE
;
@RestController
@RestController
@RequestMapping
(
"/web/imageData"
)
@RequestMapping
(
"/web/imageData"
)
public
class
RscpImageDataTotalController
extends
BaseController
<
RscpImageDataTotalBiz
,
RscpImageDataTotal
>
{
public
class
RscpImageDataTotalController
extends
BaseController
<
RscpImageDataTotalBiz
,
RscpImageDataTotal
>
{
...
@@ -34,6 +41,9 @@ public class RscpImageDataTotalController extends BaseController<RscpImageDataTo
...
@@ -34,6 +41,9 @@ public class RscpImageDataTotalController extends BaseController<RscpImageDataTo
@Autowired
@Autowired
RscpAreaImageTotalBiz
rscpAreaImageTotalBiz
;
RscpAreaImageTotalBiz
rscpAreaImageTotalBiz
;
@Autowired
RscpImagePriceBiz
rscpImagePriceBiz
;
@RequestMapping
(
value
=
"/app/unauth/query"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/app/unauth/query"
,
method
=
RequestMethod
.
GET
)
@IgnoreUserToken
@IgnoreUserToken
public
ObjectRestResponse
unauthQuery
(
PageParam
pageParam
)
{
public
ObjectRestResponse
unauthQuery
(
PageParam
pageParam
)
{
...
@@ -78,9 +88,28 @@ public class RscpImageDataTotalController extends BaseController<RscpImageDataTo
...
@@ -78,9 +88,28 @@ public class RscpImageDataTotalController extends BaseController<RscpImageDataTo
}
}
}
}
@RequestMapping
(
value
=
"/web/imageData/app/unauth/Fegin/queryByIds"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/app/unauth/Fegin/queryByIds"
,
method
=
RequestMethod
.
GET
)
public
ObjectRestResponse
<
List
<
RscpImageDataTotal
>>
queryById
(
String
ids
){
@IgnoreUserToken
return
ObjectRestResponse
.
succ
(
baseBiz
.
selectByAttrs
(
RscpImageDataTotal:
:
getId
,
CollUtil
.
toList
(
ids
.
split
(
","
))));
public
ObjectRestResponse
<
List
<
RscpImageDataTotal
>>
queryByIds
(
String
ids
){
List
<
RscpImagePrice
>
list
=
rscpImagePriceBiz
.
selectByWeekend
(
w
->
{
w
.
andEqualTo
(
RscpImagePrice:
:
getStatus
,
SYS_TRUE
);
return
w
;
},
" daily_sort asc"
);
List
<
RscpImageDataTotal
>
list2
=
baseBiz
.
selectByAttrs
(
RscpImageDataTotal:
:
getId
,
CollUtil
.
toList
(
ids
.
split
(
","
)));
List
<
ImageDataVO
>
list3
=
CollUtil
.
newArrayList
();
list2
.
forEach
(
t
->
{
ImageDataVO
vo
=
BeanUtil
.
toBean
(
t
,
ImageDataVO
.
class
);
vo
.
setBeginTime
(
t
.
getImageTakeTime
());
list
.
forEach
(
p
->
{
if
(
t
.
getImageSatelliteType
().
equals
(
p
.
getImageSatelliteType
())
&&
t
.
getImageSensorType
().
equals
(
p
.
getImageSensorType
()))
{
vo
.
setPrice
(
p
.
getUnitPrice
());
}
});
list3
.
add
(
vo
);
});
return
ObjectRestResponse
.
succ
(
list3
);
}
}
...
...
rs-website/rs-website-api/src/main/java/com/upyuns/platform/rs/website/dto/ConfirmReceivedDto.java
0 → 100644
View file @
9c947f36
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/ItemInfoDto.java
View file @
9c947f36
...
@@ -11,7 +11,7 @@ import lombok.Data;
...
@@ -11,7 +11,7 @@ import lombok.Data;
@Data
@Data
public
class
ItemInfoDto
{
public
class
ItemInfoDto
{
Integer
id
;
Long
id
;
Integer
number
;
Integer
number
;
...
...
rs-website/rs-website-api/src/main/java/com/upyuns/platform/rs/website/dto/OrderInfoDto.java
View file @
9c947f36
...
@@ -42,9 +42,13 @@ public class OrderInfoDto extends PageParam {
...
@@ -42,9 +42,13 @@ public class OrderInfoDto extends PageParam {
*/
*/
private
List
<
ItemInfoDto
>
itemInfoDtoList
;
private
List
<
ItemInfoDto
>
itemInfoDtoList
;
/**
* 发票内容
*/
private
String
invoiceContent
;
//详情ID
//详情ID
Integer
detailId
;
Long
detailId
;
//1、标准数据,2、影像图库,3、行业应用信息
//1、标准数据,2、影像图库,3、行业应用信息
Integer
type
;
Integer
type
;
...
...
rs-website/rs-website-api/src/main/java/com/upyuns/platform/rs/website/dto/OrderInvoiceDto.java
0 → 100644
View file @
9c947f36
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/CustomForm.java
View file @
9c947f36
...
@@ -188,4 +188,11 @@ public class CustomForm implements Serializable {
...
@@ -188,4 +188,11 @@ public class CustomForm implements Serializable {
@ApiModelProperty
(
value
=
"区名称"
)
@ApiModelProperty
(
value
=
"区名称"
)
private
String
areaName
;
private
String
areaName
;
/**
* 几何json
*/
@Column
(
name
=
"geojson"
)
@ApiModelProperty
(
value
=
"几何json"
)
private
String
geojson
;
}
}
rs-website/rs-website-api/src/main/java/com/upyuns/platform/rs/website/entity/OrderEInvoice.java
View file @
9c947f36
...
@@ -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 @
9c947f36
...
@@ -3,14 +3,16 @@ package com.upyuns.platform.rs.website.entity;
...
@@ -3,14 +3,16 @@ 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
;
import
lombok.Data
;
import
lombok.Data
;
/**
/**
* 订单信息
* 订单信息
*
*
* @author jiaoruizhen
* @author jiaoruizhen
* @email jiaoruizhen@126.com
* @email jiaoruizhen@126.com
* @date 2020-12-03 13:29:23
* @date 2020-12-03 13:29:23
...
@@ -19,166 +21,200 @@ import lombok.Data;
...
@@ -19,166 +21,200 @@ import lombok.Data;
@Table
(
name
=
"order_info"
)
@Table
(
name
=
"order_info"
)
public
class
OrderInfo
implements
Serializable
{
public
class
OrderInfo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
/**
/**
*
*
*/
*/
@Id
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@ApiModelProperty
(
""
)
@ApiModelProperty
(
""
)
private
Long
orderId
;
private
Long
orderId
;
/**
/**
*
订单号
*
订单号
*/
*/
@Column
(
name
=
"order_no"
)
@Column
(
name
=
"order_no"
)
@ApiModelProperty
(
value
=
"订单号"
)
@ApiModelProperty
(
value
=
"订单号"
)
private
String
orderNo
;
private
String
orderNo
;
/**
/**
*
单价
*
单价
*/
*/
@Column
(
name
=
"amount"
)
@Column
(
name
=
"amount"
)
@ApiModelProperty
(
value
=
"单价"
)
@ApiModelProperty
(
value
=
"单价"
)
private
BigDecimal
amount
;
private
BigDecimal
amount
;
/**
/**
*
数量
*
数量
*/
*/
@Column
(
name
=
"number"
)
@Column
(
name
=
"number"
)
@ApiModelProperty
(
value
=
"数量"
)
@ApiModelProperty
(
value
=
"数量"
)
private
Integer
number
;
private
Integer
number
;
/**
/**
* 订单状态:1--创建订单,2--待付款,3--已支付,4--已发货,5--已完成 -1、删除,-2、取消
* 订单状态:0、定制订单无价格 1--创建订单,2--待付款,3--已支付,4--已发货, 5--已收货, 6、已完成 -1、删除,-2、取消, -3 退款
*/
*/
@Column
(
name
=
"status"
)
@Column
(
name
=
"status"
)
@ApiModelProperty
(
value
=
" 订单状态:
1--创建订单,2--待付款,3--已支付,4--已发货,5--已完成 -1、删除,-2、取消
"
)
@ApiModelProperty
(
value
=
" 订单状态:
0、定制订单无价格 1--创建订单,2--待付款,3--已支付,4--已发货, 5--已收货, 6、已完成 -1、删除,-2、取消, -3 退款
"
)
private
Integer
status
;
private
Integer
status
;
/**
/**
* 支付状态:1--未支付,2--已支付
* 发货状态0待发货,1已发货,2收货,3退货,
*/
private
Integer
shippingStatus
;
/**
* 1待付款,2已付款,3已退款
*/
*/
private
Integer
payStatus
;
private
Integer
payStatus
;
/**
/**
*
用户id
*
用户id
*/
*/
@Column
(
name
=
"user_id"
)
@Column
(
name
=
"user_id"
)
@ApiModelProperty
(
value
=
"用户id"
)
@ApiModelProperty
(
value
=
"用户id"
)
private
Integer
userId
;
private
Integer
userId
;
/**
/**
*
用户手机号
*
用户手机号
*/
*/
@Column
(
name
=
"phone"
)
@Column
(
name
=
"phone"
)
@ApiModelProperty
(
value
=
"用户手机号"
)
@ApiModelProperty
(
value
=
"用户手机号"
)
private
String
phone
;
private
String
phone
;
/**
/**
*
用户昵称
*
用户昵称
*/
*/
@Column
(
name
=
"nickname"
)
@Column
(
name
=
"nickname"
)
@ApiModelProperty
(
value
=
"用户昵称"
)
@ApiModelProperty
(
value
=
"用户昵称"
)
private
String
nickname
;
private
String
nickname
;
/**
/**
*
用户真实姓名
*
用户真实姓名
*/
*/
@Column
(
name
=
"real_name"
)
@Column
(
name
=
"real_name"
)
@ApiModelProperty
(
value
=
"用户真实姓名"
)
@ApiModelProperty
(
value
=
"用户真实姓名"
)
private
String
realName
;
private
String
realName
;
/**
/**
*
头像
*
头像
*/
*/
@Column
(
name
=
"head_img"
)
@Column
(
name
=
"head_img"
)
@ApiModelProperty
(
value
=
"头像"
)
@ApiModelProperty
(
value
=
"头像"
)
private
String
headImg
;
private
String
headImg
;
/**
/**
*
1、微信支付,2、支付宝支付,3、对公支付
*
1、微信支付,2、支付宝支付,3、对公支付
*/
*/
@Column
(
name
=
"pay_type"
)
@Column
(
name
=
"pay_type"
)
@ApiModelProperty
(
value
=
"1、微信支付,2、支付宝支付,3、对公支付"
)
@ApiModelProperty
(
value
=
"1、微信支付,2、支付宝支付,3、对公支付"
)
private
Integer
payType
;
private
Integer
payType
;
/**
/**
*
下单时间
*
下单时间
*/
*/
@Column
(
name
=
"crt_time"
)
@Column
(
name
=
"crt_time"
)
@ApiModelProperty
(
value
=
"下单时间"
,
hidden
=
true
)
@ApiModelProperty
(
value
=
"下单时间"
,
hidden
=
true
)
private
Date
crtTime
;
private
Date
crtTime
;
/**
/**
*
支付时间
*
支付时间
*/
*/
@Column
(
name
=
"pay_time"
)
@Column
(
name
=
"pay_time"
)
@ApiModelProperty
(
value
=
"支付时间"
)
@ApiModelProperty
(
value
=
"支付时间"
)
private
Date
payTime
;
private
Date
payTime
;
/**
/**
*
*
*/
*/
@Column
(
name
=
"upd_time"
)
@Column
(
name
=
"upd_time"
)
@ApiModelProperty
(
value
=
""
,
hidden
=
true
)
@ApiModelProperty
(
value
=
""
,
hidden
=
true
)
private
Date
updTime
;
private
Date
updTime
;
/**
/**
*
运费
*
运费
*/
*/
@Column
(
name
=
"fee"
)
@Column
(
name
=
"fee"
)
@ApiModelProperty
(
value
=
"运费"
)
@ApiModelProperty
(
value
=
"运费"
)
private
BigDecimal
fee
;
private
BigDecimal
fee
;
/**
/**
*
订单备注
*
订单备注
*/
*/
@Column
(
name
=
"remark"
)
@Column
(
name
=
"remark"
)
@ApiModelProperty
(
value
=
"订单备注"
)
@ApiModelProperty
(
value
=
"订单备注"
)
private
String
remark
;
private
String
remark
;
/**
/**
*
配送方式:1、线上配送,2、快递配送
*
配送方式:1、线上配送,2、快递配送
*/
*/
@Column
(
name
=
"send_type"
)
@Column
(
name
=
"send_type"
)
@ApiModelProperty
(
value
=
"配送方式:1、线上配送,2、快递配送"
)
@ApiModelProperty
(
value
=
"配送方式:1、线上配送,2、快递配送"
)
private
Integer
sendType
;
private
Integer
sendType
;
/**
/**
*
收货人姓名
*
收货人姓名
*/
*/
@Column
(
name
=
"receive_name"
)
@Column
(
name
=
"receive_name"
)
@ApiModelProperty
(
value
=
"收货人姓名"
)
@ApiModelProperty
(
value
=
"收货人姓名"
)
private
String
receiveName
;
private
String
receiveName
;
/**
/**
*
收货人电话
*
收货人电话
*/
*/
@Column
(
name
=
"receive_phone"
)
@Column
(
name
=
"receive_phone"
)
@ApiModelProperty
(
value
=
"收货人电话"
)
@ApiModelProperty
(
value
=
"收货人电话"
)
private
String
receivePhone
;
private
String
receivePhone
;
/**
/**
*
收货地址
*
收货地址
*/
*/
@Column
(
name
=
"receive_address"
)
@Column
(
name
=
"receive_address"
)
@ApiModelProperty
(
value
=
"收货地址"
)
@ApiModelProperty
(
value
=
"收货地址"
)
private
String
receiveAddress
;
private
String
receiveAddress
;
/**
/**
*
* 总金额
*/
*/
@Column
(
name
=
"total_amount"
)
@Column
(
name
=
"total_amount"
)
@ApiModelProperty
(
value
=
""
)
@ApiModelProperty
(
value
=
""
)
private
BigDecimal
totalAmount
;
private
BigDecimal
totalAmount
;
/**
/**
*
* 1、普通订单,2、定制订单
*/
*/
@Column
(
name
=
"type"
)
@Column
(
name
=
"type"
)
@ApiModelProperty
(
value
=
"1、普通订单,2、定制订单"
)
@ApiModelProperty
(
value
=
"1、普通订单,2、定制订单"
)
private
Integer
type
;
private
Integer
type
;
/**
* 发票状态: 1、未开发票,2、已开发票, 3、已发货, 4、已收货、5、退回, 6、已完成
*/
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/entity/OrderItem.java
View file @
9c947f36
...
@@ -47,7 +47,7 @@ public class OrderItem implements Serializable {
...
@@ -47,7 +47,7 @@ public class OrderItem implements Serializable {
*/
*/
@Column
(
name
=
"detail_id"
)
@Column
(
name
=
"detail_id"
)
@ApiModelProperty
(
value
=
"详情id"
)
@ApiModelProperty
(
value
=
"详情id"
)
private
Integer
detailId
;
private
Long
detailId
;
/**
/**
* 详情json信息
* 详情json信息
...
...
rs-website/rs-website-api/src/main/java/com/upyuns/platform/rs/website/entity/ShoppingCartInfo.java
View file @
9c947f36
...
@@ -40,7 +40,7 @@ public class ShoppingCartInfo implements Serializable {
...
@@ -40,7 +40,7 @@ public class ShoppingCartInfo implements Serializable {
*/
*/
@Column
(
name
=
"detail_id"
)
@Column
(
name
=
"detail_id"
)
@ApiModelProperty
(
value
=
"详情id"
)
@ApiModelProperty
(
value
=
"详情id"
)
private
Integer
detailId
;
private
Long
detailId
;
/**
/**
* 详情json信息
* 详情json信息
...
...
rs-website/rs-website-api/src/main/java/com/upyuns/platform/rs/website/type/OrderInvoiceStatusEnum.java
0 → 100644
View file @
9c947f36
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 @
9c947f36
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 @
9c947f36
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-api/src/main/java/com/upyuns/platform/rs/website/vo/ItemInfoVo.java
View file @
9c947f36
...
@@ -12,7 +12,7 @@ import java.math.BigDecimal;
...
@@ -12,7 +12,7 @@ import java.math.BigDecimal;
*/
*/
@Data
@Data
public
class
ItemInfoVo
{
public
class
ItemInfoVo
{
private
Integer
id
;
private
Long
id
;
private
String
detailJson
;
private
String
detailJson
;
private
Integer
number
;
private
Integer
number
;
private
BigDecimal
price
;
private
BigDecimal
price
;
...
...
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/biz/OrderEInvoiceBiz.java
View file @
9c947f36
...
@@ -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 @
9c947f36
...
@@ -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
);
}
}
}
return
new
ArrayList
<>();
List
<
OrderItem
>
orderItemList
=
orderItemBiz
.
getByOrderId
(
orderInfo
.
getOrderId
());
if
(
orderItemList
!=
null
&&
orderItemList
.
size
()
>
0
)
{
orderInfo
.
setOrderItemList
(
orderItemList
);
}
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
()));
});
}
}
}
/**
/**
* 提交订单
* 提交订单
...
@@ -182,7 +257,7 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
...
@@ -182,7 +257,7 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
break
;
break
;
//行业应用
//行业应用
case
INDUSTRY_INFO:
case
INDUSTRY_INFO:
IndustryApplicationInfo
industryApplicationInfo
=
industryApplicationInfoBiz
.
getOneById
(
itemInfoDto
.
getId
()).
getData
();
IndustryApplicationInfo
industryApplicationInfo
=
industryApplicationInfoBiz
.
getOneById
(
itemInfoDto
.
getId
()
.
intValue
()
).
getData
();
if
(
industryApplicationInfo
!=
null
)
{
if
(
industryApplicationInfo
!=
null
)
{
OrderItem
orderItem
=
new
OrderItem
();
OrderItem
orderItem
=
new
OrderItem
();
orderItem
.
setType
(
itemInfoDto
.
getType
());
orderItem
.
setType
(
itemInfoDto
.
getType
());
...
@@ -192,7 +267,7 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
...
@@ -192,7 +267,7 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
orderItem
.
setName
(
industryApplicationInfo
.
getTitle
());
orderItem
.
setName
(
industryApplicationInfo
.
getTitle
());
orderItem
.
setItemPic
(
industryApplicationInfo
.
getCoverImg
());
orderItem
.
setItemPic
(
industryApplicationInfo
.
getCoverImg
());
orderItem
.
setDetailJson
(
JSONObject
.
toJSONString
(
industryApplicationInfo
));
orderItem
.
setDetailJson
(
JSONObject
.
toJSONString
(
industryApplicationInfo
));
orderItem
.
setDetailId
(
industryApplicationInfo
.
getId
(
));
orderItem
.
setDetailId
(
Long
.
valueOf
(
industryApplicationInfo
.
getId
()
));
orderItemList
.
add
(
orderItem
);
orderItemList
.
add
(
orderItem
);
//总数量
//总数量
number
.
updateAndGet
(
v
->
v
+
itemInfoDto
.
getNumber
());
number
.
updateAndGet
(
v
->
v
+
itemInfoDto
.
getNumber
());
...
@@ -204,7 +279,7 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
...
@@ -204,7 +279,7 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
case
IMAGE_STORAGE:
case
IMAGE_STORAGE:
ImageInfoRelation
imageInfoRelation
=
imageInfoRelationBiz
.
selectById
(
itemInfoDto
.
getId
());
ImageInfoRelation
imageInfoRelation
=
imageInfoRelationBiz
.
selectById
(
itemInfoDto
.
getId
());
if
(
imageInfoRelation
!=
null
)
{
if
(
imageInfoRelation
!=
null
)
{
ImageImgStorage
imageImgStorage
=
imageImgStorageBiz
.
getDetail
(
itemInfoDto
.
getId
()).
getData
();
ImageImgStorage
imageImgStorage
=
imageImgStorageBiz
.
getDetail
(
itemInfoDto
.
getId
()
.
intValue
()
).
getData
();
if
(
imageImgStorage
!=
null
)
{
if
(
imageImgStorage
!=
null
)
{
List
<
ImageInfoRelation
>
imageInfoRelationList
=
new
ArrayList
<>();
List
<
ImageInfoRelation
>
imageInfoRelationList
=
new
ArrayList
<>();
imageInfoRelationList
.
add
(
imageInfoRelation
);
imageInfoRelationList
.
add
(
imageInfoRelation
);
...
@@ -217,7 +292,7 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
...
@@ -217,7 +292,7 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
orderItem
.
setName
(
imageImgStorage
.
getName
());
orderItem
.
setName
(
imageImgStorage
.
getName
());
orderItem
.
setItemPic
(
imageImgStorage
.
getCoverImg
());
orderItem
.
setItemPic
(
imageImgStorage
.
getCoverImg
());
orderItem
.
setDetailJson
(
JSONObject
.
toJSONString
(
imageImgStorage
));
orderItem
.
setDetailJson
(
JSONObject
.
toJSONString
(
imageImgStorage
));
orderItem
.
setDetailId
(
imageImgStorage
.
getId
(
));
orderItem
.
setDetailId
(
Long
.
valueOf
(
imageImgStorage
.
getId
()
));
orderItemList
.
add
(
orderItem
);
orderItemList
.
add
(
orderItem
);
//总数量
//总数量
number
.
updateAndGet
(
v
->
v
+
itemInfoDto
.
getNumber
());
number
.
updateAndGet
(
v
->
v
+
itemInfoDto
.
getNumber
());
...
@@ -269,6 +344,7 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
...
@@ -269,6 +344,7 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
}
}
orderInfo
.
setRemark
(
orderInfoDto
.
getRemark
());
orderInfo
.
setRemark
(
orderInfoDto
.
getRemark
());
orderInfo
.
setAmount
(
new
BigDecimal
(
amount
.
get
()));
orderInfo
.
setAmount
(
new
BigDecimal
(
amount
.
get
()));
orderInfo
.
setNumber
(
number
.
get
());
Dictionary
dictionary
=
thirdFeign
.
findDictionaryByTypeAndCode
(
DictionaryKey
.
APP_ORDER
,
DictionaryKey
.
SEND_FEE
);
Dictionary
dictionary
=
thirdFeign
.
findDictionaryByTypeAndCode
(
DictionaryKey
.
APP_ORDER
,
DictionaryKey
.
SEND_FEE
);
if
(
dictionary
!=
null
&&
StringUtils
.
isNotBlank
(
dictionary
.
getDetail
()))
{
if
(
dictionary
!=
null
&&
StringUtils
.
isNotBlank
(
dictionary
.
getDetail
()))
{
orderInfo
.
setFee
(
new
BigDecimal
(
dictionary
.
getDetail
()));
orderInfo
.
setFee
(
new
BigDecimal
(
dictionary
.
getDetail
()));
...
@@ -276,19 +352,6 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
...
@@ -276,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
)
{
...
@@ -305,12 +368,206 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
...
@@ -305,12 +368,206 @@ public class OrderInfoBiz extends BaseBiz<OrderInfoMapper, OrderInfo> {
orderEInvoice
.
setContentAccount
(
userInvoice
.
getOpenBank
()
+
" "
+
userInvoice
.
getAccount
());
orderEInvoice
.
setContentAccount
(
userInvoice
.
getOpenBank
()
+
" "
+
userInvoice
.
getAccount
());
orderEInvoice
.
setContentContact
(
orderInfo
.
getReceiveAddress
()
+
" "
+
orderInfo
.
getReceiveName
()
+
" "
+
orderInfo
.
getReceivePhone
());
orderEInvoice
.
setContentContact
(
orderInfo
.
getReceiveAddress
()
+
" "
+
orderInfo
.
getReceiveName
()
+
" "
+
orderInfo
.
getReceivePhone
());
//发票内容
//发票内容
orderEInvoice
.
setContentTitle
(
""
);
if
(
StringUtils
.
isNotBlank
(
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
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
();
}
/**
* 订单发票确认收货
* @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 @
9c947f36
...
@@ -5,6 +5,9 @@ import org.springframework.stereotype.Service;
...
@@ -5,6 +5,9 @@ import org.springframework.stereotype.Service;
import
com.upyuns.platform.rs.website.entity.OrderItem
;
import
com.upyuns.platform.rs.website.entity.OrderItem
;
import
com.upyuns.platform.rs.website.mapper.OrderItemMapper
;
import
com.upyuns.platform.rs.website.mapper.OrderItemMapper
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
tk.mybatis.mapper.entity.Example
;
import
java.util.List
;
/**
/**
* 订单商品信息
* 订单商品信息
...
@@ -16,4 +19,26 @@ import com.github.wxiaoqi.security.common.biz.BaseBiz;
...
@@ -16,4 +19,26 @@ import com.github.wxiaoqi.security.common.biz.BaseBiz;
@Service
@Service
public
class
OrderItemBiz
extends
BaseBiz
<
OrderItemMapper
,
OrderItem
>
{
public
class
OrderItemBiz
extends
BaseBiz
<
OrderItemMapper
,
OrderItem
>
{
/**
* 根据订单ID查询所有订单商品
* @param orderIdList
* @return
*/
public
List
<
OrderItem
>
getAllByOrderId
(
List
<
Long
>
orderIdList
)
{
Example
example
=
new
Example
(
OrderItem
.
class
);
example
.
createCriteria
().
andIn
(
"orderId"
,
orderIdList
);
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/biz/ShoppingCartInfoBiz.java
View file @
9c947f36
...
@@ -126,7 +126,7 @@ public class ShoppingCartInfoBiz extends BaseBiz<ShoppingCartInfoMapper, Shoppin
...
@@ -126,7 +126,7 @@ public class ShoppingCartInfoBiz extends BaseBiz<ShoppingCartInfoMapper, Shoppin
updateSelectiveByIdRe
(
old
);
updateSelectiveByIdRe
(
old
);
}
else
{
}
else
{
ShoppingCartInfo
shoppingCartInfo
=
new
ShoppingCartInfo
();
ShoppingCartInfo
shoppingCartInfo
=
new
ShoppingCartInfo
();
shoppingCartInfo
.
setDetailId
(
imageImgStorage
.
getId
(
));
shoppingCartInfo
.
setDetailId
(
Long
.
valueOf
(
imageImgStorage
.
getId
()
));
shoppingCartInfo
.
setDetailJson
(
JSONObject
.
toJSONString
(
imageImgStorage
));
shoppingCartInfo
.
setDetailJson
(
JSONObject
.
toJSONString
(
imageImgStorage
));
shoppingCartInfo
.
setPrice
(
orderInfoDto
.
getPrice
());
shoppingCartInfo
.
setPrice
(
orderInfoDto
.
getPrice
());
shoppingCartInfo
.
setFilePath
(
orderInfoDto
.
getFilePath
());
shoppingCartInfo
.
setFilePath
(
orderInfoDto
.
getFilePath
());
...
@@ -159,7 +159,7 @@ public class ShoppingCartInfoBiz extends BaseBiz<ShoppingCartInfoMapper, Shoppin
...
@@ -159,7 +159,7 @@ public class ShoppingCartInfoBiz extends BaseBiz<ShoppingCartInfoMapper, Shoppin
updateSelectiveByIdRe
(
old
);
updateSelectiveByIdRe
(
old
);
}
else
{
}
else
{
ShoppingCartInfo
shoppingCartInfo
=
new
ShoppingCartInfo
();
ShoppingCartInfo
shoppingCartInfo
=
new
ShoppingCartInfo
();
shoppingCartInfo
.
setDetailId
(
industryApplicationInfo
.
getId
(
));
shoppingCartInfo
.
setDetailId
(
Long
.
valueOf
(
industryApplicationInfo
.
getId
()
));
shoppingCartInfo
.
setDetailJson
(
JSONObject
.
toJSONString
(
industryApplicationInfo
));
shoppingCartInfo
.
setDetailJson
(
JSONObject
.
toJSONString
(
industryApplicationInfo
));
shoppingCartInfo
.
setPrice
(
orderInfoDto
.
getPrice
());
shoppingCartInfo
.
setPrice
(
orderInfoDto
.
getPrice
());
shoppingCartInfo
.
setFilePath
(
orderInfoDto
.
getFilePath
());
shoppingCartInfo
.
setFilePath
(
orderInfoDto
.
getFilePath
());
...
...
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/controller/web/CustomFormWebController.java
View file @
9c947f36
...
@@ -22,21 +22,37 @@ public class CustomFormWebController extends BaseController<CustomFormBiz,Custom
...
@@ -22,21 +22,37 @@ public class CustomFormWebController extends BaseController<CustomFormBiz,Custom
@RequestMapping
(
value
=
"customIndustry"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"customIndustry"
,
method
=
RequestMethod
.
POST
)
public
ObjectRestResponse
customIndustry
(
@RequestBody
CustomForm
entity
)
{
public
ObjectRestResponse
customIndustry
(
@RequestBody
CustomForm
entity
)
{
// if(StrUtil.isNotBlank(entity.getProvinceCode())) {
if
(
StrUtil
.
isNotBlank
(
entity
.
getProvinceCode
()))
{
// entity.setProvinceName(AssertUtils.isFeignSucc(datacenterFegin.queryByCode(entity.getProvinceCode()).getData());
entity
.
setProvinceName
(
datacenterFegin
.
queryByCode
(
entity
.
getProvinceCode
()).
getData
().
getName
());
// }
}
if
(
StrUtil
.
isNotBlank
(
entity
.
getCityCode
()))
{
entity
.
setCityName
(
datacenterFegin
.
queryByCode
(
entity
.
getCityCode
()).
getData
().
getName
());
}
if
(
StrUtil
.
isNotBlank
(
entity
.
getAreaCode
()))
{
entity
.
setAreaName
(
datacenterFegin
.
queryByCode
(
entity
.
getAreaCode
()).
getData
().
getName
());
}
baseBiz
.
insertSelective
(
entity
);
baseBiz
.
insertSelective
(
entity
);
return
ObjectRestResponse
.
succ
();
return
ObjectRestResponse
.
succ
();
}
}
@RequestMapping
(
value
=
"customImgStorage"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"customImgStorage"
,
method
=
RequestMethod
.
POST
)
public
ObjectRestResponse
customImgStorage
(
@RequestBody
CustomForm
entity
)
{
public
ObjectRestResponse
customImgStorage
(
@RequestBody
CustomForm
entity
)
{
baseBiz
.
insertSelective
(
entity
);
baseBiz
.
insertSelective
(
entity
);
return
ObjectRestResponse
.
succ
();
return
ObjectRestResponse
.
succ
();
}
}
@RequestMapping
(
value
=
"customImageData"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"customImageData"
,
method
=
RequestMethod
.
POST
)
public
ObjectRestResponse
customImageData
(
@RequestBody
CustomForm
entity
)
{
public
ObjectRestResponse
customImageData
(
@RequestBody
CustomForm
entity
)
{
if
(
StrUtil
.
isNotBlank
(
entity
.
getProvinceCode
()))
{
entity
.
setProvinceName
(
datacenterFegin
.
queryByCode
(
entity
.
getProvinceCode
()).
getData
().
getName
());
}
if
(
StrUtil
.
isNotBlank
(
entity
.
getCityCode
()))
{
entity
.
setCityName
(
datacenterFegin
.
queryByCode
(
entity
.
getCityCode
()).
getData
().
getName
());
}
if
(
StrUtil
.
isNotBlank
(
entity
.
getAreaCode
()))
{
entity
.
setAreaName
(
datacenterFegin
.
queryByCode
(
entity
.
getAreaCode
()).
getData
().
getName
());
}
baseBiz
.
insertSelective
(
entity
);
baseBiz
.
insertSelective
(
entity
);
return
ObjectRestResponse
.
succ
();
return
ObjectRestResponse
.
succ
();
}
}
...
...
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/controller/web/OrderInfoWebController.java
View file @
9c947f36
...
@@ -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
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/service/ConfirmOrderService.java
View file @
9c947f36
...
@@ -70,10 +70,10 @@ public class ConfirmOrderService {
...
@@ -70,10 +70,10 @@ public class ConfirmOrderService {
break
;
break
;
//行业应用
//行业应用
case
INDUSTRY_INFO:
case
INDUSTRY_INFO:
IndustryApplicationInfo
industryApplicationInfo
=
industryApplicationInfoBiz
.
getOneById
(
itemInfoDto
.
getId
()).
getData
();
IndustryApplicationInfo
industryApplicationInfo
=
industryApplicationInfoBiz
.
getOneById
(
itemInfoDto
.
getId
()
.
intValue
()
).
getData
();
if
(
industryApplicationInfo
!=
null
)
{
if
(
industryApplicationInfo
!=
null
)
{
ItemInfoVo
itemInfoVo
=
new
ItemInfoVo
();
ItemInfoVo
itemInfoVo
=
new
ItemInfoVo
();
itemInfoVo
.
setId
(
industryApplicationInfo
.
getId
(
));
itemInfoVo
.
setId
(
Long
.
valueOf
(
industryApplicationInfo
.
getId
()
));
itemInfoVo
.
setDetailJson
(
JSONObject
.
toJSONString
(
industryApplicationInfo
));
itemInfoVo
.
setDetailJson
(
JSONObject
.
toJSONString
(
industryApplicationInfo
));
itemInfoVo
.
setImg
(
industryApplicationInfo
.
getCoverImg
());
itemInfoVo
.
setImg
(
industryApplicationInfo
.
getCoverImg
());
itemInfoVo
.
setNumber
(
itemInfoDto
.
getNumber
());
itemInfoVo
.
setNumber
(
itemInfoDto
.
getNumber
());
...
@@ -91,13 +91,13 @@ public class ConfirmOrderService {
...
@@ -91,13 +91,13 @@ public class ConfirmOrderService {
case
IMAGE_STORAGE:
case
IMAGE_STORAGE:
ImageInfoRelation
imageInfoRelation
=
imageInfoRelationBiz
.
selectById
(
itemInfoDto
.
getId
());
ImageInfoRelation
imageInfoRelation
=
imageInfoRelationBiz
.
selectById
(
itemInfoDto
.
getId
());
if
(
imageInfoRelation
!=
null
)
{
if
(
imageInfoRelation
!=
null
)
{
ImageImgStorage
imageImgStorage
=
imageImgStorageBiz
.
getDetail
(
itemInfoDto
.
getId
()).
getData
();
ImageImgStorage
imageImgStorage
=
imageImgStorageBiz
.
getDetail
(
itemInfoDto
.
getId
()
.
intValue
()
).
getData
();
if
(
imageImgStorage
!=
null
)
{
if
(
imageImgStorage
!=
null
)
{
List
<
ImageInfoRelation
>
imageInfoRelationList
=
new
ArrayList
<>();
List
<
ImageInfoRelation
>
imageInfoRelationList
=
new
ArrayList
<>();
imageInfoRelationList
.
add
(
imageInfoRelation
);
imageInfoRelationList
.
add
(
imageInfoRelation
);
imageImgStorage
.
setImageInfoRelationList
(
imageInfoRelationList
);
imageImgStorage
.
setImageInfoRelationList
(
imageInfoRelationList
);
ItemInfoVo
itemInfoVo
=
new
ItemInfoVo
();
ItemInfoVo
itemInfoVo
=
new
ItemInfoVo
();
itemInfoVo
.
setId
(
imageImgStorage
.
getId
(
));
itemInfoVo
.
setId
(
Long
.
valueOf
(
imageImgStorage
.
getId
()
));
itemInfoVo
.
setPrice
(
imageInfoRelation
.
getPrice
());
itemInfoVo
.
setPrice
(
imageInfoRelation
.
getPrice
());
itemInfoVo
.
setType
(
itemInfoDto
.
getType
());
itemInfoVo
.
setType
(
itemInfoDto
.
getType
());
itemInfoVo
.
setNumber
(
itemInfoDto
.
getNumber
());
itemInfoVo
.
setNumber
(
itemInfoDto
.
getNumber
());
...
@@ -117,7 +117,7 @@ public class ConfirmOrderService {
...
@@ -117,7 +117,7 @@ public class ConfirmOrderService {
ShoppingCartInfo
shoppingCartInfo
=
shoppingCartInfoBiz
.
selectById
(
itemInfoDto
.
getId
());
ShoppingCartInfo
shoppingCartInfo
=
shoppingCartInfoBiz
.
selectById
(
itemInfoDto
.
getId
());
if
(
shoppingCartInfo
!=
null
)
{
if
(
shoppingCartInfo
!=
null
)
{
ItemInfoVo
itemInfoVo
=
new
ItemInfoVo
();
ItemInfoVo
itemInfoVo
=
new
ItemInfoVo
();
itemInfoVo
.
setId
(
shoppingCartInfo
.
getCartId
()
.
intValue
()
);
itemInfoVo
.
setId
(
shoppingCartInfo
.
getCartId
());
itemInfoVo
.
setPrice
(
shoppingCartInfo
.
getPrice
());
itemInfoVo
.
setPrice
(
shoppingCartInfo
.
getPrice
());
itemInfoVo
.
setType
(
shoppingCartInfo
.
getType
());
itemInfoVo
.
setType
(
shoppingCartInfo
.
getType
());
itemInfoVo
.
setNumber
(
itemInfoDto
.
getNumber
());
itemInfoVo
.
setNumber
(
itemInfoDto
.
getNumber
());
...
...
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