Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-api-boot-master
Commits
9ffeceec
Commit
9ffeceec
authored
Oct 15, 2024
by
332784038@qq.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/release' into release
parents
e15785a4
c5fbbba8
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
67 additions
and
67 deletions
+67
-67
ScoreRuleController.java
...ember/controller/admin/scoreRule/ScoreRuleController.java
+11
-11
UserBackVO.java
...ao/module/member/controller/admin/user/vo/UserBackVO.java
+2
-0
MemberUserScoreController.java
...controller/admin/userScore/MemberUserScoreController.java
+2
-2
MemberUserScoreLogController.java
...ller/admin/userScoreLog/MemberUserScoreLogController.java
+1
-1
OrderVStrategy.java
.../module/member/mq/consumer/score/core/OrderVStrategy.java
+7
-7
ScoreRuleShareRecordServiceImpl.java
...ScoreRuleShareRecord/ScoreRuleShareRecordServiceImpl.java
+1
-1
OrderApi.java
.../main/java/cn/iocoder/boot/module/order/api/OrderApi.java
+2
-2
OrderApiImpl.java
.../java/cn/iocoder/yudao/module/order/api/OrderApiImpl.java
+3
-3
RedeemRewardApi.java
...coder/yudao/module/reward/api/reward/RedeemRewardApi.java
+5
-2
RedeemRewardApiImpl.java
...r/yudao/module/reward/api/reward/RedeemRewardApiImpl.java
+10
-7
RewardController.java
...dule/reward/controller/admin/reward/RewardController.java
+1
-1
RewardRedeemDO.java
...o/module/reward/dal/dataobject/redeem/RewardRedeemDO.java
+7
-0
RewardServiceImpl.java
...yudao/module/reward/service/reward/RewardServiceImpl.java
+10
-7
RewardUpdateReqVO.java
...oder/yudao/module/reward/vo/reward/RewardUpdateReqVO.java
+1
-19
RewardRedeemMapper.xml
...ard-impl/src/main/resources/mapper/RewardRedeemMapper.xml
+1
-1
BannerController.java
...dule/system/controller/admin/banner/BannerController.java
+3
-3
No files found.
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/admin/scoreRule/ScoreRuleController.java
View file @
9ffeceec
...
@@ -48,14 +48,14 @@ public class ScoreRuleController {
...
@@ -48,14 +48,14 @@ public class ScoreRuleController {
@PostMapping
(
"/create"
)
@PostMapping
(
"/create"
)
@ApiOperation
(
"创建积分规则"
)
@ApiOperation
(
"创建积分规则"
)
@Idempotent
(
timeout
=
3
)
@Idempotent
(
timeout
=
3
)
@PreAuthorize
(
"@ss.hasPermission('member:score-rule:create')"
)
//
@PreAuthorize("@ss.hasPermission('member:score-rule:create')")
public
CommonResult
<
Long
>
createScoreRule
(
@Valid
@RequestBody
ScoreRuleCreateReqVO
createReqVO
)
{
public
CommonResult
<
Long
>
createScoreRule
(
@Valid
@RequestBody
ScoreRuleCreateReqVO
createReqVO
)
{
return
success
(
scoreRuleService
.
createScoreRule
(
createReqVO
));
return
success
(
scoreRuleService
.
createScoreRule
(
createReqVO
));
}
}
@PostMapping
(
"/update"
)
@PostMapping
(
"/update"
)
@ApiOperation
(
"更新积分规则"
)
@ApiOperation
(
"更新积分规则"
)
@PreAuthorize
(
"@ss.hasPermission('member:score-rule:update')"
)
//
@PreAuthorize("@ss.hasPermission('member:score-rule:update')")
public
CommonResult
<
Boolean
>
updateScoreRule
(
@Valid
@RequestBody
ScoreRuleUpdateReqVO
updateReqVO
)
{
public
CommonResult
<
Boolean
>
updateScoreRule
(
@Valid
@RequestBody
ScoreRuleUpdateReqVO
updateReqVO
)
{
scoreRuleService
.
updateScoreRule
(
updateReqVO
);
scoreRuleService
.
updateScoreRule
(
updateReqVO
);
return
success
(
true
);
return
success
(
true
);
...
@@ -63,7 +63,7 @@ public class ScoreRuleController {
...
@@ -63,7 +63,7 @@ public class ScoreRuleController {
@PostMapping
(
"/delete"
)
@PostMapping
(
"/delete"
)
@ApiOperation
(
"删除积分规则"
)
@ApiOperation
(
"删除积分规则"
)
@PreAuthorize
(
"@ss.hasPermission('member:score-rule:delete')"
)
//
@PreAuthorize("@ss.hasPermission('member:score-rule:delete')")
public
CommonResult
<
Boolean
>
deleteScoreRule
(
@Valid
@RequestBody
IdReqVo
idReqVo
)
{
public
CommonResult
<
Boolean
>
deleteScoreRule
(
@Valid
@RequestBody
IdReqVo
idReqVo
)
{
scoreRuleService
.
deleteScoreRule
(
idReqVo
.
getId
());
scoreRuleService
.
deleteScoreRule
(
idReqVo
.
getId
());
return
success
(
true
);
return
success
(
true
);
...
@@ -71,7 +71,7 @@ public class ScoreRuleController {
...
@@ -71,7 +71,7 @@ public class ScoreRuleController {
@PostMapping
(
"/get"
)
@PostMapping
(
"/get"
)
@ApiOperation
(
"获得积分规则详情"
)
@ApiOperation
(
"获得积分规则详情"
)
@PreAuthorize
(
"@ss.hasPermission('member:score-rule:query')"
)
//
@PreAuthorize("@ss.hasPermission('member:score-rule:query')")
public
CommonResult
<
ScoreRuleBackDetailVO
>
getScoreRule
(
@Valid
@RequestBody
IdReqVo
idReqVo
)
{
public
CommonResult
<
ScoreRuleBackDetailVO
>
getScoreRule
(
@Valid
@RequestBody
IdReqVo
idReqVo
)
{
ScoreRuleBackDetailVO
scoreRuleBackDetailVO
=
scoreRuleService
.
getScoreRule
(
idReqVo
.
getId
());
ScoreRuleBackDetailVO
scoreRuleBackDetailVO
=
scoreRuleService
.
getScoreRule
(
idReqVo
.
getId
());
return
success
(
scoreRuleBackDetailVO
);
return
success
(
scoreRuleBackDetailVO
);
...
@@ -80,7 +80,7 @@ public class ScoreRuleController {
...
@@ -80,7 +80,7 @@ public class ScoreRuleController {
@PostMapping
(
"/list"
)
@PostMapping
(
"/list"
)
@ApiOperation
(
"获得积分规则列表"
)
@ApiOperation
(
"获得积分规则列表"
)
@ApiImplicitParam
(
name
=
"ids"
,
value
=
"编号列表"
,
required
=
true
,
example
=
"1024,2048"
,
dataTypeClass
=
List
.
class
)
@ApiImplicitParam
(
name
=
"ids"
,
value
=
"编号列表"
,
required
=
true
,
example
=
"1024,2048"
,
dataTypeClass
=
List
.
class
)
@PreAuthorize
(
"@ss.hasPermission('member:score-rule:query')"
)
//
@PreAuthorize("@ss.hasPermission('member:score-rule:query')")
public
CommonResult
<
List
<
ScoreRuleBackVO
>>
getScoreRuleList
(
@NotNull
@RequestParam
Collection
<
Long
>
ids
)
{
public
CommonResult
<
List
<
ScoreRuleBackVO
>>
getScoreRuleList
(
@NotNull
@RequestParam
Collection
<
Long
>
ids
)
{
List
<
ScoreRuleBackVO
>
list
=
scoreRuleService
.
getScoreRuleList
(
ids
);
List
<
ScoreRuleBackVO
>
list
=
scoreRuleService
.
getScoreRuleList
(
ids
);
return
success
(
list
);
return
success
(
list
);
...
@@ -88,7 +88,7 @@ public class ScoreRuleController {
...
@@ -88,7 +88,7 @@ public class ScoreRuleController {
@PostMapping
(
"/page"
)
@PostMapping
(
"/page"
)
@ApiOperation
(
"获得积分规则分页"
)
@ApiOperation
(
"获得积分规则分页"
)
@PreAuthorize
(
"@ss.hasPermission('member:score-rule:query')"
)
//
@PreAuthorize("@ss.hasPermission('member:score-rule:query')")
public
CommonResult
<
PageResult
<
ScoreRuleBackVO
>>
getScoreRulePage
(
@Valid
@RequestBody
ScoreRuleQueryVO
query
,
PageVO
page
)
{
public
CommonResult
<
PageResult
<
ScoreRuleBackVO
>>
getScoreRulePage
(
@Valid
@RequestBody
ScoreRuleQueryVO
query
,
PageVO
page
)
{
PageResult
<
ScoreRuleBackVO
>
pageResult
=
scoreRuleService
.
getScoreRulePage
(
query
,
page
);
PageResult
<
ScoreRuleBackVO
>
pageResult
=
scoreRuleService
.
getScoreRulePage
(
query
,
page
);
return
success
(
pageResult
);
return
success
(
pageResult
);
...
@@ -96,7 +96,7 @@ public class ScoreRuleController {
...
@@ -96,7 +96,7 @@ public class ScoreRuleController {
@PostMapping
(
"/status"
)
@PostMapping
(
"/status"
)
@ApiOperation
(
"启用关闭"
)
@ApiOperation
(
"启用关闭"
)
@PreAuthorize
(
"@ss.hasPermission('member:score-rule:update')"
)
//
@PreAuthorize("@ss.hasPermission('member:score-rule:update')")
public
CommonResult
<
Boolean
>
updateStatus
(
@Valid
@RequestBody
ScoreRuleStatusReqVO
scoreRuleStatusReqVO
)
{
public
CommonResult
<
Boolean
>
updateStatus
(
@Valid
@RequestBody
ScoreRuleStatusReqVO
scoreRuleStatusReqVO
)
{
scoreRuleService
.
updateStatus
(
scoreRuleStatusReqVO
);
scoreRuleService
.
updateStatus
(
scoreRuleStatusReqVO
);
return
success
(
true
);
return
success
(
true
);
...
@@ -105,14 +105,14 @@ public class ScoreRuleController {
...
@@ -105,14 +105,14 @@ public class ScoreRuleController {
@PostMapping
(
"/copy"
)
@PostMapping
(
"/copy"
)
@ApiOperation
(
"复制规则"
)
@ApiOperation
(
"复制规则"
)
@Idempotent
(
timeout
=
3
)
@Idempotent
(
timeout
=
3
)
@PreAuthorize
(
"@ss.hasPermission('member:score-rule:create')"
)
//
@PreAuthorize("@ss.hasPermission('member:score-rule:create')")
public
CommonResult
<
Long
>
copyScoreRule
(
@Valid
@RequestBody
IdReqVo
idReqVo
)
{
public
CommonResult
<
Long
>
copyScoreRule
(
@Valid
@RequestBody
IdReqVo
idReqVo
)
{
return
success
(
scoreRuleService
.
copyScoreRule
(
idReqVo
.
getId
()));
return
success
(
scoreRuleService
.
copyScoreRule
(
idReqVo
.
getId
()));
}
}
@PostMapping
(
"/delay"
)
@PostMapping
(
"/delay"
)
@ApiOperation
(
"延期规则"
)
@ApiOperation
(
"延期规则"
)
@PreAuthorize
(
"@ss.hasPermission('member:score-rule:update')"
)
//
@PreAuthorize("@ss.hasPermission('member:score-rule:update')")
public
CommonResult
<
Boolean
>
delayScoreRule
(
@Valid
@RequestBody
ScoreDelayReqVO
scoreDelayReqVO
)
{
public
CommonResult
<
Boolean
>
delayScoreRule
(
@Valid
@RequestBody
ScoreDelayReqVO
scoreDelayReqVO
)
{
scoreRuleService
.
delayScoreRule
(
scoreDelayReqVO
);
scoreRuleService
.
delayScoreRule
(
scoreDelayReqVO
);
return
success
(
true
);
return
success
(
true
);
...
@@ -135,7 +135,7 @@ public class ScoreRuleController {
...
@@ -135,7 +135,7 @@ public class ScoreRuleController {
@GetMapping
(
"/export-excel"
)
@GetMapping
(
"/export-excel"
)
@ApiOperation
(
"导出积分规则Excel"
)
@ApiOperation
(
"导出积分规则Excel"
)
@PreAuthorize
(
"@ss.hasPermission('member:score-rule:export')"
)
//
@PreAuthorize("@ss.hasPermission('member:score-rule:export')")
@OperateLog
(
type
=
EXPORT
)
@OperateLog
(
type
=
EXPORT
)
public
void
exportScoreRuleExcel
(
@Valid
ScoreRuleQueryVO
query
,
public
void
exportScoreRuleExcel
(
@Valid
ScoreRuleQueryVO
query
,
HttpServletResponse
response
)
throws
IOException
{
HttpServletResponse
response
)
throws
IOException
{
...
@@ -147,7 +147,7 @@ public class ScoreRuleController {
...
@@ -147,7 +147,7 @@ public class ScoreRuleController {
@PostMapping
(
"/switch/set"
)
@PostMapping
(
"/switch/set"
)
@ApiOperation
(
"设置会员工能开关"
)
@ApiOperation
(
"设置会员工能开关"
)
@PreAuthorize
(
"@ss.hasPermission('member:score-rule:update')"
)
//
@PreAuthorize("@ss.hasPermission('member:score-rule:update')")
public
CommonResult
<
Boolean
>
setScoreRuleSwitch
(
@RequestBody
SwitchReqVo
switchReqVo
)
{
public
CommonResult
<
Boolean
>
setScoreRuleSwitch
(
@RequestBody
SwitchReqVo
switchReqVo
)
{
return
success
(
scoreRuleService
.
setScoreRuleSwitch
(
switchReqVo
));
return
success
(
scoreRuleService
.
setScoreRuleSwitch
(
switchReqVo
));
}
}
...
...
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/vo/UserBackVO.java
View file @
9ffeceec
...
@@ -11,6 +11,7 @@ import org.springframework.format.annotation.DateTimeFormat;
...
@@ -11,6 +11,7 @@ import org.springframework.format.annotation.DateTimeFormat;
import
java.util.Date
;
import
java.util.Date
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
;
/**
/**
...
@@ -86,6 +87,7 @@ public class UserBackVO {
...
@@ -86,6 +87,7 @@ public class UserBackVO {
* 生日
* 生日
*/
*/
@ExcelProperty
(
"生日"
)
@ExcelProperty
(
"生日"
)
@JsonFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY
)
@ApiModelProperty
(
value
=
"生日"
)
@ApiModelProperty
(
value
=
"生日"
)
private
Date
birthday
;
private
Date
birthday
;
/**
/**
...
...
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/admin/userScore/MemberUserScoreController.java
View file @
9ffeceec
...
@@ -43,7 +43,7 @@ public class MemberUserScoreController {
...
@@ -43,7 +43,7 @@ public class MemberUserScoreController {
@PostMapping
(
"/page"
)
@PostMapping
(
"/page"
)
@ApiOperation
(
"获得会员积分分页"
)
@ApiOperation
(
"获得会员积分分页"
)
@PreAuthorize
(
"@ss.hasPermission('member:user-score:query')"
)
//
@PreAuthorize("@ss.hasPermission('member:user-score:query')")
public
CommonResult
<
PageResult
<
MemberUserScoreBackVO
>>
getUserScorePage
(
@Valid
@RequestBody
MemberUserScoreQueryVO
query
)
{
public
CommonResult
<
PageResult
<
MemberUserScoreBackVO
>>
getUserScorePage
(
@Valid
@RequestBody
MemberUserScoreQueryVO
query
)
{
PageResult
<
MemberUserScoreBackVO
>
pageResult
=
userScoreService
.
getUserScorePage
(
query
);
PageResult
<
MemberUserScoreBackVO
>
pageResult
=
userScoreService
.
getUserScorePage
(
query
);
return
success
(
pageResult
);
return
success
(
pageResult
);
...
@@ -52,7 +52,7 @@ public class MemberUserScoreController {
...
@@ -52,7 +52,7 @@ public class MemberUserScoreController {
@PostMapping
(
"/operate"
)
@PostMapping
(
"/operate"
)
@ApiOperation
(
"操作积分"
)
@ApiOperation
(
"操作积分"
)
@Idempotent
(
timeout
=
5
)
@Idempotent
(
timeout
=
5
)
@PreAuthorize
(
"@ss.hasPermission('member:user-score:operate')"
)
//
@PreAuthorize("@ss.hasPermission('member:user-score:operate')")
public
CommonResult
<
Boolean
>
operate
(
@Valid
@RequestBody
MemberUserScoreOperateQueryVO
query
)
{
public
CommonResult
<
Boolean
>
operate
(
@Valid
@RequestBody
MemberUserScoreOperateQueryVO
query
)
{
Map
<
String
,
Object
>
extParam
=
new
HashMap
<>();
Map
<
String
,
Object
>
extParam
=
new
HashMap
<>();
extParam
.
put
(
"comment"
,
query
.
getComment
());
extParam
.
put
(
"comment"
,
query
.
getComment
());
...
...
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/admin/userScoreLog/MemberUserScoreLogController.java
View file @
9ffeceec
...
@@ -29,7 +29,7 @@ public class MemberUserScoreLogController {
...
@@ -29,7 +29,7 @@ public class MemberUserScoreLogController {
@PostMapping
(
"/page"
)
@PostMapping
(
"/page"
)
@ApiOperation
(
"获得积分记录分页"
)
@ApiOperation
(
"获得积分记录分页"
)
@PreAuthorize
(
"@ss.hasPermission('member:user-score-log:query')"
)
//
@PreAuthorize("@ss.hasPermission('member:user-score-log:query')")
public
CommonResult
<
PageResult
<
MemberUserScoreLogBackVO
>>
page
(
@Valid
@RequestBody
MemberUserScoreLogQueryVO
query
)
{
public
CommonResult
<
PageResult
<
MemberUserScoreLogBackVO
>>
page
(
@Valid
@RequestBody
MemberUserScoreLogQueryVO
query
)
{
PageResult
<
MemberUserScoreLogBackVO
>
pageResult
=
memberUserScoreLogService
.
getPage
(
query
);
PageResult
<
MemberUserScoreLogBackVO
>
pageResult
=
memberUserScoreLogService
.
getPage
(
query
);
return
success
(
pageResult
);
return
success
(
pageResult
);
...
...
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/mq/consumer/score/core/OrderVStrategy.java
View file @
9ffeceec
...
@@ -212,8 +212,8 @@ public class OrderVStrategy extends AbstractScoreRuleStrategy {
...
@@ -212,8 +212,8 @@ public class OrderVStrategy extends AbstractScoreRuleStrategy {
userId
=
0L
;
userId
=
0L
;
}
}
}
}
// 校验首单
// 校验首单
:发货和收货都算首单,按客户查,只有发货人收货人都是首单才算首单
if
(!
isFirstOrderValid
(
user
Id
,
extraInfo
))
{
if
(!
isFirstOrderValid
(
consignorId
,
consignee
Id
,
extraInfo
))
{
return
null
;
return
null
;
}
}
// 校验积分上限,添加加分用户列表
// 校验积分上限,添加加分用户列表
...
@@ -260,14 +260,14 @@ public class OrderVStrategy extends AbstractScoreRuleStrategy {
...
@@ -260,14 +260,14 @@ public class OrderVStrategy extends AbstractScoreRuleStrategy {
/**
/**
* 校验是否为首单且首单是否有效
* 校验是否为首单且首单是否有效
*/
*/
private
boolean
isFirstOrderValid
(
Long
user
Id
,
ScoreRuleOrderVExtraVO
extraInfo
)
{
private
boolean
isFirstOrderValid
(
Long
consignorId
,
Long
consignee
Id
,
ScoreRuleOrderVExtraVO
extraInfo
)
{
if
(
extraInfo
.
getFirstOrder
()
==
YesOrNoTypeEnum
.
YES
.
ordinal
())
{
if
(
extraInfo
.
getFirstOrder
()
==
YesOrNoTypeEnum
.
YES
.
ordinal
())
{
if
(
userId
==
null
||
userId
<=
0
)
{
if
(
!
orderApi
.
isFirstOrder
(
consignorId
)
)
{
log
.
info
(
"Order in shipping listener:
The user is not member,userId:{}"
,
use
rId
);
log
.
info
(
"Order in shipping listener:
consignor not first order,consignorId:{}"
,
consigno
rId
);
return
false
;
return
false
;
}
}
if
(!
orderApi
.
isFirstOrder
(
user
Id
))
{
if
(!
orderApi
.
isFirstOrder
(
consignee
Id
))
{
log
.
info
(
"Order in shipping listener:
Not first order,userId:{}"
,
user
Id
);
log
.
info
(
"Order in shipping listener:
consignee not first order,consigneeId:{}"
,
consignee
Id
);
return
false
;
return
false
;
}
}
}
}
...
...
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/service/ScoreRuleShareRecord/ScoreRuleShareRecordServiceImpl.java
View file @
9ffeceec
...
@@ -72,7 +72,7 @@ public class ScoreRuleShareRecordServiceImpl extends AbstractService<ScoreRuleSh
...
@@ -72,7 +72,7 @@ public class ScoreRuleShareRecordServiceImpl extends AbstractService<ScoreRuleSh
if
(
item
.
getIpAddress
().
contains
(
"SHARE"
))
{
if
(
item
.
getIpAddress
().
contains
(
"SHARE"
))
{
String
[]
split
=
item
.
getIpAddress
().
split
(
"_"
);
String
[]
split
=
item
.
getIpAddress
().
split
(
"_"
);
item
.
setIpAddress
(
split
[
split
.
length
-
1
]);
item
.
setIpAddress
(
split
[
split
.
length
-
1
]);
}
else
{
}
else
if
(
item
.
getIpAddress
().
contains
(
"RECOMMEND"
))
{
item
.
setIpAddress
(
"-"
);
item
.
setIpAddress
(
"-"
);
}
}
item
.
setTypeZh
(
DictFrameworkUtils
.
getDictDataFromCache
(
"score_rule_type"
,
item
.
getType
().
toString
()).
getLabel
());
item
.
setTypeZh
(
DictFrameworkUtils
.
getDictDataFromCache
(
"score_rule_type"
,
item
.
getType
().
toString
()).
getLabel
());
...
...
yudao-module-order/yudao-module-order-api/src/main/java/cn/iocoder/boot/module/order/api/OrderApi.java
View file @
9ffeceec
...
@@ -14,9 +14,9 @@ public interface OrderApi {
...
@@ -14,9 +14,9 @@ public interface OrderApi {
*/
*/
OrderRespDTO
getOrder
(
Long
id
,
String
orderNo
);
OrderRespDTO
getOrder
(
Long
id
,
String
orderNo
);
/**
/**
* 判断
是否用户
首单
* 判断
客户是否
首单
*/
*/
boolean
isFirstOrder
(
Long
us
erId
);
boolean
isFirstOrder
(
Long
custom
erId
);
/**
/**
* 根据订单id获取所有订单项
* 根据订单id获取所有订单项
*/
*/
...
...
yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/api/OrderApiImpl.java
View file @
9ffeceec
...
@@ -87,9 +87,9 @@ public class OrderApiImpl implements OrderApi {
...
@@ -87,9 +87,9 @@ public class OrderApiImpl implements OrderApi {
}
}
@Override
@Override
public
boolean
isFirstOrder
(
Long
us
erId
)
{
public
boolean
isFirstOrder
(
Long
custom
erId
)
{
Long
count
=
orderService
.
selectCount
(
new
LambdaQueryWrapper
<
OrderDO
>().
eq
(
OrderDO:
:
getUserId
,
userId
));
// 只要发过货或者收过货都不算首单
return
count
<=
0
;
return
orderConsignorService
.
selectCount
(
"customer_id"
,
customerId
)
<=
1
&&
orderConsigneeService
.
selectCount
(
"customer_id"
,
customerId
)
<=
1
;
}
}
@Override
@Override
...
...
yudao-module-reward/yudao-module-reward-api/src/main/java/cn/iocoder/yudao/module/reward/api/reward/RedeemRewardApi.java
View file @
9ffeceec
...
@@ -4,6 +4,7 @@ import cn.iocoder.yudao.module.reward.api.reward.dto.RedeemDetailForUserDTO;
...
@@ -4,6 +4,7 @@ import cn.iocoder.yudao.module.reward.api.reward.dto.RedeemDetailForUserDTO;
import
cn.iocoder.yudao.module.reward.api.reward.dto.RedeemRewardReqVO
;
import
cn.iocoder.yudao.module.reward.api.reward.dto.RedeemRewardReqVO
;
import
cn.iocoder.yudao.module.reward.api.reward.dto.RedeemRewardRespDTO
;
import
cn.iocoder.yudao.module.reward.api.reward.dto.RedeemRewardRespDTO
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -25,8 +26,9 @@ public interface RedeemRewardApi {
...
@@ -25,8 +26,9 @@ public interface RedeemRewardApi {
* @param redeemRewardReqVO
* @param redeemRewardReqVO
* @param pointsRequire
* @param pointsRequire
* @param rewardId
* @param rewardId
* @param holdScore
*/
*/
void
executeRedeem
(
RedeemRewardReqVO
redeemRewardReqVO
,
Integer
pointsRequire
,
Long
rewardId
);
void
executeRedeem
(
RedeemRewardReqVO
redeemRewardReqVO
,
Integer
pointsRequire
,
Long
rewardId
,
Integer
holdScore
);
/**
/**
* 批量兑换礼品
* 批量兑换礼品
...
@@ -42,8 +44,9 @@ public interface RedeemRewardApi {
...
@@ -42,8 +44,9 @@ public interface RedeemRewardApi {
* @param redeemRewardReqVOList
* @param redeemRewardReqVOList
* @param pointsRequire
* @param pointsRequire
* @param rewardId
* @param rewardId
* @param holdScoreMap
*/
*/
void
batchExecuteRedeem
(
List
<
RedeemRewardReqVO
>
redeemRewardReqVOList
,
Integer
pointsRequire
,
Long
rewardId
);
void
batchExecuteRedeem
(
List
<
RedeemRewardReqVO
>
redeemRewardReqVOList
,
Integer
pointsRequire
,
Long
rewardId
,
HashMap
<
Long
,
Integer
>
holdScoreMap
);
/**
/**
* 客户端获取礼品详情
* 客户端获取礼品详情
...
...
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/api/reward/RedeemRewardApiImpl.java
View file @
9ffeceec
...
@@ -102,7 +102,7 @@ public class RedeemRewardApiImpl implements RedeemRewardApi {
...
@@ -102,7 +102,7 @@ public class RedeemRewardApiImpl implements RedeemRewardApi {
throw
exception
(
GET_LOCK_FAILED
);
throw
exception
(
GET_LOCK_FAILED
);
}
}
RedeemRewardApi
currentProxy
=
(
RedeemRewardApi
)
AopContext
.
currentProxy
();
RedeemRewardApi
currentProxy
=
(
RedeemRewardApi
)
AopContext
.
currentProxy
();
currentProxy
.
executeRedeem
(
redeemRewardReqVO
,
rewardDO
.
getPointsRequire
(),
rewardDO
.
getId
());
currentProxy
.
executeRedeem
(
redeemRewardReqVO
,
rewardDO
.
getPointsRequire
(),
rewardDO
.
getId
()
,
memberUser
.
getHoldScore
()
);
}
catch
(
InterruptedException
e
)
{
}
catch
(
InterruptedException
e
)
{
throw
exception
(
GET_LOCK_FAILED
);
throw
exception
(
GET_LOCK_FAILED
);
}
finally
{
}
finally
{
...
@@ -113,9 +113,9 @@ public class RedeemRewardApiImpl implements RedeemRewardApi {
...
@@ -113,9 +113,9 @@ public class RedeemRewardApiImpl implements RedeemRewardApi {
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
executeRedeem
(
RedeemRewardReqVO
redeemRewardReqVO
,
Integer
pointsRequire
,
Long
rewardId
)
{
public
void
executeRedeem
(
RedeemRewardReqVO
redeemRewardReqVO
,
Integer
pointsRequire
,
Long
rewardId
,
Integer
holdScore
)
{
// 添加兑换记录
// 添加兑换记录
RewardRedeemDO
redeemRecord
=
addRedeemRecord
(
redeemRewardReqVO
,
pointsRequire
);
RewardRedeemDO
redeemRecord
=
addRedeemRecord
(
redeemRewardReqVO
,
pointsRequire
,
holdScore
);
// 更新会员积分
// 更新会员积分
updateMemberScore
(
redeemRewardReqVO
,
pointsRequire
,
redeemRecord
.
getId
(),
redeemRecord
.
getRedemptionNumber
());
updateMemberScore
(
redeemRewardReqVO
,
pointsRequire
,
redeemRecord
.
getId
(),
redeemRecord
.
getRedemptionNumber
());
// 更新礼品
// 更新礼品
...
@@ -187,11 +187,12 @@ public class RedeemRewardApiImpl implements RedeemRewardApi {
...
@@ -187,11 +187,12 @@ public class RedeemRewardApiImpl implements RedeemRewardApi {
.
build
());
.
build
());
}
}
private
RewardRedeemDO
addRedeemRecord
(
RedeemRewardReqVO
redeemRewardReqVO
,
Integer
pointsRequire
)
{
private
RewardRedeemDO
addRedeemRecord
(
RedeemRewardReqVO
redeemRewardReqVO
,
Integer
pointsRequire
,
Integer
holdScore
)
{
RewardRedeemDO
rewardRedeemDO
=
BeanUtil
.
copyProperties
(
redeemRewardReqVO
,
RewardRedeemDO
.
class
);
RewardRedeemDO
rewardRedeemDO
=
BeanUtil
.
copyProperties
(
redeemRewardReqVO
,
RewardRedeemDO
.
class
);
rewardRedeemDO
.
setId
(
snowflakeGenerator
.
next
());
rewardRedeemDO
.
setId
(
snowflakeGenerator
.
next
());
rewardRedeemDO
.
setRedemptionNumber
(
rewardGenCodeUtils
.
generateRedemptionNumber
());
rewardRedeemDO
.
setRedemptionNumber
(
rewardGenCodeUtils
.
generateRedemptionNumber
());
rewardRedeemDO
.
setStatus
(
RewardRedeemStatusEnum
.
REDEEMING
.
getValue
());
rewardRedeemDO
.
setStatus
(
RewardRedeemStatusEnum
.
REDEEMING
.
getValue
());
rewardRedeemDO
.
setHoldScoreBeforeRedeem
(
holdScore
);
rewardRedeemDO
.
setScoreCount
(
redeemRewardReqVO
.
getRewardCount
()
*
pointsRequire
);
rewardRedeemDO
.
setScoreCount
(
redeemRewardReqVO
.
getRewardCount
()
*
pointsRequire
);
rewardRedeemMapper
.
insert
(
rewardRedeemDO
);
rewardRedeemMapper
.
insert
(
rewardRedeemDO
);
return
rewardRedeemDO
;
return
rewardRedeemDO
;
...
@@ -214,6 +215,7 @@ public class RedeemRewardApiImpl implements RedeemRewardApi {
...
@@ -214,6 +215,7 @@ public class RedeemRewardApiImpl implements RedeemRewardApi {
throw
exception
(
REWARD_NOT_ENABLE
);
throw
exception
(
REWARD_NOT_ENABLE
);
}
}
int
totalCount
=
0
;
int
totalCount
=
0
;
HashMap
<
Long
,
Integer
>
holdScoreMap
=
new
HashMap
<>();
for
(
RedeemRewardReqVO
redeemRewardReqVO
:
redeemRewardReqVOList
)
{
for
(
RedeemRewardReqVO
redeemRewardReqVO
:
redeemRewardReqVOList
)
{
UserRespDTO
memberUser
=
memberUserApi
.
getUser
(
redeemRewardReqVO
.
getMemberId
());
UserRespDTO
memberUser
=
memberUserApi
.
getUser
(
redeemRewardReqVO
.
getMemberId
());
if
(
memberUser
==
null
)
{
if
(
memberUser
==
null
)
{
...
@@ -230,6 +232,7 @@ public class RedeemRewardApiImpl implements RedeemRewardApi {
...
@@ -230,6 +232,7 @@ public class RedeemRewardApiImpl implements RedeemRewardApi {
}
}
}
}
verifyMemberUser
(
redeemRewardReqVO
,
rewardDO
,
memberUser
.
getHoldScore
());
verifyMemberUser
(
redeemRewardReqVO
,
rewardDO
,
memberUser
.
getHoldScore
());
holdScoreMap
.
put
(
redeemRewardReqVO
.
getMemberId
(),
memberUser
.
getHoldScore
());
// 记录兑换总数
// 记录兑换总数
totalCount
+=
redeemRewardReqVO
.
getRewardCount
();
totalCount
+=
redeemRewardReqVO
.
getRewardCount
();
// 判断兑换总数是否大于礼物数量
// 判断兑换总数是否大于礼物数量
...
@@ -244,7 +247,7 @@ public class RedeemRewardApiImpl implements RedeemRewardApi {
...
@@ -244,7 +247,7 @@ public class RedeemRewardApiImpl implements RedeemRewardApi {
throw
exception
(
GET_LOCK_FAILED
);
throw
exception
(
GET_LOCK_FAILED
);
}
}
RedeemRewardApi
currentProxy
=
(
RedeemRewardApi
)
AopContext
.
currentProxy
();
RedeemRewardApi
currentProxy
=
(
RedeemRewardApi
)
AopContext
.
currentProxy
();
currentProxy
.
batchExecuteRedeem
(
redeemRewardReqVOList
,
rewardDO
.
getPointsRequire
(),
rewardDO
.
getId
());
currentProxy
.
batchExecuteRedeem
(
redeemRewardReqVOList
,
rewardDO
.
getPointsRequire
(),
rewardDO
.
getId
()
,
holdScoreMap
);
}
catch
(
ServiceException
e
)
{
}
catch
(
ServiceException
e
)
{
log
.
error
(
"batch redeem rewards exception:{}"
,
e
.
getMessage
());
log
.
error
(
"batch redeem rewards exception:{}"
,
e
.
getMessage
());
throw
e
;
throw
e
;
...
@@ -258,9 +261,9 @@ public class RedeemRewardApiImpl implements RedeemRewardApi {
...
@@ -258,9 +261,9 @@ public class RedeemRewardApiImpl implements RedeemRewardApi {
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
batchExecuteRedeem
(
List
<
RedeemRewardReqVO
>
redeemRewardReqVOList
,
Integer
pointsRequire
,
Long
rewardId
)
{
public
void
batchExecuteRedeem
(
List
<
RedeemRewardReqVO
>
redeemRewardReqVOList
,
Integer
pointsRequire
,
Long
rewardId
,
HashMap
<
Long
,
Integer
>
holdScoreMap
)
{
for
(
RedeemRewardReqVO
redeemRewardReqVO
:
redeemRewardReqVOList
)
{
for
(
RedeemRewardReqVO
redeemRewardReqVO
:
redeemRewardReqVOList
)
{
executeRedeem
(
redeemRewardReqVO
,
pointsRequire
,
rewardId
);
executeRedeem
(
redeemRewardReqVO
,
pointsRequire
,
rewardId
,
holdScoreMap
.
get
(
redeemRewardReqVO
.
getMemberId
())
);
}
}
}
}
...
...
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/controller/admin/reward/RewardController.java
View file @
9ffeceec
...
@@ -91,7 +91,7 @@ public class RewardController {
...
@@ -91,7 +91,7 @@ public class RewardController {
rewardBackVOPageResult
.
getList
().
forEach
(
rewardBackVO
->
{
rewardBackVOPageResult
.
getList
().
forEach
(
rewardBackVO
->
{
List
<
Integer
>
nodeId
=
new
ArrayList
<>();
List
<
Integer
>
nodeId
=
new
ArrayList
<>();
nodeId
.
add
(
rewardBackVO
.
getNodeId
());
nodeId
.
add
(
rewardBackVO
.
getNodeId
());
rewardBackVO
.
getNodeIds
().
add
(
new
RewardBackVO
.
NodeAndPoints
(
nodeId
,
rewardBackVO
.
get
PointsRequire
(),
rewardBackVO
.
getQuantityRemain
()));
rewardBackVO
.
getNodeIds
().
add
(
new
RewardBackVO
.
NodeAndPoints
(
nodeId
,
rewardBackVO
.
get
QuantityRemain
(),
rewardBackVO
.
getPointsRequire
()));
});
});
return
success
(
rewardBackVOPageResult
);
return
success
(
rewardBackVOPageResult
);
}
}
...
...
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/dal/dataobject/redeem/RewardRedeemDO.java
View file @
9ffeceec
...
@@ -37,6 +37,13 @@ public class RewardRedeemDO extends BaseDO {
...
@@ -37,6 +37,13 @@ public class RewardRedeemDO extends BaseDO {
* 兑换状态
* 兑换状态
*/
*/
private
Integer
status
;
private
Integer
status
;
/**
* 兑换前持有的积分
*/
private
Integer
holdScoreBeforeRedeem
;
/**
* 兑换消耗积分数量
*/
private
Integer
scoreCount
;
private
Integer
scoreCount
;
/**
/**
* 兑换数量
* 兑换数量
...
...
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/service/reward/RewardServiceImpl.java
View file @
9ffeceec
...
@@ -135,6 +135,13 @@ public class RewardServiceImpl extends AbstractService<RewardMapper, RewardDO> i
...
@@ -135,6 +135,13 @@ public class RewardServiceImpl extends AbstractService<RewardMapper, RewardDO> i
throw
exception
(
REWARD_NOT_EXISTS
);
throw
exception
(
REWARD_NOT_EXISTS
);
}
}
RewardDO
updateObj
=
new
RewardDO
();
RewardDO
updateObj
=
new
RewardDO
();
// 此处为了兼容前端传值
List
<
RewardCreateReqVO
.
NodeAndPoints
>
nodeIds
=
updateReqVO
.
getNodeIds
();
if
(
CollectionUtil
.
isEmpty
(
nodeIds
))
{
throw
exception
(
REWARD_NODE_AND_POINTS_LIST_ERROR
);
}
RewardCreateReqVO
.
NodeAndPoints
nodeAndPoints
=
nodeIds
.
get
(
0
);
//未启用可编辑所有内容
//未启用可编辑所有内容
if
(
rewardDO
.
getStatus
()
==
RewardStatusEnum
.
DISABLED
.
getValue
())
{
if
(
rewardDO
.
getStatus
()
==
RewardStatusEnum
.
DISABLED
.
getValue
())
{
// 校验领取方式
// 校验领取方式
...
@@ -150,19 +157,15 @@ public class RewardServiceImpl extends AbstractService<RewardMapper, RewardDO> i
...
@@ -150,19 +157,15 @@ public class RewardServiceImpl extends AbstractService<RewardMapper, RewardDO> i
}
else
{
}
else
{
throw
exception
(
REWARD_START_OR_END_TIME_NOT_ALLOW
);
throw
exception
(
REWARD_START_OR_END_TIME_NOT_ALLOW
);
}
}
List
<
RewardUpdateReqVO
.
NodeAndPoints
>
nodeIds
=
updateReqVO
.
getNodeIds
();
if
(
CollectionUtil
.
isEmpty
(
nodeIds
))
{
throw
exception
(
REWARD_NODE_AND_POINTS_LIST_ERROR
);
}
RewardUpdateReqVO
.
NodeAndPoints
nodeAndPoints
=
nodeIds
.
get
(
0
);
updateObj
=
RewardConvert
.
INSTANCE
.
convert
(
updateReqVO
);
updateObj
=
RewardConvert
.
INSTANCE
.
convert
(
updateReqVO
);
updateObj
.
setPointsRequire
(
nodeAndPoints
.
getPoints
());
updateObj
.
setPointsRequire
(
nodeAndPoints
.
getPoints
());
updateObj
.
setNodeId
(
nodeAndPoints
.
getNodeId
());
updateObj
.
setNodeId
(
nodeAndPoints
.
getWareHouses
().
get
(
0
));
updateObj
.
setQuantityRemain
(
nodeAndPoints
.
getQuantityRemain
());
//已启用可编辑剩余数量和备注
//已启用可编辑剩余数量和备注
}
else
if
(
rewardDO
.
getStatus
()
==
RewardStatusEnum
.
ENABLED
.
getValue
())
{
}
else
if
(
rewardDO
.
getStatus
()
==
RewardStatusEnum
.
ENABLED
.
getValue
())
{
updateObj
.
setId
(
updateReqVO
.
getId
());
updateObj
.
setId
(
updateReqVO
.
getId
());
updateObj
.
setQuantityRemain
(
updateReqVO
.
getQuantityRemain
());
updateObj
.
setQuantityRemain
(
nodeAndPoints
.
getQuantityRemain
());
updateObj
.
setRemarkEn
(
updateReqVO
.
getRemarkEn
());
updateObj
.
setRemarkEn
(
updateReqVO
.
getRemarkEn
());
updateObj
.
setRemarkFr
(
updateReqVO
.
getRemarkFr
());
updateObj
.
setRemarkFr
(
updateReqVO
.
getRemarkFr
());
updateObj
.
setRemarkZh
(
updateReqVO
.
getRemarkZh
());
updateObj
.
setRemarkZh
(
updateReqVO
.
getRemarkZh
());
...
...
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/vo/reward/RewardUpdateReqVO.java
View file @
9ffeceec
...
@@ -44,19 +44,9 @@ public class RewardUpdateReqVO {
...
@@ -44,19 +44,9 @@ public class RewardUpdateReqVO {
@ApiModelProperty
(
value
=
"法文礼品图片"
)
@ApiModelProperty
(
value
=
"法文礼品图片"
)
private
String
imgFr
;
private
String
imgFr
;
//@ApiModelProperty(value = "兑换所需积分")
//@Min(value = 0)
//private Integer pointsRequire;
//@ApiModelProperty(value = "兑换网点")
//private Integer nodeId;
@ApiModelProperty
(
value
=
"兑换网点和积分列表"
,
required
=
true
)
@ApiModelProperty
(
value
=
"兑换网点和积分列表"
,
required
=
true
)
@NotNull
(
message
=
"兑换网点列表不能为空"
)
@NotNull
(
message
=
"兑换网点列表不能为空"
)
private
List
<
RewardUpdateReqVO
.
NodeAndPoints
>
nodeIds
;
private
List
<
RewardCreateReqVO
.
NodeAndPoints
>
nodeIds
;
@ApiModelProperty
(
value
=
"剩余数量"
)
@Min
(
value
=
0
)
private
Integer
quantityRemain
;
@ApiModelProperty
(
value
=
"活动开始时间"
)
@ApiModelProperty
(
value
=
"活动开始时间"
)
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
...
@@ -84,12 +74,4 @@ public class RewardUpdateReqVO {
...
@@ -84,12 +74,4 @@ public class RewardUpdateReqVO {
@ApiModelProperty
(
value
=
"法文备注"
)
@ApiModelProperty
(
value
=
"法文备注"
)
@Size
(
max
=
500
,
message
=
"法文备注长度不能超过500"
)
@Size
(
max
=
500
,
message
=
"法文备注长度不能超过500"
)
private
String
remarkFr
;
private
String
remarkFr
;
@Data
public
static
class
NodeAndPoints
{
@ApiModelProperty
(
value
=
"兑换网点"
)
private
Integer
nodeId
;
@ApiModelProperty
(
value
=
"兑换网点对应积分"
)
private
Integer
points
;
}
}
}
yudao-module-reward/yudao-module-reward-impl/src/main/resources/mapper/RewardRedeemMapper.xml
View file @
9ffeceec
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
</select>
</select>
<select
id=
"detail"
resultType=
"cn.iocoder.yudao.module.reward.vo.reward.RewardRedeemPageRespVO"
>
<select
id=
"detail"
resultType=
"cn.iocoder.yudao.module.reward.vo.reward.RewardRedeemPageRespVO"
>
select
select
mus.hold_score
as holdScore,
err.hold_score_before_redeem
as holdScore,
er.points_require as pointsRequire,
er.points_require as pointsRequire,
er.start_time as startTime,
er.start_time as startTime,
er.end_time as endTime,
er.end_time as endTime,
...
...
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/controller/admin/banner/BannerController.java
View file @
9ffeceec
...
@@ -61,7 +61,7 @@ public class BannerController {
...
@@ -61,7 +61,7 @@ public class BannerController {
@GetMapping
(
"/get"
)
@GetMapping
(
"/get"
)
@ApiOperation
(
"获得广告设置"
)
@ApiOperation
(
"获得广告设置"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"编号"
,
required
=
true
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"编号"
,
required
=
true
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
)
@PreAuthorize
(
"@ss.hasPermission('ecw:banner:query')"
)
//
@PreAuthorize("@ss.hasPermission('ecw:banner:query')")
public
CommonResult
<
BannerBackVO
>
getBanner
(
@RequestParam
(
"id"
)
Long
id
)
{
public
CommonResult
<
BannerBackVO
>
getBanner
(
@RequestParam
(
"id"
)
Long
id
)
{
BannerDO
banner
=
bannerService
.
getBanner
(
id
);
BannerDO
banner
=
bannerService
.
getBanner
(
id
);
return
success
(
BannerConvert
.
INSTANCE
.
convert
(
banner
));
return
success
(
BannerConvert
.
INSTANCE
.
convert
(
banner
));
...
@@ -70,7 +70,7 @@ public class BannerController {
...
@@ -70,7 +70,7 @@ public class BannerController {
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
@ApiOperation
(
"获得广告设置列表"
)
@ApiOperation
(
"获得广告设置列表"
)
@ApiImplicitParam
(
name
=
"ids"
,
value
=
"编号列表"
,
required
=
true
,
example
=
"1024,2048"
,
dataTypeClass
=
List
.
class
)
@ApiImplicitParam
(
name
=
"ids"
,
value
=
"编号列表"
,
required
=
true
,
example
=
"1024,2048"
,
dataTypeClass
=
List
.
class
)
@PreAuthorize
(
"@ss.hasPermission('ecw:banner:query')"
)
//
@PreAuthorize("@ss.hasPermission('ecw:banner:query')")
public
CommonResult
<
List
<
BannerBackVO
>>
getBannerList
(
@RequestParam
(
"ids"
)
Collection
<
Long
>
ids
)
{
public
CommonResult
<
List
<
BannerBackVO
>>
getBannerList
(
@RequestParam
(
"ids"
)
Collection
<
Long
>
ids
)
{
List
<
BannerDO
>
list
=
bannerService
.
getBannerList
(
ids
);
List
<
BannerDO
>
list
=
bannerService
.
getBannerList
(
ids
);
return
success
(
BannerConvert
.
INSTANCE
.
convertList
(
list
));
return
success
(
BannerConvert
.
INSTANCE
.
convertList
(
list
));
...
@@ -78,7 +78,7 @@ public class BannerController {
...
@@ -78,7 +78,7 @@ public class BannerController {
@GetMapping
(
"/page"
)
@GetMapping
(
"/page"
)
@ApiOperation
(
"获得广告设置分页"
)
@ApiOperation
(
"获得广告设置分页"
)
@PreAuthorize
(
"@ss.hasPermission('ecw:banner:query')"
)
//
@PreAuthorize("@ss.hasPermission('ecw:banner:query')")
public
CommonResult
<
PageResult
<
BannerBackVO
>>
getBannerPage
(
@Valid
BannerQueryVO
query
,
PageVO
page
)
{
public
CommonResult
<
PageResult
<
BannerBackVO
>>
getBannerPage
(
@Valid
BannerQueryVO
query
,
PageVO
page
)
{
PageResult
<
BannerDO
>
pageResult
=
bannerService
.
getBannerPage
(
query
,
page
);
PageResult
<
BannerDO
>
pageResult
=
bannerService
.
getBannerPage
(
query
,
page
);
return
success
(
BannerConvert
.
INSTANCE
.
convertPage
(
pageResult
));
return
success
(
BannerConvert
.
INSTANCE
.
convertPage
(
pageResult
));
...
...
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