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
7f1f5617
Commit
7f1f5617
authored
Jul 30, 2024
by
zhaobiyan
Browse files
Options
Browse Files
Download
Plain Diff
会员积分查询新增编码筛选
parents
44476b08
98c2e74c
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
346 additions
and
8 deletions
+346
-8
RewardRedeemRecordExportEvent.java
...ollo/core/event/export/RewardRedeemRecordExportEvent.java
+46
-0
pom.xml
yudao-module-member/yudao-module-member-impl/pom.xml
+1
-1
MemberUserScoreMapper.xml
.../src/main/resources/mapper/user/MemberUserScoreMapper.xml
+1
-1
pom.xml
yudao-module-reward/yudao-module-reward-impl/pom.xml
+17
-1
RedeemRewardController.java
...eward/controller/admin/redeem/RedeemRewardController.java
+6
-0
RewardRedeemMapper.java
...ao/module/reward/dal/mysql/redeem/RewardRedeemMapper.java
+2
-0
RewardRedeemRecordExportListener.java
...ule/reward/listener/RewardRedeemRecordExportListener.java
+118
-0
RewardRedeemService.java
...dao/module/reward/service/redeem/RewardRedeemService.java
+6
-0
RewardRedeemServiceImpl.java
...module/reward/service/redeem/RewardRedeemServiceImpl.java
+31
-0
RewardRedeemBaseVO.java
...der/yudao/module/reward/vo/reward/RewardRedeemBaseVO.java
+3
-3
RewardRedeemPageRespVO.java
...yudao/module/reward/vo/reward/RewardRedeemPageRespVO.java
+5
-2
RewardRedeemRecordExportVO.java
...o/module/reward/vo/reward/RewardRedeemRecordExportVO.java
+69
-0
RewardRedeemMapper.xml
...ard-impl/src/main/resources/mapper/RewardRedeemMapper.xml
+19
-0
DownloadTypeEnum.java
.../yudao/module/system/enums/download/DownloadTypeEnum.java
+5
-0
DownloadLogServiceImpl.java
...le/system/service/downloadLog/DownloadLogServiceImpl.java
+17
-0
No files found.
yudao-framework/yudao-spring-boot-starter-config/src/main/java/cn/iocoder/yudao/framework/apollo/core/event/export/RewardRedeemRecordExportEvent.java
0 → 100644
View file @
7f1f5617
package
cn
.
iocoder
.
yudao
.
framework
.
apollo
.
core
.
event
.
export
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
public
class
RewardRedeemRecordExportEvent
{
/**
* 操作用户
*/
private
Long
userId
=
0L
;
/**
* 端口
*/
private
Integer
userType
=
2
;
/**
* 请求参数
*/
private
String
requestParams
;
/**
* 国际化语言值,默认0中文, 具体取值I18nMessage.getLang()
*/
private
Integer
lang
=
0
;
/**
* 文件名称
*/
private
String
fileName
;
/**
* 文件路径
*/
private
String
path
;
/**
* 下载地址
*/
private
String
url
;
/**
* 执行结果
*/
private
String
result
;
@ApiModelProperty
(
value
=
"文件ID"
)
private
Long
fileId
;
}
yudao-module-member/yudao-module-member-impl/pom.xml
View file @
7f1f5617
...
...
@@ -41,7 +41,7 @@
<dependency>
<groupId>
cn.iocoder.boot
</groupId>
<artifactId>
yudao-module-system-impl
</artifactId>
<version>
1.6.1-snapshot
</version>
<version>
${revision}
</version>
<scope>
compile
</scope>
</dependency>
</dependencies>
...
...
yudao-module-member/yudao-module-member-impl/src/main/resources/mapper/user/MemberUserScoreMapper.xml
View file @
7f1f5617
...
...
@@ -42,7 +42,7 @@
<sql
id=
"scoreCondition"
>
<if
test=
"query.key != null and query.key != ''"
>
and (mu.nickname like '%${query.key}%' or mu.mobile like '%${query.key}%')
and (mu.nickname like '%${query.key}%' or mu.mobile like '%${query.key}%'
or mu.code like '%${query.key}%'
)
</if>
<if
test=
"query.country != null"
>
and mu.country = #{query.country}
...
...
yudao-module-reward/yudao-module-reward-impl/pom.xml
View file @
7f1f5617
...
...
@@ -39,12 +39,28 @@
<dependency>
<groupId>
cn.iocoder.boot
</groupId>
<artifactId>
yudao-module-system-api
</artifactId>
<version>
1.6.1-snapshot
</version>
<version>
${revision}
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
cn.iocoder.boot
</groupId>
<artifactId>
yudao-module-ecw-api
</artifactId>
<version>
${revision}
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
cn.iocoder.boot
</groupId>
<artifactId>
yudao-spring-boot-starter-config
</artifactId>
</dependency>
<dependency>
<groupId>
cn.iocoder.boot
</groupId>
<artifactId>
yudao-module-system-impl
</artifactId>
<version>
1.6.1-snapshot
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
cn.iocoder.boot
</groupId>
<artifactId>
yudao-module-infra-impl
</artifactId>
<version>
1.6.1-snapshot
</version>
<scope>
compile
</scope>
</dependency>
...
...
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/controller/admin/redeem/RedeemRewardController.java
View file @
7f1f5617
...
...
@@ -72,6 +72,12 @@ public class RedeemRewardController {
return
success
(
rewardRedeemService
.
verifyBack
(
redeemIds
));
}
@PostMapping
(
"record/export"
)
@ApiOperation
(
"导出"
)
public
CommonResult
<
Boolean
>
export
(
@Valid
@RequestBody
RewardRedeemPageReqVO
reqVO
)
{
return
success
(
rewardRedeemService
.
export
(
reqVO
));
}
@PostMapping
(
"/single"
)
@ApiOperation
(
"兑换礼品"
)
...
...
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/dal/mysql/redeem/RewardRedeemMapper.java
View file @
7f1f5617
...
...
@@ -21,4 +21,6 @@ public interface RewardRedeemMapper extends AbstractMapper<RewardRedeemDO> {
int
pageCount
(
@Param
(
"req"
)
RewardRedeemPageReqVO
reqVO
);
RewardRedeemPageRespVO
detail
(
@Param
(
"id"
)
Long
id
);
List
<
RewardRedeemPageRespVO
>
exportList
(
@Param
(
"req"
)
RewardRedeemPageReqVO
request
);
}
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/listener/RewardRedeemRecordExportListener.java
0 → 100644
View file @
7f1f5617
package
cn
.
iocoder
.
yudao
.
module
.
reward
.
listener
;
import
cn.hutool.core.util.StrUtil
;
import
cn.iocoder.yudao.framework.apollo.core.event.export.RewardRedeemRecordExportEvent
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.excel.util.ExcelUtils
;
import
cn.iocoder.yudao.module.infra.api.file.FileApi
;
import
cn.iocoder.yudao.module.infra.api.file.dto.FileRespDto
;
import
cn.iocoder.yudao.module.infra.dal.dataobject.file.FileDO
;
import
cn.iocoder.yudao.module.reward.service.redeem.RewardRedeemService
;
import
cn.iocoder.yudao.module.reward.vo.reward.RewardRedeemPageReqVO
;
import
cn.iocoder.yudao.module.reward.vo.reward.RewardRedeemPageRespVO
;
import
cn.iocoder.yudao.module.reward.vo.reward.RewardRedeemRecordExportVO
;
import
cn.iocoder.yudao.module.system.framework.ue.UeProperties
;
import
com.alibaba.fastjson.JSONObject
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.context.event.EventListener
;
import
org.springframework.stereotype.Component
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
excel
.
constant
.
ExportConstant
.
DATA_FORMAT
;
@Component
@AllArgsConstructor
@Slf4j
public
class
RewardRedeemRecordExportListener
{
private
RewardRedeemService
rewardRedeemService
;
private
UeProperties
ueProperties
;
private
FileApi
fileService
;
@EventListener
(
RewardRedeemRecordExportEvent
.
class
)
public
void
listen
(
RewardRedeemRecordExportEvent
event
)
{
DateTimeFormatter
formatter
=
DateTimeFormatter
.
ofPattern
(
DATA_FORMAT
);
String
nowTime
=
formatter
.
format
(
LocalDateTime
.
now
());
String
dir
=
ueProperties
.
getTempDir
().
concat
(
"/rewardRedeemRecord/excel/"
);
File
fileDir
=
new
File
(
dir
);
if
(!
fileDir
.
exists
()){
// 不存在则创建一个目录
fileDir
.
mkdirs
();
}
String
fileName
=
event
.
getUserId
().
toString
().
concat
(
StrUtil
.
DASHED
).
concat
(
event
.
getUserType
().
toString
()).
concat
(
StrUtil
.
DASHED
).
concat
(
nowTime
).
concat
(
"shipment_preload.xlsx"
);
RewardRedeemPageReqVO
request
=
JSONObject
.
parseObject
(
event
.
getRequestParams
(),
RewardRedeemPageReqVO
.
class
);
Integer
totalCount
=
rewardRedeemService
.
exportCount
(
request
);
int
size
=
500
;
int
totalPage
=
totalCount
%
size
==
0
?
totalCount
/
size:
totalCount
/
size
+
1
;
List
<
RewardRedeemRecordExportVO
>
result
=
new
ArrayList
<>();
for
(
int
i
=
1
;
i
<=
totalPage
;
i
++)
{
request
.
setPageNo
(
i
);
request
.
setPageSize
(
size
);
PageResult
<
RewardRedeemPageRespVO
>
rewardRedeemPageRespVOPageResult
=
rewardRedeemService
.
pageInfo
(
request
);
result
.
addAll
(
convert2ExcelVo
(
rewardRedeemPageRespVOPageResult
.
getList
()));
}
try
{
String
path
=
ExcelUtils
.
write
(
dir
,
fileName
,
"数据"
,
RewardRedeemRecordExportVO
.
class
,
result
);
// 获取到临时文件
File
file
=
new
File
(
path
);
// 创建FileInputStream对象
FileInputStream
fileInputStream
=
new
FileInputStream
(
file
);
// 读取文件内容
byte
[]
fileBytes
=
new
byte
[(
int
)
file
.
length
()];
fileInputStream
.
read
(
fileBytes
);
// 关闭文件流
fileInputStream
.
close
();
// 将文件上传到资源服务器
FileRespDto
fileRespDto
=
fileService
.
createFile
(
dir
,
fileName
,
fileBytes
);
event
.
setPath
(
fileRespDto
.
getPath
());
event
.
setFileName
(
fileRespDto
.
getFileName
());
event
.
setUrl
(
fileRespDto
.
getUrl
());
event
.
setFileId
(
fileRespDto
.
getId
());
}
catch
(
Exception
e
)
{
log
.
info
(
"reward redeem record export listener exception"
,
e
);
event
.
setResult
(
e
.
getMessage
());
}
}
private
Collection
<
RewardRedeemRecordExportVO
>
convert2ExcelVo
(
List
<
RewardRedeemPageRespVO
>
list
)
{
return
list
.
stream
().
map
(
item
->
{
RewardRedeemRecordExportVO
exportVO
=
new
RewardRedeemRecordExportVO
();
exportVO
.
setId
(
String
.
valueOf
(
item
.
getId
()));
exportVO
.
setStatus
(
item
.
getStatus
());
exportVO
.
setRewardCode
(
item
.
getRewardCode
());
exportVO
.
setRewardTitle
(
item
.
getRewardTitleZh
());
exportVO
.
setMemberName
(
item
.
getMemberName
());
exportVO
.
setRewardCount
(
item
.
getRewardCount
());
exportVO
.
setRedeemType
(
item
.
getRedeemType
());
exportVO
.
setEntrance
(
item
.
getEntrance
());
exportVO
.
setExpenses
(
item
.
getExpenses
());
exportVO
.
setCurrencyTitle
(
item
.
getCurrencyTitleZh
());
exportVO
.
setRecipientName
(
item
.
getRecipientName
());
exportVO
.
setRecipientPhoneNum
(
item
.
getRecipientPhoneNum
());
exportVO
.
setRecipientAddress
(
item
.
getRecipientAddress
());
exportVO
.
setRedeemer
(
item
.
getRedeemer
());
exportVO
.
setRedemptionTime
(
item
.
getCreateTime
());
exportVO
.
setCourierCompanyName
(
item
.
getCourierCompanyName
());
exportVO
.
setExpressNo
(
item
.
getExpressNo
());
exportVO
.
setExpressDate
(
item
.
getExpressDate
());
exportVO
.
setExpressSender
(
item
.
getExpressSender
());
exportVO
.
setRemark
(
item
.
getRemark
());
exportVO
.
setVerifyUser
(
item
.
getVerifyUser
());
exportVO
.
setVerifyTime
(
item
.
getVerifyTime
());
exportVO
.
setCreatorName
(
item
.
getCreatorName
());
exportVO
.
setCreateTime
(
item
.
getCreateTime
());
exportVO
.
setUpdaterName
(
item
.
getUpdaterName
());
exportVO
.
setUpdateTime
(
item
.
getUpdateTime
());
return
exportVO
;
}).
collect
(
Collectors
.
toList
());
}
}
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/service/redeem/RewardRedeemService.java
View file @
7f1f5617
...
...
@@ -25,4 +25,10 @@ public interface RewardRedeemService extends IService<RewardRedeemDO> {
Boolean
batchVerify
(
RewardRedeemBatchVerifyReqVO
request
);
Boolean
verifyBack
(
List
<
Long
>
redeemIds
);
Boolean
export
(
RewardRedeemPageReqVO
reqVO
);
List
<
RewardRedeemPageRespVO
>
exportList
(
RewardRedeemPageReqVO
request
);
Integer
exportCount
(
RewardRedeemPageReqVO
request
);
}
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/service/redeem/RewardRedeemServiceImpl.java
View file @
7f1f5617
package
cn
.
iocoder
.
yudao
.
module
.
reward
.
service
.
redeem
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.i18n.core.I18nMessage
;
import
cn.iocoder.yudao.framework.mybatis.core.service.AbstractService
;
import
cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils
;
import
cn.iocoder.yudao.module.reward.dal.dataobject.redeem.RewardRedeemDO
;
...
...
@@ -11,6 +12,9 @@ import cn.iocoder.yudao.module.reward.enums.RewardPickMethedEnum;
import
cn.iocoder.yudao.module.reward.enums.RewardRedeemStatusEnum
;
import
cn.iocoder.yudao.module.reward.service.reward.RewardService
;
import
cn.iocoder.yudao.module.reward.vo.reward.*
;
import
cn.iocoder.yudao.module.system.api.file.FileMakeApi
;
import
cn.iocoder.yudao.module.system.api.file.dto.FileMakeReqDTO
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.toolkit.CollectionUtils
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
...
...
@@ -19,6 +23,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -26,6 +31,7 @@ import java.util.function.Function;
import
java.util.stream.Collectors
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
exception
.
util
.
ServiceExceptionUtil
.
exception
;
import
static
cn
.
iocoder
.
yudao
.
module
.
system
.
enums
.
download
.
DownloadTypeEnum
.
REWARD_REDEEM_RECORD
;
/**
* 礼品兑换 Service
...
...
@@ -39,6 +45,8 @@ public class RewardRedeemServiceImpl extends AbstractService<RewardRedeemMapper,
private
RewardRedeemMapper
rewardRedeemMapper
;
@Resource
private
RewardService
rewardService
;
@Resource
private
FileMakeApi
fileMakeApi
;
@Override
public
PageResult
<
RewardRedeemPageRespVO
>
pageInfo
(
RewardRedeemPageReqVO
reqVO
)
{
...
...
@@ -152,6 +160,29 @@ public class RewardRedeemServiceImpl extends AbstractService<RewardRedeemMapper,
return
true
;
}
@Override
public
Boolean
export
(
RewardRedeemPageReqVO
reqVO
)
{
FileMakeReqDTO
fileMakeReqDTO
=
new
FileMakeReqDTO
();
fileMakeReqDTO
.
setType
(
REWARD_REDEEM_RECORD
.
getType
());
fileMakeReqDTO
.
setName
(
"礼品兑换记录导出excel"
);
fileMakeReqDTO
.
setFileSuffix
(
"xlsx"
);
fileMakeReqDTO
.
setTemporaryFile
(
true
);
fileMakeReqDTO
.
setUserType
(
2
);
fileMakeReqDTO
.
setLang
(
I18nMessage
.
getLang
());
fileMakeReqDTO
.
setRequestParams
(
JSONObject
.
toJSONString
(
reqVO
));
fileMakeApi
.
sendFileMake
(
fileMakeReqDTO
);
return
true
;
}
@Override
public
List
<
RewardRedeemPageRespVO
>
exportList
(
RewardRedeemPageReqVO
request
)
{
return
rewardRedeemMapper
.
exportList
(
request
);
}
@Override
public
Integer
exportCount
(
RewardRedeemPageReqVO
request
)
{
return
rewardRedeemMapper
.
pageCount
(
request
);
}
private
List
<
Long
>
checkBatchVerifyParam
(
RewardRedeemBatchVerifyReqVO
request
)
{
LambdaUpdateWrapper
<
RewardRedeemDO
>
wrapper
=
Wrappers
.
lambdaUpdate
();
wrapper
.
in
(
RewardRedeemDO:
:
getId
,
request
.
getIds
());
...
...
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/vo/reward/RewardRedeemBaseVO.java
View file @
7f1f5617
...
...
@@ -88,7 +88,7 @@ public class RewardRedeemBaseVO {
* 快递日期
*/
@ApiModelProperty
(
value
=
"快递日期"
)
private
String
expressDate
;
private
Date
expressDate
;
/**
* 快递寄出人
*/
...
...
@@ -111,7 +111,7 @@ public class RewardRedeemBaseVO {
@ApiModelProperty
(
value
=
"更新人id"
)
private
String
updater
;
@ApiModelProperty
(
value
=
"更新时间"
)
private
String
updateTime
;
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"是否删除"
)
private
Boolean
deleted
;
/**
...
...
@@ -123,5 +123,5 @@ public class RewardRedeemBaseVO {
* 核销时间
*/
@ApiModelProperty
(
value
=
"核销时间"
)
private
String
verifyTime
;
private
Date
verifyTime
;
}
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/vo/reward/RewardRedeemPageRespVO.java
View file @
7f1f5617
...
...
@@ -23,12 +23,15 @@ public class RewardRedeemPageRespVO extends RewardRedeemBaseVO {
private
String
nodeTitleEn
;
@ApiModelProperty
(
value
=
"兑换积分"
)
private
Integer
totalCount
;
@ApiModelProperty
(
value
=
"创建人
时间
"
)
@ApiModelProperty
(
value
=
"创建人"
)
private
String
creatorName
;
@ApiModelProperty
(
value
=
"更新人
时间
"
)
@ApiModelProperty
(
value
=
"更新人"
)
private
String
updaterName
;
@ApiModelProperty
(
value
=
"币种名称中文"
)
private
String
currencyTitleZh
;
@ApiModelProperty
(
value
=
"币种名称英文"
)
private
String
currencyTitleEn
;
@ApiModelProperty
(
value
=
"快递公司名称"
)
private
String
courierCompanyName
;
}
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/vo/reward/RewardRedeemRecordExportVO.java
0 → 100644
View file @
7f1f5617
package
cn
.
iocoder
.
yudao
.
module
.
reward
.
vo
.
reward
;
import
cn.iocoder.yudao.framework.excel.annotations.DictFormat
;
import
cn.iocoder.yudao.framework.excel.convert.DictConvert
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.converters.bigdecimal.BigDecimalStringConverter
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.util.Date
;
@Data
public
class
RewardRedeemRecordExportVO
{
@ExcelProperty
(
"兑换记录ID"
)
private
String
id
;
@ExcelProperty
(
value
=
"兑换状态"
,
converter
=
DictConvert
.
class
)
@DictFormat
(
"reward_redeem_status"
)
private
Integer
status
;
@ExcelProperty
(
"礼品ID"
)
private
String
rewardCode
;
@ExcelProperty
(
"礼品名称"
)
private
String
rewardTitle
;
@ExcelProperty
(
"会员名称"
)
private
String
memberName
;
@ExcelProperty
(
"兑换数量"
)
private
Integer
rewardCount
;
@ExcelProperty
(
value
=
"兑换方式"
,
converter
=
DictConvert
.
class
)
@DictFormat
(
"way_of_receiving"
)
private
Integer
redeemType
;
@ExcelProperty
(
value
=
"兑换入口"
,
converter
=
DictConvert
.
class
)
@DictFormat
(
"platform_type"
)
private
Integer
entrance
;
@ExcelProperty
(
value
=
"费用"
,
converter
=
BigDecimalStringConverter
.
class
)
private
BigDecimal
expenses
;
@ExcelProperty
(
"币种名称"
)
private
String
currencyTitle
;
@ExcelProperty
(
value
=
"收件人姓名"
)
private
String
recipientName
;
@ExcelProperty
(
value
=
"收件人电话"
)
private
String
recipientPhoneNum
;
@ExcelProperty
(
value
=
"收件人地址"
)
private
String
recipientAddress
;
@ExcelProperty
(
value
=
"兑换人"
)
private
String
redeemer
;
@ExcelProperty
(
value
=
"兑换时间"
)
private
Date
redemptionTime
;
@ExcelProperty
(
value
=
"快递公司名称"
)
private
String
courierCompanyName
;
@ExcelProperty
(
value
=
"快递单号"
)
private
String
expressNo
;
@ExcelProperty
(
value
=
"快递日期"
)
private
Date
expressDate
;
@ExcelProperty
(
value
=
"快递寄出人"
)
private
String
expressSender
;
@ExcelProperty
(
value
=
"备注"
)
private
String
remark
;
@ExcelProperty
(
value
=
"核销人"
)
private
String
verifyUser
;
@ExcelProperty
(
value
=
"核销时间"
)
private
Date
verifyTime
;
@ExcelProperty
(
value
=
"创建人"
)
private
String
creatorName
;
@ExcelProperty
(
value
=
"创建时间"
)
private
Date
createTime
;
@ExcelProperty
(
value
=
"更新人"
)
private
String
updaterName
;
@ExcelProperty
(
value
=
"更新时间"
)
private
Date
updateTime
;
}
yudao-module-reward/yudao-module-reward-impl/src/main/resources/mapper/RewardRedeemMapper.xml
View file @
7f1f5617
...
...
@@ -19,6 +19,7 @@
left join system_user suc on suc.id = er.creator
left join system_user suu on suu.id = er.updater
left join ecw_currency cc on err.currency = cc.id
left join ecw_express ee on err.courier_company = ee.id
where 1=1
<include
refid=
"pageCondition"
/>
order by er.create_time desc
...
...
@@ -32,6 +33,7 @@
left join ecw_node en on er.node_id = en.id
left join system_user suc on suc.id = er.creator
left join system_user suu on suu.id = er.updater
left join ecw_express ee on err.courier_company = ee.id
where 1=1
<include
refid=
"pageCondition"
/>
</select>
...
...
@@ -45,8 +47,24 @@
left join system_user suc on suc.id = er.creator
left join system_user suu on suu.id = er.updater
left join ecw_currency cc on err.currency = cc.id
left join ecw_express ee on err.courier_company = ee.id
where err.id = #{id}
</select>
<select
id=
"exportList"
resultType=
"cn.iocoder.yudao.module.reward.vo.reward.RewardRedeemPageRespVO"
>
select
<include
refid=
"columns"
/>
from ecw_reward_redeem err
left join ecw_reward er on err.reward_id = er.id
left join member_user mu on mu.id = err.member_id
left join ecw_node en on er.node_id = en.id
left join system_user suc on suc.id = er.creator
left join system_user suu on suu.id = er.updater
left join ecw_currency cc on err.currency = cc.id
left join ecw_express ee on err.courier_company = ee.id
where 1=1
<include
refid=
"pageCondition"
/>
order by er.create_time desc
</select>
<sql
id=
"columns"
>
err.id ,
...
...
@@ -64,6 +82,7 @@
err.redeemer,
err.redemption_time as redemptionTime,
err.courier_company as courierCompany,
ee.company_name as courierCompanyName,
err.express_no as expressNo,
err.express_date as expressDate,
err.express_sender as expressSender,
...
...
yudao-module-system/yudao-module-system-api/src/main/java/cn/iocoder/yudao/module/system/enums/download/DownloadTypeEnum.java
View file @
7f1f5617
...
...
@@ -174,6 +174,11 @@ public enum DownloadTypeEnum implements IntArrayValuable {
*/
REPORT_SALES_ANALYSIS
(
32
),
/**
* 礼品兑换记录
*/
REWARD_REDEEM_RECORD
(
33
),
// ....自己补充
;
...
...
yudao-module-system/yudao-module-system-impl/src/main/java/cn/iocoder/yudao/module/system/service/downloadLog/DownloadLogServiceImpl.java
View file @
7f1f5617
...
...
@@ -362,6 +362,9 @@ public class DownloadLogServiceImpl extends AbstractService<DownloadLogMapper, D
//销售分析报表
REPORT_SALES_ANALYSIS_Event
(
downloadLog
);
break
;
case
REWARD_REDEEM_RECORD:
rewardRedeemRecordExportPushEvent
(
downloadLog
);
break
;
default
:
downloadLog
.
setResult
(
"unknown type"
);
break
;
...
...
@@ -388,6 +391,20 @@ public class DownloadLogServiceImpl extends AbstractService<DownloadLogMapper, D
}
}
private
void
rewardRedeemRecordExportPushEvent
(
DownloadLogDO
downloadLog
)
{
RewardRedeemRecordExportEvent
event
=
new
RewardRedeemRecordExportEvent
();
event
.
setUserId
(
downloadLog
.
getUserId
());
event
.
setUserType
(
downloadLog
.
getUserType
());
event
.
setLang
(
downloadLog
.
getLang
());
event
.
setRequestParams
(
downloadLog
.
getRequestParams
());
applicationContext
.
publishEvent
(
event
);
downloadLog
.
setFileName
(
event
.
getFileName
());
downloadLog
.
setPath
(
event
.
getPath
());
downloadLog
.
setDownloadUrl
(
event
.
getUrl
());
downloadLog
.
setResult
(
event
.
getResult
());
downloadLog
.
setFileId
(
event
.
getFileId
());
}
private
void
achievementDetailExcelExportPushEvent
(
DownloadLogDO
downloadLog
)
{
AchievementDetailExcelExportPushEvent
event
=
new
AchievementDetailExcelExportPushEvent
();
event
.
setUserId
(
downloadLog
.
getUserId
());
...
...
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