Compare commits
No commits in common. "dc5f77853e1cdeb43987974eb347bbedb4463aae" and "0014f3cff50c4fac68694b12c5db31c7810b0ad8" have entirely different histories.
dc5f77853e
...
0014f3cff5
@ -1,74 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.project.controller.admin;
|
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
||||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
|
||||||
import cn.iocoder.yudao.module.project.entity.RepairOrderInfo;
|
|
||||||
import cn.iocoder.yudao.module.project.service.RepairOrderInfoService;
|
|
||||||
import cn.iocoder.yudao.module.project.vo.RepairOrderInfoPageReqVO;
|
|
||||||
import cn.iocoder.yudao.module.project.vo.RepairOrderInfoRespVO;
|
|
||||||
import cn.iocoder.yudao.module.project.vo.RepairOrderInfoSaveReqVO;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import javax.validation.Valid;
|
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
|
||||||
|
|
||||||
@Tag(name = "管理后台 - 维修模块 订单")
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/repair/order-info")
|
|
||||||
@Validated
|
|
||||||
public class RepairOrderInfoController {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private RepairOrderInfoService orderInfoService;
|
|
||||||
|
|
||||||
@PostMapping("/create")
|
|
||||||
@Operation(summary = "创建维修模块 订单")
|
|
||||||
@PreAuthorize("@ss.hasPermission('repair:order-info:create')")
|
|
||||||
public CommonResult<String> createOrderInfo(@Valid @RequestBody RepairOrderInfoSaveReqVO createReqVO) {
|
|
||||||
return success(orderInfoService.createOrderInfo(createReqVO));
|
|
||||||
}
|
|
||||||
|
|
||||||
@PutMapping("/update")
|
|
||||||
@Operation(summary = "更新维修模块 订单")
|
|
||||||
@PreAuthorize("@ss.hasPermission('repair:order-info:update')")
|
|
||||||
public CommonResult<Boolean> updateOrderInfo(@Valid @RequestBody RepairOrderInfoSaveReqVO updateReqVO) {
|
|
||||||
orderInfoService.updateOrderInfo(updateReqVO);
|
|
||||||
return success(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@DeleteMapping("/delete")
|
|
||||||
@Operation(summary = "删除维修模块 订单")
|
|
||||||
@Parameter(name = "id", description = "编号", required = true)
|
|
||||||
@PreAuthorize("@ss.hasPermission('repair:order-info:delete')")
|
|
||||||
public CommonResult<Boolean> deleteOrderInfo(@RequestParam("id") String id) {
|
|
||||||
orderInfoService.deleteOrderInfo(id);
|
|
||||||
return success(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/get")
|
|
||||||
@Operation(summary = "获得维修模块 订单")
|
|
||||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
|
||||||
@PreAuthorize("@ss.hasPermission('repair:order-info:query')")
|
|
||||||
public CommonResult<RepairOrderInfoRespVO> getOrderInfo(@RequestParam("id") String id) {
|
|
||||||
RepairOrderInfo orderInfo = orderInfoService.getOrderInfo(id);
|
|
||||||
return success(BeanUtils.toBean(orderInfo, RepairOrderInfoRespVO.class));
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/page")
|
|
||||||
@Operation(summary = "获得维修模块 订单分页")
|
|
||||||
@PreAuthorize("@ss.hasPermission('repair:order-info:query')")
|
|
||||||
public CommonResult<PageResult<RepairOrderInfoRespVO>> getOrderInfoPage(@Valid RepairOrderInfoPageReqVO pageReqVO) {
|
|
||||||
PageResult<RepairOrderInfo> pageResult = orderInfoService.getOrderInfoPage(pageReqVO);
|
|
||||||
return success(BeanUtils.toBean(pageResult, RepairOrderInfoRespVO.class));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,162 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.project.entity;
|
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
|
|
||||||
import lombok.*;
|
|
||||||
import java.util.*;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
|
||||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 维修模块 订单 DO
|
|
||||||
*
|
|
||||||
* @author pqz
|
|
||||||
*/
|
|
||||||
@TableName("repair_order_info")
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@ToString(callSuper = true)
|
|
||||||
@Builder
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
public class RepairOrderInfo extends TenantBaseDO {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 订单id
|
|
||||||
*/
|
|
||||||
@TableId(type = IdType.ASSIGN_UUID)
|
|
||||||
private String id;
|
|
||||||
/**
|
|
||||||
* 服务id或工单id
|
|
||||||
*/
|
|
||||||
private String goodsId;
|
|
||||||
/**
|
|
||||||
* 订单号
|
|
||||||
*/
|
|
||||||
private String orderNo;
|
|
||||||
/**
|
|
||||||
* 服务名称
|
|
||||||
*/
|
|
||||||
private String goodsTitle;
|
|
||||||
/**
|
|
||||||
* 消费类型1会员充值2维修服务
|
|
||||||
*/
|
|
||||||
private String goodsType;
|
|
||||||
/**
|
|
||||||
* 用户id
|
|
||||||
*/
|
|
||||||
private Integer userId;
|
|
||||||
/**
|
|
||||||
* 客户id
|
|
||||||
*/
|
|
||||||
private String cusId;
|
|
||||||
/**
|
|
||||||
* 客户姓名
|
|
||||||
*/
|
|
||||||
private String cusName;
|
|
||||||
/**
|
|
||||||
* 客户手机号
|
|
||||||
*/
|
|
||||||
private String cusPhone;
|
|
||||||
/**
|
|
||||||
* 商品原价 元
|
|
||||||
*/
|
|
||||||
private BigDecimal goodsPrice;
|
|
||||||
/**
|
|
||||||
* 实付金额 元
|
|
||||||
*/
|
|
||||||
private BigDecimal payMoney;
|
|
||||||
/**
|
|
||||||
* 下单时间
|
|
||||||
*/
|
|
||||||
private LocalDateTime orderTime;
|
|
||||||
/**
|
|
||||||
* 会员优惠金额
|
|
||||||
*/
|
|
||||||
private Long reduceMoney;
|
|
||||||
/**
|
|
||||||
* 使用会员储值卡的金额
|
|
||||||
*/
|
|
||||||
private Long balance;
|
|
||||||
/**
|
|
||||||
* 支付时间
|
|
||||||
*/
|
|
||||||
private LocalDateTime payTime;
|
|
||||||
/**
|
|
||||||
* 支付方式
|
|
||||||
*/
|
|
||||||
private String payType;
|
|
||||||
/**
|
|
||||||
* 支付信息备注
|
|
||||||
*/
|
|
||||||
private String payRemark;
|
|
||||||
/**
|
|
||||||
* 线上或者线下 1线上 0线下
|
|
||||||
*/
|
|
||||||
private String isOnline;
|
|
||||||
/**
|
|
||||||
* 收款账号
|
|
||||||
*/
|
|
||||||
private String receivablesAccount;
|
|
||||||
/**
|
|
||||||
* 订单状态0待支付1已支付
|
|
||||||
*/
|
|
||||||
private String orderStatus;
|
|
||||||
/**
|
|
||||||
* 评价详情
|
|
||||||
*/
|
|
||||||
private String commentDesc;
|
|
||||||
/**
|
|
||||||
* 星级
|
|
||||||
*/
|
|
||||||
private Integer commentStar;
|
|
||||||
/**
|
|
||||||
* 评论时间
|
|
||||||
*/
|
|
||||||
private LocalDateTime commentTime;
|
|
||||||
/**
|
|
||||||
* 核销码
|
|
||||||
*/
|
|
||||||
private String accessCode;
|
|
||||||
/**
|
|
||||||
* 核销时间
|
|
||||||
*/
|
|
||||||
private LocalDateTime validationTime;
|
|
||||||
/**
|
|
||||||
* 核销人
|
|
||||||
*/
|
|
||||||
private String validationRealName;
|
|
||||||
/**
|
|
||||||
* 核销人id
|
|
||||||
*/
|
|
||||||
private Integer validationUserId;
|
|
||||||
/**
|
|
||||||
* 是否使用优惠券 0 未使用 1使用
|
|
||||||
*/
|
|
||||||
private String isCoupon;
|
|
||||||
/**
|
|
||||||
* 优惠券id
|
|
||||||
*/
|
|
||||||
private Long couponId;
|
|
||||||
/**
|
|
||||||
* 优惠券代码
|
|
||||||
*/
|
|
||||||
private String couponCode;
|
|
||||||
/**
|
|
||||||
* 优惠金额
|
|
||||||
*/
|
|
||||||
private Integer couponDiscount;
|
|
||||||
/**
|
|
||||||
* 创建人所在部门
|
|
||||||
*/
|
|
||||||
private Integer deptId;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.project.mapper;
|
|
||||||
|
|
||||||
import cn.iocoder.yudao.module.project.entity.RepairOrderInfo;
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 维修模块 订单 Mapper
|
|
||||||
*
|
|
||||||
* @author pqz
|
|
||||||
*/
|
|
||||||
@Mapper
|
|
||||||
public interface RepairOrderInfoMapper extends BaseMapper<RepairOrderInfo> {
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,55 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.project.service;
|
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
||||||
import cn.iocoder.yudao.module.project.entity.RepairOrderInfo;
|
|
||||||
import cn.iocoder.yudao.module.project.vo.RepairOrderInfoPageReqVO;
|
|
||||||
import cn.iocoder.yudao.module.project.vo.RepairOrderInfoSaveReqVO;
|
|
||||||
|
|
||||||
import javax.validation.Valid;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 维修模块 订单 Service 接口
|
|
||||||
*
|
|
||||||
* @author pqz
|
|
||||||
*/
|
|
||||||
public interface RepairOrderInfoService {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建维修模块 订单
|
|
||||||
*
|
|
||||||
* @param createReqVO 创建信息
|
|
||||||
* @return 编号
|
|
||||||
*/
|
|
||||||
String createOrderInfo(@Valid RepairOrderInfoSaveReqVO createReqVO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新维修模块 订单
|
|
||||||
*
|
|
||||||
* @param updateReqVO 更新信息
|
|
||||||
*/
|
|
||||||
void updateOrderInfo(@Valid RepairOrderInfoSaveReqVO updateReqVO);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除维修模块 订单
|
|
||||||
*
|
|
||||||
* @param id 编号
|
|
||||||
*/
|
|
||||||
void deleteOrderInfo(String id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获得维修模块 订单
|
|
||||||
*
|
|
||||||
* @param id 编号
|
|
||||||
* @return 维修模块 订单
|
|
||||||
*/
|
|
||||||
RepairOrderInfo getOrderInfo(String id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获得维修模块 订单分页
|
|
||||||
*
|
|
||||||
* @param pageReqVO 分页查询
|
|
||||||
* @return 维修模块 订单分页
|
|
||||||
*/
|
|
||||||
PageResult<RepairOrderInfo> getOrderInfoPage(RepairOrderInfoPageReqVO pageReqVO);
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,61 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.project.service.impl;
|
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
||||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
|
||||||
import cn.iocoder.yudao.module.project.entity.RepairOrderInfo;
|
|
||||||
import cn.iocoder.yudao.module.project.mapper.RepairOrderInfoMapper;
|
|
||||||
import cn.iocoder.yudao.module.project.service.RepairOrderInfoService;
|
|
||||||
import cn.iocoder.yudao.module.project.vo.RepairOrderInfoPageReqVO;
|
|
||||||
import cn.iocoder.yudao.module.project.vo.RepairOrderInfoSaveReqVO;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 维修模块 订单 Service 实现类
|
|
||||||
*
|
|
||||||
* @author pqz
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
@Validated
|
|
||||||
public class RepairOrderInfoServiceImpl implements RepairOrderInfoService {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private RepairOrderInfoMapper orderInfoMapper;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String createOrderInfo(RepairOrderInfoSaveReqVO createReqVO) {
|
|
||||||
// 插入
|
|
||||||
RepairOrderInfo orderInfo = BeanUtils.toBean(createReqVO, RepairOrderInfo.class);
|
|
||||||
orderInfoMapper.insert(orderInfo);
|
|
||||||
// 返回
|
|
||||||
return orderInfo.getId();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void updateOrderInfo(RepairOrderInfoSaveReqVO updateReqVO) {
|
|
||||||
// 更新
|
|
||||||
RepairOrderInfo updateObj = BeanUtils.toBean(updateReqVO, RepairOrderInfo.class);
|
|
||||||
orderInfoMapper.updateById(updateObj);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void deleteOrderInfo(String id) {
|
|
||||||
// 删除
|
|
||||||
orderInfoMapper.deleteById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public RepairOrderInfo getOrderInfo(String id) {
|
|
||||||
return orderInfoMapper.selectById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public PageResult<RepairOrderInfo> getOrderInfoPage(RepairOrderInfoPageReqVO pageReqVO) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.project.vo;
|
|
||||||
|
|
||||||
import cn.iocoder.yudao.module.project.entity.RepairOrderInfo;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import lombok.ToString;
|
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 维修模块 订单分页 Request VO")
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
@ToString(callSuper = true)
|
|
||||||
public class RepairOrderInfoPageReqVO extends RepairOrderInfo {
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,18 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.project.vo;
|
|
||||||
|
|
||||||
import cn.iocoder.yudao.module.project.entity.RepairOrderInfo;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.*;
|
|
||||||
import java.util.*;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import com.alibaba.excel.annotation.*;
|
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 维修模块 订单 Response VO")
|
|
||||||
@Data
|
|
||||||
@ExcelIgnoreUnannotated
|
|
||||||
public class RepairOrderInfoRespVO extends RepairOrderInfo {
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.project.vo;
|
|
||||||
|
|
||||||
import cn.iocoder.yudao.module.project.entity.RepairOrderInfo;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.*;
|
|
||||||
import java.util.*;
|
|
||||||
import javax.validation.constraints.*;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 维修模块 订单新增/修改 Request VO")
|
|
||||||
@Data
|
|
||||||
public class RepairOrderInfoSaveReqVO extends RepairOrderInfo {
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user