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
79cd054e
Commit
79cd054e
authored
Nov 14, 2018
by
燕南天
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.fqyxa.com:luoyangfei/store-system
parents
f35fb4a2
44795c45
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 @
79cd054e
...
@@ -3,7 +3,8 @@ package cn.com.fqy;
...
@@ -3,7 +3,8 @@ package cn.com.fqy;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
@EnableScheduling
@SpringBootApplication
@SpringBootApplication
@MapperScan
(
basePackages
=
"cn.com.fqy.core.dao"
)
@MapperScan
(
basePackages
=
"cn.com.fqy.core.dao"
)
public
class
StoreMgtApplication
{
public
class
StoreMgtApplication
{
...
...
2code/server/store-system/src/main/java/cn/com/fqy/common/timedTask/StoreTimeTask.java
View file @
79cd054e
...
@@ -8,6 +8,7 @@ import javax.annotation.Resource;
...
@@ -8,6 +8,7 @@ import javax.annotation.Resource;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
org.apache.commons.logging.LogFactory
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
cn.com.fqy.common.Operator
;
import
cn.com.fqy.common.Operator
;
import
cn.com.fqy.common.ResultInfo
;
import
cn.com.fqy.common.ResultInfo
;
...
@@ -15,7 +16,7 @@ import cn.com.fqy.common.constants.Constant;
...
@@ -15,7 +16,7 @@ import cn.com.fqy.common.constants.Constant;
import
cn.com.fqy.core.model.Query
;
import
cn.com.fqy.core.model.Query
;
import
cn.com.fqy.core.model.Store
;
import
cn.com.fqy.core.model.Store
;
import
cn.com.fqy.core.service.StoreService
;
import
cn.com.fqy.core.service.StoreService
;
@Component
public
class
StoreTimeTask
{
public
class
StoreTimeTask
{
private
static
final
Log
log
=
LogFactory
.
getLog
(
StoreTimeTask
.
class
);
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 @
79cd054e
package
cn
.
com
.
fqy
.
controller
.
mapi
;
package
cn
.
com
.
fqy
.
controller
.
mapi
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
...
@@ -21,7 +24,7 @@ import cn.com.fqy.core.service.DataDictItemService;
...
@@ -21,7 +24,7 @@ import cn.com.fqy.core.service.DataDictItemService;
*
*
*/
*/
@Controller
@Controller
@RequestMapping
(
"config"
)
@RequestMapping
(
"
h5/
config"
)
public
class
ConfigController
extends
BaseController
{
public
class
ConfigController
extends
BaseController
{
@Resource
@Resource
...
@@ -39,16 +42,24 @@ public class ConfigController extends BaseController{
...
@@ -39,16 +42,24 @@ public class ConfigController extends BaseController{
*/
*/
@RequestMapping
(
"getDataDictsStore"
)
@RequestMapping
(
"getDataDictsStore"
)
@ResponseBody
@ResponseBody
public
ResultInfo
<
List
<
DataDictItem
>>
getDataDictsStore
(){
public
ResultInfo
<
List
<
Map
<
String
,
Object
>>>
getDataDictsStore
(){
ResultInfo
<
List
<
DataDictItem
>>
result
=
new
ResultInfo
<>();
ResultInfo
<
List
<
Map
<
String
,
Object
>>>
result
=
new
ResultInfo
<>();
List
<
Map
<
String
,
Object
>>
listQuery
=
new
ArrayList
<>();
DataDictItem
dataDictItem
=
new
DataDictItem
();
DataDictItem
dataDictItem
=
new
DataDictItem
();
dataDictItem
.
setIsAvailable
(
1
);
dataDictItem
.
setIsAvailable
(
1
);
dataDictItem
.
setIsDeleted
(
0
);
dataDictItem
.
setIsDeleted
(
0
);
dataDictItem
.
setDataDictCatCode
(
"CONSUME_INTERVAL"
);
dataDictItem
.
setDataDictCatCode
(
"CONSUME_INTERVAL"
);
List
<
DataDictItem
>
list
=
dataDictItemService
.
getDataDictItemList
(
new
Query
(
dataDictItem
));
List
<
DataDictItem
>
stoList
=
dataDictItemService
.
getDataDictItemList
(
new
Query
(
dataDictItem
));
if
(
list
.
size
()>
0
)
{
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
.
setCode
(
"1"
);
result
.
setData
(
list
);
result
.
setData
(
list
Query
);
}
else
{
}
else
{
result
.
setCode
(
"0"
);
result
.
setCode
(
"0"
);
result
.
setMsg
(
"暂无数据"
);
result
.
setMsg
(
"暂无数据"
);
...
@@ -66,16 +77,23 @@ public class ConfigController extends BaseController{
...
@@ -66,16 +77,23 @@ public class ConfigController extends BaseController{
*/
*/
@RequestMapping
(
"getDataDictsHight"
)
@RequestMapping
(
"getDataDictsHight"
)
@ResponseBody
@ResponseBody
public
ResultInfo
<
List
<
DataDictItem
>>
getDataDictsHight
(){
public
ResultInfo
<
List
<
Map
<
String
,
Object
>>>
getDataDictsHight
(){
ResultInfo
<
List
<
DataDictItem
>>
result
=
new
ResultInfo
<>();
ResultInfo
<
List
<
Map
<
String
,
Object
>>>
result
=
new
ResultInfo
<>();
List
<
Map
<
String
,
Object
>>
listQuery
=
new
ArrayList
<>();
DataDictItem
dataDictItem
=
new
DataDictItem
();
DataDictItem
dataDictItem
=
new
DataDictItem
();
dataDictItem
.
setIsAvailable
(
1
);
dataDictItem
.
setIsAvailable
(
1
);
dataDictItem
.
setIsDeleted
(
0
);
dataDictItem
.
setIsDeleted
(
0
);
dataDictItem
.
setDataDictCatCode
(
"WORKER_HEIGHT"
);
dataDictItem
.
setDataDictCatCode
(
"WORKER_HEIGHT"
);
List
<
DataDictItem
>
list
=
dataDictItemService
.
getDataDictItemList
(
new
Query
(
dataDictItem
));
List
<
DataDictItem
>
higList
=
dataDictItemService
.
getDataDictItemList
(
new
Query
(
dataDictItem
));
if
(
list
.
size
()>
0
)
{
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
.
setCode
(
"1"
);
result
.
setData
(
list
);
result
.
setData
(
list
Query
);
}
else
{
}
else
{
result
.
setCode
(
"0"
);
result
.
setCode
(
"0"
);
result
.
setMsg
(
"暂无数据"
);
result
.
setMsg
(
"暂无数据"
);
...
@@ -92,16 +110,23 @@ public class ConfigController extends BaseController{
...
@@ -92,16 +110,23 @@ public class ConfigController extends BaseController{
*/
*/
@RequestMapping
(
"getDataDictsAge"
)
@RequestMapping
(
"getDataDictsAge"
)
@ResponseBody
@ResponseBody
public
ResultInfo
<
List
<
DataDictItem
>>
getDataDictsAge
(){
public
ResultInfo
<
List
<
Map
<
String
,
Object
>>>
getDataDictsAge
(){
ResultInfo
<
List
<
DataDictItem
>>
result
=
new
ResultInfo
<>();
ResultInfo
<
List
<
Map
<
String
,
Object
>>>
result
=
new
ResultInfo
<>();
List
<
Map
<
String
,
Object
>>
listQuery
=
new
ArrayList
<>();
DataDictItem
dataDictItem
=
new
DataDictItem
();
DataDictItem
dataDictItem
=
new
DataDictItem
();
dataDictItem
.
setIsAvailable
(
1
);
dataDictItem
.
setIsAvailable
(
1
);
dataDictItem
.
setIsDeleted
(
0
);
dataDictItem
.
setIsDeleted
(
0
);
dataDictItem
.
setDataDictCatCode
(
"WORKER_AGE"
);
dataDictItem
.
setDataDictCatCode
(
"WORKER_AGE"
);
List
<
DataDictItem
>
list
=
dataDictItemService
.
getDataDictItemList
(
new
Query
(
dataDictItem
));
List
<
DataDictItem
>
ageList
=
dataDictItemService
.
getDataDictItemList
(
new
Query
(
dataDictItem
));
if
(
list
.
size
()>
0
)
{
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
.
setCode
(
"1"
);
result
.
setData
(
list
);
result
.
setData
(
list
Query
);
}
else
{
}
else
{
result
.
setCode
(
"0"
);
result
.
setCode
(
"0"
);
result
.
setMsg
(
"暂无数据"
);
result
.
setMsg
(
"暂无数据"
);
...
...
2code/server/store-system/src/main/java/cn/com/fqy/controller/mapi/IndexController.java
View file @
79cd054e
package
cn
.
com
.
fqy
.
controller
.
mapi
;
package
cn
.
com
.
fqy
.
controller
.
mapi
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
...
@@ -42,15 +44,22 @@ public class IndexController {
...
@@ -42,15 +44,22 @@ public class IndexController {
*/
*/
@RequestMapping
(
"getAdvertList"
)
@RequestMapping
(
"getAdvertList"
)
@ResponseBody
@ResponseBody
public
ResultInfo
<
List
<
Advert
>>
getAdvertList
()
{
public
ResultInfo
<
List
<
Map
<
String
,
Object
>>>
getAdvertList
()
{
ResultInfo
<
List
<
Advert
>>
resultInfo
=
new
ResultInfo
<
List
<
Advert
>>();
ResultInfo
<
List
<
Map
<
String
,
Object
>>>
resultInfo
=
new
ResultInfo
<>();
List
<
Map
<
String
,
Object
>>
listQuery
=
new
ArrayList
<>();
Advert
advert
=
new
Advert
();
Advert
advert
=
new
Advert
();
advert
.
setIsAvailable
(
1
);
// 可用
advert
.
setIsAvailable
(
1
);
// 可用
Query
q
=
new
Query
(
advert
);
List
<
Advert
>
advList
=
advertService
.
getAdvertList
(
new
Query
(
advert
));
PageFinder
<
Advert
>
pageResult
=
advertService
.
getAdvertPagedList
(
q
);
if
(
null
!=
advList
&&
advList
.
size
()
>
0
)
{
if
(
null
!=
pageResult
&&
pageResult
.
getData
().
size
()
>
0
)
{
for
(
Advert
list:
advList
)
{
List
<
Advert
>
result
=
pageResult
.
getData
();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
resultInfo
.
setData
(
result
);
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
.
setCode
(
Constant
.
SUCCESS
);
resultInfo
.
setMsg
(
"请求成功"
);
resultInfo
.
setMsg
(
"请求成功"
);
}
else
{
}
else
{
...
@@ -67,16 +76,23 @@ public class IndexController {
...
@@ -67,16 +76,23 @@ public class IndexController {
@ResponseBody
@ResponseBody
public
ResultInfo
<
List
<
Store
>>
getStoreList
()
{
public
ResultInfo
<
List
<
Store
>>
getStoreList
()
{
ResultInfo
<
List
<
Store
>>
resultInfo
=
new
ResultInfo
<
List
<
Store
>>();
ResultInfo
<
List
<
Store
>>
resultInfo
=
new
ResultInfo
<
List
<
Store
>>();
List
<
Store
>
listQuery
=
new
ArrayList
<>();
Store
store
=
new
Store
();
Store
store
=
new
Store
();
store
.
setIsDeleted
(
0
);
// 未删除
store
.
setIsDeleted
(
0
);
// 未删除
store
.
setIsA
vailable
(
1
);
// 店铺启用状态
store
.
setIsA
uditing
(
1
);
// 店铺启用状态
store
.
setIsShopping
(
1
);
// 店铺展示状态
store
.
setIsShopping
(
1
);
// 店铺展示状态
store
.
setIsRecommend
(
1
);
// 店铺推荐状态
List
<
Store
>
stoList
=
storeService
.
getStoreList
(
new
Query
(
store
));
Query
q
=
new
Query
(
store
);
if
(
null
!=
stoList
&&
stoList
.
size
()
>
0
)
{
PageFinder
<
Store
>
pageResult
=
storeService
.
getStorePagedList
(
q
);
int
number
=
0
;
if
(
null
!=
pageResult
&&
pageResult
.
getData
().
size
()
>
0
)
{
if
(
stoList
.
size
()>
3
)
{
List
<
Store
>
result
=
pageResult
.
getData
();
number
=
3
;
resultInfo
.
setData
(
result
);
}
else
{
number
=
stoList
.
size
();
}
for
(
int
i
=
0
;
i
<
number
;
i
++)
{
listQuery
.
add
(
stoList
.
get
(
i
));
}
resultInfo
.
setData
(
listQuery
);
resultInfo
.
setCode
(
Constant
.
SUCCESS
);
resultInfo
.
setCode
(
Constant
.
SUCCESS
);
resultInfo
.
setMsg
(
"请求成功"
);
resultInfo
.
setMsg
(
"请求成功"
);
}
else
{
}
else
{
...
@@ -93,16 +109,25 @@ public class IndexController {
...
@@ -93,16 +109,25 @@ public class IndexController {
@ResponseBody
@ResponseBody
public
ResultInfo
<
List
<
Worker
>>
getWorkerList
()
{
public
ResultInfo
<
List
<
Worker
>>
getWorkerList
()
{
ResultInfo
<
List
<
Worker
>>
resultInfo
=
new
ResultInfo
<
List
<
Worker
>>();
ResultInfo
<
List
<
Worker
>>
resultInfo
=
new
ResultInfo
<
List
<
Worker
>>();
List
<
Worker
>
listQuery
=
new
ArrayList
<>();
Worker
worker
=
new
Worker
();
Worker
worker
=
new
Worker
();
worker
.
setIsDeleted
(
0
);
// 未删除
worker
.
setIsDeleted
(
0
);
// 未删除
worker
.
setIsAuditing
(
1
);
// 已审核
worker
.
setIsShopping
(
1
);
// 员工展示状态
worker
.
setIsShopping
(
1
);
// 已展示
worker
.
setIsAuditing
(
1
);
worker
.
setIsRecommend
(
1
);
// 已推荐
List
<
Worker
>
workerList
=
workerService
.
getWorkerList
(
new
Query
(
worker
));
Query
q
=
new
Query
(
worker
);
if
(
null
!=
workerList
&&
workerList
.
size
()
>
0
)
{
PageFinder
<
Worker
>
pageResult
=
workerService
.
getWorkerPagedList
(
q
);
int
number
=
0
;
if
(
null
!=
pageResult
&&
pageResult
.
getData
().
size
()
>
0
)
{
if
(
workerList
.
size
()>
9
)
{
List
<
Worker
>
result
=
pageResult
.
getData
();
number
=
9
;
resultInfo
.
setData
(
result
);
}
else
{
number
=
workerList
.
size
();
}
for
(
int
i
=
0
;
i
<
number
;
i
++)
{
listQuery
.
add
(
workerList
.
get
(
i
));
}
resultInfo
.
setData
(
listQuery
);
resultInfo
.
setCode
(
Constant
.
SUCCESS
);
resultInfo
.
setCode
(
Constant
.
SUCCESS
);
resultInfo
.
setMsg
(
"请求成功"
);
resultInfo
.
setMsg
(
"请求成功"
);
}
else
{
}
else
{
...
@@ -135,7 +160,7 @@ public class IndexController {
...
@@ -135,7 +160,7 @@ public class IndexController {
ResultInfo
<
List
<
Store
>>
resultInfo
=
new
ResultInfo
<>();
ResultInfo
<
List
<
Store
>>
resultInfo
=
new
ResultInfo
<>();
List
<
Store
>
listQuery
=
new
ArrayList
<>();
List
<
Store
>
listQuery
=
new
ArrayList
<>();
store
.
setIsDeleted
(
0
);
// 未删除
store
.
setIsDeleted
(
0
);
// 未删除
store
.
setIsA
vailable
(
1
);
// 店铺启用状态
store
.
setIsA
uditing
(
1
);
// 店铺启用状态
store
.
setIsShopping
(
1
);
// 店铺展示状态
store
.
setIsShopping
(
1
);
// 店铺展示状态
int
firstNumber
=
0
;
int
firstNumber
=
0
;
int
lastNUmber
=
0
;
int
lastNUmber
=
0
;
...
@@ -182,7 +207,8 @@ public class IndexController {
...
@@ -182,7 +207,8 @@ public class IndexController {
ResultInfo
<
List
<
Worker
>>
resultInfo
=
new
ResultInfo
<>();
ResultInfo
<
List
<
Worker
>>
resultInfo
=
new
ResultInfo
<>();
List
<
Worker
>
listQuery
=
new
ArrayList
<>();
List
<
Worker
>
listQuery
=
new
ArrayList
<>();
worker
.
setIsDeleted
(
0
);
// 未删除
worker
.
setIsDeleted
(
0
);
// 未删除
worker
.
setIsShopping
(
1
);
// 店铺展示状态
worker
.
setIsShopping
(
1
);
// 员工展示状态
worker
.
setIsAuditing
(
1
);
int
firstNumber
=
0
;
int
firstNumber
=
0
;
int
lastNUmber
=
0
;
int
lastNUmber
=
0
;
int
firstNumber1
=
0
;
int
firstNumber1
=
0
;
...
...
2code/server/store-system/src/main/resources/mybatis/mapper/StoreMapper.xml
View file @
79cd054e
...
@@ -283,8 +283,9 @@ CITY_NAME,CITY_ID,PROVINCE_ID,COUNTY_ID
...
@@ -283,8 +283,9 @@ CITY_NAME,CITY_ID,PROVINCE_ID,COUNTY_ID
<select
id=
"queryAll"
parameterType=
"Query"
resultMap=
"Store"
>
<select
id=
"queryAll"
parameterType=
"Query"
resultMap=
"Store"
>
select
<include
refid=
"CommonColumnlist"
/>
from T_STORE
select
<include
refid=
"CommonColumnlist"
/>
from T_STORE
<where>
<where>
<include
refid=
"listCommonWhere"
/>
<include
refid=
"listCommonWhere
1
"
/>
</where>
</where>
ORDER BY SERIAL_NUMBER ASC,CLICKS DESC
</select>
</select>
<select
id=
"pageList"
parameterType=
"Query"
resultMap=
"Store"
>
<select
id=
"pageList"
parameterType=
"Query"
resultMap=
"Store"
>
...
...
2code/server/store-system/src/main/resources/mybatis/mapper/WorkerMapper.xml
View file @
79cd054e
...
@@ -257,8 +257,9 @@ UPDATE_TIME,OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,STORE_NAME
...
@@ -257,8 +257,9 @@ UPDATE_TIME,OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,STORE_NAME
<select
id=
"queryAll"
parameterType=
"Query"
resultMap=
"Worker"
>
<select
id=
"queryAll"
parameterType=
"Query"
resultMap=
"Worker"
>
select
<include
refid=
"CommonColumnlist"
/>
from T_WORKER
select
<include
refid=
"CommonColumnlist"
/>
from T_WORKER
<where>
<where>
<include
refid=
"listCommonWhere"
/>
<include
refid=
"listCommonWhere
1
"
/>
</where>
</where>
ORDER BY SERIAL_NUMBER ASC,CLICKS DESC
</select>
</select>
<select
id=
"pageList"
parameterType=
"Query"
resultMap=
"Worker"
>
<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