| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.constant.Constants; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.exception.GlobalException; |
| | |
| | | wrapper.eq("isDelete", 0); |
| | | // sort排序 |
| | | wrapper.orderByAsc("CASE WHEN sort IS NULL THEN 1 ELSE 0 END") |
| | | .orderByAsc("sort") |
| | | .orderByDesc("sort") |
| | | .orderByDesc("createTime"); |
| | | return R.ok(goodsService.page(new PageInfo<>(goodQuery.getPageNumber(), goodQuery.getPageSize()), wrapper)); |
| | | } |
| | |
| | | if (!Constants.ONE.equals(order.getState())) { |
| | | throw new GlobalException("订单已发货,无法修改收货地址!"); |
| | | } |
| | | order.setConsigneeName(recipient.getAddress()); |
| | | order.setConsigneeName(recipient.getRecipient()); |
| | | order.setConsigneePhone(recipient.getRecipientPhone()); |
| | | order.setConsigneeAddress(recipient.getProvince()+recipient.getCity()+recipient.getAddress()); |
| | | orderService.updateById(order); |
| | |
| | | if (!Constants.ONE.equals(order.getState())) { |
| | | throw new GlobalException("订单已发货,无法修改收货地址!"); |
| | | } |
| | | order.setConsigneeName(recipient.getAddress()); |
| | | order.setConsigneeName(recipient.getRecipient()); |
| | | order.setConsigneePhone(recipient.getRecipientPhone()); |
| | | order.setConsigneeAddress(recipient.getProvince()+recipient.getCity()+recipient.getAddress()); |
| | | orderService.updateById(order); |