Merge branch 'feature/mall_product' into test

feature/mall_product
tangqian 2023-06-09 19:08:22 +08:00
commit e95e90e6ad
3 changed files with 19 additions and 19 deletions

View File

@ -65,14 +65,16 @@ public class RechargeOrderController {
@PutMapping("/update")
@Operation(summary = "更新订单")
@TenantIgnore
@PreAuthorize("@ss.hasPermission('shop:recharge-order:update')")
public CommonResult<Boolean> updateRechargeOrder(@Valid @RequestBody RechargeOrderUpdateReqVO updateReqVO) {
rechargeOrderService.updateRechargeOrder(updateReqVO);
return success(true);
}
@PutMapping("/updateByIds")
@PostMapping("/updateByIds")
@Operation(summary = "批量更新订单状态")
@TenantIgnore
public CommonResult<Boolean> updateByIds(@Valid @RequestBody BatchOrderUpdateReqVO updateReqVO) {
rechargeOrderService.updateByIds(updateReqVO);
return success(true);

View File

@ -2,19 +2,23 @@ package cn.iocoder.yudao.module.shop.service.recharge;
import cn.hutool.core.date.LocalDateTimeUtil;
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.util.SecurityFrameworkUtils;
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.dto.AppUserInfoReqDTO;
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.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.mysql.order.StoreOrderMapper;
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.RefundRequest;
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.dto.TenantDTO;
@ -23,32 +27,23 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import org.springframework.util.Assert;
import org.springframework.util.CollectionUtils;
import org.springframework.validation.annotation.Validated;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.time.DayOfWeek;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
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 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.module.shop.enums.ErrorCodeConstants.*;
import static java.util.stream.Collectors.toMap;
import static cn.iocoder.yudao.module.shop.enums.ErrorCodeConstants.RECHARGE_ORDER_NOT_EXISTS;
/**
* Service
@ -145,8 +140,9 @@ public class RechargeOrderServiceImpl implements RechargeOrderService {
orderDOS.forEach(e -> {
e.setStatus(updateReqVO.getStatus());
});
rechargeOrderMapper.updateBatch(orderDOS, orderDOS.size());
}
return null;
return Boolean.TRUE;
}
@Override

View File

@ -264,7 +264,9 @@
<if test="data.promoterId !=null ">
and a.promoter_id =#{data.promoterId}
</if>
<if test="data.status !=null ">
and a.status =#{data.status}
</if>
</where>
</sql>
</mapper>