|
@@ -87,38 +87,72 @@ public class AdminBannersApiController extends BaseApiController {
|
|
|
}
|
|
}
|
|
|
return res().data(types);
|
|
return res().data(types);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 新增轮播图
|
|
|
|
|
+ * @param b
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
@RequestMapping(value="/save" ,method=RequestMethod.POST)
|
|
@RequestMapping(value="/save" ,method=RequestMethod.POST)
|
|
|
public Result save(Banners b){
|
|
public Result save(Banners b){
|
|
|
Result result=new Result();
|
|
Result result=new Result();
|
|
|
result.setData(bannersService.insertBanner(b));
|
|
result.setData(bannersService.insertBanner(b));
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 删除轮播图
|
|
|
|
|
+ * @param id
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
@RequestMapping(value="/delete" ,method=RequestMethod.POST)
|
|
@RequestMapping(value="/delete" ,method=RequestMethod.POST)
|
|
|
public Result delete(String id){
|
|
public Result delete(String id){
|
|
|
Result result=new Result();
|
|
Result result=new Result();
|
|
|
result.setData(bannersService.deleteBanner(id));
|
|
result.setData(bannersService.deleteBanner(id));
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 修改轮播图
|
|
|
|
|
+ * @param b
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
@RequestMapping(value="/update" ,method=RequestMethod.POST)
|
|
@RequestMapping(value="/update" ,method=RequestMethod.POST)
|
|
|
public Result details(Banners b){
|
|
public Result details(Banners b){
|
|
|
Result result=new Result();
|
|
Result result=new Result();
|
|
|
result.setData(bannersService.updateBanner(b));
|
|
result.setData(bannersService.updateBanner(b));
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 获取分页轮播图
|
|
|
|
|
+ * @param apiUrl
|
|
|
|
|
+ * @param client
|
|
|
|
|
+ * @param pageSize
|
|
|
|
|
+ * @param pageNo
|
|
|
|
|
+ * @param request
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
|
|
+
|
|
|
@RequestMapping(value="/list" ,method=RequestMethod.GET)
|
|
@RequestMapping(value="/list" ,method=RequestMethod.GET)
|
|
|
public Result list(String apiUrl,Integer client,Integer pageSize,Integer pageNo,HttpServletRequest request){
|
|
public Result list(String apiUrl,Integer client,Integer pageSize,Integer pageNo,HttpServletRequest request){
|
|
|
Result result=new Result();
|
|
Result result=new Result();
|
|
|
result.setData(bannersService.findBannersList( apiUrl,client, pageSize, pageNo));
|
|
result.setData(bannersService.findBannersList( apiUrl,client, pageSize, pageNo));
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
|
- @RequestMapping(value="/apiList" ,method=RequestMethod.GET)
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 获取集合轮播图
|
|
|
|
|
+ * @param apiUrl
|
|
|
|
|
+ * @param client
|
|
|
|
|
+ * @param pageSize
|
|
|
|
|
+ * @param pageNo
|
|
|
|
|
+ * @param request
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
|
|
+ @RequestMapping(value="/adminList" ,method=RequestMethod.GET)
|
|
|
public Result appList(String apiUrl,Integer client,Integer pageSize,Integer pageNo,HttpServletRequest request){
|
|
public Result appList(String apiUrl,Integer client,Integer pageSize,Integer pageNo,HttpServletRequest request){
|
|
|
Result result=new Result();
|
|
Result result=new Result();
|
|
|
- result.setData(bannersService.findAppBannersList( apiUrl,client, pageSize, pageNo));
|
|
|
|
|
|
|
+ result.setData(bannersService.findAdminBannersList( apiUrl,client, pageSize, pageNo));
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 图片上传
|
|
* 图片上传
|
|
@@ -128,7 +162,7 @@ public class AdminBannersApiController extends BaseApiController {
|
|
|
Result res = new Result();
|
|
Result res = new Result();
|
|
|
AttachmentType attachmentType = AttachmentType.getField(sign);
|
|
AttachmentType attachmentType = AttachmentType.getField(sign);
|
|
|
if (attachmentType == AttachmentType.BANNERS_PIC) {
|
|
if (attachmentType == AttachmentType.BANNERS_PIC) {
|
|
|
- res.setData(handleFiles(res, "/banners", false, req, sign, "banners"));
|
|
|
|
|
|
|
+ res.setData(handleFiles(res, "/", false, req, sign, "banners"));
|
|
|
} else {
|
|
} else {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "图片标示"));
|
|
res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "图片标示"));
|
|
|
}
|
|
}
|