|
|
|
@@ -244,7 +244,7 @@ public class WxBillDailyServiceImpl implements WxBillDailyService { |
|
|
|
public void insertData(WxBillDailyVo billDaily, String importKey, MallUserInfo user) { |
|
|
|
String shopNumber = billDaily.getShopNumber(); |
|
|
|
if (StringUtils.isBlank(shopNumber)) { |
|
|
|
stringRedisTemplate.opsForHash().increment(importKey, "processCount", 1); |
|
|
|
stringRedisTemplate.opsForHash().increment(importKey, "failCount", 1); |
|
|
|
logger.error("商铺号为空", billDaily.toString()); |
|
|
|
return; |
|
|
|
} |
|
|
|
@@ -256,43 +256,43 @@ public class WxBillDailyServiceImpl implements WxBillDailyService { |
|
|
|
shop.setIsDel(EnumDelStatus.NOT_DEL.getCode()); |
|
|
|
WxShop wxShop = wxShopMapper.selectOne(shop); |
|
|
|
if (wxShop == null) { |
|
|
|
stringRedisTemplate.opsForHash().increment(importKey, "processCount", 1); |
|
|
|
stringRedisTemplate.opsForHash().increment(importKey, "failCount", 1); |
|
|
|
logger.error("商铺未找到", billDaily.toString()); |
|
|
|
return; |
|
|
|
} |
|
|
|
Integer type = billDaily.getType(); |
|
|
|
if (type == null) { |
|
|
|
stringRedisTemplate.opsForHash().increment(importKey, "processCount", 1); |
|
|
|
stringRedisTemplate.opsForHash().increment(importKey, "failCount", 1); |
|
|
|
logger.error("账单类型为空", billDaily.toString()); |
|
|
|
return; |
|
|
|
} |
|
|
|
String receivePayStr = billDaily.getReceivePayStr(); |
|
|
|
if (StringUtils.isBlank(receivePayStr)) { |
|
|
|
stringRedisTemplate.opsForHash().increment(importKey, "processCount", 1); |
|
|
|
stringRedisTemplate.opsForHash().increment(importKey, "failCount", 1); |
|
|
|
logger.error("实际应收金额为空", billDaily.toString()); |
|
|
|
return; |
|
|
|
} |
|
|
|
double receivePayD = new BigDecimal(receivePayStr).doubleValue(); |
|
|
|
if (receivePayD <= 0) { |
|
|
|
stringRedisTemplate.opsForHash().increment(importKey, "processCount", 1); |
|
|
|
stringRedisTemplate.opsForHash().increment(importKey, "failCount", 1); |
|
|
|
logger.error("实际应收金额小于等于0", billDaily.toString()); |
|
|
|
return; |
|
|
|
} |
|
|
|
String payStr = billDaily.getPayStr(); |
|
|
|
if (StringUtils.isBlank(payStr)) { |
|
|
|
stringRedisTemplate.opsForHash().increment(importKey, "processCount", 1); |
|
|
|
stringRedisTemplate.opsForHash().increment(importKey, "failCount", 1); |
|
|
|
logger.error("实收金额为空", billDaily.toString()); |
|
|
|
return; |
|
|
|
} |
|
|
|
double payD = new BigDecimal(payStr).doubleValue(); |
|
|
|
if (payD < 0) { |
|
|
|
stringRedisTemplate.opsForHash().increment(importKey, "processCount", 1); |
|
|
|
stringRedisTemplate.opsForHash().increment(importKey, "failCount", 1); |
|
|
|
logger.error("实收金额小于0", billDaily.toString()); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (receivePayD < payD) { |
|
|
|
stringRedisTemplate.opsForHash().increment(importKey, "processCount", 1); |
|
|
|
stringRedisTemplate.opsForHash().increment(importKey, "failCount", 1); |
|
|
|
logger.error("实际应收金额小于实收金额", billDaily.toString()); |
|
|
|
return; |
|
|
|
} |
|
|
|
|