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
f41c9e18
Commit
f41c9e18
authored
Jul 21, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
2e7eafd0
29c53ed1
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
453 additions
and
1 deletions
+453
-1
StoreAttentionApiService.java
.../java/com/gic/cloud/service/StoreAttentionApiService.java
+4
-0
IndexController.java
...m/gic/cloud/operation/web/controller/IndexController.java
+2
-1
IndexVO.java
...src/main/java/com/gic/cloud/operation/web/vo/IndexVO.java
+386
-0
StoreAttentionApiServiceImpl.java
...loud/service/outer/impl/StoreAttentionApiServiceImpl.java
+17
-0
StoreWidgetController.java
...a/com/gic/cloud/web/controller/StoreWidgetController.java
+8
-0
StoreGroupItemsVo.java
...src/main/java/com/gic/cloud/web/vo/StoreGroupItemsVo.java
+9
-0
StoreSearchVo.java
...app/src/main/java/com/gic/cloud/web/vo/StoreSearchVo.java
+27
-0
No files found.
gic-data-cloud-api/src/main/java/com/gic/cloud/service/StoreAttentionApiService.java
View file @
f41c9e18
...
...
@@ -4,10 +4,14 @@ import com.gic.api.base.commons.Page;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.cloud.dto.AttentionStoreDTO
;
import
java.util.Map
;
public
interface
StoreAttentionApiService
{
ServiceResponse
addStoreAttenttion
(
Integer
userId
,
Integer
enterpriseId
,
Integer
storeId
);
ServiceResponse
removeStoreAttenttion
(
Integer
enterpriseId
,
Integer
userId
,
String
storeIds
);
ServiceResponse
<
Page
<
AttentionStoreDTO
>>
pageStoreAttention
(
Integer
userId
,
Integer
enterpriseId
,
Integer
pageNum
,
Integer
pageSize
);
ServiceResponse
<
Map
<
Integer
,
AttentionStoreDTO
>>
getAllAttenttionStore
(
Integer
userId
,
Integer
enterpriseId
);
}
gic-data-cloud-operation-web/src/main/java/com/gic/cloud/operation/web/controller/IndexController.java
View file @
f41c9e18
...
...
@@ -8,6 +8,7 @@ import com.gic.authcenter.security.core.util.UserUtils;
import
com.gic.cloud.constants.IndexTypeEnum
;
import
com.gic.cloud.dto.IndexDTO
;
import
com.gic.cloud.dto.IndexLogDTO
;
import
com.gic.cloud.operation.web.vo.IndexVO
;
import
com.gic.cloud.qo.IndexQO
;
import
com.gic.cloud.service.IndexApiService
;
import
com.gic.cloud.service.IndexLogApiService
;
...
...
@@ -74,7 +75,7 @@ public class IndexController {
@RequestMapping
(
"/get-by-index-id"
)
public
RestResponse
getByIndexId
(
Integer
indexId
)
{
ServiceResponse
<
IndexDTO
>
serviceResponse
=
indexApiService
.
getByIndexId
(
indexId
);
return
ResultControllerUtils
.
commonResult
(
serviceResponse
);
return
ResultControllerUtils
.
commonResult
One
(
serviceResponse
,
IndexVO
.
class
);
}
@RequestMapping
(
"/list-index"
)
...
...
gic-data-cloud-operation-web/src/main/java/com/gic/cloud/operation/web/vo/IndexVO.java
0 → 100644
View file @
f41c9e18
package
com
.
gic
.
cloud
.
operation
.
web
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
/**
* @author zhiwj
* @Description:
* @date 2020-07-20 10:56
*/
public
class
IndexVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
5687670215343610800L
;
/**
* 指标id
*/
private
Integer
indexId
;
/**
* 分类类型 1指标 2维度 3说明
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Integer
classifyType
;
/**
* 分类名
*/
private
String
classifyName
;
/**
* 是否应用指标 1是 0否
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Integer
isAppIndex
;
/**
* 关联应用指标
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
String
relAppIndex
;
/**
*
*/
private
String
code
;
/**
*
*/
private
String
name
;
/**
* 指标级别
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Integer
indexLevel
;
/**
* 指标级别
*/
private
String
indexLevelName
;
/**
* 关联一级指标 ‘,’ 隔开
*/
private
String
relTopLevel
;
/**
* 单位
*/
private
Integer
unitCode
;
/**
* 单位
*/
private
String
unitName
;
/**
* 小数位数
*/
private
Integer
decimalSize
;
/**
* 数据类型 1流量 2存量
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Integer
dataType
;
/**
* 指标类型 1基础 2计算
*/
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
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
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
)
private
Integer
showStatus
;
private
List
<
String
>
relModuleIdList
;
/**
* 操作人id
*/
private
Integer
optUserId
;
/**
* 操作人name
*/
private
String
optUserName
;
private
Integer
indexGroupId
;
private
String
indexGroupName
;
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
<
String
>
getRelModuleIdList
()
{
return
relModuleIdList
;
}
public
void
setRelModuleIdList
(
List
<
String
>
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
;
}
public
Integer
getShowStatus
()
{
return
showStatus
;
}
public
void
setShowStatus
(
Integer
showStatus
)
{
this
.
showStatus
=
showStatus
;
}
public
Integer
getIndexGroupId
()
{
return
indexGroupId
;
}
public
void
setIndexGroupId
(
Integer
indexGroupId
)
{
this
.
indexGroupId
=
indexGroupId
;
}
public
String
getIndexGroupName
()
{
return
indexGroupName
;
}
public
void
setIndexGroupName
(
String
indexGroupName
)
{
this
.
indexGroupName
=
indexGroupName
;
}
}
gic-data-cloud-service/src/main/java/com/gic/cloud/service/outer/impl/StoreAttentionApiServiceImpl.java
View file @
f41c9e18
...
...
@@ -9,9 +9,14 @@ import com.gic.cloud.service.StoreAttenttionService;
import
com.gic.commons.util.PageHelperUtils
;
import
com.github.pagehelper.PageHelper
;
import
com.google.inject.internal.asm.
$AnnotationVisitor
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@Service
(
"storeAttentionApiService"
)
public
class
StoreAttentionApiServiceImpl
implements
StoreAttentionApiService
{
@Autowired
...
...
@@ -39,4 +44,16 @@ public class StoreAttentionApiServiceImpl implements StoreAttentionApiService {
com
.
github
.
pagehelper
.
Page
<
TabAttentionStore
>
storePage
=
this
.
storeAttenttionService
.
pageStoreAttention
(
userId
,
enterpriseId
);
return
ServiceResponse
.
success
(
PageHelperUtils
.
changePageHelperToCurrentPage
(
storePage
,
AttentionStoreDTO
.
class
));
}
@Override
public
ServiceResponse
<
Map
<
Integer
,
AttentionStoreDTO
>>
getAllAttenttionStore
(
Integer
userId
,
Integer
enterpriseId
)
{
List
<
AttentionStoreDTO
>
result
=
this
.
pageStoreAttention
(
userId
,
enterpriseId
,
1
,
Integer
.
MAX_VALUE
).
getResult
().
getResult
();
Map
<
Integer
,
AttentionStoreDTO
>
map
=
new
HashMap
<>();
if
(
CollectionUtils
.
isNotEmpty
(
result
)){
for
(
AttentionStoreDTO
storeDTO
:
result
){
map
.
put
(
storeDTO
.
getStoreId
(),
storeDTO
);
}
}
return
ServiceResponse
.
success
(
map
);
}
}
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/controller/StoreWidgetController.java
View file @
f41c9e18
...
...
@@ -131,6 +131,7 @@ public class StoreWidgetController {
storeSearchDTO
.
setStoreGroupId
(
parentId
);
storeSearchDTO
.
setStoreResource
(
Long
.
valueOf
(
storeAuth
.
getStoreWidgetId
()));
ServiceResponse
<
Page
<
StoreDTO
>>
response
=
this
.
storeApiService
.
listStore
(
storeSearchDTO
,
pageNum
,
pageSize
);
Map
<
Integer
,
AttentionStoreDTO
>
result
=
this
.
storeAttentionApiService
.
getAllAttenttionStore
(
userId
,
enterpriseId
).
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
response
.
getResult
().
getResult
())){
for
(
StoreDTO
dto
:
response
.
getResult
().
getResult
()){
StoreGroupItemsVo
itemsVo
=
new
StoreGroupItemsVo
();
...
...
@@ -139,6 +140,7 @@ public class StoreWidgetController {
itemsVo
.
setIsStore
(
1
);
itemsVo
.
setIdChain
(
map
.
get
(
dto
.
getStoreGroupId
()).
getIdChain
()
+
dto
.
getStoreInfoId
()
+
"_"
);
itemsVo
.
setNameChain
(
map
.
get
(
dto
.
getStoreGroupId
()).
getNameChain
()
+
dto
.
getStoreName
()
+
"/"
);
itemsVo
.
setHasAttention
(
result
.
get
(
dto
.
getStoreInfoId
())
==
null
?
0
:
1
);
items
.
add
(
itemsVo
);
}
groupVoPage
.
setTotalCount
(
response
.
getResult
().
getTotalCount
());
...
...
@@ -285,6 +287,7 @@ public class StoreWidgetController {
storeSearchDTO
.
setEnterpriseId
(
enterpriseId
);
storeSearchDTO
.
setStoreInfoIds
(
StringUtils
.
join
(
storeAuth
.
getStoreInfoIdList
(),
" "
));
Page
<
StoreDTO
>
result
=
this
.
storeApiService
.
listStore
(
storeSearchDTO
,
pageNum
,
pageSize
).
getResult
();
Map
<
Integer
,
AttentionStoreDTO
>
attentionStoreDTOMap
=
this
.
storeAttentionApiService
.
getAllAttenttionStore
(
userId
,
enterpriseId
).
getResult
();
page
.
setTotalCount
(
result
.
getTotalCount
());
page
.
setTotalPage
(
result
.
getTotalPage
());
if
(
CollectionUtils
.
isNotEmpty
(
result
.
getResult
())){
...
...
@@ -295,6 +298,7 @@ public class StoreWidgetController {
searchVo
.
setName
(
storeDTO
.
getStoreName
());
searchVo
.
setIdChain
(
map
.
get
(
storeDTO
.
getStoreGroupId
()).
getIdChain
()
+
storeDTO
.
getStoreInfoId
()+
"_"
);
searchVo
.
setNameChain
(
map
.
get
(
storeDTO
.
getStoreGroupId
()).
getNameChain
()
+
storeDTO
.
getStoreName
()
+
"/"
);
searchVo
.
setHasAttention
(
attentionStoreDTOMap
.
get
(
storeDTO
.
getStoreInfoId
())
==
null
?
0
:
1
);
storeSearchVoList
.
add
(
searchVo
);
}
page
.
setResult
(
storeSearchVoList
);
...
...
@@ -315,6 +319,8 @@ public class StoreWidgetController {
storeSearchVo
.
setId
(
dto
.
getId
().
toString
());
storeSearchVo
.
setName
(
dto
.
getName
());
storeSearchVo
.
setDesc
(
StoreChannelEnum
.
GICMALL
.
getMessage
());
storeSearchVo
.
setNameChain
(
StoreChannelEnum
.
GICMALL
.
getMessage
());
storeSearchVo
.
setChannel
(
StoreChannelEnum
.
GICMALL
.
getChannel
());
list
.
add
(
storeSearchVo
);
}
}
...
...
@@ -329,6 +335,8 @@ public class StoreWidgetController {
storeSearchVo
.
setId
(
wmStoreDTO
.
getWmStoreId
());
storeSearchVo
.
setName
(
wmStoreDTO
.
getWmMainAccount
());
storeSearchVo
.
setDesc
(
StoreChannelEnum
.
WMMALL
.
getMessage
());
storeSearchVo
.
setNameChain
(
StoreChannelEnum
.
GICMALL
.
getMessage
());
storeSearchVo
.
setChannel
(
StoreChannelEnum
.
GICMALL
.
getChannel
());
list
.
add
(
storeSearchVo
);
}
}
...
...
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/vo/StoreGroupItemsVo.java
View file @
f41c9e18
...
...
@@ -7,6 +7,7 @@ public class StoreGroupItemsVo {
private
String
nameChain
;
private
Integer
isStore
=
0
;
private
Integer
hasChildren
=
0
;
private
Integer
hasAttention
=
0
;
public
Integer
getId
()
{
return
id
;
...
...
@@ -55,4 +56,12 @@ public class StoreGroupItemsVo {
public
void
setNameChain
(
String
nameChain
)
{
this
.
nameChain
=
nameChain
;
}
public
Integer
getHasAttention
()
{
return
hasAttention
;
}
public
void
setHasAttention
(
Integer
hasAttention
)
{
this
.
hasAttention
=
hasAttention
;
}
}
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/vo/StoreSearchVo.java
View file @
f41c9e18
...
...
@@ -6,6 +6,9 @@ public class StoreSearchVo {
private
String
desc
;
private
String
idChain
;
private
String
nameChain
;
private
Integer
channel
;
private
Integer
hasAttention
=
0
;
private
Integer
hasChildren
=
0
;
public
String
getId
()
{
return
id
;
...
...
@@ -46,4 +49,28 @@ public class StoreSearchVo {
public
void
setNameChain
(
String
nameChain
)
{
this
.
nameChain
=
nameChain
;
}
public
Integer
getChannel
()
{
return
channel
;
}
public
void
setChannel
(
Integer
channel
)
{
this
.
channel
=
channel
;
}
public
Integer
getHasAttention
()
{
return
hasAttention
;
}
public
void
setHasAttention
(
Integer
hasAttention
)
{
this
.
hasAttention
=
hasAttention
;
}
public
Integer
getHasChildren
()
{
return
hasChildren
;
}
public
void
setHasChildren
(
Integer
hasChildren
)
{
this
.
hasChildren
=
hasChildren
;
}
}
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