Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gdtel-gztel-school-center
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
吴学德
gdtel-gztel-school-center
Commits
0ef33f2b
Commit
0ef33f2b
authored
Mar 26, 2020
by
黄森林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化提交
parent
24590c2f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
11 deletions
+49
-11
new-user/src/main/java/com/winsun/controller/PackageNewClothes.java
+5
-10
old-user/src/main/java/com/winsun/controller/ChooseController.java
+43
-0
old-user/src/main/java/com/winsun/controller/PackageUpgradeController.java
+1
-1
No files found.
new-user/src/main/java/com/winsun/controller/PackageNewClothes.java
View file @
0ef33f2b
...
...
@@ -9,11 +9,10 @@ import com.winsun.bean.Order;
import
com.winsun.bean.Package
;
import
com.winsun.bean.School
;
import
com.winsun.bean.SysUser
;
import
com.winsun.constant.FilePath
;
import
com.winsun.constant.OrderStatus
;
import
com.winsun.constant.UserType
;
import
com.winsun.mapper.*
;
import
com.winsun.utils.
File
Util
;
import
com.winsun.utils.
IDCard
Util
;
import
com.winsun.utils.PicturesUtil
;
import
com.winsun.utils.XbkUtil
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -23,7 +22,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.FileOutputStream
;
import
java.io.IOException
;
...
...
@@ -159,11 +157,9 @@ public class PackageNewClothes {
/**
* 身份证验证
*/
ResponseData
<
String
>
res
=
idCardVerification
(
idCard
,
customerName
);
if
(!
res
.
isSuccess
()){
return
res
;
if
(!
IDCardUtil
.
IDCardValidate
(
idCard
)){
return
ResponseData
.
error
(
"您的身份证输入有误,请重新输入!"
);
}
Calendar
instance
=
Calendar
.
getInstance
();
instance
.
add
(
Calendar
.
DATE
,
-
94
);
Date
time
=
instance
.
getTime
();
...
...
@@ -262,9 +258,8 @@ public class PackageNewClothes {
/**
* 身份证验证
*/
ResponseData
<
String
>
res
=
idCardVerification
(
idCard
,
customerName
);
if
(!
res
.
isSuccess
()){
return
res
;
if
(!
IDCardUtil
.
IDCardValidate
(
idCard
)){
return
ResponseData
.
error
(
"您的身份证输入有误,请重新输入!"
);
}
Calendar
instance
=
Calendar
.
getInstance
();
instance
.
add
(
Calendar
.
DATE
,
-
94
);
...
...
old-user/src/main/java/com/winsun/controller/ChooseController.java
View file @
0ef33f2b
package
com
.
winsun
.
controller
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.mapper.EntityWrapper
;
import
com.baomidou.mybatisplus.mapper.Wrapper
;
import
com.winsun.auth.core.common.model.ResponseData
;
import
com.winsun.bean.Order
;
import
com.winsun.bean.School
;
import
com.winsun.bean.SysUser
;
import
com.winsun.mapper.*
;
import
com.winsun.utils.MyBatisPlusUpdateUtils
;
import
com.winsun.utils.XbkUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.data.redis.core.RedisTemplate
;
...
...
@@ -60,9 +67,17 @@ public class ChooseController {
@RequestMapping
(
value
=
"selectOrderInfo"
,
method
=
RequestMethod
.
POST
)
public
ResponseData
<
Order
>
selectOrderInfo
(
@RequestParam
(
"orderId"
)
String
orderId
)
{
Order
order
=
orderMapper
.
selectById
(
orderId
);
if
(
"待活体"
.
equals
(
order
.
getOrderStatus
())
||
"待识别"
.
equals
(
order
.
getOrderStatus
())){
general
(
orderId
);
}
order
.
setIdCard
(
""
);
order
.
setGiftAccount
(
""
);
order
.
setGiftPassword
(
""
);
order
.
setNetPassword
(
""
);
if
(
StringUtils
.
isNotBlank
(
order
.
getNetNumber
())){
String
[]
split
=
order
.
getNetNumber
().
split
(
"@"
);
order
.
setNetNumber
(
order
.
getNetNumber
().
substring
(
0
,
1
)+
"****"
+
split
[
1
]);
}
return
ResponseData
.
success
(
order
);
}
...
...
@@ -107,4 +122,32 @@ public class ChooseController {
return
ResponseData
.
success
(
school
);
}
public
static
void
general
(
String
orderId
)
{
Wrapper
<
Order
>
wrapper
=
new
EntityWrapper
();
wrapper
.
eq
(
"id"
,
orderId
);
List
<
Order
>
orders
=
orderMapper
.
selectList
(
wrapper
);
orders
.
forEach
(
order
->
{
try
{
Map
<
String
,
Object
>
dataMapping
=
new
HashMap
<>();
JSONObject
jsonObject
=
XbkUtil
.
orderInfoJT0006
(
order
.
getXbOrderId
());
String
dataArray
=
jsonObject
.
getString
(
"dataArray"
);
Map
<
String
,
Object
>
Map
=
JSON
.
parseObject
(
dataArray
,
HashMap
.
class
);
Wrapper
<
Order
>
wrapper1
=
new
EntityWrapper
();
wrapper1
.
eq
(
"xb_order_id"
,
Map
.
get
(
"orderCode"
));
wrapper1
.
eq
(
"id"
,
order
.
getId
());
if
(
Map
.
get
(
"orderState"
).
toString
().
equals
(
"3"
)
||
Map
.
get
(
"orderState"
).
toString
().
equals
(
"13"
)
||
Map
.
get
(
"orderState"
).
toString
().
equals
(
"8"
)
||
Map
.
get
(
"orderState"
).
toString
().
equals
(
"22"
)
||
Map
.
get
(
"orderState"
).
toString
().
equals
(
"21"
)
){
dataMapping
.
put
(
"order_status"
,
"待处理"
);
}
if
(
Map
.
get
(
"orderState"
).
toString
().
equals
(
"10"
)
||
Map
.
get
(
"orderState"
).
toString
().
equals
(
"11"
)){
dataMapping
.
put
(
"order_status"
,
"异常单"
);
}
orderMapper
.
updateForSet
(
MyBatisPlusUpdateUtils
.
toUpdateSet
(
dataMapping
),
wrapper1
);
log
.
info
(
order
.
getXbOrderId
()+
"订单已更新"
);
}
catch
(
Exception
e
)
{
log
.
info
(
order
.
getXbOrderId
()+
"订单更新失败"
,
e
.
getMessage
());
}
});
}
}
old-user/src/main/java/com/winsun/controller/PackageUpgradeController.java
View file @
0ef33f2b
...
...
@@ -85,7 +85,7 @@ public class PackageUpgradeController extends BaseController {
}
if
(
selectOrder
.
length
()
==
18
)
{
if
(!
IDCardUtil
.
IDCardValidate
(
selectOrder
))
{
return
ResponseData
.
error
(
"
身份证输入有误
!"
);
return
ResponseData
.
error
(
"
您的身份证输入有误,请重新输入
!"
);
}
wrapper
.
like
(
"social_id"
,
selectOrder
.
substring
(
5
,
18
),
SqlLike
.
LEFT
);
}
...
...
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