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
4b6c4fa7
Commit
4b6c4fa7
authored
Jul 25, 2024
by
zhangfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feature-reward:调整目录结构,批量兑换
parent
ae75f29e
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
220 additions
and
36 deletions
+220
-36
RedeemRewardApi.java
...coder/yudao/module/reward/api/reward/RedeemRewardApi.java
+16
-0
RedeemRewardReqVO.java
...yudao/module/reward/api/reward/dto/RedeemRewardReqVO.java
+74
-0
RedeemRewardRespDTO.java
...dao/module/reward/api/reward/dto/RedeemRewardRespDTO.java
+15
-0
RedeemRewardApiImpl.java
...r/yudao/module/reward/api/reward/RedeemRewardApiImpl.java
+23
-0
RedeemRewardController.java
...eward/controller/admin/reward/RedeemRewardController.java
+44
-0
RewardConvert.java
...der/yudao/module/reward/convert/reward/RewardConvert.java
+0
-0
RewardDO.java
...r/yudao/module/reward/dal/dataobject/reward/RewardDO.java
+5
-3
RewardMapper.java
...er/yudao/module/reward/dal/mysql/reward/RewardMapper.java
+5
-4
RewardService.java
...der/yudao/module/reward/service/reward/RewardService.java
+7
-5
RewardServiceImpl.java
...yudao/module/reward/service/reward/RewardServiceImpl.java
+0
-3
RewardBackVO.java
...n/iocoder/yudao/module/reward/vo/reward/RewardBackVO.java
+6
-3
RewardBaseVO.java
...n/iocoder/yudao/module/reward/vo/reward/RewardBaseVO.java
+4
-4
RewardCreateReqVO.java
...oder/yudao/module/reward/vo/reward/RewardCreateReqVO.java
+8
-4
RewardDelayReqVO.java
...coder/yudao/module/reward/vo/reward/RewardDelayReqVO.java
+0
-0
RewardQueryVO.java
.../iocoder/yudao/module/reward/vo/reward/RewardQueryVO.java
+5
-4
RewardStatusReqVO.java
...oder/yudao/module/reward/vo/reward/RewardStatusReqVO.java
+0
-0
RewardUpdateReqVO.java
...oder/yudao/module/reward/vo/reward/RewardUpdateReqVO.java
+8
-6
No files found.
yudao-module-reward/yudao-module-reward-api/src/main/java/cn/iocoder/yudao/module/reward/api/reward/RedeemRewardApi.java
0 → 100644
View file @
4b6c4fa7
package
cn
.
iocoder
.
yudao
.
module
.
reward
.
api
.
reward
;
import
cn.iocoder.yudao.module.reward.api.reward.dto.RedeemRewardReqVO
;
import
cn.iocoder.yudao.module.reward.api.reward.dto.RedeemRewardRespDTO
;
import
java.util.List
;
/**
* 礼品兑换 api 接口
*/
public
interface
RedeemRewardApi
{
RedeemRewardRespDTO
redeemReward
(
RedeemRewardReqVO
redeemRewardReqVO
);
List
<
RedeemRewardRespDTO
>
redeemRewards
(
List
<
RedeemRewardReqVO
>
redeemRewardReqVOList
);
}
yudao-module-reward/yudao-module-reward-api/src/main/java/cn/iocoder/yudao/module/reward/api/reward/dto/RedeemRewardReqVO.java
0 → 100644
View file @
4b6c4fa7
package
cn
.
iocoder
.
yudao
.
module
.
reward
.
api
.
reward
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
;
@Data
@ApiModel
(
"管理后台 - 礼品兑换 Request VO"
)
public
class
RedeemRewardReqVO
{
@ApiModelProperty
(
value
=
"会员名称"
)
private
String
memberName
;
@ApiModelProperty
(
value
=
"当前积分"
)
private
Integer
score
;
@ApiModelProperty
(
value
=
"礼品id"
)
private
Long
rewardId
;
@ApiModelProperty
(
value
=
"兑换数量"
)
private
Integer
count
;
@ApiModelProperty
(
value
=
"兑换方式,同领取方式(1上门领取,2包邮到家,3邮寄到付)"
)
private
Integer
pickMethod
;
@ApiModelProperty
(
value
=
"兑换入口(后台,app,web)"
)
private
String
entrance
;
@ApiModelProperty
(
value
=
"费用数字(两位小数)"
)
private
Integer
expenses
;
@ApiModelProperty
(
value
=
"费用币种(字典配置)"
)
private
Integer
currency
;
@ApiModelProperty
(
value
=
"收件人姓名"
)
private
String
recipientName
;
@ApiModelProperty
(
value
=
"收件人电话"
)
private
String
recipientPhoneNum
;
@ApiModelProperty
(
value
=
"收件人地址"
)
private
String
recipientAddress
;
@ApiModelProperty
(
value
=
"兑换人"
)
private
String
redeemer
;
@ApiModelProperty
(
value
=
"兑换时间"
)
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
private
Date
redemptionTime
;
@ApiModelProperty
(
value
=
"快递公司"
)
private
String
courierCompany
;
@ApiModelProperty
(
value
=
"快递单号"
)
private
String
expressNo
;
@ApiModelProperty
(
value
=
"快递日期"
)
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
private
Date
expressDate
;
@ApiModelProperty
(
value
=
"快递寄出人"
)
private
String
expressSender
;
@ApiModelProperty
(
value
=
"上传附件"
)
private
String
annex
;
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
}
yudao-module-reward/yudao-module-reward-api/src/main/java/cn/iocoder/yudao/module/reward/api/reward/dto/RedeemRewardRespDTO.java
0 → 100644
View file @
4b6c4fa7
package
cn
.
iocoder
.
yudao
.
module
.
reward
.
api
.
reward
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
@ApiModel
(
"管理后台 - 礼品兑换 Response VO"
)
public
class
RedeemRewardRespDTO
{
@ApiModelProperty
(
value
=
"兑换操作结果"
)
private
Boolean
exchangeResult
;
@ApiModelProperty
(
value
=
"兑换操作详情"
)
private
String
msg
;
}
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/api/reward/RedeemRewardApiImpl.java
0 → 100644
View file @
4b6c4fa7
package
cn
.
iocoder
.
yudao
.
module
.
reward
.
api
.
reward
;
import
cn.iocoder.yudao.module.reward.api.reward.dto.RedeemRewardReqVO
;
import
cn.iocoder.yudao.module.reward.api.reward.dto.RedeemRewardRespDTO
;
import
org.springframework.stereotype.Service
;
import
org.springframework.validation.annotation.Validated
;
import
java.util.List
;
@Service
@Validated
public
class
RedeemRewardApiImpl
implements
RedeemRewardApi
{
@Override
public
RedeemRewardRespDTO
redeemReward
(
RedeemRewardReqVO
redeemRewardReqVO
)
{
return
null
;
}
@Override
public
List
<
RedeemRewardRespDTO
>
redeemRewards
(
List
<
RedeemRewardReqVO
>
redeemRewardReqVOList
)
{
return
null
;
}
}
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/controller/admin/reward/RedeemRewardController.java
0 → 100644
View file @
4b6c4fa7
package
cn
.
iocoder
.
yudao
.
module
.
reward
.
controller
.
admin
.
reward
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.module.reward.api.reward.RedeemRewardApi
;
import
cn.iocoder.yudao.module.reward.api.reward.dto.RedeemRewardReqVO
;
import
cn.iocoder.yudao.module.reward.api.reward.dto.RedeemRewardRespDTO
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
javax.validation.Valid
;
import
java.util.List
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
@Validated
@RestController
@Api
(
tags
=
"管理后台 - 礼品管理"
)
@RequestMapping
(
"/reward/redeem"
)
public
class
RedeemRewardController
{
@Resource
private
RedeemRewardApi
redeemRewardApi
;
@PostMapping
(
"/single"
)
@ApiOperation
(
"兑换礼品"
)
//@PreAuthorize("@ss.hasPermission('reward::redeem')")
public
CommonResult
<
RedeemRewardRespDTO
>
redeemReward
(
@Valid
@RequestBody
RedeemRewardReqVO
redeemRewardReqVO
)
{
return
success
(
redeemRewardApi
.
redeemReward
(
redeemRewardReqVO
));
}
@PostMapping
(
"/batch"
)
@ApiOperation
(
"批量兑换礼品"
)
//@PreAuthorize("@ss.hasPermission('reward::redeem')")
public
CommonResult
<
List
<
RedeemRewardRespDTO
>>
redeemRewards
(
@Valid
@RequestBody
List
<
RedeemRewardReqVO
>
redeemRewardReqVOList
)
{
return
success
(
redeemRewardApi
.
redeemRewards
(
redeemRewardReqVOList
));
}
}
yudao-module-reward/yudao-module-reward-
api
/src/main/java/cn/iocoder/yudao/module/reward/convert/reward/RewardConvert.java
→
yudao-module-reward/yudao-module-reward-
impl
/src/main/java/cn/iocoder/yudao/module/reward/convert/reward/RewardConvert.java
View file @
4b6c4fa7
File moved
yudao-module-reward/yudao-module-reward-
api
/src/main/java/cn/iocoder/yudao/module/reward/dal/dataobject/reward/RewardDO.java
→
yudao-module-reward/yudao-module-reward-
impl
/src/main/java/cn/iocoder/yudao/module/reward/dal/dataobject/reward/RewardDO.java
View file @
4b6c4fa7
package
cn
.
iocoder
.
yudao
.
module
.
reward
.
dal
.
dataobject
.
reward
;
import
lombok.*
;
import
java.util.*
;
import
com.baomidou.mybatisplus.annotation.*
;
import
cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.*
;
import
java.util.Date
;
/**
* 礼品 DO
...
...
yudao-module-reward/yudao-module-reward-
api
/src/main/java/cn/iocoder/yudao/module/reward/dal/mysql/reward/RewardMapper.java
→
yudao-module-reward/yudao-module-reward-
impl
/src/main/java/cn/iocoder/yudao/module/reward/dal/mysql/reward/RewardMapper.java
View file @
4b6c4fa7
package
cn
.
iocoder
.
yudao
.
module
.
reward
.
dal
.
mysql
.
reward
;
import
java.util.*
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQuery
;
import
cn.iocoder.yudao.framework.mybatis.core.mapper.AbstractMapper
;
import
cn.iocoder.yudao.
module.reward.dal.dataobject.reward.RewardDO
;
import
cn.iocoder.yudao.
framework.mybatis.core.query.LambdaQuery
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.module.reward.dal.dataobject.reward.RewardDO
;
import
cn.iocoder.yudao.module.reward.vo.reward.RewardQueryVO
;
import
org.apache.ibatis.annotations.Mapper
;
import
cn.iocoder.yudao.module.reward.vo.reward.*
;
import
java.util.List
;
/**
* 礼品 Mapper
...
...
yudao-module-reward/yudao-module-reward-
api
/src/main/java/cn/iocoder/yudao/module/reward/service/reward/RewardService.java
→
yudao-module-reward/yudao-module-reward-
impl
/src/main/java/cn/iocoder/yudao/module/reward/service/reward/RewardService.java
View file @
4b6c4fa7
package
cn
.
iocoder
.
yudao
.
module
.
reward
.
service
.
reward
;
import
java.util.*
;
import
javax.validation.*
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.mybatis.core.service.IService
;
import
cn.iocoder.yudao.
module.reward.vo.reward.*
;
import
cn.iocoder.yudao.
framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.module.reward.dal.dataobject.reward.RewardDO
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.module.reward.vo.reward.*
;
import
javax.validation.Valid
;
import
java.util.Collection
;
import
java.util.List
;
/**
* 礼品 Service 接口
...
...
yudao-module-reward/yudao-module-reward-
api
/src/main/java/cn/iocoder/yudao/module/reward/service/reward/RewardServiceImpl.java
→
yudao-module-reward/yudao-module-reward-
impl
/src/main/java/cn/iocoder/yudao/module/reward/service/reward/RewardServiceImpl.java
View file @
4b6c4fa7
package
cn
.
iocoder
.
yudao
.
module
.
reward
.
service
.
reward
;
import
cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQuery
;
import
cn.iocoder.yudao.framework.mybatis.core.service.AbstractService
;
...
...
@@ -8,7 +7,6 @@ import cn.iocoder.yudao.framework.mybatis.core.vo.PageVO;
import
cn.iocoder.yudao.module.reward.convert.reward.RewardConvert
;
import
cn.iocoder.yudao.module.reward.dal.dataobject.reward.RewardDO
;
import
cn.iocoder.yudao.module.reward.dal.mysql.reward.RewardMapper
;
import
cn.iocoder.yudao.module.reward.enums.ErrorCodeConstants
;
import
cn.iocoder.yudao.module.reward.vo.reward.*
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.RandomStringUtils
;
...
...
@@ -20,7 +18,6 @@ import java.time.Instant;
import
java.util.Collection
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.UUID
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
exception
.
util
.
ServiceExceptionUtil
.
exception
;
import
static
cn
.
iocoder
.
yudao
.
module
.
reward
.
enums
.
ErrorCodeConstants
.*;
...
...
yudao-module-reward/yudao-module-reward-
api
/src/main/java/cn/iocoder/yudao/module/reward/vo/reward/RewardBackVO.java
→
yudao-module-reward/yudao-module-reward-
impl
/src/main/java/cn/iocoder/yudao/module/reward/vo/reward/RewardBackVO.java
View file @
4b6c4fa7
package
cn
.
iocoder
.
yudao
.
module
.
reward
.
vo
.
reward
;
import
lombok.*
;
import
java.util.*
;
import
io.swagger.annotations.*
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
;
/**
...
...
yudao-module-reward/yudao-module-reward-
api
/src/main/java/cn/iocoder/yudao/module/reward/vo/reward/RewardBaseVO.java
→
yudao-module-reward/yudao-module-reward-
impl
/src/main/java/cn/iocoder/yudao/module/reward/vo/reward/RewardBaseVO.java
View file @
4b6c4fa7
package
cn
.
iocoder
.
yudao
.
module
.
reward
.
vo
.
reward
;
import
lombok.*
;
import
java.util.*
;
import
io.swagger.annotations.*
;
import
javax.validation.constraints.*
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
;
/**
...
...
yudao-module-reward/yudao-module-reward-
api
/src/main/java/cn/iocoder/yudao/module/reward/vo/reward/RewardCreateReqVO.java
→
yudao-module-reward/yudao-module-reward-
impl
/src/main/java/cn/iocoder/yudao/module/reward/vo/reward/RewardCreateReqVO.java
View file @
4b6c4fa7
package
cn
.
iocoder
.
yudao
.
module
.
reward
.
vo
.
reward
;
import
lombok.*
;
import
java.util.*
;
import
io.swagger.annotations.*
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.ToString
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
javax.validation.constraints.*
;
import
javax.validation.constraints.Min
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Size
;
import
java.util.Date
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
;
...
...
yudao-module-reward/yudao-module-reward-
api
/src/main/java/cn/iocoder/yudao/module/reward/vo/reward/RewardDelayReqVO.java
→
yudao-module-reward/yudao-module-reward-
impl
/src/main/java/cn/iocoder/yudao/module/reward/vo/reward/RewardDelayReqVO.java
View file @
4b6c4fa7
File moved
yudao-module-reward/yudao-module-reward-
api
/src/main/java/cn/iocoder/yudao/module/reward/vo/reward/RewardQueryVO.java
→
yudao-module-reward/yudao-module-reward-
impl
/src/main/java/cn/iocoder/yudao/module/reward/vo/reward/RewardQueryVO.java
View file @
4b6c4fa7
package
cn
.
iocoder
.
yudao
.
module
.
reward
.
vo
.
reward
;
import
lombok.*
;
import
java.util.*
;
import
io.swagger.annotations.*
;
import
cn.iocoder.yudao.framework.common.pojo.PageParam
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
;
@Data
...
...
yudao-module-reward/yudao-module-reward-
api
/src/main/java/cn/iocoder/yudao/module/reward/vo/reward/RewardStatusReqVO.java
→
yudao-module-reward/yudao-module-reward-
impl
/src/main/java/cn/iocoder/yudao/module/reward/vo/reward/RewardStatusReqVO.java
View file @
4b6c4fa7
File moved
yudao-module-reward/yudao-module-reward-
api
/src/main/java/cn/iocoder/yudao/module/reward/vo/reward/RewardUpdateReqVO.java
→
yudao-module-reward/yudao-module-reward-
impl
/src/main/java/cn/iocoder/yudao/module/reward/vo/reward/RewardUpdateReqVO.java
View file @
4b6c4fa7
package
cn
.
iocoder
.
yudao
.
module
.
reward
.
vo
.
reward
;
import
lombok.*
;
import
java.util.*
;
import
io.swagger.annotations.*
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.ToString
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
javax.validation.constraints.*
;
import
javax.validation.constraints.Min
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Size
;
import
java.util.Date
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
util
.
date
.
DateUtils
.
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
;
...
...
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