gongdecai vor 2 Jahren
Ursprung
Commit
733884c214

+ 10 - 5
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/gubi/impl/GubiTypeInfoServiceImpl.java

@@ -3,6 +3,7 @@ package com.iotechn.unimall.admin.api.gubi.impl;
 import java.util.List;
 
 import com.iotechn.unimall.data.domain.gubi.GubiTypeSecond;
+import com.iotechn.unimall.data.domain.gubi.GubiTypeThree;
 import com.iotechn.unimall.data.mapper.gubi.GubiTypeSecondMapper;
 import com.iotechn.unimall.data.mapper.gubi.GubiTypeThreeMapper;
 import org.apache.ibatis.session.RowBounds;
@@ -94,12 +95,16 @@ public class GubiTypeInfoServiceImpl implements IGubiTypeInfoService {
                         .eq("type_id", list.get(i).getTypeName())
                         .eq("delete_flag", "0")
                         .orderBy("postion"));
+                if(!CollectionUtils.isEmpty(gubiTypeSeconds)){
+                    for(int k=0;k<gubiTypeSeconds.size();k++){
+                        List<GubiTypeThree> gubiTypeThrees = gubiTypeThreeMapper.selectList(new EntityWrapper<GubiTypeThree>()
+                                .eq("type_id", gubiTypeSeconds.get(k).getId())
+                                .eq("delete_flag", "0")
+                                .orderBy("postion"));
+                        gubiTypeSeconds.get(k).setGubiTypeThrees(gubiTypeThrees);
+                    }
+                }
                 list.get(i).setGubiTypeSeconds(gubiTypeSeconds);
-//                if(!CollectionUtils.isEmpty(gubiTypeSeconds)){
-//                    for(){
-//
-//                    }
-//                }
             }
 
         }

+ 5 - 0
unimall-data/src/main/java/com/iotechn/unimall/data/domain/gubi/GubiTypeSecond.java

@@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.annotations.TableField;
 import com.baomidou.mybatisplus.enums.FieldFill;
 import com.iotechn.unimall.core.util.StringUtils;
 import java.util.Date;
+import java.util.List;
 
 /**
  * 二级分类对象 gubi_type_second
@@ -83,6 +84,10 @@ public class GubiTypeSecond extends SuperDO {
     @TableField("admin_id")
     private Long adminId;
 
+    /**  */
+    @TableField(exist = false)
+    private List<GubiTypeThree> gubiTypeThrees;
+
 
     @Override
     public String toString() {