Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-enterprise
Overview
Overview
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
base_platform_enterprise
gic-platform-enterprise
Commits
1efe52a6
Commit
1efe52a6
authored
Jul 31, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
8b8ccb2d
93d94d66
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
12 deletions
+33
-12
AuditLogApiServiceImpl.java
...enterprise/service/outer/impl/AuditLogApiServiceImpl.java
+21
-6
TabAuditLogMapper.xml
...e-service/src/main/resources/mapper/TabAuditLogMapper.xml
+0
-1
TabDownloadLogMapper.xml
...ervice/src/main/resources/mapper/TabDownloadLogMapper.xml
+3
-0
IndexModuleController.java
.../gic/enterprise/web/controller/IndexModuleController.java
+9
-5
No files found.
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/AuditLogApiServiceImpl.java
View file @
1efe52a6
...
...
@@ -36,6 +36,7 @@ import org.springframework.transaction.annotation.Transactional;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -249,7 +250,7 @@ public class AuditLogApiServiceImpl implements AuditLogApiService {
// }
// 修改审批状态
auditLogService
.
updateAudit
(
auditLogDTO
);
if
(
StringUtils
.
isNotBlank
(
projectItem
.
getCallbackUrl
()))
{
if
(
!
AuditTypeEnum
.
HAOBAN
.
getCode
().
equals
(
auditLogDTO
.
getAuditType
())
&&
StringUtils
.
isNotBlank
(
projectItem
.
getCallbackUrl
()))
{
// 回调
String
extraInfo
=
auditLog
.
getExtraInfo
();
JSONObject
jsonObject
=
JSON
.
parseObject
(
extraInfo
);
...
...
@@ -357,19 +358,33 @@ public class AuditLogApiServiceImpl implements AuditLogApiService {
private
void
sendWxMessage
(
AuditorDTO
auditorDTO
,
AuditLogDTO
auditLogDTO
)
{
TabEnterprise
enterprise
=
enterpriseService
.
getEnterpriseById
(
auditLogDTO
.
getEnterpriseId
());
UserDTO
userDTO
=
userApiService
.
getUserById
(
auditLogDTO
.
getApplyUserId
()).
getResult
();
LoginUserTypeEnum
userTypeEnum
=
LoginUserTypeEnum
.
getByCode
(
userDTO
.
getLoginType
());
String
position
=
userTypeEnum
!=
null
?
userTypeEnum
.
getMessage
()
:
""
;
String
position
;
if
(
AuditTypeEnum
.
HAOBAN
.
getCode
().
equals
(
auditLogDTO
.
getAuditType
()))
{
position
=
StringUtils
.
isBlank
(
auditLogDTO
.
getPosition
())
?
""
:
auditLogDTO
.
getPosition
();
}
else
{
UserDTO
userDTO
=
userApiService
.
getUserById
(
auditLogDTO
.
getApplyUserId
()).
getResult
();
LoginUserTypeEnum
userTypeEnum
=
LoginUserTypeEnum
.
getByCode
(
userDTO
.
getLoginType
());
position
=
userTypeEnum
!=
null
?
userTypeEnum
.
getMessage
()
:
""
;
}
String
[]
keyWord
=
{
enterprise
.
getEnterpriseName
(),
auditLogDTO
.
getApplyUserName
(),
position
,
auditLogDTO
.
getProjectItemName
()};
// todo 跳转地址
String
url
;
if
(
AuditTypeEnum
.
HAOBAN
.
getCode
().
equals
(
auditLogDTO
.
getAuditType
()))
{
url
=
String
.
format
(
"%s%s?auditLogId=%d&openid=%s"
,
config
.
getHost
(),
auditLogDTO
.
getAuditUrl
(),
auditLogDTO
.
getAuditLogId
(),
auditorDTO
.
getOpenid
());
if
(
StringUtils
.
isNotBlank
(
auditLogDTO
.
getExtraInfo
()))
{
JSONObject
jsonObject
=
JSON
.
parseObject
(
auditLogDTO
.
getExtraInfo
());
StringBuilder
sb
=
new
StringBuilder
();
for
(
Map
.
Entry
<
String
,
Object
>
entry
:
jsonObject
.
entrySet
())
{
sb
.
append
(
"&"
).
append
(
entry
.
getKey
()).
append
(
"="
).
append
(
entry
.
getValue
());
}
url
+=
sb
.
toString
();
}
}
else
{
url
=
String
.
format
(
"%s/damo-system/wechat-approve.html?auditLogId=%d&openid=%s"
,
config
.
getHost
(),
auditLogDTO
.
getAuditLogId
(),
auditorDTO
.
getOpenid
());
}
logger
.
info
(
"微信跳转 url:{}"
,
url
);
this
.
wxTemplateRouterApiService
.
sendForDownloadData
(
auditorDTO
.
getOpenid
(),
url
,
keyWord
);
ServiceResponse
<
String
>
serviceResponse
=
this
.
wxTemplateRouterApiService
.
sendForDownloadData
(
auditorDTO
.
getOpenid
(),
url
,
keyWord
);
logger
.
info
(
"微信跳转结果:{},{}"
,
serviceResponse
.
isSuccess
(),
serviceResponse
.
getMessage
());
}
}
gic-platform-enterprise-service/src/main/resources/mapper/TabAuditLogMapper.xml
View file @
1efe52a6
...
...
@@ -265,7 +265,6 @@
from tab_audit_log
where status = 1
and audit_result = 0
-- and audit_expire_time
<
#{auditExpireTime}
<if
test=
"enterpriseId != null "
>
and enterprise_id = #{enterpriseId}
</if>
...
...
gic-platform-enterprise-service/src/main/resources/mapper/TabDownloadLogMapper.xml
View file @
1efe52a6
...
...
@@ -215,6 +215,9 @@
<include
refid=
"Base_Column_List"
/>
from tab_download_log
where status = 1
<if
test=
"enterpriseId != null "
>
and enterprise_id = #{enterpriseId}
</if>
<if
test=
"startTime != null and startTime != '' "
>
and create_time
>
#{startTime}
</if>
...
...
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/IndexModuleController.java
View file @
1efe52a6
...
...
@@ -416,12 +416,16 @@ public class IndexModuleController {
Integer
enterpriseId
=
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
();
List
<
Integer
>
authStoreIdList
=
new
ArrayList
<>();
if
(
UserDetailUtils
.
getUserDetail
().
getUserInfo
().
getSuperAdmin
()
!=
1
){
ServiceResponse
<
List
<
Integer
>>
authResponse
=
this
.
storeWidgetApiService
.
listStoreIdByStoreWidgetId
(
enterpriseId
,
UserDetailUtils
.
getUserDetail
().
getUserResourceInfo
().
getStoreResource
().
intValue
());
if
(
authResponse
.
isSuccess
()){
authStoreIdList
=
authResponse
.
getResult
();
}
if
(
CollectionUtils
.
isEmpty
(
authStoreIdList
)){
if
(
UserDetailUtils
.
getUserDetail
().
getUserResourceInfo
().
getStoreResource
()
==
null
)
{
authStoreIdList
.
add
(-
1
);
}
else
{
ServiceResponse
<
List
<
Integer
>>
authResponse
=
this
.
storeWidgetApiService
.
listStoreIdByStoreWidgetId
(
enterpriseId
,
UserDetailUtils
.
getUserDetail
().
getUserResourceInfo
().
getStoreResource
().
intValue
());
if
(
authResponse
.
isSuccess
()){
authStoreIdList
=
authResponse
.
getResult
();
}
if
(
CollectionUtils
.
isEmpty
(
authStoreIdList
)){
authStoreIdList
.
add
(-
1
);
}
}
}
return
authStoreIdList
;
...
...
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