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
5393ae65
Commit
5393ae65
authored
Jul 09, 2020
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据字典
parent
c919ce49
Show whitespace changes
Inline
Side-by-side
Showing
35 changed files
with
3250 additions
and
0 deletions
+3250
-0
LogTypeEnum.java
...pi/src/main/java/com/gic/cloud/constants/LogTypeEnum.java
+23
-0
DataExplainDTO.java
...d-api/src/main/java/com/gic/cloud/dto/DataExplainDTO.java
+148
-0
IndexDTO.java
...a-cloud-api/src/main/java/com/gic/cloud/dto/IndexDTO.java
+348
-0
DataExplainQO.java
...oud-api/src/main/java/com/gic/cloud/qo/DataExplainQO.java
+22
-0
IndexQO.java
...ata-cloud-api/src/main/java/com/gic/cloud/qo/IndexQO.java
+49
-0
DataExplainApiService.java
...ain/java/com/gic/cloud/service/DataExplainApiService.java
+53
-0
IndexApiService.java
.../src/main/java/com/gic/cloud/service/IndexApiService.java
+53
-0
TabDataExplainMapper.java
...n/java/com/gic/cloud/dao/mapper/TabDataExplainMapper.java
+60
-0
TabIndexLogMapper.java
...main/java/com/gic/cloud/dao/mapper/TabIndexLogMapper.java
+54
-0
TabIndexMapper.java
...rc/main/java/com/gic/cloud/dao/mapper/TabIndexMapper.java
+60
-0
TabIndexModuleRelMapper.java
...ava/com/gic/cloud/dao/mapper/TabIndexModuleRelMapper.java
+67
-0
TabUpdateTipsMapper.java
...in/java/com/gic/cloud/dao/mapper/TabUpdateTipsMapper.java
+54
-0
TabDataExplain.java
...ce/src/main/java/com/gic/cloud/entity/TabDataExplain.java
+126
-0
TabIndex.java
...-service/src/main/java/com/gic/cloud/entity/TabIndex.java
+334
-0
TabIndexLog.java
...rvice/src/main/java/com/gic/cloud/entity/TabIndexLog.java
+139
-0
TabIndexModuleRel.java
...src/main/java/com/gic/cloud/entity/TabIndexModuleRel.java
+100
-0
TabUpdateTips.java
...ice/src/main/java/com/gic/cloud/entity/TabUpdateTips.java
+72
-0
DataExplainService.java
...c/main/java/com/gic/cloud/service/DataExplainService.java
+24
-0
IndexLogService.java
.../src/main/java/com/gic/cloud/service/IndexLogService.java
+19
-0
IndexModuleRelService.java
...ain/java/com/gic/cloud/service/IndexModuleRelService.java
+16
-0
IndexService.java
...ice/src/main/java/com/gic/cloud/service/IndexService.java
+26
-0
UpdateTipService.java
...src/main/java/com/gic/cloud/service/UpdateTipService.java
+9
-0
DataExplainServiceImpl.java
...va/com/gic/cloud/service/impl/DataExplainServiceImpl.java
+60
-0
IndexLogServiceImpl.java
.../java/com/gic/cloud/service/impl/IndexLogServiceImpl.java
+72
-0
IndexModuleRelServiceImpl.java
...com/gic/cloud/service/impl/IndexModuleRelServiceImpl.java
+51
-0
IndexServiceImpl.java
...ain/java/com/gic/cloud/service/impl/IndexServiceImpl.java
+64
-0
UpdateTipServiceImpl.java
...java/com/gic/cloud/service/impl/UpdateTipServiceImpl.java
+14
-0
DataExplainApiServiceImpl.java
...c/cloud/service/outer/impl/DataExplainApiServiceImpl.java
+73
-0
IndexApiServiceImpl.java
...com/gic/cloud/service/outer/impl/IndexApiServiceImpl.java
+95
-0
dubbo-gic-data-cloud-service.xml
...rvice/src/main/resources/dubbo-gic-data-cloud-service.xml
+2
-0
TabDataExplainMapper.xml
...ervice/src/main/resources/mapper/TabDataExplainMapper.xml
+170
-0
TabIndexLogMapper.xml
...d-service/src/main/resources/mapper/TabIndexLogMapper.xml
+154
-0
TabIndexMapper.xml
...loud-service/src/main/resources/mapper/TabIndexMapper.xml
+373
-0
TabIndexModuleRelMapper.xml
...ice/src/main/resources/mapper/TabIndexModuleRelMapper.xml
+172
-0
TabUpdateTipsMapper.xml
...service/src/main/resources/mapper/TabUpdateTipsMapper.xml
+94
-0
No files found.
gic-data-cloud-api/src/main/java/com/gic/cloud/constants/LogTypeEnum.java
0 → 100644
View file @
5393ae65
package
com
.
gic
.
cloud
.
constants
;
/**
* @author zhiwj
* @Description:
* @date 2020-07-08 16:22
*/
public
enum
LogTypeEnum
{
// 指标字典
INDEX
(
1
),
// 数据解读
DATA_EXPLAIN
(
2
),
;
private
Integer
code
;
LogTypeEnum
(
Integer
code
)
{
this
.
code
=
code
;
}
public
Integer
getCode
()
{
return
code
;
}
}
gic-data-cloud-api/src/main/java/com/gic/cloud/dto/DataExplainDTO.java
0 → 100644
View file @
5393ae65
package
com
.
gic
.
cloud
.
dto
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* @author zhiwj
* @Description:
* @date 2020-07-08 16:10
*/
public
class
DataExplainDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
6587550517516153357L
;
/**
*
*/
private
Integer
dataExplainId
;
/**
* 数据模块名称
*/
private
String
dataName
;
/**
* 模块分类
*/
private
String
dataClassify
;
/**
* 口径/文案编辑
*/
private
String
indexRemark
;
/**
* 补充说明
*/
private
String
complement
;
/**
*
*/
private
Date
createTime
;
/**
*
*/
private
Date
updateTime
;
/**
*
*/
private
Integer
status
;
/**
* 模块id
*/
private
Integer
moduleId
;
private
Integer
optUserId
;
private
String
optUserName
;
public
Integer
getDataExplainId
()
{
return
dataExplainId
;
}
public
void
setDataExplainId
(
Integer
dataExplainId
)
{
this
.
dataExplainId
=
dataExplainId
;
}
public
String
getDataName
()
{
return
dataName
;
}
public
void
setDataName
(
String
dataName
)
{
this
.
dataName
=
dataName
;
}
public
String
getDataClassify
()
{
return
dataClassify
;
}
public
void
setDataClassify
(
String
dataClassify
)
{
this
.
dataClassify
=
dataClassify
;
}
public
String
getIndexRemark
()
{
return
indexRemark
;
}
public
void
setIndexRemark
(
String
indexRemark
)
{
this
.
indexRemark
=
indexRemark
;
}
public
String
getComplement
()
{
return
complement
;
}
public
void
setComplement
(
String
complement
)
{
this
.
complement
=
complement
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
public
Integer
getModuleId
()
{
return
moduleId
;
}
public
void
setModuleId
(
Integer
moduleId
)
{
this
.
moduleId
=
moduleId
;
}
public
Integer
getOptUserId
()
{
return
optUserId
;
}
public
void
setOptUserId
(
Integer
optUserId
)
{
this
.
optUserId
=
optUserId
;
}
public
String
getOptUserName
()
{
return
optUserName
;
}
public
void
setOptUserName
(
String
optUserName
)
{
this
.
optUserName
=
optUserName
;
}
}
gic-data-cloud-api/src/main/java/com/gic/cloud/dto/IndexDTO.java
0 → 100644
View file @
5393ae65
package
com
.
gic
.
cloud
.
dto
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
/**
* @author zhiwj
* @Description:
* @date 2020-07-08 10:13
*/
public
class
IndexDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
5687670215343610800L
;
/**
* 指标id
*/
private
Integer
indexId
;
/**
* 分类类型
*/
private
Integer
classifyType
;
/**
* 分类名
*/
private
String
classifyName
;
/**
* 是否应用指标 1是 0否
*/
private
Integer
isAppIndex
;
/**
* 关联应用指标
*/
private
String
relAppIndex
;
/**
*
*/
private
String
code
;
/**
*
*/
private
String
name
;
/**
* 指标级别
*/
private
Integer
indexLevel
;
/**
* 指标级别
*/
private
String
indexLevelName
;
/**
* 关联一级指标 ‘,’ 隔开
*/
private
String
relTopLevel
;
/**
* 单位
*/
private
Integer
unitCode
;
/**
* 单位
*/
private
String
unitName
;
/**
* 小数位数
*/
private
Integer
decimalSize
;
/**
* 数据类型 1流量 2存量
*/
private
Integer
dataType
;
/**
* 指标类型 1基础 2计算
*/
private
Integer
indexType
;
/**
* 基础组织维度
*/
private
String
baseOrganized
;
/**
* 基础时间维度
*/
private
String
baseTime
;
/**
* 更新频率 高/中/低
*/
private
String
updateRate
;
/**
* 更新频率 补充说明
*/
private
String
updateRateRemark
;
/**
* 口径/文案编辑
*/
private
String
indexRemark
;
/**
* 补充说明
*/
private
String
complement
;
/**
*
*/
private
Date
createTime
;
/**
*
*/
private
Date
updateTime
;
private
List
<
Integer
>
relModuleIdList
;
/**
* 操作人id
*/
private
Integer
optUserId
;
/**
* 操作人name
*/
private
String
optUserName
;
public
Integer
getIndexId
()
{
return
indexId
;
}
public
void
setIndexId
(
Integer
indexId
)
{
this
.
indexId
=
indexId
;
}
public
Integer
getClassifyType
()
{
return
classifyType
;
}
public
void
setClassifyType
(
Integer
classifyType
)
{
this
.
classifyType
=
classifyType
;
}
public
String
getClassifyName
()
{
return
classifyName
;
}
public
void
setClassifyName
(
String
classifyName
)
{
this
.
classifyName
=
classifyName
;
}
public
Integer
getIsAppIndex
()
{
return
isAppIndex
;
}
public
void
setIsAppIndex
(
Integer
isAppIndex
)
{
this
.
isAppIndex
=
isAppIndex
;
}
public
String
getRelAppIndex
()
{
return
relAppIndex
;
}
public
void
setRelAppIndex
(
String
relAppIndex
)
{
this
.
relAppIndex
=
relAppIndex
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
Integer
getIndexLevel
()
{
return
indexLevel
;
}
public
void
setIndexLevel
(
Integer
indexLevel
)
{
this
.
indexLevel
=
indexLevel
;
}
public
String
getIndexLevelName
()
{
return
indexLevelName
;
}
public
void
setIndexLevelName
(
String
indexLevelName
)
{
this
.
indexLevelName
=
indexLevelName
;
}
public
String
getRelTopLevel
()
{
return
relTopLevel
;
}
public
void
setRelTopLevel
(
String
relTopLevel
)
{
this
.
relTopLevel
=
relTopLevel
;
}
public
Integer
getUnitCode
()
{
return
unitCode
;
}
public
void
setUnitCode
(
Integer
unitCode
)
{
this
.
unitCode
=
unitCode
;
}
public
String
getUnitName
()
{
return
unitName
;
}
public
void
setUnitName
(
String
unitName
)
{
this
.
unitName
=
unitName
;
}
public
Integer
getDecimalSize
()
{
return
decimalSize
;
}
public
void
setDecimalSize
(
Integer
decimalSize
)
{
this
.
decimalSize
=
decimalSize
;
}
public
Integer
getDataType
()
{
return
dataType
;
}
public
void
setDataType
(
Integer
dataType
)
{
this
.
dataType
=
dataType
;
}
public
Integer
getIndexType
()
{
return
indexType
;
}
public
void
setIndexType
(
Integer
indexType
)
{
this
.
indexType
=
indexType
;
}
public
String
getBaseOrganized
()
{
return
baseOrganized
;
}
public
void
setBaseOrganized
(
String
baseOrganized
)
{
this
.
baseOrganized
=
baseOrganized
;
}
public
String
getBaseTime
()
{
return
baseTime
;
}
public
void
setBaseTime
(
String
baseTime
)
{
this
.
baseTime
=
baseTime
;
}
public
String
getUpdateRate
()
{
return
updateRate
;
}
public
void
setUpdateRate
(
String
updateRate
)
{
this
.
updateRate
=
updateRate
;
}
public
String
getUpdateRateRemark
()
{
return
updateRateRemark
;
}
public
void
setUpdateRateRemark
(
String
updateRateRemark
)
{
this
.
updateRateRemark
=
updateRateRemark
;
}
public
String
getIndexRemark
()
{
return
indexRemark
;
}
public
void
setIndexRemark
(
String
indexRemark
)
{
this
.
indexRemark
=
indexRemark
;
}
public
String
getComplement
()
{
return
complement
;
}
public
void
setComplement
(
String
complement
)
{
this
.
complement
=
complement
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
List
<
Integer
>
getRelModuleIdList
()
{
return
relModuleIdList
;
}
public
void
setRelModuleIdList
(
List
<
Integer
>
relModuleIdList
)
{
this
.
relModuleIdList
=
relModuleIdList
;
}
public
Integer
getOptUserId
()
{
return
optUserId
;
}
public
void
setOptUserId
(
Integer
optUserId
)
{
this
.
optUserId
=
optUserId
;
}
public
String
getOptUserName
()
{
return
optUserName
;
}
public
void
setOptUserName
(
String
optUserName
)
{
this
.
optUserName
=
optUserName
;
}
}
gic-data-cloud-api/src/main/java/com/gic/cloud/qo/DataExplainQO.java
0 → 100644
View file @
5393ae65
package
com
.
gic
.
cloud
.
qo
;
import
java.io.Serializable
;
/**
* @author zhiwj
* @Description:
* @date 2020-07-08 10:13
*/
public
class
DataExplainQO
extends
PageQO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
5687670215343610800L
;
private
String
search
;
public
String
getSearch
()
{
return
search
;
}
public
void
setSearch
(
String
search
)
{
this
.
search
=
search
;
}
}
gic-data-cloud-api/src/main/java/com/gic/cloud/qo/IndexQO.java
0 → 100644
View file @
5393ae65
package
com
.
gic
.
cloud
.
qo
;
import
java.io.Serializable
;
/**
* @author zhiwj
* @Description:
* @date 2020-07-08 10:13
*/
public
class
IndexQO
extends
PageQO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
5687670215343610800L
;
private
Integer
classifyType
;
private
Integer
moduleId
;
private
Integer
isAppIndex
;
private
String
search
;
public
Integer
getClassifyType
()
{
return
classifyType
;
}
public
void
setClassifyType
(
Integer
classifyType
)
{
this
.
classifyType
=
classifyType
;
}
public
Integer
getModuleId
()
{
return
moduleId
;
}
public
void
setModuleId
(
Integer
moduleId
)
{
this
.
moduleId
=
moduleId
;
}
public
Integer
getIsAppIndex
()
{
return
isAppIndex
;
}
public
void
setIsAppIndex
(
Integer
isAppIndex
)
{
this
.
isAppIndex
=
isAppIndex
;
}
public
String
getSearch
()
{
return
search
;
}
public
void
setSearch
(
String
search
)
{
this
.
search
=
search
;
}
}
gic-data-cloud-api/src/main/java/com/gic/cloud/service/DataExplainApiService.java
0 → 100644
View file @
5393ae65
package
com
.
gic
.
cloud
.
service
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.cloud.dto.DataExplainDTO
;
import
com.gic.cloud.qo.DataExplainQO
;
/**
* @author zhiwj
* @Description:
* @date 2020-07-08 16:05
*/
public
interface
DataExplainApiService
{
/**
* @Title: saveDataExplain
* @Description:
* @author zhiwj
* @param dataExplainDTO
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
* @throws
*/
ServiceResponse
<
Void
>
saveDataExplain
(
DataExplainDTO
dataExplainDTO
);
/**
* @Title: updateDataExplain
* @Description:
* @author zhiwj
* @param dataExplainDTO
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
* @throws
*/
ServiceResponse
<
Void
>
updateDataExplain
(
DataExplainDTO
dataExplainDTO
,
Integer
updateType
,
String
reason
);
/**
* @Title: getByDataExplainId
* @Description:
* @author zhiwj
* @return com.gic.api.base.commons.ServiceResponse<com.gic.cloud.dto.DataExplainDTO>
* @throws
*/
ServiceResponse
<
DataExplainDTO
>
getByDataExplainId
(
Integer
dataExplainId
);
/**
* @Title: listDataExplain
* @Description:
* @author zhiwj
* @param dataExplainQO
* @return com.gic.api.base.commons.ServiceResponse<java.util.List<com.gic.cloud.dto.DataExplainDTO>>
* @throws
*/
ServiceResponse
<
Page
<
DataExplainDTO
>>
listDataExplain
(
DataExplainQO
dataExplainQO
);
}
gic-data-cloud-api/src/main/java/com/gic/cloud/service/IndexApiService.java
0 → 100644
View file @
5393ae65
package
com
.
gic
.
cloud
.
service
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.cloud.dto.IndexDTO
;
import
com.gic.cloud.qo.IndexQO
;
/**
* @author zhiwj
* @Description:
* @date 2020-07-08 10:13
*/
public
interface
IndexApiService
{
/**
* @Title: saveIndex
* @Description:
* @author zhiwj
* @param indexDTO
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
* @throws
*/
ServiceResponse
<
Void
>
saveIndex
(
IndexDTO
indexDTO
);
/**
* @Title: editIndex
* @Description:
* @author zhiwj
* @param indexDTO
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
* @throws
*/
ServiceResponse
<
Void
>
updateIndex
(
IndexDTO
indexDTO
,
Integer
updateType
,
String
reason
);
/**
* @Title: getById
* @Description:
* @author zhiwj
* @param indexId
* @return com.gic.api.base.commons.ServiceResponse<com.gic.cloud.dto.IndexDTO>
* @throws
*/
ServiceResponse
<
IndexDTO
>
getByIndexId
(
Integer
indexId
);
/**
* @Title: listIndex
* @Description:
* @author zhiwj
* @return com.gic.api.base.commons.ServiceResponse<java.util.List<com.gic.cloud.dto.IndexDTO>>
* @throws
*/
ServiceResponse
<
Page
<
IndexDTO
>>
listIndex
(
IndexQO
indexQO
);
}
gic-data-cloud-service/src/main/java/com/gic/cloud/dao/mapper/TabDataExplainMapper.java
0 → 100644
View file @
5393ae65
package
com
.
gic
.
cloud
.
dao
.
mapper
;
import
com.gic.cloud.entity.TabDataExplain
;
import
com.gic.cloud.qo.DataExplainQO
;
import
com.github.pagehelper.Page
;
public
interface
TabDataExplainMapper
{
/**
* 根据主键删除
*
* @param dataExplainId 主键
* @return 更新条目数
*/
int
deleteByPrimaryKey
(
Integer
dataExplainId
);
/**
* 插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
insert
(
TabDataExplain
record
);
/**
* 动态插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
insertSelective
(
TabDataExplain
record
);
/**
* 根据主键查询
*
* @param dataExplainId 主键
* @return 实体对象
*/
TabDataExplain
selectByPrimaryKey
(
Integer
dataExplainId
);
/**
* 根据主键动态更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
updateByPrimaryKeySelective
(
TabDataExplain
record
);
/**
* 根据主键更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
updateByPrimaryKey
(
TabDataExplain
record
);
TabDataExplain
getBySelective
(
TabDataExplain
tabDataExplain
);
Page
<
TabDataExplain
>
listDataExplain
(
DataExplainQO
dataExplainQO
);
}
\ No newline at end of file
gic-data-cloud-service/src/main/java/com/gic/cloud/dao/mapper/TabIndexLogMapper.java
0 → 100644
View file @
5393ae65
package
com
.
gic
.
cloud
.
dao
.
mapper
;
import
com.gic.cloud.entity.TabIndexLog
;
public
interface
TabIndexLogMapper
{
/**
* 根据主键删除
*
* @param cloudIndexLogId 主键
* @return 更新条目数
*/
int
deleteByPrimaryKey
(
Integer
cloudIndexLogId
);
/**
* 插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
insert
(
TabIndexLog
record
);
/**
* 动态插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
insertSelective
(
TabIndexLog
record
);
/**
* 根据主键查询
*
* @param cloudIndexLogId 主键
* @return 实体对象
*/
TabIndexLog
selectByPrimaryKey
(
Integer
cloudIndexLogId
);
/**
* 根据主键动态更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
updateByPrimaryKeySelective
(
TabIndexLog
record
);
/**
* 根据主键更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
updateByPrimaryKey
(
TabIndexLog
record
);
}
\ No newline at end of file
gic-data-cloud-service/src/main/java/com/gic/cloud/dao/mapper/TabIndexMapper.java
0 → 100644
View file @
5393ae65
package
com
.
gic
.
cloud
.
dao
.
mapper
;
import
com.gic.cloud.entity.TabIndex
;
import
com.gic.cloud.qo.IndexQO
;
import
com.github.pagehelper.Page
;
public
interface
TabIndexMapper
{
/**
* 根据主键删除
*
* @param indexId 主键
* @return 更新条目数
*/
int
deleteByPrimaryKey
(
Integer
indexId
);
/**
* 插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
insert
(
TabIndex
record
);
/**
* 动态插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
insertSelective
(
TabIndex
record
);
/**
* 根据主键查询
*
* @param indexId 主键
* @return 实体对象
*/
TabIndex
selectByPrimaryKey
(
Integer
indexId
);
/**
* 根据主键动态更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
updateByPrimaryKeySelective
(
TabIndex
record
);
/**
* 根据主键更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
updateByPrimaryKey
(
TabIndex
record
);
TabIndex
getBySelective
(
TabIndex
tabIndex
);
Page
<
TabIndex
>
listIndex
(
IndexQO
indexQO
);
}
\ No newline at end of file
gic-data-cloud-service/src/main/java/com/gic/cloud/dao/mapper/TabIndexModuleRelMapper.java
0 → 100644
View file @
5393ae65
package
com
.
gic
.
cloud
.
dao
.
mapper
;
import
com.gic.cloud.entity.TabIndexModuleRel
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
public
interface
TabIndexModuleRelMapper
{
/**
* 根据主键删除
*
* @param indexModuleRelId 主键
* @return 更新条目数
*/
int
deleteByPrimaryKey
(
Integer
indexModuleRelId
);
/**
* 插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
insert
(
TabIndexModuleRel
record
);
/**
* 动态插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
insertSelective
(
TabIndexModuleRel
record
);
/**
* 根据主键查询
*
* @param indexModuleRelId 主键
* @return 实体对象
*/
TabIndexModuleRel
selectByPrimaryKey
(
Integer
indexModuleRelId
);
/**
* 根据主键动态更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
updateByPrimaryKeySelective
(
TabIndexModuleRel
record
);
/**
* 根据主键更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
updateByPrimaryKey
(
TabIndexModuleRel
record
);
void
delByBusinessId
(
@Param
(
"businessId"
)
Integer
businessId
,
@Param
(
"type"
)
Integer
type
);
void
insertSelectiveByNotExist
(
TabIndexModuleRel
rel
);
void
updateStatusByBusinessIds
(
@Param
(
"businessId"
)
Integer
businessId
,
@Param
(
"ids"
)
List
<
Integer
>
moduleIdList
,
@Param
(
"type"
)
Integer
type
);
List
<
Integer
>
listModuleIdByIndexId
(
@Param
(
"indexId"
)
Integer
indexId
);
List
<
Integer
>
listIndexIdByModuleId
(
@Param
(
"moduleId"
)
Integer
moduleId
);
}
\ No newline at end of file
gic-data-cloud-service/src/main/java/com/gic/cloud/dao/mapper/TabUpdateTipsMapper.java
0 → 100644
View file @
5393ae65
package
com
.
gic
.
cloud
.
dao
.
mapper
;
import
com.gic.cloud.entity.TabUpdateTips
;
public
interface
TabUpdateTipsMapper
{
/**
* 根据主键删除
*
* @param updateTipsId 主键
* @return 更新条目数
*/
int
deleteByPrimaryKey
(
Integer
updateTipsId
);
/**
* 插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
insert
(
TabUpdateTips
record
);
/**
* 动态插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
insertSelective
(
TabUpdateTips
record
);
/**
* 根据主键查询
*
* @param updateTipsId 主键
* @return 实体对象
*/
TabUpdateTips
selectByPrimaryKey
(
Integer
updateTipsId
);
/**
* 根据主键动态更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
updateByPrimaryKeySelective
(
TabUpdateTips
record
);
/**
* 根据主键更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
updateByPrimaryKey
(
TabUpdateTips
record
);
}
\ No newline at end of file
gic-data-cloud-service/src/main/java/com/gic/cloud/entity/TabDataExplain.java
0 → 100644
View file @
5393ae65
package
com
.
gic
.
cloud
.
entity
;
import
java.util.Date
;
/**
* tab_data_explain
*/
public
class
TabDataExplain
{
/**
*
*/
private
Integer
dataExplainId
;
/**
* 数据模块名称
*/
private
String
dataName
;
/**
* 模块分类
*/
private
String
dataClassify
;
/**
* 口径/文案编辑
*/
private
String
indexRemark
;
/**
* 补充说明
*/
private
String
complement
;
/**
*
*/
private
Date
createTime
;
/**
*
*/
private
Date
updateTime
;
/**
*
*/
private
Integer
status
;
/**
* 模块id
*/
private
Integer
moduleId
;
public
Integer
getDataExplainId
()
{
return
dataExplainId
;
}
public
void
setDataExplainId
(
Integer
dataExplainId
)
{
this
.
dataExplainId
=
dataExplainId
;
}
public
String
getDataName
()
{
return
dataName
;
}
public
void
setDataName
(
String
dataName
)
{
this
.
dataName
=
dataName
;
}
public
String
getDataClassify
()
{
return
dataClassify
;
}
public
void
setDataClassify
(
String
dataClassify
)
{
this
.
dataClassify
=
dataClassify
;
}
public
String
getIndexRemark
()
{
return
indexRemark
;
}
public
void
setIndexRemark
(
String
indexRemark
)
{
this
.
indexRemark
=
indexRemark
;
}
public
String
getComplement
()
{
return
complement
;
}
public
void
setComplement
(
String
complement
)
{
this
.
complement
=
complement
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
public
Integer
getModuleId
()
{
return
moduleId
;
}
public
void
setModuleId
(
Integer
moduleId
)
{
this
.
moduleId
=
moduleId
;
}
}
\ No newline at end of file
gic-data-cloud-service/src/main/java/com/gic/cloud/entity/TabIndex.java
0 → 100644
View file @
5393ae65
package
com
.
gic
.
cloud
.
entity
;
import
java.util.Date
;
/**
* tab_index
*/
public
class
TabIndex
{
/**
* 指标id
*/
private
Integer
indexId
;
/**
* 分类类型
*/
private
Integer
classifyType
;
/**
* 分类名
*/
private
String
classifyName
;
/**
* 是否应用指标 1是 0否
*/
private
Integer
isAppIndex
;
/**
* 关联应用指标
*/
private
String
relAppIndex
;
/**
*
*/
private
String
code
;
/**
*
*/
private
String
name
;
/**
* 指标级别
*/
private
Integer
indexLevel
;
/**
* 指标级别
*/
private
String
indexLevelName
;
/**
* 关联一级指标 ‘,’ 隔开
*/
private
String
relTopLevel
;
/**
* 单位
*/
private
Integer
unitCode
;
/**
* 单位
*/
private
String
unitName
;
/**
* 小数位数
*/
private
Integer
decimalSize
;
/**
* 数据类型 1流量 2存量
*/
private
Integer
dataType
;
/**
* 指标类型 1基础 2计算
*/
private
Integer
indexType
;
/**
* 基础组织维度
*/
private
String
baseOrganized
;
/**
* 基础时间维度
*/
private
String
baseTime
;
/**
* 更新频率 高/中/低
*/
private
String
updateRate
;
/**
* 更新频率 补充说明
*/
private
String
updateRateRemark
;
/**
* 口径/文案编辑
*/
private
String
indexRemark
;
/**
* 是否展示 1展示 0不展示
*/
private
Integer
show
;
/**
* 补充说明
*/
private
String
complement
;
/**
*
*/
private
Date
createTime
;
/**
*
*/
private
Date
updateTime
;
/**
*
*/
private
Integer
status
;
public
Integer
getIndexId
()
{
return
indexId
;
}
public
void
setIndexId
(
Integer
indexId
)
{
this
.
indexId
=
indexId
;
}
public
Integer
getClassifyType
()
{
return
classifyType
;
}
public
void
setClassifyType
(
Integer
classifyType
)
{
this
.
classifyType
=
classifyType
;
}
public
String
getClassifyName
()
{
return
classifyName
;
}
public
void
setClassifyName
(
String
classifyName
)
{
this
.
classifyName
=
classifyName
;
}
public
Integer
getIsAppIndex
()
{
return
isAppIndex
;
}
public
void
setIsAppIndex
(
Integer
isAppIndex
)
{
this
.
isAppIndex
=
isAppIndex
;
}
public
String
getRelAppIndex
()
{
return
relAppIndex
;
}
public
void
setRelAppIndex
(
String
relAppIndex
)
{
this
.
relAppIndex
=
relAppIndex
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
Integer
getIndexLevel
()
{
return
indexLevel
;
}
public
void
setIndexLevel
(
Integer
indexLevel
)
{
this
.
indexLevel
=
indexLevel
;
}
public
String
getIndexLevelName
()
{
return
indexLevelName
;
}
public
void
setIndexLevelName
(
String
indexLevelName
)
{
this
.
indexLevelName
=
indexLevelName
;
}
public
String
getRelTopLevel
()
{
return
relTopLevel
;
}
public
void
setRelTopLevel
(
String
relTopLevel
)
{
this
.
relTopLevel
=
relTopLevel
;
}
public
Integer
getUnitCode
()
{
return
unitCode
;
}
public
void
setUnitCode
(
Integer
unitCode
)
{
this
.
unitCode
=
unitCode
;
}
public
String
getUnitName
()
{
return
unitName
;
}
public
void
setUnitName
(
String
unitName
)
{
this
.
unitName
=
unitName
;
}
public
Integer
getDecimalSize
()
{
return
decimalSize
;
}
public
void
setDecimalSize
(
Integer
decimalSize
)
{
this
.
decimalSize
=
decimalSize
;
}
public
Integer
getDataType
()
{
return
dataType
;
}
public
void
setDataType
(
Integer
dataType
)
{
this
.
dataType
=
dataType
;
}
public
Integer
getIndexType
()
{
return
indexType
;
}
public
void
setIndexType
(
Integer
indexType
)
{
this
.
indexType
=
indexType
;
}
public
String
getBaseOrganized
()
{
return
baseOrganized
;
}
public
void
setBaseOrganized
(
String
baseOrganized
)
{
this
.
baseOrganized
=
baseOrganized
;
}
public
String
getBaseTime
()
{
return
baseTime
;
}
public
void
setBaseTime
(
String
baseTime
)
{
this
.
baseTime
=
baseTime
;
}
public
String
getUpdateRate
()
{
return
updateRate
;
}
public
void
setUpdateRate
(
String
updateRate
)
{
this
.
updateRate
=
updateRate
;
}
public
String
getUpdateRateRemark
()
{
return
updateRateRemark
;
}
public
void
setUpdateRateRemark
(
String
updateRateRemark
)
{
this
.
updateRateRemark
=
updateRateRemark
;
}
public
String
getIndexRemark
()
{
return
indexRemark
;
}
public
void
setIndexRemark
(
String
indexRemark
)
{
this
.
indexRemark
=
indexRemark
;
}
public
Integer
getShow
()
{
return
show
;
}
public
void
setShow
(
Integer
show
)
{
this
.
show
=
show
;
}
public
String
getComplement
()
{
return
complement
;
}
public
void
setComplement
(
String
complement
)
{
this
.
complement
=
complement
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
}
\ No newline at end of file
gic-data-cloud-service/src/main/java/com/gic/cloud/entity/TabIndexLog.java
0 → 100644
View file @
5393ae65
package
com
.
gic
.
cloud
.
entity
;
import
java.util.Date
;
/**
* tab_index_log
*/
public
class
TabIndexLog
{
/**
*
*/
private
Integer
cloudIndexLogId
;
/**
* 被操作的指标数据字典
*/
private
Integer
indexId
;
/**
* 操作时间
*/
private
Date
optTime
;
/**
* 操作人id
*/
private
Integer
optUserId
;
/**
* 操作人名
*/
private
String
optUserName
;
/**
* 调整原因
*/
private
String
reason
;
/**
*
*/
private
Integer
status
;
/**
*
*/
private
Date
createTime
;
/**
*
*/
private
Date
updateTime
;
/**
* 1指标字典 2数据解读
*/
private
Integer
type
;
public
Integer
getCloudIndexLogId
()
{
return
cloudIndexLogId
;
}
public
void
setCloudIndexLogId
(
Integer
cloudIndexLogId
)
{
this
.
cloudIndexLogId
=
cloudIndexLogId
;
}
public
Integer
getIndexId
()
{
return
indexId
;
}
public
void
setIndexId
(
Integer
indexId
)
{
this
.
indexId
=
indexId
;
}
public
Date
getOptTime
()
{
return
optTime
;
}
public
void
setOptTime
(
Date
optTime
)
{
this
.
optTime
=
optTime
;
}
public
Integer
getOptUserId
()
{
return
optUserId
;
}
public
void
setOptUserId
(
Integer
optUserId
)
{
this
.
optUserId
=
optUserId
;
}
public
String
getOptUserName
()
{
return
optUserName
;
}
public
void
setOptUserName
(
String
optUserName
)
{
this
.
optUserName
=
optUserName
;
}
public
String
getReason
()
{
return
reason
;
}
public
void
setReason
(
String
reason
)
{
this
.
reason
=
reason
;
}
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
Integer
getType
()
{
return
type
;
}
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
}
}
\ No newline at end of file
gic-data-cloud-service/src/main/java/com/gic/cloud/entity/TabIndexModuleRel.java
0 → 100644
View file @
5393ae65
package
com
.
gic
.
cloud
.
entity
;
import
java.util.Date
;
/**
* tab_index_module_rel
*/
public
class
TabIndexModuleRel
{
/**
* 关联表id
*/
private
Integer
indexModuleRelId
;
/**
* 关联类型 1指标字典关联编号 2指标字典是否展示 3数据解读关联模块编号
*/
private
Integer
type
;
/**
* 指标字典或数据解读的id
*/
private
Integer
businessId
;
/**
* 模块的id
*/
private
Integer
moduleId
;
/**
*
*/
private
Date
createTime
;
/**
*
*/
private
Date
updateTime
;
/**
*
*/
private
Integer
status
;
public
Integer
getIndexModuleRelId
()
{
return
indexModuleRelId
;
}
public
void
setIndexModuleRelId
(
Integer
indexModuleRelId
)
{
this
.
indexModuleRelId
=
indexModuleRelId
;
}
public
Integer
getType
()
{
return
type
;
}
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
}
public
Integer
getBusinessId
()
{
return
businessId
;
}
public
void
setBusinessId
(
Integer
businessId
)
{
this
.
businessId
=
businessId
;
}
public
Integer
getModuleId
()
{
return
moduleId
;
}
public
void
setModuleId
(
Integer
moduleId
)
{
this
.
moduleId
=
moduleId
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
Integer
getStatus
()
{
return
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
}
\ No newline at end of file
gic-data-cloud-service/src/main/java/com/gic/cloud/entity/TabUpdateTips.java
0 → 100644
View file @
5393ae65
package
com
.
gic
.
cloud
.
entity
;
/**
* tab_update_tips
*/
public
class
TabUpdateTips
{
/**
*
*/
private
Integer
updateTipsId
;
/**
*
*/
private
Integer
userId
;
/**
*
*/
private
Integer
indexId
;
/**
* 展示状态 1展示红的 0展示灰色已读
*/
private
Integer
showStatus
;
/**
* 1指标字典 2数据解读
*/
private
Integer
type
;
public
Integer
getUpdateTipsId
()
{
return
updateTipsId
;
}
public
void
setUpdateTipsId
(
Integer
updateTipsId
)
{
this
.
updateTipsId
=
updateTipsId
;
}
public
Integer
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
Integer
userId
)
{
this
.
userId
=
userId
;
}
public
Integer
getIndexId
()
{
return
indexId
;
}
public
void
setIndexId
(
Integer
indexId
)
{
this
.
indexId
=
indexId
;
}
public
Integer
getShowStatus
()
{
return
showStatus
;
}
public
void
setShowStatus
(
Integer
showStatus
)
{
this
.
showStatus
=
showStatus
;
}
public
Integer
getType
()
{
return
type
;
}
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
}
}
\ No newline at end of file
gic-data-cloud-service/src/main/java/com/gic/cloud/service/DataExplainService.java
0 → 100644
View file @
5393ae65
package
com
.
gic
.
cloud
.
service
;
import
com.gic.cloud.dto.DataExplainDTO
;
import
com.gic.cloud.entity.TabDataExplain
;
import
com.gic.cloud.qo.DataExplainQO
;
import
com.github.pagehelper.Page
;
/**
* @author zhiwj
* @Description:
* @date 2020-07-08 10:22
*/
public
interface
DataExplainService
{
boolean
isNameRepeat
(
String
dataName
,
Integer
dataExplainId
);
Integer
save
(
DataExplainDTO
dataExplainDTO
);
void
update
(
DataExplainDTO
dataExplainDTO
);
TabDataExplain
getByDataExplainId
(
Integer
dataExplainId
);
Page
<
TabDataExplain
>
listDataExplain
(
DataExplainQO
dataExplainQO
);
}
gic-data-cloud-service/src/main/java/com/gic/cloud/service/IndexLogService.java
0 → 100644
View file @
5393ae65
package
com
.
gic
.
cloud
.
service
;
import
com.gic.cloud.dto.DataExplainDTO
;
import
com.gic.cloud.dto.IndexDTO
;
/**
* @author zhiwj
* @Description:
* @date 2020-07-08 10:22
*/
public
interface
IndexLogService
{
void
saveIndexInsertLog
(
IndexDTO
indexDTO
);
void
saveIndexUpdateLog
(
IndexDTO
indexDTO
,
String
reason
);
void
saveDataExplainInsertLog
(
DataExplainDTO
dataExplainDTO
);
void
saveDataExplainUpdateLog
(
DataExplainDTO
dataExplainDTO
,
String
reason
);
}
gic-data-cloud-service/src/main/java/com/gic/cloud/service/IndexModuleRelService.java
0 → 100644
View file @
5393ae65
package
com
.
gic
.
cloud
.
service
;
import
java.util.List
;
/**
* @author zhiwj
* @Description:
* @date 2020-07-08 10:22
*/
public
interface
IndexModuleRelService
{
void
save
(
Integer
indexId
,
List
<
Integer
>
moduleId
,
Integer
type
);
List
<
Integer
>
listModuleIdByIndexId
(
Integer
indexId
);
List
<
Integer
>
listIndexIdByModuleId
(
Integer
moduleId
);
}
gic-data-cloud-service/src/main/java/com/gic/cloud/service/IndexService.java
0 → 100644
View file @
5393ae65
package
com
.
gic
.
cloud
.
service
;
import
com.gic.cloud.dto.IndexDTO
;
import
com.gic.cloud.entity.TabIndex
;
import
com.gic.cloud.qo.IndexQO
;
import
com.github.pagehelper.Page
;
/**
* @author zhiwj
* @Description:
* @date 2020-07-08 10:20
*/
public
interface
IndexService
{
boolean
isNameRepeat
(
String
name
,
Integer
indexId
);
boolean
isCodeRepeat
(
String
code
,
Integer
indexId
);
Integer
save
(
IndexDTO
indexDTO
);
void
update
(
IndexDTO
indexDTO
);
TabIndex
getByIndexId
(
Integer
indexId
);
Page
<
TabIndex
>
listIndex
(
IndexQO
indexQO
);
}
gic-data-cloud-service/src/main/java/com/gic/cloud/service/UpdateTipService.java
0 → 100644
View file @
5393ae65
package
com
.
gic
.
cloud
.
service
;
/**
* @author zhiwj
* @Description:
* @date 2020-07-08 14:28
*/
public
interface
UpdateTipService
{
}
gic-data-cloud-service/src/main/java/com/gic/cloud/service/impl/DataExplainServiceImpl.java
0 → 100644
View file @
5393ae65
package
com
.
gic
.
cloud
.
service
.
impl
;
import
com.gic.cloud.dao.mapper.TabDataExplainMapper
;
import
com.gic.cloud.dto.DataExplainDTO
;
import
com.gic.cloud.entity.TabDataExplain
;
import
com.gic.cloud.qo.DataExplainQO
;
import
com.gic.cloud.service.DataExplainService
;
import
com.gic.commons.util.EntityUtil
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
/**
* @author zhiwj
* @Description:
* @date 2020-07-08 16:51
*/
@Service
public
class
DataExplainServiceImpl
implements
DataExplainService
{
@Autowired
private
TabDataExplainMapper
tabDataExplainMapper
;
@Override
public
boolean
isNameRepeat
(
String
dataName
,
Integer
dataExplainId
)
{
TabDataExplain
tabDataExplain
=
new
TabDataExplain
();
tabDataExplain
.
setDataExplainId
(
dataExplainId
);
tabDataExplain
.
setDataName
(
dataName
);
return
tabDataExplainMapper
.
getBySelective
(
tabDataExplain
)
!=
null
;
}
@Override
public
Integer
save
(
DataExplainDTO
dataExplainDTO
)
{
TabDataExplain
tabDataExplain
=
EntityUtil
.
changeEntityByJSON
(
TabDataExplain
.
class
,
dataExplainDTO
);
tabDataExplain
.
setCreateTime
(
new
Date
());
tabDataExplain
.
setStatus
(
1
);
tabDataExplainMapper
.
insertSelective
(
tabDataExplain
);
return
tabDataExplain
.
getDataExplainId
();
}
@Override
public
void
update
(
DataExplainDTO
dataExplainDTO
)
{
TabDataExplain
tabDataExplain
=
EntityUtil
.
changeEntityByJSON
(
TabDataExplain
.
class
,
dataExplainDTO
);
tabDataExplainMapper
.
updateByPrimaryKeySelective
(
tabDataExplain
);
}
@Override
public
TabDataExplain
getByDataExplainId
(
Integer
dataExplainId
)
{
return
tabDataExplainMapper
.
selectByPrimaryKey
(
dataExplainId
);
}
@Override
public
Page
<
TabDataExplain
>
listDataExplain
(
DataExplainQO
dataExplainQO
)
{
PageHelper
.
startPage
(
dataExplainQO
.
getCurrentPage
(),
dataExplainQO
.
getPageSize
());
return
tabDataExplainMapper
.
listDataExplain
(
dataExplainQO
);
}
}
gic-data-cloud-service/src/main/java/com/gic/cloud/service/impl/IndexLogServiceImpl.java
0 → 100644
View file @
5393ae65
package
com
.
gic
.
cloud
.
service
.
impl
;
import
com.gic.cloud.constants.LogTypeEnum
;
import
com.gic.cloud.dao.mapper.TabIndexLogMapper
;
import
com.gic.cloud.dto.DataExplainDTO
;
import
com.gic.cloud.dto.IndexDTO
;
import
com.gic.cloud.entity.TabIndexLog
;
import
com.gic.cloud.service.IndexLogService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
/**
* @author zhiwj
* @Description:
* @date 2020-07-08 10:26
*/
@Service
public
class
IndexLogServiceImpl
implements
IndexLogService
{
@Autowired
private
TabIndexLogMapper
tabIndexLogMapper
;
@Override
public
void
saveIndexInsertLog
(
IndexDTO
indexDTO
)
{
saveLog
(
indexDTO
,
"新增"
);
}
@Override
public
void
saveIndexUpdateLog
(
IndexDTO
indexDTO
,
String
reason
)
{
saveLog
(
indexDTO
,
reason
);
}
private
void
saveLog
(
IndexDTO
indexDTO
,
String
reason
)
{
TabIndexLog
indexLog
=
new
TabIndexLog
();
indexLog
.
setIndexId
(
indexDTO
.
getIndexId
());
indexLog
.
setOptTime
(
new
Date
());
indexLog
.
setOptUserId
(
indexDTO
.
getOptUserId
());
indexLog
.
setOptUserName
(
indexDTO
.
getOptUserName
());
indexLog
.
setReason
(
reason
);
indexLog
.
setStatus
(
1
);
indexLog
.
setCreateTime
(
new
Date
());
indexLog
.
setUpdateTime
(
new
Date
());
indexLog
.
setType
(
LogTypeEnum
.
INDEX
.
getCode
());
tabIndexLogMapper
.
insert
(
indexLog
);
}
@Override
public
void
saveDataExplainInsertLog
(
DataExplainDTO
dataExplainDTO
)
{
saveLog
(
dataExplainDTO
,
"新增"
);
}
@Override
public
void
saveDataExplainUpdateLog
(
DataExplainDTO
dataExplainDTO
,
String
reason
)
{
saveLog
(
dataExplainDTO
,
reason
);
}
private
void
saveLog
(
DataExplainDTO
dataExplainDTO
,
String
reason
)
{
TabIndexLog
indexLog
=
new
TabIndexLog
();
indexLog
.
setIndexId
(
dataExplainDTO
.
getDataExplainId
());
indexLog
.
setOptTime
(
new
Date
());
indexLog
.
setOptUserId
(
dataExplainDTO
.
getOptUserId
());
indexLog
.
setOptUserName
(
dataExplainDTO
.
getOptUserName
());
indexLog
.
setReason
(
reason
);
indexLog
.
setStatus
(
1
);
indexLog
.
setCreateTime
(
new
Date
());
indexLog
.
setUpdateTime
(
new
Date
());
indexLog
.
setType
(
LogTypeEnum
.
INDEX
.
getCode
());
tabIndexLogMapper
.
insert
(
indexLog
);
}
}
gic-data-cloud-service/src/main/java/com/gic/cloud/service/impl/IndexModuleRelServiceImpl.java
0 → 100644
View file @
5393ae65
package
com
.
gic
.
cloud
.
service
.
impl
;
import
com.gic.cloud.dao.mapper.TabIndexModuleRelMapper
;
import
com.gic.cloud.entity.TabIndexModuleRel
;
import
com.gic.cloud.service.IndexModuleRelService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.List
;
/**
* @author zhiwj
* @Description:
* @date 2020-07-08 10:26
*/
@Service
public
class
IndexModuleRelServiceImpl
implements
IndexModuleRelService
{
@Autowired
private
TabIndexModuleRelMapper
tabIndexModuleRelMapper
;
@Override
public
void
save
(
Integer
businessId
,
List
<
Integer
>
moduleIdList
,
Integer
type
)
{
// 把所有关联status设置为0
tabIndexModuleRelMapper
.
delByBusinessId
(
businessId
,
type
);
// 插入不存在的关联
for
(
Integer
moduleId
:
moduleIdList
)
{
TabIndexModuleRel
rel
=
new
TabIndexModuleRel
();
rel
.
setType
(
type
);
rel
.
setBusinessId
(
businessId
);
rel
.
setModuleId
(
moduleId
);
rel
.
setCreateTime
(
new
Date
());
rel
.
setStatus
(
1
);
tabIndexModuleRelMapper
.
insertSelectiveByNotExist
(
rel
);
}
// 把所有userId关联status都设置为1
tabIndexModuleRelMapper
.
updateStatusByBusinessIds
(
businessId
,
moduleIdList
,
type
);
}
@Override
public
List
<
Integer
>
listModuleIdByIndexId
(
Integer
indexId
)
{
return
tabIndexModuleRelMapper
.
listModuleIdByIndexId
(
indexId
);
}
@Override
public
List
<
Integer
>
listIndexIdByModuleId
(
Integer
moduleId
)
{
return
tabIndexModuleRelMapper
.
listIndexIdByModuleId
(
moduleId
);
}
}
gic-data-cloud-service/src/main/java/com/gic/cloud/service/impl/IndexServiceImpl.java
0 → 100644
View file @
5393ae65
package
com
.
gic
.
cloud
.
service
.
impl
;
import
com.gic.cloud.dao.mapper.TabIndexMapper
;
import
com.gic.cloud.dto.IndexDTO
;
import
com.gic.cloud.entity.TabIndex
;
import
com.gic.cloud.qo.IndexQO
;
import
com.gic.cloud.service.IndexService
;
import
com.gic.commons.util.EntityUtil
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
/**
* @author zhiwj
* @Description:
* @date 2020-07-08 10:20
*/
@Service
public
class
IndexServiceImpl
implements
IndexService
{
@Autowired
private
TabIndexMapper
tabIndexMapper
;
@Override
public
boolean
isNameRepeat
(
String
name
,
Integer
indexId
)
{
TabIndex
tabIndex
=
new
TabIndex
();
tabIndex
.
setName
(
name
);
tabIndex
.
setIndexId
(
indexId
);
return
tabIndexMapper
.
getBySelective
(
tabIndex
)
!=
null
;
}
@Override
public
boolean
isCodeRepeat
(
String
code
,
Integer
indexId
)
{
TabIndex
tabIndex
=
new
TabIndex
();
tabIndex
.
setCode
(
code
);
tabIndex
.
setIndexId
(
indexId
);
return
tabIndexMapper
.
getBySelective
(
tabIndex
)
!=
null
;
}
@Override
public
Integer
save
(
IndexDTO
indexDTO
)
{
TabIndex
tabIndex
=
EntityUtil
.
changeEntityByJSON
(
TabIndex
.
class
,
indexDTO
);
tabIndexMapper
.
insertSelective
(
tabIndex
);
return
tabIndex
.
getIndexId
();
}
@Override
public
void
update
(
IndexDTO
indexDTO
)
{
TabIndex
tabIndex
=
EntityUtil
.
changeEntityByJSON
(
TabIndex
.
class
,
indexDTO
);
tabIndexMapper
.
updateByPrimaryKeySelective
(
tabIndex
);
}
@Override
public
TabIndex
getByIndexId
(
Integer
indexId
)
{
return
tabIndexMapper
.
selectByPrimaryKey
(
indexId
);
}
@Override
public
Page
<
TabIndex
>
listIndex
(
IndexQO
indexQO
)
{
PageHelper
.
startPage
(
indexQO
.
getCurrentPage
(),
indexQO
.
getPageSize
());
return
tabIndexMapper
.
listIndex
(
indexQO
);
}
}
gic-data-cloud-service/src/main/java/com/gic/cloud/service/impl/UpdateTipServiceImpl.java
0 → 100644
View file @
5393ae65
package
com
.
gic
.
cloud
.
service
.
impl
;
import
com.gic.cloud.service.UpdateTipService
;
import
org.springframework.stereotype.Service
;
/**
* @author zhiwj
* @Description:
* @date 2020-07-08 14:28
*/
@Service
public
class
UpdateTipServiceImpl
implements
UpdateTipService
{
}
gic-data-cloud-service/src/main/java/com/gic/cloud/service/outer/impl/DataExplainApiServiceImpl.java
0 → 100644
View file @
5393ae65
package
com
.
gic
.
cloud
.
service
.
outer
.
impl
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.cloud.dto.DataExplainDTO
;
import
com.gic.cloud.entity.TabDataExplain
;
import
com.gic.cloud.qo.DataExplainQO
;
import
com.gic.cloud.service.DataExplainApiService
;
import
com.gic.cloud.service.DataExplainService
;
import
com.gic.cloud.service.IndexLogService
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.PageHelperUtils
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.response.EnterpriseServiceResponse
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
/**
* @author zhiwj
* @Description:
* @date 2020-07-08 16:05
*/
@Service
(
"dataExplainApiService"
)
public
class
DataExplainApiServiceImpl
implements
DataExplainApiService
{
@Autowired
private
DataExplainService
dataExplainService
;
@Autowired
private
IndexLogService
indexLogService
;
@Override
public
ServiceResponse
<
Void
>
saveDataExplain
(
DataExplainDTO
dataExplainDTO
)
{
// 校验参数
if
(
dataExplainService
.
isNameRepeat
(
dataExplainDTO
.
getDataName
(),
null
))
{
return
EnterpriseServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"数据模块名称不能重复"
);
}
// 保存
Integer
dataExplainId
=
dataExplainService
.
save
(
dataExplainDTO
);
dataExplainDTO
.
setDataExplainId
(
dataExplainId
);
// 日志
indexLogService
.
saveDataExplainInsertLog
(
dataExplainDTO
);
return
EnterpriseServiceResponse
.
success
();
}
@Override
public
ServiceResponse
<
Void
>
updateDataExplain
(
DataExplainDTO
dataExplainDTO
,
Integer
updateType
,
String
reason
)
{
// 校验参数
if
(
dataExplainService
.
isNameRepeat
(
dataExplainDTO
.
getDataName
(),
dataExplainDTO
.
getDataExplainId
()))
{
return
EnterpriseServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"数据模块名称不能重复"
);
}
// 保存
dataExplainService
.
update
(
dataExplainDTO
);
// 日志
indexLogService
.
saveDataExplainUpdateLog
(
dataExplainDTO
,
reason
);
return
EnterpriseServiceResponse
.
success
();
}
@Override
public
ServiceResponse
<
DataExplainDTO
>
getByDataExplainId
(
Integer
dataExplainId
)
{
TabDataExplain
dataExplain
=
this
.
dataExplainService
.
getByDataExplainId
(
dataExplainId
);
DataExplainDTO
dataExplainDTO
=
EntityUtil
.
changeEntityByJSON
(
DataExplainDTO
.
class
,
dataExplain
);
return
EnterpriseServiceResponse
.
success
(
dataExplainDTO
);
}
@Override
public
ServiceResponse
<
Page
<
DataExplainDTO
>>
listDataExplain
(
DataExplainQO
dataExplainQO
)
{
com
.
github
.
pagehelper
.
Page
<
TabDataExplain
>
listDataExplain
=
this
.
dataExplainService
.
listDataExplain
(
dataExplainQO
);
Page
<
DataExplainDTO
>
dtoPage
=
PageHelperUtils
.
changePageHelperToCurrentPage
(
listDataExplain
,
DataExplainDTO
.
class
);
return
EnterpriseServiceResponse
.
success
(
dtoPage
);
}
}
gic-data-cloud-service/src/main/java/com/gic/cloud/service/outer/impl/IndexApiServiceImpl.java
0 → 100644
View file @
5393ae65
package
com
.
gic
.
cloud
.
service
.
outer
.
impl
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.cloud.dto.IndexDTO
;
import
com.gic.cloud.entity.TabIndex
;
import
com.gic.cloud.qo.IndexQO
;
import
com.gic.cloud.service.*
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.PageHelperUtils
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.response.EnterpriseServiceResponse
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* @author zhiwj
* @Description:
* @date 2020-07-08 10:19
*/
@Service
(
"indexService"
)
public
class
IndexApiServiceImpl
implements
IndexApiService
{
@Autowired
private
IndexService
indexService
;
@Autowired
private
IndexLogService
indexLogService
;
@Autowired
private
IndexModuleRelService
indexModuleRelService
;
@Autowired
private
UpdateTipService
updateTipService
;
@Override
public
ServiceResponse
<
Void
>
saveIndex
(
IndexDTO
indexDTO
)
{
// 校验参数
if
(
indexService
.
isNameRepeat
(
indexDTO
.
getName
(),
null
))
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"名称重复"
);
}
if
(
indexService
.
isCodeRepeat
(
indexDTO
.
getCode
(),
null
))
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"编码重复"
);
}
// 保存实体
Integer
indexId
=
indexService
.
save
(
indexDTO
);
indexDTO
.
setIndexId
(
indexId
);
// 保存关联表
indexModuleRelService
.
save
(
indexDTO
.
getIndexId
(),
indexDTO
.
getRelModuleIdList
(),
1
);
// 写日志
indexLogService
.
saveIndexInsertLog
(
indexDTO
);
// todo 红点提示
// updateTipService.insert();
return
ServiceResponse
.
success
();
}
@Override
public
ServiceResponse
<
Void
>
updateIndex
(
IndexDTO
indexDTO
,
Integer
updateType
,
String
reason
)
{
// 校验参数
if
(
indexService
.
isNameRepeat
(
indexDTO
.
getName
(),
indexDTO
.
getIndexId
()))
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"名称重复"
);
}
if
(
indexService
.
isCodeRepeat
(
indexDTO
.
getCode
(),
indexDTO
.
getIndexId
()))
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"编码重复"
);
}
// 保存实体
indexService
.
update
(
indexDTO
);
// 保存关联表
indexModuleRelService
.
save
(
indexDTO
.
getIndexId
(),
indexDTO
.
getRelModuleIdList
(),
1
);
// 写日志
indexLogService
.
saveIndexUpdateLog
(
indexDTO
,
reason
);
// todo 红点提示
// updateTipService.insert();
return
ServiceResponse
.
success
();
}
@Override
public
ServiceResponse
<
IndexDTO
>
getByIndexId
(
Integer
indexId
)
{
TabIndex
index
=
this
.
indexService
.
getByIndexId
(
indexId
);
IndexDTO
indexDTO
=
EntityUtil
.
changeEntityByJSON
(
IndexDTO
.
class
,
index
);
List
<
Integer
>
moduleIdList
=
this
.
indexModuleRelService
.
listModuleIdByIndexId
(
indexDTO
.
getIndexId
());
indexDTO
.
setRelModuleIdList
(
moduleIdList
);
return
EnterpriseServiceResponse
.
success
(
indexDTO
);
}
@Override
public
ServiceResponse
<
Page
<
IndexDTO
>>
listIndex
(
IndexQO
indexQO
)
{
com
.
github
.
pagehelper
.
Page
<
TabIndex
>
indexList
=
indexService
.
listIndex
(
indexQO
);
Page
<
IndexDTO
>
indexDTOPage
=
PageHelperUtils
.
changePageHelperToCurrentPage
(
indexList
,
IndexDTO
.
class
);
return
EnterpriseServiceResponse
.
success
(
indexDTOPage
);
}
}
gic-data-cloud-service/src/main/resources/dubbo-gic-data-cloud-service.xml
View file @
5393ae65
...
...
@@ -20,4 +20,6 @@
<dubbo:service
interface=
"com.gic.cloud.service.FunctionApiService"
ref=
"functionApiService"
timeout=
"6000"
/>
<dubbo:service
interface=
"com.gic.cloud.service.FunctionModuleApiService"
ref=
"functionModuleApiService"
timeout=
"6000"
/>
<dubbo:service
interface=
"com.gic.cloud.service.DataAuthApiService"
ref=
"dataAuthApiService"
timeout=
"6000"
/>
<dubbo:service
interface=
"com.gic.cloud.service.DataExplainApiService"
ref=
"functionApiService"
timeout=
"6000"
/>
<dubbo:service
interface=
"com.gic.cloud.service.IndexApiService"
ref=
"functionApiService"
timeout=
"6000"
/>
</beans>
gic-data-cloud-service/src/main/resources/mapper/TabDataExplainMapper.xml
0 → 100644
View file @
5393ae65
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.gic.cloud.dao.mapper.TabDataExplainMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.cloud.entity.TabDataExplain"
>
<id
column=
"data_explain_id"
jdbcType=
"INTEGER"
property=
"dataExplainId"
/>
<result
column=
"data_name"
jdbcType=
"VARCHAR"
property=
"dataName"
/>
<result
column=
"data_classify"
jdbcType=
"VARCHAR"
property=
"dataClassify"
/>
<result
column=
"index_remark"
jdbcType=
"VARCHAR"
property=
"indexRemark"
/>
<result
column=
"complement"
jdbcType=
"VARCHAR"
property=
"complement"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"status"
jdbcType=
"INTEGER"
property=
"status"
/>
<result
column=
"module_id"
jdbcType=
"INTEGER"
property=
"moduleId"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
data_explain_id, data_name, data_classify, index_remark, complement, create_time,
update_time, status, module_id
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_data_explain
where data_explain_id = #{dataExplainId,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from tab_data_explain
where data_explain_id = #{dataExplainId,jdbcType=INTEGER}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.cloud.entity.TabDataExplain"
>
insert into tab_data_explain (data_explain_id, data_name, data_classify,
index_remark, complement, create_time,
update_time, status, module_id
)
values (#{dataExplainId,jdbcType=INTEGER}, #{dataName,jdbcType=VARCHAR}, #{dataClassify,jdbcType=VARCHAR},
#{indexRemark,jdbcType=VARCHAR}, #{complement,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, #{moduleId,jdbcType=INTEGER}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.cloud.entity.TabDataExplain"
>
<selectKey
keyProperty=
"dataExplainId"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into tab_data_explain
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"dataExplainId != null"
>
data_explain_id,
</if>
<if
test=
"dataName != null"
>
data_name,
</if>
<if
test=
"dataClassify != null"
>
data_classify,
</if>
<if
test=
"indexRemark != null"
>
index_remark,
</if>
<if
test=
"complement != null"
>
complement,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"status != null"
>
status,
</if>
<if
test=
"moduleId != null"
>
module_id,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"dataExplainId != null"
>
#{dataExplainId,jdbcType=INTEGER},
</if>
<if
test=
"dataName != null"
>
#{dataName,jdbcType=VARCHAR},
</if>
<if
test=
"dataClassify != null"
>
#{dataClassify,jdbcType=VARCHAR},
</if>
<if
test=
"indexRemark != null"
>
#{indexRemark,jdbcType=VARCHAR},
</if>
<if
test=
"complement != null"
>
#{complement,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"status != null"
>
#{status,jdbcType=INTEGER},
</if>
<if
test=
"moduleId != null"
>
#{moduleId,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.cloud.entity.TabDataExplain"
>
update tab_data_explain
<set>
<if
test=
"dataName != null"
>
data_name = #{dataName,jdbcType=VARCHAR},
</if>
<if
test=
"dataClassify != null"
>
data_classify = #{dataClassify,jdbcType=VARCHAR},
</if>
<if
test=
"indexRemark != null"
>
index_remark = #{indexRemark,jdbcType=VARCHAR},
</if>
<if
test=
"complement != null"
>
complement = #{complement,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"status != null"
>
status = #{status,jdbcType=INTEGER},
</if>
<if
test=
"moduleId != null"
>
module_id = #{moduleId,jdbcType=INTEGER},
</if>
</set>
where data_explain_id = #{dataExplainId,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.cloud.entity.TabDataExplain"
>
update tab_data_explain
set data_name = #{dataName,jdbcType=VARCHAR},
data_classify = #{dataClassify,jdbcType=VARCHAR},
index_remark = #{indexRemark,jdbcType=VARCHAR},
complement = #{complement,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
status = #{status,jdbcType=INTEGER},
module_id = #{moduleId,jdbcType=INTEGER}
where data_explain_id = #{dataExplainId,jdbcType=INTEGER}
</update>
<!-- getBySelective-->
<select
id=
"getBySelective"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_data_explain where status = 1
<if
test=
"data_name != null "
>
and data_name = #{data_name}
</if>
<if
test=
"null != ids and ids.size > 0"
>
and data_explain_id in
<foreach
collection=
"ids"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</select>
<select
id=
"listDataExplain"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_data_explain
where status = 1
<if
test=
"search != null and search != '' "
>
and ( data_name like concat('%', #{search}, '%') or data_classify like concat('%', #{search}, '%') )
</if>
</select>
</mapper>
\ No newline at end of file
gic-data-cloud-service/src/main/resources/mapper/TabIndexLogMapper.xml
0 → 100644
View file @
5393ae65
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.gic.cloud.dao.mapper.TabIndexLogMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.cloud.entity.TabIndexLog"
>
<id
column=
"cloud_index_log_id"
jdbcType=
"INTEGER"
property=
"cloudIndexLogId"
/>
<result
column=
"index_id"
jdbcType=
"INTEGER"
property=
"indexId"
/>
<result
column=
"opt_time"
jdbcType=
"TIMESTAMP"
property=
"optTime"
/>
<result
column=
"opt_user_id"
jdbcType=
"INTEGER"
property=
"optUserId"
/>
<result
column=
"opt_user_name"
jdbcType=
"VARCHAR"
property=
"optUserName"
/>
<result
column=
"reason"
jdbcType=
"VARCHAR"
property=
"reason"
/>
<result
column=
"status"
jdbcType=
"INTEGER"
property=
"status"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"type"
jdbcType=
"INTEGER"
property=
"type"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
cloud_index_log_id, index_id, opt_time, opt_user_id, opt_user_name, reason, status,
create_time, update_time, type
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_index_log
where cloud_index_log_id = #{cloudIndexLogId,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from tab_index_log
where cloud_index_log_id = #{cloudIndexLogId,jdbcType=INTEGER}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.cloud.entity.TabIndexLog"
>
insert into tab_index_log (cloud_index_log_id, index_id, opt_time,
opt_user_id, opt_user_name, reason,
status, create_time, update_time,
type)
values (#{cloudIndexLogId,jdbcType=INTEGER}, #{indexId,jdbcType=INTEGER}, #{optTime,jdbcType=TIMESTAMP},
#{optUserId,jdbcType=INTEGER}, #{optUserName,jdbcType=VARCHAR}, #{reason,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{type,jdbcType=INTEGER})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.cloud.entity.TabIndexLog"
>
insert into tab_index_log
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"cloudIndexLogId != null"
>
cloud_index_log_id,
</if>
<if
test=
"indexId != null"
>
index_id,
</if>
<if
test=
"optTime != null"
>
opt_time,
</if>
<if
test=
"optUserId != null"
>
opt_user_id,
</if>
<if
test=
"optUserName != null"
>
opt_user_name,
</if>
<if
test=
"reason != null"
>
reason,
</if>
<if
test=
"status != null"
>
status,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"type != null"
>
type,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"cloudIndexLogId != null"
>
#{cloudIndexLogId,jdbcType=INTEGER},
</if>
<if
test=
"indexId != null"
>
#{indexId,jdbcType=INTEGER},
</if>
<if
test=
"optTime != null"
>
#{optTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"optUserId != null"
>
#{optUserId,jdbcType=INTEGER},
</if>
<if
test=
"optUserName != null"
>
#{optUserName,jdbcType=VARCHAR},
</if>
<if
test=
"reason != null"
>
#{reason,jdbcType=VARCHAR},
</if>
<if
test=
"status != null"
>
#{status,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"type != null"
>
#{type,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.cloud.entity.TabIndexLog"
>
update tab_index_log
<set>
<if
test=
"indexId != null"
>
index_id = #{indexId,jdbcType=INTEGER},
</if>
<if
test=
"optTime != null"
>
opt_time = #{optTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"optUserId != null"
>
opt_user_id = #{optUserId,jdbcType=INTEGER},
</if>
<if
test=
"optUserName != null"
>
opt_user_name = #{optUserName,jdbcType=VARCHAR},
</if>
<if
test=
"reason != null"
>
reason = #{reason,jdbcType=VARCHAR},
</if>
<if
test=
"status != null"
>
status = #{status,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"type != null"
>
type = #{type,jdbcType=INTEGER},
</if>
</set>
where cloud_index_log_id = #{cloudIndexLogId,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.cloud.entity.TabIndexLog"
>
update tab_index_log
set index_id = #{indexId,jdbcType=INTEGER},
opt_time = #{optTime,jdbcType=TIMESTAMP},
opt_user_id = #{optUserId,jdbcType=INTEGER},
opt_user_name = #{optUserName,jdbcType=VARCHAR},
reason = #{reason,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
type = #{type,jdbcType=INTEGER}
where cloud_index_log_id = #{cloudIndexLogId,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
gic-data-cloud-service/src/main/resources/mapper/TabIndexMapper.xml
0 → 100644
View file @
5393ae65
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.gic.cloud.dao.mapper.TabIndexMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.cloud.entity.TabIndex"
>
<id
column=
"index_id"
jdbcType=
"INTEGER"
property=
"indexId"
/>
<result
column=
"classify_type"
jdbcType=
"INTEGER"
property=
"classifyType"
/>
<result
column=
"classify_name"
jdbcType=
"VARCHAR"
property=
"classifyName"
/>
<result
column=
"is_app_index"
jdbcType=
"INTEGER"
property=
"isAppIndex"
/>
<result
column=
"rel_app_index"
jdbcType=
"VARCHAR"
property=
"relAppIndex"
/>
<result
column=
"code"
jdbcType=
"VARCHAR"
property=
"code"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"index_level"
jdbcType=
"INTEGER"
property=
"indexLevel"
/>
<result
column=
"index_level_name"
jdbcType=
"VARCHAR"
property=
"indexLevelName"
/>
<result
column=
"rel_top_level"
jdbcType=
"VARCHAR"
property=
"relTopLevel"
/>
<result
column=
"unit_code"
jdbcType=
"INTEGER"
property=
"unitCode"
/>
<result
column=
"unit_name"
jdbcType=
"VARCHAR"
property=
"unitName"
/>
<result
column=
"decimal_size"
jdbcType=
"INTEGER"
property=
"decimalSize"
/>
<result
column=
"data_type"
jdbcType=
"INTEGER"
property=
"dataType"
/>
<result
column=
"index_type"
jdbcType=
"INTEGER"
property=
"indexType"
/>
<result
column=
"base_organized"
jdbcType=
"VARCHAR"
property=
"baseOrganized"
/>
<result
column=
"base_time"
jdbcType=
"VARCHAR"
property=
"baseTime"
/>
<result
column=
"update_rate"
jdbcType=
"VARCHAR"
property=
"updateRate"
/>
<result
column=
"update_rate_remark"
jdbcType=
"VARCHAR"
property=
"updateRateRemark"
/>
<result
column=
"index_remark"
jdbcType=
"VARCHAR"
property=
"indexRemark"
/>
<result
column=
"show"
jdbcType=
"INTEGER"
property=
"show"
/>
<result
column=
"complement"
jdbcType=
"VARCHAR"
property=
"complement"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"status"
jdbcType=
"INTEGER"
property=
"status"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
index_id, classify_type, classify_name, is_app_index, rel_app_index, code, name,
index_level, index_level_name, rel_top_level, unit_code, unit_name, decimal_size,
data_type, index_type, base_organized, base_time, update_rate, update_rate_remark,
index_remark, show, complement, create_time, update_time, status
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_index
where index_id = #{indexId,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from tab_index
where index_id = #{indexId,jdbcType=INTEGER}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.cloud.entity.TabIndex"
>
insert into tab_index (index_id, classify_type, classify_name,
is_app_index, rel_app_index, code,
name, index_level, index_level_name,
rel_top_level, unit_code, unit_name,
decimal_size, data_type, index_type,
base_organized, base_time, update_rate,
update_rate_remark, index_remark, show,
complement, create_time, update_time,
status)
values (#{indexId,jdbcType=INTEGER}, #{classifyType,jdbcType=INTEGER}, #{classifyName,jdbcType=VARCHAR},
#{isAppIndex,jdbcType=INTEGER}, #{relAppIndex,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR},
#{name,jdbcType=VARCHAR}, #{indexLevel,jdbcType=INTEGER}, #{indexLevelName,jdbcType=VARCHAR},
#{relTopLevel,jdbcType=VARCHAR}, #{unitCode,jdbcType=INTEGER}, #{unitName,jdbcType=VARCHAR},
#{decimalSize,jdbcType=INTEGER}, #{dataType,jdbcType=INTEGER}, #{indexType,jdbcType=INTEGER},
#{baseOrganized,jdbcType=VARCHAR}, #{baseTime,jdbcType=VARCHAR}, #{updateRate,jdbcType=VARCHAR},
#{updateRateRemark,jdbcType=VARCHAR}, #{indexRemark,jdbcType=VARCHAR}, #{show,jdbcType=INTEGER},
#{complement,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{status,jdbcType=INTEGER})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.cloud.entity.TabIndex"
>
<selectKey
keyProperty=
"indexId"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into tab_index
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"indexId != null"
>
index_id,
</if>
<if
test=
"classifyType != null"
>
classify_type,
</if>
<if
test=
"classifyName != null"
>
classify_name,
</if>
<if
test=
"isAppIndex != null"
>
is_app_index,
</if>
<if
test=
"relAppIndex != null"
>
rel_app_index,
</if>
<if
test=
"code != null"
>
code,
</if>
<if
test=
"name != null"
>
name,
</if>
<if
test=
"indexLevel != null"
>
index_level,
</if>
<if
test=
"indexLevelName != null"
>
index_level_name,
</if>
<if
test=
"relTopLevel != null"
>
rel_top_level,
</if>
<if
test=
"unitCode != null"
>
unit_code,
</if>
<if
test=
"unitName != null"
>
unit_name,
</if>
<if
test=
"decimalSize != null"
>
decimal_size,
</if>
<if
test=
"dataType != null"
>
data_type,
</if>
<if
test=
"indexType != null"
>
index_type,
</if>
<if
test=
"baseOrganized != null"
>
base_organized,
</if>
<if
test=
"baseTime != null"
>
base_time,
</if>
<if
test=
"updateRate != null"
>
update_rate,
</if>
<if
test=
"updateRateRemark != null"
>
update_rate_remark,
</if>
<if
test=
"indexRemark != null"
>
index_remark,
</if>
<if
test=
"show != null"
>
show,
</if>
<if
test=
"complement != null"
>
complement,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"status != null"
>
status,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"indexId != null"
>
#{indexId,jdbcType=INTEGER},
</if>
<if
test=
"classifyType != null"
>
#{classifyType,jdbcType=INTEGER},
</if>
<if
test=
"classifyName != null"
>
#{classifyName,jdbcType=VARCHAR},
</if>
<if
test=
"isAppIndex != null"
>
#{isAppIndex,jdbcType=INTEGER},
</if>
<if
test=
"relAppIndex != null"
>
#{relAppIndex,jdbcType=VARCHAR},
</if>
<if
test=
"code != null"
>
#{code,jdbcType=VARCHAR},
</if>
<if
test=
"name != null"
>
#{name,jdbcType=VARCHAR},
</if>
<if
test=
"indexLevel != null"
>
#{indexLevel,jdbcType=INTEGER},
</if>
<if
test=
"indexLevelName != null"
>
#{indexLevelName,jdbcType=VARCHAR},
</if>
<if
test=
"relTopLevel != null"
>
#{relTopLevel,jdbcType=VARCHAR},
</if>
<if
test=
"unitCode != null"
>
#{unitCode,jdbcType=INTEGER},
</if>
<if
test=
"unitName != null"
>
#{unitName,jdbcType=VARCHAR},
</if>
<if
test=
"decimalSize != null"
>
#{decimalSize,jdbcType=INTEGER},
</if>
<if
test=
"dataType != null"
>
#{dataType,jdbcType=INTEGER},
</if>
<if
test=
"indexType != null"
>
#{indexType,jdbcType=INTEGER},
</if>
<if
test=
"baseOrganized != null"
>
#{baseOrganized,jdbcType=VARCHAR},
</if>
<if
test=
"baseTime != null"
>
#{baseTime,jdbcType=VARCHAR},
</if>
<if
test=
"updateRate != null"
>
#{updateRate,jdbcType=VARCHAR},
</if>
<if
test=
"updateRateRemark != null"
>
#{updateRateRemark,jdbcType=VARCHAR},
</if>
<if
test=
"indexRemark != null"
>
#{indexRemark,jdbcType=VARCHAR},
</if>
<if
test=
"show != null"
>
#{show,jdbcType=INTEGER},
</if>
<if
test=
"complement != null"
>
#{complement,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"status != null"
>
#{status,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.cloud.entity.TabIndex"
>
update tab_index
<set>
<if
test=
"classifyType != null"
>
classify_type = #{classifyType,jdbcType=INTEGER},
</if>
<if
test=
"classifyName != null"
>
classify_name = #{classifyName,jdbcType=VARCHAR},
</if>
<if
test=
"isAppIndex != null"
>
is_app_index = #{isAppIndex,jdbcType=INTEGER},
</if>
<if
test=
"relAppIndex != null"
>
rel_app_index = #{relAppIndex,jdbcType=VARCHAR},
</if>
<if
test=
"code != null"
>
code = #{code,jdbcType=VARCHAR},
</if>
<if
test=
"name != null"
>
name = #{name,jdbcType=VARCHAR},
</if>
<if
test=
"indexLevel != null"
>
index_level = #{indexLevel,jdbcType=INTEGER},
</if>
<if
test=
"indexLevelName != null"
>
index_level_name = #{indexLevelName,jdbcType=VARCHAR},
</if>
<if
test=
"relTopLevel != null"
>
rel_top_level = #{relTopLevel,jdbcType=VARCHAR},
</if>
<if
test=
"unitCode != null"
>
unit_code = #{unitCode,jdbcType=INTEGER},
</if>
<if
test=
"unitName != null"
>
unit_name = #{unitName,jdbcType=VARCHAR},
</if>
<if
test=
"decimalSize != null"
>
decimal_size = #{decimalSize,jdbcType=INTEGER},
</if>
<if
test=
"dataType != null"
>
data_type = #{dataType,jdbcType=INTEGER},
</if>
<if
test=
"indexType != null"
>
index_type = #{indexType,jdbcType=INTEGER},
</if>
<if
test=
"baseOrganized != null"
>
base_organized = #{baseOrganized,jdbcType=VARCHAR},
</if>
<if
test=
"baseTime != null"
>
base_time = #{baseTime,jdbcType=VARCHAR},
</if>
<if
test=
"updateRate != null"
>
update_rate = #{updateRate,jdbcType=VARCHAR},
</if>
<if
test=
"updateRateRemark != null"
>
update_rate_remark = #{updateRateRemark,jdbcType=VARCHAR},
</if>
<if
test=
"indexRemark != null"
>
index_remark = #{indexRemark,jdbcType=VARCHAR},
</if>
<if
test=
"show != null"
>
show = #{show,jdbcType=INTEGER},
</if>
<if
test=
"complement != null"
>
complement = #{complement,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"status != null"
>
status = #{status,jdbcType=INTEGER},
</if>
</set>
where index_id = #{indexId,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.cloud.entity.TabIndex"
>
update tab_index
set classify_type = #{classifyType,jdbcType=INTEGER},
classify_name = #{classifyName,jdbcType=VARCHAR},
is_app_index = #{isAppIndex,jdbcType=INTEGER},
rel_app_index = #{relAppIndex,jdbcType=VARCHAR},
code = #{code,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
index_level = #{indexLevel,jdbcType=INTEGER},
index_level_name = #{indexLevelName,jdbcType=VARCHAR},
rel_top_level = #{relTopLevel,jdbcType=VARCHAR},
unit_code = #{unitCode,jdbcType=INTEGER},
unit_name = #{unitName,jdbcType=VARCHAR},
decimal_size = #{decimalSize,jdbcType=INTEGER},
data_type = #{dataType,jdbcType=INTEGER},
index_type = #{indexType,jdbcType=INTEGER},
base_organized = #{baseOrganized,jdbcType=VARCHAR},
base_time = #{baseTime,jdbcType=VARCHAR},
update_rate = #{updateRate,jdbcType=VARCHAR},
update_rate_remark = #{updateRateRemark,jdbcType=VARCHAR},
index_remark = #{indexRemark,jdbcType=VARCHAR},
show = #{show,jdbcType=INTEGER},
complement = #{complement,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
status = #{status,jdbcType=INTEGER}
where index_id = #{indexId,jdbcType=INTEGER}
</update>
<select
id=
"getBySelective"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_index
where status = 1
<if
test=
"name != null "
>
and name = #{name}
</if>
<if
test=
"code != null "
>
and code = #{code}
</if>
<if
test=
"indexId != null "
>
and index_id
<>
#{indexId}
</if>
limit 1
</select>
<!-- classifyType-->
<!-- moduleId-->
<!-- isAppIndex-->
<!-- search-->
<select
id=
"listIndex"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_index
<where>
<if
test=
"classifyType != null "
>
and classify_type = #{classifyType}
</if>
<if
test=
"moduleId != null "
>
and module_id = #{moduleId}
</if>
<if
test=
"isAppIndex != null "
>
and is_app_index = #{isAppIndex}
</if>
<if
test=
"search != null and search != '' "
>
and name like concat('%', #{search}, '%')
</if>
</where>
</select>
</mapper>
\ No newline at end of file
gic-data-cloud-service/src/main/resources/mapper/TabIndexModuleRelMapper.xml
0 → 100644
View file @
5393ae65
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.gic.cloud.dao.mapper.TabIndexModuleRelMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.cloud.entity.TabIndexModuleRel"
>
<id
column=
"index_module_rel_id"
jdbcType=
"INTEGER"
property=
"indexModuleRelId"
/>
<result
column=
"type"
jdbcType=
"INTEGER"
property=
"type"
/>
<result
column=
"business_id"
jdbcType=
"INTEGER"
property=
"businessId"
/>
<result
column=
"module_id"
jdbcType=
"INTEGER"
property=
"moduleId"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"status"
jdbcType=
"INTEGER"
property=
"status"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
index_module_rel_id, type, business_id, module_id, create_time, update_time, status
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_index_module_rel
where index_module_rel_id = #{indexModuleRelId,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from tab_index_module_rel
where index_module_rel_id = #{indexModuleRelId,jdbcType=INTEGER}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.cloud.entity.TabIndexModuleRel"
>
insert into tab_index_module_rel (index_module_rel_id, type, business_id,
module_id, create_time, update_time,
status)
values (#{indexModuleRelId,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}, #{businessId,jdbcType=INTEGER},
#{moduleId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{status,jdbcType=INTEGER})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.cloud.entity.TabIndexModuleRel"
>
insert into tab_index_module_rel
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"indexModuleRelId != null"
>
index_module_rel_id,
</if>
<if
test=
"type != null"
>
type,
</if>
<if
test=
"businessId != null"
>
business_id,
</if>
<if
test=
"moduleId != null"
>
module_id,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"status != null"
>
status,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"indexModuleRelId != null"
>
#{indexModuleRelId,jdbcType=INTEGER},
</if>
<if
test=
"type != null"
>
#{type,jdbcType=INTEGER},
</if>
<if
test=
"businessId != null"
>
#{businessId,jdbcType=INTEGER},
</if>
<if
test=
"moduleId != null"
>
#{moduleId,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"status != null"
>
#{status,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.cloud.entity.TabIndexModuleRel"
>
update tab_index_module_rel
<set>
<if
test=
"type != null"
>
type = #{type,jdbcType=INTEGER},
</if>
<if
test=
"businessId != null"
>
business_id = #{businessId,jdbcType=INTEGER},
</if>
<if
test=
"moduleId != null"
>
module_id = #{moduleId,jdbcType=INTEGER},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"status != null"
>
status = #{status,jdbcType=INTEGER},
</if>
</set>
where index_module_rel_id = #{indexModuleRelId,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.cloud.entity.TabIndexModuleRel"
>
update tab_index_module_rel
set type = #{type,jdbcType=INTEGER},
business_id = #{businessId,jdbcType=INTEGER},
module_id = #{moduleId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
status = #{status,jdbcType=INTEGER}
where index_module_rel_id = #{indexModuleRelId,jdbcType=INTEGER}
</update>
<update
id=
"delByBusinessId"
>
update tab_index_module_rel set status = 0 where business_id = #{businessId} and type = #{type} and status = 1
</update>
<insert
id=
"insertSelectiveByNotExist"
>
INSERT INTO tab_index_module_rel (
`type`,
business_id,
module_id,
create_time,
update_time,
status
) SELECT
#{type},
#{busisessId},
#{moduleId},
#{createTime},
#{updateTime},
#{status}
FROM
DUAL
WHERE
NOT EXISTS (
SELECT
1
FROM
tab_index_module_rel tb
WHERE
tb.type = #{type}
AND tb.business_id = #{businessId}
AND tb.module_id = #{moduleId}
)
</insert>
<!-- void updateStatusByBusinessIds(@Param("businessId") Integer businessId, @Param("ids") List<Integer> moduleIdList, @Param("type") Integer type);-->
<update
id=
"updateStatusByBusinessIds"
>
update tab_index_module_rel set status = 1 where business_id = #{businessId} and `type` = #{type}
<if
test=
"null != ids and ids.size > 0"
>
and business_id in
<foreach
collection=
"ids"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</update>
<select
id=
"listModuleIdByIndexId"
resultType=
"int"
>
select
module_id
from tab_index_module_rel
where status = 1 and index_id = #{indexId}
</select>
<select
id=
"listIndexIdByModuleId"
resultType=
"int"
>
select
module_id
from tab_index_module_rel
where status = 1 and module_id = #{moduleId}
</select>
</mapper>
\ No newline at end of file
gic-data-cloud-service/src/main/resources/mapper/TabUpdateTipsMapper.xml
0 → 100644
View file @
5393ae65
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.gic.cloud.dao.mapper.TabUpdateTipsMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.cloud.entity.TabUpdateTips"
>
<id
column=
"update_tips_id"
jdbcType=
"INTEGER"
property=
"updateTipsId"
/>
<result
column=
"user_id"
jdbcType=
"INTEGER"
property=
"userId"
/>
<result
column=
"index_id"
jdbcType=
"INTEGER"
property=
"indexId"
/>
<result
column=
"show_status"
jdbcType=
"INTEGER"
property=
"showStatus"
/>
<result
column=
"type"
jdbcType=
"INTEGER"
property=
"type"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
update_tips_id, user_id, index_id, show_status, type
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_update_tips
where update_tips_id = #{updateTipsId,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from tab_update_tips
where update_tips_id = #{updateTipsId,jdbcType=INTEGER}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.cloud.entity.TabUpdateTips"
>
insert into tab_update_tips (update_tips_id, user_id, index_id,
show_status, type)
values (#{updateTipsId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{indexId,jdbcType=INTEGER},
#{showStatus,jdbcType=INTEGER}, #{type,jdbcType=INTEGER})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.cloud.entity.TabUpdateTips"
>
insert into tab_update_tips
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"updateTipsId != null"
>
update_tips_id,
</if>
<if
test=
"userId != null"
>
user_id,
</if>
<if
test=
"indexId != null"
>
index_id,
</if>
<if
test=
"showStatus != null"
>
show_status,
</if>
<if
test=
"type != null"
>
type,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"updateTipsId != null"
>
#{updateTipsId,jdbcType=INTEGER},
</if>
<if
test=
"userId != null"
>
#{userId,jdbcType=INTEGER},
</if>
<if
test=
"indexId != null"
>
#{indexId,jdbcType=INTEGER},
</if>
<if
test=
"showStatus != null"
>
#{showStatus,jdbcType=INTEGER},
</if>
<if
test=
"type != null"
>
#{type,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.cloud.entity.TabUpdateTips"
>
update tab_update_tips
<set>
<if
test=
"userId != null"
>
user_id = #{userId,jdbcType=INTEGER},
</if>
<if
test=
"indexId != null"
>
index_id = #{indexId,jdbcType=INTEGER},
</if>
<if
test=
"showStatus != null"
>
show_status = #{showStatus,jdbcType=INTEGER},
</if>
<if
test=
"type != null"
>
type = #{type,jdbcType=INTEGER},
</if>
</set>
where update_tips_id = #{updateTipsId,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.cloud.entity.TabUpdateTips"
>
update tab_update_tips
set user_id = #{userId,jdbcType=INTEGER},
index_id = #{indexId,jdbcType=INTEGER},
show_status = #{showStatus,jdbcType=INTEGER},
type = #{type,jdbcType=INTEGER}
where update_tips_id = #{updateTipsId,jdbcType=INTEGER}
</update>
</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