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
e1eafb2b
Commit
e1eafb2b
authored
Jul 09, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据字典
parent
5393ae65
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
187 additions
and
28 deletions
+187
-28
LogAndUpdateTipsTypeEnum.java
...ava/com/gic/cloud/constants/LogAndUpdateTipsTypeEnum.java
+2
-2
UpdateTypeEnum.java
...src/main/java/com/gic/cloud/constants/UpdateTypeEnum.java
+25
-0
TabUpdateTipsMapper.java
...in/java/com/gic/cloud/dao/mapper/TabUpdateTipsMapper.java
+4
-0
TabUpdateTips.java
...ice/src/main/java/com/gic/cloud/entity/TabUpdateTips.java
+5
-5
DataExplainService.java
...c/main/java/com/gic/cloud/service/DataExplainService.java
+4
-0
IndexService.java
...ice/src/main/java/com/gic/cloud/service/IndexService.java
+4
-0
UpdateTipService.java
...src/main/java/com/gic/cloud/service/UpdateTipService.java
+12
-0
DataExplainServiceImpl.java
...va/com/gic/cloud/service/impl/DataExplainServiceImpl.java
+6
-0
IndexLogServiceImpl.java
.../java/com/gic/cloud/service/impl/IndexLogServiceImpl.java
+3
-3
IndexServiceImpl.java
...ain/java/com/gic/cloud/service/impl/IndexServiceImpl.java
+7
-0
UpdateTipServiceImpl.java
...java/com/gic/cloud/service/impl/UpdateTipServiceImpl.java
+66
-0
DataExplainApiServiceImpl.java
...c/cloud/service/outer/impl/DataExplainApiServiceImpl.java
+12
-1
IndexApiServiceImpl.java
...com/gic/cloud/service/outer/impl/IndexApiServiceImpl.java
+11
-6
TabUpdateTipsMapper.xml
...service/src/main/resources/mapper/TabUpdateTipsMapper.xml
+26
-11
No files found.
gic-data-cloud-api/src/main/java/com/gic/cloud/constants/LogTypeEnum.java
→
gic-data-cloud-api/src/main/java/com/gic/cloud/constants/Log
AndUpdateTips
TypeEnum.java
View file @
e1eafb2b
...
@@ -5,7 +5,7 @@ package com.gic.cloud.constants;
...
@@ -5,7 +5,7 @@ package com.gic.cloud.constants;
* @Description:
* @Description:
* @date 2020-07-08 16:22
* @date 2020-07-08 16:22
*/
*/
public
enum
LogTypeEnum
{
public
enum
Log
AndUpdateTips
TypeEnum
{
// 指标字典
// 指标字典
INDEX
(
1
),
INDEX
(
1
),
// 数据解读
// 数据解读
...
@@ -13,7 +13,7 @@ public enum LogTypeEnum {
...
@@ -13,7 +13,7 @@ public enum LogTypeEnum {
;
;
private
Integer
code
;
private
Integer
code
;
LogTypeEnum
(
Integer
code
)
{
Log
AndUpdateTips
TypeEnum
(
Integer
code
)
{
this
.
code
=
code
;
this
.
code
=
code
;
}
}
...
...
gic-data-cloud-api/src/main/java/com/gic/cloud/constants/UpdateTypeEnum.java
0 → 100644
View file @
e1eafb2b
package
com
.
gic
.
cloud
.
constants
;
/**
* @author zhiwj
* @Description:
* @date 2020-07-09 14:06
*/
public
enum
UpdateTypeEnum
{
// 指标字典
ONLY_DETAIL
(
1
),
// 数据解读
UPDATE_PUBLISH
(
2
),
;
private
Integer
code
;
UpdateTypeEnum
(
Integer
code
)
{
this
.
code
=
code
;
}
public
Integer
getCode
()
{
return
code
;
}
}
gic-data-cloud-service/src/main/java/com/gic/cloud/dao/mapper/TabUpdateTipsMapper.java
View file @
e1eafb2b
package
com
.
gic
.
cloud
.
dao
.
mapper
;
package
com
.
gic
.
cloud
.
dao
.
mapper
;
import
com.gic.cloud.entity.TabUpdateTips
;
import
com.gic.cloud.entity.TabUpdateTips
;
import
org.apache.ibatis.annotations.Param
;
public
interface
TabUpdateTipsMapper
{
public
interface
TabUpdateTipsMapper
{
/**
/**
...
@@ -50,4 +51,6 @@ public interface TabUpdateTipsMapper {
...
@@ -50,4 +51,6 @@ public interface TabUpdateTipsMapper {
* @return 更新条目数
* @return 更新条目数
*/
*/
int
updateByPrimaryKey
(
TabUpdateTips
record
);
int
updateByPrimaryKey
(
TabUpdateTips
record
);
void
updateStatus
(
@Param
(
"businessId"
)
Integer
businessId
,
@Param
(
"type"
)
Integer
type
,
@Param
(
"userId"
)
Integer
userId
,
@Param
(
"showStatus"
)
Integer
showStatus
);
}
}
\ No newline at end of file
gic-data-cloud-service/src/main/java/com/gic/cloud/entity/TabUpdateTips.java
View file @
e1eafb2b
...
@@ -17,7 +17,7 @@ public class TabUpdateTips {
...
@@ -17,7 +17,7 @@ public class TabUpdateTips {
/**
/**
*
*
*/
*/
private
Integer
index
Id
;
private
Integer
business
Id
;
/**
/**
* 展示状态 1展示红的 0展示灰色已读
* 展示状态 1展示红的 0展示灰色已读
...
@@ -45,12 +45,12 @@ public class TabUpdateTips {
...
@@ -45,12 +45,12 @@ public class TabUpdateTips {
this
.
userId
=
userId
;
this
.
userId
=
userId
;
}
}
public
Integer
get
Index
Id
()
{
public
Integer
get
Business
Id
()
{
return
index
Id
;
return
business
Id
;
}
}
public
void
set
IndexId
(
Integer
index
Id
)
{
public
void
set
BusinessId
(
Integer
business
Id
)
{
this
.
indexId
=
index
Id
;
this
.
businessId
=
business
Id
;
}
}
public
Integer
getShowStatus
()
{
public
Integer
getShowStatus
()
{
...
...
gic-data-cloud-service/src/main/java/com/gic/cloud/service/DataExplainService.java
View file @
e1eafb2b
...
@@ -5,6 +5,8 @@ import com.gic.cloud.entity.TabDataExplain;
...
@@ -5,6 +5,8 @@ import com.gic.cloud.entity.TabDataExplain;
import
com.gic.cloud.qo.DataExplainQO
;
import
com.gic.cloud.qo.DataExplainQO
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.Page
;
import
java.util.List
;
/**
/**
* @author zhiwj
* @author zhiwj
* @Description:
* @Description:
...
@@ -21,4 +23,6 @@ public interface DataExplainService {
...
@@ -21,4 +23,6 @@ public interface DataExplainService {
TabDataExplain
getByDataExplainId
(
Integer
dataExplainId
);
TabDataExplain
getByDataExplainId
(
Integer
dataExplainId
);
Page
<
TabDataExplain
>
listDataExplain
(
DataExplainQO
dataExplainQO
);
Page
<
TabDataExplain
>
listDataExplain
(
DataExplainQO
dataExplainQO
);
List
<
TabDataExplain
>
listAllDataExplain
();
}
}
gic-data-cloud-service/src/main/java/com/gic/cloud/service/IndexService.java
View file @
e1eafb2b
...
@@ -5,6 +5,8 @@ import com.gic.cloud.entity.TabIndex;
...
@@ -5,6 +5,8 @@ import com.gic.cloud.entity.TabIndex;
import
com.gic.cloud.qo.IndexQO
;
import
com.gic.cloud.qo.IndexQO
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.Page
;
import
java.util.List
;
/**
/**
* @author zhiwj
* @author zhiwj
* @Description:
* @Description:
...
@@ -23,4 +25,6 @@ public interface IndexService {
...
@@ -23,4 +25,6 @@ public interface IndexService {
TabIndex
getByIndexId
(
Integer
indexId
);
TabIndex
getByIndexId
(
Integer
indexId
);
Page
<
TabIndex
>
listIndex
(
IndexQO
indexQO
);
Page
<
TabIndex
>
listIndex
(
IndexQO
indexQO
);
List
<
TabIndex
>
listAllIndex
();
}
}
gic-data-cloud-service/src/main/java/com/gic/cloud/service/UpdateTipService.java
View file @
e1eafb2b
...
@@ -6,4 +6,16 @@ package com.gic.cloud.service;
...
@@ -6,4 +6,16 @@ package com.gic.cloud.service;
* @date 2020-07-08 14:28
* @date 2020-07-08 14:28
*/
*/
public
interface
UpdateTipService
{
public
interface
UpdateTipService
{
void
insertBySaveUser
(
Integer
userId
);
void
insertBySaveBusiness
(
Integer
businessId
,
Integer
type
);
/**
* 发布 要更新小红点
*/
void
publish
(
Integer
businessId
,
Integer
type
);
void
erase
(
Integer
userId
);
}
}
gic-data-cloud-service/src/main/java/com/gic/cloud/service/impl/DataExplainServiceImpl.java
View file @
e1eafb2b
...
@@ -12,6 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -12,6 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
/**
/**
* @author zhiwj
* @author zhiwj
...
@@ -57,4 +58,9 @@ public class DataExplainServiceImpl implements DataExplainService {
...
@@ -57,4 +58,9 @@ public class DataExplainServiceImpl implements DataExplainService {
PageHelper
.
startPage
(
dataExplainQO
.
getCurrentPage
(),
dataExplainQO
.
getPageSize
());
PageHelper
.
startPage
(
dataExplainQO
.
getCurrentPage
(),
dataExplainQO
.
getPageSize
());
return
tabDataExplainMapper
.
listDataExplain
(
dataExplainQO
);
return
tabDataExplainMapper
.
listDataExplain
(
dataExplainQO
);
}
}
@Override
public
List
<
TabDataExplain
>
listAllDataExplain
()
{
return
tabDataExplainMapper
.
listDataExplain
(
new
DataExplainQO
());
}
}
}
gic-data-cloud-service/src/main/java/com/gic/cloud/service/impl/IndexLogServiceImpl.java
View file @
e1eafb2b
package
com
.
gic
.
cloud
.
service
.
impl
;
package
com
.
gic
.
cloud
.
service
.
impl
;
import
com.gic.cloud.constants.LogTypeEnum
;
import
com.gic.cloud.constants.Log
AndUpdateTips
TypeEnum
;
import
com.gic.cloud.dao.mapper.TabIndexLogMapper
;
import
com.gic.cloud.dao.mapper.TabIndexLogMapper
;
import
com.gic.cloud.dto.DataExplainDTO
;
import
com.gic.cloud.dto.DataExplainDTO
;
import
com.gic.cloud.dto.IndexDTO
;
import
com.gic.cloud.dto.IndexDTO
;
...
@@ -42,7 +42,7 @@ public class IndexLogServiceImpl implements IndexLogService {
...
@@ -42,7 +42,7 @@ public class IndexLogServiceImpl implements IndexLogService {
indexLog
.
setStatus
(
1
);
indexLog
.
setStatus
(
1
);
indexLog
.
setCreateTime
(
new
Date
());
indexLog
.
setCreateTime
(
new
Date
());
indexLog
.
setUpdateTime
(
new
Date
());
indexLog
.
setUpdateTime
(
new
Date
());
indexLog
.
setType
(
LogTypeEnum
.
INDEX
.
getCode
());
indexLog
.
setType
(
Log
AndUpdateTips
TypeEnum
.
INDEX
.
getCode
());
tabIndexLogMapper
.
insert
(
indexLog
);
tabIndexLogMapper
.
insert
(
indexLog
);
}
}
...
@@ -66,7 +66,7 @@ public class IndexLogServiceImpl implements IndexLogService {
...
@@ -66,7 +66,7 @@ public class IndexLogServiceImpl implements IndexLogService {
indexLog
.
setStatus
(
1
);
indexLog
.
setStatus
(
1
);
indexLog
.
setCreateTime
(
new
Date
());
indexLog
.
setCreateTime
(
new
Date
());
indexLog
.
setUpdateTime
(
new
Date
());
indexLog
.
setUpdateTime
(
new
Date
());
indexLog
.
setType
(
LogTypeEnum
.
INDEX
.
getCode
());
indexLog
.
setType
(
Log
AndUpdateTips
TypeEnum
.
INDEX
.
getCode
());
tabIndexLogMapper
.
insert
(
indexLog
);
tabIndexLogMapper
.
insert
(
indexLog
);
}
}
}
}
gic-data-cloud-service/src/main/java/com/gic/cloud/service/impl/IndexServiceImpl.java
View file @
e1eafb2b
...
@@ -11,6 +11,8 @@ import com.github.pagehelper.PageHelper;
...
@@ -11,6 +11,8 @@ import com.github.pagehelper.PageHelper;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
/**
* @author zhiwj
* @author zhiwj
* @Description:
* @Description:
...
@@ -61,4 +63,9 @@ public class IndexServiceImpl implements IndexService {
...
@@ -61,4 +63,9 @@ public class IndexServiceImpl implements IndexService {
PageHelper
.
startPage
(
indexQO
.
getCurrentPage
(),
indexQO
.
getPageSize
());
PageHelper
.
startPage
(
indexQO
.
getCurrentPage
(),
indexQO
.
getPageSize
());
return
tabIndexMapper
.
listIndex
(
indexQO
);
return
tabIndexMapper
.
listIndex
(
indexQO
);
}
}
@Override
public
List
<
TabIndex
>
listAllIndex
()
{
return
tabIndexMapper
.
listIndex
(
new
IndexQO
());
}
}
}
gic-data-cloud-service/src/main/java/com/gic/cloud/service/impl/UpdateTipServiceImpl.java
View file @
e1eafb2b
package
com
.
gic
.
cloud
.
service
.
impl
;
package
com
.
gic
.
cloud
.
service
.
impl
;
import
com.gic.cloud.constants.LogAndUpdateTipsTypeEnum
;
import
com.gic.cloud.dao.mapper.TabUpdateTipsMapper
;
import
com.gic.cloud.entity.TabDataExplain
;
import
com.gic.cloud.entity.TabIndex
;
import
com.gic.cloud.entity.TabSysUser
;
import
com.gic.cloud.entity.TabUpdateTips
;
import
com.gic.cloud.qo.UserQO
;
import
com.gic.cloud.service.DataExplainService
;
import
com.gic.cloud.service.IndexService
;
import
com.gic.cloud.service.UpdateTipService
;
import
com.gic.cloud.service.UpdateTipService
;
import
com.gic.cloud.service.UserService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
/**
* @author zhiwj
* @author zhiwj
* @Description:
* @Description:
...
@@ -11,4 +24,57 @@ import org.springframework.stereotype.Service;
...
@@ -11,4 +24,57 @@ import org.springframework.stereotype.Service;
@Service
@Service
public
class
UpdateTipServiceImpl
implements
UpdateTipService
{
public
class
UpdateTipServiceImpl
implements
UpdateTipService
{
@Autowired
private
TabUpdateTipsMapper
tabUpdateTipsMapper
;
@Autowired
private
UserService
userService
;
@Autowired
private
IndexService
indexService
;
@Autowired
private
DataExplainService
dataExplainService
;
@Override
public
void
insertBySaveUser
(
Integer
userId
)
{
List
<
TabIndex
>
indexList
=
indexService
.
listAllIndex
();
for
(
TabIndex
index
:
indexList
)
{
TabUpdateTips
tabUpdateTips
=
new
TabUpdateTips
();
tabUpdateTips
.
setUserId
(
userId
);
tabUpdateTips
.
setBusinessId
(
index
.
getIndexId
());
tabUpdateTips
.
setShowStatus
(
1
);
tabUpdateTips
.
setType
(
LogAndUpdateTipsTypeEnum
.
INDEX
.
getCode
());
tabUpdateTipsMapper
.
insertSelective
(
tabUpdateTips
);
}
List
<
TabDataExplain
>
dataExplainList
=
dataExplainService
.
listAllDataExplain
();
for
(
TabDataExplain
dataExplain
:
dataExplainList
)
{
TabUpdateTips
tabUpdateTips
=
new
TabUpdateTips
();
tabUpdateTips
.
setUserId
(
userId
);
tabUpdateTips
.
setBusinessId
(
dataExplain
.
getDataExplainId
());
tabUpdateTips
.
setShowStatus
(
1
);
tabUpdateTips
.
setType
(
LogAndUpdateTipsTypeEnum
.
DATA_EXPLAIN
.
getCode
());
tabUpdateTipsMapper
.
insertSelective
(
tabUpdateTips
);
}
}
@Override
public
void
insertBySaveBusiness
(
Integer
businessId
,
Integer
type
)
{
List
<
TabSysUser
>
users
=
userService
.
listUser
(
new
UserQO
());
for
(
TabSysUser
user
:
users
)
{
TabUpdateTips
tabUpdateTips
=
new
TabUpdateTips
();
tabUpdateTips
.
setUserId
(
user
.
getUserId
());
tabUpdateTips
.
setBusinessId
(
businessId
);
tabUpdateTips
.
setShowStatus
(
1
);
tabUpdateTips
.
setType
(
type
);
tabUpdateTipsMapper
.
insertSelective
(
tabUpdateTips
);
}
}
@Override
public
void
publish
(
Integer
businessId
,
Integer
type
)
{
tabUpdateTipsMapper
.
updateStatus
(
businessId
,
type
,
null
,
1
);
}
@Override
public
void
erase
(
Integer
userId
)
{
tabUpdateTipsMapper
.
updateStatus
(
null
,
null
,
userId
,
0
);
}
}
}
gic-data-cloud-service/src/main/java/com/gic/cloud/service/outer/impl/DataExplainApiServiceImpl.java
View file @
e1eafb2b
...
@@ -2,12 +2,15 @@ package com.gic.cloud.service.outer.impl;
...
@@ -2,12 +2,15 @@ package com.gic.cloud.service.outer.impl;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.cloud.constants.LogAndUpdateTipsTypeEnum
;
import
com.gic.cloud.constants.UpdateTypeEnum
;
import
com.gic.cloud.dto.DataExplainDTO
;
import
com.gic.cloud.dto.DataExplainDTO
;
import
com.gic.cloud.entity.TabDataExplain
;
import
com.gic.cloud.entity.TabDataExplain
;
import
com.gic.cloud.qo.DataExplainQO
;
import
com.gic.cloud.qo.DataExplainQO
;
import
com.gic.cloud.service.DataExplainApiService
;
import
com.gic.cloud.service.DataExplainApiService
;
import
com.gic.cloud.service.DataExplainService
;
import
com.gic.cloud.service.DataExplainService
;
import
com.gic.cloud.service.IndexLogService
;
import
com.gic.cloud.service.IndexLogService
;
import
com.gic.cloud.service.UpdateTipService
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.PageHelperUtils
;
import
com.gic.commons.util.PageHelperUtils
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.error.ErrorCode
;
...
@@ -27,6 +30,8 @@ public class DataExplainApiServiceImpl implements DataExplainApiService {
...
@@ -27,6 +30,8 @@ public class DataExplainApiServiceImpl implements DataExplainApiService {
private
DataExplainService
dataExplainService
;
private
DataExplainService
dataExplainService
;
@Autowired
@Autowired
private
IndexLogService
indexLogService
;
private
IndexLogService
indexLogService
;
@Autowired
private
UpdateTipService
updateTipService
;
@Override
@Override
public
ServiceResponse
<
Void
>
saveDataExplain
(
DataExplainDTO
dataExplainDTO
)
{
public
ServiceResponse
<
Void
>
saveDataExplain
(
DataExplainDTO
dataExplainDTO
)
{
...
@@ -39,6 +44,9 @@ public class DataExplainApiServiceImpl implements DataExplainApiService {
...
@@ -39,6 +44,9 @@ public class DataExplainApiServiceImpl implements DataExplainApiService {
dataExplainDTO
.
setDataExplainId
(
dataExplainId
);
dataExplainDTO
.
setDataExplainId
(
dataExplainId
);
// 日志
// 日志
indexLogService
.
saveDataExplainInsertLog
(
dataExplainDTO
);
indexLogService
.
saveDataExplainInsertLog
(
dataExplainDTO
);
// 红点提示
updateTipService
.
insertBySaveBusiness
(
dataExplainId
,
LogAndUpdateTipsTypeEnum
.
DATA_EXPLAIN
.
getCode
());
return
EnterpriseServiceResponse
.
success
();
return
EnterpriseServiceResponse
.
success
();
}
}
...
@@ -52,7 +60,10 @@ public class DataExplainApiServiceImpl implements DataExplainApiService {
...
@@ -52,7 +60,10 @@ public class DataExplainApiServiceImpl implements DataExplainApiService {
// 保存
// 保存
dataExplainService
.
update
(
dataExplainDTO
);
dataExplainService
.
update
(
dataExplainDTO
);
// 日志
// 日志
indexLogService
.
saveDataExplainUpdateLog
(
dataExplainDTO
,
reason
);
if
(
UpdateTypeEnum
.
UPDATE_PUBLISH
.
getCode
().
equals
(
updateType
))
{
indexLogService
.
saveDataExplainUpdateLog
(
dataExplainDTO
,
reason
);
updateTipService
.
publish
(
dataExplainDTO
.
getDataExplainId
(),
LogAndUpdateTipsTypeEnum
.
DATA_EXPLAIN
.
getCode
());
}
return
EnterpriseServiceResponse
.
success
();
return
EnterpriseServiceResponse
.
success
();
}
}
...
...
gic-data-cloud-service/src/main/java/com/gic/cloud/service/outer/impl/IndexApiServiceImpl.java
View file @
e1eafb2b
...
@@ -2,6 +2,8 @@ package com.gic.cloud.service.outer.impl;
...
@@ -2,6 +2,8 @@ package com.gic.cloud.service.outer.impl;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.cloud.constants.LogAndUpdateTipsTypeEnum
;
import
com.gic.cloud.constants.UpdateTypeEnum
;
import
com.gic.cloud.dto.IndexDTO
;
import
com.gic.cloud.dto.IndexDTO
;
import
com.gic.cloud.entity.TabIndex
;
import
com.gic.cloud.entity.TabIndex
;
import
com.gic.cloud.qo.IndexQO
;
import
com.gic.cloud.qo.IndexQO
;
...
@@ -49,8 +51,8 @@ public class IndexApiServiceImpl implements IndexApiService {
...
@@ -49,8 +51,8 @@ public class IndexApiServiceImpl implements IndexApiService {
// 写日志
// 写日志
indexLogService
.
saveIndexInsertLog
(
indexDTO
);
indexLogService
.
saveIndexInsertLog
(
indexDTO
);
//
todo
红点提示
// 红点提示
// updateTipService.insert(
);
updateTipService
.
insertBySaveBusiness
(
indexId
,
LogAndUpdateTipsTypeEnum
.
INDEX
.
getCode
()
);
return
ServiceResponse
.
success
();
return
ServiceResponse
.
success
();
}
}
...
@@ -68,11 +70,14 @@ public class IndexApiServiceImpl implements IndexApiService {
...
@@ -68,11 +70,14 @@ public class IndexApiServiceImpl implements IndexApiService {
indexService
.
update
(
indexDTO
);
indexService
.
update
(
indexDTO
);
// 保存关联表
// 保存关联表
indexModuleRelService
.
save
(
indexDTO
.
getIndexId
(),
indexDTO
.
getRelModuleIdList
(),
1
);
indexModuleRelService
.
save
(
indexDTO
.
getIndexId
(),
indexDTO
.
getRelModuleIdList
(),
1
);
// 写日志
indexLogService
.
saveIndexUpdateLog
(
indexDTO
,
reason
);
// todo 红点提示
if
(
UpdateTypeEnum
.
UPDATE_PUBLISH
.
getCode
().
equals
(
updateType
))
{
// updateTipService.insert();
// 写日志
indexLogService
.
saveIndexUpdateLog
(
indexDTO
,
reason
);
// 红点提示
updateTipService
.
publish
(
indexDTO
.
getIndexId
(),
LogAndUpdateTipsTypeEnum
.
INDEX
.
getCode
());
}
return
ServiceResponse
.
success
();
return
ServiceResponse
.
success
();
}
}
...
...
gic-data-cloud-service/src/main/resources/mapper/TabUpdateTipsMapper.xml
View file @
e1eafb2b
...
@@ -4,12 +4,12 @@
...
@@ -4,12 +4,12 @@
<resultMap
id=
"BaseResultMap"
type=
"com.gic.cloud.entity.TabUpdateTips"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.cloud.entity.TabUpdateTips"
>
<id
column=
"update_tips_id"
jdbcType=
"INTEGER"
property=
"updateTipsId"
/>
<id
column=
"update_tips_id"
jdbcType=
"INTEGER"
property=
"updateTipsId"
/>
<result
column=
"user_id"
jdbcType=
"INTEGER"
property=
"userId"
/>
<result
column=
"user_id"
jdbcType=
"INTEGER"
property=
"userId"
/>
<result
column=
"
index_id"
jdbcType=
"INTEGER"
property=
"index
Id"
/>
<result
column=
"
business_id"
jdbcType=
"INTEGER"
property=
"business
Id"
/>
<result
column=
"show_status"
jdbcType=
"INTEGER"
property=
"showStatus"
/>
<result
column=
"show_status"
jdbcType=
"INTEGER"
property=
"showStatus"
/>
<result
column=
"type"
jdbcType=
"INTEGER"
property=
"type"
/>
<result
column=
"type"
jdbcType=
"INTEGER"
property=
"type"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
update_tips_id, user_id,
index
_id, show_status, type
update_tips_id, user_id,
business
_id, show_status, type
</sql>
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
select
...
@@ -22,9 +22,9 @@
...
@@ -22,9 +22,9 @@
where update_tips_id = #{updateTipsId,jdbcType=INTEGER}
where update_tips_id = #{updateTipsId,jdbcType=INTEGER}
</delete>
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.cloud.entity.TabUpdateTips"
>
<insert
id=
"insert"
parameterType=
"com.gic.cloud.entity.TabUpdateTips"
>
insert into tab_update_tips (update_tips_id, user_id,
index
_id,
insert into tab_update_tips (update_tips_id, user_id,
business
_id,
show_status, type)
show_status, type)
values (#{updateTipsId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{
index
Id,jdbcType=INTEGER},
values (#{updateTipsId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{
business
Id,jdbcType=INTEGER},
#{showStatus,jdbcType=INTEGER}, #{type,jdbcType=INTEGER})
#{showStatus,jdbcType=INTEGER}, #{type,jdbcType=INTEGER})
</insert>
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.cloud.entity.TabUpdateTips"
>
<insert
id=
"insertSelective"
parameterType=
"com.gic.cloud.entity.TabUpdateTips"
>
...
@@ -36,8 +36,8 @@
...
@@ -36,8 +36,8 @@
<if
test=
"userId != null"
>
<if
test=
"userId != null"
>
user_id,
user_id,
</if>
</if>
<if
test=
"
index
Id != null"
>
<if
test=
"
business
Id != null"
>
index
_id,
business
_id,
</if>
</if>
<if
test=
"showStatus != null"
>
<if
test=
"showStatus != null"
>
show_status,
show_status,
...
@@ -53,8 +53,8 @@
...
@@ -53,8 +53,8 @@
<if
test=
"userId != null"
>
<if
test=
"userId != null"
>
#{userId,jdbcType=INTEGER},
#{userId,jdbcType=INTEGER},
</if>
</if>
<if
test=
"
index
Id != null"
>
<if
test=
"
business
Id != null"
>
#{
index
Id,jdbcType=INTEGER},
#{
business
Id,jdbcType=INTEGER},
</if>
</if>
<if
test=
"showStatus != null"
>
<if
test=
"showStatus != null"
>
#{showStatus,jdbcType=INTEGER},
#{showStatus,jdbcType=INTEGER},
...
@@ -70,8 +70,8 @@
...
@@ -70,8 +70,8 @@
<if
test=
"userId != null"
>
<if
test=
"userId != null"
>
user_id = #{userId,jdbcType=INTEGER},
user_id = #{userId,jdbcType=INTEGER},
</if>
</if>
<if
test=
"
index
Id != null"
>
<if
test=
"
business
Id != null"
>
index_id = #{index
Id,jdbcType=INTEGER},
business_id = #{business
Id,jdbcType=INTEGER},
</if>
</if>
<if
test=
"showStatus != null"
>
<if
test=
"showStatus != null"
>
show_status = #{showStatus,jdbcType=INTEGER},
show_status = #{showStatus,jdbcType=INTEGER},
...
@@ -85,9 +85,23 @@
...
@@ -85,9 +85,23 @@
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.cloud.entity.TabUpdateTips"
>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.cloud.entity.TabUpdateTips"
>
update tab_update_tips
update tab_update_tips
set user_id = #{userId,jdbcType=INTEGER},
set user_id = #{userId,jdbcType=INTEGER},
index_id = #{index
Id,jdbcType=INTEGER},
business_id = #{business
Id,jdbcType=INTEGER},
show_status = #{showStatus,jdbcType=INTEGER},
show_status = #{showStatus,jdbcType=INTEGER},
type = #{type,jdbcType=INTEGER}
type = #{type,jdbcType=INTEGER}
where update_tips_id = #{updateTipsId,jdbcType=INTEGER}
where update_tips_id = #{updateTipsId,jdbcType=INTEGER}
</update>
</update>
<update
id=
"updateStatus"
>
update tab_update_tips set show_status = #{showStatus}
<where>
<if
test=
"businessId != null "
>
and business_id = #{businessId}
</if>
<if
test=
"type != null "
>
and type = #{type}
</if>
<if
test=
"userId != null "
>
and user_id = #{userId}
</if>
</where>
</update>
</mapper>
</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