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
0d9671cc
Commit
0d9671cc
authored
Mar 07, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改设备日志操作人查询异常
parent
63567dc5
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
5 deletions
+30
-5
SConsumerCouponServiceImpl.java
...share/system/service/impl/SConsumerCouponServiceImpl.java
+1
-1
SCouponServiceImpl.java
...in/java/share/system/service/impl/SCouponServiceImpl.java
+1
-1
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+27
-3
DeviceLogMapper.xml
...stem/src/main/resources/mapper/system/DeviceLogMapper.xml
+1
-0
No files found.
share-system/src/main/java/share/system/service/impl/SConsumerCouponServiceImpl.java
View file @
0d9671cc
...
@@ -410,7 +410,7 @@ public class SConsumerCouponServiceImpl extends ServiceImpl<SConsumerCouponMappe
...
@@ -410,7 +410,7 @@ public class SConsumerCouponServiceImpl extends ServiceImpl<SConsumerCouponMappe
if
(
insert
>
0
)
{
if
(
insert
>
0
)
{
//优惠券数量减一
//优惠券数量减一
sCoupon
.
setNumber
(
sCoupon
.
getNumber
()
-
1
);
sCoupon
.
setNumber
(
sCoupon
.
getNumber
()
-
1
);
sCouponService
.
update
SCoupon
(
sCoupon
);
sCouponService
.
update
ById
(
sCoupon
);
}
}
return
insert
;
return
insert
;
}
}
...
...
share-system/src/main/java/share/system/service/impl/SCouponServiceImpl.java
View file @
0d9671cc
...
@@ -142,7 +142,7 @@ public class SCouponServiceImpl extends ServiceImpl<SCouponMapper, SCoupon> impl
...
@@ -142,7 +142,7 @@ public class SCouponServiceImpl extends ServiceImpl<SCouponMapper, SCoupon> impl
wrapper
.
eq
(
SCoupon:
:
getTiktokSkuId
,
sCoupon
.
getTiktokSkuId
());
wrapper
.
eq
(
SCoupon:
:
getTiktokSkuId
,
sCoupon
.
getTiktokSkuId
());
sCouponList
=
sCouponMapper
.
selectOne
(
wrapper
);
sCouponList
=
sCouponMapper
.
selectOne
(
wrapper
);
}
}
if
(
ObjectUtils
.
isEmpty
(
sCouponList
)
||
sCoupon
List
.
getId
().
equals
(
sCoupon
.
getId
()))
{
if
(
ObjectUtils
.
isEmpty
(
sCouponList
)
||
sCoupon
.
getId
().
equals
(
sCouponList
.
getId
()))
{
return
sCouponMapper
.
updateSCoupon
(
sCoupon
);
return
sCouponMapper
.
updateSCoupon
(
sCoupon
);
}
else
{
}
else
{
throw
new
RuntimeException
(
"该团购已存在"
);
throw
new
RuntimeException
(
"该团购已存在"
);
...
...
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
0d9671cc
...
@@ -117,6 +117,8 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -117,6 +117,8 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
@Autowired
@Autowired
private
OrderRefundArtificialService
orderRefundArtificialService
;
private
OrderRefundArtificialService
orderRefundArtificialService
;
@Autowired
private
RedisUtil
redisUtils
;
private
final
static
Long
FIVE
=
5
l
;
private
final
static
Long
FIVE
=
5
l
;
...
@@ -427,17 +429,39 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -427,17 +429,39 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
sOrder
.
setRefundReason
(
request
.
getRefundReason
());
sOrder
.
setRefundReason
(
request
.
getRefundReason
());
this
.
updateById
(
sOrder
);
this
.
updateById
(
sOrder
);
}
}
redisUtil
.
delete
(
ReceiptRdeisEnum
.
ORDER_NO
.
getValue
()
+
sOrder
.
getOrderNo
());
redisUtil
.
delete
(
ReceiptRdeisEnum
.
ORDER_NO_KEY
.
getValue
()
+
sOrder
.
getOrderNo
());
if
(
sOrder
.
getOrderType
().
equals
(
OrderTypeEnum
.
RESERVER
.
getCode
()))
{
LambdaQueryWrapper
<
SOrder
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
SOrder
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
SOrder:
:
getRoomId
,
sOrder
.
getRoomId
());
queryWrapper
.
eq
(
SOrder:
:
getRoomId
,
sOrder
.
getRoomId
());
queryWrapper
.
eq
(
SOrder:
:
getStatus
,
OrderStatusEnum
.
INUSE
.
getCode
());
queryWrapper
.
eq
(
SOrder:
:
getStatus
,
OrderStatusEnum
.
INUSE
.
getCode
());
List
<
SOrder
>
list
=
list
(
queryWrapper
);
List
<
SOrder
>
list
=
list
(
queryWrapper
);
if
(
CollectionUtils
.
isEmpty
(
list
))
{
if
(
CollectionUtils
.
isEmpty
(
list
)
|
sOrder
.
getStatus
().
equals
(
OrderStatusEnum
.
INUSE
.
getCode
()
))
{
// 使用中订单断电, 延时3分钟断电
// 使用中订单断电, 延时3分钟断电
deviceOpService
.
openOrCloseDevice
(
sOrder
.
getRoomId
(),
sOrder
.
getConsumerPhone
(),
deviceOpService
.
openOrCloseDevice
(
sOrder
.
getRoomId
(),
sOrder
.
getConsumerPhone
(),
OpTypeEnum
.
CUT_ELECTRIC
.
getCode
(),
true
,
180
);
OpTypeEnum
.
CUT_ELECTRIC
.
getCode
(),
true
,
180
);
}
}
redisUtil
.
delete
(
ReceiptRdeisEnum
.
ORDER_NO
.
getValue
()
+
sOrder
.
getOrderNo
());
}
else
if
(
sOrder
.
getOrderType
().
equals
(
OrderTypeEnum
.
RENEW
.
getCode
()))
{
redisUtil
.
delete
(
ReceiptRdeisEnum
.
ORDER_NO_KEY
.
getValue
()
+
sOrder
.
getOrderNo
());
//查询续单的前预定单
Date
preStartDate
=
sOrder
.
getPreStartDate
();
//查询预定的结束时间是否在续单的开始时间之后和开始时间加一分钟前
LambdaQueryWrapper
<
SOrder
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
SOrder:
:
getRoomId
,
sOrder
.
getRoomId
());
queryWrapper
.
between
(
SOrder:
:
getEndDate
,
preStartDate
,
cn
.
hutool
.
core
.
date
.
DateUtil
.
offsetMinute
(
preStartDate
,
1
));
SOrder
one
=
getOne
(
queryWrapper
);
if
(
one
.
getStatus
().
equals
(
OrderStatusEnum
.
USED
.
getCode
()))
{
// 使用中订单断电, 延时3分钟断电
deviceOpService
.
openOrCloseDevice
(
sOrder
.
getRoomId
(),
sOrder
.
getConsumerPhone
(),
OpTypeEnum
.
CUT_ELECTRIC
.
getCode
(),
true
,
180
);
}
else
if
(
one
.
getStatus
().
equals
(
OrderStatusEnum
.
INUSE
.
getCode
()))
{
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"orderNo"
,
one
.
getOrderNo
());
map
.
put
(
"expirationTime"
,
one
.
getEndDate
().
toString
());
JSONObject
jsonObject
=
new
JSONObject
(
map
);
redisUtils
.
set
(
ReceiptRdeisEnum
.
ORDER_NO_KEY
.
getValue
()
+
one
.
getOrderNo
(),
jsonObject
.
toString
());
}
}
// 生成退款人工退款记录
// 生成退款人工退款记录
return
orderRefundArtificialService
.
insertOrderRefundArtificial
(
artificial
);
return
orderRefundArtificialService
.
insertOrderRefundArtificial
(
artificial
);
}
}
...
...
share-system/src/main/resources/mapper/system/DeviceLogMapper.xml
View file @
0d9671cc
...
@@ -64,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -64,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"topic != null and topic != ''"
>
and t1.topic = #{topic}
</if>
<if
test=
"topic != null and topic != ''"
>
and t1.topic = #{topic}
</if>
<if
test=
"storeId != null"
>
and t4.id = #{storeId}
</if>
<if
test=
"storeId != null"
>
and t4.id = #{storeId}
</if>
<if
test=
"roomId != null"
>
and t3.id = #{roomId}
</if>
<if
test=
"roomId != null"
>
and t3.id = #{roomId}
</if>
<if
test=
"createBy != null and createBy != ''"
>
and t1.create_by = #{createBy}
</if>
</where>
</where>
order by create_time desc
order by create_time desc
</select>
</select>
...
...
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