|
|
@@ -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));
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|