fix: 修改
parent
24467a92a6
commit
5eec2d9820
|
@ -65,14 +65,16 @@ public class RechargeOrderController {
|
||||||
|
|
||||||
@PutMapping("/update")
|
@PutMapping("/update")
|
||||||
@Operation(summary = "更新订单")
|
@Operation(summary = "更新订单")
|
||||||
|
@TenantIgnore
|
||||||
@PreAuthorize("@ss.hasPermission('shop:recharge-order:update')")
|
@PreAuthorize("@ss.hasPermission('shop:recharge-order:update')")
|
||||||
public CommonResult<Boolean> updateRechargeOrder(@Valid @RequestBody RechargeOrderUpdateReqVO updateReqVO) {
|
public CommonResult<Boolean> updateRechargeOrder(@Valid @RequestBody RechargeOrderUpdateReqVO updateReqVO) {
|
||||||
rechargeOrderService.updateRechargeOrder(updateReqVO);
|
rechargeOrderService.updateRechargeOrder(updateReqVO);
|
||||||
return success(true);
|
return success(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping("/updateByIds")
|
@PostMapping("/updateByIds")
|
||||||
@Operation(summary = "批量更新订单状态")
|
@Operation(summary = "批量更新订单状态")
|
||||||
|
@TenantIgnore
|
||||||
public CommonResult<Boolean> updateByIds(@Valid @RequestBody BatchOrderUpdateReqVO updateReqVO) {
|
public CommonResult<Boolean> updateByIds(@Valid @RequestBody BatchOrderUpdateReqVO updateReqVO) {
|
||||||
rechargeOrderService.updateByIds(updateReqVO);
|
rechargeOrderService.updateByIds(updateReqVO);
|
||||||
return success(true);
|
return success(true);
|
||||||
|
|
|
@ -2,19 +2,23 @@ package cn.iocoder.yudao.module.shop.service.recharge;
|
||||||
|
|
||||||
import cn.hutool.core.date.LocalDateTimeUtil;
|
import cn.hutool.core.date.LocalDateTimeUtil;
|
||||||
import cn.hutool.core.util.NumberUtil;
|
import cn.hutool.core.util.NumberUtil;
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
||||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||||
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
|
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
|
||||||
import cn.iocoder.yudao.module.member.api.user.MemberUserApi;
|
import cn.iocoder.yudao.module.member.api.user.MemberUserApi;
|
||||||
import cn.iocoder.yudao.module.member.api.user.dto.AppUserInfoReqDTO;
|
import cn.iocoder.yudao.module.member.api.user.dto.AppUserInfoReqDTO;
|
||||||
import cn.iocoder.yudao.module.member.api.user.dto.MemberUserRespDTO;
|
import cn.iocoder.yudao.module.member.api.user.dto.MemberUserRespDTO;
|
||||||
|
import cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.*;
|
||||||
import cn.iocoder.yudao.module.shop.controller.app.member.vo.PromoterMemberOrderVO;
|
import cn.iocoder.yudao.module.shop.controller.app.member.vo.PromoterMemberOrderVO;
|
||||||
import cn.iocoder.yudao.module.shop.controller.app.member.vo.ShoppingMemberOrderVO;
|
import cn.iocoder.yudao.module.shop.controller.app.member.vo.ShoppingMemberOrderVO;
|
||||||
|
import cn.iocoder.yudao.module.shop.convert.recharge.RechargeOrderConvert;
|
||||||
|
import cn.iocoder.yudao.module.shop.dal.dataobject.recharge.RechargeOrderDO;
|
||||||
import cn.iocoder.yudao.module.shop.dal.dataobject.recharge.RechargeOrderInfoDO;
|
import cn.iocoder.yudao.module.shop.dal.dataobject.recharge.RechargeOrderInfoDO;
|
||||||
import cn.iocoder.yudao.module.shop.dal.mysql.order.StoreOrderMapper;
|
import cn.iocoder.yudao.module.shop.dal.mysql.order.StoreOrderMapper;
|
||||||
import cn.iocoder.yudao.module.shop.dal.mysql.recharge.RechargeOrderInfoMapper;
|
import cn.iocoder.yudao.module.shop.dal.mysql.recharge.RechargeOrderInfoMapper;
|
||||||
|
import cn.iocoder.yudao.module.shop.dal.mysql.recharge.RechargeOrderMapper;
|
||||||
import cn.iocoder.yudao.module.shop.request.member.MemberChangeTieRequest;
|
import cn.iocoder.yudao.module.shop.request.member.MemberChangeTieRequest;
|
||||||
import cn.iocoder.yudao.module.shop.request.member.RefundRequest;
|
|
||||||
import cn.iocoder.yudao.module.shop.response.member.MemberHeadResponse;
|
import cn.iocoder.yudao.module.shop.response.member.MemberHeadResponse;
|
||||||
import cn.iocoder.yudao.module.system.api.tenant.TenantApi;
|
import cn.iocoder.yudao.module.system.api.tenant.TenantApi;
|
||||||
import cn.iocoder.yudao.module.system.api.tenant.dto.TenantDTO;
|
import cn.iocoder.yudao.module.system.api.tenant.dto.TenantDTO;
|
||||||
|
@ -23,32 +27,23 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.time.DayOfWeek;
|
import java.time.DayOfWeek;
|
||||||
import java.time.LocalDate;
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.format.DateTimeFormatter;
|
|
||||||
import java.time.temporal.TemporalAdjusters;
|
import java.time.temporal.TemporalAdjusters;
|
||||||
import java.util.*;
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import cn.iocoder.yudao.module.shop.controller.admin.recharge.vo.*;
|
|
||||||
import cn.iocoder.yudao.module.shop.dal.dataobject.recharge.RechargeOrderDO;
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
||||||
|
|
||||||
import cn.iocoder.yudao.module.shop.convert.recharge.RechargeOrderConvert;
|
|
||||||
import cn.iocoder.yudao.module.shop.dal.mysql.recharge.RechargeOrderMapper;
|
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||||
import static cn.iocoder.yudao.module.shop.enums.ErrorCodeConstants.*;
|
import static cn.iocoder.yudao.module.shop.enums.ErrorCodeConstants.RECHARGE_ORDER_NOT_EXISTS;
|
||||||
import static java.util.stream.Collectors.toMap;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单 Service 实现类
|
* 订单 Service 实现类
|
||||||
|
@ -145,8 +140,9 @@ public class RechargeOrderServiceImpl implements RechargeOrderService {
|
||||||
orderDOS.forEach(e -> {
|
orderDOS.forEach(e -> {
|
||||||
e.setStatus(updateReqVO.getStatus());
|
e.setStatus(updateReqVO.getStatus());
|
||||||
});
|
});
|
||||||
|
rechargeOrderMapper.updateBatch(orderDOS, orderDOS.size());
|
||||||
}
|
}
|
||||||
return null;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -264,7 +264,9 @@
|
||||||
<if test="data.promoterId !=null ">
|
<if test="data.promoterId !=null ">
|
||||||
and a.promoter_id =#{data.promoterId}
|
and a.promoter_id =#{data.promoterId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="data.status !=null ">
|
||||||
|
and a.status =#{data.status}
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</sql>
|
</sql>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
Loading…
Reference in New Issue