浏览代码

Merge remote-tracking branch 'origin/Payment-Configuration' into Payment-Configuration

yfh 2 周之前
父节点
当前提交
47f0e2f9bc

+ 2 - 0
fs-admin/src/main/java/com/fs/live/controller/LiveCouponIssueController.java

@@ -1,6 +1,8 @@
 package com.fs.live.controller;
 
 import java.util.List;
+import java.util.Map;
+
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;

+ 69 - 1
fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreProductScrmMapper.java

@@ -97,7 +97,7 @@ public interface FsStoreProductScrmMapper
             "<if test = 'maps.storeId != null and maps.storeId != \"\" '> " +
             "and p.store_id = #{maps.storeId} " +
             "</if>"+
-            "<if test = 'maps.storeIds != null '>" +
+            "<if test = 'maps.storeIds != null and maps.storeIds.length > 0'>" +
             "and p.store_id in " +
             "<foreach collection='maps.storeIds'  item='item' index='index'  open='(' separator=',' close=')'> #{item} </foreach>" +
             "</if>" +
@@ -303,6 +303,74 @@ public interface FsStoreProductScrmMapper
             " p.create_time,p.update_time,p.is_postage,p.is_del,p.give_integral, p.cost,p.is_good,p.browse,p.code_path,p.temp_id,p.spec_type,p.is_integral,p.integral," +
             " p.product_type,p.prescribe_code,p.prescribe_spec,p.prescribe_factory,p.prescribe_name,ave.sku,ave.stock,ave.price,ave.bar_code,ave.group_bar_code,ave.weight,ave.volume FROM fs_store_product_scrm p " +
             "  LEFT JOIN fs_store_product_attr_value_scrm ave on p.product_id=ave.product_id WHERE  p.product_id is not null " +
+            "<if test = 'maps.productName != null and  maps.productName !=\"\"    '> " +
+            "and p.product_name like CONCAT('%',#{maps.productName},'%') " +
+            "</if>" +
+            "<if test = 'maps.cateId != null    '> " +
+            "and (pc.cate_id =#{maps.cateId} or pc.pid=#{maps.cateId} )" +
+            "</if>" +
+            "<if test = 'maps.productType != null    '> " +
+            "and p.product_type =#{maps.productType} " +
+            "</if>" +
+            "<if test = 'maps.isShow != null    '> " +
+            "and p.is_show =#{maps.isShow} " +
+            "</if>" +
+            "<if test = 'maps.companyIds != null and maps.companyIds != \"\" '> " +
+            "and find_in_set(#{maps.companyIds}, p.company_ids) " +
+            "</if>"+
+            "<if test = 'maps.storeId != null and maps.storeId != \"\" '> " +
+            "and p.store_id = #{maps.storeId} " +
+            "</if>"+
+            "<if test = 'maps.storeIds != null and maps.storeIds.length > 0'>" +
+            "and p.store_id in " +
+            "<foreach collection='maps.storeIds'  item='item' index='index'  open='(' separator=',' close=')'> #{item} </foreach>" +
+            "</if>" +
+            "<if test = 'maps.isAudit != null '> " +
+            "and p.is_audit = #{maps.isAudit} " +
+            "</if>" +
+            "<if test='maps.drugRegCertNo != null and maps.drugRegCertNo != \"\"'>" +
+            "    AND p.drug_reg_cert_no LIKE CONCAT('%', #{maps.drugRegCertNo}, '%')" +
+            "</if>" +
+            "<if test='maps.commonName != null and maps.commonName != \"\"'>" +
+            "    AND p.common_name LIKE CONCAT('%', #{maps.commonName}, '%')" +
+            "</if>" +
+            "<if test='maps.dosageForm != null and maps.dosageForm != \"\"'>" +
+            "    AND p.dosage_form LIKE CONCAT('%', #{maps.dosageForm}, '%')" +
+            "</if>" +
+            "<if test='maps.unitPrice != null and maps.unitPrice != \"\"'>" +
+            "    AND p.unit_price = #{maps.unitPrice}" +
+            "</if>" +
+            "<if test='maps.batchNumber != null and maps.batchNumber != \"\"'>" +
+            "    AND p.batch_number LIKE CONCAT('%', #{maps.batchNumber}, '%')" +
+            "</if>" +
+            "<if test='maps.mah != null and maps.mah != \"\"'>" +
+            "    AND p.mah LIKE CONCAT('%', #{maps.mah}, '%')" +
+            "</if>" +
+            "<if test='maps.mahAddress != null and maps.mahAddress != \"\"'>" +
+            "    AND p.mah_address LIKE CONCAT('%', #{maps.mahAddress}, '%')" +
+            "</if>" +
+            "<if test='maps.manufacturer != null and maps.manufacturer != \"\"'>" +
+            "    AND p.manufacturer LIKE CONCAT('%', #{maps.manufacturer}, '%')" +
+            "</if>" +
+            "<if test='maps.manufacturerAddress != null and maps.manufacturerAddress != \"\"'>" +
+            "    AND p.manufacturer_address LIKE CONCAT('%', #{maps.manufacturerAddress}, '%')" +
+            " </if>" +
+            " <if test='maps.indications != null and maps.indications != \"\"'>" +
+            "     AND p.indications LIKE CONCAT('%', #{maps.indications}, '%')" +
+            " </if>" +
+            " <if test='maps.dosage != null and maps.dosage != \"\"'>" +
+            "     AND p.dosage LIKE CONCAT('%', #{maps.dosage}, '%')" +
+            " </if>" +
+            " <if test='maps.adverseReactions != null and maps.adverseReactions != \"\"'>" +
+            "     AND p.adverse_reactions LIKE CONCAT('%', #{maps.adverseReactions}, '%')" +
+            " </if>" +
+            " <if test='maps.contraindications != null and maps.contraindications != \"\"'>" +
+            "     AND p.contraindications LIKE CONCAT('%', #{maps.contraindications}, '%')" +
+            " </if>" +
+            " <if test='maps.precautions != null and maps.precautions != \"\"'>" +
+            "     AND p.precautions LIKE CONCAT('%', #{maps.precautions}, '%')" +
+            " </if>"+
+            " order by p.product_id desc "+
             "</script>"})
     List<FsStoreProductExportVO> selectFsStoreProductExportList(@Param("maps") FsStoreProductScrm fsStoreProduct);
 

+ 2 - 0
fs-service/src/main/java/com/fs/live/domain/LiveOrderPayment.java

@@ -118,4 +118,6 @@ public class LiveOrderPayment extends BaseEntity{
 
     //小程序appId(用于多汇付支付/退款)
     private String appId;
+
+    private Long merConfigId;
 }

+ 29 - 6
fs-service/src/main/java/com/fs/live/service/impl/LiveAfterSalesServiceImpl.java

@@ -26,6 +26,8 @@ import com.fs.common.utils.spring.SpringUtils;
 import com.fs.company.service.ICompanyService;
 import com.fs.config.cloud.CloudHostProper;
 import com.fs.core.utils.OrderCodeUtils;
+import com.fs.course.domain.FsCoursePlaySourceConfig;
+import com.fs.course.mapper.FsCoursePlaySourceConfigMapper;
 import com.fs.erp.constant.AfterSalesOrderStatusEnum;
 import com.fs.erp.domain.FsJstAftersalePush;
 import com.fs.erp.dto.BaseResponse;
@@ -36,8 +38,11 @@ import com.fs.erp.mapper.FsJstAftersalePushMapper;
 import com.fs.erp.service.IErpOrderService;
 import com.fs.his.config.FsSysConfig;
 import com.fs.his.domain.FsHfpayConfig;
+import com.fs.his.domain.FsPayConfig;
 import com.fs.his.domain.FsUser;
+import com.fs.his.domain.MerchantAppConfig;
 import com.fs.his.mapper.FsHfpayConfigMapper;
+import com.fs.his.mapper.MerchantAppConfigMapper;
 import com.fs.his.service.IFsUserService;
 import com.fs.his.utils.ConfigUtil;
 import com.fs.hisStore.config.FsErpConfig;
@@ -99,6 +104,12 @@ import java.util.concurrent.TimeUnit;
 @Service
 public class LiveAfterSalesServiceImpl implements ILiveAfterSalesService {
 
+    @Autowired
+    private FsCoursePlaySourceConfigMapper fsCoursePlaySourceConfigMapper;
+
+    @Autowired
+    private MerchantAppConfigMapper merchantAppConfigMapper;
+
     @Autowired
     private ILiveOrderService liveOrderService;
 
@@ -394,11 +405,11 @@ public class LiveAfterSalesServiceImpl implements ILiveAfterSalesService {
     @Transactional
     public R applyForAfterSales(String userId, LiveAfterSalesParam param) {
         log.info("申请退款请求信息:"+JSONUtil.toJsonStr(param));
-        
+
         // 使用Redis分布式锁,确保同一订单只能有一个服务器处理申请售后 因为卓美有一个订单生成了三个售后订单,数据一摸一样,除了id
         String lockKey = "live:afterSales:apply:" + param.getOrderCode();
         RLock lock = redissonClient.getLock(lockKey);
-        
+
         try {
             // 尝试获取锁,等待时间3秒,锁过期时间30秒
             boolean locked = lock.tryLock(3, 30, TimeUnit.SECONDS);
@@ -406,9 +417,9 @@ public class LiveAfterSalesServiceImpl implements ILiveAfterSalesService {
                 log.warn("申请售后订单锁获取失败,订单号:{}", param.getOrderCode());
                 return R.error("系统繁忙,请稍后重试");
             }
-            
+
             log.info("申请售后订单锁获取成功,订单号:{}", param.getOrderCode());
-            
+
             LiveOrder order=liveOrderService.selectOrderIdByOrderCode(param.getOrderCode());
             
             // 查询配置:是否删除历史售后数据
@@ -1123,9 +1134,21 @@ public class LiveAfterSalesServiceImpl implements ILiveAfterSalesService {
             //将钱退还给用户
             List<LiveOrderPayment> payments = liveOrderPaymentMapper.selectLiveOrderPaymentByPay(5, order.getOrderId());
             if (payments != null && !payments.isEmpty()) {
-                String json = configService.selectConfigByKey("his.pay");
-                FsPayConfigScrm fsPayConfig = JSON.parseObject(json, FsPayConfigScrm.class);
+//                String json = configService.selectConfigByKey("his.pay");
+//                FsPayConfigScrm fsPayConfig = JSON.parseObject(json, FsPayConfigScrm.class);
+
                 for (LiveOrderPayment payment : payments) {
+                    FsCoursePlaySourceConfig fsCoursePlaySourceConfig = fsCoursePlaySourceConfigMapper.selectCoursePlaySourceConfigByAppId(payment.getAppId());
+                    if (fsCoursePlaySourceConfig == null) {
+                        throw new CustomException("未找到appId对应的小程序配置: " + payment.getAppId());
+                    }
+                    Long merchantConfigId = fsCoursePlaySourceConfig.getMerchantConfigId();
+                    if (merchantConfigId == null || merchantConfigId <= 0) {
+                        throw new CustomException("小程序没有配置商户信息");
+                    }
+                    MerchantAppConfig merchantAppConfig = merchantAppConfigMapper.selectMerchantAppConfigById(fsCoursePlaySourceConfig.getMerchantConfigId());
+                    FsPayConfig fsPayConfig = JSON.parseObject(merchantAppConfig.getDataJson(), FsPayConfig.class);
+
                     if (payment.getPayMode() == null || "wx".equals(payment.getPayMode())) {
                         WxPayConfig payConfig = new WxPayConfig();
                         payConfig.setAppId(fsPayConfig.getAppId());

+ 78 - 19
fs-service/src/main/java/com/fs/live/service/impl/LiveOrderServiceImpl.java

@@ -54,8 +54,10 @@ import com.fs.company.service.ICompanyUserService;
 import com.fs.config.cloud.CloudHostProper;
 import com.fs.core.config.WxMaConfiguration;
 import com.fs.core.utils.OrderCodeUtils;
+import com.fs.course.domain.FsCoursePlaySourceConfig;
 import com.fs.course.dto.FsOrderDeliveryNoteDTO;
 import com.fs.course.dto.OrderOpenIdTransDTO;
+import com.fs.course.mapper.FsCoursePlaySourceConfigMapper;
 import com.fs.erp.domain.*;
 import com.fs.erp.dto.*;
 import com.fs.erp.mapper.FsErpFinishPushMapper;
@@ -63,10 +65,7 @@ import com.fs.erp.service.IErpOrderService;
 import com.fs.his.config.FsSysConfig;
 import com.fs.his.domain.*;
 import com.fs.his.enums.FsStoreOrderLogEnum;
-import com.fs.his.mapper.FsHfpayConfigMapper;
-import com.fs.his.mapper.FsStoreProductAttrValueMapper;
-import com.fs.his.mapper.FsUserMapper;
-import com.fs.his.mapper.FsUserWxMapper;
+import com.fs.his.mapper.*;
 import com.fs.his.service.IFsExpressService;
 import com.fs.his.service.IFsStoreProductService;
 import com.fs.his.service.IFsUserService;
@@ -151,6 +150,12 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
     @Autowired
     private FsUserWxMapper fsUserWxMapper;
 
+    @Autowired
+    private FsCoursePlaySourceConfigMapper fsCoursePlaySourceConfigMapper;
+
+    @Autowired
+    private MerchantAppConfigMapper merchantAppConfigMapper;
+
 
 
     @Autowired
@@ -1284,9 +1289,21 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
             //将钱退还给用户
             List<LiveOrderPayment> payments = liveOrderPaymentMapper.selectLiveOrderPaymentByPay(5, order.getOrderId());
             if (payments != null && !payments.isEmpty()) {
-                String json = configService.selectConfigByKey("his.pay");
-                FsPayConfigScrm fsPayConfig = JSON.parseObject(json, FsPayConfigScrm.class);
+//                String json = configService.selectConfigByKey("his.pay");
+//                FsPayConfigScrm fsPayConfig = JSON.parseObject(json, FsPayConfigScrm.class);
+
                 for (LiveOrderPayment payment : payments) {
+                    FsCoursePlaySourceConfig fsCoursePlaySourceConfig = fsCoursePlaySourceConfigMapper.selectCoursePlaySourceConfigByAppId(payment.getAppId());
+                    if (fsCoursePlaySourceConfig == null) {
+                        throw new CustomException("未找到appId对应的小程序配置: " + payment.getAppId());
+                    }
+                    Long merchantConfigId = fsCoursePlaySourceConfig.getMerchantConfigId();
+                    if (merchantConfigId == null || merchantConfigId <= 0) {
+                        throw new CustomException("小程序没有配置商户信息");
+                    }
+                    MerchantAppConfig merchantAppConfig = merchantAppConfigMapper.selectMerchantAppConfigById(fsCoursePlaySourceConfig.getMerchantConfigId());
+                    FsPayConfig fsPayConfig = JSON.parseObject(merchantAppConfig.getDataJson(), FsPayConfig.class);
+
                     if (payment.getPayMode() == null || "wx".equals(payment.getPayMode())) {
                         WxPayConfig payConfig = new WxPayConfig();
                         payConfig.setAppId(fsPayConfig.getAppId());
@@ -1488,9 +1505,25 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
             //将钱退还给用户
             List<LiveOrderPayment> payments = liveOrderPaymentMapper.selectLiveOrderPaymentByPay(5, order.getOrderId());
             if (payments != null && !payments.isEmpty()) {
-                String json = configService.selectConfigByKey("his.pay");
-                FsPayConfigScrm fsPayConfig = JSON.parseObject(json, FsPayConfigScrm.class);
+//                String json = configService.selectConfigByKey("his.pay");
+//                FsPayConfigScrm fsPayConfig = JSON.parseObject(json, FsPayConfigScrm.class);
+
                 for (LiveOrderPayment payment : payments) {
+                    FsCoursePlaySourceConfig fsCoursePlaySourceConfig = fsCoursePlaySourceConfigMapper.selectCoursePlaySourceConfigByAppId(payment.getAppId());
+                    if (fsCoursePlaySourceConfig == null) {
+                        throw new CustomException("未找到appId对应的小程序配置: " + payment.getAppId());
+                    }
+                    Long merchantConfigId = fsCoursePlaySourceConfig.getMerchantConfigId();
+                    if (merchantConfigId == null || merchantConfigId <= 0) {
+                        throw new CustomException("小程序没有配置商户信息");
+                    }
+                    Long merConfigId = fsCoursePlaySourceConfig.getMerchantConfigId();
+                    if(payment.getMerConfigId()!=null){
+                        merConfigId=payment.getMerConfigId();
+                    }
+                    MerchantAppConfig merchantAppConfig = merchantAppConfigMapper.selectMerchantAppConfigById(merConfigId);
+                    FsPayConfig fsPayConfig = JSON.parseObject(merchantAppConfig.getDataJson(), FsPayConfig.class);
+
                     if (payment.getPayMode() == null || "wx".equals(payment.getPayMode())) {
                         WxPayConfig payConfig = new WxPayConfig();
                         payConfig.setAppId(fsPayConfig.getAppId());
@@ -2982,8 +3015,19 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
             FsUserScrm user = userMapper.selectFsUserById(Long.valueOf(liveOrder.getUserId()));
             if(user == null) return R.error("用户不存在");
 //            String json = configService.selectConfigByKey("store.pay");
-            String json = configService.selectConfigByKey("his.pay");
-            FsPayConfig fsPayConfig = JSON.parseObject(json, FsPayConfig.class);
+//            String json = configService.selectConfigByKey("his.pay");
+//            FsPayConfig fsPayConfig = JSON.parseObject(json, FsPayConfig.class);
+            FsCoursePlaySourceConfig fsCoursePlaySourceConfig = fsCoursePlaySourceConfigMapper.selectCoursePlaySourceConfigByAppId(appId);
+            if (fsCoursePlaySourceConfig == null) {
+                throw new CustomException("未找到appId对应的小程序配置: " + appId);
+            }
+            Long merchantConfigId = fsCoursePlaySourceConfig.getMerchantConfigId();
+            if (merchantConfigId == null || merchantConfigId <= 0) {
+                throw new CustomException("小程序没有配置商户信息");
+            }
+            MerchantAppConfig merchantAppConfig = merchantAppConfigMapper.selectMerchantAppConfigById(fsCoursePlaySourceConfig.getMerchantConfigId());
+
+
             String payCode =  OrderCodeUtils.getOrderSn();
             if(StringUtils.isEmpty(payCode)){
                 return R.error("订单生成失败,请重试");
@@ -2996,7 +3040,7 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
             } else {
                 storePayment = new LiveOrderPayment();
                 storePayment.setStatus(1);
-                storePayment.setPayMode(fsPayConfig.getType());
+                storePayment.setPayMode(merchantAppConfig.getMerchantType());
                 storePayment.setBusinessCode(liveOrder.getOrderCode());
                 storePayment.setPayCode(payCode);
                 storePayment.setPayMoney(liveOrder.getPayMoney());
@@ -3008,6 +3052,8 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
                 storePayment.setOpenId(user.getMaOpenId());
                 storePayment.setUserId(user.getUserId());
                 storePayment.setBusinessId(liveOrder.getOrderId().toString());
+                storePayment.setAppId(appId);
+                storePayment.setMerConfigId(merchantAppConfig.getId());
                 liveOrderPaymentMapper.insertLiveOrderPayment(storePayment);
             }
 
@@ -3084,16 +3130,28 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
         if(user == null){
             return R.error("未找到用户信息,请联系管理员!");
         }
-        String json = configService.selectConfigByKey("his.pay");
-        FsPayConfigScrm fsPayConfig = JSON.parseObject(json, FsPayConfigScrm.class);
+//        String json = configService.selectConfigByKey("his.pay");
+//        FsPayConfigScrm fsPayConfig = JSON.parseObject(json, FsPayConfigScrm.class);
+        FsCoursePlaySourceConfig fsCoursePlaySourceConfig = fsCoursePlaySourceConfigMapper.selectCoursePlaySourceConfigByAppId(param.getAppId());
+        if (fsCoursePlaySourceConfig == null) {
+            throw new CustomException("未找到appId对应的小程序配置: " + param.getAppId());
+        }
+        Long merchantConfigId = fsCoursePlaySourceConfig.getMerchantConfigId();
+        if (merchantConfigId == null || merchantConfigId <= 0) {
+            throw new CustomException("小程序没有配置商户信息");
+        }
+        MerchantAppConfig merchantAppConfig = merchantAppConfigMapper.selectMerchantAppConfigById(fsCoursePlaySourceConfig.getMerchantConfigId());
+        FsPayConfig fsPayConfig = JSON.parseObject(merchantAppConfig.getDataJson(), FsPayConfig.class);
+
         String openId;
+        String appId = param.getAppId();
         if(StringUtils.isNotEmpty(user.getMaOpenId())){
             log.info("用户信息有openid:{}", user.getMaOpenId());
             openId = user.getMaOpenId();
         }else{
             Wrapper<FsUserWx> queryWrapper = Wrappers.<FsUserWx>lambdaQuery()
                     .eq(FsUserWx::getFsUserId, order.getUserId())
-                    .eq(FsUserWx::getAppId, fsPayConfig.getAppId());
+                    .eq(FsUserWx::getAppId, appId);
             FsUserWx fsUserWx = fsUserWxMapper.selectOne(queryWrapper);
             log.info("查到的openId信息:{}", fsUserWx);
             openId = fsUserWx.getOpenId();
@@ -3159,7 +3217,7 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
                 LiveOrderPayment storePayment = new LiveOrderPayment();
                 storePayment.setCompanyId(order.getCompanyId());
                 storePayment.setCompanyUserId(order.getCompanyUserId());
-                storePayment.setPayMode(fsPayConfig.getType());
+                storePayment.setPayMode(merchantAppConfig.getMerchantType());
                 storePayment.setStatus(0);
                 storePayment.setPayCode(payCode);
                 storePayment.setPayMoney(order.getPayMoney());
@@ -3170,10 +3228,11 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
                 storePayment.setOpenId(openId);
                 storePayment.setUserId(user.getUserId());
                 storePayment.setBusinessId(String.valueOf(order.getOrderId()));
-                storePayment.setAppId(param.getAppId());
+                storePayment.setAppId(appId);
+                storePayment.setMerConfigId(merchantAppConfig.getId());
                 liveOrderPaymentMapper.insertLiveOrderPayment(storePayment);
 
-                if (fsPayConfig.getType().equals("hf")) {
+                if (merchantAppConfig.getMerchantType().equals("hf")) {
                     HuiFuCreateOrder o = new HuiFuCreateOrder();
                     o.setTradeType("T_MINIAPP");
                     o.setOpenid(storePayment.getOpenId());
@@ -3201,9 +3260,9 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
                     } else {
                         return R.error(result.getResp_desc());
                     }
-                } else if (fsPayConfig.getType().equals("wx")) {
+                } else if (merchantAppConfig.getMerchantType().equals("wx")) {
                     WxPayConfig payConfig = new WxPayConfig();
-                    payConfig.setAppId(fsPayConfig.getAppId());
+                    payConfig.setAppId(appId);
                     payConfig.setMchId(fsPayConfig.getWxMchId());
                     payConfig.setMchKey(fsPayConfig.getWxMchKey());
                     payConfig.setSubAppId(org.apache.commons.lang3.StringUtils.trimToNull(null));

+ 1 - 0
fs-service/src/main/resources/mapper/live/LiveCouponIssueMapper.xml

@@ -43,6 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isPermanent != null "> and lci.is_permanent = #{isPermanent}</if>
             <if test="status != null "> and lci.status = #{status}</if>
             <if test="isDel != null "> and lci.is_del = #{isDel}</if>
+            <if test="params != null and params.size>0 "> and lci.create_time BETWEEN  #{params.beginTime} and #{params.endTime}</if>
         </where>
     </select>
 

+ 2 - 0
fs-service/src/main/resources/mapper/live/LiveOrderPaymentMapper.xml

@@ -147,6 +147,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="shareMoney != null">share_money,</if>
             <if test="isShare != null">is_share,</if>
             <if test="appId != null">app_id,</if>
+            <if test="merConfigId != null">mer_config_id,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="payCode != null">#{payCode},</if>
@@ -175,6 +176,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="shareMoney != null">#{shareMoney},</if>
             <if test="isShare != null">#{isShare},</if>
             <if test="appId != null">#{appId},</if>
+            <if test="merConfigId != null">#{merConfigId},</if>
          </trim>
     </insert>