瀏覽代碼

App上传默认设置为个人帐号更改为不选取

anderx 7 年之前
父節點
當前提交
44447a7a39

+ 2 - 2
src/main/java/com/goafanti/app/controller/OpenAppHomeController.java

@@ -135,7 +135,7 @@ public class OpenAppHomeController extends BaseApiController{
 		map.put("recommended", jtBusinessService.recommendedApplication(null,pageNo,pageSize));
 		map.put("tag", jtTagService.selectListJtTag(null, 1, 99));
 		
-		map.put("homeImg", bannersService.findAppBannersList( apiUrl,1, 1, 1));
+		map.put("homeImg", bannersService.findAdminBannersList( apiUrl,1, 1, 1));
 		result.setData(map);
 		return result;
 	}
@@ -151,7 +151,7 @@ public class OpenAppHomeController extends BaseApiController{
 		Map<String, Object> map=new HashMap<>();
 		//1 赚钱数据    2首页数据
 		map.put("recommended", jtBusinessService.recommendedApplication(null,pageNo,pageSize));
-		map.put("homeImg", bannersService.findAppBannersList( apiUrl,1, 3, 1));
+		map.put("homeImg", bannersService.findAdminBannersList( apiUrl,1, 3, 1));
 		result.setData(map);
 		return result;
 	}

+ 38 - 4
src/main/java/com/goafanti/banners/controller/AdminBannersApiController.java

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

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

@@ -42,7 +42,7 @@ public class BannersService extends BaseMybatisDao<BannersMapper> {
 		return bannersMapper.deleteByPrimaryKey(id);
 	}
 
-	public List<Banners> findAppBannersList(String apiUrl,Integer client,Integer pageSize,Integer pageNo) {
+	public List<Banners> findAdminBannersList(String apiUrl,Integer client,Integer pageSize,Integer pageNo) {
 		return portalBanners(apiUrl, client, pageNo, pageSize);
 	}
 	

+ 1 - 1
src/main/java/com/goafanti/common/utils/FileUtils.java

@@ -97,7 +97,7 @@ public class FileUtils {
 		String suffix = mf.getOriginalFilename().substring(mf.getOriginalFilename().lastIndexOf("."));
 		boolean uniq = false;
 		if (sign.indexOf("demand_picture") != -1|| sign.indexOf("achievement_picture") != -1 || sign.indexOf("user_picture")!=-1
-				|| sign.indexOf("jt_project_picture")!=-1 || sign.indexOf("jt_business_picture")!=-1 || sign.indexOf("honor_picture")!=-1) {
+				|| sign.indexOf("jt_project_picture")!=-1 || sign.indexOf("jt_business_picture")!=-1 || sign.indexOf("honor_picture")!=-1|| sign.indexOf("banners")!=-1) {
 			uniq = true;
 		}
 		String fileName = "";

+ 0 - 1
src/main/java/com/goafanti/user/controller/UserRegisterController.java

@@ -144,7 +144,6 @@ public class UserRegisterController extends BaseController {
 			us.setUpdateTime(now.getTime());
 			us.setPassword(passwordUtil.getEncryptPwd(us));
 			us.setLvl(0);
-			us.setType(0);
 			us.setNickname(user.getUsername());
 			us.setSource(AFTConstants.USER_SOURCE_REGISTER);
 			us.setStatus(AFTConstants.USER_STATUS_NORMAL);

+ 1 - 1
src/main/resources/props/config_local.properties

@@ -55,7 +55,7 @@ app.name=AFT
 app.mobile.website=http://m.kedexinxi.com
 template.cacheable=false
 
-static.host=//sclient.jishutao.com:8088/client/1.0.0
+static.host=//sclient.jishutao.com:80/client/1.0.0
 portal.host=//sportal.jishutao.com:80/portal/1.0.0
 avatar.host=//sclient.jishutao.com
 avatar.upload.host=//sclient.jishutao.com/upload