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
9a1ba06c
Commit
9a1ba06c
authored
Nov 13, 2018
by
wangyihao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 排序 新增 数据字典项查询接口
parent
6dbcc097
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
140 additions
and
5 deletions
+140
-5
ConfigController.java
...ain/java/cn/com/fqy/controller/mapi/ConfigController.java
+111
-0
WebShopController.java
...in/java/cn/com/fqy/controller/mapi/WebShopController.java
+27
-3
StoreMapper.xml
...-system/src/main/resources/mybatis/mapper/StoreMapper.xml
+1
-1
WorkerMapper.xml
...system/src/main/resources/mybatis/mapper/WorkerMapper.xml
+1
-1
No files found.
2code/server/store-system/src/main/java/cn/com/fqy/controller/mapi/ConfigController.java
0 → 100644
View file @
9a1ba06c
package
cn
.
com
.
fqy
.
controller
.
mapi
;
import
java.util.List
;
import
javax.annotation.Resource
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
cn.com.fqy.common.ResultInfo
;
import
cn.com.fqy.core.common.BaseController
;
import
cn.com.fqy.core.model.DataDictItem
;
import
cn.com.fqy.core.model.Query
;
import
cn.com.fqy.core.service.DataDictCatService
;
import
cn.com.fqy.core.service.DataDictItemService
;
/**
* 数据字典项分类查询
* @author Administrator
*
*/
@Controller
@RequestMapping
(
"config"
)
public
class
ConfigController
extends
BaseController
{
@Resource
private
DataDictCatService
dataDictCatService
;
@Resource
private
DataDictItemService
dataDictItemService
;
/**
* 数据字典分类查询(店铺消费区间)
*
* @param dataDictCat
* @param pageNo
* @param pageSize
* @return
*/
@RequestMapping
(
"getDataDictsStore"
)
@ResponseBody
public
ResultInfo
<
List
<
DataDictItem
>>
getDataDictsStore
(){
ResultInfo
<
List
<
DataDictItem
>>
result
=
new
ResultInfo
<>();
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
)
{
result
.
setCode
(
"1"
);
result
.
setData
(
list
);
}
else
{
result
.
setCode
(
"0"
);
result
.
setMsg
(
"暂无数据"
);
}
return
result
;
}
/**
* 数据字典分类查询(员工身高)
*
* @param dataDictCat
* @param pageNo
* @param pageSize
* @return
*/
@RequestMapping
(
"getDataDictsHight"
)
@ResponseBody
public
ResultInfo
<
List
<
DataDictItem
>>
getDataDictsHight
(){
ResultInfo
<
List
<
DataDictItem
>>
result
=
new
ResultInfo
<>();
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
)
{
result
.
setCode
(
"1"
);
result
.
setData
(
list
);
}
else
{
result
.
setCode
(
"0"
);
result
.
setMsg
(
"暂无数据"
);
}
return
result
;
}
/**
* 数据字典分类查询(员工年龄)
*
* @param dataDictCat
* @param pageNo
* @param pageSize
* @return
*/
@RequestMapping
(
"getDataDictsAge"
)
@ResponseBody
public
ResultInfo
<
List
<
DataDictItem
>>
getDataDictsAge
(){
ResultInfo
<
List
<
DataDictItem
>>
result
=
new
ResultInfo
<>();
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
)
{
result
.
setCode
(
"1"
);
result
.
setData
(
list
);
}
else
{
result
.
setCode
(
"0"
);
result
.
setMsg
(
"暂无数据"
);
}
return
result
;
}
}
2code/server/store-system/src/main/java/cn/com/fqy/controller/mapi/WebShopController.java
View file @
9a1ba06c
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
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.ModelAttribute
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
cn.com.fqy.common.ResultInfo
;
import
cn.com.fqy.common.ResultInfo
;
import
cn.com.fqy.common.constants.Constant
;
import
cn.com.fqy.common.constants.Constant
;
import
cn.com.fqy.core.common.PageFinder
;
import
cn.com.fqy.core.common.PageFinder
;
import
cn.com.fqy.core.model.Advert
;
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.model.Worker
;
import
cn.com.fqy.core.service.AdvertService
;
import
cn.com.fqy.core.service.AdvertService
;
import
cn.com.fqy.core.service.StoreService
;
import
cn.com.fqy.core.service.StoreService
;
import
cn.com.fqy.core.service.WorkerService
;
import
cn.com.fqy.core.service.WorkerService
;
...
@@ -80,4 +80,28 @@ public class WebShopController {
...
@@ -80,4 +80,28 @@ public class WebShopController {
return
resultInfo
;
return
resultInfo
;
}
}
/**
* 商家店铺区信息
*/
@RequestMapping
(
"getStoresCountyList"
)
@ResponseBody
public
ResultInfo
<
List
<
Map
<
String
,
Object
>>>
getStoresCountyList
(){
ResultInfo
<
List
<
Map
<
String
,
Object
>>>
resultInfo
=
new
ResultInfo
<>();
List
<
Map
<
String
,
Object
>>
listQuery
=
new
ArrayList
<>();
List
<
Store
>
storeList
=
storeService
.
getStoreList
(
new
Query
());
if
(
storeList
.
size
()>
0
&&
storeList
!=
null
)
{
for
(
Store
list:
storeList
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"storeId"
,
list
.
getStoreId
());
map
.
put
(
"county"
,
list
.
getCounty
());
listQuery
.
add
(
map
);
}
resultInfo
.
setCode
(
"1"
);
resultInfo
.
setData
(
listQuery
);
}
else
{
resultInfo
.
setCode
(
"0"
);
resultInfo
.
setMsg
(
"暂无店铺区位置信息"
);
}
return
resultInfo
;
}
}
}
2code/server/store-system/src/main/resources/mybatis/mapper/StoreMapper.xml
View file @
9a1ba06c
...
@@ -266,7 +266,7 @@ OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE,ADMINISTRATORS_N
...
@@ -266,7 +266,7 @@ OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE,ADMINISTRATORS_N
<where>
<where>
<include
refid=
"listCommonWhere1"
/>
<include
refid=
"listCommonWhere1"
/>
</where>
</where>
ORDER BY SERIAL_NUMBER
DESC,CLICKS A
SC
ORDER BY SERIAL_NUMBER
ASC,CLICKS DE
SC
<![CDATA[LIMIT #{rowIndex},#{pageSize} ]]>
<![CDATA[LIMIT #{rowIndex},#{pageSize} ]]>
</select>
</select>
...
...
2code/server/store-system/src/main/resources/mybatis/mapper/WorkerMapper.xml
View file @
9a1ba06c
...
@@ -260,7 +260,7 @@ UPDATE_TIME,OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED
...
@@ -260,7 +260,7 @@ UPDATE_TIME,OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED
<where>
<where>
<include
refid=
"listCommonWhere1"
/>
<include
refid=
"listCommonWhere1"
/>
</where>
</where>
ORDER BY SERIAL_NUMBER
DESC,CLICKS A
SC
ORDER BY SERIAL_NUMBER
ASC,CLICKS DE
SC
<![CDATA[LIMIT #{rowIndex},#{pageSize} ]]>
<![CDATA[LIMIT #{rowIndex},#{pageSize} ]]>
</select>
</select>
...
...
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