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
be27e69e
Commit
be27e69e
authored
May 15, 2024
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
登录问题修复 增加是否农户判断 及对微信报错抛出异常 勘察商务信息同步到资料归档
parent
17b260e1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
6 deletions
+44
-6
PeasantHouseholdMapper.java
...s/boot/module/hygf/api/mapper/PeasantHouseholdMapper.java
+3
-0
PeasantHouseholdMapper.xml
...rc/main/resources/mapper/mysql/PeasantHouseholdMapper.xml
+10
-0
PeasantHouseholdServiceImpl.java
...le/hygf/biz/service/impl/PeasantHouseholdServiceImpl.java
+28
-6
SurveyInformationServiceImpl.java
...e/hygf/biz/service/impl/SurveyInformationServiceImpl.java
+3
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/mapper/PeasantHouseholdMapper.java
View file @
be27e69e
...
...
@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.module.hygf.api.entity.PeasantHousehold;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
/**
* 农户信息 Mapper 接口
...
...
@@ -32,4 +33,6 @@ public interface PeasantHouseholdMapper extends BaseMapper<PeasantHousehold> {
@UserEmpower
(
field
={},
dealerField
={
"developer_code"
,
"regional_companies_code"
,
"developer_user_id"
}
,
fieldConditions
={
"eq"
,
"in"
,
"eq"
}
,
relationship
=
"and"
)
List
<
PeasantHousehold
>
queryForPage
(
String
developerCode
,
String
ownersName
,
Long
developerId
,
Integer
isCertified
);
List
<
Map
<
String
,
Object
>>
selectUserIsHouse
(
String
telephone
);
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/PeasantHouseholdMapper.xml
View file @
be27e69e
...
...
@@ -66,5 +66,15 @@ and hygf_document_station.station_id is not null
</if>
ORDER BY rec_date DESC
</select>
<select
id=
"selectUserIsHouse"
resultType=
"java.util.Map"
>
SELECT
role.*
FROM
privilege_user_org_role role
INNER JOIN privilege_agency_user `user` ON `user`.USER_ID = role.USER_ID
AND role.ROLE_SEQ NOT IN ( 1702551322030534658 )
WHERE
`user`.MOBILE = #{telephone}
</select>
</mapper>
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/PeasantHouseholdServiceImpl.java
View file @
be27e69e
...
...
@@ -297,8 +297,13 @@ public class PeasantHouseholdServiceImpl extends BaseService<PeasantHouseholdDto
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
PeasantHouseholdWxDto
wxUserLogin
(
MobileLoginParamDto
wxDTO
)
{
// 通过手机号和验证码调用平台接口进行验证
String
phoneNo
=
this
.
parsePhoneNo
(
wxDTO
);
if
(
phoneNo
==
null
)
{
String
phoneNo
;
try
{
phoneNo
=
this
.
parsePhoneNo
(
wxDTO
);
}
catch
(
Exception
e
){
throw
new
BadRequest
(
"解析手机号失败"
);
}
if
(
phoneNo
==
null
)
{
log
.
error
(
"获取手机号失败!"
);
throw
new
BadRequest
(
"解析手机号失败"
);
}
...
...
@@ -309,6 +314,11 @@ public class PeasantHouseholdServiceImpl extends BaseService<PeasantHouseholdDto
RequestContext
.
setProduct
(
"AMOS_STUDIO_WEB"
);
RequestContext
.
setToken
(
requestContext
.
getToken
());
//判断是否非农户 如果存在即为非农户角色
List
<
Map
<
String
,
Object
>>
maps
=
peasantHouseholdMapper
.
selectUserIsHouse
(
phoneNo
);
if
(
CollectionUtil
.
isNotEmpty
(
maps
)){
throw
new
RuntimeException
(
"该用户非农户,请切换后登录"
);
}
AgencyUserModel
registerUserModel
=
null
;
// region 判断有无在平台内部注册过用户 没有注册则去平台注册
FeignClientResult
<
LoginInfoModel
>
loginInfo
=
Privilege
.
agencyUserClient
.
getLoginInfo
(
phoneNo
);
...
...
@@ -393,16 +403,28 @@ public class PeasantHouseholdServiceImpl extends BaseService<PeasantHouseholdDto
RequestContext
.
setProduct
(
"AMOS_STUDIO_WEB"
);
RequestContext
.
setToken
(
requestContext
.
getToken
());
PeasantHouseholdDto
peasantHouseholdDto
=
this
.
buildDefaultPeasantHouseholdDto
(
wxDTO
.
getAmosUserId
(),
wxDTO
.
getQrCodeType
(),
wxDTO
.
getPhoneNo
());
String
phoneNo
=
this
.
parsePhoneNo
(
wxDTO
)
;
String
phoneNo
=
null
;
Map
<
String
,
Object
>
resultMap
=
BeanUtil
.
beanToMap
(
peasantHouseholdDto
);
resultMap
.
put
(
"isRegister"
,
1
);
try
{
phoneNo
=
this
.
parsePhoneNo
(
wxDTO
);
}
catch
(
Exception
e
){
resultMap
.
put
(
"telephone"
,
""
);
return
resultMap
;
}
//判断是否非农户 如果存在即为非农户角色
List
<
Map
<
String
,
Object
>>
maps
=
peasantHouseholdMapper
.
selectUserIsHouse
(
phoneNo
);
if
(
CollectionUtil
.
isNotEmpty
(
maps
)){
throw
new
BadRequest
(
"该手机号已注册"
);
}
if
(
StringUtils
.
isNotEmpty
(
phoneNo
)){
resultMap
.
put
(
"telephone"
,
phoneNo
);
FeignClientResult
<
LoginInfoModel
>
loginInfo
=
Privilege
.
agencyUserClient
.
getLoginInfo
(
wxDTO
.
getPhoneNo
()
);
List
<
PeasantHousehold
>
peasantHouseholds
=
this
.
query
().
eq
(
"telephone"
,
wxDTO
.
getPhoneNo
()
).
eq
(
"is_certified"
,
"1"
).
orderByDesc
(
"rec_date"
).
list
();
FeignClientResult
<
LoginInfoModel
>
loginInfo
=
Privilege
.
agencyUserClient
.
getLoginInfo
(
phoneNo
);
List
<
PeasantHousehold
>
peasantHouseholds
=
this
.
query
().
eq
(
"telephone"
,
phoneNo
).
eq
(
"is_certified"
,
"1"
).
orderByDesc
(
"rec_date"
).
list
();
if
(
loginInfo
!=
null
&&
200
==
loginInfo
.
getStatus
()&&
null
!=
loginInfo
.
getResult
()
&&(
peasantHouseholds
.
size
()>
0
||
!
CollectionUtil
.
isNotEmpty
(
peasantHouseholds
))){
&&(
peasantHouseholds
.
size
()>
0
||
CollectionUtil
.
isNotEmpty
(
peasantHouseholds
))){
resultMap
.
put
(
"isRegister"
,
0
);
}
}
else
{
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/SurveyInformationServiceImpl.java
View file @
be27e69e
...
...
@@ -187,6 +187,9 @@ public class SurveyInformationServiceImpl extends BaseService<SurveyInformationD
//更新资料归档信息
Information
information
=
BeanDtoUtils
.
convert
(
surveyInfoAllDto
.
getInformation
(),
Information
.
class
);
information
.
setHouseProve
(
null
==
commercial
?
null
:(
CollectionUtil
.
isNotEmpty
(
commercial
.
getRealEstateLegal
())?
commercial
.
getRealEstateLegal
():
null
));
information
.
setCardFile
(
null
==
commercial
?
null
:(
CollectionUtil
.
isNotEmpty
(
commercial
.
getIdCardCredit
())?
commercial
.
getIdCardCredit
():
null
));
information
.
setCardFile
(
commercial
.
getAgentLegal
());
information
.
setArchivesNumber
(
this
.
getNo
(
CodeEnum
.
档案
.
getCode
(),
peasantHousehold
.
getRegionalCompaniesSeq
()));
information
.
setFileNumber
(
this
.
getNo
(
CodeEnum
.
文件
.
getCode
(),
peasantHousehold
.
getRegionalCompaniesSeq
()));
information
.
setSurveyInformationId
(
surveyInformation
.
getSequenceNbr
());
...
...
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