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
dfc55393
Commit
dfc55393
authored
Sep 09, 2024
by
zhangfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
礼品兑换网点属性改为提货点(仓库)
parent
63966d86
Changes
12
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
167 additions
and
80 deletions
+167
-80
WarehouseConvert.java
...module/depository/convert/warehouse/WarehouseConvert.java
+1
-1
WarehouseService.java
...module/depository/service/warehouse/WarehouseService.java
+2
-0
WarehouseServiceImpl.java
...pository/service/warehouse/impl/WarehouseServiceImpl.java
+12
-0
WarehouseSimpleReqVO.java
.../module/depository/vo/warehouse/WarehouseSimpleReqVO.java
+16
-0
WarehouseSimpleRespVO.java
...module/depository/vo/warehouse/WarehouseSimpleRespVO.java
+22
-0
WarehouseController.java
...itory/controller/admin/warehouse/WarehouseController.java
+26
-20
pom.xml
yudao-module-reward/yudao-module-reward-impl/pom.xml
+7
-1
RewardController.java
...dule/reward/controller/admin/reward/RewardController.java
+7
-4
RewardServiceImpl.java
...yudao/module/reward/service/reward/RewardServiceImpl.java
+55
-38
RewardBackVO.java
...n/iocoder/yudao/module/reward/vo/reward/RewardBackVO.java
+8
-7
RewardCreateReqVO.java
...oder/yudao/module/reward/vo/reward/RewardCreateReqVO.java
+10
-8
messages_zh.properties
yudao-server/src/main/resources/i18n/messages_zh.properties
+1
-1
No files found.
yudao-module-depository/yudao-module-depository-core/src/main/java/cn/iocoder/yudao/module/depository/convert/warehouse/WarehouseConvert.java
View file @
dfc55393
...
...
@@ -42,5 +42,5 @@ public interface WarehouseConvert {
List
<
WarehouseTreeRegionVO
>
convertTreeRegion
(
List
<
WarehouseTreeRegionVO
>
list
);
List
<
WarehouseSimpleRespVO
>
convertListSimple
(
List
<
WarehouseDO
>
list
);
}
yudao-module-depository/yudao-module-depository-core/src/main/java/cn/iocoder/yudao/module/depository/service/warehouse/WarehouseService.java
View file @
dfc55393
...
...
@@ -176,4 +176,6 @@ public interface WarehouseService {
List
<
WarehouseTreeVO
>
getWarehouseTreeList
(
Integer
tradeType
);
List
<
WarehouseDO
>
getWarehouseListSimple
(
String
title
);
}
yudao-module-depository/yudao-module-depository-core/src/main/java/cn/iocoder/yudao/module/depository/service/warehouse/impl/WarehouseServiceImpl.java
View file @
dfc55393
...
...
@@ -576,4 +576,16 @@ public class WarehouseServiceImpl implements WarehouseService {
warehouseMapper
.
getRegionList
(
type
,
regionId
,
destCountryId
,
objectiveId
,
destWarehouseId
);
return
list
;
}
@Override
public
List
<
WarehouseDO
>
getWarehouseListSimple
(
String
title
)
{
if
(
StringUtils
.
isBlank
(
title
))
{
return
warehouseMapper
.
selectList
();
}
// 模糊搜索中文名和英文名
return
warehouseMapper
.
selectList
(
new
LambdaQueryWrapperX
<
WarehouseDO
>()
.
like
(
WarehouseDO:
:
getTitleZh
,
title
)
.
or
()
.
like
(
WarehouseDO:
:
getTitleEn
,
title
));
}
}
yudao-module-depository/yudao-module-depository-core/src/main/java/cn/iocoder/yudao/module/depository/vo/warehouse/WarehouseSimpleReqVO.java
0 → 100644
View file @
dfc55393
package
cn
.
iocoder
.
yudao
.
module
.
depository
.
vo
.
warehouse
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.validation.constraints.NotNull
;
@ApiModel
(
"仓库精简信息 Req VO"
)
@Data
public
class
WarehouseSimpleReqVO
{
@ApiModelProperty
(
value
=
"模糊搜标题"
)
private
String
title
;
}
yudao-module-depository/yudao-module-depository-core/src/main/java/cn/iocoder/yudao/module/depository/vo/warehouse/WarehouseSimpleRespVO.java
0 → 100644
View file @
dfc55393
package
cn
.
iocoder
.
yudao
.
module
.
depository
.
vo
.
warehouse
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@ApiModel
(
"仓库精简信息 Response VO"
)
@Data
@NoArgsConstructor
@AllArgsConstructor
public
class
WarehouseSimpleRespVO
{
@ApiModelProperty
(
value
=
""
,
required
=
true
)
private
Long
id
;
@ApiModelProperty
(
value
=
"中文标题"
)
private
String
titleZh
;
@ApiModelProperty
(
value
=
"英文标题"
)
private
String
titleEn
;
}
yudao-module-depository/yudao-module-depository-rest/src/main/java/cn/iocoder/yudao/module/depository/controller/admin/warehouse/WarehouseController.java
View file @
dfc55393
...
...
@@ -2,40 +2,39 @@ package cn.iocoder.yudao.module.depository.controller.admin.warehouse;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.iocoder.yudao.framework.apollo.core.event.QueryChannelInfoEvent
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.excel.util.ExcelUtils
;
import
cn.iocoder.yudao.module.depository.dal.mysql.warehouse.WarehouseLineMapper
;
import
cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog
;
import
cn.iocoder.yudao.module.depository.convert.warehouse.DeptWarehouseConvert
;
import
cn.iocoder.yudao.module.depository.convert.warehouse.WarehouseConvert
;
import
cn.iocoder.yudao.module.depository.dal.dataobject.warehouse.DeptWarehouseDO
;
import
cn.iocoder.yudao.module.depository.dal.dataobject.warehouse.WarehouseDO
;
import
cn.iocoder.yudao.module.depository.dal.dataobject.warehouse.WarehouseLineDO
;
import
cn.iocoder.yudao.module.depository.service.warehouse.WarehouseService
;
import
cn.iocoder.yudao.module.depository.vo.dept.DeptWarehouseBaseVO
;
import
cn.iocoder.yudao.module.depository.vo.dept.DeptWarehouseRequestVo
;
import
cn.iocoder.yudao.module.depository.vo.warehouse.*
;
import
cn.iocoder.yudao.module.depository.convert.warehouse.DeptWarehouseConvert
;
import
cn.iocoder.yudao.module.ecw.dal.dataobject.region.RegionDO
;
import
cn.iocoder.yudao.module.depository.dal.dataobject.warehouse.DeptWarehouseDO
;
import
cn.iocoder.yudao.module.depository.dal.dataobject.warehouse.WarehouseLineDO
;
import
cn.iocoder.yudao.module.ecw.service.region.RegionService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
io.swagger.annotations.*
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
javax.
validation.*
;
import
javax.servlet.http.
*
;
import
java
.util.*
;
import
javax.
annotation.Resource
;
import
javax.servlet.http.
HttpServletResponse
;
import
java
x.validation.Valid
;
import
java.io.IOException
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
import
cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
operatelog
.
core
.
enums
.
OperateTypeEnum
.*;
import
cn.iocoder.yudao.module.depository.dal.dataobject.warehouse.WarehouseDO
;
import
cn.iocoder.yudao.module.depository.convert.warehouse.WarehouseConvert
;
import
cn.iocoder.yudao.module.depository.service.warehouse.WarehouseService
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
operatelog
.
core
.
enums
.
OperateTypeEnum
.
EXPORT
;
@Api
(
tags
=
"管理后台 - 仓库"
)
@RestController
...
...
@@ -326,6 +325,13 @@ public class WarehouseController {
}
return
success
(
resultList
);
}
@PostMapping
(
"/list-all-simple"
)
@ApiOperation
(
value
=
"获得仓库精简信息列表"
,
notes
=
"主要用于前端的下拉选项"
)
public
CommonResult
<
List
<
WarehouseSimpleRespVO
>>
getWarehouseListSimple
(
@RequestBody
WarehouseSimpleReqVO
reqVO
)
{
List
<
WarehouseDO
>
list
=
warehouseService
.
getWarehouseListSimple
(
reqVO
.
getTitle
());
return
success
(
WarehouseConvert
.
INSTANCE
.
convertListSimple
(
list
));
}
private
static
<
T
>
List
<
T
>
pagination
(
List
<
T
>
records
,
int
pageNum
,
int
pageSize
)
{
if
(
CollectionUtil
.
isEmpty
(
records
))
{
...
...
yudao-module-reward/yudao-module-reward-impl/pom.xml
View file @
dfc55393
...
...
@@ -44,7 +44,13 @@
</dependency>
<dependency>
<groupId>
cn.iocoder.boot
</groupId>
<artifactId>
yudao-module-ecw-api
</artifactId>
<artifactId>
yudao-module-ecw-impl
</artifactId>
<version>
${revision}
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
cn.iocoder.boot
</groupId>
<artifactId>
yudao-module-depository-core
</artifactId>
<version>
${revision}
</version>
<scope>
compile
</scope>
</dependency>
...
...
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/controller/admin/reward/RewardController.java
View file @
dfc55393
...
...
@@ -22,6 +22,7 @@ import javax.servlet.http.HttpServletResponse;
import
javax.validation.Valid
;
import
javax.validation.constraints.NotNull
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.List
;
...
...
@@ -75,7 +76,6 @@ public class RewardController {
@GetMapping
(
"/list"
)
@ApiOperation
(
"获得礼品列表"
)
@ApiImplicitParam
(
name
=
"ids"
,
value
=
"编号列表"
,
required
=
true
,
example
=
"1024,2048"
,
dataTypeClass
=
List
.
class
)
//@PreAuthorize("@ss.hasPermission('reward::query')")
public
CommonResult
<
List
<
RewardBackVO
>>
getList
(
@RequestParam
(
"ids"
)
Collection
<
Long
>
ids
)
{
List
<
RewardDO
>
list
=
rewardService
.
getList
(
ids
);
List
<
RewardBackVO
>
rewardBackVOS
=
RewardConvert
.
INSTANCE
.
convertList
(
list
);
...
...
@@ -84,12 +84,15 @@ public class RewardController {
@PostMapping
(
"/page"
)
@ApiOperation
(
"获得礼品分页"
)
//@PreAuthorize("@ss.hasPermission('reward::query')")
public
CommonResult
<
PageResult
<
RewardBackVO
>>
getPage
(
@Valid
@RequestBody
RewardQueryVO
query
,
PageVO
page
)
{
PageResult
<
RewardDO
>
pageResult
=
rewardService
.
getPage
(
query
,
page
);
PageResult
<
RewardBackVO
>
rewardBackVOPageResult
=
RewardConvert
.
INSTANCE
.
convertPage
(
pageResult
);
// 转换nodeId和points
rewardBackVOPageResult
.
getList
().
forEach
(
rewardBackVO
->
rewardBackVO
.
getNodeIds
().
add
(
new
RewardBackVO
.
NodeAndPoints
(
rewardBackVO
.
getNodeId
(),
rewardBackVO
.
getPointsRequire
())));
rewardBackVOPageResult
.
getList
().
forEach
(
rewardBackVO
->
{
List
<
Integer
>
nodeId
=
new
ArrayList
<>();
nodeId
.
add
(
rewardBackVO
.
getNodeId
());
rewardBackVO
.
getNodeIds
().
add
(
new
RewardBackVO
.
NodeAndPoints
(
nodeId
,
rewardBackVO
.
getPointsRequire
(),
rewardBackVO
.
getQuantityRemain
()));
});
return
success
(
rewardBackVOPageResult
);
}
...
...
@@ -119,7 +122,7 @@ public class RewardController {
@GetMapping
(
"/export-excel"
)
@ApiOperation
(
"导出礼品 Excel"
)
//
@PreAuthorize("@ss.hasPermission('reward::export')")
@PreAuthorize
(
"@ss.hasPermission('reward::export')"
)
@OperateLog
(
type
=
EXPORT
)
public
void
exportExcel
(
@Valid
RewardQueryVO
query
,
HttpServletResponse
response
)
throws
IOException
{
...
...
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/service/reward/RewardServiceImpl.java
View file @
dfc55393
This diff is collapsed.
Click to expand it.
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/vo/reward/RewardBackVO.java
View file @
dfc55393
...
...
@@ -9,7 +9,6 @@ import lombok.Data;
import
lombok.NoArgsConstructor
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
javax.validation.constraints.NotNull
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -60,11 +59,11 @@ public class RewardBackVO {
@ApiModelProperty
(
value
=
"兑换所需积分"
,
required
=
true
)
private
Integer
pointsRequire
;
@ExcelProperty
(
"
兑换网
点"
)
@ApiModelProperty
(
value
=
"
兑换网
点"
,
required
=
true
)
@ExcelProperty
(
"
提货
点"
)
@ApiModelProperty
(
value
=
"
提货
点"
,
required
=
true
)
private
Integer
nodeId
;
@ApiModelProperty
(
value
=
"
兑换网点和积分
列表"
,
required
=
true
)
@ApiModelProperty
(
value
=
"
提货点,积分,剩余数量
列表"
,
required
=
true
)
private
List
<
RewardBackVO
.
NodeAndPoints
>
nodeIds
=
new
ArrayList
<>();
@ExcelProperty
(
"已兑换次数"
)
...
...
@@ -122,9 +121,11 @@ public class RewardBackVO {
@AllArgsConstructor
@NoArgsConstructor
public
static
class
NodeAndPoints
{
@ApiModelProperty
(
value
=
"
兑换网
点"
)
private
Integer
nodeId
;
@ApiModelProperty
(
value
=
"
兑换网
点对应积分"
)
@ApiModelProperty
(
value
=
"
提货
点"
)
private
List
<
Integer
>
wareHouses
;
@ApiModelProperty
(
value
=
"
提货
点对应积分"
)
private
Integer
points
;
@ApiModelProperty
(
value
=
"剩余数量"
)
private
Integer
quantityRemain
;
}
}
yudao-module-reward/yudao-module-reward-impl/src/main/java/cn/iocoder/yudao/module/reward/vo/reward/RewardCreateReqVO.java
View file @
dfc55393
...
...
@@ -49,14 +49,14 @@ public class RewardCreateReqVO {
//@NotNull(message = "兑换网点不能为空")
//private Integer nodeId;
@ApiModelProperty
(
value
=
"
兑换网点和积分
列表"
,
required
=
true
)
@ApiModelProperty
(
value
=
"
提货点,积分,剩余数量
列表"
,
required
=
true
)
@NotNull
(
message
=
"兑换网点列表不能为空"
)
private
List
<
NodeAndPoints
>
nodeIds
;
@ApiModelProperty
(
value
=
"剩余数量"
,
required
=
true
)
@NotNull
(
message
=
"剩余数量不能为空"
)
@Min
(
value
=
0
)
private
Integer
quantityRemain
;
//
@ApiModelProperty(value = "剩余数量", required = true)
//
@NotNull(message = "剩余数量不能为空")
//
@Min(value = 0)
//
private Integer quantityRemain;
@ApiModelProperty
(
value
=
"活动开始时间"
)
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
...
...
@@ -93,9 +93,11 @@ public class RewardCreateReqVO {
@Data
public
static
class
NodeAndPoints
{
@ApiModelProperty
(
value
=
"
兑换网
点"
)
private
Integer
nodeId
;
@ApiModelProperty
(
value
=
"
兑换网
点对应积分"
)
@ApiModelProperty
(
value
=
"
提货
点"
)
private
List
<
Integer
>
wareHouses
;
@ApiModelProperty
(
value
=
"
提货
点对应积分"
)
private
Integer
points
;
@ApiModelProperty
(
value
=
"剩余数量"
)
private
Integer
quantityRemain
;
}
}
yudao-server/src/main/resources/i18n/messages_zh.properties
View file @
dfc55393
...
...
@@ -1028,7 +1028,7 @@ reward.score.not.enough = \u79EF\u5206\u4E0D\u8DB3
reward.count.not.enough
=
\u
793C
\u
54C1
\u6570\u
91CF
\u
4E0D
\u
8DB3
reward.redeem.count.not.allow
=
\u6279\u
91CF
\u5151\u6362\u
6BCF
\u
6B21
\u6700\u
591A
\u5341\u6761
reward.redeem.allow.count.error
=
\u
5DF2
\u
8D85
\u
51FA
\u
4E2A
\u
4EBA
\u5141\u
8BB8
\u5151\u6362\u
6B21
\u6570
reward.node.and.points.list.error
=
\u
521B
\u
5EFA
\u
793C
\u
54C1
\u
7F51
\u
70B9
\u6216\u6240\u9700\u
79EF
\u5206\u9519\u
8BEF
reward.node.and.points.list.error
=
\u
521B
\u
5EFA
\u
793C
\u
54C1
\u
63D0
\u
8D27
\u
70B9
\u6216\u6240\u9700\u
79EF
\u5206\u9519\u
8BEF
reward.redeem.recipient.error
=
\u
793C
\u
54C1
\u6536\u
8D27
\u
4EBA
\u
4FE1
\u
606F
\u
4E0D
\u5168
redeem.import.no.record
=
\u8868\u
683C
\u
4E2D
\u
65E0
\u
8BB0
\u
5F55
order.cargo.control.limit.update.consignee.error
=
\u
5F53
\u
524D
\u
63A7
\u
8D27
\u
8BA2
\u5355\u9650\u5236\u
4FEE
\u6539\u6536\u
8D27
\u
4EBA
\u
FF0C
\u
672A
\u
67E5
\u
8BE2
\u5230\u9650\u5236\u
65F6
\u
95F4
...
...
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