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
3ccddc38
Commit
3ccddc38
authored
Jan 09, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优惠卷和优惠卷领取记录表增加订单类型,指定套餐id,订单表新增到店时间,修改用户开门判断
parent
3a137006
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
67 additions
and
9 deletions
+67
-9
SConsumerCoupon.java
...em/src/main/java/share/system/domain/SConsumerCoupon.java
+12
-0
SCoupon.java
share-system/src/main/java/share/system/domain/SCoupon.java
+12
-0
SOrder.java
share-system/src/main/java/share/system/domain/SOrder.java
+7
-0
SCouponMapper.java
...stem/src/main/java/share/system/mapper/SCouponMapper.java
+1
-1
ISCouponService.java
...m/src/main/java/share/system/service/ISCouponService.java
+1
-1
QPServiceImpl.java
...rc/main/java/share/system/service/impl/QPServiceImpl.java
+2
-2
SCouponServiceImpl.java
...in/java/share/system/service/impl/SCouponServiceImpl.java
+2
-2
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+2
-1
SConsumerCouponMapper.xml
...rc/main/resources/mapper/system/SConsumerCouponMapper.xml
+13
-1
SCouponMapper.xml
...system/src/main/resources/mapper/system/SCouponMapper.xml
+15
-1
No files found.
share-system/src/main/java/share/system/domain/SConsumerCoupon.java
View file @
3ccddc38
...
@@ -96,6 +96,18 @@ public class SConsumerCoupon extends BaseEntity
...
@@ -96,6 +96,18 @@ public class SConsumerCoupon extends BaseEntity
@Excel
(
name
=
"优惠券来源(1:领取,2:赠送,3:验券)"
)
@Excel
(
name
=
"优惠券来源(1:领取,2:赠送,3:验券)"
)
private
String
sourceType
;
private
String
sourceType
;
/**
* 订单类型(0:订房订单,1:续房订单,2:充值订单)
*/
@Excel
(
name
=
"订单类型(1:订房订单,2:续房订单,3:充值订单)"
)
private
Integer
orderType
;
/**
* 绑定套餐ID
*/
@Excel
(
name
=
"绑定套餐ID"
)
private
Long
packageId
;
/** 平台类型(1:自营,2:美团) */
/** 平台类型(1:自营,2:美团) */
@Excel
(
name
=
"平台类型(1:自营,2:美团)"
)
@Excel
(
name
=
"平台类型(1:自营,2:美团)"
)
private
String
platformType
;
private
String
platformType
;
...
...
share-system/src/main/java/share/system/domain/SCoupon.java
View file @
3ccddc38
...
@@ -83,6 +83,18 @@ public class SCoupon extends BaseEntity
...
@@ -83,6 +83,18 @@ public class SCoupon extends BaseEntity
@Excel
(
name
=
"减去金额(满减券单位:元,折扣为系数)"
)
@Excel
(
name
=
"减去金额(满减券单位:元,折扣为系数)"
)
private
BigDecimal
subPrice
;
private
BigDecimal
subPrice
;
/**
* 订单类型(0:订房订单,1:续房订单,2:充值订单)
*/
@Excel
(
name
=
"订单类型(1:订房订单,2:续房订单,3:充值订单)"
)
private
Integer
orderType
;
/**
* 绑定套餐ID
*/
@Excel
(
name
=
"绑定套餐ID"
)
private
Long
packageId
;
/** 是否可叠加使用(0:不可叠加,1:可叠加) */
/** 是否可叠加使用(0:不可叠加,1:可叠加) */
@Excel
(
name
=
"是否可叠加使用(0:不可叠加,1:可叠加)"
)
@Excel
(
name
=
"是否可叠加使用(0:不可叠加,1:可叠加)"
)
private
Integer
isOverlay
;
private
Integer
isOverlay
;
...
...
share-system/src/main/java/share/system/domain/SOrder.java
View file @
3ccddc38
...
@@ -112,6 +112,13 @@ public class SOrder extends BaseEntity
...
@@ -112,6 +112,13 @@ public class SOrder extends BaseEntity
@Excel
(
name
=
"结束时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm"
)
@Excel
(
name
=
"结束时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm"
)
private
Date
endDate
;
private
Date
endDate
;
/**
* 到店时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Excel
(
name
=
"到店时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
arrivalTime
;
/** 订单状态(0:待使用/已预约,1:使用中,2:已使用,3:已取消预约/退款中,4:审核中,5:已退费) */
/** 订单状态(0:待使用/已预约,1:使用中,2:已使用,3:已取消预约/退款中,4:审核中,5:已退费) */
@Excel
(
name
=
"订单状态(0:待使用/已预约,1:使用中,2:已使用,3:已取消预约/申请退款,4:退款中,5:已退费)"
)
@Excel
(
name
=
"订单状态(0:待使用/已预约,1:使用中,2:已使用,3:已取消预约/申请退款,4:退款中,5:已退费)"
)
private
Integer
status
;
private
Integer
status
;
...
...
share-system/src/main/java/share/system/mapper/SCouponMapper.java
View file @
3ccddc38
...
@@ -59,5 +59,5 @@ public interface SCouponMapper
...
@@ -59,5 +59,5 @@ public interface SCouponMapper
*/
*/
public
int
deleteSCouponByIds
(
Long
[]
ids
);
public
int
deleteSCouponByIds
(
Long
[]
ids
);
SCoupon
selectSCouponByName
(
String
dealTitle
);
List
<
SCoupon
>
selectSCouponByName
(
String
dealTitle
);
}
}
share-system/src/main/java/share/system/service/ISCouponService.java
View file @
3ccddc38
...
@@ -64,5 +64,5 @@ public interface ISCouponService
...
@@ -64,5 +64,5 @@ public interface ISCouponService
* @param dealTitle 优惠券名称
* @param dealTitle 优惠券名称
* @return 结果
* @return 结果
*/
*/
SCoupon
selectSCouponByName
(
String
dealTitle
);
List
<
SCoupon
>
selectSCouponByName
(
String
dealTitle
);
}
}
share-system/src/main/java/share/system/service/impl/QPServiceImpl.java
View file @
3ccddc38
...
@@ -101,8 +101,8 @@ public class QPServiceImpl implements QPService {
...
@@ -101,8 +101,8 @@ public class QPServiceImpl implements QPService {
return
null
;
return
null
;
}
}
}
}
//根据优惠卷名称查询优惠劵配置
//根据优惠卷名称查询优惠劵配置
查询list,取第一个
SCoupon
sCoupon
=
isCouponService
.
selectSCouponByName
(
prepare
.
getDeal_title
());
SCoupon
sCoupon
=
isCouponService
.
selectSCouponByName
(
prepare
.
getDeal_title
())
.
get
(
0
)
;
TuangouReceiptPrepareResponseEntityVo
response
=
new
TuangouReceiptPrepareResponseEntityVo
();
TuangouReceiptPrepareResponseEntityVo
response
=
new
TuangouReceiptPrepareResponseEntityVo
();
SConsumerCoupon
sConsumerCoupon
=
new
SConsumerCoupon
();
SConsumerCoupon
sConsumerCoupon
=
new
SConsumerCoupon
();
sConsumerCoupon
.
setConsumerId
(
user
.
getId
());
sConsumerCoupon
.
setConsumerId
(
user
.
getId
());
...
...
share-system/src/main/java/share/system/service/impl/SCouponServiceImpl.java
View file @
3ccddc38
...
@@ -20,7 +20,7 @@ import share.system.service.ISCouponService;
...
@@ -20,7 +20,7 @@ import share.system.service.ISCouponService;
* @date 2023-09-27
* @date 2023-09-27
*/
*/
@Service
@Service
public
class
SCouponServiceImpl
implements
ISCouponService
public
class
SCouponServiceImpl
implements
ISCouponService
{
{
@Autowired
@Autowired
private
SCouponMapper
sCouponMapper
;
private
SCouponMapper
sCouponMapper
;
...
@@ -124,7 +124,7 @@ public class SCouponServiceImpl implements ISCouponService
...
@@ -124,7 +124,7 @@ public class SCouponServiceImpl implements ISCouponService
* @return
* @return
*/
*/
@Override
@Override
public
SCoupon
selectSCouponByName
(
String
dealTitle
)
{
public
List
<
SCoupon
>
selectSCouponByName
(
String
dealTitle
)
{
return
sCouponMapper
.
selectSCouponByName
(
dealTitle
);
return
sCouponMapper
.
selectSCouponByName
(
dealTitle
);
}
}
}
}
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
3ccddc38
...
@@ -933,7 +933,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -933,7 +933,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
).
collect
(
Collectors
.
toList
()).
isEmpty
())
{
).
collect
(
Collectors
.
toList
()).
isEmpty
())
{
throw
new
BaseException
(
"房间取电设备不存在!"
);
throw
new
BaseException
(
"房间取电设备不存在!"
);
}
}
if
(
sOrder
.
getStatus
().
equals
(
OrderStatusEnum
.
UNUSED
.
getCod
e
()))
{
if
(
ObjectUtil
.
isNotEmpty
(
sOrder
.
getArrivalTim
e
()))
{
if
(
RoomStatusEnum
.
HOLD
.
getValue
().
compareTo
(
sRoomVo
.
getStatus
())==
0
if
(
RoomStatusEnum
.
HOLD
.
getValue
().
compareTo
(
sRoomVo
.
getStatus
())==
0
||!
checkOrderOpenDoor
(
sOrder
))
{
||!
checkOrderOpenDoor
(
sOrder
))
{
throw
new
BaseException
(
"房间当前时段已被占用不可开门!"
);
throw
new
BaseException
(
"房间当前时段已被占用不可开门!"
);
...
@@ -954,6 +954,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -954,6 +954,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
map
.
put
(
"expirationTime"
,
sOrder
.
getEndDate
().
toString
());
map
.
put
(
"expirationTime"
,
sOrder
.
getEndDate
().
toString
());
JSONObject
jsonObject
=
new
JSONObject
(
map
);
JSONObject
jsonObject
=
new
JSONObject
(
map
);
redisUtils
.
set
(
ReceiptRdeisEnum
.
ORDER_NO_KEY
.
getValue
()
+
sOrder
.
getOrderNo
(),
jsonObject
.
toString
());
redisUtils
.
set
(
ReceiptRdeisEnum
.
ORDER_NO_KEY
.
getValue
()
+
sOrder
.
getOrderNo
(),
jsonObject
.
toString
());
sOrder
.
setArrivalTime
(
new
Date
());
baseMapper
.
updateById
(
sOrder
);
baseMapper
.
updateById
(
sOrder
);
//更改房间状态
//更改房间状态
SRoom
sRoom
=
new
SRoom
();
SRoom
sRoom
=
new
SRoom
();
...
...
share-system/src/main/resources/mapper/system/SConsumerCouponMapper.xml
View file @
3ccddc38
...
@@ -22,6 +22,8 @@
...
@@ -22,6 +22,8 @@
<result
property=
"sourceType"
column=
"source_type"
/>
<result
property=
"sourceType"
column=
"source_type"
/>
<result
property=
"roomType"
column=
"room_type"
/>
<result
property=
"roomType"
column=
"room_type"
/>
<result
property=
"storeType"
column=
"store_type"
/>
<result
property=
"storeType"
column=
"store_type"
/>
<result
property=
"orderType"
column=
"order_type"
/>
<result
property=
"packageId"
column=
"package_id"
/>
<result
property=
"platformType"
column=
"platform_type"
/>
<result
property=
"platformType"
column=
"platform_type"
/>
<result
property=
"startDate"
column=
"start_date"
/>
<result
property=
"startDate"
column=
"start_date"
/>
<result
property=
"endDate"
column=
"end_date"
/>
<result
property=
"endDate"
column=
"end_date"
/>
...
@@ -67,7 +69,9 @@
...
@@ -67,7 +69,9 @@
delete_time,
delete_time,
remark,
remark,
room_type,
room_type,
store_type
store_type,
order_type,
package_id
from s_consumer_coupon
from s_consumer_coupon
</sql>
</sql>
...
@@ -89,6 +93,8 @@
...
@@ -89,6 +93,8 @@
<if
test=
"subPrice != null "
>
and sub_price = #{subPrice}
</if>
<if
test=
"subPrice != null "
>
and sub_price = #{subPrice}
</if>
<if
test=
"sourceType != null and sourceType != ''"
>
and source_type = #{sourceType}
</if>
<if
test=
"sourceType != null and sourceType != ''"
>
and source_type = #{sourceType}
</if>
<if
test=
"platformType != null and platformType != ''"
>
and platform_type = #{platformType}
</if>
<if
test=
"platformType != null and platformType != ''"
>
and platform_type = #{platformType}
</if>
<if
test=
"orderType != null and orderType != ''"
>
and order_type = #{orderType}
</if>
<if
test=
"packageId != null "
>
and package_id = #{packageId}
</if>
<if
test=
"startDate != null "
>
and start_date = #{startDate}
</if>
<if
test=
"startDate != null "
>
and start_date = #{startDate}
</if>
<if
test=
"endDate != null "
>
and end_date = #{endDate}
</if>
<if
test=
"endDate != null "
>
and end_date = #{endDate}
</if>
<if
test=
"useDate != null "
>
and use_date = #{useDate}
</if>
<if
test=
"useDate != null "
>
and use_date = #{useDate}
</if>
...
@@ -150,6 +156,8 @@
...
@@ -150,6 +156,8 @@
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"roomType != null"
>
room_type,
</if>
<if
test=
"roomType != null"
>
room_type,
</if>
<if
test=
"storeType != null"
>
store_type,
</if>
<if
test=
"storeType != null"
>
store_type,
</if>
<if
test=
"orderType != null"
>
order_type,
</if>
<if
test=
"packageId != null"
>
package_id,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"consumerId != null"
>
#{consumerId},
</if>
<if
test=
"consumerId != null"
>
#{consumerId},
</if>
...
@@ -181,6 +189,8 @@
...
@@ -181,6 +189,8 @@
<if
test=
"remark != null"
>
#{remark},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
<if
test=
"roomType != null"
>
#{roomType},
</if>
<if
test=
"roomType != null"
>
#{roomType},
</if>
<if
test=
"storeType != null"
>
#{storeType},
</if>
<if
test=
"storeType != null"
>
#{storeType},
</if>
<if
test=
"orderType != null"
>
#{orderType},
</if>
<if
test=
"packageId != null"
>
#{packageId},
</if>
</trim>
</trim>
</insert>
</insert>
...
@@ -216,6 +226,8 @@
...
@@ -216,6 +226,8 @@
<if
test=
"remark != null"
>
remark = #{remark},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
<if
test=
"roomType != null"
>
room_type = #{roomType},
</if>
<if
test=
"roomType != null"
>
room_type = #{roomType},
</if>
<if
test=
"storeType != null"
>
store_type = #{storeType},
</if>
<if
test=
"storeType != null"
>
store_type = #{storeType},
</if>
<if
test=
"orderType != null"
>
order_type = #{orderType},
</if>
<if
test=
"packageId != null"
>
package_id = #{packageId},
</if>
</trim>
</trim>
where id = #{id}
where id = #{id}
</update>
</update>
...
...
share-system/src/main/resources/mapper/system/SCouponMapper.xml
View file @
3ccddc38
...
@@ -14,6 +14,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -14,6 +14,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"storeType"
column=
"store_type"
/>
<result
property=
"storeType"
column=
"store_type"
/>
<result
property=
"roomType"
column=
"room_type"
/>
<result
property=
"roomType"
column=
"room_type"
/>
<result
property=
"couponType"
column=
"coupon_type"
/>
<result
property=
"couponType"
column=
"coupon_type"
/>
<result
property=
"orderType"
column=
"order_type"
/>
<result
property=
"packageId"
column=
"package_id"
/>
<result
property=
"duration"
column=
"duration"
/>
<result
property=
"duration"
column=
"duration"
/>
<result
property=
"minDuration"
column=
"min_duration"
/>
<result
property=
"minDuration"
column=
"min_duration"
/>
<result
property=
"maxDuration"
column=
"max_duration"
/>
<result
property=
"maxDuration"
column=
"max_duration"
/>
...
@@ -32,7 +34,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -32,7 +34,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql
id=
"selectSCouponVo"
>
<sql
id=
"selectSCouponVo"
>
select id,name,start_date,
select id,name,start_date,
end_date,valid_start_time,valid_end_time,
end_date,valid_start_time,valid_end_time,
store_type,room_type,coupon_type,
store_type,
room_type,
coupon_type,
order_type,
package_id,
duration,min_duration,max_duration,
duration,min_duration,max_duration,
min_price,sub_price,is_overlay,
min_price,sub_price,is_overlay,
platform_type,number,create_by,
platform_type,number,create_by,
...
@@ -51,6 +57,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -51,6 +57,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"storeType != null"
>
and store_type = #{storeType}
</if>
<if
test=
"storeType != null"
>
and store_type = #{storeType}
</if>
<if
test=
"roomType != null"
>
and room_type = #{roomType}
</if>
<if
test=
"roomType != null"
>
and room_type = #{roomType}
</if>
<if
test=
"couponType != null"
>
and coupon_type = #{couponType}
</if>
<if
test=
"couponType != null"
>
and coupon_type = #{couponType}
</if>
<if
test=
"orderType != null"
>
and order_type = #{orderType}
</if>
<if
test=
"packageId != null"
>
and package_id = #{packageId}
</if>
<if
test=
"duration != null and duration != ''"
>
and duration = #{duration}
</if>
<if
test=
"duration != null and duration != ''"
>
and duration = #{duration}
</if>
<if
test=
"minDuration != null and minDuration != ''"
>
and min_duration = #{minDuration}
</if>
<if
test=
"minDuration != null and minDuration != ''"
>
and min_duration = #{minDuration}
</if>
<if
test=
"maxDuration != null and maxDuration != ''"
>
and max_duration = #{maxDuration}
</if>
<if
test=
"maxDuration != null and maxDuration != ''"
>
and max_duration = #{maxDuration}
</if>
...
@@ -97,6 +105,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -97,6 +105,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"createBy != null"
>
create_by,
</if>
<if
test=
"createBy != null"
>
create_by,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"orderType != null"
>
order_type,
</if>
<if
test=
"packageId != null"
>
package_id,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"name != null and name != ''"
>
#{name},
</if>
<if
test=
"name != null and name != ''"
>
#{name},
</if>
...
@@ -118,6 +128,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -118,6 +128,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"createBy != null"
>
#{createBy},
</if>
<if
test=
"createBy != null"
>
#{createBy},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
<if
test=
"orderType != null"
>
#{orderType},
</if>
<if
test=
"packageId != null"
>
#{packageId},
</if>
</trim>
</trim>
</insert>
</insert>
...
@@ -132,6 +144,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -132,6 +144,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"storeType != null"
>
store_type = #{storeType},
</if>
<if
test=
"storeType != null"
>
store_type = #{storeType},
</if>
<if
test=
"roomType != null"
>
room_type = #{roomType},
</if>
<if
test=
"roomType != null"
>
room_type = #{roomType},
</if>
<if
test=
"couponType != null"
>
coupon_type = #{couponType},
</if>
<if
test=
"couponType != null"
>
coupon_type = #{couponType},
</if>
<if
test=
"orderType != null"
>
order_type = #{orderType},
</if>
<if
test=
"packageId != null"
>
package_id = #{packageId},
</if>
<if
test=
"duration != null and duration != ''"
>
duration = #{duration},
</if>
<if
test=
"duration != null and duration != ''"
>
duration = #{duration},
</if>
<if
test=
"minDuration != null and minDuration != ''"
>
min_duration = #{minDuration},
</if>
<if
test=
"minDuration != null and minDuration != ''"
>
min_duration = #{minDuration},
</if>
<if
test=
"maxDuration != null and maxDuration != ''"
>
max_duration = #{maxDuration},
</if>
<if
test=
"maxDuration != null and maxDuration != ''"
>
max_duration = #{maxDuration},
</if>
...
...
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