Merge remote-tracking branch 'origin/dev' into hph
This commit is contained in:
commit
8a0589e384
|
|
@ -116,10 +116,10 @@ public class ConsMsgConsumer {
|
||||||
return;
|
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())) {
|
if (N.egt(tbConsInfo.getConWarning(), tbConsInfo.getStockNumber().subtract(tbConsInfo.getStockConsume()).abs())) {
|
||||||
|
|
||||||
|
|
||||||
List<TbUserShopMsg> tbUserShopMsgs = tbUserShopMsgMapper.selectAllByShopId(tbConsInfo.getShopId());
|
List<TbUserShopMsg> tbUserShopMsgs = tbUserShopMsgMapper.selectAllByShopId(tbConsInfo.getShopId());
|
||||||
if (Objects.nonNull(tbUserShopMsgs) && tbUserShopMsgs.size()>0) {
|
if (Objects.nonNull(tbUserShopMsgs) && tbUserShopMsgs.size()>0) {
|
||||||
tbUserShopMsgs.parallelStream().forEach(tbUserShopMsg->{
|
tbUserShopMsgs.parallelStream().forEach(tbUserShopMsg->{
|
||||||
|
|
|
||||||
|
|
@ -386,9 +386,9 @@ public class DutyService {
|
||||||
redisUtil.seckill(RedisCst.PRODUCT + shopId.toString() + ":" + skuId.toString(), num.toString());
|
redisUtil.seckill(RedisCst.PRODUCT + shopId.toString() + ":" + skuId.toString(), num.toString());
|
||||||
if (ObjectUtil.isNotEmpty(tbProductSku)) {
|
if (ObjectUtil.isNotEmpty(tbProductSku)) {
|
||||||
if (num > tbProductSku.getStockNumber()) {
|
if (num > tbProductSku.getStockNumber()) {
|
||||||
productSkuMapper.updateStockNum(skuId,num);
|
// productSkuMapper.updateStockNum(skuId,num);
|
||||||
} else {
|
} else {
|
||||||
productSkuMapper.updateByskuIdSub(skuId, num);
|
// productSkuMapper.updateByskuIdSub(skuId, num);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -124,6 +124,7 @@ public class LoginService {
|
||||||
accountMap.put("accountId", account.getId());
|
accountMap.put("accountId", account.getId());
|
||||||
accountMap.put("merchantName", account.getAccount());
|
accountMap.put("merchantName", account.getAccount());
|
||||||
accountMap.put("loginName", tbPlussShopStaff.getAccount());
|
accountMap.put("loginName", tbPlussShopStaff.getAccount());
|
||||||
|
accountMap.put("loginAccount",tbPlussShopStaff.getName());
|
||||||
accountMap.put("clientType", loginReq.getClientType());
|
accountMap.put("clientType", loginReq.getClientType());
|
||||||
accountMap.put("shopId", account.getShopId());
|
accountMap.put("shopId", account.getShopId());
|
||||||
accountMap.put("staffId", tbPlussShopStaff.getId());
|
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.DateTime;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.thread.ThreadUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.http.HttpRequest;
|
import cn.hutool.http.HttpRequest;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
|
|
@ -28,6 +29,7 @@ import java.sql.Timestamp;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import static com.chaozhanggui.system.cashierservice.sign.CodeEnum.CARTEXIST;
|
import static com.chaozhanggui.system.cashierservice.sign.CodeEnum.CARTEXIST;
|
||||||
|
|
||||||
|
|
@ -569,12 +571,17 @@ public class OrderService {
|
||||||
jsonObject.put("type","create");
|
jsonObject.put("type","create");
|
||||||
producer.cons(jsonObject.toString());
|
producer.cons(jsonObject.toString());
|
||||||
|
|
||||||
for (TbCashierCart cashierCart : list) {
|
List<TbCashierCart> finalList = list;
|
||||||
JSONObject objectMsg = new JSONObject();
|
ThreadUtil.execAsync(() -> {
|
||||||
objectMsg.put("skuId", Integer.valueOf(cashierCart.getSkuId()));
|
ThreadUtil.sleep(5, TimeUnit.SECONDS);
|
||||||
objectMsg.put("shopId", Integer.valueOf(cashierCart.getShopId()));
|
for (TbCashierCart cashierCart : finalList) {
|
||||||
producer.con_msg(objectMsg.toString());
|
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);
|
return Result.success(CodeEnum.SUCCESS, orderInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -987,7 +987,7 @@ public class PayService {
|
||||||
|
|
||||||
//修改耗材数据
|
//修改耗材数据
|
||||||
JSONObject jsonObject1=new JSONObject();
|
JSONObject jsonObject1=new JSONObject();
|
||||||
jsonObject1.put("orderId",orderInfo.getId());
|
jsonObject1.put("orderId",newOrderInfo.getId());
|
||||||
jsonObject1.put("type","delete");
|
jsonObject1.put("type","delete");
|
||||||
producer.cons(jsonObject1.toString());
|
producer.cons(jsonObject1.toString());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,7 @@ public class WxAccountUtil {
|
||||||
try {
|
try {
|
||||||
return sendTemplateMsg(msgTmpId, toUserOpenId, data);
|
return sendTemplateMsg(msgTmpId, toUserOpenId, data);
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
log.error("发送失败: {}", e.getMessage());
|
log.error("发送失败, openId:{}, msg: {}", toUserOpenId, e.getMessage());
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,8 @@
|
||||||
toi.STATUS,
|
toi.STATUS,
|
||||||
toi.out_number AS outNumber,
|
toi.out_number AS outNumber,
|
||||||
toi.table_name AS tableName,
|
toi.table_name AS tableName,
|
||||||
toi.remark
|
toi.remark,
|
||||||
|
toi.master_id as masterId
|
||||||
|
|
||||||
|
|
||||||
FROM
|
FROM
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue