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
8ea88068
Commit
8ea88068
authored
Apr 28, 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
5c4aaae4
e4671d98
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
36 additions
and
26 deletions
+36
-26
DictApiService.java
...i/src/main/java/com/gic/store/service/DictApiService.java
+1
-1
DictMapper.java
...ce/src/main/java/com/gic/store/dao/mapper/DictMapper.java
+2
-1
DictServiceImpl.java
...main/java/com/gic/store/service/impl/DictServiceImpl.java
+2
-2
DictApiServiceImpl.java
.../com/gic/store/service/outer/impl/DictApiServiceImpl.java
+2
-2
DictMapper.xml
gic-store-service/src/main/resources/mapper/DictMapper.xml
+2
-1
ClerkImportController.java
...a/com/gic/store/web/controller/ClerkImportController.java
+7
-6
StoreController.java
...in/java/com/gic/store/web/controller/StoreController.java
+13
-7
StoreImportController.java
...a/com/gic/store/web/controller/StoreImportController.java
+7
-6
No files found.
gic-store-api/src/main/java/com/gic/store/service/DictApiService.java
View file @
8ea88068
...
...
@@ -17,5 +17,5 @@ public interface DictApiService {
* @return com.gic.store.entity.TabGicDict
* @throws
*/
ServiceResponse
<
GicDictDTO
>
getDictByCode
(
String
dictType
,
String
dict
Valu
e
);
ServiceResponse
<
GicDictDTO
>
getDictByCode
(
String
dictType
,
String
dict
Cod
e
);
}
gic-store-service/src/main/java/com/gic/store/dao/mapper/DictMapper.java
View file @
8ea88068
...
...
@@ -52,5 +52,5 @@ public interface DictMapper {
*/
int
updateByPrimaryKey
(
TabGicDict
record
);
TabGicDict
getDictByCode
(
@Param
(
"dictType"
)
String
dictType
,
@Param
(
"dict
Value"
)
String
dictValu
e
);
TabGicDict
getDictByCode
(
@Param
(
"dictType"
)
String
dictType
,
@Param
(
"dict
Code"
)
String
dictCod
e
);
}
\ No newline at end of file
gic-store-service/src/main/java/com/gic/store/service/impl/DictServiceImpl.java
View file @
8ea88068
...
...
@@ -19,7 +19,7 @@ public class DictServiceImpl implements DictService {
@Override
public
TabGicDict
getDictByCode
(
String
dictType
,
String
dict
Valu
e
)
{
return
dictMapper
.
getDictByCode
(
dictType
,
dict
Valu
e
);
public
TabGicDict
getDictByCode
(
String
dictType
,
String
dict
Cod
e
)
{
return
dictMapper
.
getDictByCode
(
dictType
,
dict
Cod
e
);
}
}
gic-store-service/src/main/java/com/gic/store/service/outer/impl/DictApiServiceImpl.java
View file @
8ea88068
...
...
@@ -22,8 +22,8 @@ public class DictApiServiceImpl implements DictApiService {
private
DictService
dictService
;
@Override
public
ServiceResponse
<
GicDictDTO
>
getDictByCode
(
String
dictType
,
String
dict
Valu
e
)
{
TabGicDict
dict
=
dictService
.
getDictByCode
(
dictType
,
dict
Valu
e
);
public
ServiceResponse
<
GicDictDTO
>
getDictByCode
(
String
dictType
,
String
dict
Cod
e
)
{
TabGicDict
dict
=
dictService
.
getDictByCode
(
dictType
,
dict
Cod
e
);
GicDictDTO
gicDictDTO
=
EntityUtil
.
changeEntityByJSON
(
GicDictDTO
.
class
,
dict
);
return
EnterpriseServiceResponse
.
success
(
gicDictDTO
);
}
...
...
gic-store-service/src/main/resources/mapper/DictMapper.xml
View file @
8ea88068
...
...
@@ -130,6 +130,6 @@
<include
refid=
"Base_Column_List"
/>
from tab_gic_dict
where
dict_type = #{dictType} and dict_
value = #{dictValu
e}
dict_type = #{dictType} and dict_
code = #{dictCod
e}
</select>
</mapper>
\ No newline at end of file
gic-store-web/src/main/java/com/gic/store/web/controller/ClerkImportController.java
View file @
8ea88068
...
...
@@ -138,12 +138,18 @@ public class ClerkImportController {
}
catch
(
Exception
e
)
{
logger
.
warn
(
e
);
}
if
(
logCount
>
3
)
{
if
(
logCount
<=
3
)
{
sb
.
append
(
bean
.
getStoreName
()).
append
(
","
);
}
logCount
++;
}
if
(
sb
.
length
()
>
0
&&
logCount
>
0
)
{
sb
.
deleteCharAt
(
sb
.
length
()
-
1
);
sb
.
append
(
"等"
).
append
(
logCount
).
append
(
"名导购"
);
}
LogUtils
.
createLog
(
"批量导入"
,
sb
.
toString
());
if
(
clerkImportApiService
.
hasImportingClerk
(
enterpriseId
).
getResult
())
{
// 开队列
String
r
=
clerkImportApiService
.
importDataToClerk
(
enterpriseId
,
"123"
,
uuId
).
getResult
();
...
...
@@ -151,11 +157,6 @@ public class ClerkImportController {
logger
.
warn
(
"队列错误, {}"
,
r
);
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"网络错误"
);
}
if
(
sb
.
length
()
>
0
&&
logCount
>
0
)
{
sb
.
deleteCharAt
(
sb
.
length
()
-
1
);
sb
.
append
(
"等"
).
append
(
logCount
).
append
(
"名导购"
);
}
LogUtils
.
createLog
(
"批量导入"
,
sb
.
toString
());
}
else
{
Page
page
=
clerkImportApiService
.
listClerkTmp
(
enterpriseId
,
false
,
pageQO
.
getCurrentPage
(),
pageQO
.
getPageSize
()).
getResult
();
Map
<
Object
,
Object
>
result
=
new
HashMap
<>(
8
);
...
...
gic-store-web/src/main/java/com/gic/store/web/controller/StoreController.java
View file @
8ea88068
...
...
@@ -34,6 +34,7 @@ import com.gic.store.web.vo.StoreListSourceVO;
import
com.gic.store.web.vo.StoreOverflowVO
;
import
com.gic.wechat.business.api.service.fwh.WeixinBaseFunService
;
import
com.gic.wechat.business.api.service.wxa.WeixinWxaFunService
;
import
com.google.common.base.Joiner
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
...
...
@@ -302,15 +303,20 @@ public class StoreController extends DownloadUtils {
}
ServiceResponse
response
=
this
.
storeApiService
.
bulkUpdateStore
(
storeIds
,
value
,
enterpriseId
,
type
,
UserDetailUtils
.
getUserDetail
().
getUserId
(),
UserDetailUtils
.
getUserDetail
().
getUserInfo
().
getUserName
());
if
(
response
.
isSuccess
())
{
String
[]
storeArr
=
storeIds
.
split
(
","
);
StoreSearchDTO
storeSearchDTO
=
new
StoreSearchDTO
();
List
<
StoreDTO
>
storeList
=
this
.
storeApiService
.
listStore
(
storeSearchDTO
,
1
,
3
).
getResult
().
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
storeList
))
{
String
storeName
=
storeList
.
stream
().
map
(
StoreDTO:
:
getStoreName
).
reduce
((
x
,
y
)
->
x
+
","
+
y
).
get
();
String
[]
storeArr
=
storeIds
.
split
(
","
);
if
(
storeArr
.
length
>
3
)
{
storeName
+=
"等"
+
storeArr
.
length
+
"家门店"
;
storeSearchDTO
.
setEnterpriseId
(
enterpriseId
);
storeSearchDTO
.
setStoreIds
(
Joiner
.
on
(
" "
).
join
(
storeArr
));
Page
<
StoreDTO
>
page
=
this
.
storeApiService
.
listStore
(
storeSearchDTO
,
1
,
3
).
getResult
();
if
(
page
!=
null
&&
CollectionUtils
.
isNotEmpty
(
page
.
getResult
()))
{
List
<
StoreDTO
>
storeList
=
page
.
getResult
();
if
(
CollectionUtils
.
isNotEmpty
(
storeList
))
{
String
storeName
=
storeList
.
stream
().
map
(
StoreDTO:
:
getStoreName
).
reduce
((
x
,
y
)
->
x
+
","
+
y
).
get
();
if
(
storeArr
.
length
>
3
)
{
storeName
+=
"等"
+
storeArr
.
length
+
"家门店"
;
}
LogUtils
.
createLog
(
type
==
1
?
"修改启用状态"
:
"批量编辑"
,
storeName
);
}
LogUtils
.
createLog
(
type
==
1
?
"修改启用状态"
:
"批量编辑"
,
storeName
);
}
return
RestResponse
.
success
();
}
...
...
gic-store-web/src/main/java/com/gic/store/web/controller/StoreImportController.java
View file @
8ea88068
...
...
@@ -162,12 +162,18 @@ public class StoreImportController {
}
catch
(
Exception
e
)
{
logger
.
warn
(
e
);
}
if
(
logCount
>
3
)
{
if
(
logCount
<=
3
)
{
sb
.
append
(
bean
.
getStoreName
()).
append
(
","
);
}
logCount
++;
}
if
(
sb
.
length
()
>
0
&&
logCount
>
0
)
{
sb
.
deleteCharAt
(
sb
.
length
()
-
1
);
sb
.
append
(
"等"
).
append
(
logCount
).
append
(
"家门店"
);
}
LogUtils
.
createLog
(
"批量导入"
,
sb
.
toString
());
if
(
storeImportApiService
.
hasImportingStore
(
enterpriseId
).
getResult
())
{
// userId
Integer
userId
=
UserDetailUtils
.
getUserDetail
().
getUserInfo
().
getUserId
();
...
...
@@ -177,11 +183,6 @@ public class StoreImportController {
logger
.
warn
(
"队列错误, {}"
,
r
);
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"网络错误"
);
}
if
(
sb
.
length
()
>
0
&&
logCount
>
0
)
{
sb
.
deleteCharAt
(
sb
.
length
()
-
1
);
sb
.
append
(
"等"
).
append
(
logCount
).
append
(
"家门店"
);
}
LogUtils
.
createLog
(
"批量导入"
,
sb
.
toString
());
}
else
{
Page
page
=
storeImportApiService
.
listStoreTmp
(
enterpriseId
,
false
,
pageQO
.
getCurrentPage
(),
pageQO
.
getPageSize
()).
getResult
();
Map
<
Object
,
Object
>
result
=
new
HashMap
<>(
8
);
...
...
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