Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package com.czg.service.account.mapper;
|
||||
|
||||
import com.mybatisflex.core.BaseMapper;
|
||||
import com.czg.account.entity.ShopActivateInRecord;
|
||||
|
||||
/**
|
||||
* 活动商品赠送记录表 映射层。
|
||||
*
|
||||
* @author ww
|
||||
* @since 2025-02-17
|
||||
*/
|
||||
public interface ShopActivateInRecordMapper extends BaseMapper<ShopActivateInRecord> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.czg.service.account.mapper;
|
||||
|
||||
import com.mybatisflex.core.BaseMapper;
|
||||
import com.czg.account.entity.ShopActivate;
|
||||
|
||||
/**
|
||||
* 活动 映射层。
|
||||
*
|
||||
* @author ww
|
||||
* @since 2025-02-17
|
||||
*/
|
||||
public interface ShopActivateMapper extends BaseMapper<ShopActivate> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.czg.service.account.mapper;
|
||||
|
||||
import com.mybatisflex.core.BaseMapper;
|
||||
import com.czg.account.entity.ShopActivateOutRecord;
|
||||
|
||||
/**
|
||||
* 活动赠送商品使用记录表 映射层。
|
||||
*
|
||||
* @author ww
|
||||
* @since 2025-02-17
|
||||
*/
|
||||
public interface ShopActivateOutRecordMapper extends BaseMapper<ShopActivateOutRecord> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.czg.service.account.mapper;
|
||||
|
||||
import com.mybatisflex.core.BaseMapper;
|
||||
import com.czg.account.entity.ShopCoupon;
|
||||
|
||||
/**
|
||||
* 优惠券 映射层。
|
||||
*
|
||||
* @author ww
|
||||
* @since 2025-02-17
|
||||
*/
|
||||
public interface ShopCouponMapper extends BaseMapper<ShopCoupon> {
|
||||
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package com.czg.service.account.mapper;
|
||||
|
||||
import com.czg.account.dto.shopuser.ShopUserSummaryDTO;
|
||||
import com.czg.account.dto.shopuser.ShopUserVipCardDTO;
|
||||
import com.czg.account.dto.user.userinfo.UserInfoAssetsSummaryDTO;
|
||||
import com.czg.account.entity.ShopUser;
|
||||
import com.mybatisflex.core.BaseMapper;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
@@ -27,4 +28,7 @@ public interface ShopUserMapper extends BaseMapper<ShopUser> {
|
||||
ShopUserSummaryDTO selectUserSummary(@Param("shopId") Long shopId, @Param("isVip") Integer isVip);
|
||||
|
||||
Page<ShopUserVipCardDTO> selectVipCard(@Param("page") Page<Object> objectPage, @Param("userInfoId") long userInfoId);
|
||||
|
||||
UserInfoAssetsSummaryDTO selectAssetsSummary(@Param("userId") Long userInfoId);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.czg.service.account.service.impl;
|
||||
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import com.czg.account.entity.ShopActivateInRecord;
|
||||
import com.czg.account.service.ShopActivateInRecordService;
|
||||
import com.czg.service.account.mapper.ShopActivateInRecordMapper;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
|
||||
|
||||
/**
|
||||
* 活动商品赠送记录表 服务层实现。
|
||||
*
|
||||
* @author ww
|
||||
* @since 2025-02-17
|
||||
*/
|
||||
@DubboService
|
||||
public class ShopActivateInRecordServiceImpl extends ServiceImpl<ShopActivateInRecordMapper, ShopActivateInRecord> implements ShopActivateInRecordService{
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.czg.service.account.service.impl;
|
||||
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import com.czg.account.entity.ShopActivateOutRecord;
|
||||
import com.czg.account.service.ShopActivateOutRecordService;
|
||||
import com.czg.service.account.mapper.ShopActivateOutRecordMapper;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 活动赠送商品使用记录表 服务层实现。
|
||||
*
|
||||
* @author ww
|
||||
* @since 2025-02-17
|
||||
*/
|
||||
@DubboService
|
||||
public class ShopActivateOutRecordServiceImpl extends ServiceImpl<ShopActivateOutRecordMapper, ShopActivateOutRecord> implements ShopActivateOutRecordService{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.czg.service.account.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.czg.account.dto.ShopActivateDTO;
|
||||
import com.czg.account.entity.ShopActivate;
|
||||
import com.czg.account.service.ShopActivateService;
|
||||
import com.czg.sa.StpKit;
|
||||
import com.czg.service.account.mapper.ShopActivateMapper;
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 活动 服务层实现。
|
||||
*
|
||||
* @author ww
|
||||
* @since 2025-02-17
|
||||
*/
|
||||
@DubboService
|
||||
public class ShopActivateServiceImpl extends ServiceImpl<ShopActivateMapper, ShopActivate> implements ShopActivateService {
|
||||
|
||||
@Override
|
||||
public List<ShopActivateDTO> getList() {
|
||||
return queryChain().select().eq(ShopActivate::getShopId, StpKit.USER.getShopId())
|
||||
.orderBy(ShopActivate::getAmount, true).listAs(ShopActivateDTO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean add(ShopActivateDTO activateDTO) {
|
||||
ShopActivate shopActivate = new ShopActivate();
|
||||
BeanUtil.copyProperties(activateDTO, shopActivate);
|
||||
return save(shopActivate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean edit(ShopActivateDTO activateDTO) {
|
||||
ShopActivate shopActivate = new ShopActivate();
|
||||
BeanUtil.copyProperties(activateDTO, shopActivate);
|
||||
return updateById(shopActivate);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
package com.czg.service.account.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.czg.account.dto.ShopCouponDTO;
|
||||
import com.czg.account.entity.ShopActivateInRecord;
|
||||
import com.czg.account.entity.ShopActivateOutRecord;
|
||||
import com.czg.account.service.ShopActivateInRecordService;
|
||||
import com.czg.account.service.ShopActivateOutRecordService;
|
||||
import com.mybatisflex.core.query.QueryWrapper;
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import com.czg.account.entity.ShopCoupon;
|
||||
import com.czg.account.service.ShopCouponService;
|
||||
import com.czg.service.account.mapper.ShopCouponMapper;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 优惠券 服务层实现。
|
||||
*
|
||||
* @author ww
|
||||
* @since 2025-02-17
|
||||
*/
|
||||
@Service
|
||||
public class ShopCouponServiceImpl extends ServiceImpl<ShopCouponMapper, ShopCoupon> implements ShopCouponService {
|
||||
|
||||
@Resource
|
||||
private ShopActivateInRecordService inService;
|
||||
@Resource
|
||||
private ShopActivateOutRecordService outService;
|
||||
|
||||
@Override
|
||||
public List<ShopCoupon> getList(Long shopId, Integer status) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper();
|
||||
if (shopId != null) {
|
||||
if (status == 1) {
|
||||
queryWrapper.eq(ShopActivateOutRecord::getShopId, shopId);
|
||||
}else {
|
||||
queryWrapper.eq(ShopActivateInRecord::getShopId, shopId);
|
||||
}
|
||||
}
|
||||
return switch (status) {
|
||||
case -1 -> {
|
||||
queryWrapper.ge(ShopActivateInRecord::getUseEndTime, DateUtil.date());
|
||||
yield list(queryWrapper);
|
||||
}
|
||||
case 0 -> {
|
||||
// yield outService.list(queryWrapper);
|
||||
yield null;
|
||||
|
||||
}
|
||||
case 1 -> {
|
||||
yield null;
|
||||
|
||||
}
|
||||
default -> throw new IllegalStateException("Unexpected value: " + status);
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public ShopCouponDTO getCouponById(ShopCouponDTO couponDTO) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean add(ShopCouponDTO couponDTO) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean edit(ShopCouponDTO couponDTO) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean delete(Long id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean find(Long id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean use(Integer shopId, Integer orderId, Integer vipUserId, List<ShopActivateOutRecord> param) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 退还券
|
||||
*
|
||||
* @param param giveId和 refNum 必传
|
||||
*/
|
||||
@Override
|
||||
public Boolean refund(List<ShopActivateOutRecord> param) {
|
||||
// for (ShopActivateOutRecord outRecord : param) {
|
||||
// outService.updateChain()
|
||||
// .set(ShopActivateOutRecord::getRefNum, outRecord.getRefNum())
|
||||
// .eq(ShopActivateOutRecord::getId, outRecord.getId())
|
||||
// .update();
|
||||
// ShopActivateInRecord inRecord = inService.getById(outRecord.getGiveId());
|
||||
// inRecord.setOverNum(inRecord.getOverNum() + outRecord.getRefNum());
|
||||
// inService.updateOverNum(inRecord.getId(), inRecord.getOverNum());
|
||||
// }
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,7 @@ import com.czg.exception.ApiNotPrintException;
|
||||
import com.czg.sa.StpKit;
|
||||
import com.czg.service.RedisService;
|
||||
import com.czg.service.account.mapper.ShopUserMapper;
|
||||
import com.czg.utils.AssertUtil;
|
||||
import com.czg.utils.PageUtil;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
@@ -131,13 +132,9 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
|
||||
@Override
|
||||
public String getCode(long userInfoId, long shopId) {
|
||||
ShopUser shopUser = queryChain().eq(ShopUser::getShopId, shopId).eq(ShopUser::getUserId, userInfoId).one();
|
||||
if (shopUser == null) {
|
||||
throw new ApiNotPrintException("会员信息不存在");
|
||||
}
|
||||
AssertUtil.isNull(shopUser, "会员信息不存在");
|
||||
String dynamicCode = generatePaymentCode(String.valueOf(shopId), String.valueOf(userInfoId));
|
||||
redisService.set(RedisCst.SHOP_USER_DYNAMIC_CODE + shopUser.getId(), dynamicCode, 300);
|
||||
shopUser.setDynamicCode(dynamicCode);
|
||||
updateById(shopUser);
|
||||
redisService.set(RedisCst.SHOP_USER_DYNAMIC_CODE + shopUser.getId() + ":" + dynamicCode, 1, 180);
|
||||
return dynamicCode;
|
||||
}
|
||||
|
||||
|
||||
@@ -66,6 +66,7 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
|
||||
|
||||
@Override
|
||||
public Boolean add(MenuAddDTO menuAddDTO) {
|
||||
checkExIsis(menuAddDTO.getTitle(), null);
|
||||
if (menuAddDTO.getType() == 2 && menuAddDTO.getPid() == null) {
|
||||
throw new ApiNotPrintException("二级菜单必须传递父id");
|
||||
}
|
||||
@@ -82,6 +83,7 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
|
||||
|
||||
@Override
|
||||
public Boolean edit(MenuEditDTO menuEditDTO) {
|
||||
checkExIsis(menuEditDTO.getTitle(), menuEditDTO.getId());
|
||||
SysMenu menu = getById(menuEditDTO.getId());
|
||||
if (menu == null) {
|
||||
throw new ApiNotPrintException("菜单不存在");
|
||||
@@ -90,6 +92,19 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenu> impl
|
||||
return updateById(menu);
|
||||
}
|
||||
|
||||
|
||||
private void checkExIsis(String title, Integer id) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper();
|
||||
if (id != null) {
|
||||
queryWrapper.ne(SysMenu::getMenuId, id);
|
||||
}
|
||||
queryWrapper.eq(SysMenu::getTitle, title);
|
||||
long count = count(queryWrapper);
|
||||
if (count > 0) {
|
||||
throw new ApiNotPrintException("名称已存在");
|
||||
}
|
||||
}
|
||||
|
||||
private List<MenuVO> buildMenuTree(List<SysMenu> allMenus) {
|
||||
List<MenuVO> menuVos = allMenus.stream()
|
||||
.map(menu -> BeanUtil.copyProperties(menu, MenuVO.class))
|
||||
|
||||
@@ -120,7 +120,7 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> imp
|
||||
throw new ApiNotPrintException("角色不存在");
|
||||
}
|
||||
|
||||
long roleCount = queryChain().eq(SysRole::getName, roleEditDTO.getName()).count();
|
||||
long roleCount = queryChain().eq(SysRole::getName, roleEditDTO.getName()).ne(SysRole::getId, roleEditDTO.getId()).count();
|
||||
if (roleCount > 0) {
|
||||
throw new ApiNotPrintException("此角色名称已存在");
|
||||
}
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
package com.czg.service.account.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.czg.account.dto.user.userinfo.UserInfoAssetsSummaryDTO;
|
||||
import com.czg.account.dto.user.userinfo.UserInfoDTO;
|
||||
import com.czg.account.entity.UserInfo;
|
||||
import com.czg.account.service.ShopUserService;
|
||||
import com.czg.exception.ApiNotPrintException;
|
||||
import com.czg.service.account.mapper.ShopUserMapper;
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import com.czg.service.account.mapper.UserInfoMapper;
|
||||
import com.czg.account.service.UserInfoService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
@@ -14,5 +21,19 @@ import org.springframework.stereotype.Service;
|
||||
*/
|
||||
@Service
|
||||
public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo> implements UserInfoService{
|
||||
@Resource
|
||||
private ShopUserMapper shopUserMapper;
|
||||
|
||||
@Override
|
||||
public UserInfoDTO getInfo(long userInfoId) {
|
||||
UserInfo userInfo = queryChain().eq(UserInfo::getId, userInfoId).one();
|
||||
if (userInfo == null) {
|
||||
throw new ApiNotPrintException("用户信息不存在");
|
||||
}
|
||||
|
||||
UserInfoAssetsSummaryDTO assetsSummaryDTO = shopUserMapper.selectAssetsSummary(userInfoId);
|
||||
UserInfoDTO userInfoDTO = BeanUtil.copyProperties(userInfo, UserInfoDTO.class);
|
||||
userInfoDTO.setAssetsSummary(assetsSummaryDTO);
|
||||
return userInfoDTO;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.czg.service.account.mapper.ShopActivateInRecordMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.czg.service.account.mapper.ShopActivateMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.czg.service.account.mapper.ShopActivateOutRecordMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.czg.service.account.mapper.ShopCouponMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -31,15 +31,26 @@
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectUserSummary" resultType="com.czg.account.dto.shopuser.ShopUserSummaryDTO">
|
||||
select count(a.id) userTotal, sum(IFNULL(a.amount, 0)) balanceTotal,sum(IFNULL(b.amount,0)) chargeTotal from tb_shop_user as a
|
||||
left join tb_shop_user_flow as b on a.id=b.user_id and b.type='+' and b.biz_code in ('cashIn', 'wechatIn', 'alipayIn')
|
||||
select count(a.id) userTotal, sum(IFNULL(a.amount, 0)) balanceTotal,sum(IFNULL(b.amount,0)) chargeTotal from
|
||||
tb_shop_user as a
|
||||
left join tb_shop_user_flow as b on a.id=b.user_id and b.type='+' and b.biz_code in ('cashIn', 'wechatIn',
|
||||
'alipayIn')
|
||||
where a.shop_id = #{shopId}
|
||||
<if test="isVip !=null">
|
||||
and a.is_vip=#{isVip}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectVipCard" resultType="com.czg.account.dto.shopuser.ShopUserVipCardDTO">
|
||||
select b.logo, b.shop_name shopName, a.amount, a.shop_id shopId from tb_shop_user as a left join tb_shop_info as b on a.shop_id=b.id
|
||||
where a.user_id=#{userInfoId}
|
||||
select b.logo, b.shop_name shopName, a.amount, a.shop_id shopId
|
||||
from tb_shop_user as a
|
||||
left join tb_shop_info as b on a.shop_id = b.id
|
||||
where a.user_id = #{userInfoId}
|
||||
</select>
|
||||
<select id="selectAssetsSummary" resultType="com.czg.account.dto.user.userinfo.UserInfoAssetsSummaryDTO">
|
||||
select sum(IFNULL(b.amount, 0)) amount, sum(IFNULL(b.account_points, 0)) points, sum(IFNULL(c.over_num, 0)) couponNum
|
||||
from tb_user_info as a
|
||||
left join tb_shop_user as b on a.id = b.user_id
|
||||
left join tb_shop_activate_in_record as c on c.shop_id = b.shop_id
|
||||
where a.id=#{userId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.czg.service.order.dto;
|
||||
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 创建订单
|
||||
* @author ww
|
||||
*/
|
||||
@Data
|
||||
public class CreateOrderDTO {
|
||||
@NotBlank(message = "桌号不能为空")
|
||||
private String tableCode;
|
||||
@NotBlank(message = "用餐模式 堂食 dine-in 外带 take-out 外卖 take-away")
|
||||
private String dineMode;
|
||||
/**
|
||||
* 平台类型
|
||||
* 微信小程序 WX
|
||||
* 支付宝小程序 ALI
|
||||
* 收银机客户端 PC
|
||||
* PC管理端 APC
|
||||
* APP管理端 APP
|
||||
*/
|
||||
@NotBlank(message = "平台类型不能为空")
|
||||
private String platformType;
|
||||
|
||||
/**
|
||||
* 是否使用了霸王餐
|
||||
*/
|
||||
private boolean isFreeDine = false;
|
||||
|
||||
private String remark;
|
||||
|
||||
// 使用的积分抵扣数量
|
||||
private Integer pointsNum;
|
||||
|
||||
// 使用的优惠券
|
||||
@Valid
|
||||
private List<UserCouponInfoDTO> userCouponInfos = new ArrayList<>();
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.czg.service.order.dto;
|
||||
|
||||
import jakarta.validation.constraints.Min;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@Data
|
||||
public class UserCouponInfoDTO {
|
||||
private Long userCouponId;
|
||||
@Min(1)
|
||||
private Integer num;
|
||||
}
|
||||
@@ -57,10 +57,12 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
|
||||
|
||||
queryWrapper.eq(OrderInfo::getShopId, param.getShopId())
|
||||
.eq(OrderInfo::getStatus, param.getStatus())
|
||||
.eq(OrderInfo::getOrderNo, param.getOrderNo())
|
||||
.eq(OrderInfo::getPayType, param.getPayType())
|
||||
.eq(OrderInfo::getTableCode, param.getTableCode())
|
||||
.eq(OrderInfo::getUserId, param.getUserId())
|
||||
.eq(OrderInfo::getTableCode, param.getTableCode())
|
||||
.eq(OrderInfo::getOrderNo, param.getOrderNo())
|
||||
.gt(OrderInfo::getCreateTime, param.getStartTime())
|
||||
.le(OrderInfo::getCreateTime, param.getEndTime())
|
||||
.in(OrderInfo::getId, like);
|
||||
Page<OrderInfoVo> orderInfoVoPage = pageAs(PageUtil.buildPage(), queryWrapper, OrderInfoVo.class);
|
||||
orderInfoVoPage.getRecords().parallelStream().forEach(s -> {
|
||||
@@ -83,8 +85,8 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
|
||||
.where(OrderPayment::getId).eq(payment.getId())
|
||||
.update();
|
||||
|
||||
if ("TRADE_SUCCESS" .equals(czgCallBackDto.getState())) {
|
||||
if ("order" .equals(payment.getPayType())) {
|
||||
if ("TRADE_SUCCESS".equals(czgCallBackDto.getState())) {
|
||||
if ("order".equals(payment.getPayType())) {
|
||||
updateChain().of(OrderInfo.class)
|
||||
.set(OrderInfo::getPayAmount, new BigDecimal(czgCallBackDto.getAmount() / 100L))
|
||||
.set(OrderInfo::getStatus, OrderStatusEnums.DONE.getCode())
|
||||
|
||||
Reference in New Issue
Block a user