Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cms-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
cms-ci-test
Commits
03c0ef4e
提交
03c0ef4e
authored
8月 01, 2023
作者:
zhenjie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
后台账号删除修改
上级
2cb1b1a0
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
25 行增加
和
13 行删除
+25
-13
PmsClient.java
...ser/src/main/java/com/mmc/iuav/user/client/PmsClient.java
+15
-2
BackUserAccountServiceImpl.java
...mc/iuav/user/service/impl/BackUserAccountServiceImpl.java
+9
-3
CooperationServiceImpl.java
...om/mmc/iuav/user/service/impl/CooperationServiceImpl.java
+0
-7
CompanyDao.xml
...cms-service-user/src/main/resources/mapper/CompanyDao.xml
+1
-1
没有找到文件。
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/client/PmsClient.java
浏览文件 @
03c0ef4e
...
...
@@ -27,12 +27,25 @@ public class PmsClient {
HttpHeaders
headers
=
new
HttpHeaders
();
headers
.
add
(
"token"
,
token
);
HttpEntity
<
String
>
entity
=
new
HttpEntity
<>(
null
,
headers
);
ResponseEntity
<
ResultBody
>
responseEntity
=
restTemplate
.
exchange
(
pmsAppUri
+
"/pms/backstage/work/queryWorkServiceCount"
+
"?companyId="
+
id
,
HttpMethod
.
GET
,
entity
,
ResultBody
.
class
);
ResponseEntity
<
ResultBody
>
responseEntity
=
restTemplate
.
exchange
(
pmsAppUri
+
"/pms/backstage/work/queryWorkServiceCount"
+
"?companyId="
+
id
,
HttpMethod
.
GET
,
entity
,
ResultBody
.
class
);
ResultBody
body
=
responseEntity
.
getBody
();
if
(
body
.
getCode
().
equals
(
ResultEnum
.
SUCCESS
.
getResultCode
())){
if
(
body
.
getCode
().
equals
(
ResultEnum
.
SUCCESS
.
getResultCode
()))
{
Integer
count
=
(
Integer
)
body
.
getResult
();
return
count
;
}
return
null
;
}
public
Integer
removeMallGoods
(
Integer
id
,
String
token
)
{
HttpHeaders
headers
=
new
HttpHeaders
();
headers
.
add
(
"token"
,
token
);
HttpEntity
<
String
>
entity
=
new
HttpEntity
<>(
null
,
headers
);
ResponseEntity
<
ResultBody
>
responseEntity
=
restTemplate
.
exchange
(
pmsAppUri
+
"/pms/mall/goods/feignRemoveGoodsByBackUserAccountId"
+
"?id="
+
id
,
HttpMethod
.
GET
,
entity
,
ResultBody
.
class
);
ResultBody
body
=
responseEntity
.
getBody
();
if
(
body
.
getCode
().
equals
(
ResultEnum
.
SUCCESS
.
getResultCode
()))
{
return
1
;
}
return
null
;
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/impl/BackUserAccountServiceImpl.java
浏览文件 @
03c0ef4e
...
...
@@ -5,6 +5,7 @@ import com.mmc.iuav.page.PageResult;
import
com.mmc.iuav.response.ResultBody
;
import
com.mmc.iuav.response.ResultEnum
;
import
com.mmc.iuav.user.auth.PwdUtil
;
import
com.mmc.iuav.user.client.PmsClient
;
import
com.mmc.iuav.user.dao.BackUserAccountDao
;
import
com.mmc.iuav.user.dao.RoleDao
;
import
com.mmc.iuav.user.entity.BackUserAccountDO
;
...
...
@@ -21,6 +22,7 @@ import com.mmc.iuav.user.model.vo.CompanyInfoVO;
import
com.mmc.iuav.user.service.BackUserAccountService
;
import
com.mmc.iuav.user.service.CompanyService
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang3.RandomStringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -45,6 +47,9 @@ public class BackUserAccountServiceImpl implements BackUserAccountService {
@Autowired
private
RoleDao
roleDao
;
@Autowired
private
PmsClient
pmsClient
;
@Transactional
@Override
public
ResultBody
insertBAccount
(
BUserAccountVO
bUserAccountVO
)
{
...
...
@@ -137,7 +142,7 @@ public class BackUserAccountServiceImpl implements BackUserAccountService {
@Override
public
ResultBody
disableBAccount
(
Integer
accountId
,
Integer
backUserAccountId
)
{
BackUserAccountDO
backUserAccountDO
=
backUserAccountDao
.
getBackUserAccountDO
(
backUserA
ccountId
);
BackUserAccountDO
backUserAccountDO
=
backUserAccountDao
.
getBackUserAccountDO
(
a
ccountId
);
RoleInfoDO
roleInfoDO
=
roleDao
.
getRoleInfoByUserId
(
accountId
);
if
(
roleInfoDO
.
getSuperAdmin
().
equals
(
RoleEnums
.
ADMIN
.
getId
()))
{
return
ResultBody
.
error
(
ResultEnum
.
DELETE_ADMIN_ERROR
);
...
...
@@ -145,13 +150,14 @@ public class BackUserAccountServiceImpl implements BackUserAccountService {
if
(
accountId
.
toString
().
equals
(
backUserAccountId
.
toString
()))
{
return
ResultBody
.
error
(
ResultEnum
.
DELETE_YOURSELF_ERROR
);
}
CompanyInfoVO
companyInfoVO
=
companyService
.
getCompanyInfoByBackUserAccountId
(
backUserA
ccountId
);
CompanyInfoVO
companyInfoVO
=
companyService
.
getCompanyInfoByBackUserAccountId
(
a
ccountId
);
if
(
companyInfoVO
!=
null
&&
companyInfoVO
.
getCompanyType
().
equals
(
CompanyTypeEnums
.
FRANCHISEE
.
getType
()))
{
// 加盟企业的账号,需要把对应的成员和后台账号解绑
companyService
.
unbindingAllUsers
(
companyInfoVO
.
getId
());
}
String
accountNo
=
"DISABLE_"
+
backUserAccountDO
.
getAccountNo
();
String
accountNo
=
"DISABLE_"
+
backUserAccountDO
.
getAccountNo
()
+
RandomStringUtils
.
randomAlphanumeric
(
3
)
;
backUserAccountDao
.
disableBackUserAccountDO
(
accountId
,
accountNo
);
pmsClient
.
removeMallGoods
(
accountId
,
null
);
return
ResultBody
.
success
();
}
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/impl/CooperationServiceImpl.java
浏览文件 @
03c0ef4e
...
...
@@ -193,13 +193,6 @@ public class CooperationServiceImpl implements CooperationService {
ResultBody
resultBody
=
backUserAccountService
.
insertBAccount
(
bUserAccountVO
);
if
(!
resultBody
.
getCode
().
equals
(
ResultEnum
.
SUCCESS
.
getResultCode
()))
{
// 生成账号失败处理
if
(
resultBody
.
getCode
().
equals
(
ResultEnum
.
ADD_USER_ACCOUNT_NAME_EXISTS
.
getResultCode
()))
{
bUserAccountVO
.
setAccountNo
(
bUserAccountVO
.
getPhoneNum
()
+
"X"
);
ResultBody
retryResultBody
=
backUserAccountService
.
insertBAccount
(
bUserAccountVO
);
if
(
retryResultBody
.
getCode
().
equals
(
ResultEnum
.
SUCCESS
.
getResultCode
()))
{
throw
new
BizException
(
ResultEnum
.
COOPERATION_CHECK_NOT_PASS_ERROR
);
}
}
throw
new
BizException
(
ResultEnum
.
COOPERATION_CHECK_NOT_PASS_ERROR
);
}
Map
<
String
,
String
>
param
=
new
HashMap
<
String
,
String
>();
...
...
csm-service/cms-service-user/src/main/resources/mapper/CompanyDao.xml
浏览文件 @
03c0ef4e
...
...
@@ -153,7 +153,7 @@
select count(*) from company_info ci
INNER JOIN company_back_user cbu ON ci.id = cbu.company_info_id
INNER JOIN back_user_account bua ON cbu.back_user_account_id = bua.id
where ci.id = #{id} and ci.is_deleted = 0 and bua.
is_deleted
= 0
where ci.id = #{id} and ci.is_deleted = 0 and bua.
`disable`
= 0
</select>
<select
id=
"listCompanyInfoByUID"
resultType=
"com.mmc.iuav.user.entity.CompanyInfoDO"
>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论