Merge remote-tracking branch 'origin/dev' into hph
This commit is contained in:
commit
8a0589e384
|
|
@ -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->{
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue