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
4f49e546
Commit
4f49e546
authored
Jan 09, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
团购优惠卷管理
parent
3ccddc38
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
46 additions
and
5 deletions
+46
-5
SCouponController.java
...n/java/share/web/controller/system/SCouponController.java
+26
-0
CouponTypeEnum.java
...mmon/src/main/java/share/common/enums/CouponTypeEnum.java
+4
-2
SConsumerCouponServiceImpl.java
...share/system/service/impl/SConsumerCouponServiceImpl.java
+8
-3
SCouponServiceImpl.java
...in/java/share/system/service/impl/SCouponServiceImpl.java
+2
-0
SOrderMapper.xml
...-system/src/main/resources/mapper/system/SOrderMapper.xml
+6
-0
No files found.
share-admin/src/main/java/share/web/controller/system/SCouponController.java
View file @
4f49e546
...
@@ -18,6 +18,7 @@ import share.common.annotation.Log;
...
@@ -18,6 +18,7 @@ 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.CouponTypeEnum
;
import
share.common.enums.RoomType
;
import
share.common.enums.RoomType
;
import
share.common.enums.StoreType
;
import
share.common.enums.StoreType
;
import
share.system.domain.SCoupon
;
import
share.system.domain.SCoupon
;
...
@@ -51,6 +52,31 @@ public class SCouponController extends BaseController
...
@@ -51,6 +52,31 @@ public class SCouponController extends BaseController
}
}
/**
/**
* 查询时长劵列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:coupon:list')"
)
@GetMapping
(
"/list/duration"
)
public
TableDataInfo
listDuration
(
SCoupon
sCoupon
)
{
startPage
();
sCoupon
.
setCouponType
(
CouponTypeEnum
.
DURATION
.
getCode
());
List
<
SCoupon
>
list
=
sCouponService
.
selectSCouponList
(
sCoupon
);
return
getDataTable
(
list
);
}
/**
* 查询团购劵类别
*/
@PreAuthorize
(
"@ss.hasPermi('system:coupon:list')"
)
@GetMapping
(
"/list/group"
)
public
TableDataInfo
listGroup
(
SCoupon
sCoupon
)
{
startPage
();
sCoupon
.
setCouponType
(
CouponTypeEnum
.
CASH
.
getCode
());
List
<
SCoupon
>
list
=
sCouponService
.
selectSCouponList
(
sCoupon
);
return
getDataTable
(
list
);
}
/**
* 导出优惠券列表
* 导出优惠券列表
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:coupon:export')"
)
@PreAuthorize
(
"@ss.hasPermi('system:coupon:export')"
)
...
...
share-common/src/main/java/share/common/enums/CouponTypeEnum.java
View file @
4f49e546
...
@@ -8,8 +8,10 @@ public enum CouponTypeEnum {
...
@@ -8,8 +8,10 @@ public enum CouponTypeEnum {
//1:折扣券,2,团购券,3:满减券,4:套餐劵
//1:折扣券,2,团购券,3:满减券,4:套餐劵
DISCOUNT
(
1
,
"1"
,
"折扣券"
),
DISCOUNT
(
1
,
"1"
,
"折扣券"
),
CASH
(
2
,
"2"
,
"团购券"
),
CASH
(
2
,
"2"
,
"团购券"
),
DURATION
(
3
,
"3"
,
"时长券"
),
//满减券
PACKAGE
(
4
,
"4"
,
"套餐劵"
),
MINUS
(
3
,
"3"
,
"满减券"
),
DURATION
(
4
,
"4"
,
"时长券"
),
PACKAGE
(
5
,
"5"
,
"套餐劵"
),
;
;
private
Integer
code
;
private
Integer
code
;
...
...
share-system/src/main/java/share/system/service/impl/SConsumerCouponServiceImpl.java
View file @
4f49e546
...
@@ -205,9 +205,14 @@ public class SConsumerCouponServiceImpl extends ServiceImpl<SConsumerCouponMappe
...
@@ -205,9 +205,14 @@ public class SConsumerCouponServiceImpl extends ServiceImpl<SConsumerCouponMappe
newSConsumerCoupon
.
setCouponTimeStart
(
sCoupon
.
getValidStartTime
());
newSConsumerCoupon
.
setCouponTimeStart
(
sCoupon
.
getValidStartTime
());
newSConsumerCoupon
.
setCouponTimeEnd
(
sCoupon
.
getValidEndTime
());
newSConsumerCoupon
.
setCouponTimeEnd
(
sCoupon
.
getValidEndTime
());
newSConsumerCoupon
.
setCouponType
(
sCoupon
.
getCouponType
());
newSConsumerCoupon
.
setCouponType
(
sCoupon
.
getCouponType
());
newSConsumerCoupon
.
setMinDuration
(
sCoupon
.
getMinDuration
());
if
(
sCoupon
.
getCouponType
().
equals
(
CouponTypeEnum
.
CASH
.
getCode
()))
{
newSConsumerCoupon
.
setMaxDuration
(
sCoupon
.
getMaxDuration
());
newSConsumerCoupon
.
setMinPrice
(
new
BigDecimal
(
0.00
));
newSConsumerCoupon
.
setDuration
(
sCoupon
.
getDuration
());
newSConsumerCoupon
.
setSubPrice
(
sCoupon
.
getSubPrice
());
}
else
if
(
sCoupon
.
getCouponType
().
equals
(
CouponTypeEnum
.
DURATION
.
getCode
()))
{
newSConsumerCoupon
.
setMinDuration
(
sCoupon
.
getMinDuration
());
newSConsumerCoupon
.
setMaxDuration
(
sCoupon
.
getMaxDuration
());
newSConsumerCoupon
.
setDuration
(
sCoupon
.
getDuration
());
}
newSConsumerCoupon
.
setSourceType
(
SourceTypeEnum
.
GIVE
.
getCode
());
newSConsumerCoupon
.
setSourceType
(
SourceTypeEnum
.
GIVE
.
getCode
());
newSConsumerCoupon
.
setPlatformType
(
String
.
valueOf
(
sCoupon
.
getPlatformType
()));
newSConsumerCoupon
.
setPlatformType
(
String
.
valueOf
(
sCoupon
.
getPlatformType
()));
newSConsumerCoupon
.
setStartDate
(
sCoupon
.
getStartDate
());
newSConsumerCoupon
.
setStartDate
(
sCoupon
.
getStartDate
());
...
...
share-system/src/main/java/share/system/service/impl/SCouponServiceImpl.java
View file @
4f49e546
...
@@ -77,7 +77,9 @@ public class SCouponServiceImpl implements ISCouponService
...
@@ -77,7 +77,9 @@ public class SCouponServiceImpl implements ISCouponService
sCoupon
.
setValidEndTime
(
DEFAULT_END_TIME
);
sCoupon
.
setValidEndTime
(
DEFAULT_END_TIME
);
sCoupon
.
setMinDuration
(
DEFAULT_DURATION
);
sCoupon
.
setMinDuration
(
DEFAULT_DURATION
);
sCoupon
.
setMaxDuration
(
DEFAULT_MAX_DURATION
);
sCoupon
.
setMaxDuration
(
DEFAULT_MAX_DURATION
);
sCoupon
.
setMinPrice
(
new
BigDecimal
(
0
));
sCoupon
.
setCreateTime
(
DateUtils
.
getNowDate
());
sCoupon
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
sCouponMapper
.
insertSCoupon
(
sCoupon
);
return
sCouponMapper
.
insertSCoupon
(
sCoupon
);
}
}
...
...
share-system/src/main/resources/mapper/system/SOrderMapper.xml
View file @
4f49e546
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"arrivalTime"
column=
"arrival_time"
/>
<result
property=
"remark"
column=
"remark"
/>
<result
property=
"remark"
column=
"remark"
/>
</resultMap>
</resultMap>
...
@@ -75,6 +76,7 @@
...
@@ -75,6 +76,7 @@
create_time,
create_time,
update_by,
update_by,
update_time,
update_time,
arrival_time,
remark
remark
from s_order
from s_order
</sql>
</sql>
...
@@ -124,6 +126,7 @@
...
@@ -124,6 +126,7 @@
<if
test=
"createTime != null and createTime != ''"
>
and create_time = #{createTime}
</if>
<if
test=
"createTime != null and createTime != ''"
>
and create_time = #{createTime}
</if>
<if
test=
"updateBy != null and updateBy != ''"
>
and update_by = #{updateBy}
</if>
<if
test=
"updateBy != null and updateBy != ''"
>
and update_by = #{updateBy}
</if>
<if
test=
"updateTime != null and updateTime != ''"
>
and update_time = #{updateTime}
</if>
<if
test=
"updateTime != null and updateTime != ''"
>
and update_time = #{updateTime}
</if>
<if
test=
"arrivalTime != null and arrivalTime != ''"
>
and arrival_time = #{arrivalTime}
</if>
<if
test=
"remark != null and remark != ''"
>
and remark = #{remark}
</if>
<if
test=
"remark != null and remark != ''"
>
and remark = #{remark}
</if>
ORDER BY create_time DESC
ORDER BY create_time DESC
</select>
</select>
...
@@ -170,6 +173,7 @@
...
@@ -170,6 +173,7 @@
<if
test=
"isDelete != null and isDelete != ''"
>
is_delete,
</if>
<if
test=
"isDelete != null and isDelete != ''"
>
is_delete,
</if>
<if
test=
"createBy != null and createBy != ''"
>
create_by,
</if>
<if
test=
"createBy != null and createBy != ''"
>
create_by,
</if>
<if
test=
"createTime != null and createTime != ''"
>
create_time,
</if>
<if
test=
"createTime != null and createTime != ''"
>
create_time,
</if>
<if
test=
"arrivalTime != null and arrivalTime != ''"
>
arrival_time,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"orderNo != null"
>
#{orderNo},
</if>
<if
test=
"orderNo != null"
>
#{orderNo},
</if>
...
@@ -202,6 +206,7 @@
...
@@ -202,6 +206,7 @@
<if
test=
"isDelete != null"
>
0,
</if>
<if
test=
"isDelete != null"
>
0,
</if>
<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=
"arrivalTime != null"
>
#{arrivalTime},
</if>
</trim>
</trim>
</insert>
</insert>
...
@@ -238,6 +243,7 @@
...
@@ -238,6 +243,7 @@
<if
test=
"isDelete != null"
>
is_delete = #{isDelete},
</if>
<if
test=
"isDelete != null"
>
is_delete = #{isDelete},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateTime != null"
>
update_time = NOW(),
</if>
<if
test=
"updateTime != null"
>
update_time = NOW(),
</if>
<if
test=
"arrivalTime != null"
>
arrival_time = #{arrivalTime},
</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