Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-data-cloud
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-data-cloud
Commits
f5532af2
Commit
f5532af2
authored
Sep 01, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' into 'master'
Developer See merge request
!38
parents
d16a8715
6b6c5576
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
94 additions
and
10 deletions
+94
-10
IndexDescDTO.java
...oud-api/src/main/java/com/gic/cloud/dto/IndexDescDTO.java
+10
-0
TabUpdateTipsMapper.java
...in/java/com/gic/cloud/dao/mapper/TabUpdateTipsMapper.java
+5
-0
UpdateTipService.java
...src/main/java/com/gic/cloud/service/UpdateTipService.java
+7
-0
IndexDescServiceImpl.java
...java/com/gic/cloud/service/impl/IndexDescServiceImpl.java
+31
-2
UpdateTipServiceImpl.java
...java/com/gic/cloud/service/impl/UpdateTipServiceImpl.java
+16
-0
UserApiServiceImpl.java
.../com/gic/cloud/service/outer/impl/UserApiServiceImpl.java
+6
-1
TabIndexDescMapper.xml
...-service/src/main/resources/mapper/TabIndexDescMapper.xml
+7
-7
TabUpdateTipsMapper.xml
...service/src/main/resources/mapper/TabUpdateTipsMapper.xml
+12
-0
No files found.
gic-data-cloud-api/src/main/java/com/gic/cloud/dto/IndexDescDTO.java
View file @
f5532af2
...
...
@@ -66,6 +66,8 @@ public class IndexDescDTO implements Serializable {
private
Integer
updateTipsId
;
private
Integer
indexId
;
private
String
remark
;
private
int
seq
;
...
...
@@ -199,4 +201,12 @@ public class IndexDescDTO implements Serializable {
public
void
setRemark
(
String
remark
)
{
this
.
remark
=
remark
;
}
public
Integer
getIndexId
()
{
return
indexId
;
}
public
void
setIndexId
(
Integer
indexId
)
{
this
.
indexId
=
indexId
;
}
}
gic-data-cloud-service/src/main/java/com/gic/cloud/dao/mapper/TabUpdateTipsMapper.java
View file @
f5532af2
...
...
@@ -3,6 +3,8 @@ package com.gic.cloud.dao.mapper;
import
com.gic.cloud.entity.TabUpdateTips
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
public
interface
TabUpdateTipsMapper
{
/**
* 根据主键删除
...
...
@@ -53,4 +55,6 @@ public interface TabUpdateTipsMapper {
int
updateByPrimaryKey
(
TabUpdateTips
record
);
void
updateStatus
(
@Param
(
"businessId"
)
Integer
businessId
,
@Param
(
"type"
)
Integer
type
,
@Param
(
"userId"
)
Integer
userId
,
@Param
(
"showStatus"
)
Integer
showStatus
);
List
<
TabUpdateTips
>
listByIndexIdAndUser
(
@Param
(
"ids"
)
List
<
Integer
>
businessIdList
,
@Param
(
"type"
)
int
type
,
@Param
(
"userId"
)
Integer
userId
);
}
\ No newline at end of file
gic-data-cloud-service/src/main/java/com/gic/cloud/service/UpdateTipService.java
View file @
f5532af2
package
com
.
gic
.
cloud
.
service
;
import
com.gic.cloud.entity.TabUpdateTips
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author zhiwj
* @Description:
...
...
@@ -18,4 +23,6 @@ public interface UpdateTipService {
void
erase
(
Integer
userId
,
Integer
businessId
,
Integer
type
);
Map
<
Integer
,
TabUpdateTips
>
mapByIndexIdAndUser
(
List
<
Integer
>
indexIdList
,
int
type
,
Integer
userId
);
}
gic-data-cloud-service/src/main/java/com/gic/cloud/service/impl/IndexDescServiceImpl.java
View file @
f5532af2
...
...
@@ -4,13 +4,18 @@ import com.gic.cloud.dao.mapper.TabIndexDescMapper;
import
com.gic.cloud.dto.IndexDescDTO
;
import
com.gic.cloud.entity.TabIndexDesc
;
import
com.gic.cloud.entity.TabIndexDescEnterprise
;
import
com.gic.cloud.entity.TabUpdateTips
;
import
com.gic.cloud.service.IndexDescEnterpriseService
;
import
com.gic.cloud.service.IndexDescService
;
import
com.gic.cloud.service.UpdateTipService
;
import
com.github.pagehelper.PageHelper
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* @author zhiwj
...
...
@@ -24,6 +29,8 @@ public class IndexDescServiceImpl implements IndexDescService {
private
TabIndexDescMapper
tabIndexDescMapper
;
@Autowired
private
IndexDescEnterpriseService
indexDescEnterpriseService
;
@Autowired
private
UpdateTipService
updateTipService
;
@Override
public
List
<
IndexDescDTO
>
listByEnterpriseAndModule
(
Integer
enterpriseId
,
String
moduleId
,
String
indexGroupName
)
{
...
...
@@ -32,12 +39,34 @@ public class IndexDescServiceImpl implements IndexDescService {
@Override
public
List
<
IndexDescDTO
>
listByEnterpriseAndModuleDetail
(
Integer
enterpriseId
,
String
moduleId
,
String
indexGroupName
,
Integer
userId
)
{
return
tabIndexDescMapper
.
listByEnterpriseAndModuleDetail
(
enterpriseId
,
moduleId
,
indexGroupName
,
userId
,
1
);
List
<
IndexDescDTO
>
indexDescDTOList
=
tabIndexDescMapper
.
listByEnterpriseAndModuleDetail
(
enterpriseId
,
moduleId
,
indexGroupName
,
userId
,
1
);
return
parse
(
indexDescDTOList
,
userId
);
}
@Override
public
List
<
IndexDescDTO
>
listRecycle
(
Integer
enterpriseId
,
String
moduleId
,
String
indexGroupName
,
Integer
userId
)
{
return
tabIndexDescMapper
.
listByEnterpriseAndModuleDetail
(
enterpriseId
,
moduleId
,
indexGroupName
,
userId
,
0
);
List
<
IndexDescDTO
>
indexDescDTOList
=
tabIndexDescMapper
.
listByEnterpriseAndModuleDetail
(
enterpriseId
,
moduleId
,
indexGroupName
,
userId
,
0
);
return
parse
(
indexDescDTOList
,
userId
);
}
private
List
<
IndexDescDTO
>
parse
(
List
<
IndexDescDTO
>
indexDescDTOList
,
Integer
userId
)
{
if
(
CollectionUtils
.
isNotEmpty
(
indexDescDTOList
))
{
List
<
Integer
>
indexIdList
=
indexDescDTOList
.
stream
().
map
(
IndexDescDTO:
:
getIndexId
).
collect
(
Collectors
.
toList
());
Map
<
Integer
,
TabUpdateTips
>
updateTipsMap
=
updateTipService
.
mapByIndexIdAndUser
(
indexIdList
,
1
,
userId
);
for
(
IndexDescDTO
indexDescDTO
:
indexDescDTOList
)
{
// -- ,ifnull(t4.show_status, 2) updateTips
// -- ,t4.update_tips_id updateTipsId
TabUpdateTips
updateTips
=
updateTipsMap
.
get
(
indexDescDTO
.
getIndexId
());
if
(
updateTips
!=
null
)
{
indexDescDTO
.
setUpdateTips
(
updateTips
.
getShowStatus
());
indexDescDTO
.
setUpdateTipsId
(
updateTips
.
getUpdateTipsId
());
}
else
{
indexDescDTO
.
setUpdateTips
(
2
);
indexDescDTO
.
setUpdateTipsId
(
null
);
}
}
}
return
indexDescDTOList
;
}
@Override
...
...
gic-data-cloud-service/src/main/java/com/gic/cloud/service/impl/UpdateTipServiceImpl.java
View file @
f5532af2
...
...
@@ -13,10 +13,14 @@ import com.gic.cloud.service.DataExplainService;
import
com.gic.cloud.service.IndexService
;
import
com.gic.cloud.service.UpdateTipService
;
import
com.gic.cloud.service.UserService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* @author zhiwj
...
...
@@ -80,4 +84,16 @@ public class UpdateTipServiceImpl implements UpdateTipService {
tabUpdateTipsMapper
.
updateStatus
(
businessId
,
type
,
userId
,
0
);
}
@Override
public
Map
<
Integer
,
TabUpdateTips
>
mapByIndexIdAndUser
(
List
<
Integer
>
indexIdList
,
int
type
,
Integer
userId
)
{
if
(
CollectionUtils
.
isNotEmpty
(
indexIdList
))
{
List
<
TabUpdateTips
>
updateTipsList
=
tabUpdateTipsMapper
.
listByIndexIdAndUser
(
indexIdList
,
type
,
userId
);
if
(
CollectionUtils
.
isNotEmpty
(
updateTipsList
))
{
return
updateTipsList
.
stream
().
collect
(
Collectors
.
toMap
(
TabUpdateTips:
:
getBusinessId
,
e
->
e
,
(
a
,
b
)
->
a
));
}
}
return
Collections
.
emptyMap
();
}
}
gic-data-cloud-service/src/main/java/com/gic/cloud/service/outer/impl/UserApiServiceImpl.java
View file @
f5532af2
...
...
@@ -7,6 +7,7 @@ import com.gic.cloud.entity.TabSysAccountGroup;
import
com.gic.cloud.entity.TabSysUser
;
import
com.gic.cloud.qo.UserQO
;
import
com.gic.cloud.service.AccountGroupService
;
import
com.gic.cloud.service.UpdateTipService
;
import
com.gic.cloud.service.UserApiService
;
import
com.gic.cloud.service.UserService
;
import
com.gic.commons.util.EntityUtil
;
...
...
@@ -30,6 +31,8 @@ public class UserApiServiceImpl implements UserApiService{
private
UserService
userService
;
@Autowired
private
AccountGroupService
accountGroupService
;
@Autowired
private
UpdateTipService
updateTipService
;
@Override
public
ServiceResponse
<
Integer
>
saveUser
(
UserDTO
dto
)
{
...
...
@@ -38,7 +41,9 @@ public class UserApiServiceImpl implements UserApiService{
if
(!
validParamResult
.
isSuccess
())
{
return
ServiceResponse
.
failure
(
validParamResult
.
getCode
(),
validParamResult
.
getMessage
());
}
return
ServiceResponse
.
success
(
userService
.
saveUser
(
dto
));
Integer
userId
=
userService
.
saveUser
(
dto
);
updateTipService
.
insertBySaveUser
(
userId
);
return
ServiceResponse
.
success
(
userId
);
}
@Override
...
...
gic-data-cloud-service/src/main/resources/mapper/TabIndexDescMapper.xml
View file @
f5532af2
...
...
@@ -163,13 +163,14 @@
</include>
,t2.index_desc_enterprise_id indexDescEnterpriseId
,t2.sort
,ifnull(t4.show_status, 2) updateTips
,t4.update_tips_id updateTipsId
,t3.index_id indexId
-- ,ifnull(t4.show_status, 2) updateTips
-- ,t4.update_tips_id updateTipsId
from tab_index_desc t1
left join tab_index_desc_enterprise t2 on t1.index_desc_id = t2.index_desc_id
left join tab_index_module_rel t5 on t1.index_desc_id = t5.module_id
left join tab_index t3 on t5.business_id = t3.index_id
left join tab_update_tips t4 on t3.index_id = t4.business_id
--
left join tab_update_tips t4 on t3.index_id = t4.business_id
where t1.status = 1
and t2.enterprise_id = #{enterpriseId}
and t1.module_id = #{moduleId}
...
...
@@ -179,12 +180,11 @@
and t2.index_status = #{indexStatus}
and (t3.status = 1 or t3.status is null)
and (t3.classify_type = 1 or t3.classify_type is null)
AND (t4.business_id = 1 or t4.business_id is null)
AND (t4.type = 1 or t4.type is null)
-- AND (t4.type = 1 or t4.type is null)
and (t5.type = 1 or t5.type = 1 is null)
<if
test=
"userId != null "
>
<
!--<
if test="userId != null ">
AND (t4.user_id = #{userId} or t4.user_id is null )
</if>
</if>
-->
order by t2.sort
</select>
<!-- <select id="listRecycle" resultMap="DTOResultMap">
...
...
gic-data-cloud-service/src/main/resources/mapper/TabUpdateTipsMapper.xml
View file @
f5532af2
...
...
@@ -104,4 +104,15 @@
</if>
</where>
</update>
<select
id=
"listByIndexIdAndUser"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_update_tips
where type = #{type}
and user_id = #{userId}
and business_id in
<foreach
collection=
"ids"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</select>
</mapper>
\ 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