Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
@@ -2,7 +2,9 @@ package com.czg.task;
|
|||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.czg.market.service.OrderInfoService;
|
import com.czg.market.service.OrderInfoService;
|
||||||
|
import com.czg.order.entity.CashierCart;
|
||||||
import com.czg.order.entity.OrderInfo;
|
import com.czg.order.entity.OrderInfo;
|
||||||
|
import com.czg.order.service.CashierCartService;
|
||||||
import com.czg.service.order.enums.OrderStatusEnums;
|
import com.czg.service.order.enums.OrderStatusEnums;
|
||||||
import com.mybatisflex.core.query.QueryWrapper;
|
import com.mybatisflex.core.query.QueryWrapper;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
@@ -21,6 +23,8 @@ import org.springframework.stereotype.Component;
|
|||||||
public class OTimeTask {
|
public class OTimeTask {
|
||||||
@Resource
|
@Resource
|
||||||
private OrderInfoService orderInfoService;
|
private OrderInfoService orderInfoService;
|
||||||
|
@Resource
|
||||||
|
private CashierCartService cartService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* order 过期
|
* order 过期
|
||||||
@@ -32,5 +36,12 @@ public class OTimeTask {
|
|||||||
orderInfoService.update(orderInfo, QueryWrapper.create()
|
orderInfoService.update(orderInfo, QueryWrapper.create()
|
||||||
.eq(OrderInfo::getStatus, OrderStatusEnums.UNPAID.getCode())
|
.eq(OrderInfo::getStatus, OrderStatusEnums.UNPAID.getCode())
|
||||||
.lt(OrderInfo::getTradeDay, DateUtil.format(DateUtil.yesterday(), "yyyy-MM-dd")));
|
.lt(OrderInfo::getTradeDay, DateUtil.format(DateUtil.yesterday(), "yyyy-MM-dd")));
|
||||||
|
|
||||||
|
QueryWrapper cartUpdateWrapper = new QueryWrapper();
|
||||||
|
cartUpdateWrapper.lt(CashierCart::getCreateTime, DateUtil.format(DateUtil.yesterday(), "yyyy-MM-dd HH:mm:ss"))
|
||||||
|
.and(wrapper -> {
|
||||||
|
wrapper.isNull(CashierCart::getUpdateTime).or(CashierCart::getUpdateTime).lt(DateUtil.format(DateUtil.yesterday(), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
});
|
||||||
|
cartService.remove(cartUpdateWrapper);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.mybatisflex.annotation.Column;
|
|||||||
import com.mybatisflex.annotation.Id;
|
import com.mybatisflex.annotation.Id;
|
||||||
import com.mybatisflex.annotation.KeyType;
|
import com.mybatisflex.annotation.KeyType;
|
||||||
import com.mybatisflex.annotation.Table;
|
import com.mybatisflex.annotation.Table;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
@@ -45,6 +46,11 @@ public class BkContactList implements Serializable {
|
|||||||
* 电话号码
|
* 电话号码
|
||||||
*/
|
*/
|
||||||
private String phone;
|
private String phone;
|
||||||
|
/**
|
||||||
|
* 昵称
|
||||||
|
*/
|
||||||
|
@Column(ignore = true)
|
||||||
|
private String nickName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 历史订单数
|
* 历史订单数
|
||||||
@@ -56,7 +62,7 @@ public class BkContactList implements Serializable {
|
|||||||
* 取消数
|
* 取消数
|
||||||
*/
|
*/
|
||||||
@Column(ignore = true)
|
@Column(ignore = true)
|
||||||
private Integer cannelNum;
|
private Integer cancelNum;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 最后一次预约时间
|
* 最后一次预约时间
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.czg.order.vo;
|
package com.czg.order.vo;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -18,13 +19,15 @@ public class KitchenFoodVO {
|
|||||||
|
|
||||||
private String productName;
|
private String productName;
|
||||||
private String skuName;
|
private String skuName;
|
||||||
|
private Long categoryId;
|
||||||
|
String categoryName;
|
||||||
|
|
||||||
private List<KitchenFoodItemVO> foodItems;
|
private List<KitchenFoodItemVO> foodItems;
|
||||||
|
|
||||||
record KitchenFoodItemVO(
|
record KitchenFoodItemVO(
|
||||||
//员工名称
|
//员工名称
|
||||||
Long orderId, String staffName,
|
Long orderId, String staffName,
|
||||||
String tableName,String areaName,Long orderDetailId,Long categoryId,String categoryName,
|
String tableName, String areaName, Long orderDetailId,
|
||||||
//下单数 //菜品状态 待起菜 PENDING_PREP 待出菜 READY_TO_SERVE 已出菜 SENT_OUT 已上菜 DELIVERED
|
//下单数 //菜品状态 待起菜 PENDING_PREP 待出菜 READY_TO_SERVE 已出菜 SENT_OUT 已上菜 DELIVERED
|
||||||
Long num, String subStatus,
|
Long num, String subStatus,
|
||||||
//下单时间 起菜时间 出菜时间 上菜时间
|
//下单时间 起菜时间 出菜时间 上菜时间
|
||||||
|
|||||||
@@ -18,5 +18,5 @@ public interface BkContactListMapper extends BaseMapper<BkContactList> {
|
|||||||
* @param shopId 店铺ID
|
* @param shopId 店铺ID
|
||||||
* @return 通讯录联系人列表
|
* @return 通讯录联系人列表
|
||||||
*/
|
*/
|
||||||
List<BkContactList> getUserList(Long shopId);
|
List<BkContactList> getUserList(Long shopId, Long mainShopId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,10 +97,10 @@ public class AShopUserServiceImpl implements AShopUserService {
|
|||||||
Long mainIdByShopId = shopInfoService.getMainIdByShopId(StpKit.USER.getShopId());
|
Long mainIdByShopId = shopInfoService.getMainIdByShopId(StpKit.USER.getShopId());
|
||||||
PageHelper.startPage(PageUtil.buildPageHelp());
|
PageHelper.startPage(PageUtil.buildPageHelp());
|
||||||
PageInfo<ShopUserDTO> shopUserDTOPageInfo = new PageInfo<>(shopUserMapper.selectPageByKeyAndIsVip(mainIdByShopId, isVip, key, amount));
|
PageInfo<ShopUserDTO> shopUserDTOPageInfo = new PageInfo<>(shopUserMapper.selectPageByKeyAndIsVip(mainIdByShopId, isVip, key, amount));
|
||||||
shopUserDTOPageInfo.getList().forEach(item -> {
|
// shopUserDTOPageInfo.getList().forEach(item -> {
|
||||||
item.setNew(consumeDiscountService.isNewUser(item, StpKit.USER.getShopId()));
|
// item.setNew(consumeDiscountService.isNewUser(item, StpKit.USER.getShopId()));
|
||||||
setUserDiscount(item);
|
// setUserDiscount(item);
|
||||||
});
|
// });
|
||||||
return PageUtil.convert(shopUserDTOPageInfo);
|
return PageUtil.convert(shopUserDTOPageInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
package com.czg.service.account.service.impl;
|
package com.czg.service.account.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.mybatisflex.core.query.QueryWrapper;
|
|
||||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
|
||||||
import com.czg.account.entity.BkContactList;
|
import com.czg.account.entity.BkContactList;
|
||||||
import com.czg.account.service.BkContactListService;
|
import com.czg.account.service.BkContactListService;
|
||||||
|
import com.czg.account.service.ShopInfoService;
|
||||||
import com.czg.service.account.mapper.BkContactListMapper;
|
import com.czg.service.account.mapper.BkContactListMapper;
|
||||||
|
import com.mybatisflex.core.query.QueryWrapper;
|
||||||
|
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||||
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -20,12 +21,14 @@ import java.util.stream.Collectors;
|
|||||||
* @since 2025-11-27
|
* @since 2025-11-27
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class BkContactListServiceImpl extends ServiceImpl<BkContactListMapper, BkContactList> implements BkContactListService{
|
public class BkContactListServiceImpl extends ServiceImpl<BkContactListMapper, BkContactList> implements BkContactListService {
|
||||||
|
@Resource
|
||||||
|
private ShopInfoService shopInfoService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<BkContactList> getUserList(Long shopId, Set<String> phones) {
|
public List<BkContactList> getUserList(Long shopId, Set<String> phones) {
|
||||||
remove(QueryWrapper.create().eq(BkContactList::getShopId, shopId));
|
remove(QueryWrapper.create().eq(BkContactList::getShopId, shopId));
|
||||||
saveBatch(phones.stream()
|
List<BkContactList> collect = phones.stream()
|
||||||
.filter(StrUtil::isNotEmpty)
|
.filter(StrUtil::isNotEmpty)
|
||||||
.map(phone -> {
|
.map(phone -> {
|
||||||
BkContactList bkContact = new BkContactList();
|
BkContactList bkContact = new BkContactList();
|
||||||
@@ -33,7 +36,9 @@ public class BkContactListServiceImpl extends ServiceImpl<BkContactListMapper, B
|
|||||||
bkContact.setPhone(phone.trim());
|
bkContact.setPhone(phone.trim());
|
||||||
return bkContact;
|
return bkContact;
|
||||||
})
|
})
|
||||||
.collect(Collectors.toList()));
|
.collect(Collectors.toList());
|
||||||
return mapper.getUserList(shopId);
|
mapper.insertBatch(collect, 50);
|
||||||
|
Long mainShopId = shopInfoService.getMainIdByShopId(shopId);
|
||||||
|
return mapper.getUserList(shopId, mainShopId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +1,19 @@
|
|||||||
package com.czg.service.account.service.impl;
|
package com.czg.service.account.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
|
||||||
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import com.czg.account.dto.PageDTO;
|
import com.czg.account.dto.PageDTO;
|
||||||
import com.czg.account.dto.register.MerchantRegisterDTO;
|
import com.czg.account.dto.register.MerchantRegisterDTO;
|
||||||
import com.czg.account.entity.MerchantRegister;
|
import com.czg.account.entity.MerchantRegister;
|
||||||
import com.czg.account.service.MerchantRegisterService;
|
import com.czg.account.service.MerchantRegisterService;
|
||||||
import com.czg.account.vo.MerchantRegisterVO;
|
|
||||||
import com.czg.service.account.mapper.MerchantRegisterMapper;
|
import com.czg.service.account.mapper.MerchantRegisterMapper;
|
||||||
import com.czg.utils.PageUtil;
|
import com.czg.utils.PageUtil;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import com.mybatisflex.core.paginate.Page;
|
import com.mybatisflex.core.paginate.Page;
|
||||||
import com.mybatisflex.core.query.QueryWrapper;
|
|
||||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 激活码 服务层实现。
|
* 激活码 服务层实现。
|
||||||
@@ -27,7 +22,7 @@ import java.util.List;
|
|||||||
* @since 2025-02-11
|
* @since 2025-02-11
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class MerchantRegisterServiceImpl extends ServiceImpl<MerchantRegisterMapper, MerchantRegister> implements MerchantRegisterService {
|
public class MerchantRegisterServiceImpl extends ServiceImpl<MerchantRegisterMapper, MerchantRegister> implements MerchantRegisterService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<MerchantRegister> get(PageDTO pageDTO, Integer state, String startTime, String endTime) {
|
public Page<MerchantRegister> get(PageDTO pageDTO, Integer state, String startTime, String endTime) {
|
||||||
@@ -46,6 +41,7 @@ public class MerchantRegisterServiceImpl extends ServiceImpl<MerchantRegisterMap
|
|||||||
tbMerchantRegister.setPeriodMonth(merchantRegisterDTO.periodMonth());
|
tbMerchantRegister.setPeriodMonth(merchantRegisterDTO.periodMonth());
|
||||||
registers.add(tbMerchantRegister);
|
registers.add(tbMerchantRegister);
|
||||||
}
|
}
|
||||||
return saveBatch(registers);
|
int i = mapper.insertBatchSelective(registers, 50);
|
||||||
|
return i > 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ public class ShopExtendServiceImpl extends ServiceImpl<ShopExtendMapper, ShopExt
|
|||||||
newRecord.initAutoKey(key, shopId);
|
newRecord.initAutoKey(key, shopId);
|
||||||
newRecords.add(newRecord);
|
newRecords.add(newRecord);
|
||||||
}
|
}
|
||||||
saveBatch(newRecords);
|
mapper.insertBatchSelective(newRecords,50);
|
||||||
return newRecords;
|
return newRecords;
|
||||||
} else {
|
} else {
|
||||||
for (ShopExtend shopExtend : shopExtendList) {
|
for (ShopExtend shopExtend : shopExtendList) {
|
||||||
@@ -97,7 +97,7 @@ public class ShopExtendServiceImpl extends ServiceImpl<ShopExtendMapper, ShopExt
|
|||||||
newRecords.add(newRecord);
|
newRecords.add(newRecord);
|
||||||
}
|
}
|
||||||
|
|
||||||
saveBatch(newRecords);
|
mapper.insertBatchSelective(newRecords,50);
|
||||||
|
|
||||||
shopExtendList.addAll(newRecords);
|
shopExtendList.addAll(newRecords);
|
||||||
return shopExtendList;
|
return shopExtendList;
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ public class ShopTableServiceImpl extends ServiceImpl<ShopTableMapper, ShopTable
|
|||||||
tableArrayList.add(shopTable);
|
tableArrayList.add(shopTable);
|
||||||
}
|
}
|
||||||
|
|
||||||
saveBatch(tableArrayList);
|
mapper.insertBatchSelective(tableArrayList, 50);
|
||||||
if (StrUtil.isNotBlank(msg.toString())) {
|
if (StrUtil.isNotBlank(msg.toString())) {
|
||||||
msg.append("台桌名已存在,未添加");
|
msg.append("台桌名已存在,未添加");
|
||||||
throw new CzgException(msg.toString());
|
throw new CzgException(msg.toString());
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ import static com.mybatisflex.core.query.QueryMethods.column;
|
|||||||
* @since 2025-02-08
|
* @since 2025-02-08
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> implements SysRoleService {
|
public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> implements SysRoleService {
|
||||||
@Resource
|
@Resource
|
||||||
private SysMenuService sysMenuService;
|
private SysMenuService sysMenuService;
|
||||||
@Resource
|
@Resource
|
||||||
@@ -87,7 +87,7 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> imp
|
|||||||
}
|
}
|
||||||
|
|
||||||
return apiInfoItemDTOS.stream()
|
return apiInfoItemDTOS.stream()
|
||||||
.map(pattern -> StrUtil.format("({} LIKE '{}' ESCAPE '\\\\' and method = '{}')" , columnName, toSqlLikePattern(pattern.getUrl()), pattern.getMethod()))
|
.map(pattern -> StrUtil.format("({} LIKE '{}' ESCAPE '\\\\' and method = '{}')", columnName, toSqlLikePattern(pattern.getUrl()), pattern.getMethod()))
|
||||||
.collect(Collectors.joining(" OR "));
|
.collect(Collectors.joining(" OR "));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> imp
|
|||||||
public Page<SysRole> getList(Long shopId, PageDTO pageDTO, String key, String startTime, String endTime) {
|
public Page<SysRole> getList(Long shopId, PageDTO pageDTO, String key, String startTime, String endTime) {
|
||||||
QueryWrapper queryWrapper = new QueryWrapper();
|
QueryWrapper queryWrapper = new QueryWrapper();
|
||||||
// if (!StpKit.USER.isAdmin()) {
|
// if (!StpKit.USER.isAdmin()) {
|
||||||
queryWrapper.eq(SysRole::getCreateUserId, StpKit.USER.getLoginIdAsLong());
|
queryWrapper.eq(SysRole::getCreateUserId, StpKit.USER.getLoginIdAsLong());
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if (StrUtil.isNotBlank(key)) {
|
if (StrUtil.isNotBlank(key)) {
|
||||||
@@ -180,11 +180,10 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> imp
|
|||||||
|
|
||||||
|
|
||||||
// Step 4: 批量保存(如有数据)
|
// Step 4: 批量保存(如有数据)
|
||||||
return rolesMenus.isEmpty() || sysRolesMenusService.saveBatch(rolesMenus);
|
return rolesMenus.isEmpty() || sysRolesMenusService.getMapper().insertBatchSelective(rolesMenus, 50) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean editPermission(long userId, RolePermissionDTO rolePermissionDTO) {
|
public Boolean editPermission(long userId, RolePermissionDTO rolePermissionDTO) {
|
||||||
|
|||||||
@@ -5,16 +5,16 @@
|
|||||||
<mapper namespace="com.czg.service.account.mapper.BkContactListMapper">
|
<mapper namespace="com.czg.service.account.mapper.BkContactListMapper">
|
||||||
|
|
||||||
<select id="getUserList" resultType="com.czg.account.entity.BkContactList">
|
<select id="getUserList" resultType="com.czg.account.entity.BkContactList">
|
||||||
SELECT
|
SELECT user.nick_name AS nickName,
|
||||||
`order`.call_phone AS phone,
|
`order`.call_phone AS phone,
|
||||||
count( 1 ) AS orderNum,
|
count(1) AS orderNum,
|
||||||
sum( CASE `order`.`status` WHEN '已取消' THEN 1 ELSE 0 END ) AS cannelNum,
|
sum(CASE `order`.`status` WHEN '已取消' THEN 1 ELSE 0 END) AS cancelNum,
|
||||||
MAX(`order`.create_time) AS lastBookingTime
|
MAX(`order`.create_time) AS lastBookingTime
|
||||||
FROM
|
FROM `bk_order` `order`
|
||||||
`bk_order` `order`
|
INNER JOIN bk_contact_list contact
|
||||||
INNER JOIN bk_contact_list contact ON `order`.call_phone = contact.phone AND contact.shop_id = #{shopId}
|
ON `order`.call_phone = contact.phone AND contact.shop_id = #{shopId}
|
||||||
WHERE
|
LEFT JOIN tb_shop_user user ON `contact`.phone = user.phone and user.main_shop_id = #{mainShopId}
|
||||||
`order`.shop_id = #{shopId}
|
WHERE `order`.shop_id = #{shopId}
|
||||||
GROUP BY `order`.call_phone
|
GROUP BY `order`.call_phone
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public class MkCouponGiftServiceImpl extends ServiceImpl<MkCouponGiftMapper, MkC
|
|||||||
public void addCouponGift(Long sourceId, String sourceName, Integer type, List<MkCouponGiftDTO> couponGiftList) {
|
public void addCouponGift(Long sourceId, String sourceName, Integer type, List<MkCouponGiftDTO> couponGiftList) {
|
||||||
remove(new QueryWrapper().eq(MkCouponGift::getSourceId, sourceId).eq(MkCouponGift::getType, type));
|
remove(new QueryWrapper().eq(MkCouponGift::getSourceId, sourceId).eq(MkCouponGift::getType, type));
|
||||||
if (CollUtil.isNotEmpty(couponGiftList)) {
|
if (CollUtil.isNotEmpty(couponGiftList)) {
|
||||||
List newCoupons = new ArrayList<>();
|
List<MkCouponGift> newCoupons = new ArrayList<>();
|
||||||
for (MkCouponGiftDTO giftDTO : couponGiftList) {
|
for (MkCouponGiftDTO giftDTO : couponGiftList) {
|
||||||
ShopCoupon coupon = couponMapper.selectOneByQuery(new QueryWrapper().eq(ShopCoupon::getId, giftDTO.getCouponId()));
|
ShopCoupon coupon = couponMapper.selectOneByQuery(new QueryWrapper().eq(ShopCoupon::getId, giftDTO.getCouponId()));
|
||||||
if (coupon == null) {
|
if (coupon == null) {
|
||||||
@@ -64,7 +64,7 @@ public class MkCouponGiftServiceImpl extends ServiceImpl<MkCouponGiftMapper, MkC
|
|||||||
couponGift.setNum(giftDTO.getNum());
|
couponGift.setNum(giftDTO.getNum());
|
||||||
newCoupons.add(couponGift);
|
newCoupons.add(couponGift);
|
||||||
}
|
}
|
||||||
saveBatch(newCoupons);
|
mapper.insertBatchSelective(newCoupons, 50);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -476,7 +476,7 @@ public class MkShopCouponRecordServiceImpl extends ServiceImpl<MkShopCouponRecor
|
|||||||
recordList.add(record);
|
recordList.add(record);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
saveBatch(recordList);
|
mapper.insertBatchSelective(recordList, 50);
|
||||||
QueryWrapper queryWrapper = new QueryWrapper();
|
QueryWrapper queryWrapper = new QueryWrapper();
|
||||||
ShopCoupon newCoupon = new ShopCoupon();
|
ShopCoupon newCoupon = new ShopCoupon();
|
||||||
newCoupon.setGiftNum(coupon.getGiftNum());
|
newCoupon.setGiftNum(coupon.getGiftNum());
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ public class ShopProdStatisticServiceImpl extends ServiceImpl<ShopProdStatisticM
|
|||||||
if (exists) {
|
if (exists) {
|
||||||
remove(QueryWrapper.create().eq(ShopProdStatistic::getShopId, shopId).eq(ShopProdStatistic::getCreateDay, day));
|
remove(QueryWrapper.create().eq(ShopProdStatistic::getShopId, shopId).eq(ShopProdStatistic::getCreateDay, day));
|
||||||
}
|
}
|
||||||
saveBatch(realTimeData);
|
mapper.insertBatchSelective(realTimeData, 50);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public class ShopTableOrderStatisticServiceImpl extends ServiceImpl<ShopTableOrd
|
|||||||
.toList();
|
.toList();
|
||||||
if (CollUtil.isNotEmpty(realTimeData)) {
|
if (CollUtil.isNotEmpty(realTimeData)) {
|
||||||
remove(QueryWrapper.create().eq(ShopTableOrderStatistic::getShopId, shopId).eq(ShopTableOrderStatistic::getCreateDay, day));
|
remove(QueryWrapper.create().eq(ShopTableOrderStatistic::getShopId, shopId).eq(ShopTableOrderStatistic::getCreateDay, day));
|
||||||
saveBatch(realTimeData);
|
mapper.insertBatchSelective(realTimeData, 50);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -108,6 +108,8 @@
|
|||||||
<result property="productId" column="productId"/>
|
<result property="productId" column="productId"/>
|
||||||
<result property="isTemporary" column="isTemporary"/>
|
<result property="isTemporary" column="isTemporary"/>
|
||||||
<result property="productName" column="productName"/>
|
<result property="productName" column="productName"/>
|
||||||
|
<result property="categoryId" column="categoryId"/>
|
||||||
|
<result property="categoryName" column="categoryName"/>
|
||||||
<collection property="foodItems" ofType="com.czg.order.vo.KitchenFoodVO$KitchenFoodItemVO">
|
<collection property="foodItems" ofType="com.czg.order.vo.KitchenFoodVO$KitchenFoodItemVO">
|
||||||
<constructor>
|
<constructor>
|
||||||
<arg column="orderId" javaType="java.lang.Long"/>
|
<arg column="orderId" javaType="java.lang.Long"/>
|
||||||
@@ -115,8 +117,6 @@
|
|||||||
<arg column="tableName" javaType="java.lang.String"/>
|
<arg column="tableName" javaType="java.lang.String"/>
|
||||||
<arg column="areaName" javaType="java.lang.String"/>
|
<arg column="areaName" javaType="java.lang.String"/>
|
||||||
<arg column="orderDetailId" javaType="java.lang.Long"/>
|
<arg column="orderDetailId" javaType="java.lang.Long"/>
|
||||||
<arg column="categoryId" javaType="java.lang.Long"/>
|
|
||||||
<arg column="categoryName" javaType="java.lang.String"/>
|
|
||||||
<arg column="num" javaType="java.lang.Long"/>
|
<arg column="num" javaType="java.lang.Long"/>
|
||||||
<arg column="subStatus" javaType="java.lang.String"/>
|
<arg column="subStatus" javaType="java.lang.String"/>
|
||||||
<arg column="orderTime" javaType="java.lang.String"/>
|
<arg column="orderTime" javaType="java.lang.String"/>
|
||||||
|
|||||||
@@ -121,7 +121,7 @@
|
|||||||
consInfo.setStockNumber(consStockFlow.getAfterNumber());
|
consInfo.setStockNumber(consStockFlow.getAfterNumber());
|
||||||
updateStockList.add(consInfo);
|
updateStockList.add(consInfo);
|
||||||
}
|
}
|
||||||
super.saveBatch(insertList);
|
mapper.insertBatchSelective(insertList, 50);
|
||||||
for (ConsInfo consInfo : updateStockList) {
|
for (ConsInfo consInfo : updateStockList) {
|
||||||
consInfoMapper.update(consInfo);
|
consInfoMapper.update(consInfo);
|
||||||
}
|
}
|
||||||
@@ -158,7 +158,7 @@
|
|||||||
consInfo.setStockNumber(entity.getAfterNumber());
|
consInfo.setStockNumber(entity.getAfterNumber());
|
||||||
updateStockList.add(consInfo);
|
updateStockList.add(consInfo);
|
||||||
}
|
}
|
||||||
super.saveBatch(insertList);
|
mapper.insertBatchSelective(insertList, 50);
|
||||||
for (ConsInfo consInfo : updateStockList) {
|
for (ConsInfo consInfo : updateStockList) {
|
||||||
consInfoMapper.update(consInfo);
|
consInfoMapper.update(consInfo);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public class ProdConsRelationServiceImpl extends ServiceImpl<ProdConsRelationMap
|
|||||||
|
|
||||||
private QueryWrapper buildQueryWrapper(ProdConsRelationDTO param) {
|
private QueryWrapper buildQueryWrapper(ProdConsRelationDTO param) {
|
||||||
QueryWrapper queryWrapper = PageUtil.buildSortQueryWrapper();
|
QueryWrapper queryWrapper = PageUtil.buildSortQueryWrapper();
|
||||||
Long shopId = StpKit.USER.getShopId(0L);
|
Long shopId = StpKit.USER.getShopId();
|
||||||
queryWrapper.eq(ProdConsRelation::getShopId, shopId);
|
queryWrapper.eq(ProdConsRelation::getShopId, shopId);
|
||||||
return queryWrapper;
|
return queryWrapper;
|
||||||
}
|
}
|
||||||
@@ -50,7 +50,7 @@ public class ProdConsRelationServiceImpl extends ServiceImpl<ProdConsRelationMap
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void saveProdConsRelation(ProdConsBindDTO dto) {
|
public void saveProdConsRelation(ProdConsBindDTO dto) {
|
||||||
Long shopId = StpKit.USER.getShopId(0L);
|
Long shopId = StpKit.USER.getShopId();
|
||||||
long count = productMapper.selectCountByQuery(query().eq(Product::getShopId, shopId).eq(Product::getId, dto.getId()));
|
long count = productMapper.selectCountByQuery(query().eq(Product::getShopId, shopId).eq(Product::getId, dto.getId()));
|
||||||
if (count == 0) {
|
if (count == 0) {
|
||||||
throw new CzgException("商品不存在");
|
throw new CzgException("商品不存在");
|
||||||
@@ -72,7 +72,7 @@ public class ProdConsRelationServiceImpl extends ServiceImpl<ProdConsRelationMap
|
|||||||
throw new CzgException("非法操作,绑定关系商品不一致");
|
throw new CzgException("非法操作,绑定关系商品不一致");
|
||||||
}
|
}
|
||||||
List<ProdConsRelation> entityList = BeanUtil.copyToList(consList, ProdConsRelation.class);
|
List<ProdConsRelation> entityList = BeanUtil.copyToList(consList, ProdConsRelation.class);
|
||||||
super.saveBatch(entityList);
|
mapper.insertBatchSelective(entityList, 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -733,7 +733,7 @@ public class ShopSyncServiceImpl implements ShopSyncService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (CollUtil.isNotEmpty(addList)) {
|
if (CollUtil.isNotEmpty(addList)) {
|
||||||
prodGroupRelationService.saveBatch(addList, 100);
|
prodGroupRelationService.getMapper().insertBatchSelective(addList, 100);
|
||||||
}
|
}
|
||||||
if (CollUtil.isNotEmpty(upList)) {
|
if (CollUtil.isNotEmpty(upList)) {
|
||||||
prodGroupRelationService.updateBatch(addList, 100);
|
prodGroupRelationService.updateBatch(addList, 100);
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ public class ShopVendorServiceImpl extends ServiceImpl<ShopVendorMapper, ShopVen
|
|||||||
throw new CzgException("批量付款应全部付款");
|
throw new CzgException("批量付款应全部付款");
|
||||||
}
|
}
|
||||||
|
|
||||||
consPayRecordService.saveBatch(records);
|
consPayRecordService.getMapper().insertBatchSelective(records, 50);
|
||||||
return consStockFlowService.updateBatch(stockFlows);
|
return consStockFlowService.updateBatch(stockFlows);
|
||||||
}else {
|
}else {
|
||||||
ConsStockFlow stockFlow = consStockFlowMapper.selectOneByQuery(new QueryWrapper().eq(ConsStockFlow::getShopId, shopId).eq(ConsStockFlow::getId, payDTO.getFlowIdList().getFirst()));
|
ConsStockFlow stockFlow = consStockFlowMapper.selectOneByQuery(new QueryWrapper().eq(ConsStockFlow::getShopId, shopId).eq(ConsStockFlow::getId, payDTO.getFlowIdList().getFirst()));
|
||||||
|
|||||||
Reference in New Issue
Block a user