Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
项目统一框架
amos-boot-biz
Commits
ce0160f6
Commit
ce0160f6
authored
Apr 23, 2023
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
企业端管理员变更报错提示修改
parent
7b70e96d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
22 deletions
+29
-22
TzBaseEnterpriseInfoController.java
...le/tzs/biz/controller/TzBaseEnterpriseInfoController.java
+11
-3
TzBaseEnterpriseInfoServiceImpl.java
...tzs/biz/service/impl/TzBaseEnterpriseInfoServiceImpl.java
+18
-19
No files found.
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/controller/TzBaseEnterpriseInfoController.java
View file @
ce0160f6
...
@@ -13,7 +13,6 @@ import com.yeejoin.amos.boot.module.tzs.api.dto.TzBaseEnterpriseInfoDto;
...
@@ -13,7 +13,6 @@ import com.yeejoin.amos.boot.module.tzs.api.dto.TzBaseEnterpriseInfoDto;
import
com.yeejoin.amos.boot.module.tzs.api.entity.PageParam
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.PageParam
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.TzBaseEnterpriseInfo
;
import
com.yeejoin.amos.boot.module.tzs.api.entity.TzBaseEnterpriseInfo
;
import
com.yeejoin.amos.boot.module.tzs.api.service.ITzBaseEnterpriseInfoService
;
import
com.yeejoin.amos.boot.module.tzs.api.service.ITzBaseEnterpriseInfoService
;
import
com.yeejoin.amos.boot.module.tzs.flc.api.entity.RegUnitInfo
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.apache.commons.lang3.ObjectUtils
;
...
@@ -192,8 +191,17 @@ public class TzBaseEnterpriseInfoController {
...
@@ -192,8 +191,17 @@ public class TzBaseEnterpriseInfoController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/adminInfoUpdate"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/adminInfoUpdate"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"修改企业信息"
,
notes
=
"修改企业信息"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"修改企业信息"
,
notes
=
"修改企业信息"
)
public
ResponseModel
<
RegUnitInfo
>
adminInfoUpdate
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
public
ResponseModel
<
Object
>
adminInfoUpdate
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
return
ResponseHelper
.
buildResponse
(
iTzBaseEnterpriseInfoService
.
adminInfoUpdate
(
map
));
ResponseModel
responseModel
=
new
ResponseModel
();
Map
<
String
,
Object
>
result
=
iTzBaseEnterpriseInfoService
.
adminInfoUpdate
(
map
);
if
(
result
.
containsKey
(
"fail"
))
{
ResponseModel
response
=
new
ResponseModel
();
response
.
setStatus
(
500
);
response
.
setDevMessage
(
result
.
get
(
"fail"
).
toString
());
return
ResponseHelper
.
buildResponse
(
responseModel
);
}
else
{
return
ResponseHelper
.
buildResponse
(
result
.
get
(
"success"
));
}
}
}
/**
/**
...
...
amos-boot-system-tzs/amos-boot-module-tzs-biz/src/main/java/com/yeejoin/amos/boot/module/tzs/biz/service/impl/TzBaseEnterpriseInfoServiceImpl.java
View file @
ce0160f6
...
@@ -42,7 +42,6 @@ import org.springframework.util.ObjectUtils;
...
@@ -42,7 +42,6 @@ import org.springframework.util.ObjectUtils;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.util.*
;
import
java.util.*
;
...
@@ -441,7 +440,7 @@ public class TzBaseEnterpriseInfoServiceImpl
...
@@ -441,7 +440,7 @@ public class TzBaseEnterpriseInfoServiceImpl
}
}
public
RegUnitInfo
adminInfoUpdate
(
Map
<
String
,
Object
>
map
)
{
public
Map
<
String
,
Object
>
adminInfoUpdate
(
Map
<
String
,
Object
>
map
)
{
//每一个企业只有一个管理员,所以当前登录用户即管理员用户
//每一个企业只有一个管理员,所以当前登录用户即管理员用户
AgencyUserModel
me
=
Privilege
.
agencyUserClient
.
getme
().
getResult
();
AgencyUserModel
me
=
Privilege
.
agencyUserClient
.
getme
().
getResult
();
RequestContext
.
setAppKey
(
appkey
);
RequestContext
.
setAppKey
(
appkey
);
...
@@ -451,31 +450,31 @@ public class TzBaseEnterpriseInfoServiceImpl
...
@@ -451,31 +450,31 @@ public class TzBaseEnterpriseInfoServiceImpl
loginCtiUser
();
loginCtiUser
();
}
}
RequestContext
.
setToken
(
String
.
valueOf
(
redisUtil
.
get
(
TZS_USER_TOKEN
)));
RequestContext
.
setToken
(
String
.
valueOf
(
redisUtil
.
get
(
TZS_USER_TOKEN
)));
if
(
me
.
getMobile
().
equals
(
String
.
valueOf
(
map
.
get
(
"adminTel"
))))
{
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
RegUnitInfo
regUnitInfo
=
new
RegUnitInfo
();
if
(!
ObjectUtils
.
isEmpty
(
me
))
{
String
useCode
=
String
.
valueOf
(
map
.
get
(
"useCode"
));
if
(
String
.
valueOf
(
map
.
get
(
"adminTel"
)).
equals
(
me
.
getMobile
()))
{
regUnitInfo
.
setAdminName
(
String
.
valueOf
(
map
.
get
(
"adminName"
)));
RegUnitInfo
regUnitInfo
=
new
RegUnitInfo
();
regUnitInfo
.
setAdminIdNumber
(
String
.
valueOf
(
map
.
get
(
"adminIdNumber"
)));
String
useCode
=
String
.
valueOf
(
map
.
get
(
"useCode"
));
regUnitInfo
.
setAdminIdCardPhoto
(
JSON
.
toJSONString
(
map
.
get
(
"adminIdCardPhoto"
)));
regUnitInfo
.
setAdminName
(
String
.
valueOf
(
map
.
get
(
"adminName"
)));
regUnitInfo
.
setAdminTel
(
ObjectUtils
.
isEmpty
(
map
.
get
(
"adminNewTel"
))
?
me
.
getMobile
()
:
String
.
valueOf
(
map
.
get
(
"adminNewTel"
)));
regUnitInfo
.
setAdminIdNumber
(
String
.
valueOf
(
map
.
get
(
"adminIdNumber"
)));
boolean
b
;
regUnitInfo
.
setAdminIdCardPhoto
(
JSON
.
toJSONString
(
map
.
get
(
"adminIdCardPhoto"
)));
if
(
ObjectUtils
.
isEmpty
(
me
))
{
regUnitInfo
.
setAdminTel
(
ObjectUtils
.
isEmpty
(
map
.
get
(
"adminNewTel"
))
?
me
.
getMobile
()
:
String
.
valueOf
(
map
.
get
(
"adminNewTel"
)));
throw
new
BadRequest
(
"平台用户不存在"
);
}
else
{
me
.
setMobile
(
ObjectUtils
.
isEmpty
(
map
.
get
(
"adminNewTel"
))
?
me
.
getMobile
()
:
String
.
valueOf
(
map
.
get
(
"adminNewTel"
)));
me
.
setMobile
(
ObjectUtils
.
isEmpty
(
map
.
get
(
"adminNewTel"
))
?
me
.
getMobile
()
:
String
.
valueOf
(
map
.
get
(
"adminNewTel"
)));
me
.
setRealName
(
String
.
valueOf
(
map
.
get
(
"adminName"
)));
me
.
setRealName
(
String
.
valueOf
(
map
.
get
(
"adminName"
)));
FeignClientResult
<
AgencyUserModel
>
updateResult
=
Privilege
.
agencyUserClient
.
update
(
me
,
String
.
valueOf
(
map
.
get
(
"adminUserId"
)));
FeignClientResult
<
AgencyUserModel
>
updateResult
=
Privilege
.
agencyUserClient
.
update
(
me
,
String
.
valueOf
(
map
.
get
(
"adminUserId"
)));
b
=
200
==
updateResult
.
getStatus
();
if
(
200
==
updateResult
.
getStatus
())
{
if
(
b
)
{
regUnitInfoService
.
update
(
regUnitInfo
,
new
QueryWrapper
<
RegUnitInfo
>().
eq
(
"unit_code"
,
useCode
));
b
=
regUnitInfoService
.
update
(
regUnitInfo
,
new
QueryWrapper
<
RegUnitInfo
>().
eq
(
"unit_code"
,
useCode
)
);
resultMap
.
put
(
"success"
,
regUnitInfo
);
}
else
{
}
else
{
throw
new
BadRequest
(
"平台用户修改失败,请联系管理员"
);
resultMap
.
put
(
"fail"
,
"平台用户修改失败,请联系管理员"
);
}
}
}
else
{
resultMap
.
put
(
"fail"
,
"请输入正确的原始手机号!"
);
}
}
return
b
?
regUnitInfo
:
null
;
}
else
{
}
else
{
throw
new
BadRequest
(
"请输入正确的原始手机号!
"
);
resultMap
.
put
(
"fail"
,
"平台用户不存在
"
);
}
}
return
resultMap
;
}
}
//机器人用户登录
//机器人用户登录
...
...
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