gongdecai 2 yıl önce
ebeveyn
işleme
4c3b5cdbfa

+ 1 - 1
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/gubi/IGubiTypeSecondService.java

@@ -24,7 +24,7 @@ public interface IGubiTypeSecondService {
     public Boolean add(@NotNull @HttpParam(name = "gubiTypeSecond", type = HttpParamType.COMMON, description = "二级分类") GubiTypeSecond gubiTypeSecond,
                        @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "adminId") Long adminId) throws ServiceException;
 
-    @HttpMethod(description = "列表", permission = "admin:gubi:gubiTypeSecond:list", permissionParentName = "宠物管理", permissionName = "二级分类管理")
+    @HttpMethod(description = "列表")
     public Page<GubiTypeSecond> list(
             @HttpParam(name = "companyId", type = HttpParamType.COMMON, description = "") Long companyId,
             @HttpParam(name = "typeId", type = HttpParamType.COMMON, description = "分类id") String typeId,

+ 1 - 1
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/gubi/IGubiTypeThreeService.java

@@ -24,7 +24,7 @@ public interface IGubiTypeThreeService {
     public Boolean add(@NotNull @HttpParam(name = "gubiTypeThree", type = HttpParamType.COMMON, description = "分值信息") GubiTypeThree gubiTypeThree,
                        @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "adminId") Long adminId) throws ServiceException;
 
-    @HttpMethod(description = "列表", permission = "admin:gubi:gubiTypeThree:list", permissionParentName = "宠物管理", permissionName = "分值信息管理")
+    @HttpMethod(description = "列表")
     public Page<GubiTypeThree> list(
             @HttpParam(name = "companyId", type = HttpParamType.COMMON, description = "") Long companyId,
             @HttpParam(name = "typeId", type = HttpParamType.COMMON, description = "分类id") String typeId,

+ 1 - 0
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/gubi/impl/GubiTransactionServiceImpl.java

@@ -95,6 +95,7 @@ public class GubiTransactionServiceImpl implements IGubiTransactionService {
             wrapper.eq("admin_id", adminId);
         }
         wrapper.eq("delete_flag", 0);
+        wrapper.orderBy("gmt_create",false);
         List<GubiTransaction> list = gubiTransactionMapper.selectPage(new RowBounds((page - 1) * limit, limit), wrapper);
         if(!CollectionUtils.isEmpty(list)){
             for(int i=0;i<list.size();i++){

+ 20 - 1
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/gubi/impl/GubiTypeThreeServiceImpl.java

@@ -3,11 +3,16 @@ package com.iotechn.unimall.admin.api.gubi.impl;
 import java.util.List;
 
 import com.iotechn.unimall.admin.api.gubi.IGubiTypeThreeService;
+import com.iotechn.unimall.data.domain.gubi.GubiTypeInfo;
+import com.iotechn.unimall.data.domain.gubi.GubiTypeSecond;
 import com.iotechn.unimall.data.domain.gubi.GubiTypeThree;
+import com.iotechn.unimall.data.mapper.gubi.GubiTypeInfoMapper;
+import com.iotechn.unimall.data.mapper.gubi.GubiTypeSecondMapper;
 import com.iotechn.unimall.data.mapper.gubi.GubiTypeThreeMapper;
 import org.apache.ibatis.session.RowBounds;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
 import org.springframework.util.StringUtils;
 
 import com.baomidou.mybatisplus.mapper.EntityWrapper;
@@ -30,7 +35,10 @@ import org.springframework.transaction.annotation.Transactional;
 public class GubiTypeThreeServiceImpl implements IGubiTypeThreeService {
     @Autowired
     private GubiTypeThreeMapper gubiTypeThreeMapper;
-
+    @Autowired
+    private GubiTypeInfoMapper gubiTypeInfoMapper;
+    @Autowired
+    private GubiTypeSecondMapper gubiTypeSecondMapper;
     @Override
     public Boolean add(GubiTypeThree gubiTypeThree, Long adminId) throws ServiceException {
         Date now = new Date();
@@ -109,6 +117,17 @@ public class GubiTypeThreeServiceImpl implements IGubiTypeThreeService {
         wrapper.eq("delete_flag", 0);
         wrapper.orderBy("postion");
         List<GubiTypeThree> list = gubiTypeThreeMapper.selectPage(new RowBounds((page - 1) * limit, limit), wrapper);
+       if(!CollectionUtils.isEmpty(list)){
+           for(int i=0;i<list.size();i++){
+               List<GubiTypeSecond> gubiTypeSeconds =  gubiTypeSecondMapper.selectList(new EntityWrapper<GubiTypeSecond>()
+                       .eq("id",list.get(i).getSecondId()));
+               List<GubiTypeInfo> gubiTypeInfos = gubiTypeInfoMapper.selectList(new EntityWrapper<GubiTypeInfo>()
+                       .eq("id",gubiTypeSeconds.get(0).getTypeId()));
+               list.get(i).setStrFlag(gubiTypeInfos.get(0).getTypeName()+"/"+gubiTypeSeconds.get(0).getSecondName()+"/"+list.get(i).getTypeId());
+               list.get(i).setIdstr(gubiTypeInfos.get(0).getId()+"/"+gubiTypeSeconds.get(0).getId()+"/"+list.get(i).getId());
+
+           }
+       }
         Integer count = gubiTypeThreeMapper.selectCount(wrapper);
         return new Page<GubiTypeThree>(list, page, limit, count);
     }

+ 10 - 0
unimall-data/src/main/java/com/iotechn/unimall/data/domain/gubi/GubiTypeThree.java

@@ -143,6 +143,16 @@ public class GubiTypeThree extends SuperDO {
     @TableField("admin_id")
     private Long adminId;
 
+    /**
+     *
+     */
+    @TableField(exist = false)
+    private String strFlag;
+    /**
+     *
+     */
+    @TableField(exist = false)
+    private String idstr;
 
     @Override
     public String toString() {