Przeglądaj źródła

fix bug

release_toaliyun_real
xiaohanzi 5 lat temu
rodzic
commit
3e25c6b687
3 zmienionych plików z 19 dodań i 17 usunięć
  1. +0
    -2
      mallinkBApi/src/main/java/com/iformall/controller/WxCouponOrderController.java
  2. +4
    -4
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java
  3. +15
    -11
      mybatis-multi-tenancy/src/main/java/com/iformall/plugin/shard/plugin/ShardingSpherePlugin.java

+ 0
- 2
mallinkBApi/src/main/java/com/iformall/controller/WxCouponOrderController.java Wyświetl plik

@@ -337,6 +337,4 @@ public class WxCouponOrderController extends BaseController {


return new ResultData(); return new ResultData();
} }


} }

+ 4
- 4
mallinkService/src/main/java/com/iformall/service/impl/WxCouponOrderServiceImpl.java Wyświetl plik

@@ -618,10 +618,10 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService {
@Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class})
public void subsidyAfterVerify(WxCouponOrder couponOrder, Long merchantId) { public void subsidyAfterVerify(WxCouponOrder couponOrder, Long merchantId) {
// 检查补贴是否入库 // 检查补贴是否入库
List<WxMerchantSubsidy> wmsList = wxMerchantSubsidyMapper.selectList(
new LambdaQueryWrapper<WxMerchantSubsidy>().eq(WxMerchantSubsidy::getOrderId, couponOrder.getOrderId())
.eq(WxMerchantSubsidy::getType, EnumMerchantSubsidyType.MANUAL)
);
WxMerchantSubsidy subsidy = new WxMerchantSubsidy();
subsidy.setOrderId(couponOrder.getOrderId());
subsidy.setType(EnumMerchantSubsidyType.MANUAL.getCode());
List<WxMerchantSubsidy> wmsList = wxMerchantSubsidyMapper.selectList(new QueryWrapper(subsidy));
if (wmsList.size() > 0) { if (wmsList.size() > 0) {
logger.error("补贴已经入库: (orderId,type)-({},1)", couponOrder.getOrderId()); logger.error("补贴已经入库: (orderId,type)-({},1)", couponOrder.getOrderId());
return; return;


+ 15
- 11
mybatis-multi-tenancy/src/main/java/com/iformall/plugin/shard/plugin/ShardingSpherePlugin.java Wyświetl plik

@@ -223,17 +223,21 @@ public class ShardingSpherePlugin implements MyBatisPlus {
throw new RuntimeException("table sharinding error column is null"); throw new RuntimeException("table sharinding error column is null");
} }
try { try {
System.out.println("column>>>>>>>>>>>>>"+column);
String[] field = column.split("_");
String fieldName = "";
if (null != field && field.length > 0) {
for (String f : field) {
fieldName = fieldName + f.substring(0,1).toUpperCase()+f.substring(1);
}
}else {
fieldName = column.substring(0,1).toUpperCase()+column.substring(1);
}
return fieldName;
if (column.contains("_") && (!column.endsWith("_")) && (!column.startsWith("_"))) {
String[] field = column.split("_");
String fieldName = "";
if (null != field && field.length > 0) {
for (String f : field) {
fieldName = fieldName + f.substring(0,1).toUpperCase()+f.substring(1);
}
}else {
fieldName = column.substring(0,1).toUpperCase()+column.substring(1);
}
return fieldName;
}else {
return column.substring(0,1).toUpperCase()+column.substring(1);
}
}catch(Exception e) { }catch(Exception e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }


Ładowanie…
Anuluj
Zapisz