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
e5d6e325
Commit
e5d6e325
authored
Nov 18, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户增加赠送抽奖次数接口
parent
fdbca84e
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
13 deletions
+37
-13
SConsumerController.java
...java/share/web/controller/system/SConsumerController.java
+15
-13
SConsumer.java
...e-system/src/main/java/share/system/domain/SConsumer.java
+3
-0
SConsumerService.java
.../src/main/java/share/system/service/SConsumerService.java
+1
-0
PointActivitiesServiceImpl.java
...share/system/service/impl/PointActivitiesServiceImpl.java
+1
-0
SConsumerServiceImpl.java
.../java/share/system/service/impl/SConsumerServiceImpl.java
+10
-0
SConsumerMapper.xml
...stem/src/main/resources/mapper/system/SConsumerMapper.xml
+7
-0
No files found.
share-admin/src/main/java/share/web/controller/system/SConsumerController.java
View file @
e5d6e325
package
share
.
web
.
controller
.
system
;
import
java.util.List
;
import
javax.servlet.http.HttpServletResponse
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
share.common.annotation.Log
;
import
share.common.core.controller.BaseController
;
import
share.common.core.domain.AjaxResult
;
import
share.common.core.page.TableDataInfo
;
import
share.common.enums.BusinessType
;
import
share.common.utils.poi.ExcelUtil
;
import
share.system.domain.SConsumer
;
import
share.system.domain.vo.SConsumerVo
;
import
share.system.service.SConsumerService
;
import
share.common.utils.poi.ExcelUtil
;
import
share.common.core.page.TableDataInfo
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
* 会员用户Controller
...
...
@@ -121,4 +115,12 @@ public class SConsumerController extends BaseController
{
return
toAjax
(
sConsumerService
.
deleteSConsumerByIds
(
ids
));
}
/**
* 赠送时长
*/
@PostMapping
(
"/giveNumber"
)
public
AjaxResult
giveNumber
(
@RequestBody
SConsumer
sConsumer
)
{
return
toAjax
(
sConsumerService
.
giveNumber
(
sConsumer
));
}
}
share-system/src/main/java/share/system/domain/SConsumer.java
View file @
e5d6e325
...
...
@@ -62,6 +62,9 @@ public class SConsumer implements Serializable
@ApiModelProperty
(
value
=
"详细地址"
)
private
String
addres
;
@ApiModelProperty
(
value
=
"抽奖次数"
)
private
Integer
prizeDrawNumbr
;
/** 充值余额 */
@ApiModelProperty
(
value
=
"充值余额"
)
private
BigDecimal
amount
;
...
...
share-system/src/main/java/share/system/service/SConsumerService.java
View file @
e5d6e325
...
...
@@ -132,4 +132,5 @@ public interface SConsumerService extends IService<SConsumer>
TableDataInfo
selectConsumernotById
(
SConsumerVo
sConsumer
);
int
giveNumber
(
SConsumer
sConsumer
);
}
share-system/src/main/java/share/system/service/impl/PointActivitiesServiceImpl.java
View file @
e5d6e325
...
...
@@ -135,6 +135,7 @@ public class PointActivitiesServiceImpl extends ServiceImpl<PointActivitiesMappe
newPointActivities
.
setCouponId
(
activitiesConf
.
getCouponId
());
newPointActivities
.
setPoints
(
YesNoEnum
.
no
.
getIndex
());
newPointActivities
.
setCurrentMonth
(
LocalDate
.
now
().
getMonthValue
());
newPointActivities
.
setCurrentYear
(
LocalDate
.
now
().
getYear
());
pointActivitiesMapper
.
insert
(
newPointActivities
);
}
}
else
{
...
...
share-system/src/main/java/share/system/service/impl/SConsumerServiceImpl.java
View file @
e5d6e325
...
...
@@ -387,6 +387,16 @@ public class SConsumerServiceImpl extends ServiceImpl<SConsumerMapper, SConsumer
return
tableDataInfo
;
}
@Override
public
int
giveNumber
(
SConsumer
sConsumer
)
{
SConsumer
byId
=
sConsumerService
.
getById
(
sConsumer
.
getId
());
byId
.
setPrizeDrawNumbr
(
byId
.
getPrizeDrawNumbr
()
+
sConsumer
.
getPrizeDrawNumbr
());
if
(
sConsumerService
.
updateById
(
byId
))
{
return
1
;
}
return
0
;
}
@Override
public
int
addCleanConsumer
(
SConsumer
sConsumer
)
{
...
...
share-system/src/main/resources/mapper/system/SConsumerMapper.xml
View file @
e5d6e325
...
...
@@ -13,6 +13,7 @@
<result
property=
"level"
column=
"level"
/>
<result
property=
"roleType"
column=
"role_type"
/>
<result
property=
"sex"
column=
"sex"
/>
<result
property=
"prizeDrawNumbr"
column=
"prize_draw_numbr"
/>
<result
property=
"addres"
column=
"addres"
/>
<result
property=
"amount"
column=
"amount"
/>
<result
property=
"freeAmount"
column=
"free_amount"
/>
...
...
@@ -39,6 +40,7 @@
level,
role_type,
sex,
prize_draw_numbr,
addres,
amount,
free_amount,
...
...
@@ -62,6 +64,7 @@
<if
test=
"level != null "
>
and level = #{level}
</if>
<if
test=
"roleType != null "
>
and role_type = #{roleType}
</if>
<if
test=
"sex != null "
>
and sex = #{sex}
</if>
<if
test=
"prizeDrawNumbr != null"
>
and prize_draw_numbr = #{prizeDrawNumbr}
</if>
<if
test=
"addres != null and addres != ''"
>
and addres = #{addres}
</if>
<if
test=
"amount != null "
>
and amount = #{amount}
</if>
<if
test=
"freeAmount != null "
>
and free_amount = #{freeAmount}
</if>
...
...
@@ -112,6 +115,7 @@
t1.level,
t1.role_type,
t1.sex,
t1.prize_draw_numbr,
t1.addres,
t1.amount,
t1.free_amount,
...
...
@@ -147,6 +151,7 @@
<if
test=
"level != null"
>
level,
</if>
<if
test=
"roleType != null"
>
role_type,
</if>
<if
test=
"sex != null"
>
sex,
</if>
<if
test=
"prizeDrawNumbr !=null"
>
prize_draw_numbr,
</if>
<if
test=
"addres != null"
>
addres,
</if>
<if
test=
"amount != null"
>
amount,
</if>
<if
test=
"freeAmount != null"
>
free_amount,
</if>
...
...
@@ -166,6 +171,7 @@
<if
test=
"level != null"
>
#{level},
</if>
<if
test=
"roleType != null"
>
#{roleType},
</if>
<if
test=
"sex != null"
>
#{sex},
</if>
<if
test=
"prizeDrawNumbr != null"
>
#{prizeDrawNumbr},
</if>
<if
test=
"addres != null"
>
#{addres},
</if>
<if
test=
"amount != null"
>
#{amount},
</if>
<if
test=
"freeAmount != null"
>
#{freeAmount},
</if>
...
...
@@ -189,6 +195,7 @@
<if
test=
"level != null"
>
level = #{level},
</if>
<if
test=
"roleType != null"
>
role_type = #{roleType},
</if>
<if
test=
"sex != null"
>
sex = #{sex},
</if>
<if
test=
"prizeDrawNumbr != null"
>
prize_draw_numbr = #{prizeDrawNumbr},
</if>
<if
test=
"addres != null"
>
addres = #{addres},
</if>
<if
test=
"amount != null"
>
amount = #{amount},
</if>
<if
test=
"freeAmount != null"
>
free_amount = #{freeAmount},
</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