Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-zx-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
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
Jobs
Commits
Open sidebar
项目统一框架
一体化_户用光伏项目代码
amos-boot-zx-biz
Commits
6d8fc62d
Commit
6d8fc62d
authored
Jun 26, 2024
by
朱晨阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
经销商管理人员添加删除接口
parent
fbd64cc4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
123 additions
and
2 deletions
+123
-2
ControllerAop.java
...a/com/yeejoin/amos/boot/biz/common/aop/ControllerAop.java
+1
-0
PersonnelBusinessMapper.java
.../boot/module/hygf/api/mapper/PersonnelBusinessMapper.java
+11
-0
UnitInfoMapper.java
...join/amos/boot/module/hygf/api/mapper/UnitInfoMapper.java
+4
-0
IPersonnelBusinessService.java
...ot/module/hygf/api/service/IPersonnelBusinessService.java
+1
-0
PersonnelBusinessMapper.xml
...c/main/resources/mapper/mysql/PersonnelBusinessMapper.xml
+34
-0
UnitInfoMapper.xml
...gf-api/src/main/resources/mapper/mysql/UnitInfoMapper.xml
+25
-0
PersonnelBusinessController.java
...dule/hygf/biz/controller/PersonnelBusinessController.java
+15
-0
UnitInfoController.java
...s/boot/module/hygf/biz/controller/UnitInfoController.java
+16
-2
PersonnelBusinessServiceImpl.java
...e/hygf/biz/service/impl/PersonnelBusinessServiceImpl.java
+0
-0
UnitInfoServiceImpl.java
...oot/module/hygf/biz/service/impl/UnitInfoServiceImpl.java
+16
-0
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/aop/ControllerAop.java
View file @
6d8fc62d
...
@@ -100,6 +100,7 @@ public class ControllerAop {
...
@@ -100,6 +100,7 @@ public class ControllerAop {
urls
.
add
(
"/hygf/unit-info/region/tree"
);
urls
.
add
(
"/hygf/unit-info/region/tree"
);
urls
.
add
(
"/hygf/unit-info/management-unit/tree"
);
urls
.
add
(
"/hygf/unit-info/management-unit/tree"
);
urls
.
add
(
"/hygf/unit-info/hasExistPhone/.*"
);
urls
.
add
(
"/hygf/unit-info/hasExistPhone/.*"
);
urls
.
add
(
"/hygf/unit-info/hasExistUserName/.*"
);
urls
.
add
(
"/hygf/unit-info/sendTelCode/.*"
);
urls
.
add
(
"/hygf/unit-info/sendTelCode/.*"
);
urls
.
add
(
"/hygf/unit-info/verifyTelCode/.*/.*"
);
urls
.
add
(
"/hygf/unit-info/verifyTelCode/.*/.*"
);
urls
.
add
(
"/hygf/peasant-household/mobile/login"
);
urls
.
add
(
"/hygf/peasant-household/mobile/login"
);
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/PersonnelBusinessMapper.java
View file @
6d8fc62d
...
@@ -30,6 +30,17 @@ public interface PersonnelBusinessMapper extends BaseMapper<PersonnelBusiness> {
...
@@ -30,6 +30,17 @@ public interface PersonnelBusinessMapper extends BaseMapper<PersonnelBusiness> {
UserUnitInformationDto
getMaintenanceUserUnitInformationDto
(
@Param
(
"userId"
)
String
userId
);
UserUnitInformationDto
getMaintenanceUserUnitInformationDto
(
@Param
(
"userId"
)
String
userId
);
String
selectUserInfo
(
Long
sequenceNbr
);
void
deletePauByUserId
(
String
userId
);
void
deletePguByUserId
(
String
userId
);
void
deleteSubByUserId
(
String
userId
);
void
deleteHpbByFoundationId
(
Long
sequenceNbr
);
void
deleteSueByUserId
(
String
userId
);
void
deleteAliByUserId
(
String
userId
);
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/UnitInfoMapper.java
View file @
6d8fc62d
...
@@ -29,7 +29,11 @@ public interface UnitInfoMapper extends BaseMapper<UnitInfo> {
...
@@ -29,7 +29,11 @@ public interface UnitInfoMapper extends BaseMapper<UnitInfo> {
@UserEmpower
(
field
={
"hygf_regional_companies.regional_companies_code"
}
,
dealerField
={}
,
fieldConditions
={
"in"
}
,
relationship
=
"and"
)
@UserEmpower
(
field
={
"hygf_regional_companies.regional_companies_code"
}
,
dealerField
={}
,
fieldConditions
={
"in"
}
,
relationship
=
"and"
)
List
<
UnitInfo
>
getlistUnitInfo
();
List
<
UnitInfo
>
getlistUnitInfo
();
// @UserEmpower(field ={"hygf_unit_info.regional_companies_code"} ,dealerField ={} ,fieldConditions ={"in"} ,relationship="and")
// @UserEmpower(field ={"hygf_unit_info.regional_companies_code"} ,dealerField ={} ,fieldConditions ={"in"} ,relationship="and")
// UnitInfo selectById( Long unitInfoId);
// UnitInfo selectById( Long unitInfoId);
Integer
getUserListHuiCount
(
String
phone
,
String
userName
);
Integer
getUserListPauCount
(
String
phone
,
String
userName
);
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/service/IPersonnelBusinessService.java
View file @
6d8fc62d
...
@@ -16,4 +16,5 @@ public interface IPersonnelBusinessService {
...
@@ -16,4 +16,5 @@ public interface IPersonnelBusinessService {
IPage
<
CompanyDtoUserDto
>
getCompanyDtoUserDto
(
CompanyDtoUserDto
dto
);
IPage
<
CompanyDtoUserDto
>
getCompanyDtoUserDto
(
CompanyDtoUserDto
dto
);
UserDataDto
getPersonnelBusinessById
(
String
id
);
UserDataDto
getPersonnelBusinessById
(
String
id
);
Object
deleteAllBySequenceNbr
(
Long
sequenceNbr
);
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/PersonnelBusinessMapper.xml
View file @
6d8fc62d
...
@@ -114,4 +114,38 @@ select ORG_CODE orgCode from privilege_company where privilege_company.SEQUEN
...
@@ -114,4 +114,38 @@ select ORG_CODE orgCode from privilege_company where privilege_company.SEQUEN
</select>
</select>
<select
id=
"selectUserInfo"
resultType=
"String"
>
SELECT
sub.amos_user_id userId
FROM
std_user_biz sub
WHERE
sub.sequence_nbr =#{sequenceNbr}
</select>
<select
id=
"deletePauByUserId"
>
DELETE FROM privilege_agency_user WHERE USER_ID=#{userId}
</select>
<select
id=
"deletePguByUserId"
>
DELETE FROM privilege_group_user WHERE USER_ID=#{userId}
</select>
<select
id=
"deleteSubByUserId"
>
DELETE FROM std_user_biz WHERE amos_user_id=#{userId}
</select>
<select
id=
"deleteHpbByFoundationId"
>
DELETE FROM hygf_personnel_business WHERE foundation_id=#{sequenceNbr}
</select>
<select
id=
"deleteSueByUserId"
>
DELETE FROM std_user_empower WHERE amos_user_id=#{userId}
</select>
<select
id=
"deleteAliByUserId"
>
DELETE FROM auth_login_info WHERE USER_ID=#{userId}
</select>
</mapper>
</mapper>
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/UnitInfoMapper.xml
View file @
6d8fc62d
...
@@ -125,4 +125,29 @@ from privilege_company where IS_DELETED=0 and AGENCY_CODE='JXIOP'
...
@@ -125,4 +125,29 @@ from privilege_company where IS_DELETED=0 and AGENCY_CODE='JXIOP'
</select>
</select>
<select
id=
"getUserListHuiCount"
resultType=
"integer"
>
select count(*) from hygf_unit_info
<where>
audit_status != 3
<if
test=
"phone != null and phone !=''"
>
and admin_phone = #{phone}
</if>
<if
test=
"userName != null and userName !=''"
>
and admin_login_name = #{userName}
</if>
</where>
</select>
<select
id=
"getUserListPauCount"
resultType=
"integer"
>
select count(*) from privilege_agency_user
<where>
<if
test=
"phone != null and phone !=''"
>
and MOBILE = #{phone}
</if>
<if
test=
"userName != null and userName !=''"
>
and USER_NAME = #{userName}
</if>
</where>
</select>
</mapper>
</mapper>
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/PersonnelBusinessController.java
View file @
6d8fc62d
...
@@ -95,6 +95,19 @@ public class PersonnelBusinessController extends BaseController {
...
@@ -95,6 +95,19 @@ public class PersonnelBusinessController extends BaseController {
}
}
/**
/**
* 根据sequenceNbr删除
*
* @param sequenceNbr 主键
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/all/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除人员信息"
,
notes
=
"根据sequenceNbr删除人员信息"
)
public
ResponseModel
<
Boolean
>
deleteAllBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
){
return
ResponseHelper
.
buildResponse
(
personnelBusinessServiceImpl
.
deleteAllBySequenceNbr
(
sequenceNbr
));
}
/**
* 根据sequenceNbr查询
* 根据sequenceNbr查询
*
*
* @param sequenceNbr 主键
* @param sequenceNbr 主键
...
@@ -107,6 +120,8 @@ public class PersonnelBusinessController extends BaseController {
...
@@ -107,6 +120,8 @@ public class PersonnelBusinessController extends BaseController {
return
ResponseHelper
.
buildResponse
(
personnelBusinessServiceImpl
.
queryBySeq
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
personnelBusinessServiceImpl
.
queryBySeq
(
sequenceNbr
));
}
}
/**
/**
* 列表分页查询
* 列表分页查询
*
*
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/UnitInfoController.java
View file @
6d8fc62d
...
@@ -332,7 +332,21 @@ public class UnitInfoController extends BaseController {
...
@@ -332,7 +332,21 @@ public class UnitInfoController extends BaseController {
/**
* 判断用户名是否存在
*
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/hasExistUserName/{userName}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"判断用户名是否存在"
,
notes
=
"判断用户名是否存在"
)
public
ResponseModel
hasExistUserName
(
@PathVariable
(
value
=
"userName"
)
String
userName
)
{
try
{
return
CommonResponseNewUtil
.
success
(
unitInfoServiceImpl
.
hasExistPhoneOrUserName
(
null
,
userName
));
}
catch
(
Exception
e
)
{
return
CommonResponseNewUtil
.
failure
(
"该用户名已经注册"
);
}
}
...
@@ -346,7 +360,7 @@ public class UnitInfoController extends BaseController {
...
@@ -346,7 +360,7 @@ public class UnitInfoController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"判断用户号码是否存在"
,
notes
=
"判断用户号码是否存在"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"判断用户号码是否存在"
,
notes
=
"判断用户号码是否存在"
)
public
ResponseModel
hasExistPhone
(
@PathVariable
(
value
=
"phone"
)
String
phone
)
{
public
ResponseModel
hasExistPhone
(
@PathVariable
(
value
=
"phone"
)
String
phone
)
{
try
{
try
{
return
CommonResponseNewUtil
.
success
(
Privilege
.
agencyUserClient
.
checkLoginId
(
phone
).
getResult
(
));
return
CommonResponseNewUtil
.
success
(
unitInfoServiceImpl
.
hasExistPhoneOrUserName
(
phone
,
null
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
return
CommonResponseNewUtil
.
failure
(
"该手机号已经注册"
);
return
CommonResponseNewUtil
.
failure
(
"该手机号已经注册"
);
}
}
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/PersonnelBusinessServiceImpl.java
View file @
6d8fc62d
This diff is collapsed.
Click to expand it.
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/UnitInfoServiceImpl.java
View file @
6d8fc62d
...
@@ -1056,4 +1056,19 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
...
@@ -1056,4 +1056,19 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
pagenew
.
setRecords
(
page
.
getList
());
pagenew
.
setRecords
(
page
.
getList
());
return
pagenew
;
return
pagenew
;
}
}
public
Boolean
hasExistPhoneOrUserName
(
String
phone
,
String
userName
)
{
Integer
userListHuiCount
=
unitInfoMapper
.
getUserListHuiCount
(
phone
,
userName
);
Integer
userListPauCount
=
unitInfoMapper
.
getUserListPauCount
(
phone
,
userName
);
if
((
userListHuiCount
!=
0
||
userListPauCount
!=
0
)
&&
phone
!=
null
)
{
throw
new
BadRequest
(
"该手机号已经注册"
);
}
if
((
userListHuiCount
!=
0
||
userListPauCount
!=
0
)
&&
userName
!=
null
)
{
throw
new
BadRequest
(
"该用户名已经注册"
);
}
return
true
;
}
}
}
\ No newline at end of file
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