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
64dce82a
Commit
64dce82a
authored
Jul 15, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
观云台小程序
parent
f567309b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
917 additions
and
10 deletions
+917
-10
AttentionStoreDTO.java
...pi/src/main/java/com/gic/cloud/dto/AttentionStoreDTO.java
+101
-0
TestDTO.java
...ta-cloud-api/src/main/java/com/gic/cloud/dto/TestDTO.java
+0
-4
StoreAttentionApiService.java
.../java/com/gic/cloud/service/StoreAttentionApiService.java
+13
-0
TabAttentionStoreMapper.java
...ava/com/gic/cloud/dao/mapper/TabAttentionStoreMapper.java
+58
-0
TestMapper.java
...ce/src/main/java/com/gic/cloud/dao/mapper/TestMapper.java
+0
-4
TabAttentionStore.java
...src/main/java/com/gic/cloud/entity/TabAttentionStore.java
+100
-0
StoreAttenttionService.java
...in/java/com/gic/cloud/service/StoreAttenttionService.java
+12
-0
StoreAttentionServiceImpl.java
...com/gic/cloud/service/impl/StoreAttentionServiceImpl.java
+37
-0
StoreAttentionApiServiceImpl.java
...loud/service/outer/impl/StoreAttentionApiServiceImpl.java
+42
-0
dubbo-gic-data-cloud-service.xml
...rvice/src/main/resources/dubbo-gic-data-cloud-service.xml
+1
-0
TabAttentionStoreMapper.xml
...ice/src/main/resources/mapper/TabAttentionStoreMapper.xml
+124
-0
DataAuthUtils.java
...p/src/main/java/com/gic/cloud/web/auth/DataAuthUtils.java
+48
-1
OnLineAuth.java
...xapp/src/main/java/com/gic/cloud/web/auth/OnLineAuth.java
+24
-0
OnLineStore.java
...app/src/main/java/com/gic/cloud/web/auth/OnLineStore.java
+24
-0
StoreAuth.java
...wxapp/src/main/java/com/gic/cloud/web/auth/StoreAuth.java
+33
-0
StoreChannelEnum.java
...ain/java/com/gic/cloud/web/constant/StoreChannelEnum.java
+32
-0
StoreAttentionController.java
...om/gic/cloud/web/controller/StoreAttentionController.java
+54
-0
StoreWidgetController.java
...a/com/gic/cloud/web/controller/StoreWidgetController.java
+0
-0
IndexItemVo.java
...wxapp/src/main/java/com/gic/cloud/web/vo/IndexItemVo.java
+9
-0
OnLineStoreVo.java
...app/src/main/java/com/gic/cloud/web/vo/OnLineStoreVo.java
+22
-0
StoreAttenttionVo.java
...src/main/java/com/gic/cloud/web/vo/StoreAttenttionVo.java
+31
-0
StoreGroupItemsVo.java
...src/main/java/com/gic/cloud/web/vo/StoreGroupItemsVo.java
+40
-0
StoreGroupVo.java
...xapp/src/main/java/com/gic/cloud/web/vo/StoreGroupVo.java
+16
-0
StoreSearchVo.java
...app/src/main/java/com/gic/cloud/web/vo/StoreSearchVo.java
+31
-0
StoreTypeVo.java
...wxapp/src/main/java/com/gic/cloud/web/vo/StoreTypeVo.java
+22
-0
StoreWidgetIndexVo.java
...rc/main/java/com/gic/cloud/web/vo/StoreWidgetIndexVo.java
+10
-1
StoreWidgetItemVo.java
...src/main/java/com/gic/cloud/web/vo/StoreWidgetItemVo.java
+31
-0
dubbo-gic-data-cloud-wxapp.xml
...d-wxapp/src/main/resources/dubbo-gic-data-cloud-wxapp.xml
+2
-0
No files found.
gic-data-cloud-api/src/main/java/com/gic/cloud/dto/AttentionStoreDTO.java
0 → 100644
View file @
64dce82a
package
com
.
gic
.
cloud
.
dto
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* tab_attention_store
*/
public
class
AttentionStoreDTO
implements
Serializable
{
/**
*
*/
private
Integer
attentionId
;
/**
*
*/
private
Integer
storeId
;
/**
*
*/
private
Integer
userId
;
/**
*
*/
private
Integer
enterpriseId
;
/**
*
*/
private
Integer
status
;
/**
*
*/
private
Date
createTime
;
/**
*
*/
private
Date
updateTime
;
public
Integer
getAttentionId
()
{
return
attentionId
;
}
public
void
setAttentionId
(
Integer
attentionId
)
{
this
.
attentionId
=
attentionId
;
}
public
Integer
getStoreId
()
{
return
storeId
;
}
public
void
setStoreId
(
Integer
storeId
)
{
this
.
storeId
=
storeId
;
}
public
Integer
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
Integer
userId
)
{
this
.
userId
=
userId
;
}
public
Integer
getEnterpriseId
()
{
return
enterpriseId
;
}
public
void
setEnterpriseId
(
Integer
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
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
;
}
}
\ No newline at end of file
gic-data-cloud-api/src/main/java/com/gic/cloud/dto/TestDTO.java
deleted
100644 → 0
View file @
f567309b
package
com
.
gic
.
cloud
.
dto
;
public
class
TestDTO
{
}
gic-data-cloud-api/src/main/java/com/gic/cloud/service/StoreAttentionApiService.java
0 → 100644
View file @
64dce82a
package
com
.
gic
.
cloud
.
service
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.cloud.dto.AttentionStoreDTO
;
public
interface
StoreAttentionApiService
{
ServiceResponse
addStoreAttenttion
(
Integer
userId
,
Integer
enterpriseId
,
Integer
storeId
);
ServiceResponse
removeStoreAttenttion
(
Integer
attentionId
);
ServiceResponse
<
Page
<
AttentionStoreDTO
>>
pageStoreAttention
(
Integer
userId
,
Integer
enterpriseId
,
Integer
pageNum
,
Integer
pageSize
);
}
gic-data-cloud-service/src/main/java/com/gic/cloud/dao/mapper/TabAttentionStoreMapper.java
0 → 100644
View file @
64dce82a
package
com
.
gic
.
cloud
.
dao
.
mapper
;
import
com.gic.cloud.entity.TabAttentionStore
;
import
com.github.pagehelper.Page
;
import
org.apache.ibatis.annotations.Param
;
public
interface
TabAttentionStoreMapper
{
/**
* 根据主键删除
*
* @param attentionId 主键
* @return 更新条目数
*/
int
deleteByPrimaryKey
(
Integer
attentionId
);
/**
* 插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
insert
(
TabAttentionStore
record
);
/**
* 动态插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
insertSelective
(
TabAttentionStore
record
);
/**
* 根据主键查询
*
* @param attentionId 主键
* @return 实体对象
*/
TabAttentionStore
selectByPrimaryKey
(
Integer
attentionId
);
/**
* 根据主键动态更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
updateByPrimaryKeySelective
(
TabAttentionStore
record
);
/**
* 根据主键更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
updateByPrimaryKey
(
TabAttentionStore
record
);
Page
<
TabAttentionStore
>
pageStoreAttention
(
@Param
(
"userId"
)
Integer
userId
,
@Param
(
"enterpriseId"
)
Integer
enterpriseId
);
}
\ No newline at end of file
gic-data-cloud-service/src/main/java/com/gic/cloud/dao/mapper/TestMapper.java
deleted
100644 → 0
View file @
f567309b
package
com
.
gic
.
cloud
.
dao
.
mapper
;
public
class
TestMapper
{
}
gic-data-cloud-service/src/main/java/com/gic/cloud/entity/TabAttentionStore.java
0 → 100644
View file @
64dce82a
package
com
.
gic
.
cloud
.
entity
;
import
java.util.Date
;
/**
* tab_attention_store
*/
public
class
TabAttentionStore
{
/**
*
*/
private
Integer
attentionId
;
/**
*
*/
private
Integer
storeId
;
/**
*
*/
private
Integer
userId
;
/**
*
*/
private
Integer
enterpriseId
;
/**
*
*/
private
Integer
status
;
/**
*
*/
private
Date
createTime
;
/**
*
*/
private
Date
updateTime
;
public
Integer
getAttentionId
()
{
return
attentionId
;
}
public
void
setAttentionId
(
Integer
attentionId
)
{
this
.
attentionId
=
attentionId
;
}
public
Integer
getStoreId
()
{
return
storeId
;
}
public
void
setStoreId
(
Integer
storeId
)
{
this
.
storeId
=
storeId
;
}
public
Integer
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
Integer
userId
)
{
this
.
userId
=
userId
;
}
public
Integer
getEnterpriseId
()
{
return
enterpriseId
;
}
public
void
setEnterpriseId
(
Integer
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
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
;
}
}
\ No newline at end of file
gic-data-cloud-service/src/main/java/com/gic/cloud/service/StoreAttenttionService.java
0 → 100644
View file @
64dce82a
package
com
.
gic
.
cloud
.
service
;
import
com.gic.cloud.entity.TabAttentionStore
;
import
com.github.pagehelper.Page
;
public
interface
StoreAttenttionService
{
int
addStoreAttenttion
(
TabAttentionStore
tabAttentionStore
);
int
removeStoreAttenttion
(
Integer
attentionId
);
Page
<
TabAttentionStore
>
pageStoreAttention
(
Integer
userId
,
Integer
enterpriseId
);
}
gic-data-cloud-service/src/main/java/com/gic/cloud/service/impl/StoreAttentionServiceImpl.java
0 → 100644
View file @
64dce82a
package
com
.
gic
.
cloud
.
service
.
impl
;
import
com.gic.cloud.dao.mapper.TabAttentionStoreMapper
;
import
com.gic.cloud.entity.TabAttentionStore
;
import
com.gic.cloud.service.StoreAttenttionService
;
import
com.github.pagehelper.Page
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
@Service
(
"storeAttenttionService"
)
public
class
StoreAttentionServiceImpl
implements
StoreAttenttionService
{
@Autowired
private
TabAttentionStoreMapper
tabAttentionStoreMapper
;
@Override
public
int
addStoreAttenttion
(
TabAttentionStore
tabAttentionStore
)
{
tabAttentionStore
.
setCreateTime
(
new
Date
());
tabAttentionStore
.
setUpdateTime
(
new
Date
());
tabAttentionStore
.
setStatus
(
1
);
int
i
=
this
.
tabAttentionStoreMapper
.
insertSelective
(
tabAttentionStore
);
return
i
;
}
@Override
public
int
removeStoreAttenttion
(
Integer
attentionId
)
{
TabAttentionStore
tabAttentionStore
=
this
.
tabAttentionStoreMapper
.
selectByPrimaryKey
(
attentionId
);
tabAttentionStore
.
setStatus
(
0
);
int
i
=
this
.
tabAttentionStoreMapper
.
updateByPrimaryKey
(
tabAttentionStore
);
return
i
;
}
@Override
public
Page
<
TabAttentionStore
>
pageStoreAttention
(
Integer
userId
,
Integer
enterpriseId
)
{
return
this
.
tabAttentionStoreMapper
.
pageStoreAttention
(
userId
,
enterpriseId
);
}
}
gic-data-cloud-service/src/main/java/com/gic/cloud/service/outer/impl/StoreAttentionApiServiceImpl.java
0 → 100644
View file @
64dce82a
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.AttentionStoreDTO
;
import
com.gic.cloud.entity.TabAttentionStore
;
import
com.gic.cloud.service.StoreAttentionApiService
;
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.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
@Service
(
"storeAttentionApiService"
)
public
class
StoreAttentionApiServiceImpl
implements
StoreAttentionApiService
{
@Autowired
private
StoreAttenttionService
storeAttenttionService
;
@Override
public
ServiceResponse
addStoreAttenttion
(
Integer
userId
,
Integer
enterpriseId
,
Integer
storeId
)
{
TabAttentionStore
store
=
new
TabAttentionStore
();
store
.
setUserId
(
userId
);
store
.
setEnterpriseId
(
enterpriseId
);
store
.
setStoreId
(
storeId
);
this
.
storeAttenttionService
.
addStoreAttenttion
(
store
);
return
ServiceResponse
.
success
();
}
@Override
public
ServiceResponse
removeStoreAttenttion
(
Integer
attentionId
)
{
this
.
storeAttenttionService
.
removeStoreAttenttion
(
attentionId
);
return
ServiceResponse
.
success
();
}
@Override
public
ServiceResponse
<
Page
<
AttentionStoreDTO
>>
pageStoreAttention
(
Integer
userId
,
Integer
enterpriseId
,
Integer
pageNum
,
Integer
pageSize
)
{
PageHelper
.
startPage
(
pageNum
,
pageSize
);
com
.
github
.
pagehelper
.
Page
<
TabAttentionStore
>
storePage
=
this
.
storeAttenttionService
.
pageStoreAttention
(
userId
,
enterpriseId
);
return
ServiceResponse
.
success
(
PageHelperUtils
.
changePageHelperToCurrentPage
(
storePage
,
AttentionStoreDTO
.
class
));
}
}
gic-data-cloud-service/src/main/resources/dubbo-gic-data-cloud-service.xml
View file @
64dce82a
...
@@ -25,4 +25,5 @@
...
@@ -25,4 +25,5 @@
<dubbo:service
interface=
"com.gic.cloud.service.IndexLogApiService"
ref=
"indexLogApiService"
timeout=
"6000"
/>
<dubbo:service
interface=
"com.gic.cloud.service.IndexLogApiService"
ref=
"indexLogApiService"
timeout=
"6000"
/>
<dubbo:service
interface=
"com.gic.cloud.service.TempStoreConditionApiService"
ref=
"tempStoreConditionApiService"
timeout=
"6000"
/>
<dubbo:service
interface=
"com.gic.cloud.service.TempStoreConditionApiService"
ref=
"tempStoreConditionApiService"
timeout=
"6000"
/>
<dubbo:service
interface=
"com.gic.cloud.service.IndexGroupApiService"
ref=
"indexGroupApiService"
timeout=
"6000"
/>
<dubbo:service
interface=
"com.gic.cloud.service.IndexGroupApiService"
ref=
"indexGroupApiService"
timeout=
"6000"
/>
<dubbo:service
interface=
"com.gic.cloud.service.StoreAttentionApiService"
ref=
"storeAttentionApiService"
timeout=
"6000"
/>
</beans>
</beans>
gic-data-cloud-service/src/main/resources/mapper/TabAttentionStoreMapper.xml
0 → 100644
View file @
64dce82a
<?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.TabAttentionStoreMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.cloud.entity.TabAttentionStore"
>
<id
column=
"attention_id"
jdbcType=
"INTEGER"
property=
"attentionId"
/>
<result
column=
"store_id"
jdbcType=
"INTEGER"
property=
"storeId"
/>
<result
column=
"user_id"
jdbcType=
"INTEGER"
property=
"userId"
/>
<result
column=
"enterprise_id"
jdbcType=
"INTEGER"
property=
"enterpriseId"
/>
<result
column=
"status"
jdbcType=
"INTEGER"
property=
"status"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
attention_id, store_id, user_id, enterprise_id, status, create_time, update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_attention_store
where attention_id = #{attentionId,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from tab_attention_store
where attention_id = #{attentionId,jdbcType=INTEGER}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.cloud.entity.TabAttentionStore"
>
insert into tab_attention_store (attention_id, store_id, user_id,
enterprise_id, status, create_time,
update_time)
values (#{attentionId,jdbcType=INTEGER}, #{storeId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER},
#{enterpriseId,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.cloud.entity.TabAttentionStore"
>
insert into tab_attention_store
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"attentionId != null"
>
attention_id,
</if>
<if
test=
"storeId != null"
>
store_id,
</if>
<if
test=
"userId != null"
>
user_id,
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id,
</if>
<if
test=
"status != null"
>
status,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"attentionId != null"
>
#{attentionId,jdbcType=INTEGER},
</if>
<if
test=
"storeId != null"
>
#{storeId,jdbcType=INTEGER},
</if>
<if
test=
"userId != null"
>
#{userId,jdbcType=INTEGER},
</if>
<if
test=
"enterpriseId != null"
>
#{enterpriseId,jdbcType=INTEGER},
</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>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.cloud.entity.TabAttentionStore"
>
update tab_attention_store
<set>
<if
test=
"storeId != null"
>
store_id = #{storeId,jdbcType=INTEGER},
</if>
<if
test=
"userId != null"
>
user_id = #{userId,jdbcType=INTEGER},
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</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>
</set>
where attention_id = #{attentionId,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.cloud.entity.TabAttentionStore"
>
update tab_attention_store
set store_id = #{storeId,jdbcType=INTEGER},
user_id = #{userId,jdbcType=INTEGER},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where attention_id = #{attentionId,jdbcType=INTEGER}
</update>
<select
id=
"pageStoreAttention"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_attention_store
where status = 1 and user_id = #{userId} and enterprise_id = #{enterpriseId} order by create_time desc
</select>
</mapper>
\ No newline at end of file
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/auth/DataAuthUtils.java
View file @
64dce82a
package
com
.
gic
.
cloud
.
web
.
auth
;
package
com
.
gic
.
cloud
.
web
.
auth
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.cloud.dto.DataAuthDTO
;
import
com.gic.cloud.dto.DataAuthDTO
;
import
com.gic.cloud.service.DataAuthApiService
;
import
com.gic.cloud.service.DataAuthApiService
;
import
com.gic.store.service.StoreWidgetApiService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.util.ArrayList
;
import
java.util.List
;
@Component
@Component
public
class
DataAuthUtils
{
public
class
DataAuthUtils
{
private
static
final
Logger
log
=
LogManager
.
getLogger
(
DataAuthUtils
.
class
);
private
static
final
Logger
log
=
LogManager
.
getLogger
(
DataAuthUtils
.
class
);
@Autowired
@Autowired
private
DataAuthApiService
dataAuthApiService
;
private
DataAuthApiService
dataAuthApiService
;
@Autowired
private
StoreWidgetApiService
storeWidgetApiService
;
public
void
getUser
Auth
(
Integer
userId
,
Integer
enterpriseId
){
public
StoreAuth
getStore
Auth
(
Integer
userId
,
Integer
enterpriseId
){
ServiceResponse
<
DataAuthDTO
>
response
=
this
.
dataAuthApiService
.
ggetDataAuthByUserId
(
enterpriseId
,
userId
);
ServiceResponse
<
DataAuthDTO
>
response
=
this
.
dataAuthApiService
.
ggetDataAuthByUserId
(
enterpriseId
,
userId
);
StoreAuth
storeAuth
=
new
StoreAuth
();
if
(
response
.
isSuccess
()){
if
(
response
.
isSuccess
()){
storeAuth
.
setHasAuth
(
true
);
DataAuthDTO
dataAuthDTO
=
response
.
getResult
();
DataAuthDTO
dataAuthDTO
=
response
.
getResult
();
Integer
storeWidgetId
=
dataAuthDTO
.
getStoreWidgetId
();
if
(
storeWidgetId
!=
null
){
List
<
Integer
>
storeInfoIdList
=
this
.
storeWidgetApiService
.
listStoreInfoIdByStoreWidgetId
(
enterpriseId
,
storeWidgetId
).
getResult
();
storeAuth
.
setStoreInfoIdList
(
storeInfoIdList
);
storeAuth
.
setStoreWidgetId
(
storeWidgetId
);
}
else
{
storeAuth
.
setStoreInfoIdList
(
new
ArrayList
<>());
}
}
}
return
storeAuth
;
}
}
public
OnLineAuth
getOnlineStore
(
Integer
userId
,
Integer
enterpriseId
){
ServiceResponse
<
DataAuthDTO
>
response
=
this
.
dataAuthApiService
.
ggetDataAuthByUserId
(
enterpriseId
,
userId
);
OnLineAuth
onLineAuth
=
new
OnLineAuth
();
if
(
response
.
isSuccess
()){
DataAuthDTO
dataAuthDTO
=
response
.
getResult
();
String
onlinePerformance
=
dataAuthDTO
.
getOnlinePerformance
();
if
(
StringUtils
.
isNotBlank
(
onlinePerformance
)){
onLineAuth
.
setHasAuth
(
true
);
JSONArray
array
=
JSON
.
parseArray
(
onlinePerformance
);
List
<
OnLineStore
>
list
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
array
.
size
();
i
++){
JSONObject
jsonObject
=
array
.
getJSONObject
(
i
);
OnLineStore
onLineStore
=
new
OnLineStore
();
onLineStore
.
setChannel
(
jsonObject
.
getInteger
(
"channel"
));
onLineStore
.
setStoreIdList
(
JSONArray
.
parseArray
(
jsonObject
.
getJSONArray
(
"storeContent"
).
toJSONString
(),
String
.
class
));
list
.
add
(
onLineStore
);
}
onLineAuth
.
setList
(
list
);
}
}
return
onLineAuth
;
}
}
}
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/auth/OnLineAuth.java
0 → 100644
View file @
64dce82a
package
com
.
gic
.
cloud
.
web
.
auth
;
import
java.util.List
;
public
class
OnLineAuth
{
private
boolean
hasAuth
=
false
;
private
List
<
OnLineStore
>
list
;
public
boolean
isHasAuth
()
{
return
hasAuth
;
}
public
void
setHasAuth
(
boolean
hasAuth
)
{
this
.
hasAuth
=
hasAuth
;
}
public
List
<
OnLineStore
>
getList
()
{
return
list
;
}
public
void
setList
(
List
<
OnLineStore
>
list
)
{
this
.
list
=
list
;
}
}
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/auth/OnLineStore.java
0 → 100644
View file @
64dce82a
package
com
.
gic
.
cloud
.
web
.
auth
;
import
java.util.List
;
public
class
OnLineStore
{
private
Integer
channel
;
private
List
<
String
>
storeIdList
;
public
Integer
getChannel
()
{
return
channel
;
}
public
void
setChannel
(
Integer
channel
)
{
this
.
channel
=
channel
;
}
public
List
<
String
>
getStoreIdList
()
{
return
storeIdList
;
}
public
void
setStoreIdList
(
List
<
String
>
storeIdList
)
{
this
.
storeIdList
=
storeIdList
;
}
}
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/auth/StoreAuth.java
0 → 100644
View file @
64dce82a
package
com
.
gic
.
cloud
.
web
.
auth
;
import
java.util.List
;
public
class
StoreAuth
{
private
boolean
hasAuth
=
false
;
private
List
<
Integer
>
storeInfoIdList
;
private
Integer
storeWidgetId
;
public
boolean
isHasAuth
()
{
return
hasAuth
;
}
public
void
setHasAuth
(
boolean
hasAuth
)
{
this
.
hasAuth
=
hasAuth
;
}
public
List
<
Integer
>
getStoreInfoIdList
()
{
return
storeInfoIdList
;
}
public
void
setStoreInfoIdList
(
List
<
Integer
>
storeInfoIdList
)
{
this
.
storeInfoIdList
=
storeInfoIdList
;
}
public
Integer
getStoreWidgetId
()
{
return
storeWidgetId
;
}
public
void
setStoreWidgetId
(
Integer
storeWidgetId
)
{
this
.
storeWidgetId
=
storeWidgetId
;
}
}
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/constant/StoreChannelEnum.java
0 → 100644
View file @
64dce82a
package
com
.
gic
.
cloud
.
web
.
constant
;
public
enum
StoreChannelEnum
{
OFFLINE
(
1
,
"线下"
),
GICMALL
(
2
,
"达摩微商城"
),
WMMALL
(
3
,
"微盟微商城"
),
TIANMAO
(
4
,
"天猫"
);
private
Integer
channel
;
private
String
message
;
StoreChannelEnum
(
Integer
channel
,
String
message
){
this
.
channel
=
channel
;
this
.
message
=
message
;
}
public
Integer
getChannel
()
{
return
channel
;
}
public
void
setChannel
(
Integer
channel
)
{
this
.
channel
=
channel
;
}
public
String
getMessage
()
{
return
message
;
}
public
void
setMessage
(
String
message
)
{
this
.
message
=
message
;
}
}
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/controller/StoreAttentionController.java
View file @
64dce82a
package
com
.
gic
.
cloud
.
web
.
controller
;
package
com
.
gic
.
cloud
.
web
.
controller
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.cloud.dto.AttentionStoreDTO
;
import
com.gic.cloud.service.StoreAttentionApiService
;
import
com.gic.cloud.web.vo.StoreAttenttionVo
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.store.dto.StoreDTO
;
import
com.gic.store.service.StoreApiService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.ArrayList
;
import
java.util.List
;
@RestController
@RestController
public
class
StoreAttentionController
{
public
class
StoreAttentionController
{
@Autowired
private
StoreAttentionApiService
storeAttentionApiService
;
@Autowired
private
StoreApiService
storeApiService
;
@RequestMapping
(
"add-attention"
)
public
RestResponse
addAttenttion
(
Integer
userId
,
Integer
enterpriseId
,
Integer
storeId
){
ServiceResponse
serviceResponse
=
this
.
storeAttentionApiService
.
addStoreAttenttion
(
userId
,
enterpriseId
,
storeId
);
return
RestResponse
.
success
();
}
@RequestMapping
(
"remove-attention"
)
public
RestResponse
removeAttentiton
(
Integer
attentionId
){
this
.
storeAttentionApiService
.
removeStoreAttenttion
(
attentionId
);
return
RestResponse
.
success
();
}
@RequestMapping
(
"attention-list"
)
public
RestResponse
attenttionList
(
Integer
userId
,
Integer
enterpriseId
,
Integer
pageNum
,
Integer
pageSize
){
ServiceResponse
<
Page
<
AttentionStoreDTO
>>
response
=
this
.
storeAttentionApiService
.
pageStoreAttention
(
userId
,
enterpriseId
,
pageNum
,
pageSize
);
Page
<
AttentionStoreDTO
>
result
=
response
.
getResult
();
List
<
StoreAttenttionVo
>
list
=
new
ArrayList
<>();
Page
<
StoreAttenttionVo
>
page
=
new
Page
<>(
pageNum
,
pageSize
);
if
(
CollectionUtils
.
isNotEmpty
(
result
.
getResult
())){
for
(
AttentionStoreDTO
storeDTO
:
result
.
getResult
()){
StoreAttenttionVo
storeAttenttionVo
=
new
StoreAttenttionVo
();
storeAttenttionVo
.
setStoreId
(
storeDTO
.
getStoreId
());
storeAttenttionVo
.
setStoreAttentionId
(
storeDTO
.
getAttentionId
());
StoreDTO
store
=
this
.
storeApiService
.
getStoreByStoreInfoId
(
enterpriseId
,
storeDTO
.
getStoreId
()).
getResult
();
if
(
store
!=
null
){
storeAttenttionVo
.
setStoreName
(
store
.
getStoreName
());
list
.
add
(
storeAttenttionVo
);
}
}
}
page
.
setResult
(
list
);
page
.
setTotalPage
(
result
.
getTotalPage
());
page
.
setTotalCount
(
result
.
getTotalCount
());
return
RestResponse
.
success
(
page
);
}
}
}
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/controller/StoreWidgetController.java
View file @
64dce82a
This diff is collapsed.
Click to expand it.
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/vo/IndexItemVo.java
View file @
64dce82a
...
@@ -5,6 +5,7 @@ import java.io.Serializable;
...
@@ -5,6 +5,7 @@ import java.io.Serializable;
public
class
IndexItemVo
implements
Serializable
{
public
class
IndexItemVo
implements
Serializable
{
private
String
id
;
private
String
id
;
private
String
name
;
private
String
name
;
private
Integer
type
;
public
String
getId
()
{
public
String
getId
()
{
return
id
;
return
id
;
...
@@ -21,4 +22,12 @@ public class IndexItemVo implements Serializable {
...
@@ -21,4 +22,12 @@ public class IndexItemVo implements Serializable {
public
void
setName
(
String
name
)
{
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
this
.
name
=
name
;
}
}
public
Integer
getType
()
{
return
type
;
}
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
}
}
}
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/vo/OnLineStoreVo.java
0 → 100644
View file @
64dce82a
package
com
.
gic
.
cloud
.
web
.
vo
;
public
class
OnLineStoreVo
{
private
String
onStoreId
;
private
String
onStoreName
;
public
String
getOnStoreId
()
{
return
onStoreId
;
}
public
void
setOnStoreId
(
String
onStoreId
)
{
this
.
onStoreId
=
onStoreId
;
}
public
String
getOnStoreName
()
{
return
onStoreName
;
}
public
void
setOnStoreName
(
String
onStoreName
)
{
this
.
onStoreName
=
onStoreName
;
}
}
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/vo/StoreAttenttionVo.java
0 → 100644
View file @
64dce82a
package
com
.
gic
.
cloud
.
web
.
vo
;
public
class
StoreAttenttionVo
{
private
Integer
storeId
;
private
String
storeName
;
private
Integer
storeAttentionId
;
public
Integer
getStoreId
()
{
return
storeId
;
}
public
void
setStoreId
(
Integer
storeId
)
{
this
.
storeId
=
storeId
;
}
public
String
getStoreName
()
{
return
storeName
;
}
public
void
setStoreName
(
String
storeName
)
{
this
.
storeName
=
storeName
;
}
public
Integer
getStoreAttentionId
()
{
return
storeAttentionId
;
}
public
void
setStoreAttentionId
(
Integer
storeAttentionId
)
{
this
.
storeAttentionId
=
storeAttentionId
;
}
}
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/vo/StoreGroupItemsVo.java
0 → 100644
View file @
64dce82a
package
com
.
gic
.
cloud
.
web
.
vo
;
public
class
StoreGroupItemsVo
{
private
Integer
id
;
private
String
name
;
private
Integer
isStore
=
0
;
private
Integer
hasChildren
=
0
;
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
Integer
getIsStore
()
{
return
isStore
;
}
public
void
setIsStore
(
Integer
isStore
)
{
this
.
isStore
=
isStore
;
}
public
Integer
getHasChildren
()
{
return
hasChildren
;
}
public
void
setHasChildren
(
Integer
hasChildren
)
{
this
.
hasChildren
=
hasChildren
;
}
}
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/vo/StoreGroupVo.java
0 → 100644
View file @
64dce82a
package
com
.
gic
.
cloud
.
web
.
vo
;
import
java.util.List
;
public
class
StoreGroupVo
{
private
List
<
StoreGroupItemsVo
>
items
;
public
List
<
StoreGroupItemsVo
>
getItems
()
{
return
items
;
}
public
void
setItems
(
List
<
StoreGroupItemsVo
>
items
)
{
this
.
items
=
items
;
}
}
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/vo/StoreSearchVo.java
0 → 100644
View file @
64dce82a
package
com
.
gic
.
cloud
.
web
.
vo
;
public
class
StoreSearchVo
{
private
Integer
id
;
private
String
name
;
private
String
desc
;
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getDesc
()
{
return
desc
;
}
public
void
setDesc
(
String
desc
)
{
this
.
desc
=
desc
;
}
}
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/vo/StoreTypeVo.java
0 → 100644
View file @
64dce82a
package
com
.
gic
.
cloud
.
web
.
vo
;
public
class
StoreTypeVo
{
private
String
id
;
private
String
name
;
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
}
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/vo/StoreWidgetIndexVo.java
View file @
64dce82a
...
@@ -6,7 +6,8 @@ public class StoreWidgetIndexVo {
...
@@ -6,7 +6,8 @@ public class StoreWidgetIndexVo {
/****1多渠道首页 2单渠道线下首页 3单渠道线上首页****/
/****1多渠道首页 2单渠道线下首页 3单渠道线上首页****/
private
Integer
type
;
private
Integer
type
;
private
List
<
IndexItemVo
>
items
;
private
List
<
IndexItemVo
>
items
;
private
Integer
attentionCount
;
private
Integer
attentionCount
=
0
;
private
Integer
singleRegion
=
0
;
public
Integer
getType
()
{
public
Integer
getType
()
{
return
type
;
return
type
;
...
@@ -31,4 +32,12 @@ public class StoreWidgetIndexVo {
...
@@ -31,4 +32,12 @@ public class StoreWidgetIndexVo {
public
void
setItems
(
List
<
IndexItemVo
>
items
)
{
public
void
setItems
(
List
<
IndexItemVo
>
items
)
{
this
.
items
=
items
;
this
.
items
=
items
;
}
}
public
Integer
getSingleRegion
()
{
return
singleRegion
;
}
public
void
setSingleRegion
(
Integer
singleRegion
)
{
this
.
singleRegion
=
singleRegion
;
}
}
}
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/vo/StoreWidgetItemVo.java
0 → 100644
View file @
64dce82a
package
com
.
gic
.
cloud
.
web
.
vo
;
public
class
StoreWidgetItemVo
{
private
String
id
;
private
String
name
;
private
Integer
type
;
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
Integer
getType
()
{
return
type
;
}
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
}
}
gic-data-cloud-wxapp/src/main/resources/dubbo-gic-data-cloud-wxapp.xml
View file @
64dce82a
...
@@ -140,4 +140,6 @@
...
@@ -140,4 +140,6 @@
<dubbo:reference
interface=
"com.gic.cloud.service.DataAuthApiService"
id=
"dataAuthApiService"
timeout=
"6000"
retries=
"0"
/>
<dubbo:reference
interface=
"com.gic.cloud.service.DataAuthApiService"
id=
"dataAuthApiService"
timeout=
"6000"
retries=
"0"
/>
<dubbo:reference
interface=
"com.gic.cloud.service.UserApiService"
id=
"userApiService"
timeout=
"6000"
retries=
"0"
/>
<dubbo:reference
interface=
"com.gic.cloud.service.UserApiService"
id=
"userApiService"
timeout=
"6000"
retries=
"0"
/>
<dubbo:reference
interface=
"com.gic.marketing.process.api.service.sms.SmsSendApiService"
id=
"smsSendApiService"
timeout=
"6000"
retries=
"0"
/>
<dubbo:reference
interface=
"com.gic.marketing.process.api.service.sms.SmsSendApiService"
id=
"smsSendApiService"
timeout=
"6000"
retries=
"0"
/>
<dubbo:reference
interface=
"com.gic.store.service.StoreTagApiService"
id=
"storeTagApiService"
timeout=
"6000"
retries=
"0"
/>
<dubbo:reference
interface=
"com.gic.cloud.service.StoreAttentionApiService"
id=
"storeAttentionApiService"
timeout=
"6000"
retries=
"0"
/>
</beans>
</beans>
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