Explorar o código

轮播图修改

anderx %!s(int64=7) %!d(string=hai) anos
pai
achega
2d0859913b

+ 3 - 18
src/main/java/com/goafanti/banners/controller/AdminBannersApiController.java

@@ -21,7 +21,7 @@ import com.goafanti.common.utils.StringUtils;
 import com.goafanti.core.mybatis.JDBCIdGenerator;
 
 @Controller
-@RequestMapping(value = "/open/api/admin/banners")
+@RequestMapping(value = "/api/admin/banners")
 public class AdminBannersApiController extends BaseApiController {
 	@Resource
 	BannersService	bannersService;
@@ -131,24 +131,9 @@ public class AdminBannersApiController extends BaseApiController {
 		result.setData(bannersService.updateBanner(b));
 		return result;
 	}
-	/**
-	 * 获取分页轮播图
-	 * @param apiUrl
-	 * @param client
-	 * @param pageSize
-	 * @param pageNo
-	 * @param request
-	 * @return
-	 */
 	
-	@RequestMapping(value="/list" ,method=RequestMethod.GET)
-	public Result list(String apiUrl,Integer client,Integer pageSize,Integer pageNo,HttpServletRequest request){
-		Result result=new Result();
-		result.setData(bannersService.findBannersList( apiUrl,client, pageSize, pageNo));
-		return result;
-	}
 	/**
-	 * 获取集合轮播图
+	 * 轮播图列表
 	 * @param apiUrl
 	 * @param client
 	 * @param pageSize
@@ -173,7 +158,7 @@ public class AdminBannersApiController extends BaseApiController {
         Result res = new Result();
         AttachmentType attachmentType = AttachmentType.getField(sign);
         if (attachmentType == AttachmentType.BANNERS_PIC) {
-            res.setData(handleFiles(res, "/", false, req, sign, "banners"));
+            res.setData(handleFiles(res, "/banners/", false, req, sign, ""));
         } else {
             res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "图片标示"));
         }

+ 2 - 2
src/main/java/com/goafanti/banners/service/BannersService.java

@@ -45,7 +45,7 @@ public class BannersService extends BaseMybatisDao<BannersMapper> {
 		return bannersMapper.selectByPrimaryKey(id);
 	}
 
-	public List<Banners> findAdminBannersList(String apiUrl,Integer client,Integer pageSize,Integer pageNo) {
+	public List<Banners> findBannersList(String apiUrl,Integer client,Integer pageSize,Integer pageNo) {
 		return portalBanners(apiUrl, client, pageNo, pageSize);
 	}
 	
@@ -73,7 +73,7 @@ public class BannersService extends BaseMybatisDao<BannersMapper> {
 	}
 	
 	@SuppressWarnings("unchecked")
-	public Pagination<Banners> findBannersList(String apiUrl,Integer client,Integer pageSize,Integer pageNo) {
+	public Pagination<Banners> findAdminBannersList(String apiUrl,Integer client,Integer pageSize,Integer pageNo) {
 		if(pageNo==null ||pageNo<1)pageNo=1;
 		if(pageSize== null ||pageSize<1)pageSize=10;
 		 Map<String, Object> params=new HashMap<String,Object>();

+ 0 - 1
src/main/java/com/goafanti/common/controller/BaseApiController.java

@@ -172,7 +172,6 @@ public class BaseApiController extends BaseController {
 			String uid) {
 		List<MultipartFile> files = getFiles(req);
 		MultipartFile mf = files.get(0);
-
 		String fileName = FileUtils.mosaicFileName(mf, isPrivate, sign, path,
 				StringUtils.isBlank(uid) ? TokenManager.getUserId() : uid);
 		if (!files.isEmpty()) {