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
d1f2f2c4
Commit
d1f2f2c4
authored
Nov 07, 2018
by
扫地僧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商家店铺、员工信息服务类
parent
c86da07b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
198 additions
and
0 deletions
+198
-0
IndexController.java
...main/java/cn/com/fqy/controller/mapi/IndexController.java
+58
-0
ShopController.java
.../main/java/cn/com/fqy/controller/mapi/ShopController.java
+71
-0
WorkerController.java
...ain/java/cn/com/fqy/controller/mapi/WorkerController.java
+69
-0
No files found.
2code/server/store-system/src/main/java/cn/com/fqy/controller/mapi/IndexController.java
View file @
d1f2f2c4
...
...
@@ -10,14 +10,27 @@ import org.springframework.web.bind.annotation.ResponseBody;
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.Store
;
import
cn.com.fqy.core.model.Worker
;
import
cn.com.fqy.core.service.AdvertService
;
import
cn.com.fqy.core.service.StoreService
;
import
cn.com.fqy.core.service.WorkerService
;
/**
* H5首页数据服务类
* @author Administrator
*
*/
@Controller
@RequestMapping
(
"/h5/index"
)
public
class
IndexController
{
@Resource
private
AdvertService
advertService
;
@Resource
private
StoreService
storeService
;
@Resource
WorkerService
workerService
;
@RequestMapping
(
"fqy"
)
@ResponseBody
...
...
@@ -35,4 +48,49 @@ public class IndexController {
return
advertService
.
getAdvertPagedList
(
q
);
}
/**
* 推荐商家
*/
@RequestMapping
(
"getStoreList"
)
@ResponseBody
public
PageFinder
<
Store
>
getStoreList
()
{
Store
store
=
new
Store
();
store
.
setIsDeleted
(
0
);
//未删除
store
.
setIsAvailable
(
1
);
//店铺启用状态
store
.
setIsShopping
(
1
);
//店铺展示状态
store
.
setIsRecommend
(
1
);
//店铺推荐状态
Query
q
=
new
Query
(
store
);
return
storeService
.
getStorePagedList
(
q
);
}
/**
* 推荐员工
*/
@RequestMapping
(
"getWorkerList"
)
@ResponseBody
public
PageFinder
<
Worker
>
getWorkerList
()
{
Worker
worker
=
new
Worker
();
worker
.
setIsDeleted
(
0
);
//未删除
worker
.
setIsAuditing
(
1
);
//已审核
worker
.
setIsShopping
(
1
);
//已展示
worker
.
setIsRecommend
(
1
);
//已推荐
Query
q
=
new
Query
(
worker
);
return
workerService
.
getWorkerPagedList
(
q
);
}
/**
* 搜索查询 - 待需求明确
*/
@RequestMapping
(
"searchShop"
)
@ResponseBody
public
PageFinder
<
Store
>
searchShopResult
(
String
addkey
){
Store
store
=
new
Store
();
store
.
setIsDeleted
(
0
);
//未删除
store
.
setIsAvailable
(
1
);
//店铺启用状态
store
.
setIsShopping
(
1
);
//店铺展示状态
Query
q
=
new
Query
(
store
);
return
storeService
.
getStorePagedList
(
q
);
}
}
2code/server/store-system/src/main/java/cn/com/fqy/controller/mapi/ShopController.java
0 → 100644
View file @
d1f2f2c4
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.ModelAttribute
;
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.PageFinder
;
import
cn.com.fqy.core.model.Advert
;
import
cn.com.fqy.core.model.Query
;
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.StoreService
;
import
cn.com.fqy.core.service.WorkerService
;
/**
* H5商家数据服务类
* @author Administrator
*
*/
@Controller
@RequestMapping
(
"/h5/shop"
)
public
class
ShopController
{
@Resource
private
AdvertService
advertService
;
@Resource
private
StoreService
storeService
;
@Resource
WorkerService
workerService
;
/**
* 根据条件查询商家列表
* @param store
* @return
*/
@RequestMapping
(
"getStoreList"
)
@ResponseBody
public
PageFinder
<
Store
>
getStoreList
(
Store
store
)
{
store
.
setIsDeleted
(
0
);
//未删除
store
.
setIsAvailable
(
1
);
//店铺启用状态
store
.
setIsShopping
(
1
);
//店铺展示状态
Query
q
=
new
Query
(
store
);
return
storeService
.
getStorePagedList
(
q
);
}
/**
* 商家店铺详情信息
*/
@RequestMapping
(
"storeDetails"
)
@ResponseBody
public
ResultInfo
<
Store
>
getStores
(
Store
store
){
ResultInfo
<
Store
>
resultInfo
=
new
ResultInfo
<>();
Store
res
=
storeService
.
getStore
(
store
.
getStoreId
());
if
(
null
!=
res
)
{
resultInfo
.
setCode
(
"1"
);
resultInfo
.
setData
(
res
);
}
else
{
resultInfo
.
setCode
(
"0"
);
resultInfo
.
setMsg
(
"店铺数据丢失"
);
}
return
resultInfo
;
}
}
2code/server/store-system/src/main/java/cn/com/fqy/controller/mapi/WorkerController.java
0 → 100644
View file @
d1f2f2c4
package
cn
.
com
.
fqy
.
controller
.
mapi
;
import
javax.annotation.Resource
;
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.ResponseBody
;
import
cn.com.fqy.common.ResultInfo
;
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.Store
;
import
cn.com.fqy.core.model.Worker
;
import
cn.com.fqy.core.service.AdvertService
;
import
cn.com.fqy.core.service.StoreService
;
import
cn.com.fqy.core.service.WorkerService
;
/**
* H5员工数据服务类
* @author Administrator
*
*/
@Controller
@RequestMapping
(
"/h5/worker"
)
public
class
WorkerController
{
@Resource
private
AdvertService
advertService
;
@Resource
private
StoreService
storeService
;
@Resource
WorkerService
workerService
;
/**
* 根据条件查询员工列表
* @param store
* @return
*/
@RequestMapping
(
"getWorkerList"
)
@ResponseBody
public
PageFinder
<
Worker
>
getStoreList
(
Worker
worker
)
{
worker
.
setIsDeleted
(
0
);
//未删除
worker
.
setIsAuditing
(
1
);
//已审核
worker
.
setIsShopping
(
1
);
//已展示
Query
q
=
new
Query
(
worker
);
return
workerService
.
getWorkerPagedList
(
q
);
}
/**
* 员工详情信息
*/
@RequestMapping
(
"workerDetails"
)
@ResponseBody
public
ResultInfo
<
Worker
>
workerDetails
(
Worker
worker
){
ResultInfo
<
Worker
>
resultInfo
=
new
ResultInfo
<>();
Worker
res
=
workerService
.
getWorker
(
worker
.
getWorkerId
());
if
(
null
!=
res
)
{
resultInfo
.
setCode
(
"1"
);
resultInfo
.
setData
(
res
);
}
else
{
resultInfo
.
setCode
(
"0"
);
resultInfo
.
setMsg
(
"员工信息丢失"
);
}
return
resultInfo
;
}
}
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