‘linchangsheng’ 2 tygodni temu
rodzic
commit
2d7de30dd2

+ 19 - 0
src/main/java/com/gree/mall/manager/bean/goods/GoodsApplyCount.java

@@ -0,0 +1,19 @@
+package com.gree.mall.manager.bean.goods;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@ApiModel
+public class GoodsApplyCount {
+
+    @ApiModelProperty(value = "待审批")
+    private Integer dsh;
+
+    @ApiModelProperty(value = "通过")
+    private Integer tg;
+
+    @ApiModelProperty(value = "驳回")
+    private Integer bh;
+}

+ 22 - 3
src/main/java/com/gree/mall/manager/bean/goods/GoodsApplyVO.java

@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
 import com.gree.mall.manager.annotation.ZfireField;
 import com.gree.mall.manager.enums.ExamineStatusEnum;
 import com.gree.mall.manager.enums.GoodsStatusEnum;
+import com.gree.mall.manager.plus.entity.Goods;
 import com.gree.mall.manager.plus.entity.GoodsApply;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
@@ -17,10 +18,10 @@ import java.util.Date;
 
 @Data
 @ApiModel
-public class GoodsApplyVO   {
+public class GoodsApplyVO     {
 
-    @ZfireField(hide = true,tbName = "a")
-    @TableId(value = "goods_apply_id", type = IdType.ID_WORKER_STR)
+    @ZfireField(tbName = "a")
+    @TableId(value = "申请单号", type = IdType.ID_WORKER_STR)
     private String goodsApplyId;
 
     @ZfireField(hide = true,tbName = "a")
@@ -31,6 +32,10 @@ public class GoodsApplyVO   {
     private String goodsName;
 
     @ZfireField(tbName = "b")
+    @ApiModelProperty(value = "商品描述")
+    private String describeText;
+
+    @ZfireField(tbName = "b")
     @ApiModelProperty(value = "商品图片")
     private String imgUrl;
 
@@ -49,6 +54,20 @@ public class GoodsApplyVO   {
     private String categoryPid;
 
     @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "商家编号")
+    private String websitId;
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "商家名称")
+    private String websitName;
+    @ZfireField(tbName = "a",hide = true)
+    @ApiModelProperty(value = "上级商户")
+    private String companyWechatId;
+    @ZfireField(tbName = "a")
+    @ApiModelProperty(value = "上级商户")
+    private String companyName;
+
+
+    @ZfireField(tbName = "a")
     @ApiModelProperty(value = "划线价格")
     private BigDecimal orgGoodsPrice;
     @ZfireField(tbName = "a")

+ 9 - 0
src/main/java/com/gree/mall/manager/controller/goods/GoodsApplyController.java

@@ -55,6 +55,15 @@ public class GoodsApplyController {
         FieldUtils.exportData(adminDeptVOIPage.getRecords(), zfireParam.getExportFields(), request, response);
     }
 
+    @PostMapping("/count")
+    @ApiOperation(value = "统计")
+    public ResponseHelper<GoodsApplyCount> count(
+            HttpServletRequest request
+    ) throws RemoteServiceException {
+        GoodsApplyCount  goodsApplyCount= goodsApplyLogic.countNum();
+        return ResponseHelper.success(goodsApplyCount);
+    }
+
     @PostMapping("/detail")
     @ApiOperation(value = "价格申请详情")
     public ResponseHelper<GoodsApplyDetail> listbycategory(

+ 23 - 0
src/main/java/com/gree/mall/manager/logic/goods/GoodsApplyLogic.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.IdWorker;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.github.binarywang.wxpay.bean.applyment.enums.ApplymentStateEnum;
 import com.gree.mall.manager.bean.admin.AdminUserCom;
 import com.gree.mall.manager.bean.goods.*;
 import com.gree.mall.manager.commonmapper.CustomGoodsApplyMapper;
@@ -208,4 +209,26 @@ public class GoodsApplyLogic {
         goodsApply.setStatus(status);
         goodsApply.updateById();
     }
+
+    public GoodsApplyCount countNum() {
+
+        Integer dsp = goodsApplyService.lambdaQuery().
+                eq(GoodsApply::getStatus, "WAIT")
+                .count();
+        Integer tg = goodsApplyService.lambdaQuery().
+                eq(GoodsApply::getStatus, "OK")
+                .count();
+
+        Integer bh = goodsApplyService.lambdaQuery().
+                eq(GoodsApply::getStatus, "FAIL")
+                .count();
+
+        GoodsApplyCount goodsApplyCount = new GoodsApplyCount();
+        goodsApplyCount.setDsh(dsp);
+        goodsApplyCount.setTg(tg);
+        goodsApplyCount.setBh(bh);
+
+        return bh;
+
+    }
 }