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
ab2626cc
Commit
ab2626cc
authored
Aug 07, 2024
by
zhangfeng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'refs/heads/feature_member_score' into dev
parents
9be7e6ed
6cc0b7df
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
17 deletions
+14
-17
ScoreRuleServiceImpl.java
...module/member/service/scoreRule/ScoreRuleServiceImpl.java
+9
-11
WarehouseTreeRegionSimpleVO.java
...dule/member/vo/scoreRule/WarehouseTreeRegionSimpleVO.java
+5
-6
No files found.
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/service/scoreRule/ScoreRuleServiceImpl.java
View file @
ab2626cc
package
cn
.
iocoder
.
yudao
.
module
.
member
.
service
.
scoreRule
;
package
cn
.
iocoder
.
yudao
.
module
.
member
.
service
.
scoreRule
;
import
java.time.Instant
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
javax.annotation.Resource
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.json.JSONUtil
;
import
cn.hutool.json.JSONUtil
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQuery
;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQuery
;
import
cn.iocoder.yudao.framework.mybatis.core.service.AbstractService
;
import
cn.iocoder.yudao.framework.mybatis.core.service.AbstractService
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.module.depository.service.warehouse.WarehouseService
;
import
cn.iocoder.yudao.module.depository.service.warehouse.WarehouseService
;
import
cn.iocoder.yudao.module.depository.vo.warehouse.WarehouseTreeRegionVO
;
import
cn.iocoder.yudao.module.depository.vo.warehouse.WarehouseTreeRegionVO
;
import
cn.iocoder.yudao.module.member.convert.scoreRule.ScoreRuleConvert
;
import
cn.iocoder.yudao.module.member.convert.scoreRule.ScoreRuleConvert
;
...
@@ -31,11 +27,13 @@ import org.jetbrains.annotations.NotNull;
...
@@ -31,11 +27,13 @@ import org.jetbrains.annotations.NotNull;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
javax.annotation.Resource
;
import
java.time.Instant
;
import
java.util.*
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
exception
.
util
.
ServiceExceptionUtil
.
exception
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
exception
.
util
.
ServiceExceptionUtil
.
exception
;
import
static
cn
.
iocoder
.
yudao
.
module
.
member
.
enums
.
ErrorCodeConstants
.*;
import
static
cn
.
iocoder
.
yudao
.
module
.
member
.
enums
.
ErrorCodeConstants
.*;
import
static
java
.
util
.
Arrays
.
stream
;
/**
/**
* 积分规则 Service 实现类
* 积分规则 Service 实现类
...
@@ -458,18 +456,18 @@ public class ScoreRuleServiceImpl extends AbstractService<ScoreRuleMapper, Score
...
@@ -458,18 +456,18 @@ public class ScoreRuleServiceImpl extends AbstractService<ScoreRuleMapper, Score
ArrayList
<
WarehouseTreeRegionSimpleVO
>
warehouseTreeRegionSimpleVOS
=
new
ArrayList
<>();
ArrayList
<
WarehouseTreeRegionSimpleVO
>
warehouseTreeRegionSimpleVOS
=
new
ArrayList
<>();
for
(
WarehouseTreeRegionVO
warehouseTreeRegionVO
:
list
)
{
for
(
WarehouseTreeRegionVO
warehouseTreeRegionVO
:
list
)
{
WarehouseTreeRegionSimpleVO
warehouseTreeRegionSimpleVO
=
new
WarehouseTreeRegionSimpleVO
();
WarehouseTreeRegionSimpleVO
warehouseTreeRegionSimpleVO
=
new
WarehouseTreeRegionSimpleVO
();
warehouseTreeRegionSimpleVO
.
set
Country
Id
(
warehouseTreeRegionVO
.
getGuojia
());
warehouseTreeRegionSimpleVO
.
setId
(
warehouseTreeRegionVO
.
getGuojia
());
warehouseTreeRegionSimpleVO
.
setLabelZh
(
warehouseTreeRegionVO
.
getGuojiaName
().
replaceAll
(
"\t"
,
""
));
warehouseTreeRegionSimpleVO
.
setLabelZh
(
warehouseTreeRegionVO
.
getGuojiaName
().
replaceAll
(
"\t"
,
""
));
warehouseTreeRegionSimpleVO
.
setLabelEn
(
warehouseTreeRegionVO
.
getChildren
().
get
(
0
).
getGuojiaNameEn
());
warehouseTreeRegionSimpleVO
.
setLabelEn
(
warehouseTreeRegionVO
.
getChildren
().
get
(
0
).
getGuojiaNameEn
());
ArrayList
<
WarehouseTreeRegionSimpleVO
.
WarehouseCity
>
warehouseCitiesSimple
=
new
ArrayList
<>();
ArrayList
<
WarehouseTreeRegionSimpleVO
.
WarehouseCity
>
warehouseCitiesSimple
=
new
ArrayList
<>();
for
(
WarehouseTreeRegionVO
warehouseTreeRegionVOChild
:
warehouseTreeRegionVO
.
getChildren
())
{
for
(
WarehouseTreeRegionVO
warehouseTreeRegionVOChild
:
warehouseTreeRegionVO
.
getChildren
())
{
WarehouseTreeRegionSimpleVO
.
WarehouseCity
warehouseCity
=
new
WarehouseTreeRegionSimpleVO
.
WarehouseCity
();
WarehouseTreeRegionSimpleVO
.
WarehouseCity
warehouseCity
=
new
WarehouseTreeRegionSimpleVO
.
WarehouseCity
();
warehouseCity
.
set
City
Id
(
warehouseTreeRegionVOChild
.
getShi
());
warehouseCity
.
setId
(
warehouseTreeRegionVOChild
.
getShi
());
warehouseCity
.
setLabelZh
(
warehouseTreeRegionVOChild
.
getShiName
().
replaceAll
(
"\t"
,
""
));
warehouseCity
.
setLabelZh
(
warehouseTreeRegionVOChild
.
getShiName
().
replaceAll
(
"\t"
,
""
));
warehouseCity
.
setLabelEn
(
warehouseTreeRegionVOChild
.
getShiNameEn
());
warehouseCity
.
setLabelEn
(
warehouseTreeRegionVOChild
.
getShiNameEn
());
if
(
warehouseCitiesSimple
.
contains
(
warehouseCity
))
{
if
(
warehouseCitiesSimple
.
contains
(
warehouseCity
))
{
WarehouseTreeRegionSimpleVO
.
Warehouse
warehouse
=
new
WarehouseTreeRegionSimpleVO
.
Warehouse
();
WarehouseTreeRegionSimpleVO
.
Warehouse
warehouse
=
new
WarehouseTreeRegionSimpleVO
.
Warehouse
();
warehouse
.
set
Warehouse
Id
(
warehouseTreeRegionVOChild
.
getId
());
warehouse
.
setId
(
warehouseTreeRegionVOChild
.
getId
());
warehouse
.
setLabelZh
(
warehouseTreeRegionVOChild
.
getTitleZh
());
warehouse
.
setLabelZh
(
warehouseTreeRegionVOChild
.
getTitleZh
());
warehouse
.
setLabelEn
(
warehouseTreeRegionVOChild
.
getTitleEn
());
warehouse
.
setLabelEn
(
warehouseTreeRegionVOChild
.
getTitleEn
());
warehouseCitiesSimple
.
get
(
warehouseCitiesSimple
.
indexOf
(
warehouseCity
)).
getChildren
().
add
(
warehouse
);
warehouseCitiesSimple
.
get
(
warehouseCitiesSimple
.
indexOf
(
warehouseCity
)).
getChildren
().
add
(
warehouse
);
...
@@ -477,7 +475,7 @@ public class ScoreRuleServiceImpl extends AbstractService<ScoreRuleMapper, Score
...
@@ -477,7 +475,7 @@ public class ScoreRuleServiceImpl extends AbstractService<ScoreRuleMapper, Score
}
}
ArrayList
<
WarehouseTreeRegionSimpleVO
.
Warehouse
>
warehouseSimples
=
new
ArrayList
<>();
ArrayList
<
WarehouseTreeRegionSimpleVO
.
Warehouse
>
warehouseSimples
=
new
ArrayList
<>();
WarehouseTreeRegionSimpleVO
.
Warehouse
warehouse
=
new
WarehouseTreeRegionSimpleVO
.
Warehouse
();
WarehouseTreeRegionSimpleVO
.
Warehouse
warehouse
=
new
WarehouseTreeRegionSimpleVO
.
Warehouse
();
warehouse
.
set
Warehouse
Id
(
warehouseTreeRegionVOChild
.
getId
());
warehouse
.
setId
(
warehouseTreeRegionVOChild
.
getId
());
warehouse
.
setLabelZh
(
warehouseTreeRegionVOChild
.
getTitleZh
().
replaceAll
(
"\t"
,
""
));
warehouse
.
setLabelZh
(
warehouseTreeRegionVOChild
.
getTitleZh
().
replaceAll
(
"\t"
,
""
));
warehouse
.
setLabelEn
(
warehouseTreeRegionVOChild
.
getTitleEn
());
warehouse
.
setLabelEn
(
warehouseTreeRegionVOChild
.
getTitleEn
());
warehouseSimples
.
add
(
warehouse
);
warehouseSimples
.
add
(
warehouse
);
...
...
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/vo/scoreRule/WarehouseTreeRegionSimpleVO.java
View file @
ab2626cc
package
cn
.
iocoder
.
yudao
.
module
.
member
.
vo
.
scoreRule
;
package
cn
.
iocoder
.
yudao
.
module
.
member
.
vo
.
scoreRule
;
import
cn.iocoder.yudao.module.depository.vo.warehouse.WarehouseRespVO
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -10,7 +9,7 @@ import java.util.Objects;
...
@@ -10,7 +9,7 @@ import java.util.Objects;
@Data
@Data
public
class
WarehouseTreeRegionSimpleVO
{
public
class
WarehouseTreeRegionSimpleVO
{
@ApiModelProperty
(
"国家id"
)
@ApiModelProperty
(
"国家id"
)
private
Long
countryI
d
;
private
Long
i
d
;
@ApiModelProperty
(
"国家中文名"
)
@ApiModelProperty
(
"国家中文名"
)
private
String
labelZh
;
private
String
labelZh
;
@ApiModelProperty
(
"国家英文名"
)
@ApiModelProperty
(
"国家英文名"
)
...
@@ -22,7 +21,7 @@ public class WarehouseTreeRegionSimpleVO {
...
@@ -22,7 +21,7 @@ public class WarehouseTreeRegionSimpleVO {
@Data
@Data
public
static
class
WarehouseCity
{
public
static
class
WarehouseCity
{
@ApiModelProperty
(
"城市id"
)
@ApiModelProperty
(
"城市id"
)
private
Long
cityI
d
;
private
Long
i
d
;
@ApiModelProperty
(
"城市中文名"
)
@ApiModelProperty
(
"城市中文名"
)
private
String
labelZh
;
private
String
labelZh
;
@ApiModelProperty
(
"城市英文名"
)
@ApiModelProperty
(
"城市英文名"
)
...
@@ -35,18 +34,18 @@ public class WarehouseTreeRegionSimpleVO {
...
@@ -35,18 +34,18 @@ public class WarehouseTreeRegionSimpleVO {
if
(
this
==
o
)
return
true
;
if
(
this
==
o
)
return
true
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
if
(
o
==
null
||
getClass
()
!=
o
.
getClass
())
return
false
;
WarehouseCity
that
=
(
WarehouseCity
)
o
;
WarehouseCity
that
=
(
WarehouseCity
)
o
;
return
Objects
.
equals
(
cityId
,
that
.
cityI
d
);
return
Objects
.
equals
(
id
,
that
.
i
d
);
}
}
@Override
@Override
public
int
hashCode
()
{
public
int
hashCode
()
{
return
Objects
.
hashCode
(
cityI
d
);
return
Objects
.
hashCode
(
i
d
);
}
}
}
}
@Data
@Data
public
static
class
Warehouse
{
public
static
class
Warehouse
{
@ApiModelProperty
(
"仓库id"
)
@ApiModelProperty
(
"仓库id"
)
private
Long
warehouseI
d
;
private
Long
i
d
;
@ApiModelProperty
(
"仓库中文名"
)
@ApiModelProperty
(
"仓库中文名"
)
private
String
labelZh
;
private
String
labelZh
;
@ApiModelProperty
(
"仓库英文名"
)
@ApiModelProperty
(
"仓库英文名"
)
...
...
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