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

This commit is contained in:
张松 2024-11-25 16:39:32 +08:00
commit a7eb15781f
2 changed files with 9 additions and 5 deletions

View File

@ -110,7 +110,7 @@ public class TbCreditBuyerOrderServiceImpl extends ServiceImpl<TbCreditBuyerOrde
Assert.notNull(record.getOrderId(), "{}({})不能为空", "订单id", "orderId");
Assert.notNull(record.getRepaymentAmount(), "{}({})不能为空", "还款金额", "repaymentAmount");
Assert.notEmpty(record.getPaymentMethod(), "{}({})不能为空", "支付方式", "paymentMethod");
Assert.notNull(record.getPaymentTime(), "{}({})不能为空", "还款时间", "paymentTime");
//Assert.notNull(record.getPaymentTime(), "{}({})不能为空", "还款时间", "paymentTime");
} catch (IllegalArgumentException e) {
throw new BadRequestException(e.getMessage());
}
@ -147,8 +147,10 @@ public class TbCreditBuyerOrderServiceImpl extends ServiceImpl<TbCreditBuyerOrde
entity.setPaidAmount(NumberUtil.add(entity.getPaidAmount(), record.getRepaymentAmount()));
entity.setLastPaymentTime(new Date());
entity.setLastPaymentMethod(record.getPaymentMethod());
entity.setRemark(record.getRemark());
super.updateById(entity);
record.setCreateTime(new Date());
record.setPaymentTime(new Date());
tbCreditPaymentRecordMapper.insert(record);
}

View File

@ -47,15 +47,17 @@ public class BindServiceImpl implements BindService {
@Override
public JSONObject subInvoicing(Map<String, Object> params) {
String shopId = params.get("shopId").toString();
params.remove("shopId");
String result = HttpUtil.post(url + "cash/subinvoicing", params, 5000);
JSONObject jsonObject = JSONObject.parseObject(result);
if (jsonObject.getInteger("code").equals(1)) {
if (params.get("shopId") != null) {
if (redisUtils.hasKey(CacheKey.INVOICE_SD_TYPE + params.get("shopId"))) {
Set<Object> articles = redisUtils.sGet(CacheKey.INVOICE_SD_TYPE + params.get("shopId"));
if (StringUtils.isNotBlank(shopId)) {
if (redisUtils.hasKey(CacheKey.INVOICE_SD_TYPE + shopId)) {
Set<Object> articles = redisUtils.sGet(CacheKey.INVOICE_SD_TYPE + shopId);
if (!articles.contains(params.get("article"))) {
articles.add(params.get("article"));
redisUtils.sSet(CacheKey.INVOICE_SD_TYPE + params.get("shopId"), articles);
redisUtils.sSet(CacheKey.INVOICE_SD_TYPE + shopId, articles);
}
}
}