Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
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
youjj
cloud-platform
Commits
e729b789
Commit
e729b789
authored
Aug 23, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into jrz_dev
parents
3acd0fc7
3e80895d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
4 deletions
+52
-4
UserCouponBiz.java
...in/java/com/xxfc/platform/activity/biz/UserCouponBiz.java
+48
-3
OrderCancelBiz.java
...ava/com/xxfc/platform/order/biz/inner/OrderCancelBiz.java
+3
-0
VehicleJobHandler.java
...m/xxfc/platform/vehicle/jobhandler/VehicleJobHandler.java
+1
-1
No files found.
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/UserCouponBiz.java
View file @
e729b789
...
...
@@ -91,6 +91,26 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
log
.
error
(
userId
+
"----已领优惠卷"
);
return
null
;
}
falg
=
checkLed
(
userId
,
couponId
,
coupon
.
getLimitCollar
(),
coupon
.
getQuota
());
if
(
falg
){
log
.
error
(
userId
+
"----已超过领取限制"
);
return
null
;
}
return
led
(
coupon
,
userId
);
}
//后台领劵(一个劵可以发多张)
public
String
adminUserLedCoupon
(
Integer
userId
,
Integer
couponId
){
Coupon
coupon
=
couponBiz
.
selectById
(
couponId
);
if
(
coupon
==
null
||
coupon
.
getIsDel
()!=
0
||
coupon
.
getStatus
()!=
1
){
log
.
error
(
userId
+
"----无可领取优惠卷"
);
return
null
;
}
boolean
falg
=
checkLed
(
userId
,
couponId
,
coupon
.
getLimitCollar
(),
coupon
.
getQuota
());
if
(
falg
){
log
.
error
(
userId
+
"----已超过领取限制"
);
return
null
;
}
return
led
(
coupon
,
userId
);
}
...
...
@@ -123,7 +143,7 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
//检查用户是否领卷
public
boolean
checkUserLed
(
Integer
userId
,
Integer
id
){
Example
example
=
new
Example
(
UserCoupon
.
class
);
example
.
createCriteria
().
andEqualTo
(
"userId"
,
userId
).
andEqualTo
(
"couponId"
,
id
);
example
.
createCriteria
().
andEqualTo
(
"userId"
,
userId
).
andEqualTo
(
"couponId"
,
id
)
.
andEqualTo
(
"isDel"
,
0
)
;
List
<
UserCoupon
>
list
=
selectByExample
(
example
);
if
(
list
.
size
()>
0
){
log
.
error
(
userId
+
"----已领优惠卷"
);
...
...
@@ -132,6 +152,31 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
return
false
;
}
//检查用户是否可领卷
public
boolean
checkLed
(
Integer
userId
,
Integer
id
,
Integer
limitCollar
,
Integer
quota
){
Example
example
=
new
Example
(
UserCoupon
.
class
);
example
.
createCriteria
().
andEqualTo
(
"userId"
,
userId
).
andEqualTo
(
"couponId"
,
id
).
andEqualTo
(
"isDel"
,
0
);
Integer
num
=
selectCountByExample
(
example
);
log
.
info
(
"-用户已领劵--userId==="
+
userId
+
"----num==="
+
num
+
"----couponid==="
+
id
);
if
(
num
==
null
||
num
==
0
){
log
.
error
(
userId
+
"----无领此优惠卷----couponid==="
+
id
);
return
false
;
}
if
(
limitCollar
==
null
||
num
>=
limitCollar
){
log
.
error
(
userId
+
"----此优惠卷超过每人限领次数----couponid==="
+
id
+
"----limitCollar==="
+
limitCollar
);
return
true
;
}
example
.
clear
();
example
.
createCriteria
().
andEqualTo
(
"couponId"
,
id
).
andEqualTo
(
"isDel"
,
0
);
num
=
selectCountByExample
(
example
);
log
.
info
(
"---发劵数量----num==="
+
num
+
"----limitCollar==="
+
limitCollar
+
"----quota==="
+
quota
+
"----couponid==="
+
id
);
if
(
quota
==
null
||
quota
==
0
||(
num
!=
null
&&
num
>
0
&&
num
>=
quota
)){
log
.
error
(
userId
+
"----此优惠卷超过发券数量----couponid==="
+
id
+
"----quota==="
+
quota
);
return
true
;
}
return
false
;
}
//获取我的优惠卷
public
ObjectRestResponse
getCouponList
(
Integer
userId
,
int
type
,
Integer
channel
,
BigDecimal
amout
){
if
(
userId
==
null
||
userId
==
0
){
...
...
@@ -206,7 +251,6 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
result
.
put
(
"array"
,
array
);
return
ObjectRestResponse
.
succ
(
result
);
}
//获取我的优惠卷
public
ObjectRestResponse
getUserCouponList
(
Integer
userId
,
int
type
,
Integer
channel
,
BigDecimal
amout
)
{
if
(
userId
==
null
||
userId
==
0
)
{
...
...
@@ -386,7 +430,7 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
userCoupon.setExpireTime(couponVo.getValidEndTime());
userCoupon.setTickerNo(Snowflake.build()+"");
userCoupons.add(userCoupon);*/
u
serLedCoupon
(
appUserLogin
.
getId
(),
userCouponSendDTO
.
getCouponId
());
adminU
serLedCoupon
(
appUserLogin
.
getId
(),
userCouponSendDTO
.
getCouponId
());
}
return
1
;
}
...
...
@@ -427,6 +471,7 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
UserCoupon
userCoupon
=
new
UserCoupon
();
userCoupon
.
setUserId
(
userId
);
userCoupon
.
setIsUse
(
0
);
userCoupon
.
setIsDel
(
0
);
Long
couponNumber
=
selectCount
(
userCoupon
);
userInfoDTO
.
setCouponNumber
(
couponNumber
);
return
userInfoDTO
;
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/inner/OrderCancelBiz.java
View file @
e729b789
...
...
@@ -162,6 +162,9 @@ public class OrderCancelBiz {
}
//退款流程
orderRefundBiz
.
rentRefundProcess
(
hasUpdateOrder
,
timeLag
,
APP_ORDER
+
"_"
+
key
);
//站点总人数减少
tourFeign
.
updateTourGoodPersonNum
(
otd
.
getVerificationId
(),
TourFeign
.
TOTAL_PERSON
,
(
otd
.
getTotalNumber
()
*
-
1
));
}
}
...
...
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/jobhandler/VehicleJobHandler.java
View file @
e729b789
...
...
@@ -51,7 +51,7 @@ public class VehicleJobHandler extends IJobHandler {
int
betweenMonth
=
Integer
.
valueOf
(
dictionary
.
getDetail
()).
intValue
();
int
month
=
nowMonth
+
betweenMonth
>
12
?
(
betweenMonth
+
nowMonth
)
-
12
:
nowMonth
+
betweenMonth
;
year
=
month
>
nowMonth
?
year
:
year
+
1
;
String
yearAndMonth
=
String
.
format
(
"%d-%s"
,
year
,
month
>
10
?
month:
"0"
+
month
);
String
yearAndMonth
=
String
.
format
(
"%d-%s"
,
year
,
month
>
=
10
?
month:
"0"
+
month
);
XxlJobLogger
.
log
(
"----查询到的车型ids:【{}】"
,
existVehicleIds
);
if
(
CollectionUtils
.
isNotEmpty
(
existVehicleIds
))
{
List
<
VehicleBookInfo
>
bookInfos
=
existVehicleIds
.
stream
().
map
(
vehicleId
->
{
...
...
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