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
deea0c7f
Commit
deea0c7f
authored
Aug 26, 2024
by
zhangfeng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'refs/heads/feature_member_score' into dev
parents
32457a81
72841e99
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
30 deletions
+25
-30
AppUserController.java
.../module/member/controller/app/user/AppUserController.java
+10
-19
AppUserInfoRespVO.java
...dule/member/controller/app/user/vo/AppUserInfoRespVO.java
+2
-3
AppMemberUserScoreController.java
...ontroller/app/userScore/AppMemberUserScoreController.java
+1
-1
MemberUserScoreService.java
...o/module/member/service/score/MemberUserScoreService.java
+2
-2
MemberUserScoreServiceImpl.java
...dule/member/service/score/MemberUserScoreServiceImpl.java
+4
-4
MemberUserServiceImpl.java
...dao/module/member/service/user/MemberUserServiceImpl.java
+6
-1
No files found.
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/user/AppUserController.java
View file @
deea0c7f
...
@@ -3,7 +3,6 @@ package cn.iocoder.yudao.module.member.controller.app.user;
...
@@ -3,7 +3,6 @@ package cn.iocoder.yudao.module.member.controller.app.user;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.framework.common.pojo.CommonResult
;
import
cn.iocoder.yudao.framework.common.util.validation.PhoneUtil
;
import
cn.iocoder.yudao.framework.idempotent.core.annotation.Idempotent
;
import
cn.iocoder.yudao.framework.idempotent.core.annotation.Idempotent
;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX
;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX
;
import
cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated
;
import
cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated
;
...
@@ -11,13 +10,11 @@ import cn.iocoder.yudao.module.customer.dal.dataobject.customerContacts.Customer
...
@@ -11,13 +10,11 @@ import cn.iocoder.yudao.module.customer.dal.dataobject.customerContacts.Customer
import
cn.iocoder.yudao.module.customer.service.customerContacts.CustomerContactsService
;
import
cn.iocoder.yudao.module.customer.service.customerContacts.CustomerContactsService
;
import
cn.iocoder.yudao.module.ecw.api.paramValid.ParamValidatorApi
;
import
cn.iocoder.yudao.module.ecw.api.paramValid.ParamValidatorApi
;
import
cn.iocoder.yudao.module.ecw.dal.dataobject.region.RegionDO
;
import
cn.iocoder.yudao.module.ecw.dal.dataobject.region.RegionDO
;
import
cn.iocoder.yudao.module.ecw.service.internalMessage.InternalMessageService
;
import
cn.iocoder.yudao.module.ecw.service.internalMessage.WebInternalMessageService
;
import
cn.iocoder.yudao.module.ecw.service.internalMessage.WebInternalMessageService
;
import
cn.iocoder.yudao.module.ecw.service.region.RegionService
;
import
cn.iocoder.yudao.module.ecw.service.region.RegionService
;
import
cn.iocoder.yudao.module.member.controller.app.auth.vo.AppEmailUpdateReqVO
;
import
cn.iocoder.yudao.module.member.controller.app.auth.vo.AppEmailUpdateReqVO
;
import
cn.iocoder.yudao.module.member.service.level.MemberUserLevelConfigService
;
import
cn.iocoder.yudao.module.member.vo.member.MemberUpdateReqVO
;
import
cn.iocoder.yudao.module.member.controller.app.user.vo.*
;
import
cn.iocoder.yudao.module.member.controller.app.user.vo.*
;
import
cn.iocoder.yudao.module.member.controller.app.userScore.vo.AppMemberUserScoreInfoRespVO
;
import
cn.iocoder.yudao.module.member.convert.user.UserConvert
;
import
cn.iocoder.yudao.module.member.convert.user.UserConvert
;
import
cn.iocoder.yudao.module.member.convert.userCardAuth.UserCardAuthConvert
;
import
cn.iocoder.yudao.module.member.convert.userCardAuth.UserCardAuthConvert
;
import
cn.iocoder.yudao.module.member.convert.userEnterprise.UserEnterpriseConvert
;
import
cn.iocoder.yudao.module.member.convert.userEnterprise.UserEnterpriseConvert
;
...
@@ -27,10 +24,13 @@ import cn.iocoder.yudao.module.member.dal.dataobject.userCardAuth.UserCardAuthDO
...
@@ -27,10 +24,13 @@ import cn.iocoder.yudao.module.member.dal.dataobject.userCardAuth.UserCardAuthDO
import
cn.iocoder.yudao.module.member.dal.dataobject.userEnterprise.UserEnterpriseDO
;
import
cn.iocoder.yudao.module.member.dal.dataobject.userEnterprise.UserEnterpriseDO
;
import
cn.iocoder.yudao.module.member.dal.dataobject.userEnterpriseAuth.UserEnterpriseAuthDO
;
import
cn.iocoder.yudao.module.member.dal.dataobject.userEnterpriseAuth.UserEnterpriseAuthDO
;
import
cn.iocoder.yudao.module.member.enums.ErrorCodeConstants
;
import
cn.iocoder.yudao.module.member.enums.ErrorCodeConstants
;
import
cn.iocoder.yudao.module.member.service.level.MemberUserLevelConfigService
;
import
cn.iocoder.yudao.module.member.service.score.MemberUserScoreService
;
import
cn.iocoder.yudao.module.member.service.user.MemberUserService
;
import
cn.iocoder.yudao.module.member.service.user.MemberUserService
;
import
cn.iocoder.yudao.module.member.service.userCardAuth.UserCardAuthService
;
import
cn.iocoder.yudao.module.member.service.userCardAuth.UserCardAuthService
;
import
cn.iocoder.yudao.module.member.service.userEnterprise.UserEnterpriseService
;
import
cn.iocoder.yudao.module.member.service.userEnterprise.UserEnterpriseService
;
import
cn.iocoder.yudao.module.member.service.userEnterpriseAuth.UserEnterpriseAuthService
;
import
cn.iocoder.yudao.module.member.service.userEnterpriseAuth.UserEnterpriseAuthService
;
import
cn.iocoder.yudao.module.member.vo.member.MemberUpdateReqVO
;
import
cn.iocoder.yudao.module.member.vo.userCardAuth.UserCardAuthBackVO
;
import
cn.iocoder.yudao.module.member.vo.userCardAuth.UserCardAuthBackVO
;
import
cn.iocoder.yudao.module.member.vo.userCardAuth.UserCardAuthCreateReqVO
;
import
cn.iocoder.yudao.module.member.vo.userCardAuth.UserCardAuthCreateReqVO
;
import
cn.iocoder.yudao.module.member.vo.userEnterprise.UserEnterpriseBackVO
;
import
cn.iocoder.yudao.module.member.vo.userEnterprise.UserEnterpriseBackVO
;
...
@@ -38,12 +38,9 @@ import cn.iocoder.yudao.module.member.vo.userEnterprise.UserEnterpriseCreateReqV
...
@@ -38,12 +38,9 @@ import cn.iocoder.yudao.module.member.vo.userEnterprise.UserEnterpriseCreateReqV
import
cn.iocoder.yudao.module.member.vo.userEnterprise.UserEnterpriseUpdateReqVO
;
import
cn.iocoder.yudao.module.member.vo.userEnterprise.UserEnterpriseUpdateReqVO
;
import
cn.iocoder.yudao.module.member.vo.userEnterpriseAuth.UserEnterpriseAuthBackVO
;
import
cn.iocoder.yudao.module.member.vo.userEnterpriseAuth.UserEnterpriseAuthBackVO
;
import
cn.iocoder.yudao.module.member.vo.userEnterpriseAuth.UserEnterpriseAuthCreateReqVO
;
import
cn.iocoder.yudao.module.member.vo.userEnterpriseAuth.UserEnterpriseAuthCreateReqVO
;
import
cn.iocoder.yudao.module.member.vo.userLevel.MemberUserLevelConfigBaseRespVO
;
import
cn.iocoder.yudao.module.member.vo.userLevel.MemberUserScoreLevelVO
;
import
cn.iocoder.yudao.module.product.service.coupon.CouponService
;
import
cn.iocoder.yudao.module.product.service.coupon.CouponService
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -54,11 +51,9 @@ import org.springframework.web.multipart.MultipartFile;
...
@@ -54,11 +51,9 @@ import org.springframework.web.multipart.MultipartFile;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
javax.validation.Valid
;
import
javax.validation.Valid
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.HashSet
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.Set
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -109,6 +104,9 @@ public class AppUserController {
...
@@ -109,6 +104,9 @@ public class AppUserController {
@Resource
@Resource
private
RegionService
regionService
;
private
RegionService
regionService
;
@Resource
private
MemberUserScoreService
memberUserScoreService
;
@PutMapping
(
"/update-nickname"
)
@PutMapping
(
"/update-nickname"
)
@ApiOperation
(
"修改用户昵称"
)
@ApiOperation
(
"修改用户昵称"
)
...
@@ -157,16 +155,9 @@ public class AppUserController {
...
@@ -157,16 +155,9 @@ public class AppUserController {
if
(
passwordEncoder
.
matches
(
"88888888"
,
user
.
getPassword
()))
{
if
(
passwordEncoder
.
matches
(
"88888888"
,
user
.
getPassword
()))
{
respVO
.
setIsSimplePassword
(
Boolean
.
TRUE
);
respVO
.
setIsSimplePassword
(
Boolean
.
TRUE
);
}
}
MemberUserLevelConfigBaseRespVO
userScoreLevelVO
=
memberUserLevelConfigService
.
getLevelByCount
(
user
.
getTotalScore
());
//获取用户积分信息
MemberUserScoreLevelVO
scoreLevelVO
=
MemberUserScoreLevelVO
.
builder
().
memberId
(
user
.
getId
())
AppMemberUserScoreInfoRespVO
userScoreInfo
=
memberUserScoreService
.
getUserScoreInfo
(
user
.
getId
());
.
memberCode
(
user
.
getMemberCode
())
respVO
.
setUserScoreLevelInfo
(
userScoreInfo
);
.
holdScore
(
user
.
getHoldScore
())
.
expiredScore
(
user
.
getExpiredScore
())
.
usedScore
(
user
.
getUsedScore
())
.
levelIcon
(
userScoreLevelVO
.
getIcon
())
.
levelName
(
userScoreLevelVO
.
getName
())
.
build
();
respVO
.
setUserScoreLevelInfo
(
scoreLevelVO
);
if
(
user
.
getCountry
()
!=
null
)
{
if
(
user
.
getCountry
()
!=
null
)
{
RegionDO
region
=
regionService
.
getRegion
(
Long
.
valueOf
(
user
.
getCountry
()));
RegionDO
region
=
regionService
.
getRegion
(
Long
.
valueOf
(
user
.
getCountry
()));
respVO
.
setCountryTitleEn
(
region
.
getTitleEn
());
respVO
.
setCountryTitleEn
(
region
.
getTitleEn
());
...
...
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/user/vo/AppUserInfoRespVO.java
View file @
deea0c7f
package
cn
.
iocoder
.
yudao
.
module
.
member
.
controller
.
app
.
user
.
vo
;
package
cn
.
iocoder
.
yudao
.
module
.
member
.
controller
.
app
.
user
.
vo
;
import
cn.iocoder.yudao.module.member.
vo.userLevel.MemberUserScoreLevel
VO
;
import
cn.iocoder.yudao.module.member.
controller.app.userScore.vo.AppMemberUserScoreInfoResp
VO
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
...
@@ -10,7 +10,6 @@ import lombok.NoArgsConstructor;
...
@@ -10,7 +10,6 @@ import lombok.NoArgsConstructor;
import
org.springframework.format.annotation.DateTimeFormat
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
java.util.Date
;
import
java.util.Date
;
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
;
...
@@ -69,7 +68,7 @@ public class AppUserInfoRespVO {
...
@@ -69,7 +68,7 @@ public class AppUserInfoRespVO {
private
Boolean
isSimplePassword
=
Boolean
.
FALSE
;
private
Boolean
isSimplePassword
=
Boolean
.
FALSE
;
@ApiModelProperty
(
value
=
"会员积分信息"
)
@ApiModelProperty
(
value
=
"会员积分信息"
)
private
MemberUserScoreLevel
VO
userScoreLevelInfo
;
private
AppMemberUserScoreInfoResp
VO
userScoreLevelInfo
;
@ApiModelProperty
(
value
=
"会员国家id"
)
@ApiModelProperty
(
value
=
"会员国家id"
)
private
Integer
country
;
private
Integer
country
;
@ApiModelProperty
(
value
=
"会员国家中文"
)
@ApiModelProperty
(
value
=
"会员国家中文"
)
...
...
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/userScore/AppMemberUserScoreController.java
View file @
deea0c7f
...
@@ -40,7 +40,7 @@ public class AppMemberUserScoreController {
...
@@ -40,7 +40,7 @@ public class AppMemberUserScoreController {
@ApiOperation
(
"获得会员积分基本信息"
)
@ApiOperation
(
"获得会员积分基本信息"
)
//@PreAuthenticated
//@PreAuthenticated
public
CommonResult
<
AppMemberUserScoreInfoRespVO
>
getUserScoreInfo
(
@Valid
@RequestBody
AppMemberUserIdQueryVO
idQuery
)
{
public
CommonResult
<
AppMemberUserScoreInfoRespVO
>
getUserScoreInfo
(
@Valid
@RequestBody
AppMemberUserIdQueryVO
idQuery
)
{
AppMemberUserScoreInfoRespVO
scoreInfo
=
userScoreService
.
getUserScoreInfo
(
idQuery
);
AppMemberUserScoreInfoRespVO
scoreInfo
=
userScoreService
.
getUserScoreInfo
(
idQuery
.
getId
()
);
return
success
(
scoreInfo
);
return
success
(
scoreInfo
);
}
}
...
...
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/service/score/MemberUserScoreService.java
View file @
deea0c7f
...
@@ -55,8 +55,8 @@ public interface MemberUserScoreService extends IService<MemberUserScoreDO> {
...
@@ -55,8 +55,8 @@ public interface MemberUserScoreService extends IService<MemberUserScoreDO> {
/**
/**
* 获取会员积分及会员等级信息
* 获取会员积分及会员等级信息
* @param
i
d
* @param
memberI
d
* @return
* @return
*/
*/
AppMemberUserScoreInfoRespVO
getUserScoreInfo
(
AppMemberUserIdQueryVO
i
d
);
AppMemberUserScoreInfoRespVO
getUserScoreInfo
(
Long
memberI
d
);
}
}
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/service/score/MemberUserScoreServiceImpl.java
View file @
deea0c7f
...
@@ -110,14 +110,14 @@ public class MemberUserScoreServiceImpl extends AbstractService<MemberUserScoreM
...
@@ -110,14 +110,14 @@ public class MemberUserScoreServiceImpl extends AbstractService<MemberUserScoreM
}
}
@Override
@Override
public
AppMemberUserScoreInfoRespVO
getUserScoreInfo
(
AppMemberUserIdQueryVO
i
d
)
{
public
AppMemberUserScoreInfoRespVO
getUserScoreInfo
(
Long
memberI
d
)
{
MemberUserScoreDO
userScoreDO
=
userScoreMapper
.
getByMemberId
(
id
.
getId
()
);
MemberUserScoreDO
userScoreDO
=
userScoreMapper
.
getByMemberId
(
memberId
);
Integer
userScoreTotal
=
0
;
Integer
userScoreTotal
=
0
;
AppMemberUserScoreInfoRespVO
infoRespVO
;
AppMemberUserScoreInfoRespVO
infoRespVO
;
if
(
userScoreDO
==
null
)
{
if
(
userScoreDO
==
null
)
{
infoRespVO
=
AppMemberUserScoreInfoRespVO
.
builder
()
infoRespVO
=
AppMemberUserScoreInfoRespVO
.
builder
()
.
holdScore
(
0
)
.
holdScore
(
0
)
.
id
(
id
.
getId
()
)
.
id
(
memberId
)
.
totalScore
(
userScoreTotal
)
.
totalScore
(
userScoreTotal
)
.
usedScore
(
0
)
.
usedScore
(
0
)
.
build
();
.
build
();
...
@@ -125,7 +125,7 @@ public class MemberUserScoreServiceImpl extends AbstractService<MemberUserScoreM
...
@@ -125,7 +125,7 @@ public class MemberUserScoreServiceImpl extends AbstractService<MemberUserScoreM
userScoreTotal
=
userScoreDO
.
getHoldScore
()
+
userScoreDO
.
getUsedScore
()
+
userScoreDO
.
getExpiredScore
();
userScoreTotal
=
userScoreDO
.
getHoldScore
()
+
userScoreDO
.
getUsedScore
()
+
userScoreDO
.
getExpiredScore
();
infoRespVO
=
AppMemberUserScoreInfoRespVO
.
builder
()
infoRespVO
=
AppMemberUserScoreInfoRespVO
.
builder
()
.
holdScore
(
userScoreDO
.
getHoldScore
())
.
holdScore
(
userScoreDO
.
getHoldScore
())
.
id
(
id
.
getId
()
)
.
id
(
memberId
)
.
totalScore
(
userScoreTotal
)
.
totalScore
(
userScoreTotal
)
.
usedScore
(
userScoreDO
.
getUsedScore
())
.
usedScore
(
userScoreDO
.
getUsedScore
())
.
build
();
.
build
();
...
...
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/service/user/MemberUserServiceImpl.java
View file @
deea0c7f
package
cn
.
iocoder
.
yudao
.
module
.
member
.
service
.
user
;
package
cn
.
iocoder
.
yudao
.
module
.
member
.
service
.
user
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.io.IoUtil
;
import
cn.hutool.core.io.IoUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.core.util.StrUtil
;
...
@@ -259,7 +260,11 @@ public class MemberUserServiceImpl implements MemberUserService {
...
@@ -259,7 +260,11 @@ public class MemberUserServiceImpl implements MemberUserService {
@Override
@Override
public
MemberUserDO
info
(
Long
id
)
{
public
MemberUserDO
info
(
Long
id
)
{
// 一个会员可能绑定了多个用户
// 一个会员可能绑定了多个用户
return
memberUserMapper
.
info
(
id
).
get
(
0
);
List
<
MemberUserDO
>
info
=
memberUserMapper
.
info
(
id
);
if
(
CollUtil
.
isEmpty
(
info
))
{
return
null
;
}
return
info
.
get
(
0
);
}
}
@Override
@Override
...
...
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