Merge remote-tracking branch 'origin/dev' into hph

This commit is contained in:
牛叉闪闪 2024-07-31 14:01:00 +08:00
commit 8a0589e384
7 changed files with 22 additions and 13 deletions

View File

@ -116,10 +116,10 @@ public class ConsMsgConsumer {
return;
}
log.info("conwarning:{},stockNumber:{}",tbConsInfo.getConWarning(),tbConsInfo.getStockNumber().subtract(tbConsInfo.getStockConsume()).abs());
log.info("耗材名称: {}, conwarning:{},stockNumber:{}",tbConsInfo.getConName(),
tbConsInfo.getConWarning(),tbConsInfo.getStockNumber().subtract(tbConsInfo.getStockConsume()).abs());
if (N.egt(tbConsInfo.getConWarning(), tbConsInfo.getStockNumber().subtract(tbConsInfo.getStockConsume()).abs())) {
List<TbUserShopMsg> tbUserShopMsgs = tbUserShopMsgMapper.selectAllByShopId(tbConsInfo.getShopId());
if (Objects.nonNull(tbUserShopMsgs) && tbUserShopMsgs.size()>0) {
tbUserShopMsgs.parallelStream().forEach(tbUserShopMsg->{

View File

@ -386,9 +386,9 @@ public class DutyService {
redisUtil.seckill(RedisCst.PRODUCT + shopId.toString() + ":" + skuId.toString(), num.toString());
if (ObjectUtil.isNotEmpty(tbProductSku)) {
if (num > tbProductSku.getStockNumber()) {
productSkuMapper.updateStockNum(skuId,num);
// productSkuMapper.updateStockNum(skuId,num);
} else {
productSkuMapper.updateByskuIdSub(skuId, num);
// productSkuMapper.updateByskuIdSub(skuId, num);
}
}
}

View File

@ -124,6 +124,7 @@ public class LoginService {
accountMap.put("accountId", account.getId());
accountMap.put("merchantName", account.getAccount());
accountMap.put("loginName", tbPlussShopStaff.getAccount());
accountMap.put("loginAccount",tbPlussShopStaff.getName());
accountMap.put("clientType", loginReq.getClientType());
accountMap.put("shopId", account.getShopId());
accountMap.put("staffId", tbPlussShopStaff.getId());

View File

@ -2,6 +2,7 @@ package com.chaozhanggui.system.cashierservice.service;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.thread.ThreadUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.http.HttpRequest;
import com.alibaba.fastjson.JSON;
@ -28,6 +29,7 @@ import java.sql.Timestamp;
import java.util.*;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
import static com.chaozhanggui.system.cashierservice.sign.CodeEnum.CARTEXIST;
@ -569,12 +571,17 @@ public class OrderService {
jsonObject.put("type","create");
producer.cons(jsonObject.toString());
for (TbCashierCart cashierCart : list) {
JSONObject objectMsg = new JSONObject();
objectMsg.put("skuId", Integer.valueOf(cashierCart.getSkuId()));
objectMsg.put("shopId", Integer.valueOf(cashierCart.getShopId()));
producer.con_msg(objectMsg.toString());
}
List<TbCashierCart> finalList = list;
ThreadUtil.execAsync(() -> {
ThreadUtil.sleep(5, TimeUnit.SECONDS);
for (TbCashierCart cashierCart : finalList) {
JSONObject objectMsg = new JSONObject();
objectMsg.put("skuId", Integer.valueOf(cashierCart.getSkuId()));
objectMsg.put("shopId", Integer.valueOf(cashierCart.getShopId()));
producer.con_msg(objectMsg.toString());
}
});
return Result.success(CodeEnum.SUCCESS, orderInfo);
}

View File

@ -987,7 +987,7 @@ public class PayService {
//修改耗材数据
JSONObject jsonObject1=new JSONObject();
jsonObject1.put("orderId",orderInfo.getId());
jsonObject1.put("orderId",newOrderInfo.getId());
jsonObject1.put("type","delete");
producer.cons(jsonObject1.toString());

View File

@ -115,7 +115,7 @@ public class WxAccountUtil {
try {
return sendTemplateMsg(msgTmpId, toUserOpenId, data);
}catch (Exception e) {
log.error("发送失败: {}", e.getMessage());
log.error("发送失败, openId:{}, msg: {}", toUserOpenId, e.getMessage());
return null;
}
}

View File

@ -76,7 +76,8 @@
toi.STATUS,
toi.out_number AS outNumber,
toi.table_name AS tableName,
toi.remark
toi.remark,
toi.master_id as masterId
FROM