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
649def05
Commit
649def05
authored
Dec 07, 2022
by
limei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改查看公司详情接口sql
parent
332ee2ea
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
42 deletions
+66
-42
CompanyMapper.xml
...odule-ugp-api/src/main/resources/mapper/CompanyMapper.xml
+5
-31
RectifyMsgController.java
.../boot/module/ugp/biz/controller/RectifyMsgController.java
+2
-11
RectifyMsgServiceImpl.java
...ot/module/ugp/biz/service/impl/RectifyMsgServiceImpl.java
+59
-0
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/resources/mapper/CompanyMapper.xml
View file @
649def05
...
...
@@ -17,38 +17,12 @@
<select
id=
"queryBySeq1"
resultType=
"com.yeejoin.amos.boot.module.ugp.api.dto.CompanyDto"
>
SELECT
c.sequence_nbr,
c.name,
c.type,
c.credit_code,
c.*,
l.cert_no as license_number,
l.expiry_date as expiration_date,
c.address,
c.contact_phone,
c.contact,
c.remark,
c.credit_attch,
c.license_attch,
c.approved,
c.org_code,
c.admin_name,
c.admin_tel,
c.legal_person,
c.legal_person_tel,
c.unit_tel,
c.create_time,
c.admin_lincense_pic,
c.admin_login_name,
c.admin_login_pwd,
c.region_code,
c.rec_user_id,
c.rec_user_name,
c.rec_date,
c.is_delete
FROM
`tz_ugp_unit_licence` as l,
`tz_ugp_company` as c
where l.unit_code = c.credit_code and c.sequence_nbr = #{sequenceNbr}
l.expiry_date as expiration_date
FROM tz_ugp_company as c
LEFT JOIN tz_ugp_unit_licence as l ON l.unit_code = c.credit_code
WHERE c.sequence_nbr = #{sequenceNbr}
</select>
</mapper>
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/RectifyMsgController.java
View file @
649def05
...
...
@@ -137,19 +137,10 @@ public class RectifyMsgController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"消息已读"
,
notes
=
"消息已读"
)
@GetMapping
(
value
=
"/allRead"
)
public
ResponseModel
<
Page
<
MsgNoticeDto
>>
allRead
(
@RequestParam
(
value
=
"isRead"
,
required
=
false
)
Boolean
isRead
,
Long
current
,
Long
size
){
public
ResponseModel
<
Page
<
MsgNoticeDto
>>
allRead
(
Long
current
,
Long
size
){
Page
page
=
new
Page
(
current
,
size
);
List
<
MsgNoticeDto
>
msgNoticeDtoList
=
new
ArrayList
<>();
msgNoticeDtoList
.
addAll
(
rectifyMsgServiceImpl
.
msgNotice
(
isRead
));
if
(!
ValidationUtil
.
isEmpty
(
msgNoticeDtoList
))
{
for
(
MsgNoticeDto
msgNoticeDto:
msgNoticeDtoList
){
msgNoticeDto
.
setStatus
(
"已读"
);
}
if
(!
ValidationUtil
.
isEmpty
(
isRead
))
{
if
(!
isRead
)
{
isRead
=
true
;
}
}
}
msgNoticeDtoList
.
addAll
(
rectifyMsgServiceImpl
.
allRead
());
page
.
setRecords
(
msgNoticeDtoList
);
page
.
setTotal
(
msgNoticeDtoList
.
size
());
return
ResponseHelper
.
buildResponse
(
page
);
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/RectifyMsgServiceImpl.java
View file @
649def05
...
...
@@ -44,6 +44,8 @@ public class RectifyMsgServiceImpl extends BaseService<RectifyMsgDto,RectifyMsg,
OrgServiceImpl
orgService
;
@Autowired
InstallNoticeMsgMapper
installNoticeMsgMapper
;
@Autowired
InstallNoticeMsgServiceImpl
installNoticeMsgService
;
/**
...
...
@@ -95,8 +97,10 @@ public class RectifyMsgServiceImpl extends BaseService<RectifyMsgDto,RectifyMsg,
if
(!
ValidationUtil
.
isEmpty
(
installNoticeMsg
.
getIsRead
())){
if
(
installNoticeMsg
.
getIsRead
()){
msgNoticeDto
.
setStatus
(
"已读"
);
installNoticeMsg
.
setIsRead
(
true
);
}
else
{
msgNoticeDto
.
setStatus
(
"未读"
);
installNoticeMsg
.
setIsRead
(
false
);
}
}
msgNoticeDto
.
setCreateDate
(
installNoticeMsg
.
getSendTime
());
...
...
@@ -127,4 +131,58 @@ public class RectifyMsgServiceImpl extends BaseService<RectifyMsgDto,RectifyMsg,
return
msgNoticeDtoList
;
}
@BusinessIdentify
public
List
<
MsgNoticeDto
>
allRead
(){
LambdaQueryWrapper
<
InstallNoticeMsg
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
InstallNoticeMsg:
:
getTargetPersonId
,
orgService
.
getReginParams
().
getBusinessInfo
().
getUserSequenceNbr
())
.
orderByDesc
(
InstallNoticeMsg:
:
getSendTime
);
LambdaQueryWrapper
<
RectifyMsg
>
wrapper1
=
new
LambdaQueryWrapper
<>();
wrapper1
.
eq
(
RectifyMsg:
:
getMsgReceiver
,
orgService
.
getReginParams
().
getBusinessInfo
().
getUserSequenceNbr
())
.
orderByDesc
(
RectifyMsg:
:
getSendTime
);
List
<
RectifyMsg
>
rectifyMsgList
=
rectifyMsgMapper
.
selectList
(
wrapper1
);
List
<
InstallNoticeMsg
>
installNoticeMsgList
=
installNoticeMsgMapper
.
selectList
(
wrapper
);
List
<
MsgNoticeDto
>
msgNoticeDtoList
=
new
ArrayList
<>();
if
(!
ValidationUtil
.
isEmpty
(
installNoticeMsgList
))
{
for
(
InstallNoticeMsg
installNoticeMsg
:
installNoticeMsgList
)
{
MsgNoticeDto
msgNoticeDto
=
new
MsgNoticeDto
();
String
contents
=
installNoticeMsg
.
getContent
();
msgNoticeDto
.
setCreateDate
(
installNoticeMsg
.
getSendTime
());
msgNoticeDto
.
setSequenceNbr
(
installNoticeMsg
.
getSequenceNbr
());
if
(!
ValidationUtil
.
isEmpty
(
contents
))
{
String
form
=
contents
.
substring
(
contents
.
indexOf
(
'【'
)
+
1
,
contents
.
indexOf
(
"】"
));
String
context
=
contents
.
substring
(
contents
.
indexOf
(
"】"
)
+
1
);
msgNoticeDto
.
setType
(
form
);
msgNoticeDto
.
setContent
(
context
);
}
if
(!
ValidationUtil
.
isEmpty
(
installNoticeMsg
.
getIsRead
())){
msgNoticeDto
.
setStatus
(
"已读"
);
installNoticeMsg
.
setIsRead
(
true
);
installNoticeMsgMapper
.
updateById
(
installNoticeMsg
);
}
msgNoticeDtoList
.
add
(
msgNoticeDto
);
}
}
if
(!
ValidationUtil
.
isEmpty
(
rectifyMsgList
))
{
for
(
RectifyMsg
rectifyMsg
:
rectifyMsgList
)
{
MsgNoticeDto
msgNoticeDto
=
new
MsgNoticeDto
();
String
contents
=
rectifyMsg
.
getContent
();
msgNoticeDto
.
setCreateDate
(
rectifyMsg
.
getSendTime
());
msgNoticeDto
.
setSequenceNbr
(
rectifyMsg
.
getSequenceNbr
());
if
(!
ValidationUtil
.
isEmpty
(
contents
))
{
msgNoticeDto
.
setType
(
contents
.
substring
(
contents
.
indexOf
(
'【'
)
+
1
,
contents
.
indexOf
(
"】"
)));
msgNoticeDto
.
setContent
(
contents
.
substring
(
contents
.
indexOf
(
"】"
)
+
1
));
}
if
(!
ValidationUtil
.
isEmpty
(
rectifyMsg
.
getIsRead
())){
msgNoticeDto
.
setStatus
(
"已读"
);
rectifyMsg
.
setIsRead
(
true
);
rectifyMsgMapper
.
updateById
(
rectifyMsg
);
}
msgNoticeDtoList
.
add
(
msgNoticeDto
);
}
}
return
msgNoticeDtoList
;
}
}
\ 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