|
@@ -20,7 +20,7 @@ import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
-@Api(value = "小程序",tags = "小程序接口")
|
|
|
+@Api(value = "小程序", tags = "小程序接口")
|
|
|
@RestController
|
|
|
@RequestMapping("/api/index")
|
|
|
public class ApiIndexController extends ApiAbstractController {
|
|
@@ -70,13 +70,14 @@ public class ApiIndexController extends ApiAbstractController {
|
|
|
memberLocationService.insertMemberLocation(location);
|
|
|
return AjaxResult.success();
|
|
|
}
|
|
|
+
|
|
|
//上传会员拨打记录
|
|
|
@PostMapping("/pushHelp")
|
|
|
@ApiOperation("上传会员拨打记录")
|
|
|
@ApiImplicitParams({
|
|
|
- @ApiImplicitParam(name = "lat", value = "坐标的lat",dataType = "String", paramType = "body"),
|
|
|
- @ApiImplicitParam(name = "lng", value = "坐标的lng",dataType = "String",paramType = "body"),
|
|
|
- @ApiImplicitParam(name = "phone", value = "求助电话",dataType = "String", paramType = "body")
|
|
|
+ @ApiImplicitParam(name = "lat", value = "坐标的lat", dataType = "String", paramType = "body"),
|
|
|
+ @ApiImplicitParam(name = "lng", value = "坐标的lng", dataType = "String", paramType = "body"),
|
|
|
+ @ApiImplicitParam(name = "phone", value = "求助电话", dataType = "String", paramType = "body")
|
|
|
})
|
|
|
public AjaxResult pushHelp(@ApiIgnore Member member, @RequestBody MemberHelp help) {
|
|
|
|
|
@@ -100,15 +101,15 @@ public class ApiIndexController extends ApiAbstractController {
|
|
|
@ApiOperation("分页获取主要内容信息")
|
|
|
@UnLogin
|
|
|
@ApiImplicitParams({
|
|
|
- @ApiImplicitParam(name = "type", value = "类型:1、党政服务;2、景区介绍;3、旅游攻略;4、热门活动",required = true,defaultValue = "1",dataType = "Integer",
|
|
|
- allowableValues = "1,2,3,4",paramType = "query"),
|
|
|
- @ApiImplicitParam(name = "pageNum", required = true,defaultValue = "1",value = "页码", paramType = "query"),
|
|
|
- @ApiImplicitParam(name = "pageSize", required = true,defaultValue = "20", value = "显示记录数", paramType = "query")
|
|
|
+ @ApiImplicitParam(name = "type", value = "类型:1、党政服务;2、景区介绍;3、旅游攻略;4、热门活动", required = true, defaultValue = "1", dataType = "Integer",
|
|
|
+ allowableValues = "1,2,3,4", paramType = "query"),
|
|
|
+ @ApiImplicitParam(name = "pageNum", required = true, defaultValue = "1", value = "页码", paramType = "query"),
|
|
|
+ @ApiImplicitParam(name = "pageSize", required = true, defaultValue = "20", value = "显示记录数", paramType = "query")
|
|
|
})
|
|
|
public TableDataInfo getPageContent(@ApiIgnore Member member, Integer type) {
|
|
|
- // AboutUs aboutUs = aboutUsService.selectAboutUsByAboutUsId(1L);
|
|
|
+ // AboutUs aboutUs = aboutUsService.selectAboutUsByAboutUsId(1L);
|
|
|
Content content = new Content();
|
|
|
- content.setServiceInfo(type+"");
|
|
|
+ content.setServiceInfo(type + "");
|
|
|
content.setReleaseFlag("1");
|
|
|
startPage();
|
|
|
List<Content> list = contentService.selectContentList(content);
|
|
@@ -122,7 +123,7 @@ public class ApiIndexController extends ApiAbstractController {
|
|
|
@ApiOperation("获取主要内容详细信息")
|
|
|
@UnLogin
|
|
|
|
|
|
- public AjaxResult getContentInfo(@ApiIgnore Member member, @PathVariable Integer contentId) {
|
|
|
+ public AjaxResult getContentInfo(@ApiIgnore Member member, @PathVariable Integer contentId) {
|
|
|
// AboutUs aboutUs = aboutUsService.selectAboutUsByAboutUsId(1L);
|
|
|
|
|
|
Content info = contentService.selectContentByContentId(contentId.longValue());
|
|
@@ -136,18 +137,18 @@ public class ApiIndexController extends ApiAbstractController {
|
|
|
@PostMapping("/shopApply")
|
|
|
@ApiOperation("商铺开通申请")
|
|
|
@ApiImplicitParams({
|
|
|
- @ApiImplicitParam(name = "name", value = "商铺名称",required = true,paramType = "body"),
|
|
|
+ @ApiImplicitParam(name = "name", value = "商铺名称", required = true, paramType = "body"),
|
|
|
@ApiImplicitParam(name = "addres", value = "地址", paramType = "body"),
|
|
|
- @ApiImplicitParam(name = "bossName", value = "老板名称",required = true, paramType = "body"),
|
|
|
- @ApiImplicitParam(name = "bossPhone", value = "老板电话",required = true, paramType = "body"),
|
|
|
+ @ApiImplicitParam(name = "bossName", value = "老板名称", required = true, paramType = "body"),
|
|
|
+ @ApiImplicitParam(name = "bossPhone", value = "老板电话", required = true, paramType = "body"),
|
|
|
@ApiImplicitParam(name = "businessHours", value = "营业时间", paramType = "body"),
|
|
|
@ApiImplicitParam(name = "briefContent", value = "简介", paramType = "body"),
|
|
|
@ApiImplicitParam(name = "lat", value = "坐标的lat", paramType = "body"),
|
|
|
@ApiImplicitParam(name = "lng", value = "坐标的lng", paramType = "body"),
|
|
|
- @ApiImplicitParam(name = "shopType", value = "商铺类型 1、商铺 2、酒店",defaultValue = "1",paramType = "body"),
|
|
|
+ @ApiImplicitParam(name = "shopType", value = "商铺类型 1、商铺 2、酒店", defaultValue = "1", paramType = "body"),
|
|
|
})
|
|
|
public AjaxResult storeApply(@ApiIgnore Member member, @RequestBody Shop shop) {
|
|
|
- if (shop == null){
|
|
|
+ if (shop == null) {
|
|
|
AjaxResult.error("提交数据为空");
|
|
|
}
|
|
|
shop.setAuditFlag("0");
|
|
@@ -169,8 +170,8 @@ public class ApiIndexController extends ApiAbstractController {
|
|
|
@GetMapping("/getShopInfo/{shopId}")
|
|
|
@ApiOperation("获取商铺列表")
|
|
|
public AjaxResult getShopInfo(@ApiIgnore Member member, @PathVariable Long shopId) {
|
|
|
- if (shopId == null){
|
|
|
- AjaxResult.error("提交数据为空");
|
|
|
+ if (shopId == null) {
|
|
|
+ return AjaxResult.error("提交数据为空");
|
|
|
}
|
|
|
Shop shop = shopService.selectShopByShopId(shopId);
|
|
|
Map<String, Object> resultObj = new HashMap<String, Object>();
|
|
@@ -178,12 +179,26 @@ public class ApiIndexController extends ApiAbstractController {
|
|
|
return AjaxResult.success(resultObj);
|
|
|
}
|
|
|
|
|
|
+ //更新门店信息
|
|
|
+ @PostMapping("/updateShop")
|
|
|
+ @ApiOperation("未审核时,允许更新门店信息")
|
|
|
+ public AjaxResult updateShop(@RequestBody Shop shop) {
|
|
|
+ if (shop.getShopId() == null) {
|
|
|
+ return AjaxResult.error("提交数据为空");
|
|
|
+ }
|
|
|
+ //未审核时才允许更新门店信息
|
|
|
+ if (!shop.getAuditFlag().equals("0")) {
|
|
|
+ return AjaxResult.error("店铺信息不允许更新");
|
|
|
+ }
|
|
|
+ shopService.updateShop(shop);
|
|
|
+ return AjaxResult.success();
|
|
|
+ }
|
|
|
|
|
|
//更新门店坐标
|
|
|
@PostMapping("/updateLatLng")
|
|
|
@ApiOperation("更新门店坐标")
|
|
|
@ApiImplicitParams({
|
|
|
- @ApiImplicitParam(name = "shopId", value = "商铺id",required = true,paramType = "body"),
|
|
|
+ @ApiImplicitParam(name = "shopId", value = "商铺id", required = true, paramType = "body"),
|
|
|
@ApiImplicitParam(name = "lat", value = "坐标的lat", paramType = "body"),
|
|
|
@ApiImplicitParam(name = "lng", value = "坐标的lng", paramType = "body")
|
|
|
})
|
|
@@ -191,12 +206,12 @@ public class ApiIndexController extends ApiAbstractController {
|
|
|
String lat = (String) params.get("lat");
|
|
|
String lng = (String) params.get("lng");
|
|
|
Integer shopId = (Integer) params.get("shopId");
|
|
|
- if (shopId==null || shopId<=0){
|
|
|
- return AjaxResult.error("店铺id不能为空");
|
|
|
+ if (shopId == null || shopId <= 0) {
|
|
|
+ return AjaxResult.error("店铺id不能为空");
|
|
|
}
|
|
|
Shop shop = shopService.selectShopByShopId(shopId.longValue());
|
|
|
- if (shop == null){
|
|
|
- return AjaxResult.error("获取店铺信息出错");
|
|
|
+ if (shop == null) {
|
|
|
+ return AjaxResult.error("获取店铺信息出错");
|
|
|
}
|
|
|
shop.setLat(lat);
|
|
|
shop.setLng(lng);
|
|
@@ -209,7 +224,7 @@ public class ApiIndexController extends ApiAbstractController {
|
|
|
@PostMapping("/pushRecord")
|
|
|
@ApiOperation("门店数据上报")
|
|
|
public AjaxResult storeApply(@ApiIgnore Member member, @RequestBody ShopSalesRecord shopSalesRecord) {
|
|
|
- if (shopSalesRecord==null){
|
|
|
+ if (shopSalesRecord == null) {
|
|
|
AjaxResult.error("上传数据为空");
|
|
|
}
|
|
|
shopSalesRecordService.insertShopSalesRecord(shopSalesRecord);
|
|
@@ -219,7 +234,7 @@ public class ApiIndexController extends ApiAbstractController {
|
|
|
//返回标记物类型
|
|
|
@PostMapping("/getMarkerType")
|
|
|
@ApiOperation("获取标记物类型")
|
|
|
- public AjaxResult getMarkerDictData(){
|
|
|
+ public AjaxResult getMarkerDictData() {
|
|
|
SysDictData dictData = new SysDictData();
|
|
|
dictData.setDictType("marker_type");
|
|
|
dictData.setStatus("0");
|
|
@@ -234,14 +249,14 @@ public class ApiIndexController extends ApiAbstractController {
|
|
|
@GetMapping("/getPageMarker")
|
|
|
@ApiOperation("根据标记物类型分页获取标记物信息")
|
|
|
@ApiImplicitParams({
|
|
|
- @ApiImplicitParam(name = "markerType", value = "标记物类型:0为所有类型",required = true,defaultValue = "0",dataType = "String",paramType = "query"),
|
|
|
- @ApiImplicitParam(name = "pageNum", required = true,defaultValue = "1",value = "页码", paramType = "query"),
|
|
|
- @ApiImplicitParam(name = "pageSize", required = true,defaultValue = "20", value = "显示记录数", paramType = "query")
|
|
|
+ @ApiImplicitParam(name = "markerType", value = "标记物类型:0为所有类型", required = true, defaultValue = "0", dataType = "String", paramType = "query"),
|
|
|
+ @ApiImplicitParam(name = "pageNum", required = true, defaultValue = "1", value = "页码", paramType = "query"),
|
|
|
+ @ApiImplicitParam(name = "pageSize", required = true, defaultValue = "20", value = "显示记录数", paramType = "query")
|
|
|
})
|
|
|
public TableDataInfo getPageMarker(String markerType) {
|
|
|
|
|
|
Marker marker = new Marker();
|
|
|
- if (StringUtils.isNotEmpty(markerType) && !markerType.equalsIgnoreCase("0")){
|
|
|
+ if (StringUtils.isNotEmpty(markerType) && !markerType.equalsIgnoreCase("0")) {
|
|
|
marker.setMarkerType(markerType);
|
|
|
}
|
|
|
startPage();
|
|
@@ -253,7 +268,7 @@ public class ApiIndexController extends ApiAbstractController {
|
|
|
|
|
|
@PostMapping("/getEarlyWarnType")
|
|
|
@ApiOperation("获取预警类型")
|
|
|
- public AjaxResult getEarlyWarnType(){
|
|
|
+ public AjaxResult getEarlyWarnType() {
|
|
|
SysDictData dictData = new SysDictData();
|
|
|
dictData.setDictType("early_warning_type");
|
|
|
dictData.setStatus("0");
|
|
@@ -267,14 +282,14 @@ public class ApiIndexController extends ApiAbstractController {
|
|
|
@GetMapping("/getPageEarlyWarn")
|
|
|
@ApiOperation("根据预警类型分页获取预警信息")
|
|
|
@ApiImplicitParams({
|
|
|
- @ApiImplicitParam(name = "earlyWarnType", value = "预警类型:0为所有类型",required = true,defaultValue = "0",dataType = "String",paramType = "query"),
|
|
|
- @ApiImplicitParam(name = "pageNum", required = true,defaultValue = "1",value = "页码", paramType = "query"),
|
|
|
- @ApiImplicitParam(name = "pageSize", required = true,defaultValue = "20", value = "显示记录数", paramType = "query")
|
|
|
+ @ApiImplicitParam(name = "earlyWarnType", value = "预警类型:0为所有类型", required = true, defaultValue = "0", dataType = "String", paramType = "query"),
|
|
|
+ @ApiImplicitParam(name = "pageNum", required = true, defaultValue = "1", value = "页码", paramType = "query"),
|
|
|
+ @ApiImplicitParam(name = "pageSize", required = true, defaultValue = "20", value = "显示记录数", paramType = "query")
|
|
|
})
|
|
|
public TableDataInfo getPageEarlyWarn(String earlyWarnType) {
|
|
|
|
|
|
EarlyWarning earlyWarning = new EarlyWarning();
|
|
|
- if (StringUtils.isNotEmpty(earlyWarnType) && !earlyWarnType.equalsIgnoreCase("0")){
|
|
|
+ if (StringUtils.isNotEmpty(earlyWarnType) && !earlyWarnType.equalsIgnoreCase("0")) {
|
|
|
earlyWarning.setEarlyWarningType(earlyWarnType);
|
|
|
}
|
|
|
startPage();
|