瀏覽代碼

no message

FengChaoYu 1 周之前
父節點
當前提交
c6a256481d

+ 3 - 0
mall-server-api/src/main/java/com/gree/mall/manager/bean/supply/funds/CustomerWalletBean.java

@@ -17,6 +17,9 @@ public class CustomerWalletBean extends AdminCompanyWalletBalance {
     @ApiModelProperty("钱包名称")
     @ApiModelProperty("钱包名称")
     private String name;
     private String name;
 
 
+    @ApiModelProperty("钱包编码")
+    private String code;
+
     @ApiModelProperty("返利使用比例")
     @ApiModelProperty("返利使用比例")
     private List<RebateTypeUseRate> walletRaleTypes;
     private List<RebateTypeUseRate> walletRaleTypes;
 
 

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

@@ -789,11 +789,13 @@ public interface CommonMapper {
 
 
     /**
     /**
      * 销售政策列表
      * 销售政策列表
+     *
      * @param page
      * @param page
      * @param zfireParamBean
      * @param zfireParamBean
+     * @param companyWechatId
      * @return
      * @return
      */
      */
-    IPage<PolicyVO> policyList(Page page, @Param("ex") ZfireParamBean zfireParamBean);
+    IPage<PolicyVO> policyList(Page page, @Param("ex") ZfireParamBean zfireParamBean, @Param("companyWechatId") String companyWechatId);
 
 
     /**
     /**
      * 销售政策列表
      * 销售政策列表

+ 2 - 2
mall-server-api/src/main/java/com/gree/mall/manager/controller/supply/policy/PolicyController.java

@@ -166,14 +166,14 @@ public class PolicyController {
     @ApiOperation("政策机型-列表")
     @ApiOperation("政策机型-列表")
     public ResponseHelper<IPage<PolicyMaterialBean>> materialList(
     public ResponseHelper<IPage<PolicyMaterialBean>> materialList(
             @ApiParam(value = "政策id", required = true) @RequestParam String policyId,
             @ApiParam(value = "政策id", required = true) @RequestParam String policyId,
-            @ApiParam(value = "机型规格") @RequestParam(required = false) String specification,
+            @ApiParam(value = "机型规格") @RequestParam(required = false) String specsName,
             @ApiParam(value = "是否配提(true=是,false=否)") @RequestParam(required = false) Boolean isProvision,
             @ApiParam(value = "是否配提(true=是,false=否)") @RequestParam(required = false) Boolean isProvision,
             @ApiParam(value = "是否启用(true=是,false=否)") @RequestParam(required = false) Boolean status,
             @ApiParam(value = "是否启用(true=是,false=否)") @RequestParam(required = false) Boolean status,
             @ApiParam(value = "销售类型编号") @RequestParam(required = false) String salesTypeCode,
             @ApiParam(value = "销售类型编号") @RequestParam(required = false) String salesTypeCode,
             @ApiParam(value = "页号", required = true) @RequestParam Integer pageNum,
             @ApiParam(value = "页号", required = true) @RequestParam Integer pageNum,
             @ApiParam(value = "页大小", required = true) @RequestParam Integer pageSize
             @ApiParam(value = "页大小", required = true) @RequestParam Integer pageSize
     ) {
     ) {
-        IPage<PolicyMaterialBean> policyMaterialIPage = policyLogic.materialList(policyId, specification, isProvision, status, salesTypeCode, pageNum, pageSize);
+        IPage<PolicyMaterialBean> policyMaterialIPage = policyLogic.materialList(policyId, specsName, isProvision, status, salesTypeCode, pageNum, pageSize);
         return ResponseHelper.success(policyMaterialIPage);
         return ResponseHelper.success(policyMaterialIPage);
     }
     }
 
 

+ 11 - 8
mall-server-api/src/main/java/com/gree/mall/manager/logic/supply/funds/CompanyWalletLogic.java

@@ -14,14 +14,8 @@ import com.gree.mall.manager.enums.supply.BalanceTypeEnum;
 import com.gree.mall.manager.enums.supply.RebateBillTypeEnum;
 import com.gree.mall.manager.enums.supply.RebateBillTypeEnum;
 import com.gree.mall.manager.enums.supply.ReceiptBillTypeEnum;
 import com.gree.mall.manager.enums.supply.ReceiptBillTypeEnum;
 import com.gree.mall.manager.exception.RemoteServiceException;
 import com.gree.mall.manager.exception.RemoteServiceException;
-import com.gree.mall.manager.plus.entity.AdminCompanyWalletBalance;
-import com.gree.mall.manager.plus.entity.Rebate;
-import com.gree.mall.manager.plus.entity.RebateTypeUseRate;
-import com.gree.mall.manager.plus.entity.Receipt;
-import com.gree.mall.manager.plus.service.RebateService;
-import com.gree.mall.manager.plus.service.RebateTypeUseRateService;
-import com.gree.mall.manager.plus.service.ReceiptService;
-import com.gree.mall.manager.plus.service.SalesTypeService;
+import com.gree.mall.manager.plus.entity.*;
+import com.gree.mall.manager.plus.service.*;
 import lombok.RequiredArgsConstructor;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.StringUtils;
@@ -43,6 +37,8 @@ import java.util.stream.Collectors;
 public class CompanyWalletLogic {
 public class CompanyWalletLogic {
 
 
     public final SalesTypeService salesTypeService;
     public final SalesTypeService salesTypeService;
+    public final WalletService walletService;
+    public final RebateTypeService rebateTypeService;
     public final RebateTypeUseRateService rebateTypeUseRateService;
     public final RebateTypeUseRateService rebateTypeUseRateService;
     public final ReceiptService receiptService;
     public final ReceiptService receiptService;
     public final RebateService rebateService;
     public final RebateService rebateService;
@@ -261,6 +257,9 @@ public class CompanyWalletLogic {
             for (AdminCompanyWalletBalance walletBalance : walletList) {
             for (AdminCompanyWalletBalance walletBalance : walletList) {
                 CustomerWalletBean customerWalletBean = new CustomerWalletBean();
                 CustomerWalletBean customerWalletBean = new CustomerWalletBean();
                 BeanUtils.copyProperties(walletBalance, customerWalletBean);
                 BeanUtils.copyProperties(walletBalance, customerWalletBean);
+                Wallet wallet = walletService.getById(walletBalance.getWalletId());
+                customerWalletBean.setName(wallet.getName());
+                customerWalletBean.setCode(wallet.getCode());
                 customerWalletBeanList.add(customerWalletBean);
                 customerWalletBeanList.add(customerWalletBean);
             }
             }
         }
         }
@@ -277,6 +276,10 @@ public class CompanyWalletLogic {
                 CustomerWalletBean customerWalletBean = new CustomerWalletBean();
                 CustomerWalletBean customerWalletBean = new CustomerWalletBean();
                 BeanUtils.copyProperties(walletBalance, customerWalletBean);
                 BeanUtils.copyProperties(walletBalance, customerWalletBean);
 
 
+                RebateType rebateType = rebateTypeService.getById(walletBalance.getWalletId());
+                customerWalletBean.setName(rebateType.getName());
+                customerWalletBean.setCode(rebateType.getCode());
+
                 // 是否存在返利钱包对应返利使用比例
                 // 是否存在返利钱包对应返利使用比例
                 if (typeUseGroup.containsKey(walletBalance.getWalletId())) {
                 if (typeUseGroup.containsKey(walletBalance.getWalletId())) {
                     final List<RebateTypeUseRate> rebateTypeUseRates = typeUseGroup.get(walletBalance.getWalletId());
                     final List<RebateTypeUseRate> rebateTypeUseRates = typeUseGroup.get(walletBalance.getWalletId());

+ 1 - 1
mall-server-api/src/main/java/com/gree/mall/manager/logic/supply/policy/PolicyLogic.java

@@ -61,7 +61,7 @@ public class PolicyLogic {
         AdminUserCom adminUser = commonLogic.getAdminUser();
         AdminUserCom adminUser = commonLogic.getAdminUser();
         FieldUtils.platformParam(zfireParamBean, PolicyVO.class, adminUser);
         FieldUtils.platformParam(zfireParamBean, PolicyVO.class, adminUser);
 
 
-        return commonMapper.policyList(new Page(zfireParamBean.getPageNum(), zfireParamBean.getPageSize()), zfireParamBean);
+        return commonMapper.policyList(new Page(zfireParamBean.getPageNum(), zfireParamBean.getPageSize()), zfireParamBean, adminUser.getCompanyWechatId());
     }
     }
 
 
     public Policy detail(String policyId) {
     public Policy detail(String policyId) {

+ 3 - 0
mall-server-api/src/main/resources/mapper/CommonMapper.xml

@@ -1469,6 +1469,9 @@
         ${ex.selected}
         ${ex.selected}
         FROM policy a
         FROM policy a
         ${ex.query}
         ${ex.query}
+        <if test="companyWechatId != null and companyWechatId != '0'">
+            AND EXISTS(SELECT 1 FROM policy_customer b WHERE b.policy_id = a.id AND b.company_wechat_id = #{companyWechatId})
+        </if>
         <if test="ex.orderBy == null or ex.orderBy ==''">
         <if test="ex.orderBy == null or ex.orderBy ==''">
             ORDER BY a.create_time DESC
             ORDER BY a.create_time DESC
         </if>
         </if>