Kaynağa Gözat

品类排序修改

anderx 7 yıl önce
ebeveyn
işleme
1478e4d07a

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

@@ -464,7 +464,7 @@ public class JtBusinessServiceImpl  extends BaseMybatisDao<JtBusinessProjectMapp
 	@Override
 	public int updateProjectMoveUp(String id) {
 		JtBusinessCategory j1=jtBusinessCategoryMapper.selectByPrimaryKey(id);
-		JtBusinessCategory j2=jtBusinessCategoryMapper.selectFirstLevel(id,j1.getModule(),j1.getLayer(),0);
+		JtBusinessCategory j2=jtBusinessCategoryMapper.selectFirstLevel(id,j1.getModule(),j1.getSuperId(),0);
 		if(null==j2){
 			return -1;
 		}
@@ -483,7 +483,7 @@ public class JtBusinessServiceImpl  extends BaseMybatisDao<JtBusinessProjectMapp
 	@Override
 	public int updateProjectSetTop(String id) {
 		JtBusinessCategory j1=jtBusinessCategoryMapper.selectByPrimaryKey(id);
-		JtBusinessCategory j2=jtBusinessCategoryMapper.selectFirstLevel(id,j1.getModule(),j1.getLayer(),1);
+		JtBusinessCategory j2=jtBusinessCategoryMapper.selectFirstLevel(id,j1.getModule(),j1.getSuperId(),1);
 		if(null==j2){
 			return -1;
 		}

+ 1 - 1
src/main/java/com/goafanti/common/dao/JtBusinessCategoryMapper.java

@@ -97,7 +97,7 @@ public interface JtBusinessCategoryMapper {
     
     List<JtBusinessCategory> getCategoryByModule(Integer module);
 
-	JtBusinessCategory selectFirstLevel(String id, Integer module, Integer layer,@Param("type")Integer type);
+	JtBusinessCategory selectFirstLevel(String id, Integer module, String superId,@Param("type")Integer type);
 	
 	List<JtBusinessCategory> getCategoryByName(JtBusinessCategory category);
 	List<JtBusinessCategory> getCategoryByModel(JtBusinessCategory category);

+ 1 - 1
src/main/java/com/goafanti/common/mapper/JtBusinessCategoryMapper.xml

@@ -554,7 +554,7 @@ and layer=#{0}
   select
    <include refid="Base_Column_List" /> 
    from jt_business_category
-	where module=#{1} and layer=#{2}
+	where module=#{1} and super_id=#{2}
 	and   sort &lt; (select sort from jt_business_category where id=#{0})
 	order by sort