Преглед на файлове

运营中心新闻去处图片BUG修复

anderx преди 7 години
родител
ревизия
781dbc52ef

+ 10 - 6
src/main/java/com/goafanti/common/controller/PublicController.java

@@ -479,7 +479,12 @@ public class PublicController extends BaseController {
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR, "", "用户名"));
 			return res;
 		}
-		User user=userService.selectByNameAndType(mobile, type);
+		User user=userService.selectByMobieAndType(mobile, type);
+		if(user==null || user.getMobile()==null || !user.getMobile().equals(mobile))
+		{
+			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "手机号或用户名错误"));
+			return res;
+		}
 		user.setPassword(newPwd);
 		user.setPassword(passwordUtil.getEncryptPwd(user));
 		userService.updateByPrimaryKeySelective(user);
@@ -494,9 +499,8 @@ public class PublicController extends BaseController {
 	 */
 	@RequestMapping(value = "/checkMNCode", method = RequestMethod.POST)
 	@ResponseBody
-	public Result checkMNCode(String mobileCode,String userName,String mobile) {
+	public Result checkMNCode(String mobileCode,Integer type,String mobile) {
 		Result res = new Result();
-
 		if (StringUtils.isBlank(mobileCode)) {
 			res.getError().add(buildError(ErrorConstants.MCODE_EMPTY_ERROR, "", "手机验证码"));
 			return res;
@@ -505,8 +509,8 @@ public class PublicController extends BaseController {
 			res.getError().add(buildError(ErrorConstants.MCODE_EMPTY_ERROR, "", "手机号"));
 			return res;
 		}
-		if (StringUtils.isBlank(userName)) {
-			res.getError().add(buildError(ErrorConstants.MCODE_EMPTY_ERROR, "", "用户名"));
+		if (null==type) {
+			res.getError().add(buildError(ErrorConstants.MCODE_EMPTY_ERROR, "", "帐号类型"));
 			return res;
 		}
 		if (TimeUtils.checkOverTime(VerifyCodeUtils.M_CODE)) {
@@ -519,7 +523,7 @@ public class PublicController extends BaseController {
 			res.getError().add(buildError(ErrorConstants.MCODE_ERROR, "", "手机验证码错误"));
 			return res;
 		}
-		User user=userService.selectByNameAndType(userName, null);
+		User user=userService.selectByMobieAndType(mobile, type);
 		if(user==null || user.getMobile()==null || !user.getMobile().equals(mobile))
 		{
 			res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "手机号或用户名错误"));

+ 0 - 1
src/main/java/com/goafanti/common/model/News.java

@@ -175,7 +175,6 @@ public class News {
 	}
 
 	public String getTitleImg() {
-		if(titleImg!=null && !titleImg.contains("."))return null;
 		return titleImg;
 	}
 

+ 1 - 0
src/main/java/com/goafanti/news/controller/AdminNewsApiController.java

@@ -138,6 +138,7 @@ public Result apply(InputNews news,BindingResult bindingResult,String[] publishP
 			}
 			News news2=new News();
 			BeanUtils.copyProperties(news, news2);
+			if(null!=news.getTitleImg())news2.setTitleImg(news.getTitleImg());
 			result.setData(newsService.updateSelectively( news2,webPages,appPages)); 
 			//publishPages
 			return result;

+ 3 - 5
src/main/resources/props/config_local.properties

@@ -56,12 +56,10 @@ app.mobile.website=http://m.kedexinxi.com
 template.cacheable=false
 
 
-static.host=//sclient.jishutao.com/client/1.0.0
-#static.host=//sclient.jishutao.com:8088/client/1.0.0
-#static.host=//sclient.jishutao.com:80/client/1.0.0
+static.host=//sclient.jishutao.com:8088/client/1.0.0
+
 portal.host=//sportal.jishutao.com/portal/1.0.0
-#portal.host=//sportal.jishutao.com:8088/portal/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