Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
store-system
Project
Project
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
luoyangfei
store-system
Commits
44795c45
Commit
44795c45
authored
Nov 14, 2018
by
wangyihao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
5be36c18
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
99 additions
and
44 deletions
+99
-44
StoreMgtApplication.java
...-system/src/main/java/cn/com/fqy/StoreMgtApplication.java
+2
-1
StoreTimeTask.java
.../main/java/cn/com/fqy/common/timedTask/StoreTimeTask.java
+2
-1
ConfigController.java
...ain/java/cn/com/fqy/controller/mapi/ConfigController.java
+41
-16
IndexController.java
...main/java/cn/com/fqy/controller/mapi/IndexController.java
+50
-24
StoreMapper.xml
...-system/src/main/resources/mybatis/mapper/StoreMapper.xml
+2
-1
WorkerMapper.xml
...system/src/main/resources/mybatis/mapper/WorkerMapper.xml
+2
-1
No files found.
2code/server/store-system/src/main/java/cn/com/fqy/StoreMgtApplication.java
View file @
44795c45
...
...
@@ -3,7 +3,8 @@ package cn.com.fqy;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
@EnableScheduling
@SpringBootApplication
@MapperScan
(
basePackages
=
"cn.com.fqy.core.dao"
)
public
class
StoreMgtApplication
{
...
...
2code/server/store-system/src/main/java/cn/com/fqy/common/timedTask/StoreTimeTask.java
View file @
44795c45
...
...
@@ -8,6 +8,7 @@ import javax.annotation.Resource;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
cn.com.fqy.common.Operator
;
import
cn.com.fqy.common.ResultInfo
;
...
...
@@ -15,7 +16,7 @@ import cn.com.fqy.common.constants.Constant;
import
cn.com.fqy.core.model.Query
;
import
cn.com.fqy.core.model.Store
;
import
cn.com.fqy.core.service.StoreService
;
@Component
public
class
StoreTimeTask
{
private
static
final
Log
log
=
LogFactory
.
getLog
(
StoreTimeTask
.
class
);
...
...
2code/server/store-system/src/main/java/cn/com/fqy/controller/mapi/ConfigController.java
View file @
44795c45
package
cn
.
com
.
fqy
.
controller
.
mapi
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
javax.annotation.Resource
;
...
...
@@ -21,7 +24,7 @@ import cn.com.fqy.core.service.DataDictItemService;
*
*/
@Controller
@RequestMapping
(
"config"
)
@RequestMapping
(
"
h5/
config"
)
public
class
ConfigController
extends
BaseController
{
@Resource
...
...
@@ -39,16 +42,24 @@ public class ConfigController extends BaseController{
*/
@RequestMapping
(
"getDataDictsStore"
)
@ResponseBody
public
ResultInfo
<
List
<
DataDictItem
>>
getDataDictsStore
(){
ResultInfo
<
List
<
DataDictItem
>>
result
=
new
ResultInfo
<>();
public
ResultInfo
<
List
<
Map
<
String
,
Object
>>>
getDataDictsStore
(){
ResultInfo
<
List
<
Map
<
String
,
Object
>>>
result
=
new
ResultInfo
<>();
List
<
Map
<
String
,
Object
>>
listQuery
=
new
ArrayList
<>();
DataDictItem
dataDictItem
=
new
DataDictItem
();
dataDictItem
.
setIsAvailable
(
1
);
dataDictItem
.
setIsDeleted
(
0
);
dataDictItem
.
setDataDictCatCode
(
"CONSUME_INTERVAL"
);
List
<
DataDictItem
>
list
=
dataDictItemService
.
getDataDictItemList
(
new
Query
(
dataDictItem
));
if
(
list
.
size
()>
0
)
{
List
<
DataDictItem
>
stoList
=
dataDictItemService
.
getDataDictItemList
(
new
Query
(
dataDictItem
));
if
(
stoList
.
size
()>
0
&&
stoList
!=
null
)
{
for
(
DataDictItem
list:
stoList
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"dataDictItemId"
,
list
.
getDataDictItemId
());
map
.
put
(
"itemValue"
,
list
.
getItemValue
());
listQuery
.
add
(
map
);
}
result
.
setCode
(
"1"
);
result
.
setData
(
list
);
result
.
setData
(
list
Query
);
}
else
{
result
.
setCode
(
"0"
);
result
.
setMsg
(
"暂无数据"
);
...
...
@@ -66,16 +77,23 @@ public class ConfigController extends BaseController{
*/
@RequestMapping
(
"getDataDictsHight"
)
@ResponseBody
public
ResultInfo
<
List
<
DataDictItem
>>
getDataDictsHight
(){
ResultInfo
<
List
<
DataDictItem
>>
result
=
new
ResultInfo
<>();
public
ResultInfo
<
List
<
Map
<
String
,
Object
>>>
getDataDictsHight
(){
ResultInfo
<
List
<
Map
<
String
,
Object
>>>
result
=
new
ResultInfo
<>();
List
<
Map
<
String
,
Object
>>
listQuery
=
new
ArrayList
<>();
DataDictItem
dataDictItem
=
new
DataDictItem
();
dataDictItem
.
setIsAvailable
(
1
);
dataDictItem
.
setIsDeleted
(
0
);
dataDictItem
.
setDataDictCatCode
(
"WORKER_HEIGHT"
);
List
<
DataDictItem
>
list
=
dataDictItemService
.
getDataDictItemList
(
new
Query
(
dataDictItem
));
if
(
list
.
size
()>
0
)
{
List
<
DataDictItem
>
higList
=
dataDictItemService
.
getDataDictItemList
(
new
Query
(
dataDictItem
));
if
(
higList
.
size
()>
0
&&
higList
!=
null
)
{
for
(
DataDictItem
list:
higList
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"dataDictItemId"
,
list
.
getDataDictItemId
());
map
.
put
(
"itemValue"
,
list
.
getItemValue
());
listQuery
.
add
(
map
);
}
result
.
setCode
(
"1"
);
result
.
setData
(
list
);
result
.
setData
(
list
Query
);
}
else
{
result
.
setCode
(
"0"
);
result
.
setMsg
(
"暂无数据"
);
...
...
@@ -92,16 +110,23 @@ public class ConfigController extends BaseController{
*/
@RequestMapping
(
"getDataDictsAge"
)
@ResponseBody
public
ResultInfo
<
List
<
DataDictItem
>>
getDataDictsAge
(){
ResultInfo
<
List
<
DataDictItem
>>
result
=
new
ResultInfo
<>();
public
ResultInfo
<
List
<
Map
<
String
,
Object
>>>
getDataDictsAge
(){
ResultInfo
<
List
<
Map
<
String
,
Object
>>>
result
=
new
ResultInfo
<>();
List
<
Map
<
String
,
Object
>>
listQuery
=
new
ArrayList
<>();
DataDictItem
dataDictItem
=
new
DataDictItem
();
dataDictItem
.
setIsAvailable
(
1
);
dataDictItem
.
setIsDeleted
(
0
);
dataDictItem
.
setDataDictCatCode
(
"WORKER_AGE"
);
List
<
DataDictItem
>
list
=
dataDictItemService
.
getDataDictItemList
(
new
Query
(
dataDictItem
));
if
(
list
.
size
()>
0
)
{
List
<
DataDictItem
>
ageList
=
dataDictItemService
.
getDataDictItemList
(
new
Query
(
dataDictItem
));
if
(
ageList
.
size
()>
0
&&
ageList
!=
null
)
{
for
(
DataDictItem
list:
ageList
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"dataDictItemId"
,
list
.
getDataDictItemId
());
map
.
put
(
"itemValue"
,
list
.
getItemValue
());
listQuery
.
add
(
map
);
}
result
.
setCode
(
"1"
);
result
.
setData
(
list
);
result
.
setData
(
list
Query
);
}
else
{
result
.
setCode
(
"0"
);
result
.
setMsg
(
"暂无数据"
);
...
...
2code/server/store-system/src/main/java/cn/com/fqy/controller/mapi/IndexController.java
View file @
44795c45
package
cn
.
com
.
fqy
.
controller
.
mapi
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
javax.annotation.Resource
;
...
...
@@ -42,15 +44,22 @@ public class IndexController {
*/
@RequestMapping
(
"getAdvertList"
)
@ResponseBody
public
ResultInfo
<
List
<
Advert
>>
getAdvertList
()
{
ResultInfo
<
List
<
Advert
>>
resultInfo
=
new
ResultInfo
<
List
<
Advert
>>();
public
ResultInfo
<
List
<
Map
<
String
,
Object
>>>
getAdvertList
()
{
ResultInfo
<
List
<
Map
<
String
,
Object
>>>
resultInfo
=
new
ResultInfo
<>();
List
<
Map
<
String
,
Object
>>
listQuery
=
new
ArrayList
<>();
Advert
advert
=
new
Advert
();
advert
.
setIsAvailable
(
1
);
// 可用
Query
q
=
new
Query
(
advert
);
PageFinder
<
Advert
>
pageResult
=
advertService
.
getAdvertPagedList
(
q
);
if
(
null
!=
pageResult
&&
pageResult
.
getData
().
size
()
>
0
)
{
List
<
Advert
>
result
=
pageResult
.
getData
();
resultInfo
.
setData
(
result
);
List
<
Advert
>
advList
=
advertService
.
getAdvertList
(
new
Query
(
advert
));
if
(
null
!=
advList
&&
advList
.
size
()
>
0
)
{
for
(
Advert
list:
advList
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"advertId"
,
list
.
getAdvertId
());
map
.
put
(
"advertPicUrl"
,
list
.
getAdvertPicUrl
());
map
.
put
(
"advertContent"
,
list
.
getAdvertContent
());
map
.
put
(
"advertTitle"
,
list
.
getAdvertTitle
());
listQuery
.
add
(
map
);
}
resultInfo
.
setData
(
listQuery
);
resultInfo
.
setCode
(
Constant
.
SUCCESS
);
resultInfo
.
setMsg
(
"请求成功"
);
}
else
{
...
...
@@ -67,16 +76,23 @@ public class IndexController {
@ResponseBody
public
ResultInfo
<
List
<
Store
>>
getStoreList
()
{
ResultInfo
<
List
<
Store
>>
resultInfo
=
new
ResultInfo
<
List
<
Store
>>();
List
<
Store
>
listQuery
=
new
ArrayList
<>();
Store
store
=
new
Store
();
store
.
setIsDeleted
(
0
);
// 未删除
store
.
setIsA
vailable
(
1
);
// 店铺启用状态
store
.
setIsA
uditing
(
1
);
// 店铺启用状态
store
.
setIsShopping
(
1
);
// 店铺展示状态
store
.
setIsRecommend
(
1
);
// 店铺推荐状态
Query
q
=
new
Query
(
store
);
PageFinder
<
Store
>
pageResult
=
storeService
.
getStorePagedList
(
q
);
if
(
null
!=
pageResult
&&
pageResult
.
getData
().
size
()
>
0
)
{
List
<
Store
>
result
=
pageResult
.
getData
();
resultInfo
.
setData
(
result
);
List
<
Store
>
stoList
=
storeService
.
getStoreList
(
new
Query
(
store
));
if
(
null
!=
stoList
&&
stoList
.
size
()
>
0
)
{
int
number
=
0
;
if
(
stoList
.
size
()>
3
)
{
number
=
3
;
}
else
{
number
=
stoList
.
size
();
}
for
(
int
i
=
0
;
i
<
number
;
i
++)
{
listQuery
.
add
(
stoList
.
get
(
i
));
}
resultInfo
.
setData
(
listQuery
);
resultInfo
.
setCode
(
Constant
.
SUCCESS
);
resultInfo
.
setMsg
(
"请求成功"
);
}
else
{
...
...
@@ -93,16 +109,25 @@ public class IndexController {
@ResponseBody
public
ResultInfo
<
List
<
Worker
>>
getWorkerList
()
{
ResultInfo
<
List
<
Worker
>>
resultInfo
=
new
ResultInfo
<
List
<
Worker
>>();
List
<
Worker
>
listQuery
=
new
ArrayList
<>();
Worker
worker
=
new
Worker
();
worker
.
setIsDeleted
(
0
);
// 未删除
worker
.
setIsAuditing
(
1
);
// 已审核
worker
.
setIsShopping
(
1
);
// 已展示
worker
.
setIsRecommend
(
1
);
// 已推荐
Query
q
=
new
Query
(
worker
);
PageFinder
<
Worker
>
pageResult
=
workerService
.
getWorkerPagedList
(
q
);
if
(
null
!=
pageResult
&&
pageResult
.
getData
().
size
()
>
0
)
{
List
<
Worker
>
result
=
pageResult
.
getData
();
resultInfo
.
setData
(
result
);
worker
.
setIsShopping
(
1
);
// 员工展示状态
worker
.
setIsAuditing
(
1
);
List
<
Worker
>
workerList
=
workerService
.
getWorkerList
(
new
Query
(
worker
));
if
(
null
!=
workerList
&&
workerList
.
size
()
>
0
)
{
int
number
=
0
;
if
(
workerList
.
size
()>
9
)
{
number
=
9
;
}
else
{
number
=
workerList
.
size
();
}
for
(
int
i
=
0
;
i
<
number
;
i
++)
{
listQuery
.
add
(
workerList
.
get
(
i
));
}
resultInfo
.
setData
(
listQuery
);
resultInfo
.
setCode
(
Constant
.
SUCCESS
);
resultInfo
.
setMsg
(
"请求成功"
);
}
else
{
...
...
@@ -135,7 +160,7 @@ public class IndexController {
ResultInfo
<
List
<
Store
>>
resultInfo
=
new
ResultInfo
<>();
List
<
Store
>
listQuery
=
new
ArrayList
<>();
store
.
setIsDeleted
(
0
);
// 未删除
store
.
setIsA
vailable
(
1
);
// 店铺启用状态
store
.
setIsA
uditing
(
1
);
// 店铺启用状态
store
.
setIsShopping
(
1
);
// 店铺展示状态
int
firstNumber
=
0
;
int
lastNUmber
=
0
;
...
...
@@ -182,7 +207,8 @@ public class IndexController {
ResultInfo
<
List
<
Worker
>>
resultInfo
=
new
ResultInfo
<>();
List
<
Worker
>
listQuery
=
new
ArrayList
<>();
worker
.
setIsDeleted
(
0
);
// 未删除
worker
.
setIsShopping
(
1
);
// 店铺展示状态
worker
.
setIsShopping
(
1
);
// 员工展示状态
worker
.
setIsAuditing
(
1
);
int
firstNumber
=
0
;
int
lastNUmber
=
0
;
int
firstNumber1
=
0
;
...
...
2code/server/store-system/src/main/resources/mybatis/mapper/StoreMapper.xml
View file @
44795c45
...
...
@@ -283,8 +283,9 @@ CITY_NAME,CITY_ID,PROVINCE_ID,COUNTY_ID
<select
id=
"queryAll"
parameterType=
"Query"
resultMap=
"Store"
>
select
<include
refid=
"CommonColumnlist"
/>
from T_STORE
<where>
<include
refid=
"listCommonWhere"
/>
<include
refid=
"listCommonWhere
1
"
/>
</where>
ORDER BY SERIAL_NUMBER ASC,CLICKS DESC
</select>
<select
id=
"pageList"
parameterType=
"Query"
resultMap=
"Store"
>
...
...
2code/server/store-system/src/main/resources/mybatis/mapper/WorkerMapper.xml
View file @
44795c45
...
...
@@ -257,8 +257,9 @@ UPDATE_TIME,OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,STORE_NAME
<select
id=
"queryAll"
parameterType=
"Query"
resultMap=
"Worker"
>
select
<include
refid=
"CommonColumnlist"
/>
from T_WORKER
<where>
<include
refid=
"listCommonWhere"
/>
<include
refid=
"listCommonWhere
1
"
/>
</where>
ORDER BY SERIAL_NUMBER ASC,CLICKS DESC
</select>
<select
id=
"pageList"
parameterType=
"Query"
resultMap=
"Worker"
>
...
...
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