소스 검색

上移、置顶更改失败提示语

anderx 7 년 전
부모
커밋
782169a700

+ 2 - 2
src/main/java/com/goafanti/business/controller/AdminJtBusinessController.java

@@ -341,7 +341,7 @@ public class AdminJtBusinessController extends CertifyApiController{
     	}
 		int x=jtBusinessService.updateProjectMoveUp(id);
 		if(x==-1) {
-    		result.getError().add(buildError("上移失败","上移失败"));return result;
+    		result.getError().add(buildError("已到顶部无法上移","已到顶部无法上移"));return result;
     	}
 		result.data(x);
 		return result;
@@ -357,7 +357,7 @@ public class AdminJtBusinessController extends CertifyApiController{
     	}
 		int x=jtBusinessService.updateProjectSetTop(id);
 		if(x==-1) {
-    		result.getError().add(buildError("置顶失败","置顶失败"));return result;
+    		result.getError().add(buildError("已到顶部无法上移","已到顶部无法上移"));return result;
     	}
 		result.data(x);
 		return result;

+ 2 - 2
src/main/java/com/goafanti/business/service/impl/JtBusinessServiceImpl.java

@@ -455,7 +455,7 @@ public class JtBusinessServiceImpl  extends BaseMybatisDao<JtBusinessProjectMapp
 	public int updateProjectMoveUp(String id) {
 		JtBusinessCategory j1=jtBusinessCategoryMapper.selectByPrimaryKey(id);
 		JtBusinessCategory j2=jtBusinessCategoryMapper.selectFirstLevel(id,j1.getModule(),j1.getLayer(),0);
-		if(null==j1||null==j2){
+		if(null==j2){
 			return -1;
 		}
 		Integer i=j1.getSort();
@@ -474,7 +474,7 @@ public class JtBusinessServiceImpl  extends BaseMybatisDao<JtBusinessProjectMapp
 	public int updateProjectSetTop(String id) {
 		JtBusinessCategory j1=jtBusinessCategoryMapper.selectByPrimaryKey(id);
 		JtBusinessCategory j2=jtBusinessCategoryMapper.selectFirstLevel(id,j1.getModule(),j1.getLayer(),1);
-		if(null==j1||null==j2){
+		if(null==j2){
 			return -1;
 		}
 		Integer i=j1.getSort();