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
6c948192
Commit
6c948192
authored
Aug 31, 2024
by
zhengyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
web-app的用户信息中返回其客户档案部分设置数据,以提供给前端做发货等操作数据判断
parent
8673c525
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
0 deletions
+40
-0
AppUserController.java
.../module/member/controller/app/user/AppUserController.java
+29
-0
AppUserInfoRespVO.java
...dule/member/controller/app/user/vo/AppUserInfoRespVO.java
+11
-0
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 @
6c948192
...
...
@@ -6,9 +6,12 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import
cn.iocoder.yudao.framework.idempotent.core.annotation.Idempotent
;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX
;
import
cn.iocoder.yudao.framework.security.core.annotations.PreAuthenticated
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customer.CustomerDO
;
import
cn.iocoder.yudao.module.customer.dal.dataobject.customerContacts.CustomerContactsDO
;
import
cn.iocoder.yudao.module.customer.service.customer.CustomerService
;
import
cn.iocoder.yudao.module.customer.service.customerContacts.CustomerContactsService
;
import
cn.iocoder.yudao.module.ecw.api.paramValid.ParamValidatorApi
;
import
cn.iocoder.yudao.module.ecw.dal.dataobject.country.CountryDO
;
import
cn.iocoder.yudao.module.ecw.dal.dataobject.region.RegionDO
;
import
cn.iocoder.yudao.module.ecw.service.internalMessage.WebInternalMessageService
;
import
cn.iocoder.yudao.module.ecw.service.region.RegionService
;
...
...
@@ -54,6 +57,7 @@ import javax.validation.Valid;
import
java.text.SimpleDateFormat
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
...
...
@@ -79,6 +83,8 @@ public class AppUserController {
@Resource
private
CustomerContactsService
customerContactsService
;
@Resource
private
CustomerService
customerService
;
@Resource
private
UserEnterpriseAuthService
userEnterpriseAuthService
;
@Resource
...
...
@@ -155,6 +161,29 @@ public class AppUserController {
if
(
passwordEncoder
.
matches
(
"88888888"
,
user
.
getPassword
()))
{
respVO
.
setIsSimplePassword
(
Boolean
.
TRUE
);
}
// 根据会员ID获取客户联系人ID与客户ID,并返回部分客户档案设置
CustomerContactsDO
customerContacts
=
customerContactsService
.
getOne
(
new
LambdaQueryWrapper
<
CustomerContactsDO
>()
.
and
(
we
->
we
.
eq
(
CustomerContactsDO:
:
getUserid
,
user
.
getId
())
.
or
()
.
eq
(
CustomerContactsDO:
:
getPhoneNew
,
user
.
getMobile
())
.
eq
(
CustomerContactsDO:
:
getAreaCode
,
user
.
getAreaCode
())).
eq
(
CustomerContactsDO:
:
getDeleted
,
0
).
last
(
"limit 1"
));
if
(
Objects
.
isNull
(
customerContacts
))
{
respVO
.
setDefaultPay
(
Boolean
.
FALSE
);
respVO
.
setNoConsignee
(
Boolean
.
FALSE
);
}
else
{
CustomerDO
customerDO
=
customerService
.
getCustomer
(
customerContacts
.
getCustomerId
());
if
(
customerDO
!=
null
)
{
respVO
.
setDefaultPay
(
customerDO
.
getDefaultPay
());
respVO
.
setNoConsignee
(
customerDO
.
getNoConsignee
());
respVO
.
setFirstDealTime
(
customerDO
.
getFirstDealTime
());
}
else
{
respVO
.
setDefaultPay
(
Boolean
.
FALSE
);
respVO
.
setNoConsignee
(
Boolean
.
FALSE
);
}
}
//获取用户积分信息
AppMemberUserScoreInfoRespVO
userScoreInfo
=
memberUserScoreService
.
getUserScoreInfo
(
user
.
getId
());
respVO
.
setUserScoreLevelInfo
(
userScoreInfo
);
...
...
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/app/user/vo/AppUserInfoRespVO.java
View file @
6c948192
...
...
@@ -67,6 +67,17 @@ public class AppUserInfoRespVO {
@ApiModelProperty
(
value
=
"是否简单密码"
,
example
=
"false"
)
private
Boolean
isSimplePassword
=
Boolean
.
FALSE
;
@ApiModelProperty
(
value
=
"客户档案设置的是否默认付款:1 是 0 否"
)
private
Boolean
defaultPay
;
@ApiModelProperty
(
value
=
"客户档案设置的是否允许控货无收货人:1 是 0 否"
)
private
Boolean
noConsignee
;
@ApiModelProperty
(
value
=
"客户档案记录的首次成交时间"
)
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@JsonFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
private
Date
firstDealTime
;
@ApiModelProperty
(
value
=
"会员积分信息"
)
private
AppMemberUserScoreInfoRespVO
userScoreLevelInfo
;
@ApiModelProperty
(
value
=
"会员国家id"
)
...
...
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