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
3359a3f6
Commit
3359a3f6
authored
Oct 20, 2023
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优惠券领取记录表增加门店类型字段
parent
dfb678c4
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
195 additions
and
3 deletions
+195
-3
SConsumerCouponController.java
...hare/web/controller/system/SConsumerCouponController.java
+11
-0
RoomType.java
share-common/src/main/java/share/common/enums/RoomType.java
+37
-0
StoreType.java
share-common/src/main/java/share/common/enums/StoreType.java
+34
-0
MTController.java
...c/main/java/share/web/controller/system/MTController.java
+44
-0
SConsumerCouponController.java
...hare/web/controller/system/SConsumerCouponController.java
+48
-0
SConsumerCoupon.java
...em/src/main/java/share/system/domain/SConsumerCoupon.java
+10
-0
MTService.java
...-system/src/main/java/share/system/service/MTService.java
+1
-1
MTServiceImpl.java
...rc/main/java/share/system/service/impl/MTServiceImpl.java
+1
-1
SConsumerCouponMapper.xml
...rc/main/resources/mapper/system/SConsumerCouponMapper.xml
+9
-1
No files found.
share-admin/src/main/java/share/web/controller/system/SConsumerCouponController.java
View file @
3359a3f6
package
share
.
web
.
controller
.
system
;
package
share
.
web
.
controller
.
system
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.List
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
@@ -16,6 +19,8 @@ import share.common.annotation.Log;
...
@@ -16,6 +19,8 @@ import share.common.annotation.Log;
import
share.common.core.controller.BaseController
;
import
share.common.core.controller.BaseController
;
import
share.common.core.domain.AjaxResult
;
import
share.common.core.domain.AjaxResult
;
import
share.common.enums.BusinessType
;
import
share.common.enums.BusinessType
;
import
share.common.enums.RoomType
;
import
share.common.enums.StoreType
;
import
share.system.domain.SConsumerCoupon
;
import
share.system.domain.SConsumerCoupon
;
import
share.system.service.ISConsumerCouponService
;
import
share.system.service.ISConsumerCouponService
;
import
share.common.utils.poi.ExcelUtil
;
import
share.common.utils.poi.ExcelUtil
;
...
@@ -77,6 +82,12 @@ public class SConsumerCouponController extends BaseController
...
@@ -77,6 +82,12 @@ public class SConsumerCouponController extends BaseController
@PostMapping
@PostMapping
public
AjaxResult
add
(
@RequestBody
SConsumerCoupon
sConsumerCoupon
)
public
AjaxResult
add
(
@RequestBody
SConsumerCoupon
sConsumerCoupon
)
{
{
if
(
StringUtils
.
isNotBlank
(
sConsumerCoupon
.
getRoomType
())){
sConsumerCoupon
.
setRoomType
(
String
.
valueOf
(
RoomType
.
getCodeList
()));
}
if
(
StringUtils
.
isNotBlank
(
sConsumerCoupon
.
getStoreType
())){
sConsumerCoupon
.
setStoreType
(
String
.
valueOf
(
StoreType
.
getCodeList
()));
}
return
toAjax
(
sConsumerCouponService
.
insertSConsumerCoupon
(
sConsumerCoupon
));
return
toAjax
(
sConsumerCouponService
.
insertSConsumerCoupon
(
sConsumerCoupon
));
}
}
...
...
share-common/src/main/java/share/common/enums/RoomType.java
0 → 100644
View file @
3359a3f6
package
share
.
common
.
enums
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.stream.Collectors
;
public
enum
RoomType
{
//1:标间,2:豪华间,3:总统套房,4:商务套房,5:行政套房,6:其他
STANDARD
(
"1"
,
"标准间"
),
HIGH
(
"2"
,
"豪华间"
),
TOTAL
(
"3"
,
"总统套房"
),
BUSINESS
(
"4"
,
"商务套房"
),
ADMINISTRATIVE
(
"5"
,
"行政套房"
),
OTHER
(
"6"
,
"其他"
),
;
private
String
code
;
private
String
name
;
//所有枚举code
RoomType
(
String
code
,
String
name
)
{
this
.
code
=
code
;
this
.
name
=
name
;
}
public
static
List
<
String
>
getCodeList
()
{
return
Arrays
.
stream
(
RoomType
.
values
()).
map
(
RoomType:
:
getCode
).
collect
(
Collectors
.
toList
());
}
public
String
getCode
()
{
return
code
;
}
public
String
getName
()
{
return
name
;
}
}
share-common/src/main/java/share/common/enums/StoreType.java
0 → 100644
View file @
3359a3f6
package
share
.
common
.
enums
;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.stream.Collectors
;
public
enum
StoreType
{
//1:标准店,2:外卖店,3:酒店,4:其他
STANDARD
(
"1"
,
"标准店"
),
OUT_DELIVERY
(
"2"
,
"外卖店"
),
HOTEL
(
"3"
,
"酒店"
),
OTHER
(
"4"
,
"其他"
)
;
private
String
code
;
private
String
name
;
StoreType
(
String
code
,
String
name
)
{
this
.
code
=
code
;
this
.
name
=
name
;
}
public
static
List
<
String
>
getCodeList
()
{
return
Arrays
.
stream
(
StoreType
.
values
()).
map
(
StoreType:
:
getCode
).
collect
(
Collectors
.
toList
());
}
public
String
getCode
()
{
return
code
;
}
public
String
getName
()
{
return
name
;
}
}
share-front/src/main/java/share/web/controller/system/MTController.java
0 → 100644
View file @
3359a3f6
package
share
.
web
.
controller
.
system
;
import
io.swagger.annotations.Api
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
share.common.annotation.Log
;
import
share.system.service.MTService
;
@RestController
@RequestMapping
(
"/front/certificate"
)
@Api
(
tags
=
"首页-验券"
)
public
class
MTController
{
@Autowired
private
MTService
mtService
;
@GetMapping
(
"/verificationVouchers"
)
@Log
(
title
=
"执行验券"
)
public
String
verificationVouchers
(
String
code
,
int
num
){
return
mtService
.
verificationVouchers
(
code
,
num
);
}
@GetMapping
(
"/revoke"
)
@Log
(
title
=
"撤销验券"
)
public
String
revoke
(
String
ERPId
,
String
ERPName
,
String
couponCode
){
return
mtService
.
revoke
(
ERPId
,
ERPName
,
couponCode
);
}
@GetMapping
(
"/preparation"
)
@Log
(
title
=
"验券准备"
)
public
String
preparation
(
String
code
){
return
mtService
.
preparation
(
code
);
}
@GetMapping
(
"/consume"
)
@Log
(
title
=
"已验券码查询"
)
public
String
verified
(
String
code
){
return
mtService
.
verified
(
code
);
}
}
share-front/src/main/java/share/web/controller/system/SConsumerCouponController.java
0 → 100644
View file @
3359a3f6
package
share
.
web
.
controller
.
system
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
share.common.core.controller.BaseController
;
import
share.common.core.domain.AjaxResult
;
import
share.common.core.page.TableDataInfo
;
import
share.system.domain.SConsumerCoupon
;
import
share.system.service.ISConsumerCouponService
;
import
java.util.List
;
/**
* 优惠券领取记录Controller
*
* @author wuwenlong
* @date 2023-10-12
*/
@RestController
@RequestMapping
(
"/front/consumerCoupon"
)
public
class
SConsumerCouponController
extends
BaseController
{
@Autowired
private
ISConsumerCouponService
sConsumerCouponService
;
/**
* 查询优惠券领取记录列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:coupon:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
SConsumerCoupon
sConsumerCoupon
)
{
startPage
();
List
<
SConsumerCoupon
>
list
=
sConsumerCouponService
.
selectSConsumerCouponList
(
sConsumerCoupon
);
return
getDataTable
(
list
);
}
/**
* 获取优惠券领取记录详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:coupon:query')"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
success
(
sConsumerCouponService
.
selectSConsumerCouponById
(
id
));
}
}
share-system/src/main/java/share/system/domain/SConsumerCoupon.java
View file @
3359a3f6
...
@@ -44,6 +44,16 @@ public class SConsumerCoupon extends BaseEntity
...
@@ -44,6 +44,16 @@ public class SConsumerCoupon extends BaseEntity
@Excel
(
name
=
"优惠券类型(1:折扣券,2,满减券,3:时长券)"
)
@Excel
(
name
=
"优惠券类型(1:折扣券,2,满减券,3:时长券)"
)
private
String
couponType
;
private
String
couponType
;
//门店类型
@Excel
(
name
=
"门店类型(1:标准店,2:外卖店,3:酒店,4:其他)"
)
private
String
storeType
;
//房间类型
@Excel
(
name
=
"房间类型(1:标间,2:豪华间,3:总统套房,4:商务套房,5:行政套房,6:其他)"
)
private
String
roomType
;
/** 折扣最大时长 */
/** 折扣最大时长 */
@Excel
(
name
=
"折扣最大时长"
)
@Excel
(
name
=
"折扣最大时长"
)
private
String
maxDuration
;
private
String
maxDuration
;
...
...
share-system/src/main/java/share/system/service/MTService.java
View file @
3359a3f6
...
@@ -7,5 +7,5 @@ public interface MTService {
...
@@ -7,5 +7,5 @@ public interface MTService {
String
preparation
(
String
code
);
String
preparation
(
String
code
);
String
V
erified
(
String
code
);
String
v
erified
(
String
code
);
}
}
share-system/src/main/java/share/system/service/impl/MTServiceImpl.java
View file @
3359a3f6
...
@@ -96,7 +96,7 @@ public class MTServiceImpl implements MTService {
...
@@ -96,7 +96,7 @@ public class MTServiceImpl implements MTService {
//已验券码查询
//已验券码查询
@Override
@Override
public
String
V
erified
(
String
code
)
{
public
String
v
erified
(
String
code
)
{
MeituanClient
meituanClient
=
DefaultMeituanClient
.
builder
(
developerId
,
signKey
).
build
();
MeituanClient
meituanClient
=
DefaultMeituanClient
.
builder
(
developerId
,
signKey
).
build
();
QueryCouponByIdRequest
queryCouponByIdRequest
=
new
QueryCouponByIdRequest
();
QueryCouponByIdRequest
queryCouponByIdRequest
=
new
QueryCouponByIdRequest
();
queryCouponByIdRequest
.
setCouponCode
(
code
);
queryCouponByIdRequest
.
setCouponCode
(
code
);
...
...
share-system/src/main/resources/mapper/system/SConsumerCouponMapper.xml
View file @
3359a3f6
...
@@ -16,6 +16,8 @@
...
@@ -16,6 +16,8 @@
<result
property=
"minPrice"
column=
"min_price"
/>
<result
property=
"minPrice"
column=
"min_price"
/>
<result
property=
"subPrice"
column=
"sub_price"
/>
<result
property=
"subPrice"
column=
"sub_price"
/>
<result
property=
"sourceType"
column=
"source_type"
/>
<result
property=
"sourceType"
column=
"source_type"
/>
<result
property=
"roomType"
column=
"room_type"
/>
<result
property=
"storeType"
column=
"store_type"
/>
<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"
/>
...
@@ -32,7 +34,7 @@
...
@@ -32,7 +34,7 @@
</resultMap>
</resultMap>
<sql
id=
"selectSConsumerCouponVo"
>
<sql
id=
"selectSConsumerCouponVo"
>
select id, consumer_id, coupon_id, coupon_code, name, coupon_type, max_duration, duration, min_price, sub_price, source_type, platform_type, start_date, end_date, use_date, use_status, is_delete, create_by, create_time, update_by, update_time, delete_by, delete_time, remark from s_consumer_coupon
select id, consumer_id, coupon_id, coupon_code, name, coupon_type, max_duration, duration, min_price, sub_price, source_type, platform_type, start_date, end_date, use_date, use_status, is_delete, create_by, create_time, update_by, update_time, delete_by, delete_time, remark
,room_type,store_type
from s_consumer_coupon
</sql>
</sql>
<select
id=
"selectSConsumerCouponList"
parameterType=
"SConsumerCoupon"
resultMap=
"SConsumerCouponResult"
>
<select
id=
"selectSConsumerCouponList"
parameterType=
"SConsumerCoupon"
resultMap=
"SConsumerCouponResult"
>
...
@@ -90,6 +92,8 @@
...
@@ -90,6 +92,8 @@
<if
test=
"deleteBy != null"
>
delete_by,
</if>
<if
test=
"deleteBy != null"
>
delete_by,
</if>
<if
test=
"deleteTime != null"
>
delete_time,
</if>
<if
test=
"deleteTime != null"
>
delete_time,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"roomType != null"
>
room_type,
</if>
<if
test=
"storeType != null"
>
store_type,
</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>
...
@@ -115,6 +119,8 @@
...
@@ -115,6 +119,8 @@
<if
test=
"deleteBy != null"
>
#{deleteBy},
</if>
<if
test=
"deleteBy != null"
>
#{deleteBy},
</if>
<if
test=
"deleteTime != null"
>
#{deleteTime},
</if>
<if
test=
"deleteTime != null"
>
#{deleteTime},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
<if
test=
"roomType != null"
>
#{roomType},
</if>
<if
test=
"storeType != null"
>
#{storeType},
</if>
</trim>
</trim>
</insert>
</insert>
...
@@ -144,6 +150,8 @@
...
@@ -144,6 +150,8 @@
<if
test=
"deleteBy != null"
>
delete_by = #{deleteBy},
</if>
<if
test=
"deleteBy != null"
>
delete_by = #{deleteBy},
</if>
<if
test=
"deleteTime != null"
>
delete_time = #{deleteTime},
</if>
<if
test=
"deleteTime != null"
>
delete_time = #{deleteTime},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
<if
test=
"roomType != null"
>
room_type = #{roomType},
</if>
<if
test=
"storeType != null"
>
store_type = #{storeType},
</if>
</trim>
</trim>
where id = #{id}
where id = #{id}
</update>
</update>
...
...
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