Explorar el Código

Merge remote-tracking branch 'origin/develop' into develop

‘linchangsheng’ hace 9 meses
padre
commit
26a99ff845

+ 2 - 2
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/logic/material/WebsitSalesLogic.java

@@ -328,12 +328,12 @@ public class WebsitSalesLogic {
         final Integer payConfigCount = adminWebsitPayConfigService.lambdaQuery()
                 .eq(AdminWebsitPayConfig::getCompanyWechatId, wechat.getCompanyWechatId())
                 .eq(AdminWebsitPayConfig::getWebsitId, websitId)
-                .eq(AdminWebsitPayConfig::getType, sales.getGoodsType())
+                .eq(AdminWebsitPayConfig::getType, goodsType)
                 .eq(AdminWebsitPayConfig::getStatus, true)
                 .count();
 
         if (payConfigCount == 0) {
-            throw new RemoteServiceException(sales.getWebsitName() + " 未配置线上收款");
+            throw new RemoteServiceException("未配置线上收款");
         }
 
         sales.setTotalAmount(BigDecimal.ZERO);

+ 1 - 1
mall-server-api/src/main/java/com/gree/mall/manager/commonmapper/CommonMapper.java

@@ -360,7 +360,7 @@ public interface CommonMapper {
      */
     @DataPermission
     @SqlParser(filter = true)
-    IPage<OrderBase2VO> orderBaseList2(Page page, @Param("ex") ZfireParamBean zfireParamBean, @Param("adminUserType") Integer adminUserType);
+    IPage<OrderBase2VO> orderBaseList2(Page page, @Param("ex") WorkOrderZfireParam zfireParamBean, @Param("adminUserType") Integer adminUserType);
 
     /**
      * 订单网点分账统计列表

+ 1 - 2
mall-server-api/src/main/java/com/gree/mall/manager/commonmapper/CommonPageV2Mapper.java

@@ -27,8 +27,7 @@ public interface CommonPageV2Mapper {
 
     @SqlParser(filter = true)
     IPage<StorageVO> pageV2Storage(Page page, @Param("ex") ZfireParamBean zfireParam,
-                                   @Param("companyWechatIds") List<String> companyWechatIds,
-                                   @Param("websitIds") List<String> websitIds);
+                                   @Param("companyWechatIds") List<String> companyWechatIds);
 
     @SqlParser(filter = true)
     IPage<CommonTemplateVO> pageV2Template(Page page,@Param("ex")  ZfireParamBean zfireParam,@Param("companyWechatIds") List<String> companyWechatIds);

+ 1 - 1
mall-server-api/src/main/java/com/gree/mall/manager/commonmapper/workorder/OrderBaseCMapper.java

@@ -38,7 +38,7 @@ public interface OrderBaseCMapper {
     List<Map<String, Object>> countOrderStatus2(@Param("companyWechatId") String companyWechatId,
                                                 @Param("adminWebsitIds") List<String> adminWebsitIds,
                                                 @Param("adminUserType") Integer adminUserType,
-                                                @Param("orderSmallType") String orderSmallType);
+                                                @Param("orderSmallTypeText") String orderSmallTypeText);
 
 
 //    @SqlParser(filter = true)

+ 2 - 2
mall-server-api/src/main/java/com/gree/mall/manager/controller/workerorder/OrderBaseController.java

@@ -265,9 +265,9 @@ public class OrderBaseController {
     @PostMapping("/status/count2")
     @ApiOperation(value = "已完工待结算-按工单状态统计")
     public ResponseHelper<List<Map<String,Object>>> countStatus2(
-            @RequestParam(required = false) String orderSmallType
+            @RequestParam(required = false) String orderSmallTypeText
     ) {
-        List<Map<String, Object>> maps = orderBaseLogic.countStatus2(orderSmallType);
+        List<Map<String, Object>> maps = orderBaseLogic.countStatus2(orderSmallTypeText);
         return ResponseHelper.success(maps);
     }
 

+ 2 - 8
mall-server-api/src/main/java/com/gree/mall/manager/logic/StorageLogic.java

@@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.gree.mall.manager.bean.StorageVO;
 import com.gree.mall.manager.bean.admin.AdminUserCom;
 import com.gree.mall.manager.commonmapper.CommonPageV2Mapper;
-import com.gree.mall.manager.enums.admin.AdminWebsitTypeEnum;
 import com.gree.mall.manager.exception.RemoteServiceException;
 import com.gree.mall.manager.logic.common.CommonLogic;
 import com.gree.mall.manager.plus.entity.Storage;
@@ -171,15 +170,10 @@ public class StorageLogic {
 
 
         //1.组装查询条件
-        ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean, StorageVO.class);
-
-        List<String> adminWebsitIds = null;
-        if (Objects.nonNull(adminUser.getAdminWebsit()) && adminUser.getAdminWebsit().getType().equals(AdminWebsitTypeEnum.C.getKey())) {
-            adminWebsitIds = adminUser.getAdminWebsitIds();
-        }
+        ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean, StorageVO.class, adminUser);
 
         IPage<StorageVO> storageVOIPage = commonPageV2Mapper.pageV2Storage(new Page(zfireParamBean.getPageNum(), zfireParamBean.getPageSize()),
-                zfireParam, companyWechatIds, adminWebsitIds);
+                zfireParam, companyWechatIds);
 
         return storageVOIPage;
     }

+ 7 - 0
mall-server-api/src/main/java/com/gree/mall/manager/logic/admin/AdminWebsitLogic.java

@@ -407,6 +407,13 @@ public class AdminWebsitLogic {
         if (org.apache.commons.lang3.StringUtils.isBlank(payConfig.getAppid())) {
             throw new RemoteServiceException("通联商户appid不能为空");
         }
+
+        AdminWebsit adminWebsit = adminWebsitService.getById(payConfig.getWebsitId());
+        if (!adminWebsit.getIsUseAllinpay()) {
+            adminWebsit.setIsUseAllinpay(true)
+                    .updateById();
+        }
+
         payConfig.insertOrUpdate();
     }
 

+ 2 - 3
mall-server-api/src/main/java/com/gree/mall/manager/logic/workorder/OrderBaseLogic.java

@@ -1464,7 +1464,6 @@ public class OrderBaseLogic {
         AdminUserCom adminUser = commonLogic.getAdminUser();
 
         FieldUtils.supplyParam(zfireParamBean, OrderBase2VO.class, commonLogic.getAdminUser());
-        zfireParamBean.setAdminWebsitIds(zfireParamBean.getAdminWebsitIds());
 
         IPage<OrderBase2VO> page = commonMapper.orderBaseList2(new Page(zfireParamBean.getPageNum(), zfireParamBean.getPageSize()), zfireParamBean, adminUser.getType());
 
@@ -1506,9 +1505,9 @@ public class OrderBaseLogic {
         return page;
     }
 
-    public List<Map<String, Object>> countStatus2(String orderSmallType) {
+    public List<Map<String, Object>> countStatus2(String orderSmallTypeText) {
         AdminUserCom adminUser = commonLogic.getAdminUser();
-        List<Map<String, Object>> maps = orderBaseCMapper.countOrderStatus2(adminUser.getCompanyWechatId(), adminUser.getAdminWebsitIds(), adminUser.getType(), orderSmallType);
+        List<Map<String, Object>> maps = orderBaseCMapper.countOrderStatus2(adminUser.getCompanyWechatId(), adminUser.getAdminWebsitIds(), adminUser.getType(), orderSmallTypeText);
         return maps;
     }
 }

+ 2 - 2
mall-server-api/src/main/resources/mapper/CommonPageMapper.xml

@@ -37,9 +37,9 @@
 
 
         </if>
-        <if test="websitIds != null and websitIds.size > 0">
+        <if test="ex.adminWebsitIds != null and ex.adminWebsitIds.size > 0">
             AND a.websit_id IN
-            <foreach item="item" index="index" collection="websitIds" open="(" separator="," close=")">
+            <foreach item="item" index="index" collection="ex.adminWebsitIds" open="(" separator="," close=")">
                 #{item}
             </foreach>
         </if>

+ 2 - 2
mall-server-api/src/main/resources/mapper/workorder/OrderBaseCMapper.xml

@@ -130,8 +130,8 @@
             JOIN pg_order_settle_norm c ON b.id = c.pg_order_product_id AND c.settle_norm_type IN ('INSTALL','REPAIR')
         WHERE 1=1
         <include refid="orderBaseSqlWhere"></include>
-        <if test="orderSmallType != null and orderSmallType != ''">
-            AND a.order_small_type = #{orderSmallType}
+        <if test="orderSmallTypeText != null and orderSmallTypeText != ''">
+            AND a.order_small_type_text = #{orderSmallTypeText}
         </if>
         GROUP BY order_status_text
     </select>