Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
QianQiXiang
haoban-manage3.0
Commits
6050c2e1
Commit
6050c2e1
authored
Mar 19, 2020
by
huangZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
006096c8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
1 deletions
+44
-1
StoreController.java
...com/gic/haoban/manage/web/controller/StoreController.java
+29
-1
MyApplicationContextAware.java
...gic/haoban/manage/web/init/MyApplicationContextAware.java
+14
-0
dubbo-haoban-manage-wx.xml
...ge3-wx/src/main/webapp/WEB-INF/dubbo-haoban-manage-wx.xml
+1
-0
No files found.
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/StoreController.java
View file @
6050c2e1
...
...
@@ -5,6 +5,7 @@ import java.text.SimpleDateFormat;
import
java.util.ArrayList
;
import
java.util.Comparator
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
...
...
@@ -22,6 +23,10 @@ import com.alibaba.fastjson.JSONObject;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.dict.api.dto.CityDTO
;
import
com.gic.dict.api.dto.CountyDTO
;
import
com.gic.dict.api.dto.GlobalDictMap
;
import
com.gic.dict.api.dto.ProvinceDTO
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.dto.StorePhotoDTO
;
import
com.gic.enterprise.api.service.StoreService
;
...
...
@@ -171,7 +176,30 @@ public class StoreController extends WebBaseController{
HaobanDataDTO
HaobanDataDTO
=
haobanDataApiService
.
getSaleDataByDate
(
enterpriseId
,
storeId
,
date
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
HaobanDataDTO
);
}
//获取首页销售数据
@RequestMapping
(
"/get-area-list"
)
public
HaobanResponse
getArea
()
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
ProvinceDTO
>
provinceMap
=
GlobalDictMap
.
provinceMap
;
Map
<
String
,
CityDTO
>
cityMap
=
GlobalDictMap
.
cityMap
;
Map
<
String
,
CountyDTO
>
countyMap
=
GlobalDictMap
.
countyMap
;
List
<
ProvinceDTO
>
provinceList
=
new
ArrayList
<
ProvinceDTO
>();
List
<
CityDTO
>
cityList
=
new
ArrayList
<
CityDTO
>();
List
<
CountyDTO
>
countyList
=
new
ArrayList
<
CountyDTO
>();
for
(
String
key
:
provinceMap
.
keySet
())
{
provinceList
.
add
(
provinceMap
.
get
(
key
));
}
for
(
String
key
:
cityMap
.
keySet
())
{
cityList
.
add
(
cityMap
.
get
(
key
));
}
for
(
String
key
:
countyMap
.
keySet
())
{
countyList
.
add
(
countyMap
.
get
(
key
));
}
map
.
put
(
"province"
,
provinceList
);
map
.
put
(
"city"
,
cityList
);
map
.
put
(
"county"
,
countyList
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
map
);
}
//获取首页销售数据
@RequestMapping
(
"/change-store-detail"
)
public
HaobanResponse
saleDate
(
String
wxEnterpriseId
,
String
storeId
,
String
staffId
,
String
changeField
,
String
oldValue
,
String
newValue
)
{
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/init/MyApplicationContextAware.java
View file @
6050c2e1
...
...
@@ -3,17 +3,31 @@ package com.gic.haoban.manage.web.init;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.BeansException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.ApplicationContextAware
;
import
org.springframework.stereotype.Component
;
import
com.gic.dict.api.dto.GlobalDictMap
;
import
com.gic.dict.api.service.ManagerDictService
;
@Component
public
class
MyApplicationContextAware
implements
ApplicationContextAware
{
private
Logger
log
=
LogManager
.
getLogger
(
MyApplicationContextAware
.
class
);
private
static
ApplicationContext
applicationContext
;
@Autowired
private
ManagerDictService
managerDictService
;
@Override
public
void
setApplicationContext
(
ApplicationContext
appContext
)
throws
BeansException
{
GlobalDictMap
.
countyMap
=
managerDictService
.
getCountysMap
();
GlobalDictMap
.
cityMap
=
managerDictService
.
getCitysMap
();
GlobalDictMap
.
provinceMap
=
managerDictService
.
getProvincesMap
();
GlobalDictMap
.
dictMap
=
managerDictService
.
getDictList
();
GlobalDictMap
.
storeCategoryDictMap
=
managerDictService
.
getStoreCategoryDictList
();
log
.
info
(
"数据字典放入缓存"
);
}
}
haoban-manage3-wx/src/main/webapp/WEB-INF/dubbo-haoban-manage-wx.xml
View file @
6050c2e1
...
...
@@ -31,6 +31,7 @@
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.BindApiService"
id=
"bindApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.AuditApiService"
id=
"auditApiService"
/>
<dubbo:reference
interface=
"com.gic.haoban.manage.api.service.AuditSettingApiService"
id=
"auditSettingApiService"
/>
<dubbo:reference
interface=
"com.gic.dict.api.service.ManagerDictService"
id=
"managerDictService"
/>
<dubbo:reference
interface=
"com.gic.haoban.communicate.api.service.valid.ValidationCodeService"
id=
"validationCodeService"
/>
...
...
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