Merge branch 'prod' into test
This commit is contained in:
@@ -10,6 +10,7 @@ import com.mybatisflex.spring.service.impl.ServiceImpl;
|
|||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -27,6 +28,10 @@ public class BkContactListServiceImpl extends ServiceImpl<BkContactListMapper, B
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<BkContactList> getUserList(Long shopId, Set<String> phones) {
|
public List<BkContactList> getUserList(Long shopId, Set<String> phones) {
|
||||||
|
if (phones == null || phones.isEmpty()) {
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
|
||||||
remove(QueryWrapper.create().eq(BkContactList::getShopId, shopId));
|
remove(QueryWrapper.create().eq(BkContactList::getShopId, shopId));
|
||||||
List<BkContactList> collect = phones.stream()
|
List<BkContactList> collect = phones.stream()
|
||||||
.filter(StrUtil::isNotEmpty)
|
.filter(StrUtil::isNotEmpty)
|
||||||
|
|||||||
@@ -106,9 +106,11 @@ public class MkShopRechargeServiceImpl extends ServiceImpl<MkShopRechargeMapper,
|
|||||||
Map<Long, ShopCoupon> couponMap = shopCouponService.list(new QueryWrapper().in(ShopCoupon::getId, couponIdList)).stream().collect(Collectors.toMap(ShopCoupon::getId, v -> v));
|
Map<Long, ShopCoupon> couponMap = shopCouponService.list(new QueryWrapper().in(ShopCoupon::getId, couponIdList)).stream().collect(Collectors.toMap(ShopCoupon::getId, v -> v));
|
||||||
couponInfoDTOS.forEach(item -> {
|
couponInfoDTOS.forEach(item -> {
|
||||||
ShopCoupon shopCoupon = couponMap.get(item.getId());
|
ShopCoupon shopCoupon = couponMap.get(item.getId());
|
||||||
if (shopCoupon != null) {
|
|
||||||
shopCoupon.setInfo();
|
if (shopCoupon == null) {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
shopCoupon.setInfo();
|
||||||
couponInfoVOS.add(new CouponInfoVO().setCoupon(shopCoupon).setNum(item.getNum()));
|
couponInfoVOS.add(new CouponInfoVO().setCoupon(shopCoupon).setNum(item.getNum()));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,6 +95,7 @@
|
|||||||
consStockFlow.setInOutItem(InOutItemEnum.MANUAL_IN.value());
|
consStockFlow.setInOutItem(InOutItemEnum.MANUAL_IN.value());
|
||||||
consStockFlow.setCreateUserId(createUserId);
|
consStockFlow.setCreateUserId(createUserId);
|
||||||
consStockFlow.setCreateUserName(createUserName);
|
consStockFlow.setCreateUserName(createUserName);
|
||||||
|
consStockFlow.setVendorId(param.getVendorId());
|
||||||
String conId = entity.getConId();
|
String conId = entity.getConId();
|
||||||
ConsInfo consInfo;
|
ConsInfo consInfo;
|
||||||
if (StrUtil.isBlank(entity.getConId())) {
|
if (StrUtil.isBlank(entity.getConId())) {
|
||||||
@@ -121,7 +122,9 @@
|
|||||||
consInfo.setStockNumber(consStockFlow.getAfterNumber());
|
consInfo.setStockNumber(consStockFlow.getAfterNumber());
|
||||||
updateStockList.add(consInfo);
|
updateStockList.add(consInfo);
|
||||||
}
|
}
|
||||||
|
if (!insertList.isEmpty()) {
|
||||||
mapper.insertBatchSelective(insertList, 50);
|
mapper.insertBatchSelective(insertList, 50);
|
||||||
|
}
|
||||||
for (ConsInfo consInfo : updateStockList) {
|
for (ConsInfo consInfo : updateStockList) {
|
||||||
consInfoMapper.update(consInfo);
|
consInfoMapper.update(consInfo);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user