创建回收订单与订单瑕疵关联表
This commit is contained in:
parent
6923032b67
commit
fa547223a4
@ -0,0 +1,94 @@
|
||||
package com.tmerclub.cloud.cuerecycle.controller.admin;
|
||||
|
||||
import com.tmerclub.cloud.common.database.vo.PageVO;
|
||||
import com.tmerclub.cloud.common.response.ServerResponseEntity;
|
||||
import com.tmerclub.cloud.cuerecycle.model.dto.CueOrderDTO;
|
||||
import com.tmerclub.cloud.cuerecycle.model.vo.CueOrderVO;
|
||||
import com.tmerclub.cloud.common.database.dto.PageDTO;
|
||||
import com.tmerclub.cloud.cuerecycle.service.CueOrderService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 回收订单
|
||||
*
|
||||
* @author : frank
|
||||
* @create : 2025-04-15
|
||||
*/
|
||||
@Tag(name = "后管-回收订单")
|
||||
@RestController("adminCueOrderController")
|
||||
@RequestMapping("/admin/cueOrder")
|
||||
public class CueOrderController {
|
||||
@Resource
|
||||
CueOrderService cueOrderService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param pageDTO 分页参数
|
||||
* @param cueOrderDTO 查询参数
|
||||
* @return 分页数据
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "查询回收订单分页列表", description = "查询回收订单分页列表")
|
||||
public ServerResponseEntity<PageVO<CueOrderVO>> page(@Valid PageDTO pageDTO, CueOrderDTO cueOrderDTO) {
|
||||
PageVO<CueOrderVO> cueOrderPage = cueOrderService.page(pageDTO, cueOrderDTO);
|
||||
return ServerResponseEntity.success(cueOrderPage);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 根据主键id获取回收订单
|
||||
*
|
||||
* @param id 主键id
|
||||
* @return CueOrderVO
|
||||
*/
|
||||
@GetMapping
|
||||
@Operation(summary = "根据id获取回收订单", description = "根据id获取回收订单")
|
||||
public ServerResponseEntity<CueOrderVO> getById(@RequestParam Long id) {
|
||||
CueOrderVO cueOrder = cueOrderService.getById(id);
|
||||
return ServerResponseEntity.success(cueOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增回收订单
|
||||
*
|
||||
* @param cueOrderDTO CueOrderDTO
|
||||
* @return ServerResponseEntity
|
||||
*/
|
||||
@PostMapping
|
||||
@Operation(summary = "新增回收订单", description = "新增回收订单")
|
||||
public ServerResponseEntity<Void> save(@Valid @RequestBody CueOrderDTO cueOrderDTO) {
|
||||
int insert = cueOrderService.save(cueOrderDTO);
|
||||
return insert > 0 ? ServerResponseEntity.success() : ServerResponseEntity.showFailMsg("保存失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改回收订单
|
||||
*
|
||||
* @param cueOrderDTO CueOrderDTO
|
||||
* @return ServerResponseEntity
|
||||
*/
|
||||
@PutMapping
|
||||
@Operation(summary = "修改回收订单", description = "修改回收订单")
|
||||
public ServerResponseEntity<Void> update(@Valid @RequestBody CueOrderDTO cueOrderDTO) {
|
||||
int update = cueOrderService.update(cueOrderDTO);
|
||||
return update > 0 ? ServerResponseEntity.success() : ServerResponseEntity.showFailMsg("修改失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除回收订单
|
||||
*
|
||||
* @param id 主键id
|
||||
* @return ServerResponseEntity
|
||||
*/
|
||||
@DeleteMapping
|
||||
@Operation(summary = "删除回收订单", description = "删除回收订单")
|
||||
public ServerResponseEntity<Void> delete(@RequestParam Long id) {
|
||||
int delete = cueOrderService.delete(id);
|
||||
return delete > 0 ? ServerResponseEntity.success() : ServerResponseEntity.showFailMsg("删除失败");
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package com.tmerclub.cloud.cuerecycle.controller.admin;
|
||||
|
||||
import com.tmerclub.cloud.common.database.dto.PageDTO;
|
||||
import com.tmerclub.cloud.common.database.vo.PageVO;
|
||||
import com.tmerclub.cloud.common.response.ServerResponseEntity;
|
||||
import com.tmerclub.cloud.cuerecycle.model.dto.CueOrderFlawDTO;
|
||||
import com.tmerclub.cloud.cuerecycle.model.vo.CueOrderFlawVO;
|
||||
import com.tmerclub.cloud.cuerecycle.service.CueOrderFlawService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 球杆商品瑕疵项
|
||||
*
|
||||
* @author : frank
|
||||
* @create : 2025-04-15
|
||||
*/
|
||||
@Tag(name = "后管-球杆商品瑕疵项")
|
||||
@RestController("adminCueOrderFlawController")
|
||||
@RequestMapping("/admin/cueOrderFlaw")
|
||||
public class CueOrderFlawController {
|
||||
@Resource
|
||||
CueOrderFlawService cueOrderFlawService;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param pageDTO 分页参数
|
||||
* @param cueOrderFlawDTO 查询参数
|
||||
* @return 分页数据
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "查询球杆商品瑕疵项分页列表", description = "查询球杆商品瑕疵项分页列表")
|
||||
public ServerResponseEntity<PageVO<CueOrderFlawVO>> page(@Valid PageDTO pageDTO, CueOrderFlawDTO cueOrderFlawDTO) {
|
||||
PageVO<CueOrderFlawVO> cueOrderFlawPage = cueOrderFlawService.page(pageDTO, cueOrderFlawDTO);
|
||||
return ServerResponseEntity.success(cueOrderFlawPage);
|
||||
}
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package com.tmerclub.cloud.cuerecycle.mapper;
|
||||
|
||||
import com.tmerclub.cloud.cuerecycle.model.CueOrderFlaw;
|
||||
import com.tmerclub.cloud.cuerecycle.model.dto.CueOrderFlawDTO;
|
||||
import com.tmerclub.cloud.cuerecycle.model.vo.CueOrderFlawVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 球杆商品瑕疵项Mapper接口
|
||||
*
|
||||
* @author : frank
|
||||
* @create : 2025-04-15
|
||||
*/
|
||||
public interface CueOrderFlawMapper {
|
||||
|
||||
/**
|
||||
* 查询球杆商品瑕疵项列表
|
||||
*
|
||||
* @param cueOrderFlawDTO 查询参数
|
||||
* @return 球杆商品瑕疵项列表数据
|
||||
*/
|
||||
List<CueOrderFlawVO> list(@Param("dto") CueOrderFlawDTO cueOrderFlawDTO);
|
||||
|
||||
/**
|
||||
* 新增球杆商品瑕疵项
|
||||
*
|
||||
* @param cueOrderFlaw 新增参数
|
||||
* @return 新增结果
|
||||
*/
|
||||
int save(CueOrderFlaw cueOrderFlaw);
|
||||
|
||||
/**
|
||||
* 根据订单ID删除球杆商品瑕疵项
|
||||
*
|
||||
* @param orderId 订单ID
|
||||
* @return 删除结果
|
||||
*/
|
||||
int deleteByOrderId(Long orderId);
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package com.tmerclub.cloud.cuerecycle.mapper;
|
||||
|
||||
import com.tmerclub.cloud.cuerecycle.model.dto.CueOrderDTO;
|
||||
import com.tmerclub.cloud.cuerecycle.model.vo.CueOrderVO;
|
||||
import com.tmerclub.cloud.cuerecycle.model.CueOrder;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 回收订单Mapper接口
|
||||
*
|
||||
* @author : frank
|
||||
* @create : 2025-04-15
|
||||
*/
|
||||
public interface CueOrderMapper{
|
||||
|
||||
/**
|
||||
* 查询回收订单列表
|
||||
*
|
||||
* @param cueOrderDTO 查询参数
|
||||
* @return 回收订单列表数据
|
||||
*/
|
||||
List<CueOrderVO> list(@Param("dto") CueOrderDTO cueOrderDTO);
|
||||
|
||||
/**
|
||||
* 获取回收订单详情
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 回收订单详情
|
||||
*/
|
||||
CueOrderVO getById(Long id);
|
||||
|
||||
/**
|
||||
* 新增回收订单
|
||||
*
|
||||
* @param cueOrder 新增参数
|
||||
* @return 新增结果
|
||||
*/
|
||||
int save(CueOrder cueOrder);
|
||||
|
||||
/**
|
||||
* 修改回收订单
|
||||
*
|
||||
* @param cueOrder 修改参数
|
||||
* @return 修改结果
|
||||
*/
|
||||
int update(CueOrder cueOrder);
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.tmerclub.cloud.cuerecycle.model;
|
||||
|
||||
import com.tmerclub.cloud.common.model.BaseModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 回收订单对象
|
||||
*
|
||||
* @author : frank
|
||||
* @create : 2025-04-15
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CueOrder extends BaseModel implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
private Long orderId;
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 用户姓名
|
||||
*/
|
||||
private String userName;
|
||||
/**
|
||||
* 用户联系方式
|
||||
*/
|
||||
private String userPhone;
|
||||
/**
|
||||
* 类型:1-回收,2-置换,3-寄售
|
||||
*/
|
||||
private Integer orderType;
|
||||
/**
|
||||
* 状态:0-待审核,1-审核通过,2-审核拒绝,3-待发货,4-待收货(已发货),5-已收货(评估中),6-评估失败(退回),7-评估成功,8-已完成,9-价格不满意(退回)
|
||||
*/
|
||||
private Integer orderStatus;
|
||||
/**
|
||||
* 瑕疵图片,逗号隔开
|
||||
*/
|
||||
private String flawImgUrl;
|
||||
/**
|
||||
* 付款凭证
|
||||
*/
|
||||
private String evidenceOfPayment;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String orderRemark;
|
||||
/**
|
||||
* 预计金额
|
||||
*/
|
||||
private Long estimatedAmount;
|
||||
/**
|
||||
* 评估金额
|
||||
*/
|
||||
private Long actualAmount;
|
||||
/**
|
||||
* 代金卷金额
|
||||
*/
|
||||
private Long voucherAmount;
|
||||
/**
|
||||
* 删除状态:0-未删除 1-已删除
|
||||
*/
|
||||
private Integer deleted;
|
||||
/**
|
||||
* 是否已支付,1.已支付0.未支付
|
||||
*/
|
||||
private Integer isPayed;
|
||||
/**
|
||||
* 支付方式:1-余额,2-代金卷
|
||||
*/
|
||||
private Integer payType;
|
||||
/**
|
||||
* 付款时间
|
||||
*/
|
||||
private Date payTime;
|
||||
/**
|
||||
* 发货时间
|
||||
*/
|
||||
private Date deliveryTime;
|
||||
/**
|
||||
* 完成时间
|
||||
*/
|
||||
private Date finallyTime;
|
||||
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package com.tmerclub.cloud.cuerecycle.model;
|
||||
|
||||
import com.tmerclub.cloud.common.model.BaseModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 球杆商品瑕疵项对象
|
||||
*
|
||||
* @author : frank
|
||||
* @create : 2025-04-15
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CueOrderFlaw extends BaseModel implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
private Long orderFlawId;
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
private Long orderId;
|
||||
/**
|
||||
* 瑕疵ID
|
||||
*/
|
||||
private Long flawId;
|
||||
/**
|
||||
* 瑕疵名称
|
||||
*/
|
||||
private String flawName;
|
||||
/**
|
||||
* 是否瑕疵
|
||||
*/
|
||||
private Integer isFlaw;
|
||||
/**
|
||||
* 影响价格
|
||||
*/
|
||||
private Long flawPrice;
|
||||
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package com.tmerclub.cloud.cuerecycle.model.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 回收订单对象
|
||||
*
|
||||
* @author : frank
|
||||
* @create : 2025-04-15
|
||||
*/
|
||||
@Data
|
||||
public class CueOrderDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
private Long orderId;
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 用户姓名
|
||||
*/
|
||||
private String userName;
|
||||
/**
|
||||
* 用户联系方式
|
||||
*/
|
||||
private String userPhone;
|
||||
/**
|
||||
* 类型:1-回收,2-置换,3-寄售
|
||||
*/
|
||||
private Integer orderType;
|
||||
/**
|
||||
* 状态:0-待审核,1-审核通过,2-审核拒绝,3-待发货,4-待收货(已发货),5-已收货(评估中),6-评估失败(退回),7-评估成功,8-已完成,9-价格不满意(退回)
|
||||
*/
|
||||
private Integer orderStatus;
|
||||
/**
|
||||
* 瑕疵图片,逗号隔开
|
||||
*/
|
||||
private String flawImgUrl;
|
||||
/**
|
||||
* 付款凭证
|
||||
*/
|
||||
private String evidenceOfPayment;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String orderRemark;
|
||||
/**
|
||||
* 预计金额
|
||||
*/
|
||||
private Long estimatedAmount;
|
||||
/**
|
||||
* 评估金额
|
||||
*/
|
||||
private Long actualAmount;
|
||||
/**
|
||||
* 代金卷金额
|
||||
*/
|
||||
private Long voucherAmount;
|
||||
/**
|
||||
* 删除状态:0-未删除 1-已删除
|
||||
*/
|
||||
private Integer deleted;
|
||||
/**
|
||||
* 是否已支付,1.已支付0.未支付
|
||||
*/
|
||||
private Integer isPayed;
|
||||
/**
|
||||
* 支付方式:1-余额,2-代金卷
|
||||
*/
|
||||
private Integer payType;
|
||||
/**
|
||||
* 付款时间
|
||||
*/
|
||||
private Date payTime;
|
||||
/**
|
||||
* 发货时间
|
||||
*/
|
||||
private Date deliveryTime;
|
||||
/**
|
||||
* 完成时间
|
||||
*/
|
||||
private Date finallyTime;
|
||||
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package com.tmerclub.cloud.cuerecycle.model.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 球杆商品瑕疵项对象
|
||||
*
|
||||
* @author : frank
|
||||
* @create : 2025-04-15
|
||||
*/
|
||||
@Data
|
||||
public class CueOrderFlawDTO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
private Long orderFlawId;
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
private Long orderId;
|
||||
/**
|
||||
* 瑕疵ID
|
||||
*/
|
||||
private Long flawId;
|
||||
/**
|
||||
* 瑕疵名称
|
||||
*/
|
||||
private String flawName;
|
||||
/**
|
||||
* 是否瑕疵
|
||||
*/
|
||||
private Integer isFlaw;
|
||||
/**
|
||||
* 影响价格
|
||||
*/
|
||||
private Long flawPrice;
|
||||
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package com.tmerclub.cloud.cuerecycle.model.vo;
|
||||
|
||||
import com.tmerclub.cloud.common.vo.BaseVO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 球杆商品瑕疵项视图对象
|
||||
*
|
||||
* @author : frank
|
||||
* @create : 2025-04-15
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CueOrderFlawVO extends BaseVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@Schema(description = "主键ID")
|
||||
private Long orderFlawId;
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
@Schema(description = "订单ID")
|
||||
private Long orderId;
|
||||
/**
|
||||
* 瑕疵ID
|
||||
*/
|
||||
@Schema(description = "瑕疵ID")
|
||||
private Long flawId;
|
||||
/**
|
||||
* 瑕疵名称
|
||||
*/
|
||||
@Schema(description = "瑕疵名称")
|
||||
private String flawName;
|
||||
/**
|
||||
* 是否瑕疵
|
||||
*/
|
||||
@Schema(description = "是否瑕疵")
|
||||
private Integer isFlaw;
|
||||
/**
|
||||
* 影响价格
|
||||
*/
|
||||
@Schema(description = "影响价格")
|
||||
private Long flawPrice;
|
||||
|
||||
}
|
@ -0,0 +1,109 @@
|
||||
package com.tmerclub.cloud.cuerecycle.model.vo;
|
||||
|
||||
import com.tmerclub.cloud.common.vo.BaseVO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 回收订单视图对象
|
||||
*
|
||||
* @author : frank
|
||||
* @create : 2025-04-15
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class CueOrderVO extends BaseVO implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@Schema(description = "主键ID")
|
||||
private Long orderId;
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@Schema(description = "用户ID")
|
||||
private Long userId;
|
||||
/**
|
||||
* 用户姓名
|
||||
*/
|
||||
@Schema(description = "用户姓名")
|
||||
private String userName;
|
||||
/**
|
||||
* 用户联系方式
|
||||
*/
|
||||
@Schema(description = "用户联系方式")
|
||||
private String userPhone;
|
||||
/**
|
||||
* 类型:1-回收,2-置换,3-寄售
|
||||
*/
|
||||
@Schema(description = "类型:1-回收,2-置换,3-寄售")
|
||||
private Integer orderType;
|
||||
/**
|
||||
* 状态:0-待审核,1-审核通过,2-审核拒绝,3-待发货,4-待收货(已发货),5-已收货(评估中),6-评估失败(退回),7-评估成功,8-已完成,9-价格不满意(退回)
|
||||
*/
|
||||
@Schema(description = "状态:0-待审核,1-审核通过,2-审核拒绝,3-待发货,4-待收货(已发货),5-已收货(评估中),6-评估失败(退回),7-评估成功,8-已完成,9-价格不满意(退回)")
|
||||
private Integer orderStatus;
|
||||
/**
|
||||
* 瑕疵图片,逗号隔开
|
||||
*/
|
||||
@Schema(description = "瑕疵图片,逗号隔开")
|
||||
private String flawImgUrl;
|
||||
/**
|
||||
* 付款凭证
|
||||
*/
|
||||
@Schema(description = "付款凭证")
|
||||
private String evidenceOfPayment;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Schema(description = "备注")
|
||||
private String orderRemark;
|
||||
/**
|
||||
* 预计金额
|
||||
*/
|
||||
@Schema(description = "预计金额")
|
||||
private Long estimatedAmount;
|
||||
/**
|
||||
* 评估金额
|
||||
*/
|
||||
@Schema(description = "评估金额")
|
||||
private Long actualAmount;
|
||||
/**
|
||||
* 代金卷金额
|
||||
*/
|
||||
@Schema(description = "代金卷金额")
|
||||
private Long voucherAmount;
|
||||
/**
|
||||
* 是否已支付,1.已支付0.未支付
|
||||
*/
|
||||
@Schema(description = "是否已支付,1.已支付0.未支付")
|
||||
private Integer isPayed;
|
||||
/**
|
||||
* 支付方式:1-余额,2-代金卷
|
||||
*/
|
||||
@Schema(description = "支付方式:1-余额,2-代金卷")
|
||||
private Integer payType;
|
||||
/**
|
||||
* 付款时间
|
||||
*/
|
||||
@Schema(description = "付款时间")
|
||||
private Date payTime;
|
||||
/**
|
||||
* 发货时间
|
||||
*/
|
||||
@Schema(description = "发货时间")
|
||||
private Date deliveryTime;
|
||||
/**
|
||||
* 完成时间
|
||||
*/
|
||||
@Schema(description = "完成时间")
|
||||
private Date finallyTime;
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package com.tmerclub.cloud.cuerecycle.service;
|
||||
|
||||
import com.tmerclub.cloud.common.database.dto.PageDTO;
|
||||
import com.tmerclub.cloud.common.database.vo.PageVO;
|
||||
import com.tmerclub.cloud.cuerecycle.model.dto.CueOrderFlawDTO;
|
||||
import com.tmerclub.cloud.cuerecycle.model.vo.CueOrderFlawVO;
|
||||
|
||||
/**
|
||||
* 球杆商品瑕疵项Service接口
|
||||
*
|
||||
* @author : frank
|
||||
* @create : 2025-04-15
|
||||
*/
|
||||
public interface CueOrderFlawService {
|
||||
|
||||
/**
|
||||
* 获取球杆商品瑕疵项分页列表
|
||||
*
|
||||
* @param pageDTO 分页参数
|
||||
* @param cueOrderFlawDTO 查询参数
|
||||
* @return 分页数据
|
||||
*/
|
||||
PageVO<CueOrderFlawVO> page(PageDTO pageDTO,CueOrderFlawDTO cueOrderFlawDTO);
|
||||
|
||||
/**
|
||||
* 新增球杆商品瑕疵项
|
||||
*
|
||||
* @param cueOrderFlawDTO 新增参数
|
||||
* @return 新增结果
|
||||
*/
|
||||
int save(CueOrderFlawDTO cueOrderFlawDTO);
|
||||
|
||||
/**
|
||||
* 根据订单ID删除球杆商品瑕疵项
|
||||
*
|
||||
* @param orderId 订单ID
|
||||
* @return 删除结果
|
||||
*/
|
||||
int deleteByOrderId(Long orderId);
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package com.tmerclub.cloud.cuerecycle.service;
|
||||
|
||||
import com.tmerclub.cloud.common.database.dto.PageDTO;
|
||||
import com.tmerclub.cloud.common.database.vo.PageVO;
|
||||
import com.tmerclub.cloud.cuerecycle.model.dto.CueOrderDTO;
|
||||
import com.tmerclub.cloud.cuerecycle.model.vo.CueOrderVO;
|
||||
|
||||
/**
|
||||
* 回收订单Service接口
|
||||
*
|
||||
* @author : frank
|
||||
* @create : 2025-04-15
|
||||
*/
|
||||
public interface CueOrderService {
|
||||
|
||||
/**
|
||||
* 获取回收订单分页列表
|
||||
*
|
||||
* @param pageDTO 分页参数
|
||||
* @param cueOrderDTO 查询参数
|
||||
* @return 分页数据
|
||||
*/
|
||||
PageVO<CueOrderVO> page(PageDTO pageDTO,CueOrderDTO cueOrderDTO);
|
||||
|
||||
/**
|
||||
* 获取回收订单详情
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 回收订单详情
|
||||
*/
|
||||
CueOrderVO getById(Long id);
|
||||
|
||||
/**
|
||||
* 新增回收订单
|
||||
*
|
||||
* @param cueOrderDTO 新增参数
|
||||
* @return 新增结果
|
||||
*/
|
||||
int save(CueOrderDTO cueOrderDTO);
|
||||
|
||||
/**
|
||||
* 修改回收订单
|
||||
*
|
||||
* @param cueOrderDTO 修改参数
|
||||
* @return 修改结果
|
||||
*/
|
||||
int update(CueOrderDTO cueOrderDTO);
|
||||
|
||||
/**
|
||||
* 删除回收订单
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 删除结果
|
||||
*/
|
||||
int delete(Long id);
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package com.tmerclub.cloud.cuerecycle.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.tmerclub.cloud.common.database.dto.PageDTO;
|
||||
import com.tmerclub.cloud.common.database.util.PageUtil;
|
||||
import com.tmerclub.cloud.common.database.vo.PageVO;
|
||||
import com.tmerclub.cloud.cuerecycle.mapper.CueOrderFlawMapper;
|
||||
import com.tmerclub.cloud.cuerecycle.model.CueOrderFlaw;
|
||||
import com.tmerclub.cloud.cuerecycle.model.dto.CueOrderFlawDTO;
|
||||
import com.tmerclub.cloud.cuerecycle.model.vo.CueOrderFlawVO;
|
||||
import com.tmerclub.cloud.cuerecycle.service.CueOrderFlawService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 球杆商品瑕疵项Service实现类
|
||||
*
|
||||
* @author : frank
|
||||
* @create : 2025-04-15
|
||||
*/
|
||||
@Service
|
||||
public class CueOrderFlawServiceImpl implements CueOrderFlawService {
|
||||
|
||||
@Resource
|
||||
CueOrderFlawMapper cueOrderFlawMapper;
|
||||
|
||||
@Override
|
||||
public PageVO<CueOrderFlawVO> page(PageDTO pageDTO, CueOrderFlawDTO cueOrderFlawDTO) {
|
||||
return PageUtil.doPage(pageDTO, () -> cueOrderFlawMapper.list(cueOrderFlawDTO));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int save(CueOrderFlawDTO cueOrderFlawDTO) {
|
||||
CueOrderFlaw cueOrderFlaw = BeanUtil.toBean(cueOrderFlawDTO, CueOrderFlaw.class);
|
||||
return cueOrderFlawMapper.save(cueOrderFlaw);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteByOrderId(Long orderId) {
|
||||
return cueOrderFlawMapper.deleteByOrderId(orderId);
|
||||
}
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package com.tmerclub.cloud.cuerecycle.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.tmerclub.cloud.common.database.util.PageUtil;
|
||||
import com.tmerclub.cloud.common.database.dto.PageDTO;
|
||||
import com.tmerclub.cloud.common.database.vo.PageVO;
|
||||
import com.tmerclub.cloud.cuerecycle.model.dto.CueOrderDTO;
|
||||
import com.tmerclub.cloud.cuerecycle.model.vo.CueOrderVO;
|
||||
import com.tmerclub.cloud.cuerecycle.model.CueOrder;
|
||||
import com.tmerclub.cloud.cuerecycle.mapper.CueOrderMapper;
|
||||
import com.tmerclub.cloud.cuerecycle.service.CueOrderService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 回收订单Service实现类
|
||||
*
|
||||
* @author : frank
|
||||
* @create : 2025-04-15
|
||||
*/
|
||||
@Service
|
||||
public class CueOrderServiceImpl implements CueOrderService {
|
||||
|
||||
@Resource
|
||||
CueOrderMapper cueOrderMapper;
|
||||
|
||||
@Override
|
||||
public PageVO<CueOrderVO> page(PageDTO pageDTO, CueOrderDTO cueOrderDTO) {
|
||||
return PageUtil.doPage(pageDTO, () -> cueOrderMapper.list(cueOrderDTO));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CueOrderVO getById(Long id) {
|
||||
return cueOrderMapper.getById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int save(CueOrderDTO cueOrderDTO) {
|
||||
CueOrder cueOrder = BeanUtil.toBean(cueOrderDTO, CueOrder.class);
|
||||
cueOrder.setCreateTime(DateUtil.date());
|
||||
return cueOrderMapper.save(cueOrder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int update(CueOrderDTO cueOrderDTO) {
|
||||
CueOrder cueOrder = BeanUtil.toBean(cueOrderDTO, CueOrder.class);
|
||||
cueOrder.setUpdateTime(DateUtil.date());
|
||||
return cueOrderMapper.update(cueOrder);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int delete(Long id) {
|
||||
CueOrderVO cueOrderVO = cueOrderMapper.getById(id);
|
||||
CueOrder cueOrder = BeanUtil.toBean(cueOrderVO, CueOrder.class);
|
||||
cueOrder.setUpdateTime(DateUtil.date());
|
||||
cueOrder.setDeleted(1);
|
||||
return cueOrderMapper.update(cueOrder);
|
||||
}
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
<?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.tmerclub.cloud.cuerecycle.mapper.CueOrderFlawMapper">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap id="cueOrderFlawVOMap" type="com.tmerclub.cloud.cuerecycle.model.vo.CueOrderFlawVO">
|
||||
<result property="orderFlawId" column="order_flaw_id"/>
|
||||
<result property="orderId" column="order_id"/>
|
||||
<result property="flawId" column="flaw_id"/>
|
||||
<result property="flawName" column="flaw_name"/>
|
||||
<result property="isFlaw" column="is_flaw"/>
|
||||
<result property="flawPrice" column="flaw_price"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Vo_Column_List">
|
||||
order_flaw_id,order_id,flaw_id,flaw_name,is_flaw,flaw_price
|
||||
</sql>
|
||||
|
||||
<select id="list" resultMap="cueOrderFlawVOMap">
|
||||
SELECT
|
||||
<include refid="Vo_Column_List" />
|
||||
FROM
|
||||
cue_order_flaw
|
||||
<where>
|
||||
<if test="dto.orderId != null">
|
||||
AND order_id = #{dto.orderId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="save" useGeneratedKeys="true" keyProperty="orderFlawId">
|
||||
INSERT INTO cue_order_flaw
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">order_id,</if>
|
||||
<if test="flawId != null">flaw_id,</if>
|
||||
<if test="flawName != null">flaw_name,</if>
|
||||
<if test="isFlaw != null">is_flaw,</if>
|
||||
<if test="flawPrice != null">flaw_price,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orderId != null">#{orderId},</if>
|
||||
<if test="flawId != null">#{flawId},</if>
|
||||
<if test="flawName != null">#{flawName},</if>
|
||||
<if test="isFlaw != null">#{isFlaw},</if>
|
||||
<if test="flawPrice != null">#{flawPrice},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<delete id="deleteByOrderId">
|
||||
DELETE FROM cue_order_flaw WHERE order_id = #{orderId}
|
||||
</delete>
|
||||
</mapper>
|
175
tmerclub-local/src/main/resources/mapper/CueOrderMapper.xml
Normal file
175
tmerclub-local/src/main/resources/mapper/CueOrderMapper.xml
Normal file
@ -0,0 +1,175 @@
|
||||
<?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.tmerclub.cloud.cuerecycle.mapper.CueOrderMapper">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap id="cueOrderVOMap" type="com.tmerclub.cloud.cuerecycle.model.vo.CueOrderVO">
|
||||
<result property="orderId" column="order_id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="userName" column="user_name"/>
|
||||
<result property="userPhone" column="user_phone"/>
|
||||
<result property="orderType" column="order_type"/>
|
||||
<result property="orderStatus" column="order_status"/>
|
||||
<result property="flawImgUrl" column="flaw_img_url"/>
|
||||
<result property="evidenceOfPayment" column="evidence_of_payment"/>
|
||||
<result property="orderRemark" column="order_remark"/>
|
||||
<result property="estimatedAmount" column="estimated_amount"/>
|
||||
<result property="actualAmount" column="actual_amount"/>
|
||||
<result property="voucherAmount" column="voucher_amount"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="isPayed" column="is_payed"/>
|
||||
<result property="payType" column="pay_type"/>
|
||||
<result property="payTime" column="pay_time"/>
|
||||
<result property="deliveryTime" column="delivery_time"/>
|
||||
<result property="finallyTime" column="finally_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Vo_Column_List">
|
||||
order_id,user_id,user_name,user_phone,order_type,order_status,flaw_img_url,evidence_of_payment,order_remark,estimated_amount,actual_amount,voucher_amount,deleted,create_time,update_time,is_payed,pay_type,pay_time,delivery_time,finally_time
|
||||
</sql>
|
||||
|
||||
<select id="list" resultMap="cueOrderVOMap">
|
||||
SELECT
|
||||
<include refid="Vo_Column_List" />
|
||||
FROM
|
||||
cue_order
|
||||
<where>
|
||||
deleted = 0
|
||||
<if test="dto.userName != null and dto.userName != ''">
|
||||
AND user_name LIKE CONCAT('%', #{dto.userName}, '%')
|
||||
</if>
|
||||
<if test="userPhone != null and dto.userPhone != ''">
|
||||
AND user_phone LIKE CONCAT('%', #{dto.userPhone}, '%')
|
||||
</if>
|
||||
<if test="orderType != null">
|
||||
AND order_type = #{orderType}
|
||||
</if>
|
||||
<if test="orderStatus != null">
|
||||
AND order_status = #{orderStatus}
|
||||
</if>
|
||||
<if test="isPayed != null">
|
||||
AND is_payed = #{isPayed}
|
||||
</if>
|
||||
<if test="payType != null">
|
||||
AND pay_type = #{payType}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY
|
||||
order_id DESC
|
||||
</select>
|
||||
|
||||
<select id="getById" resultMap="cueOrderVOMap">
|
||||
SELECT
|
||||
<include refid="Vo_Column_List" />
|
||||
FROM
|
||||
cue_order
|
||||
WHERE
|
||||
order_id = #{orderId}
|
||||
</select>
|
||||
|
||||
<insert id="save" useGeneratedKeys="true" keyProperty="orderId">
|
||||
INSERT INTO cue_order
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="userName != null and userName != ''">user_name,</if>
|
||||
<if test="userPhone != null and userPhone != ''">user_phone,</if>
|
||||
<if test="orderType != null">order_type,</if>
|
||||
<if test="orderStatus != null">order_status,</if>
|
||||
<if test="flawImgUrl != null and flawImgUrl != ''">flaw_img_url,</if>
|
||||
<if test="evidenceOfPayment != null">evidence_of_payment,</if>
|
||||
<if test="orderRemark != null and orderRemark != ''">order_remark,</if>
|
||||
<if test="estimatedAmount != null and evidenceOfPayment != ''">estimated_amount,</if>
|
||||
<if test="actualAmount != null">actual_amount,</if>
|
||||
<if test="voucherAmount != null">voucher_amount,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="isPayed != null">is_payed,</if>
|
||||
<if test="payType != null">pay_type,</if>
|
||||
<if test="payTime != null">pay_time,</if>
|
||||
<if test="deliveryTime != null">delivery_time,</if>
|
||||
<if test="finallyTime != null">finally_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="userName != null and userName != ''">#{userName},</if>
|
||||
<if test="userPhone != null and userPhone != ''">#{userPhone},</if>
|
||||
<if test="orderType != null">#{orderType},</if>
|
||||
<if test="orderStatus != null">#{orderStatus},</if>
|
||||
<if test="flawImgUrl != null and flawImgUrl != ''">#{flawImgUrl},</if>
|
||||
<if test="evidenceOfPayment != null and evidenceOfPayment != ''">#{evidenceOfPayment},</if>
|
||||
<if test="orderRemark != null and orderRemark != ''">#{orderRemark},</if>
|
||||
<if test="estimatedAmount != null">#{estimatedAmount},</if>
|
||||
<if test="actualAmount != null">#{actualAmount},</if>
|
||||
<if test="voucherAmount != null">#{voucherAmount},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="isPayed != null">#{isPayed},</if>
|
||||
<if test="payType != null">#{payType},</if>
|
||||
<if test="payTime != null">#{payTime},</if>
|
||||
<if test="deliveryTime != null">#{deliveryTime},</if>
|
||||
<if test="finallyTime != null">#{finallyTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="update">
|
||||
UPDATE cue_order
|
||||
<set>
|
||||
<if test="userId != null">
|
||||
user_id = #{userId},
|
||||
</if>
|
||||
<if test="userName != null and userName != ''">
|
||||
user_name = #{userName},
|
||||
</if>
|
||||
<if test="userPhone != null and userPhone != ''">
|
||||
user_phone = #{userPhone},
|
||||
</if>
|
||||
<if test="orderType != null">
|
||||
order_type = #{orderType},
|
||||
</if>
|
||||
<if test="orderStatus != null">
|
||||
order_status = #{orderStatus},
|
||||
</if>
|
||||
<if test="flawImgUrl != null and flawImgUrl != ''">
|
||||
flaw_img_url = #{flawImgUrl},
|
||||
</if>
|
||||
<if test="evidenceOfPayment != null and evidenceOfPayment != ''">
|
||||
evidence_of_payment = #{evidenceOfPayment},
|
||||
</if>
|
||||
<if test="orderRemark != null and orderRemark != ''">
|
||||
order_remark = #{orderRemark},
|
||||
</if>
|
||||
<if test="estimatedAmount != null">
|
||||
estimated_amount = #{estimatedAmount},
|
||||
</if>
|
||||
<if test="actualAmount != null">
|
||||
actual_amount = #{actualAmount},
|
||||
</if>
|
||||
<if test="voucherAmount != null">
|
||||
voucher_amount = #{voucherAmount},
|
||||
</if>
|
||||
<if test="deleted != null">
|
||||
deleted = #{deleted},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime},
|
||||
</if>
|
||||
<if test="isPayed != null">
|
||||
is_payed = #{isPayed},
|
||||
</if>
|
||||
<if test="payType != null">
|
||||
pay_type = #{payType},
|
||||
</if>
|
||||
<if test="payTime != null">
|
||||
pay_time = #{payTime},
|
||||
</if>
|
||||
<if test="deliveryTime != null">
|
||||
delivery_time = #{deliveryTime},
|
||||
</if>
|
||||
<if test="finallyTime != null">
|
||||
finally_time = #{finallyTime},
|
||||
</if>
|
||||
</set>
|
||||
where
|
||||
order_id = #{orderId}
|
||||
</update>
|
||||
</mapper>
|
Loading…
x
Reference in New Issue
Block a user