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
50fd329d
Commit
50fd329d
authored
Aug 17, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://115.159.76.241/base_platform_enterprise/gic-store
into developer
parents
76805421
eb23ccaa
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
170 additions
and
61 deletions
+170
-61
pom.xml
gic-store-service/pom.xml
+5
-0
TabClerkMapper.java
...rc/main/java/com/gic/store/dao/mapper/TabClerkMapper.java
+3
-0
TabStoreInfoMapper.java
...ain/java/com/gic/store/dao/mapper/TabStoreInfoMapper.java
+2
-0
ClerkService.java
...ice/src/main/java/com/gic/store/service/ClerkService.java
+4
-2
StoreService.java
...ice/src/main/java/com/gic/store/service/StoreService.java
+2
-0
ClerkServiceImpl.java
...ain/java/com/gic/store/service/impl/ClerkServiceImpl.java
+6
-12
StoreLogServiceImpl.java
.../java/com/gic/store/service/impl/StoreLogServiceImpl.java
+2
-1
StoreServiceImpl.java
...ain/java/com/gic/store/service/impl/StoreServiceImpl.java
+5
-0
ClerkApiServiceImpl.java
...com/gic/store/service/outer/impl/ClerkApiServiceImpl.java
+20
-1
StoreApiServiceImpl.java
...com/gic/store/service/outer/impl/StoreApiServiceImpl.java
+13
-1
StoreTaskServiceImpl.java
...om/gic/store/service/outer/impl/StoreTaskServiceImpl.java
+15
-11
StoreBrandUpdateStrategyImpl.java
...gic/store/strategy/impl/StoreBrandUpdateStrategyImpl.java
+47
-14
StoreBusinessTimeStrategyImpl.java
...ic/store/strategy/impl/StoreBusinessTimeStrategyImpl.java
+1
-1
StoreGroupStrategyImpl.java
...a/com/gic/store/strategy/impl/StoreGroupStrategyImpl.java
+5
-5
StorePhoneStategyImpl.java
...va/com/gic/store/strategy/impl/StorePhoneStategyImpl.java
+5
-5
StorePhotoAddStrategyImpl.java
...om/gic/store/strategy/impl/StorePhotoAddStrategyImpl.java
+1
-1
StorePhotoUpdateStrategyImpl.java
...gic/store/strategy/impl/StorePhotoUpdateStrategyImpl.java
+5
-5
StoreStatusStrategyImpl.java
.../com/gic/store/strategy/impl/StoreStatusStrategyImpl.java
+11
-2
dubbo-gic-store-service.xml
...re-service/src/main/resources/dubbo-gic-store-service.xml
+1
-0
TabClerkMapper.xml
...tore-service/src/main/resources/mapper/TabClerkMapper.xml
+7
-0
TabStoreInfoMapper.xml
...-service/src/main/resources/mapper/TabStoreInfoMapper.xml
+4
-0
StoreController.java
...in/java/com/gic/store/web/controller/StoreController.java
+6
-0
No files found.
gic-store-service/pom.xml
View file @
50fd329d
...
...
@@ -146,6 +146,11 @@
<artifactId>
gic-weimob-api
</artifactId>
<version>
${gic-weimob-api}
</version>
</dependency>
<dependency>
<groupId>
com.gic
</groupId>
<artifactId>
gic-spark-run-api
</artifactId>
<version>
${gic-spark-run-api}
</version>
</dependency>
</dependencies>
<build>
...
...
gic-store-service/src/main/java/com/gic/store/dao/mapper/TabClerkMapper.java
View file @
50fd329d
...
...
@@ -84,4 +84,6 @@ public interface TabClerkMapper {
List
<
TabClerk
>
listHaobanClerk
(
@Param
(
"enterpriseIdList"
)
List
<
Integer
>
enterpriseIdList
,
@Param
(
"keyword"
)
String
keyword
,
@Param
(
"storeInfoIdList"
)
List
<
Integer
>
storeInfoIdList
);
List
<
TabClerk
>
listClerkByPositionId
(
@Param
(
"enterpriseId"
)
Integer
enterpriseId
,
@Param
(
"positionId"
)
Integer
positionId
);
List
<
Integer
>
listAllClerkId
(
@Param
(
"enterpriseId"
)
Integer
enterpriseId
);
}
\ No newline at end of file
gic-store-service/src/main/java/com/gic/store/dao/mapper/TabStoreInfoMapper.java
View file @
50fd329d
...
...
@@ -85,6 +85,8 @@ public interface TabStoreInfoMapper {
List
<
Integer
>
listAllstoreInfoId
(
@Param
(
"enterpriseId"
)
Integer
enterpriseId
);
List
<
Integer
>
listAllstoreId
(
@Param
(
"enterpriseId"
)
Integer
enterpriseId
);
TabStoreInfo
getByStore
(
@Param
(
"store"
)
StoreDTO
store
);
StoreDTO
getDTOByStore
(
@Param
(
"store"
)
StoreDTO
store
);
...
...
gic-store-service/src/main/java/com/gic/store/service/ClerkService.java
View file @
50fd329d
...
...
@@ -106,12 +106,12 @@ public interface ClerkService {
* @Description: 批量修改导购状态
* @author zhiwj
* @param enterpriseId 企业id
* @param clerkId
s
导购ids
* @param clerkId
List
导购ids
* @param status 状态
* @return java.lang.Integer
* @throws
*/
Integer
updateClerkStatus
(
Integer
enterpriseId
,
String
clerkIds
,
Integer
status
);
Integer
updateClerkStatus
(
Integer
enterpriseId
,
List
<
Integer
>
clerkIdList
,
Integer
status
);
List
<
TabClerk
>
listClerkByIds
(
Integer
enterpriseId
,
String
clerkIds
);
...
...
@@ -132,4 +132,6 @@ public interface ClerkService {
List
<
TabClerk
>
listHaobanClerk
(
List
<
Integer
>
enterpriseIdList
,
String
keyword
,
List
<
Integer
>
storeInfoIdList
);
List
<
TabClerk
>
listClerkByPositionId
(
Integer
enterpriseId
,
Integer
positionId
);
List
<
Integer
>
listAllClerkId
(
Integer
enterpriseId
);
}
gic-store-service/src/main/java/com/gic/store/service/StoreService.java
View file @
50fd329d
...
...
@@ -86,6 +86,8 @@ public interface StoreService {
List
<
Integer
>
listAllStoreId
(
Integer
enterpriseId
);
List
<
Integer
>
listAllStoreInfoId
(
Integer
enterpriseId
);
boolean
validateStoreCodeIsExist
(
Integer
enterpriseId
,
Integer
regionId
,
String
storeCode
,
Integer
storeId
);
/**
...
...
gic-store-service/src/main/java/com/gic/store/service/impl/ClerkServiceImpl.java
View file @
50fd329d
...
...
@@ -120,18 +120,7 @@ public class ClerkServiceImpl implements ClerkService {
}
@Override
public
Integer
updateClerkStatus
(
Integer
enterpriseId
,
String
clerkIds
,
Integer
status
)
{
List
<
Integer
>
clerkIdList
;
if
(
StringUtils
.
isNotBlank
(
clerkIds
))
{
if
(
StringUtils
.
equals
(
"all"
,
clerkIds
))
{
clerkIdList
=
null
;
}
else
{
String
[]
split
=
clerkIds
.
split
(
GlobalInfo
.
FLAG_COMMA
);
clerkIdList
=
Stream
.
of
(
split
).
map
(
Integer:
:
parseInt
).
collect
(
Collectors
.
toList
());
}
}
else
{
return
0
;
}
public
Integer
updateClerkStatus
(
Integer
enterpriseId
,
List
<
Integer
>
clerkIdList
,
Integer
status
)
{
return
tabClerkMapper
.
updateClerkStatus
(
enterpriseId
,
clerkIdList
,
status
);
}
...
...
@@ -197,4 +186,9 @@ public class ClerkServiceImpl implements ClerkService {
return
tabClerkMapper
.
listClerkByPositionId
(
enterpriseId
,
positionId
);
}
@Override
public
List
<
Integer
>
listAllClerkId
(
Integer
enterpriseId
)
{
return
tabClerkMapper
.
listAllClerkId
(
enterpriseId
);
}
}
gic-store-service/src/main/java/com/gic/store/service/impl/StoreLogServiceImpl.java
View file @
50fd329d
...
...
@@ -92,7 +92,8 @@ public class StoreLogServiceImpl implements StoreLogService {
storeLog
.
setOperatorId
(
operatorId
);
storeLog
.
setOperatorName
(
operatorName
);
storeLog
.
setContent
(
content
);
for
(
Integer
storeId
:
storeInfoIdList
)
{
List
<
Integer
>
storeIdList
=
storeService
.
listStoredByStoreInfoList
(
storeInfoIdList
,
enterpriseId
);
for
(
Integer
storeId
:
storeIdList
)
{
storeLog
.
setStoreId
(
storeId
);
tabStoreLogMapper
.
insertSelective
(
storeLog
);
}
...
...
gic-store-service/src/main/java/com/gic/store/service/impl/StoreServiceImpl.java
View file @
50fd329d
...
...
@@ -388,6 +388,11 @@ public class StoreServiceImpl implements StoreService {
@Override
public
List
<
Integer
>
listAllStoreId
(
Integer
enterpriseId
)
{
return
this
.
tabStoreInfoMapper
.
listAllstoreId
(
enterpriseId
);
}
@Override
public
List
<
Integer
>
listAllStoreInfoId
(
Integer
enterpriseId
)
{
return
this
.
tabStoreInfoMapper
.
listAllstoreInfoId
(
enterpriseId
);
}
...
...
gic-store-service/src/main/java/com/gic/store/service/outer/impl/ClerkApiServiceImpl.java
View file @
50fd329d
...
...
@@ -6,6 +6,7 @@ import com.gic.api.base.commons.ServiceResponse;
import
com.gic.commons.util.CollectionUtil
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.GICMQClientUtil
;
import
com.gic.commons.util.GlobalInfo
;
import
com.gic.enterprise.constants.Constants
;
import
com.gic.enterprise.dto.wm.WmStoreSyncLogDTO
;
import
com.gic.enterprise.error.ErrorCode
;
...
...
@@ -13,6 +14,7 @@ import com.gic.enterprise.response.EnterpriseServiceResponse;
import
com.gic.enterprise.service.EnterpriseApiService
;
import
com.gic.enterprise.service.WmStoreSyncLogApiService
;
import
com.gic.mq.sdk.GicMQClient
;
import
com.gic.spark.api.service.SparkJobApiService
;
import
com.gic.store.constant.ClerkLogReasonEnum
;
import
com.gic.store.constant.ImportClerkBatchResultEnum
;
import
com.gic.store.constant.StoreLogTypeEnum
;
...
...
@@ -35,6 +37,7 @@ import org.springframework.stereotype.Service;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
/**
* @author zhiwj
...
...
@@ -67,6 +70,8 @@ public class ClerkApiServiceImpl implements ClerkApiService {
private
WmStoreSyncLogApiService
wmStoreSyncLogApiService
;
@Autowired
private
ClerkPositionService
clerkPositionService
;
@Autowired
private
SparkJobApiService
sparkJobApiService
;
@Override
public
ServiceResponse
saveOrUpdate
(
ClerkDTO
clerkDTO
)
{
...
...
@@ -431,7 +436,21 @@ public class ClerkApiServiceImpl implements ClerkApiService {
@Override
public
ServiceResponse
updateClerkStatus
(
Integer
enterpriseId
,
String
clerkIds
,
Integer
status
)
{
return
ServiceResponse
.
success
(
clerkService
.
updateClerkStatus
(
enterpriseId
,
clerkIds
,
status
));
List
<
Integer
>
clerkIdList
;
if
(
StringUtils
.
isNotBlank
(
clerkIds
))
{
if
(
StringUtils
.
equals
(
"all"
,
clerkIds
))
{
clerkIdList
=
clerkService
.
listAllClerkId
(
enterpriseId
);
}
else
{
String
[]
split
=
clerkIds
.
split
(
GlobalInfo
.
FLAG_COMMA
);
clerkIdList
=
Stream
.
of
(
split
).
map
(
Integer:
:
parseInt
).
collect
(
Collectors
.
toList
());
}
Integer
i
=
clerkService
.
updateClerkStatus
(
enterpriseId
,
clerkIdList
,
status
);
for
(
Integer
clerkId
:
clerkIdList
)
{
sparkJobApiService
.
updateClerkStatus
(
enterpriseId
,
clerkId
.
longValue
(),
1
==
status
?
0
:
1
);
}
}
return
ServiceResponse
.
success
();
}
@Override
...
...
gic-store-service/src/main/java/com/gic/store/service/outer/impl/StoreApiServiceImpl.java
View file @
50fd329d
...
...
@@ -24,6 +24,7 @@ import com.gic.search.business.api.dto.DynamicSearchDTO;
import
com.gic.search.business.api.dto.ESResponseQueryBatchDTO
;
import
com.gic.search.business.api.service.EsBusinessOperaApiService
;
import
com.gic.search.business.api.utils.QueryConditionAssemblyUtil
;
import
com.gic.spark.api.service.SparkJobApiService
;
import
com.gic.store.constant.*
;
import
com.gic.store.dto.*
;
import
com.gic.store.entity.*
;
...
...
@@ -112,6 +113,8 @@ public class StoreApiServiceImpl implements StoreApiService {
private
WeimobStoreSiteService
weimobStoreSiteService
;
@Autowired
private
WmStoreSyncLogApiService
wmStoreSyncLogApiService
;
@Autowired
private
SparkJobApiService
sparkJobApiService
;
private
Map
<
String
,
BulkUpdateStoreStrtegy
>
storeStrtegyMap
=
new
ConcurrentHashMap
<>();
...
...
@@ -205,6 +208,10 @@ public class StoreApiServiceImpl implements StoreApiService {
//修改门店同步到微盟
updateStoreToWm
(
storeDTO
);
// 给会员组发通知
if
(
StringUtils
.
isNotBlank
(
storeDTO
.
getBrandIds
())
&&
!
StringUtils
.
equals
(
existStore
.
getResult
().
getBrandIds
(),
storeDTO
.
getBrandIds
()))
{
sparkJobApiService
.
updateStoreBrand
(
storeDTO
.
getEnterpriseId
(),
storeDTO
.
getStoreInfoId
(),
Integer
.
parseInt
(
existStore
.
getResult
().
getBrandIds
()),
Integer
.
parseInt
(
storeDTO
.
getBrandIds
()));
}
}
// 自定义属性
String
error
=
storeExtendService
.
saveOrUpdate
(
storeDTO
.
getEnterpriseId
(),
storeDTO
.
getStoreInfoId
(),
storeDTO
.
getStoreExtendList
());
...
...
@@ -1281,7 +1288,12 @@ public class StoreApiServiceImpl implements StoreApiService {
}
int
i
=
0
;
try
{
String
storeInfoIds
=
storeService
.
listStoreInfoIdByStoreIds
(
storeIds
,
enterpriseId
);
String
storeInfoIds
;
if
(
StringUtils
.
equals
(
"all"
,
storeIds
))
{
storeInfoIds
=
"all"
;
}
else
{
storeInfoIds
=
storeService
.
listStoreInfoIdByStoreIds
(
storeIds
,
enterpriseId
);
}
if
(
StringUtils
.
isBlank
(
storeInfoIds
))
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"门店不存在或非自有门店"
);
}
...
...
gic-store-service/src/main/java/com/gic/store/service/outer/impl/StoreTaskServiceImpl.java
View file @
50fd329d
...
...
@@ -12,7 +12,6 @@ import com.gic.store.service.*;
import
com.gic.store.utils.baidumap.BaiduMapUtils
;
import
com.gic.store.utils.baidumap.Location
;
import
com.github.pagehelper.Page
;
import
com.google.common.base.Joiner
;
import
com.task.allocation.api.AbstractTaskAllocationOperation
;
import
com.task.allocation.exception.TaskAllocationException
;
import
com.task.allocation.qo.InitTaskQO
;
...
...
@@ -24,7 +23,10 @@ import org.apache.logging.log4j.Logger;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.*
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Optional
;
/**
* @author zhiwj
...
...
@@ -126,16 +128,18 @@ public class StoreTaskServiceImpl extends AbstractTaskAllocationOperation implem
if
(
StringUtils
.
isNotBlank
(
brands
))
{
String
[]
brandArr
=
brands
.
trim
().
split
(
"、"
);
List
<
TabStoreBrand
>
storeBrandList
=
storeBrandService
.
listAllStoreBrand
(
t
.
getEnterpriseId
(),
null
);
TabStoreBrand
storeBrand
=
storeBrandService
.
getByStoreBrandName
(
t
.
getEnterpriseId
(),
brands
);
List
<
Integer
>
list
=
new
ArrayList
<>();
for
(
String
brandName
:
brandArr
)
{
for
(
TabStoreBrand
storeBrand
:
storeBrandList
)
{
if
(
storeBrand
.
getStoreBrandName
().
equals
(
brandName
))
{
list
.
add
(
storeBrand
.
getStoreBrandId
());
break
;
}
}
}
storeDTO
.
setBrandIds
(
Joiner
.
on
(
GlobalInfo
.
FLAG_COMMA
).
join
(
list
));
// for (String brandName : brandArr) {
// for (TabStoreBrand storeBrand : storeBrandList) {
// if (storeBrand.getStoreBrandName().equals(brandName)) {
// list.add(storeBrand.getStoreBrandId());
// break;
// }
// }
// }
// storeDTO.setBrandIds(Joiner.on(GlobalInfo.FLAG_COMMA).join(list));
storeDTO
.
setBrandIds
(
storeBrand
.
getStoreBrandId
().
toString
());
}
// 判断省市区
ServiceResponse
<
List
<
CityDTO
>>
cityResponse
=
provincesApiService
.
selectAllCity
();
...
...
gic-store-service/src/main/java/com/gic/store/strategy/impl/StoreBrandUpdateStrategyImpl.java
View file @
50fd329d
package
com
.
gic
.
store
.
strategy
.
impl
;
import
com.gic.spark.api.service.SparkJobApiService
;
import
com.gic.store.dto.StoreDTO
;
import
com.gic.store.dto.StoreSearchDBDTO
;
import
com.gic.store.entity.TabStoreBrand
;
import
com.gic.store.service.StoreBrandService
;
import
com.gic.store.service.StoreLogService
;
...
...
@@ -12,6 +15,7 @@ import java.util.ArrayList;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.Optional
;
import
java.util.stream.Collectors
;
@Component
(
"5"
)
public
class
StoreBrandUpdateStrategyImpl
implements
BulkUpdateStoreStrtegy
{
...
...
@@ -20,25 +24,54 @@ public class StoreBrandUpdateStrategyImpl implements BulkUpdateStoreStrtegy {
private
StoreLogService
storeLogService
;
@Autowired
private
StoreBrandService
storeBrandService
;
@Autowired
private
SparkJobApiService
sparkJobApiService
;
@Override
public
int
bulkUpdateStore
(
String
storeInfoIds
,
Integer
enterpriseId
,
String
value
,
StoreService
storeService
,
Integer
operatorId
,
String
operatorName
)
{
int
i
=
storeService
.
bulkUpdateStoreBrands
(
storeInfoIds
,
enterpriseId
,
value
);
if
(
i
>
0
)
{
List
<
Integer
>
storeIdList
;
if
(
"all"
.
equals
(
storeInfoIds
))
{
storeIdList
=
storeService
.
listAllStoreId
(
enterpriseId
);
}
else
{
storeIdList
=
new
ArrayList
<>();
String
[]
storeIdArr
=
storeInfoIds
.
split
(
","
);
for
(
String
s
:
storeIdArr
)
{
storeIdList
.
add
(
Integer
.
valueOf
(
s
));
}
List
<
Integer
>
storeInfoIdList
;
List
<
StoreDTO
>
storeList
;
if
(
"all"
.
equals
(
storeInfoIds
))
{
StoreSearchDBDTO
storeSearchDBDTO
=
new
StoreSearchDBDTO
();
storeSearchDBDTO
.
setOverflowStatus
(
0
);
storeList
=
storeService
.
listStore
(
storeSearchDBDTO
,
1
,
Integer
.
MAX_VALUE
);
storeInfoIdList
=
storeService
.
listAllStoreInfoId
(
enterpriseId
);
}
else
{
storeInfoIdList
=
new
ArrayList
<>();
String
[]
storeIdArr
=
storeInfoIds
.
split
(
","
);
for
(
String
s
:
storeIdArr
)
{
storeInfoIdList
.
add
(
Integer
.
valueOf
(
s
));
}
List
<
TabStoreBrand
>
storeBrandList
=
storeBrandService
.
listStoreBrandByIds
(
storeInfoIds
);
String
content
=
Optional
.
ofNullable
(
storeBrandList
).
orElse
(
Collections
.
emptyList
()).
stream
().
map
(
TabStoreBrand:
:
getStoreBrandName
).
reduce
((
x
,
y
)
->
x
+
","
+
y
).
orElse
(
""
);
storeLogService
.
saveBulkStoreInfoLog
(
storeIdList
,
enterpriseId
,
operatorId
,
operatorName
,
"门店品牌变更为【"
+
content
+
"】"
);
StoreSearchDBDTO
storeSearchDBDTO
=
new
StoreSearchDBDTO
();
storeSearchDBDTO
.
setOverflowStatus
(
0
);
storeSearchDBDTO
.
setStoreInfoIdList
(
storeInfoIdList
);
storeList
=
storeService
.
listStore
(
storeSearchDBDTO
,
1
,
Integer
.
MAX_VALUE
);
}
List
<
BrandUpdateDTO
>
brandUpdateList
=
new
ArrayList
<>(
storeList
.
size
());
for
(
StoreDTO
storeDTO
:
storeList
)
{
brandUpdateList
.
add
(
new
BrandUpdateDTO
(
storeDTO
.
getStoreInfoId
(),
Integer
.
valueOf
(
storeDTO
.
getBrandIds
())));
}
int
i
=
storeService
.
bulkUpdateStoreBrands
(
storeInfoIds
,
enterpriseId
,
value
);
List
<
TabStoreBrand
>
storeBrandList
=
storeBrandService
.
listStoreBrandByIds
(
value
);
String
content
=
Optional
.
ofNullable
(
storeBrandList
).
orElse
(
Collections
.
emptyList
()).
stream
().
map
(
TabStoreBrand:
:
getStoreBrandName
).
collect
(
Collectors
.
joining
(
","
));
storeLogService
.
saveBulkStoreInfoLog
(
storeInfoIdList
,
enterpriseId
,
operatorId
,
operatorName
,
"门店品牌变更为【"
+
content
+
"】"
);
Integer
newBrand
=
Integer
.
valueOf
(
value
);
for
(
BrandUpdateDTO
brandUpdateDTO
:
brandUpdateList
)
{
sparkJobApiService
.
updateStoreBrand
(
enterpriseId
,
brandUpdateDTO
.
storeInfoId
,
brandUpdateDTO
.
oldStoreBrand
,
newBrand
);
}
return
i
;
}
class
BrandUpdateDTO
{
public
Integer
storeInfoId
;
public
Integer
oldStoreBrand
;
public
BrandUpdateDTO
(
Integer
storeInfoId
,
Integer
oldStoreBrand
)
{
this
.
storeInfoId
=
storeInfoId
;
this
.
oldStoreBrand
=
oldStoreBrand
;
}
}
}
gic-store-service/src/main/java/com/gic/store/strategy/impl/StoreBusinessTimeStrategyImpl.java
View file @
50fd329d
...
...
@@ -28,7 +28,7 @@ public class StoreBusinessTimeStrategyImpl implements BulkUpdateStoreStrtegy {
if
(
i
>
0
)
{
List
<
Integer
>
storeInfoIdList
;
if
(
"all"
.
equals
(
storeInfoIds
))
{
storeInfoIdList
=
storeService
.
listAllStoreId
(
enterpriseId
);
storeInfoIdList
=
storeService
.
listAllStoreI
nfoI
d
(
enterpriseId
);
}
else
{
storeInfoIdList
=
new
ArrayList
<>();
String
[]
storeInfoIdArr
=
storeInfoIds
.
split
(
","
);
...
...
gic-store-service/src/main/java/com/gic/store/strategy/impl/StoreGroupStrategyImpl.java
View file @
50fd329d
...
...
@@ -23,18 +23,18 @@ public class StoreGroupStrategyImpl implements BulkUpdateStoreStrtegy {
public
int
bulkUpdateStore
(
String
storeInfoIds
,
Integer
enterpriseId
,
String
value
,
StoreService
storeService
,
Integer
operatorId
,
String
operatorName
)
{
int
i
=
storeService
.
bulkUpdateStoreGroup
(
storeInfoIds
,
enterpriseId
,
Integer
.
valueOf
(
value
));
if
(
i
>
0
)
{
List
<
Integer
>
storeIdList
;
List
<
Integer
>
storeI
nfoI
dList
;
if
(
"all"
.
equals
(
storeInfoIds
))
{
storeI
dList
=
storeService
.
listAllStore
Id
(
enterpriseId
);
storeI
nfoIdList
=
storeService
.
listAllStoreInfo
Id
(
enterpriseId
);
}
else
{
storeIdList
=
new
ArrayList
<>();
storeI
nfoI
dList
=
new
ArrayList
<>();
String
[]
storeIdArr
=
storeInfoIds
.
split
(
","
);
for
(
String
s
:
storeIdArr
)
{
storeIdList
.
add
(
Integer
.
valueOf
(
s
));
storeI
nfoI
dList
.
add
(
Integer
.
valueOf
(
s
));
}
}
TabStoreGroup
group
=
storeGroupService
.
getStoreGroupById
(
Integer
.
valueOf
(
value
));
storeLogService
.
saveBulkStoreGroupLog
(
storeIdList
,
enterpriseId
,
operatorId
,
operatorName
,
"门店分组变更为【"
+
group
.
getStoreGroupName
()
+
"】"
);
storeLogService
.
saveBulkStoreGroupLog
(
storeI
nfoI
dList
,
enterpriseId
,
operatorId
,
operatorName
,
"门店分组变更为【"
+
group
.
getStoreGroupName
()
+
"】"
);
}
return
i
;
}
...
...
gic-store-service/src/main/java/com/gic/store/strategy/impl/StorePhoneStategyImpl.java
View file @
50fd329d
...
...
@@ -19,17 +19,17 @@ public class StorePhoneStategyImpl implements BulkUpdateStoreStrtegy {
public
int
bulkUpdateStore
(
String
storeInfoIds
,
Integer
enterpriseId
,
String
value
,
StoreService
storeService
,
Integer
operatorId
,
String
operatorName
)
{
int
i
=
storeService
.
bulkUpdateStoreConactsPhone
(
storeInfoIds
,
enterpriseId
,
value
);
if
(
i
>
0
)
{
List
<
Integer
>
storeIdList
;
List
<
Integer
>
storeI
nfoI
dList
;
if
(
"all"
.
equals
(
storeInfoIds
))
{
storeI
dList
=
storeService
.
listAllStore
Id
(
enterpriseId
);
storeI
nfoIdList
=
storeService
.
listAllStoreInfo
Id
(
enterpriseId
);
}
else
{
storeIdList
=
new
ArrayList
<>();
storeI
nfoI
dList
=
new
ArrayList
<>();
String
[]
storeIdArr
=
storeInfoIds
.
split
(
","
);
for
(
String
s
:
storeIdArr
)
{
storeIdList
.
add
(
Integer
.
valueOf
(
s
));
storeI
nfoI
dList
.
add
(
Integer
.
valueOf
(
s
));
}
}
storeLogService
.
saveBulkStoreInfoLog
(
storeIdList
,
enterpriseId
,
operatorId
,
operatorName
,
"门店联系电话变更为【"
+
value
+
"】"
);
storeLogService
.
saveBulkStoreInfoLog
(
storeI
nfoI
dList
,
enterpriseId
,
operatorId
,
operatorName
,
"门店联系电话变更为【"
+
value
+
"】"
);
}
return
i
;
}
...
...
gic-store-service/src/main/java/com/gic/store/strategy/impl/StorePhotoAddStrategyImpl.java
View file @
50fd329d
...
...
@@ -21,7 +21,7 @@ public class StorePhotoAddStrategyImpl implements BulkUpdateStoreStrtegy {
if
(
i
>
0
)
{
List
<
Integer
>
storeInfoIdList
;
if
(
"all"
.
equals
(
storeInfoIds
))
{
storeInfoIdList
=
storeService
.
listAllStoreId
(
enterpriseId
);
storeInfoIdList
=
storeService
.
listAllStoreI
nfoI
d
(
enterpriseId
);
}
else
{
storeInfoIdList
=
new
ArrayList
<>();
String
[]
storeIdArr
=
storeInfoIds
.
split
(
","
);
...
...
gic-store-service/src/main/java/com/gic/store/strategy/impl/StorePhotoUpdateStrategyImpl.java
View file @
50fd329d
...
...
@@ -18,17 +18,17 @@ public class StorePhotoUpdateStrategyImpl implements BulkUpdateStoreStrtegy {
public
int
bulkUpdateStore
(
String
storeInfoIds
,
Integer
enterpriseId
,
String
value
,
StoreService
storeService
,
Integer
operatorId
,
String
operatorName
)
{
int
i
=
storeService
.
bulkUpdateStorePhoto
(
storeInfoIds
,
enterpriseId
,
value
);
if
(
i
>
0
)
{
List
<
Integer
>
storeIdList
;
List
<
Integer
>
storeI
nfoI
dList
;
if
(
"all"
.
equals
(
storeInfoIds
))
{
storeI
dList
=
storeService
.
listAllStore
Id
(
enterpriseId
);
storeI
nfoIdList
=
storeService
.
listAllStoreInfo
Id
(
enterpriseId
);
}
else
{
storeIdList
=
new
ArrayList
<>();
storeI
nfoI
dList
=
new
ArrayList
<>();
String
[]
storeIdArr
=
storeInfoIds
.
split
(
","
);
for
(
String
s
:
storeIdArr
)
{
storeIdList
.
add
(
Integer
.
valueOf
(
s
));
storeI
nfoI
dList
.
add
(
Integer
.
valueOf
(
s
));
}
}
storeLogService
.
saveBulkStoreInfoLog
(
storeIdList
,
enterpriseId
,
operatorId
,
operatorName
,
"门店照片变更"
);
storeLogService
.
saveBulkStoreInfoLog
(
storeI
nfoI
dList
,
enterpriseId
,
operatorId
,
operatorName
,
"门店照片变更"
);
}
return
i
;
}
...
...
gic-store-service/src/main/java/com/gic/store/strategy/impl/StoreStatusStrategyImpl.java
View file @
50fd329d
package
com
.
gic
.
store
.
strategy
.
impl
;
import
com.gic.spark.api.service.SparkJobApiService
;
import
com.gic.store.constant.StoreStatusEnum
;
import
com.gic.store.service.StoreLogService
;
import
com.gic.store.service.StoreService
;
...
...
@@ -15,6 +16,8 @@ public class StoreStatusStrategyImpl implements BulkUpdateStoreStrtegy {
@Autowired
private
StoreLogService
storeLogService
;
@Autowired
private
SparkJobApiService
sparkJobApiService
;
@Override
public
int
bulkUpdateStore
(
String
storeInfoIds
,
Integer
enterpriseId
,
String
value
,
StoreService
storeService
,
Integer
operatorId
,
String
operatorName
)
{
...
...
@@ -22,7 +25,7 @@ public class StoreStatusStrategyImpl implements BulkUpdateStoreStrtegy {
if
(
i
>
0
)
{
List
<
Integer
>
storeInfoIdList
;
if
(
"all"
.
equals
(
storeInfoIds
))
{
storeInfoIdList
=
storeService
.
listAllStoreId
(
enterpriseId
);
storeInfoIdList
=
storeService
.
listAllStoreI
nfoI
d
(
enterpriseId
);
}
else
{
storeInfoIdList
=
new
ArrayList
<>();
String
[]
storeIdArr
=
storeInfoIds
.
split
(
","
);
...
...
@@ -30,7 +33,13 @@ public class StoreStatusStrategyImpl implements BulkUpdateStoreStrtegy {
storeInfoIdList
.
add
(
Integer
.
valueOf
(
s
));
}
}
storeLogService
.
saveBulkStoreStatusLog
(
storeInfoIdList
,
enterpriseId
,
operatorId
,
operatorName
,
"门店状态变更为【"
+
StoreStatusEnum
.
parseCode
(
Integer
.
parseInt
(
value
))
+
"】"
);
int
valueCode
=
Integer
.
parseInt
(
value
);
storeLogService
.
saveBulkStoreStatusLog
(
storeInfoIdList
,
enterpriseId
,
operatorId
,
operatorName
,
"门店状态变更为【"
+
StoreStatusEnum
.
parseCode
(
valueCode
)
+
"】"
);
for
(
Integer
storeInfoId
:
storeInfoIdList
)
{
// 启用禁用的值和会员组取的不一致 需要转换下
sparkJobApiService
.
updateStoreStatus
(
enterpriseId
,
storeInfoId
,
StoreStatusEnum
.
ONLINE
.
getCode
()
==
valueCode
?
0
:
1
);
}
}
return
i
;
}
...
...
gic-store-service/src/main/resources/dubbo-gic-store-service.xml
View file @
50fd329d
...
...
@@ -68,4 +68,5 @@
<dubbo:reference
interface=
"com.gic.weimob.api.service.WeimobStoreSiteService"
id=
"weimobStoreSiteService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.enterprise.service.WmStoreSyncLogApiService"
id=
"wmStoreSyncLogApiService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.spark.api.service.SparkJobApiService"
id=
"sparkJobApiService"
timeout=
"6000"
/>
</beans>
gic-store-service/src/main/resources/mapper/TabClerkMapper.xml
View file @
50fd329d
...
...
@@ -402,4 +402,10 @@
</if>
</where>
</select>
<select
id=
"listAllClerkId"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_clerk
where enterprise_id = #{enterpriseId}
</select>
</mapper>
\ No newline at end of file
gic-store-service/src/main/resources/mapper/TabStoreInfoMapper.xml
View file @
50fd329d
...
...
@@ -484,6 +484,10 @@
select t1.store_info_id from tab_store_info t1,tab_store t2 where t2.enterprise_id=#{enterpriseId}
and t1.store_info_id=t2.store_info_id and t1.overflow_status=0
</select>
<select
id=
"listAllstoreId"
resultType=
"Integer"
>
select t2.store_id from tab_store_info t1,tab_store t2 where t2.enterprise_id=#{enterpriseId}
and t1.store_info_id=t2.store_info_id and t1.overflow_status=0
</select>
<select
id=
"getByStore"
resultMap=
"BaseResultMap"
parameterType=
"com.gic.store.dto.StoreDTO"
>
select
<include
refid=
"Base_Column_List"
>
...
...
gic-store-web/src/main/java/com/gic/store/web/controller/StoreController.java
View file @
50fd329d
...
...
@@ -187,6 +187,12 @@ public class StoreController extends DownloadUtils {
}
else
{
returnFileds
+=
","
+
obj
.
toString
();
}
if
(!
returnFileds
.
contains
(
StoreESFieldsEnum
.
COMPLETESTATUS
.
getField
()))
{
returnFileds
+=
","
+
StoreESFieldsEnum
.
COMPLETESTATUS
.
getField
();
}
if
(!
returnFileds
.
contains
(
StoreESFieldsEnum
.
STATUS
.
getField
()))
{
returnFileds
+=
","
+
StoreESFieldsEnum
.
STATUS
.
getField
();
}
ServiceResponse
<
Page
<
StoreDTO
>>
serviceResponse
=
storeApiService
.
listStore
(
storeSearchDTO
,
storeSearchDTO
.
getCurrentPage
(),
storeSearchDTO
.
getPageSize
(),
returnFileds
);
if
(
serviceResponse
.
isSuccess
())
{
Page
<
StoreDTO
>
page
=
serviceResponse
.
getResult
();
...
...
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