Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-store
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-store
Commits
7c5f8f73
Commit
7c5f8f73
authored
Oct 18, 2019
by
zhiwj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改批量错误
parent
91f1ba54
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
6 deletions
+31
-6
TabStoreMapper.java
...rc/main/java/com/gic/store/dao/mapper/TabStoreMapper.java
+3
-0
StoreService.java
...ice/src/main/java/com/gic/store/service/StoreService.java
+2
-2
StoreServiceImpl.java
...ain/java/com/gic/store/service/impl/StoreServiceImpl.java
+10
-3
StoreApiServiceImpl.java
...com/gic/store/service/outer/impl/StoreApiServiceImpl.java
+5
-1
TabStoreMapper.xml
...tore-service/src/main/resources/mapper/TabStoreMapper.xml
+11
-0
No files found.
gic-store-service/src/main/java/com/gic/store/dao/mapper/TabStoreMapper.java
View file @
7c5f8f73
...
...
@@ -67,4 +67,6 @@ public interface TabStoreMapper {
List
<
Integer
>
listStoreIdByFromEnterpriseId
(
@Param
(
"fromEnterpriseId"
)
Integer
fromEnterpriseId
);
int
cancelAuthStore
(
@Param
(
"storeInfoIdList"
)
List
<
Integer
>
storeInfoIdList
,
@Param
(
"toEnterpriseId"
)
Integer
toEnterpriseId
);
List
<
Integer
>
listStoreInfoIdByStoreIds
(
@Param
(
"ids"
)
List
<
Integer
>
ids
,
@Param
(
"enterpriseId"
)
Integer
enterpriseId
);
}
\ No newline at end of file
gic-store-service/src/main/java/com/gic/store/service/StoreService.java
View file @
7c5f8f73
package
com
.
gic
.
store
.
service
;
import
com.gic.store.dto.StoreDTO
;
import
com.gic.store.dto.StoreInfoDTO
;
import
com.gic.store.dto.StoreSearchDBDTO
;
import
com.gic.store.entity.TabStoreInfo
;
import
com.github.pagehelper.Page
;
import
java.util.List
;
...
...
@@ -96,4 +94,6 @@ public interface StoreService {
int
cancelAuthStore
(
List
<
Integer
>
storeInfoIdList
,
Integer
toEnterpriseId
);
Integer
getStoreOwnerByStoreInfoId
(
Integer
enterpriseId
,
Integer
storeInfoId
);
String
listStoreInfoIdByStoreIds
(
String
storeIds
,
Integer
enterpriseId
);
}
gic-store-service/src/main/java/com/gic/store/service/impl/StoreServiceImpl.java
View file @
7c5f8f73
...
...
@@ -23,9 +23,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
java.text.SimpleDateFormat
;
import
java.util.
ArrayList
;
import
java.util.
Date
;
import
java.util.
List
;
import
java.util.
*
;
import
java.util.
stream.Collectors
;
import
java.util.
stream.Stream
;
/**
* @author zhiwj
...
...
@@ -432,4 +432,11 @@ public class StoreServiceImpl implements StoreService {
return
this
.
tabStoreInfoMapper
.
getStoreOwnerByStoreInfoId
(
enterpriseId
,
storeInfoId
);
}
@Override
public
String
listStoreInfoIdByStoreIds
(
String
storeIds
,
Integer
enterpriseId
)
{
List
<
Integer
>
list
=
Stream
.
of
(
storeIds
.
split
(
GlobalInfo
.
FLAG_COMMA
)).
map
(
Integer:
:
valueOf
).
collect
(
Collectors
.
toList
());
List
<
Integer
>
ids
=
tabStoreMapper
.
listStoreInfoIdByStoreIds
(
list
,
enterpriseId
);
return
Optional
.
ofNullable
(
ids
).
orElse
(
Collections
.
emptyList
()).
stream
().
map
(
String:
:
valueOf
).
reduce
((
x
,
y
)->
x
+
GlobalInfo
.
FLAG_COMMA
+
y
).
orElse
(
""
);
}
}
gic-store-service/src/main/java/com/gic/store/service/outer/impl/StoreApiServiceImpl.java
View file @
7c5f8f73
...
...
@@ -474,7 +474,11 @@ public class StoreApiServiceImpl implements StoreApiService {
}
int
i
=
0
;
try
{
i
=
storeStrtegyMap
.
get
(
type
).
bulkUpdateStore
(
storeIds
,
enterpriseId
,
value
,
storeService
);
String
storeInfoIds
=
storeService
.
listStoreInfoIdByStoreIds
(
storeIds
,
enterpriseId
);
if
(
StringUtils
.
isBlank
(
storeInfoIds
))
{
return
ServiceResponse
.
success
();
}
i
=
storeStrtegyMap
.
get
(
type
).
bulkUpdateStore
(
storeInfoIds
,
enterpriseId
,
value
,
storeService
);
List
<
Integer
>
storeIdList
=
new
ArrayList
<>();
if
(
"all"
.
equals
(
storeIds
))
{
this
.
removeCache
(
enterpriseId
);
...
...
gic-store-service/src/main/resources/mapper/TabStoreMapper.xml
View file @
7c5f8f73
...
...
@@ -182,4 +182,14 @@
#{storeInfoId}
</foreach>
</update>
<select
id=
"listStoreInfoIdByStoreIds"
resultType=
"java.lang.Integer"
>
select store_info_id
from tab_store where own_type = 0 and enterprise_id = #{enterpriseId}
<if
test=
"null != ids and ids.size > 0"
>
and store_id in
<foreach
collection=
"ids"
index=
"index"
item=
"item"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</select>
</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