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
7a71e35e
Commit
7a71e35e
authored
Jul 17, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
观云台小程序
parent
e8c9b7d7
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
75 additions
and
15 deletions
+75
-15
StoreAttentionApiService.java
.../java/com/gic/cloud/service/StoreAttentionApiService.java
+1
-1
TabAttentionStoreMapper.java
...ava/com/gic/cloud/dao/mapper/TabAttentionStoreMapper.java
+7
-0
StoreAttenttionService.java
...in/java/com/gic/cloud/service/StoreAttenttionService.java
+1
-1
StoreAttentionServiceImpl.java
...com/gic/cloud/service/impl/StoreAttentionServiceImpl.java
+9
-4
StoreAttentionApiServiceImpl.java
...loud/service/outer/impl/StoreAttentionApiServiceImpl.java
+2
-2
TabAttentionStoreMapper.xml
...ice/src/main/resources/mapper/TabAttentionStoreMapper.xml
+12
-0
StoreAttentionController.java
...om/gic/cloud/web/controller/StoreAttentionController.java
+2
-2
StoreGroupVo.java
...xapp/src/main/java/com/gic/cloud/web/vo/StoreGroupVo.java
+41
-5
No files found.
gic-data-cloud-api/src/main/java/com/gic/cloud/service/StoreAttentionApiService.java
View file @
7a71e35e
...
...
@@ -7,7 +7,7 @@ import com.gic.cloud.dto.AttentionStoreDTO;
public
interface
StoreAttentionApiService
{
ServiceResponse
addStoreAttenttion
(
Integer
userId
,
Integer
enterpriseId
,
Integer
storeId
);
ServiceResponse
removeStoreAttenttion
(
Integer
attentionId
);
ServiceResponse
removeStoreAttenttion
(
Integer
enterpriseId
,
Integer
userId
,
String
storeIds
);
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
View file @
7a71e35e
...
...
@@ -4,6 +4,8 @@ import com.gic.cloud.entity.TabAttentionStore;
import
com.github.pagehelper.Page
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
public
interface
TabAttentionStoreMapper
{
/**
* 根据主键删除
...
...
@@ -54,4 +56,8 @@ public interface TabAttentionStoreMapper {
int
updateByPrimaryKey
(
TabAttentionStore
record
);
Page
<
TabAttentionStore
>
pageStoreAttention
(
@Param
(
"userId"
)
Integer
userId
,
@Param
(
"enterpriseId"
)
Integer
enterpriseId
);
int
removeAttention
(
@Param
(
"userId"
)
Integer
userId
,
@Param
(
"enterpriseId"
)
Integer
enterpriseId
,
@Param
(
"storeIds"
)
List
<
Integer
>
storeIds
);
}
\ No newline at end of file
gic-data-cloud-service/src/main/java/com/gic/cloud/service/StoreAttenttionService.java
View file @
7a71e35e
...
...
@@ -6,7 +6,7 @@ import com.github.pagehelper.Page;
public
interface
StoreAttenttionService
{
int
addStoreAttenttion
(
TabAttentionStore
tabAttentionStore
);
int
removeStoreAttenttion
(
Integer
attentionId
);
int
removeStoreAttenttion
(
Integer
enterpriseId
,
Integer
userId
,
String
storeIds
);
Page
<
TabAttentionStore
>
pageStoreAttention
(
Integer
userId
,
Integer
enterpriseId
);
}
gic-data-cloud-service/src/main/java/com/gic/cloud/service/impl/StoreAttentionServiceImpl.java
View file @
7a71e35e
...
...
@@ -7,7 +7,9 @@ import com.github.pagehelper.Page;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
@Service
(
"storeAttenttionService"
)
public
class
StoreAttentionServiceImpl
implements
StoreAttenttionService
{
...
...
@@ -23,10 +25,13 @@ public class StoreAttentionServiceImpl implements StoreAttenttionService {
}
@Override
public
int
removeStoreAttenttion
(
Integer
attentionId
)
{
TabAttentionStore
tabAttentionStore
=
this
.
tabAttentionStoreMapper
.
selectByPrimaryKey
(
attentionId
);
tabAttentionStore
.
setStatus
(
0
);
int
i
=
this
.
tabAttentionStoreMapper
.
updateByPrimaryKey
(
tabAttentionStore
);
public
int
removeStoreAttenttion
(
Integer
enterpriseId
,
Integer
userId
,
String
storeIds
)
{
String
[]
split
=
storeIds
.
split
(
","
);
List
<
Integer
>
list
=
new
ArrayList
<>();
for
(
String
s
:
split
){
list
.
add
(
Integer
.
valueOf
(
s
));
}
int
i
=
this
.
tabAttentionStoreMapper
.
removeAttention
(
userId
,
enterpriseId
,
list
);
return
i
;
}
...
...
gic-data-cloud-service/src/main/java/com/gic/cloud/service/outer/impl/StoreAttentionApiServiceImpl.java
View file @
7a71e35e
...
...
@@ -28,8 +28,8 @@ public class StoreAttentionApiServiceImpl implements StoreAttentionApiService {
}
@Override
public
ServiceResponse
removeStoreAttenttion
(
Integer
attentionId
)
{
this
.
storeAttenttionService
.
removeStoreAttenttion
(
attentionId
);
public
ServiceResponse
removeStoreAttenttion
(
Integer
enterpriseId
,
Integer
userId
,
String
storeIds
)
{
this
.
storeAttenttionService
.
removeStoreAttenttion
(
enterpriseId
,
userId
,
storeIds
);
return
ServiceResponse
.
success
();
}
...
...
gic-data-cloud-service/src/main/resources/mapper/TabAttentionStoreMapper.xml
View file @
7a71e35e
...
...
@@ -120,4 +120,15 @@
from tab_attention_store
where status = 1 and user_id = #{userId} and enterprise_id = #{enterpriseId} order by create_time desc
</select>
<update
id=
"removeAttention"
>
update tab_attention_store
set status = 0
where enterprise_id = #{enterpriseId,jdbcType=INTEGER} and user_id= #{userId}
<if
test=
"storeIds != null and storeIds.size()>0"
>
and store_id in
<foreach
collection=
"storeIds"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</update>
</mapper>
\ No newline at end of file
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/controller/StoreAttentionController.java
View file @
7a71e35e
...
...
@@ -30,8 +30,8 @@ public class StoreAttentionController {
}
@RequestMapping
(
"remove-attention"
)
public
RestResponse
removeAttentiton
(
Integer
attentionId
){
this
.
storeAttentionApiService
.
removeStoreAttenttion
(
attentionId
);
public
RestResponse
removeAttentiton
(
Integer
enterpriseId
,
Integer
userId
,
String
storeIds
){
this
.
storeAttentionApiService
.
removeStoreAttenttion
(
enterpriseId
,
userId
,
storeIds
);
return
RestResponse
.
success
();
}
...
...
gic-data-cloud-wxapp/src/main/java/com/gic/cloud/web/vo/StoreGroupVo.java
View file @
7a71e35e
...
...
@@ -4,13 +4,49 @@ import java.util.List;
public
class
StoreGroupVo
{
private
List
<
StoreGroupItemsVo
>
items
;
private
Integer
storeGroupId
;
private
String
storeGroupName
;
private
Integer
parentId
;
private
String
idChain
;
private
String
nameChain
;
public
List
<
StoreGroupItemsVo
>
getItems
()
{
return
items
;
public
Integer
getStoreGroupId
()
{
return
storeGroupId
;
}
public
void
setItems
(
List
<
StoreGroupItemsVo
>
items
)
{
this
.
items
=
items
;
public
void
setStoreGroupId
(
Integer
storeGroupId
)
{
this
.
storeGroupId
=
storeGroupId
;
}
public
String
getStoreGroupName
()
{
return
storeGroupName
;
}
public
void
setStoreGroupName
(
String
storeGroupName
)
{
this
.
storeGroupName
=
storeGroupName
;
}
public
Integer
getParentId
()
{
return
parentId
;
}
public
void
setParentId
(
Integer
parentId
)
{
this
.
parentId
=
parentId
;
}
public
String
getIdChain
()
{
return
idChain
;
}
public
void
setIdChain
(
String
idChain
)
{
this
.
idChain
=
idChain
;
}
public
String
getNameChain
()
{
return
nameChain
;
}
public
void
setNameChain
(
String
nameChain
)
{
this
.
nameChain
=
nameChain
;
}
}
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