Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_ht
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pseer
gxpt_ht
Commits
4fc9bda9
Commit
4fc9bda9
authored
Jul 21, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
logger.info换为logger.debug
parent
9ecb7eda
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
51 additions
and
51 deletions
+51
-51
QPServiceImplAspect.java
...ain/java/share/framework/aspectj/QPServiceImplAspect.java
+7
-7
CouponRetryTask.java
...artz/src/main/java/share/quartz/task/CouponRetryTask.java
+4
-4
OrderTask.java
share-quartz/src/main/java/share/quartz/task/OrderTask.java
+13
-13
RedisTask.java
share-quartz/src/main/java/share/quartz/task/RedisTask.java
+8
-8
DeviceOpServiceImpl.java
...n/java/share/system/service/impl/DeviceOpServiceImpl.java
+2
-2
OrderPayServiceImpl.java
...n/java/share/system/service/impl/OrderPayServiceImpl.java
+3
-3
QPServiceImpl.java
...rc/main/java/share/system/service/impl/QPServiceImpl.java
+6
-6
SConsumerCenterServiceImpl.java
...share/system/service/impl/SConsumerCenterServiceImpl.java
+3
-3
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+4
-4
WechatNewServiceImpl.java
.../java/share/system/service/impl/WechatNewServiceImpl.java
+1
-1
No files found.
share-framework/src/main/java/share/framework/aspectj/QPServiceImplAspect.java
View file @
4fc9bda9
...
@@ -96,12 +96,12 @@ public class QPServiceImplAspect {
...
@@ -96,12 +96,12 @@ public class QPServiceImplAspect {
couponLog
.
setMessage
(
outParams
);
couponLog
.
setMessage
(
outParams
);
couponLog
.
setCreateTime
(
new
Date
());
couponLog
.
setCreateTime
(
new
Date
());
couponLog
.
setNumber
(
TRY_NUMBER
);
couponLog
.
setNumber
(
TRY_NUMBER
);
logger
.
info
(
"优惠卷操作日志:{}"
,
couponLog
);
logger
.
debug
(
"优惠卷操作日志:{}"
,
couponLog
);
logger
.
info
(
"开始执行新增正常日志"
);
logger
.
debug
(
"开始执行新增正常日志"
);
boolean
isSaved
=
couponLogService
.
save
(
couponLog
);
boolean
isSaved
=
couponLogService
.
save
(
couponLog
);
System
.
out
.
println
(
couponLog
+
"============================================================"
);
System
.
out
.
println
(
couponLog
+
"============================================================"
);
if
(
isSaved
)
{
if
(
isSaved
)
{
logger
.
info
(
"新增日志成功"
);
logger
.
debug
(
"新增日志成功"
);
}
else
{
}
else
{
logger
.
warn
(
"新增日志失败"
);
logger
.
warn
(
"新增日志失败"
);
}
}
...
@@ -142,13 +142,13 @@ public class QPServiceImplAspect {
...
@@ -142,13 +142,13 @@ public class QPServiceImplAspect {
}
catch
(
Exception
e2
)
{
}
catch
(
Exception
e2
)
{
logger
.
error
(
"Error while processing exception log"
,
e2
);
logger
.
error
(
"Error while processing exception log"
,
e2
);
}
finally
{
}
finally
{
logger
.
info
(
"优惠卷操作日志:{}"
,
couponLog
);
logger
.
debug
(
"优惠卷操作日志:{}"
,
couponLog
);
logger
.
info
(
"开始执行新增错误日志"
);
logger
.
debug
(
"开始执行新增错误日志"
);
boolean
i
=
couponLogService
.
save
(
couponLog
);
boolean
i
=
couponLogService
.
save
(
couponLog
);
if
(
i
)
{
if
(
i
)
{
logger
.
info
(
"新增日志成功"
);
logger
.
debug
(
"新增日志成功"
);
}
else
{
}
else
{
logger
.
info
(
"新增日志失败"
);
logger
.
debug
(
"新增日志失败"
);
}
}
}
}
}
}
...
...
share-quartz/src/main/java/share/quartz/task/CouponRetryTask.java
View file @
4fc9bda9
...
@@ -85,7 +85,7 @@ public class CouponRetryTask {
...
@@ -85,7 +85,7 @@ public class CouponRetryTask {
TuangouReceiptGetConsumedReponseEntity
getconsumed
=
qpService
.
getconsumed
(
item
.
getCouponCode
(),
openShopUuid
);
TuangouReceiptGetConsumedReponseEntity
getconsumed
=
qpService
.
getconsumed
(
item
.
getCouponCode
(),
openShopUuid
);
if
(!
ObjectUtils
.
isEmpty
(
getconsumed
))
{
if
(!
ObjectUtils
.
isEmpty
(
getconsumed
))
{
item
.
setCouponPayPrice
(
BigDecimal
.
valueOf
(
getconsumed
.
getDeal_price
()));
item
.
setCouponPayPrice
(
BigDecimal
.
valueOf
(
getconsumed
.
getDeal_price
()));
logger
.
info
(
"美团优惠卷购买金额为:"
+
item
.
getCouponPayPrice
());
logger
.
debug
(
"美团优惠卷购买金额为:"
+
item
.
getCouponPayPrice
());
}
else
{
}
else
{
item
.
setUseStatus
(
UserStatusEnum
.
EXPIRED
.
getCode
());
item
.
setUseStatus
(
UserStatusEnum
.
EXPIRED
.
getCode
());
}
}
...
@@ -95,7 +95,7 @@ public class CouponRetryTask {
...
@@ -95,7 +95,7 @@ public class CouponRetryTask {
JSONObject
amount
=
certificate
.
getJSONObject
(
"amount"
);
JSONObject
amount
=
certificate
.
getJSONObject
(
"amount"
);
if
(
NumberUtils
.
isNumber
(
amount
.
getStr
(
"pay_amount"
)))
{
if
(
NumberUtils
.
isNumber
(
amount
.
getStr
(
"pay_amount"
)))
{
item
.
setCouponPayPrice
(
BigDecimal
.
valueOf
(
Double
.
parseDouble
(
amount
.
getStr
(
"pay_amount"
))
/
100
));
item
.
setCouponPayPrice
(
BigDecimal
.
valueOf
(
Double
.
parseDouble
(
amount
.
getStr
(
"pay_amount"
))
/
100
));
logger
.
info
(
"抖音优惠卷购买金额为:"
+
item
.
getCouponPayPrice
());
logger
.
debug
(
"抖音优惠卷购买金额为:"
+
item
.
getCouponPayPrice
());
}
else
{
}
else
{
logger
.
warn
(
"Invalid pay amount for coupon "
+
item
.
getId
());
logger
.
warn
(
"Invalid pay amount for coupon "
+
item
.
getId
());
}
}
...
@@ -123,7 +123,7 @@ public class CouponRetryTask {
...
@@ -123,7 +123,7 @@ public class CouponRetryTask {
TuangouReceiptGetConsumedReponseEntity
getconsumed
=
qpService
.
getconsumed
(
item
.
getCouponCode
(),
openShopUuid
);
TuangouReceiptGetConsumedReponseEntity
getconsumed
=
qpService
.
getconsumed
(
item
.
getCouponCode
(),
openShopUuid
);
if
(!
ObjectUtils
.
isEmpty
(
getconsumed
))
{
if
(!
ObjectUtils
.
isEmpty
(
getconsumed
))
{
item
.
setCouponPayPrice
(
BigDecimal
.
valueOf
(
getconsumed
.
getDeal_price
()));
item
.
setCouponPayPrice
(
BigDecimal
.
valueOf
(
getconsumed
.
getDeal_price
()));
logger
.
info
(
"美团优惠卷购买金额为:"
+
item
.
getCouponPayPrice
());
logger
.
debug
(
"美团优惠卷购买金额为:"
+
item
.
getCouponPayPrice
());
}
else
{
}
else
{
item
.
setUseStatus
(
UserStatusEnum
.
EXPIRED
.
getCode
());
item
.
setUseStatus
(
UserStatusEnum
.
EXPIRED
.
getCode
());
}
}
...
@@ -133,7 +133,7 @@ public class CouponRetryTask {
...
@@ -133,7 +133,7 @@ public class CouponRetryTask {
JSONObject
amount
=
certificate
.
getJSONObject
(
"amount"
);
JSONObject
amount
=
certificate
.
getJSONObject
(
"amount"
);
if
(
NumberUtils
.
isNumber
(
amount
.
getStr
(
"pay_amount"
)))
{
if
(
NumberUtils
.
isNumber
(
amount
.
getStr
(
"pay_amount"
)))
{
item
.
setCouponPayPrice
(
BigDecimal
.
valueOf
(
Double
.
parseDouble
(
amount
.
getStr
(
"pay_amount"
))
/
100
));
item
.
setCouponPayPrice
(
BigDecimal
.
valueOf
(
Double
.
parseDouble
(
amount
.
getStr
(
"pay_amount"
))
/
100
));
logger
.
info
(
"抖音优惠卷购买金额为:"
+
item
.
getCouponPayPrice
());
logger
.
debug
(
"抖音优惠卷购买金额为:"
+
item
.
getCouponPayPrice
());
}
else
{
}
else
{
logger
.
warn
(
"Invalid pay amount for coupon "
+
item
.
getId
());
logger
.
warn
(
"Invalid pay amount for coupon "
+
item
.
getId
());
}
}
...
...
share-quartz/src/main/java/share/quartz/task/OrderTask.java
View file @
4fc9bda9
...
@@ -87,7 +87,7 @@ public class OrderTask {
...
@@ -87,7 +87,7 @@ public class OrderTask {
public
void
autoCancel
()
{
public
void
autoCancel
()
{
String
redisKey
=
Constants
.
ORDER_AUTO_CANCEL_KEY
;
String
redisKey
=
Constants
.
ORDER_AUTO_CANCEL_KEY
;
Long
size
=
redisUtil
.
getListSize
(
redisKey
);
Long
size
=
redisUtil
.
getListSize
(
redisKey
);
logger
.
info
(
"orderTask.autoCancel | size:"
+
size
);
logger
.
debug
(
"orderTask.autoCancel | size:"
+
size
);
if
(
size
<
1
)
{
if
(
size
<
1
)
{
return
;
return
;
}
}
...
@@ -145,7 +145,7 @@ public class OrderTask {
...
@@ -145,7 +145,7 @@ public class OrderTask {
couponUser
.
setUseStatus
(
CouponStatusEnum
.
NORMAL
.
getValue
());
couponUser
.
setUseStatus
(
CouponStatusEnum
.
NORMAL
.
getValue
());
consumerCouponService
.
updateById
(
couponUser
);
consumerCouponService
.
updateById
(
couponUser
);
}
}
logger
.
info
(
String
.
format
(
"删除订单,订单号【%s】"
,
sOrder
.
getOrderNo
()));
logger
.
debug
(
String
.
format
(
"删除订单,订单号【%s】"
,
sOrder
.
getOrderNo
()));
return
Boolean
.
TRUE
;
return
Boolean
.
TRUE
;
});
});
return
execute
;
return
execute
;
...
@@ -160,7 +160,7 @@ public class OrderTask {
...
@@ -160,7 +160,7 @@ public class OrderTask {
public
void
refundApply
()
{
public
void
refundApply
()
{
String
redisKey
=
Constants
.
ORDER_TASK_REDIS_KEY_AFTER_REFUND_BY_USER
;
String
redisKey
=
Constants
.
ORDER_TASK_REDIS_KEY_AFTER_REFUND_BY_USER
;
Long
size
=
redisUtil
.
getListSize
(
redisKey
);
Long
size
=
redisUtil
.
getListSize
(
redisKey
);
logger
.
info
(
"OrderTask.refundApply | size:"
+
size
);
logger
.
debug
(
"OrderTask.refundApply | size:"
+
size
);
if
(
size
<
1
)
{
if
(
size
<
1
)
{
return
;
return
;
}
}
...
@@ -207,10 +207,10 @@ public class OrderTask {
...
@@ -207,10 +207,10 @@ public class OrderTask {
try
{
try
{
execute
=
transactionTemplate
.
execute
(
e
->
{
execute
=
transactionTemplate
.
execute
(
e
->
{
orderService
.
updateById
(
tempOrder
);
orderService
.
updateById
(
tempOrder
);
logger
.
info
(
"=================开始处理优惠券退款================="
);
logger
.
debug
(
"=================开始处理优惠券退款================="
);
logger
.
info
(
"================="
+
sOrder
.
getId
()
+
"================="
);
logger
.
debug
(
"================="
+
sOrder
.
getId
()
+
"================="
);
logger
.
info
(
"================="
+
sOrder
.
getCouponId
()
+
"================="
);
logger
.
debug
(
"================="
+
sOrder
.
getCouponId
()
+
"================="
);
logger
.
info
(
"================================================="
);
logger
.
debug
(
"================================================="
);
// 退优惠券
// 退优惠券
if
(
ObjectUtil
.
isNotNull
(
sOrder
.
getCouponId
()))
{
if
(
ObjectUtil
.
isNotNull
(
sOrder
.
getCouponId
()))
{
SConsumerCoupon
couponUser
=
consumerCouponService
.
getById
(
sOrder
.
getCouponId
());
SConsumerCoupon
couponUser
=
consumerCouponService
.
getById
(
sOrder
.
getCouponId
());
...
@@ -244,17 +244,17 @@ public class OrderTask {
...
@@ -244,17 +244,17 @@ public class OrderTask {
SOrder
byOrderNo
=
orderService
.
getByOrderNo
(
String
.
valueOf
(
orderNo
));
SOrder
byOrderNo
=
orderService
.
getByOrderNo
(
String
.
valueOf
(
orderNo
));
if
(
ObjectUtil
.
isEmpty
(
byOrderNo
))
{
if
(
ObjectUtil
.
isEmpty
(
byOrderNo
))
{
redisUtil
.
delete
(
o
);
redisUtil
.
delete
(
o
);
logger
.
info
(
"订单号为:"
+
jsonObject
.
getStr
(
"orderNo"
)
+
"的订单不存在"
);
logger
.
debug
(
"订单号为:"
+
jsonObject
.
getStr
(
"orderNo"
)
+
"的订单不存在"
);
return
;
return
;
}
}
if
(!
byOrderNo
.
getStatus
().
equals
(
OrderStatusEnum
.
UNUSED
.
getCode
()))
{
if
(!
byOrderNo
.
getStatus
().
equals
(
OrderStatusEnum
.
UNUSED
.
getCode
()))
{
redisUtil
.
delete
(
o
);
redisUtil
.
delete
(
o
);
logger
.
info
(
"订单号为:"
+
jsonObject
.
getStr
(
"orderNo"
)
+
"的订单状态异常"
);
logger
.
debug
(
"订单号为:"
+
jsonObject
.
getStr
(
"orderNo"
)
+
"的订单状态异常"
);
return
;
return
;
}
}
if
(
OrderStatusEnum
.
CANCEL
.
getCode
().
equals
(
byOrderNo
.
getStatus
()))
{
if
(
OrderStatusEnum
.
CANCEL
.
getCode
().
equals
(
byOrderNo
.
getStatus
()))
{
redisUtil
.
delete
(
o
);
redisUtil
.
delete
(
o
);
logger
.
info
(
"订单号为:"
+
jsonObject
.
getStr
(
"orderNo"
)
+
"的订单已取消"
);
logger
.
debug
(
"订单号为:"
+
jsonObject
.
getStr
(
"orderNo"
)
+
"的订单已取消"
);
return
;
return
;
}
}
//时间到期前30分钟到29分
//时间到期前30分钟到29分
...
@@ -267,7 +267,7 @@ public class OrderTask {
...
@@ -267,7 +267,7 @@ public class OrderTask {
SStore
sStore
=
storeService
.
getById
(
byOrderNo
.
getStoreId
());
SStore
sStore
=
storeService
.
getById
(
byOrderNo
.
getStoreId
());
SRoom
sRoom
=
roomService
.
getById
(
byOrderNo
.
getRoomId
());
SRoom
sRoom
=
roomService
.
getById
(
byOrderNo
.
getRoomId
());
smsService
.
sendSmsOrderStartRemind
(
byOrderNo
.
getConsumerPhone
(),
sStore
,
sRoom
);
smsService
.
sendSmsOrderStartRemind
(
byOrderNo
.
getConsumerPhone
(),
sStore
,
sRoom
);
logger
.
info
(
"订单号为:"
+
jsonObject
.
getStr
(
"orderNo"
)
+
"的订单开始预定时间到15分钟"
);
logger
.
debug
(
"订单号为:"
+
jsonObject
.
getStr
(
"orderNo"
)
+
"的订单开始预定时间到15分钟"
);
return
;
return
;
}
}
if
(
expirationTime
.
getTime
()
<
new
Date
().
getTime
())
{
if
(
expirationTime
.
getTime
()
<
new
Date
().
getTime
())
{
...
@@ -299,10 +299,10 @@ public class OrderTask {
...
@@ -299,10 +299,10 @@ public class OrderTask {
room
.
setUpdateTime
(
new
Date
());
room
.
setUpdateTime
(
new
Date
());
}
}
});
});
// logger.
info
("开始通电!!!!");
// logger.
debug
("开始通电!!!!");
//到达预定时间进行通电
//到达预定时间进行通电
// deviceOpService.openOrCloseDevice(item.getRoomId(), item.getConsumerPhone(), OpTypeEnum.GET_ELECTRIC.getCode(), false, ZERO);
// deviceOpService.openOrCloseDevice(item.getRoomId(), item.getConsumerPhone(), OpTypeEnum.GET_ELECTRIC.getCode(), false, ZERO);
// logger.
info
("通电完成!!!!");
// logger.
debug
("通电完成!!!!");
redisUtil
.
delete
(
ReceiptRdeisEnum
.
ORDER_NO
.
getValue
()
+
item
.
getOrderNo
());
redisUtil
.
delete
(
ReceiptRdeisEnum
.
ORDER_NO
.
getValue
()
+
item
.
getOrderNo
());
}
}
});
});
...
...
share-quartz/src/main/java/share/quartz/task/RedisTask.java
View file @
4fc9bda9
...
@@ -137,7 +137,7 @@ public class RedisTask {
...
@@ -137,7 +137,7 @@ public class RedisTask {
expiredCoupons
.
add
(
coupon
.
getId
());
expiredCoupons
.
add
(
coupon
.
getId
());
}
}
}
}
logger
.
info
(
"券码:{}->查询结束:{}"
,
coupon
.
getCouponCode
(),
getconsumed
);
logger
.
debug
(
"券码:{}->查询结束:{}"
,
coupon
.
getCouponCode
(),
getconsumed
);
}
else
if
(
StringUtils
.
isNoneEmpty
(
coupon
.
getTiktokSkuId
())
&&
coupon
.
getPlatformType
().
equals
(
PlatformTypeEnum
.
TIKTOK
.
getCode
()))
{
}
else
if
(
StringUtils
.
isNoneEmpty
(
coupon
.
getTiktokSkuId
())
&&
coupon
.
getPlatformType
().
equals
(
PlatformTypeEnum
.
TIKTOK
.
getCode
()))
{
//抖音复验券
//抖音复验券
JSONObject
object
=
tiktokService
.
certificateGet
(
coupon
.
getEncryptedCode
());
JSONObject
object
=
tiktokService
.
certificateGet
(
coupon
.
getEncryptedCode
());
...
@@ -248,7 +248,7 @@ public class RedisTask {
...
@@ -248,7 +248,7 @@ public class RedisTask {
sOrder
=
isOrderService
.
getByOrderNo
(
jsonObject
.
getStr
(
"orderNo"
));
sOrder
=
isOrderService
.
getByOrderNo
(
jsonObject
.
getStr
(
"orderNo"
));
if
(
ObjectUtils
.
isEmpty
(
sOrder
))
{
if
(
ObjectUtils
.
isEmpty
(
sOrder
))
{
redisUtil
.
delete
(
o
);
redisUtil
.
delete
(
o
);
logger
.
info
(
"订单号为:{}的订单不存在"
,
jsonObject
.
getStr
(
"orderNo"
));
logger
.
debug
(
"订单号为:{}的订单不存在"
,
jsonObject
.
getStr
(
"orderNo"
));
throw
new
BaseException
(
"订单不存在!"
);
throw
new
BaseException
(
"订单不存在!"
);
}
}
}
}
...
@@ -260,7 +260,7 @@ public class RedisTask {
...
@@ -260,7 +260,7 @@ public class RedisTask {
DateUtil
.
format
(
new
Date
(),
DatePattern
.
NORM_DATETIME_PATTERN
),
DateUtil
.
format
(
new
Date
(),
DatePattern
.
NORM_DATETIME_PATTERN
),
DateUtil
.
format
(
DateUtil
.
offsetMinute
(
new
Date
(),
1
),
DatePattern
.
NORM_DATETIME_PATTERN
),
"1"
,
DateUtil
.
format
(
DateUtil
.
offsetMinute
(
new
Date
(),
1
),
DatePattern
.
NORM_DATETIME_PATTERN
),
"1"
,
DeviceOpSourceEnum
.
DEVICE_SOURCE_20
.
getCode
());
DeviceOpSourceEnum
.
DEVICE_SOURCE_20
.
getCode
());
logger
.
info
(
"订单号为:"
+
sOrder
.
getOrderNo
()
+
"的订单距离结束时间还有15分钟"
);
logger
.
debug
(
"订单号为:"
+
sOrder
.
getOrderNo
()
+
"的订单距离结束时间还有15分钟"
);
// 从门店集合中判断门店id相同的门店对象
// 从门店集合中判断门店id相同的门店对象
SOrder
finalSOrder
=
sOrder
;
SOrder
finalSOrder
=
sOrder
;
SStore
sStore
=
sStoreList
.
stream
().
filter
(
item
->
item
.
getId
().
equals
(
finalSOrder
.
getStoreId
())).
findFirst
().
orElse
(
null
);
SStore
sStore
=
sStoreList
.
stream
().
filter
(
item
->
item
.
getId
().
equals
(
finalSOrder
.
getStoreId
())).
findFirst
().
orElse
(
null
);
...
@@ -270,7 +270,7 @@ public class RedisTask {
...
@@ -270,7 +270,7 @@ public class RedisTask {
smsService
.
sendSmsOrderEndRemind
(
sOrder
.
getConsumerPhone
(),
sStore
,
sRoom
);
smsService
.
sendSmsOrderEndRemind
(
sOrder
.
getConsumerPhone
(),
sStore
,
sRoom
);
//推送订单结束消息
//推送订单结束消息
wechatNewService
.
sendMiniSubscribeMessage
(
sOrder
,
MessageReminderEnum
.
END
);
wechatNewService
.
sendMiniSubscribeMessage
(
sOrder
,
MessageReminderEnum
.
END
);
logger
.
info
(
"保洁工单派单通知发送开始"
);
logger
.
debug
(
"保洁工单派单通知发送开始"
);
//通知保洁人员
//通知保洁人员
sConsumerService
.
selectListByStoreId
(
sOrder
.
getStoreId
()).
stream
().
forEach
(
item
->
{
sConsumerService
.
selectListByStoreId
(
sOrder
.
getStoreId
()).
stream
().
forEach
(
item
->
{
// 循环发送短信提示门店保洁打扫卫生
// 循环发送短信提示门店保洁打扫卫生
...
@@ -278,7 +278,7 @@ public class RedisTask {
...
@@ -278,7 +278,7 @@ public class RedisTask {
//公众号发送保洁工单派单通知
//公众号发送保洁工单派单通知
wechatNewService
.
sendPublicTemplateMessage
(
finalSOrder
,
MessageReminderEnum
.
CLEANING
,
item
.
getId
());
wechatNewService
.
sendPublicTemplateMessage
(
finalSOrder
,
MessageReminderEnum
.
CLEANING
,
item
.
getId
());
});
});
logger
.
info
(
"保洁工单派单通知发送结束"
);
logger
.
debug
(
"保洁工单派单通知发送结束"
);
return
;
return
;
}
}
//判断时间是否在5分钟到4分钟
//判断时间是否在5分钟到4分钟
...
@@ -288,7 +288,7 @@ public class RedisTask {
...
@@ -288,7 +288,7 @@ public class RedisTask {
DateUtil
.
format
(
new
Date
(),
DatePattern
.
NORM_DATETIME_PATTERN
),
DateUtil
.
format
(
new
Date
(),
DatePattern
.
NORM_DATETIME_PATTERN
),
DateUtil
.
format
(
DateUtil
.
offsetMinute
(
new
Date
(),
1
),
DatePattern
.
NORM_DATETIME_PATTERN
),
"1"
,
DateUtil
.
format
(
DateUtil
.
offsetMinute
(
new
Date
(),
1
),
DatePattern
.
NORM_DATETIME_PATTERN
),
"1"
,
DeviceOpSourceEnum
.
DEVICE_SOURCE_20
.
getCode
());
DeviceOpSourceEnum
.
DEVICE_SOURCE_20
.
getCode
());
logger
.
info
(
"订单号为:"
+
sOrder
.
getOrderNo
()
+
"的订单距离结束时间还有5分钟"
);
logger
.
debug
(
"订单号为:"
+
sOrder
.
getOrderNo
()
+
"的订单距离结束时间还有5分钟"
);
}
}
//判断是否过期
//判断是否过期
if
(
expirationTime
.
getTime
()
<
new
Date
().
getTime
())
{
if
(
expirationTime
.
getTime
()
<
new
Date
().
getTime
())
{
...
@@ -329,7 +329,7 @@ public class RedisTask {
...
@@ -329,7 +329,7 @@ public class RedisTask {
map
.
put
(
"expirationTime"
,
date
.
toString
());
map
.
put
(
"expirationTime"
,
date
.
toString
());
JSONObject
json
=
new
JSONObject
(
map
);
JSONObject
json
=
new
JSONObject
(
map
);
redisUtil
.
set
(
ReceiptRdeisEnum
.
ROOM_EXPIRE_TIME
.
getValue
()
+
sOrder
.
getOrderNo
(),
json
.
toString
());
redisUtil
.
set
(
ReceiptRdeisEnum
.
ROOM_EXPIRE_TIME
.
getValue
()
+
sOrder
.
getOrderNo
(),
json
.
toString
());
logger
.
info
(
"订单号为:"
+
sOrder
.
getOrderNo
()
+
"的订单已结束,更改订单状态为已使用"
);
logger
.
debug
(
"订单号为:"
+
sOrder
.
getOrderNo
()
+
"的订单已结束,更改订单状态为已使用"
);
}
}
});
});
...
@@ -375,7 +375,7 @@ public class RedisTask {
...
@@ -375,7 +375,7 @@ public class RedisTask {
//更改订单状态
//更改订单状态
sOrder
.
setStatus
(
OrderStatusEnum
.
USED
.
getCode
());
sOrder
.
setStatus
(
OrderStatusEnum
.
USED
.
getCode
());
isOrderService
.
updateById
(
sOrder
);
isOrderService
.
updateById
(
sOrder
);
logger
.
info
(
"订单号为:"
+
sOrder
.
getOrderNo
()
+
"的订单已有续单,更改订单状态为已使用"
);
logger
.
debug
(
"订单号为:"
+
sOrder
.
getOrderNo
()
+
"的订单已有续单,更改订单状态为已使用"
);
return
true
;
return
true
;
}
}
return
false
;
return
false
;
...
...
share-system/src/main/java/share/system/service/impl/DeviceOpServiceImpl.java
View file @
4fc9bda9
...
@@ -357,7 +357,7 @@ public class DeviceOpServiceImpl implements DeviceOpService {
...
@@ -357,7 +357,7 @@ public class DeviceOpServiceImpl implements DeviceOpService {
// 设置消息队列
// 设置消息队列
this
.
setRedisCache
(
device
.
getDevId
(),
mqttxVo
);
this
.
setRedisCache
(
device
.
getDevId
(),
mqttxVo
);
}
}
logger
.
info
(
"延时执行语音播报完成!"
);
logger
.
debug
(
"延时执行语音播报完成!"
);
}
catch
(
InterruptedException
e
)
{
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
...
@@ -400,7 +400,7 @@ public class DeviceOpServiceImpl implements DeviceOpService {
...
@@ -400,7 +400,7 @@ public class DeviceOpServiceImpl implements DeviceOpService {
mqttxVo
.
setSource
(
source
);
mqttxVo
.
setSource
(
source
);
// 设置消息队列
// 设置消息队列
this
.
setRedisCache
(
device
.
getDevId
(),
mqttxVo
);
this
.
setRedisCache
(
device
.
getDevId
(),
mqttxVo
);
logger
.
info
(
"延时执行开锁/关锁、取电/断电完成!"
);
logger
.
debug
(
"延时执行开锁/关锁、取电/断电完成!"
);
}
catch
(
InterruptedException
e
)
{
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
...
...
share-system/src/main/java/share/system/service/impl/OrderPayServiceImpl.java
View file @
4fc9bda9
...
@@ -129,7 +129,7 @@ public class OrderPayServiceImpl implements OrderPayService {
...
@@ -129,7 +129,7 @@ public class OrderPayServiceImpl implements OrderPayService {
CreateOrderRequestVo
unifiedorderVo
=
getUnifiedorderVo
(
sOrder
,
userToken
.
getToken
(),
appId
,
mchId
,
signKey
);
CreateOrderRequestVo
unifiedorderVo
=
getUnifiedorderVo
(
sOrder
,
userToken
.
getToken
(),
appId
,
mchId
,
signKey
);
// 预下单(统一下单)
// 预下单(统一下单)
CreateOrderResponseVo
responseVo
=
wechatNewService
.
payUnifiedorder
(
unifiedorderVo
);
CreateOrderResponseVo
responseVo
=
wechatNewService
.
payUnifiedorder
(
unifiedorderVo
);
logger
.
info
(
"CreateOrderResponseVo :"
,
JsonConvertUtil
.
write2JsonStr
(
responseVo
));
logger
.
debug
(
"CreateOrderResponseVo :"
,
JsonConvertUtil
.
write2JsonStr
(
responseVo
));
// 组装前端预下单参数
// 组装前端预下单参数
ConcurrentHashMap
<
String
,
String
>
map
=
new
ConcurrentHashMap
<>();
ConcurrentHashMap
<
String
,
String
>
map
=
new
ConcurrentHashMap
<>();
map
.
put
(
"appId"
,
unifiedorderVo
.
getAppid
());
map
.
put
(
"appId"
,
unifiedorderVo
.
getAppid
());
...
@@ -192,7 +192,7 @@ public class OrderPayServiceImpl implements OrderPayService {
...
@@ -192,7 +192,7 @@ public class OrderPayServiceImpl implements OrderPayService {
SaobeiMiniPayRequestVo
unifiedorderVo
=
getSaobeiUnifiedOrderVo
(
sOrder
,
userToken
.
getToken
(),
appId
,
mchId
,
signKey
);
SaobeiMiniPayRequestVo
unifiedorderVo
=
getSaobeiUnifiedOrderVo
(
sOrder
,
userToken
.
getToken
(),
appId
,
mchId
,
signKey
);
// 预下单(统一下单)
// 预下单(统一下单)
SaobeiMiniPayResponse
response
=
saobeiService
.
wechatMinipay
(
unifiedorderVo
);
SaobeiMiniPayResponse
response
=
saobeiService
.
wechatMinipay
(
unifiedorderVo
);
logger
.
info
(
"SaobeiMiniPayResponse :"
,
JsonConvertUtil
.
write2JsonStr
(
response
));
logger
.
debug
(
"SaobeiMiniPayResponse :"
,
JsonConvertUtil
.
write2JsonStr
(
response
));
// 组装前端预下单参数
// 组装前端预下单参数
ConcurrentHashMap
<
String
,
String
>
map
=
new
ConcurrentHashMap
<>();
ConcurrentHashMap
<
String
,
String
>
map
=
new
ConcurrentHashMap
<>();
map
.
put
(
"appId"
,
response
.
getAppId
());
map
.
put
(
"appId"
,
response
.
getAppId
());
...
@@ -279,7 +279,7 @@ public class OrderPayServiceImpl implements OrderPayService {
...
@@ -279,7 +279,7 @@ public class OrderPayServiceImpl implements OrderPayService {
// SaobeiMiniPayRequestVo unifiedorderVo = getSaobeiUnifiedRechargeVo(recharge, userToken.getToken(), appId, mchId, signKey);
// SaobeiMiniPayRequestVo unifiedorderVo = getSaobeiUnifiedRechargeVo(recharge, userToken.getToken(), appId, mchId, signKey);
// // 预下单(统一下单)
// // 预下单(统一下单)
// SaobeiMiniPayResponse response = saobeiService.wechatMinipay(unifiedorderVo);
// SaobeiMiniPayResponse response = saobeiService.wechatMinipay(unifiedorderVo);
// logger.
info
("SaobeiMiniPayResponse :", JsonConvertUtil.write2JsonStr(response));
// logger.
debug
("SaobeiMiniPayResponse :", JsonConvertUtil.write2JsonStr(response));
// // 组装前端预下单参数
// // 组装前端预下单参数
// ConcurrentHashMap<String, String> map = new ConcurrentHashMap<>();
// ConcurrentHashMap<String, String> map = new ConcurrentHashMap<>();
// map.put("appId", response.getAppId());
// map.put("appId", response.getAppId());
...
...
share-system/src/main/java/share/system/service/impl/QPServiceImpl.java
View file @
4fc9bda9
...
@@ -232,8 +232,8 @@ public class QPServiceImpl implements QPService {
...
@@ -232,8 +232,8 @@ public class QPServiceImpl implements QPService {
if
(
Boolean
.
FALSE
.
equals
(
b
))
{
if
(
Boolean
.
FALSE
.
equals
(
b
))
{
throw
new
RuntimeException
(
"请联系管理员"
);
throw
new
RuntimeException
(
"请联系管理员"
);
}
}
logger
.
info
(
"code:{}"
,
code
);
logger
.
debug
(
"code:{}"
,
code
);
logger
.
info
(
"验卷准备开始"
);
logger
.
debug
(
"验卷准备开始"
);
String
o
=
redisUtil
.
get
(
ReceiptRdeisEnum
.
MT_SESSION_KEY
.
getValue
());
String
o
=
redisUtil
.
get
(
ReceiptRdeisEnum
.
MT_SESSION_KEY
.
getValue
());
JSONObject
sessionKey
=
new
JSONObject
(
o
);
JSONObject
sessionKey
=
new
JSONObject
(
o
);
String
session
=
(
String
)
sessionKey
.
get
(
"access_token"
);
String
session
=
(
String
)
sessionKey
.
get
(
"access_token"
);
...
@@ -245,7 +245,7 @@ public class QPServiceImpl implements QPService {
...
@@ -245,7 +245,7 @@ public class QPServiceImpl implements QPService {
logger
.
error
(
"验卷准备失败:{}"
,
invoke
.
getMsg
());
logger
.
error
(
"验卷准备失败:{}"
,
invoke
.
getMsg
());
throw
new
RuntimeException
(
invoke
.
getMsg
());
throw
new
RuntimeException
(
invoke
.
getMsg
());
}
}
logger
.
info
(
"验卷准备结束:{}"
,
invoke
.
getData
().
toString
());
logger
.
debug
(
"验卷准备结束:{}"
,
invoke
.
getData
().
toString
());
return
invoke
.
getData
();
return
invoke
.
getData
();
}
}
...
@@ -256,8 +256,8 @@ public class QPServiceImpl implements QPService {
...
@@ -256,8 +256,8 @@ public class QPServiceImpl implements QPService {
@Override
@Override
public
List
<
TuangouReceiptConsumeResponseEntity
>
consume
(
String
code
,
int
count
,
String
openShopUuid
,
String
status
)
{
public
List
<
TuangouReceiptConsumeResponseEntity
>
consume
(
String
code
,
int
count
,
String
openShopUuid
,
String
status
)
{
String
o
=
redisUtil
.
get
(
ReceiptRdeisEnum
.
MT_SESSION_KEY
.
getValue
());
String
o
=
redisUtil
.
get
(
ReceiptRdeisEnum
.
MT_SESSION_KEY
.
getValue
());
logger
.
info
(
"code:{}"
,
code
);
logger
.
debug
(
"code:{}"
,
code
);
logger
.
info
(
"验卷开始"
);
logger
.
debug
(
"验卷开始"
);
JSONObject
sessionKey
=
new
JSONObject
(
o
);
JSONObject
sessionKey
=
new
JSONObject
(
o
);
String
session
=
(
String
)
sessionKey
.
get
(
"access_token"
);
String
session
=
(
String
)
sessionKey
.
get
(
"access_token"
);
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
...
@@ -279,7 +279,7 @@ public class QPServiceImpl implements QPService {
...
@@ -279,7 +279,7 @@ public class QPServiceImpl implements QPService {
throw
new
RuntimeException
(
invoke
.
getMsg
());
throw
new
RuntimeException
(
invoke
.
getMsg
());
}
}
redisUtil
.
delete
(
ReceiptRdeisEnum
.
PREPARE
.
getValue
()
+
code
);
redisUtil
.
delete
(
ReceiptRdeisEnum
.
PREPARE
.
getValue
()
+
code
);
logger
.
info
(
"验卷结束:{}"
,
invoke
.
getData
());
logger
.
debug
(
"验卷结束:{}"
,
invoke
.
getData
());
return
invoke
.
getData
();
return
invoke
.
getData
();
}
}
...
...
share-system/src/main/java/share/system/service/impl/SConsumerCenterServiceImpl.java
View file @
4fc9bda9
...
@@ -79,13 +79,13 @@ public class SConsumerCenterServiceImpl extends ServiceImpl<SConsumerMapper, SCo
...
@@ -79,13 +79,13 @@ public class SConsumerCenterServiceImpl extends ServiceImpl<SConsumerMapper, SCo
public
LoginResponse
weChatAuthorizeProgramLogin
(
String
code
,
RegisterThirdSConsumerRequest
request
)
{
public
LoginResponse
weChatAuthorizeProgramLogin
(
String
code
,
RegisterThirdSConsumerRequest
request
)
{
//访问微信小程序的API 通过 code 来获取 用户信息
//访问微信小程序的API 通过 code 来获取 用户信息
WeChatMiniAuthorizeVo
response
=
wechatNewService
.
miniAuthCode
(
code
);
WeChatMiniAuthorizeVo
response
=
wechatNewService
.
miniAuthCode
(
code
);
logger
.
info
(
"小程序登陆成功 = "
+
JSON
.
toJSONString
(
response
));
logger
.
debug
(
"小程序登陆成功 = "
+
JSON
.
toJSONString
(
response
));
logger
.
info
(
"小程序登陆成功 = OpenId "
+
response
.
getOpenId
());
logger
.
debug
(
"小程序登陆成功 = OpenId "
+
response
.
getOpenId
());
//检测是否存在
//检测是否存在
SConsumerToken
sConsumerToken
=
sConsumerTokenService
.
getByOpenid
(
response
.
getOpenId
());
SConsumerToken
sConsumerToken
=
sConsumerTokenService
.
getByOpenid
(
response
.
getOpenId
());
LoginResponse
loginResponse
=
new
LoginResponse
();
LoginResponse
loginResponse
=
new
LoginResponse
();
if
(
ObjectUtil
.
isNotNull
(
sConsumerToken
))
{
// 已存在,正常登录
if
(
ObjectUtil
.
isNotNull
(
sConsumerToken
))
{
// 已存在,正常登录
logger
.
info
(
"小程序登陆成功 = Id "
+
sConsumerToken
.
getUid
());
logger
.
debug
(
"小程序登陆成功 = Id "
+
sConsumerToken
.
getUid
());
SConsumer
sConsumer
=
sConsumerService
.
getById
(
sConsumerToken
.
getUid
());
SConsumer
sConsumer
=
sConsumerService
.
getById
(
sConsumerToken
.
getUid
());
if
(
sConsumer
==
null
||
sConsumer
.
getStatus
()
==
0
)
{
if
(
sConsumer
==
null
||
sConsumer
.
getStatus
()
==
0
)
{
throw
new
BaseException
(
"当前账户已禁用,请联系管理员!"
);
throw
new
BaseException
(
"当前账户已禁用,请联系管理员!"
);
...
...
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
4fc9bda9
...
@@ -945,14 +945,14 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -945,14 +945,14 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
sConsumer
.
setPosition
(
3
);
sConsumer
.
setPosition
(
3
);
List
<
SConsumer
>
consumers
=
sConsumerService
.
selectAllocatedList
(
sConsumer
);
List
<
SConsumer
>
consumers
=
sConsumerService
.
selectAllocatedList
(
sConsumer
);
if
(
consumers
.
size
()
>
0
)
{
if
(
consumers
.
size
()
>
0
)
{
logger
.
info
(
"订单预订成功通知发送开始"
);
logger
.
debug
(
"订单预订成功通知发送开始"
);
consumers
.
forEach
(
o
->
{
consumers
.
forEach
(
o
->
{
phones
.
add
(
o
.
getPhone
());
phones
.
add
(
o
.
getPhone
());
//公众号发送订单预订成功通知
//公众号发送订单预订成功通知
wechatNewService
.
sendPublicTemplateMessage
(
sOrder
,
MessageReminderEnum
.
ORDER_RESERVE
,
o
.
getId
());
wechatNewService
.
sendPublicTemplateMessage
(
sOrder
,
MessageReminderEnum
.
ORDER_RESERVE
,
o
.
getId
());
});
});
smsService
.
sendSmsOrderPredetermine
(
phones
,
sOrder
,
sStore
,
room
);
smsService
.
sendSmsOrderPredetermine
(
phones
,
sOrder
,
sStore
,
room
);
logger
.
info
(
"订单预订成功通知发送结束"
);
logger
.
debug
(
"订单预订成功通知发送结束"
);
}
}
}
}
return
response
;
return
response
;
...
@@ -1460,14 +1460,14 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -1460,14 +1460,14 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
sConsumer
.
setPosition
(
3
);
sConsumer
.
setPosition
(
3
);
List
<
SConsumer
>
consumers
=
sConsumerService
.
selectAllocatedList
(
sConsumer
);
List
<
SConsumer
>
consumers
=
sConsumerService
.
selectAllocatedList
(
sConsumer
);
if
(
consumers
.
size
()
>
0
)
{
if
(
consumers
.
size
()
>
0
)
{
logger
.
info
(
"订单预订成功通知发送开始"
);
logger
.
debug
(
"订单预订成功通知发送开始"
);
consumers
.
forEach
(
o
->{
consumers
.
forEach
(
o
->{
phones
.
add
(
o
.
getPhone
());
phones
.
add
(
o
.
getPhone
());
//公众号发送订单预订成功通知
//公众号发送订单预订成功通知
wechatNewService
.
sendPublicTemplateMessage
(
sOrder
,
MessageReminderEnum
.
ORDER_RESERVE
,
o
.
getId
());
wechatNewService
.
sendPublicTemplateMessage
(
sOrder
,
MessageReminderEnum
.
ORDER_RESERVE
,
o
.
getId
());
});
});
smsService
.
sendSmsOrderPredetermine
(
phones
,
sOrder
,
sStore
,
sRoom
);
smsService
.
sendSmsOrderPredetermine
(
phones
,
sOrder
,
sStore
,
sRoom
);
logger
.
info
(
"订单预订成功通知发送结束"
);
logger
.
debug
(
"订单预订成功通知发送结束"
);
}
}
}
}
...
...
share-system/src/main/java/share/system/service/impl/WechatNewServiceImpl.java
View file @
4fc9bda9
...
@@ -792,7 +792,7 @@ public class WechatNewServiceImpl implements WechatNewService {
...
@@ -792,7 +792,7 @@ public class WechatNewServiceImpl implements WechatNewService {
String
accessToken
=
getPublicAccessToken
();
String
accessToken
=
getPublicAccessToken
();
String
url
=
StrUtil
.
format
(
WeChatConstants
.
WECHAT_PUBLIC_MENU_CREATE_URL
,
accessToken
);
String
url
=
StrUtil
.
format
(
WeChatConstants
.
WECHAT_PUBLIC_MENU_CREATE_URL
,
accessToken
);
String
result
=
restTemplateUtil
.
postJsonData
(
url
,
JSONObject
.
parseObject
(
data
));
String
result
=
restTemplateUtil
.
postJsonData
(
url
,
JSONObject
.
parseObject
(
data
));
logger
.
info
(
"微信消息发送结果:"
+
result
);
logger
.
debug
(
"微信消息发送结果:"
+
result
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
result
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
result
);
if
(
ObjectUtil
.
isNull
(
jsonObject
))
{
if
(
ObjectUtil
.
isNull
(
jsonObject
))
{
throw
new
BaseException
(
"微信平台接口异常,没任何数据返回!"
);
throw
new
BaseException
(
"微信平台接口异常,没任何数据返回!"
);
...
...
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