Browse Source

地图替换

anderx 3 years ago
parent
commit
68abe27ec2

+ 0 - 48
src/main/java/com/kede/wechat/controller/WeChatLiveTelecastApiController.java

@@ -1,48 +0,0 @@
-package com.kede.wechat.controller;
-
-
-import com.kede.common.bo.Result;
-import com.kede.common.constant.ErrorConstants;
-import com.kede.common.controller.BaseController;
-import com.kede.common.model.WechatShare;
-import com.kede.wechat.bo.WechatShareBo;
-import com.kede.wechat.service.WeChatLiveTelecastApiService;
-import com.kede.wechat.service.WeChatShareService;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.annotation.Resource;
-
-@RestController
-@RequestMapping(value = "/api/admin/weChatShare")
-public class WeChatLiveTelecastApiController extends BaseController{
-
-
-	@Resource
-	private WeChatShareService weChatShareService;
-
-
-	/**
-	 * 	新增分享信息
-	 * @return
-	 */
-	@RequestMapping(value = "/add", method = RequestMethod.POST)
-	public Result add(WechatShare in) {
-		Result res=new Result();
-		if (in.getType()==null||in.getTitle()==null) {
-			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"分类或者标题","分类或者标题"));
-			return res;
-		}
-		if (in.getType()>0) {
-			WechatShareBo use=(WechatShareBo) weChatShareService.openDetails(in.getType(), in.getPid());
-			if (use!=null) {
-				String str=new StringBuffer().append("分类").append(in.getType()).append("已存在").toString();
-				res.getError().add(buildError(str,str));
-				return res;
-			}
-		}
-		return res.data(weChatShareService.add(in));
-	}
-
-}

+ 16 - 16
src/main/java/com/kede/wechat/controller/weChatShareApiController.java

@@ -16,13 +16,13 @@ import com.kede.wechat.service.WeChatShareService;
 
 @RestController
 @RequestMapping(value = "/api/admin/weChatShare")
-public class weChatShareApiController extends BaseController{
+public class WeChatShareApiController extends BaseController{
+
 
-	
 	@Resource
 	private WeChatShareService weChatShareService;
-	
-	
+
+
 	/**
 	 * 	新增分享信息
 	 * @param id
@@ -31,7 +31,7 @@ public class weChatShareApiController extends BaseController{
 	@RequestMapping(value = "/add", method = RequestMethod.POST)
 	public Result add(WechatShare in) {
 		Result res=new Result();
-		if (in.getType()==null||in.getTitle()==null) {	
+		if (in.getType()==null||in.getTitle()==null) {
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"分类或者标题","分类或者标题"));
 			return res;
 		}
@@ -45,7 +45,7 @@ public class weChatShareApiController extends BaseController{
 		}
 		return res.data(weChatShareService.add(in));
 	}
-	
+
 	/**
 	 * 	修改分享信息
 	 * @param id
@@ -54,7 +54,7 @@ public class weChatShareApiController extends BaseController{
 	@RequestMapping(value = "/update", method = RequestMethod.POST)
 	public Result update(WechatShare in) {
 		Result res=new Result();
-		if (in.getType()==null||in.getTitle()==null) {	
+		if (in.getType()==null||in.getTitle()==null) {
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"分类或者标题","分类或者标题"));
 			return res;
 		}
@@ -68,8 +68,8 @@ public class weChatShareApiController extends BaseController{
 		}
 		return res.data(weChatShareService.update(in));
 	}
-	
-	
+
+
 	/**
 	 * 	删除分享信息
 	 * @param id
@@ -78,7 +78,7 @@ public class weChatShareApiController extends BaseController{
 	@RequestMapping(value = "/delete", method = RequestMethod.POST)
 	public Result delete(Integer id) {
 		Result res=new Result();
-		if (id==null) {	
+		if (id==null) {
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"分类或者标题","分类或者标题"));
 			return res;
 		}
@@ -92,7 +92,7 @@ public class weChatShareApiController extends BaseController{
 	@RequestMapping(value = "/details", method = RequestMethod.GET)
 	public Result details(Integer id,Integer pid) {
 		Result res=new Result();
-		if (id==null&&pid==null) {	
+		if (id==null&&pid==null) {
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR,"编号","编号"));
 			return res;
 		}
@@ -106,11 +106,11 @@ public class weChatShareApiController extends BaseController{
 	@RequestMapping(value = "/pageList", method = RequestMethod.GET)
 	public Result pageList(String name,Integer type,Integer pageNo,Integer pageSize) {
 		Result res=new Result();
-		
+
 		return res.data(weChatShareService.pageList(name,type,pageNo,pageSize));
 	}
-	
-	
-	
-	
+
+
+
+
 }