feat:生成售后代码
This commit is contained in:
1 parent
2923cd72ae
commit
f911239fb5
19 files changed
+729
-2
No files matched your search
@@ -104,7 +104,11 @@ CREATE TABLE hard_parent_car
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci COMMENT ='父订单表';
|
||||
|
||||
CREATE TABLE hardware_order
|
||||
-- ----------------------------
|
||||
-- Table structure for hard_order
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `hard_order`;
|
||||
CREATE TABLE hard_order
|
||||
(
|
||||
id bigint NOT NULL COMMENT '编号',
|
||||
user_id bigint NOT NULL COMMENT '用户id',
|
||||
@@ -140,3 +144,59 @@ CREATE TABLE hardware_order
|
||||
tenant_id bigint DEFAULT NULL COMMENT '租户ID',
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE = InnoDB COMMENT ='订单表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for hard_after_sale
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS hard_after_sale;
|
||||
CREATE TABLE hard_after_sale
|
||||
(
|
||||
id bigint NOT NULL COMMENT '售后编号',
|
||||
no varchar(32) NOT NULL COMMENT '售后单号',
|
||||
type char(10) COMMENT '售后类型',
|
||||
status char(10) DEFAULT 0 NOT NULL COMMENT '售后状态',
|
||||
way char(10) NOT NULL COMMENT '售后方式',
|
||||
user_id bigint NOT NULL COMMENT '用户id',
|
||||
apply_reason varchar(255) NOT NULL COMMENT '申请原因',
|
||||
apply_description varchar(255) COMMENT '补充描述',
|
||||
apply_pic_urls varchar(255) COMMENT '补充凭证图片',
|
||||
order_id bigint NOT NULL COMMENT '订单编号',
|
||||
order_no varchar(32) COMMENT '订单流水号',
|
||||
audit_time timestamp DEFAULT CURRENT_TIMESTAMP COMMENT '审批时间',
|
||||
audit_user_id bigint COMMENT '审批人',
|
||||
audit_reason varchar(255) COMMENT '审批备注',
|
||||
refund_price int DEFAULT 0 NOT NULL COMMENT '退款金额,单位:分',
|
||||
pay_refund_id bigint COMMENT '支付退款编号',
|
||||
refund_time timestamp DEFAULT CURRENT_TIMESTAMP COMMENT '退款时间',
|
||||
delivery_time timestamp COMMENT '退货时间',
|
||||
create_by varchar(64) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建人',
|
||||
create_time datetime DEFAULT NULL COMMENT '创建时间',
|
||||
update_by varchar(64) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '修改人',
|
||||
update_time datetime DEFAULT NULL COMMENT '修改时间',
|
||||
del_flag char(1) COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '删除标记',
|
||||
tenant_id bigint DEFAULT NULL COMMENT '租户ID',
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE = InnoDB COMMENT ='售后订单';
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for hard_after_sale_log
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS hard_after_sale_log;
|
||||
CREATE TABLE hard_after_sale_log
|
||||
(
|
||||
id bigint NOT NULL AUTO_INCREMENT COMMENT '编号',
|
||||
user_id bigint NOT NULL COMMENT '用户编号',
|
||||
after_sale_id bigint NOT NULL COMMENT '售后编号',
|
||||
before_status char(10) COMMENT '售后状态(之前)',
|
||||
after_status char(10) NOT NULL COMMENT '售后状态(之后)',
|
||||
operate_type char(10) NOT NULL COMMENT '操作类型',
|
||||
content varchar(512) NOT NULL COMMENT '操作明细',
|
||||
create_by varchar(64) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建人',
|
||||
create_time datetime DEFAULT NULL COMMENT '创建时间',
|
||||
update_by varchar(64) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '修改人',
|
||||
update_time datetime DEFAULT NULL COMMENT '修改时间',
|
||||
del_flag char(1) COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '删除标记',
|
||||
tenant_id bigint DEFAULT NULL COMMENT '租户ID',
|
||||
PRIMARY KEY (id)
|
||||
) ENGINE = InnoDB COMMENT ='售后订单日志';
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
package com.bsd.pjcloud.canteen.controller;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package com.bsd.pjcloud.hard.api.dto.order;
|
||||
|
||||
import com.bsd.pjcloud.hard.api.entity.order.HardAfterSaleEntity;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class HardAfterSaleDto extends HardAfterSaleEntity {
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package com.bsd.pjcloud.hard.api.dto.order;
|
||||
|
||||
import com.bsd.pjcloud.hard.api.entity.order.HardAfterSaleLogEntity;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class HardAfterSaleLogDto extends HardAfterSaleLogEntity {
|
||||
}
|
||||
+174
@@ -0,0 +1,174 @@
|
||||
package com.bsd.pjcloud.hard.api.entity.order;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.bsd.pjcloud.common.core.util.TenantTable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 售后订单
|
||||
*
|
||||
* @author dzc
|
||||
* @date 2025-01-07 17:23:08
|
||||
*/
|
||||
@Data
|
||||
@TenantTable
|
||||
@TableName("hard_after_sale")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "售后订单")
|
||||
public class HardAfterSaleEntity extends Model<HardAfterSaleEntity> {
|
||||
|
||||
/**
|
||||
* 售后编号
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(description="售后编号")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 售后单号
|
||||
*/
|
||||
@Schema(description="售后单号")
|
||||
private String no;
|
||||
|
||||
/**
|
||||
* 售后类型
|
||||
*/
|
||||
@Schema(description="售后类型")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 售后状态
|
||||
*/
|
||||
@Schema(description="售后状态")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 售后方式
|
||||
*/
|
||||
@Schema(description="售后方式")
|
||||
private String way;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@Schema(description="用户id")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 申请原因
|
||||
*/
|
||||
@Schema(description="申请原因")
|
||||
private String applyReason;
|
||||
|
||||
/**
|
||||
* 补充描述
|
||||
*/
|
||||
@Schema(description="补充描述")
|
||||
private String applyDescription;
|
||||
|
||||
/**
|
||||
* 补充凭证图片
|
||||
*/
|
||||
@Schema(description="补充凭证图片")
|
||||
private String applyPicUrls;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
@Schema(description="订单编号")
|
||||
private Long orderId;
|
||||
|
||||
/**
|
||||
* 订单流水号
|
||||
*/
|
||||
@Schema(description="订单流水号")
|
||||
private String orderNo;
|
||||
|
||||
/**
|
||||
* 审批时间
|
||||
*/
|
||||
@Schema(description="审批时间")
|
||||
private LocalDateTime auditTime;
|
||||
|
||||
/**
|
||||
* 审批人
|
||||
*/
|
||||
@Schema(description="审批人")
|
||||
private Long auditUserId;
|
||||
|
||||
/**
|
||||
* 审批备注
|
||||
*/
|
||||
@Schema(description="审批备注")
|
||||
private String auditReason;
|
||||
|
||||
/**
|
||||
* 退款金额,单位:分
|
||||
*/
|
||||
@Schema(description="退款金额,单位:分")
|
||||
private Integer refundPrice;
|
||||
|
||||
/**
|
||||
* 支付退款编号
|
||||
*/
|
||||
@Schema(description="支付退款编号")
|
||||
private Long payRefundId;
|
||||
|
||||
/**
|
||||
* 退款时间
|
||||
*/
|
||||
@Schema(description="退款时间")
|
||||
private LocalDateTime refundTime;
|
||||
|
||||
/**
|
||||
* 退货时间
|
||||
*/
|
||||
@Schema(description="退货时间")
|
||||
private LocalDateTime deliveryTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="创建人")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@Schema(description="修改人")
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@Schema(description="修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 删除标记
|
||||
*/
|
||||
@TableLogic
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="删除标记")
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@Schema(description="租户ID")
|
||||
private Long tenantId;
|
||||
}
|
||||
+109
@@ -0,0 +1,109 @@
|
||||
package com.bsd.pjcloud.hard.api.entity.order;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import com.bsd.pjcloud.common.core.util.TenantTable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 售后订单日志
|
||||
*
|
||||
* @author dzc
|
||||
* @date 2025-01-07 17:23:25
|
||||
*/
|
||||
@Data
|
||||
@TenantTable
|
||||
@TableName("hard_after_sale_log")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "售后订单日志")
|
||||
public class HardAfterSaleLogEntity extends Model<HardAfterSaleLogEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(description="编号")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户编号
|
||||
*/
|
||||
@Schema(description="用户编号")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 售后编号
|
||||
*/
|
||||
@Schema(description="售后编号")
|
||||
private Long afterSaleId;
|
||||
|
||||
/**
|
||||
* 售后状态(之前)
|
||||
*/
|
||||
@Schema(description="售后状态(之前)")
|
||||
private String beforeStatus;
|
||||
|
||||
/**
|
||||
* 售后状态(之后)
|
||||
*/
|
||||
@Schema(description="售后状态(之后)")
|
||||
private String afterStatus;
|
||||
|
||||
/**
|
||||
* 操作类型
|
||||
*/
|
||||
@Schema(description="操作类型")
|
||||
private String operateType;
|
||||
|
||||
/**
|
||||
* 操作明细
|
||||
*/
|
||||
@Schema(description="操作明细")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="创建人")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@Schema(description="修改人")
|
||||
private String updateBy;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@Schema(description="修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 删除标记
|
||||
*/
|
||||
@TableLogic
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@Schema(description="删除标记")
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@Schema(description="租户ID")
|
||||
private Long tenantId;
|
||||
}
|
||||
+1
-1
@@ -18,7 +18,7 @@ import java.time.LocalDateTime;
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
@TenantTable
|
||||
@TableName("hardware_order")
|
||||
@TableName("hard_order")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "订单表")
|
||||
public class HardOrderEntity extends Model<HardOrderEntity> {
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package com.bsd.pjcloud.hard.api.vo.order;
|
||||
|
||||
import com.bsd.pjcloud.hard.api.entity.order.HardAfterSaleLogEntity;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class HardAfterSaleLogVo extends HardAfterSaleLogEntity {
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package com.bsd.pjcloud.hard.api.vo.order;
|
||||
|
||||
import com.bsd.pjcloud.hard.api.entity.order.HardAfterSaleEntity;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class HardAfterSaleVo extends HardAfterSaleEntity {
|
||||
}
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
package com.bsd.pjcloud.hard.controller.order;
|
||||
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.log.annotation.SysLog;
|
||||
import com.bsd.pjcloud.hard.api.dto.order.HardAfterSaleDto;
|
||||
import com.bsd.pjcloud.hard.api.entity.order.HardAfterSaleEntity;
|
||||
import com.bsd.pjcloud.hard.service.HardAfterSaleService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.bsd.pjcloud.common.excel.annotation.ResponseExcel;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 售后订单
|
||||
*
|
||||
* @author dzc
|
||||
* @date 2025-01-07 17:23:08
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/hard-after-sale" )
|
||||
@Tag(description = "hard-after-sale" , name = "售后订单管理" )
|
||||
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
|
||||
public class HardAfterSaleController {
|
||||
|
||||
private final HardAfterSaleService hardAfterSaleService;
|
||||
|
||||
@Operation(summary = "分页查询" , description = "分页查询" )
|
||||
@GetMapping("/page" )
|
||||
@PreAuthorize("@pms.hasPermission('hard_hardAfterSale_view')" )
|
||||
public R getHardAfterSalePage(@ParameterObject Page page, @ParameterObject HardAfterSaleEntity hardAfterSale) {
|
||||
LambdaQueryWrapper<HardAfterSaleEntity> wrapper = Wrappers.lambdaQuery();
|
||||
return R.ok(hardAfterSaleService.page(page, wrapper));
|
||||
}
|
||||
|
||||
@Operation(summary = "分页复杂查询" , description = "分页复杂查询" )
|
||||
@GetMapping("/page-join" )
|
||||
@PreAuthorize("@pms.hasPermission('hard_hardAfterSale_view')" )
|
||||
public R pageJoin(@ParameterObject Page page, @ParameterObject HardAfterSaleDto dto) {
|
||||
return R.ok(hardAfterSaleService.pageJoin(page, dto));
|
||||
}
|
||||
|
||||
@Operation(summary = "通过id查询" , description = "通过id查询" )
|
||||
@GetMapping("/{id}" )
|
||||
@PreAuthorize("@pms.hasPermission('hard_hardAfterSale_view')" )
|
||||
public R getById(@PathVariable("id" ) Long id) {
|
||||
return R.ok(hardAfterSaleService.getById(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "新增售后订单" , description = "新增售后订单" )
|
||||
@SysLog("新增售后订单" )
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('hard_hardAfterSale_add')" )
|
||||
public R save(@RequestBody HardAfterSaleEntity hardAfterSale) {
|
||||
return R.ok(hardAfterSaleService.save(hardAfterSale));
|
||||
}
|
||||
|
||||
@Operation(summary = "修改售后订单" , description = "修改售后订单" )
|
||||
@SysLog("修改售后订单" )
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('hard_hardAfterSale_edit')" )
|
||||
public R updateById(@RequestBody HardAfterSaleEntity hardAfterSale) {
|
||||
return R.ok(hardAfterSaleService.updateById(hardAfterSale));
|
||||
}
|
||||
|
||||
@Operation(summary = "通过id删除售后订单" , description = "通过id删除售后订单" )
|
||||
@SysLog("通过id删除售后订单" )
|
||||
@DeleteMapping
|
||||
@PreAuthorize("@pms.hasPermission('hard_hardAfterSale_del')" )
|
||||
public R removeById(@RequestBody Long[] ids) {
|
||||
return R.ok(hardAfterSaleService.removeBatchByIds(CollUtil.toList(ids)));
|
||||
}
|
||||
|
||||
@ResponseExcel
|
||||
@GetMapping("/export")
|
||||
@PreAuthorize("@pms.hasPermission('hard_hardAfterSale_export')" )
|
||||
public List<HardAfterSaleEntity> export(HardAfterSaleEntity hardAfterSale,Long[] ids) {
|
||||
return hardAfterSaleService.list(Wrappers.lambdaQuery(hardAfterSale).in(ArrayUtil.isNotEmpty(ids), HardAfterSaleEntity::getId, ids));
|
||||
}
|
||||
}
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
package com.bsd.pjcloud.hard.controller.order;
|
||||
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.common.core.util.R;
|
||||
import com.bsd.pjcloud.common.log.annotation.SysLog;
|
||||
import com.bsd.pjcloud.hard.api.dto.order.HardAfterSaleLogDto;
|
||||
import com.bsd.pjcloud.hard.api.entity.order.HardAfterSaleLogEntity;
|
||||
import com.bsd.pjcloud.hard.service.HardAfterSaleLogService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.bsd.pjcloud.common.excel.annotation.ResponseExcel;
|
||||
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
|
||||
import org.springdoc.core.annotations.ParameterObject;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 售后订单日志
|
||||
*
|
||||
* @author dzc
|
||||
* @date 2025-01-07 17:23:25
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/hard-after-sale-log")
|
||||
@Tag(description = "hard-after-sale-log", name = "售后订单日志管理")
|
||||
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
|
||||
public class HardAfterSaleLogController {
|
||||
|
||||
private final HardAfterSaleLogService hardAfterSaleLogService;
|
||||
|
||||
@Operation(summary = "分页查询", description = "分页查询")
|
||||
@GetMapping("/page")
|
||||
@PreAuthorize("@pms.hasPermission('hard_hardAfterSaleLog_view')")
|
||||
public R getHardAfterSaleLogPage(@ParameterObject Page page, @ParameterObject HardAfterSaleLogEntity dto) {
|
||||
LambdaQueryWrapper<HardAfterSaleLogEntity> wrapper = Wrappers.lambdaQuery();
|
||||
return R.ok(hardAfterSaleLogService.page(page, wrapper));
|
||||
}
|
||||
|
||||
@Operation(summary = "分页复杂查询", description = "分页复杂查询")
|
||||
@GetMapping("/page-join")
|
||||
@PreAuthorize("@pms.hasPermission('hard_hardAfterSaleLog_view')")
|
||||
public R pageJoin(@ParameterObject Page page, @ParameterObject HardAfterSaleLogDto dto) {
|
||||
return R.ok(hardAfterSaleLogService.pageJoin(page, dto));
|
||||
}
|
||||
|
||||
@Operation(summary = "通过id查询", description = "通过id查询")
|
||||
@GetMapping("/{id}")
|
||||
@PreAuthorize("@pms.hasPermission('hard_hardAfterSaleLog_view')")
|
||||
public R getById(@PathVariable("id") Long id) {
|
||||
return R.ok(hardAfterSaleLogService.getById(id));
|
||||
}
|
||||
|
||||
@Operation(summary = "新增售后订单日志", description = "新增售后订单日志")
|
||||
@SysLog("新增售后订单日志")
|
||||
@PostMapping
|
||||
@PreAuthorize("@pms.hasPermission('hard_hardAfterSaleLog_add')")
|
||||
public R save(@RequestBody HardAfterSaleLogEntity hardAfterSaleLog) {
|
||||
return R.ok(hardAfterSaleLogService.save(hardAfterSaleLog));
|
||||
}
|
||||
|
||||
@Operation(summary = "修改售后订单日志", description = "修改售后订单日志")
|
||||
@SysLog("修改售后订单日志")
|
||||
@PutMapping
|
||||
@PreAuthorize("@pms.hasPermission('hard_hardAfterSaleLog_edit')")
|
||||
public R updateById(@RequestBody HardAfterSaleLogEntity hardAfterSaleLog) {
|
||||
return R.ok(hardAfterSaleLogService.updateById(hardAfterSaleLog));
|
||||
}
|
||||
|
||||
@Operation(summary = "通过id删除售后订单日志", description = "通过id删除售后订单日志")
|
||||
@SysLog("通过id删除售后订单日志")
|
||||
@DeleteMapping
|
||||
@PreAuthorize("@pms.hasPermission('hard_hardAfterSaleLog_del')")
|
||||
public R removeById(@RequestBody Long[] ids) {
|
||||
return R.ok(hardAfterSaleLogService.removeBatchByIds(CollUtil.toList(ids)));
|
||||
}
|
||||
|
||||
@ResponseExcel
|
||||
@GetMapping("/export")
|
||||
@PreAuthorize("@pms.hasPermission('hard_hardAfterSaleLog_export')")
|
||||
public List<HardAfterSaleLogEntity> export(HardAfterSaleLogEntity hardAfterSaleLog, Long[] ids) {
|
||||
return hardAfterSaleLogService.list(Wrappers.lambdaQuery(hardAfterSaleLog).in(ArrayUtil.isNotEmpty(ids), HardAfterSaleLogEntity::getId, ids));
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package com.bsd.pjcloud.hard.mapper.order;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.common.data.datascope.PjcloudBaseMapper;
|
||||
import com.bsd.pjcloud.hard.api.dto.order.HardAfterSaleLogDto;
|
||||
import com.bsd.pjcloud.hard.api.entity.order.HardAfterSaleLogEntity;
|
||||
import com.bsd.pjcloud.hard.api.vo.order.HardAfterSaleLogVo;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface HardAfterSaleLogMapper extends PjcloudBaseMapper<HardAfterSaleLogEntity> {
|
||||
|
||||
default Page<HardAfterSaleLogVo> pageJoin(Page page, HardAfterSaleLogDto dto) {
|
||||
MPJLambdaWrapper<HardAfterSaleLogEntity> wrapper = new MPJLambdaWrapper<HardAfterSaleLogEntity>()
|
||||
.selectAll(HardAfterSaleLogEntity.class);
|
||||
return selectJoinPage(page, HardAfterSaleLogVo.class, wrapper);
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.bsd.pjcloud.hard.mapper.order;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.bsd.pjcloud.common.data.datascope.PjcloudBaseMapper;
|
||||
import com.bsd.pjcloud.hard.api.dto.order.HardAfterSaleDto;
|
||||
import com.bsd.pjcloud.hard.api.entity.order.HardAfterSaleEntity;
|
||||
import com.bsd.pjcloud.hard.api.vo.order.HardAfterSaleVo;
|
||||
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface HardAfterSaleMapper extends PjcloudBaseMapper<HardAfterSaleEntity> {
|
||||
|
||||
|
||||
default Page<HardAfterSaleVo> pageJoin(Page page, HardAfterSaleDto dto){
|
||||
MPJLambdaWrapper<HardAfterSaleEntity> wrapper = new MPJLambdaWrapper<HardAfterSaleEntity>()
|
||||
.selectAll(HardAfterSaleEntity.class);
|
||||
return selectJoinPage(page, HardAfterSaleVo.class, wrapper);
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package com.bsd.pjcloud.hard.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bsd.pjcloud.hard.api.dto.order.HardAfterSaleLogDto;
|
||||
import com.bsd.pjcloud.hard.api.entity.order.HardAfterSaleLogEntity;
|
||||
import com.bsd.pjcloud.hard.api.vo.order.HardAfterSaleLogVo;
|
||||
|
||||
public interface HardAfterSaleLogService extends IService<HardAfterSaleLogEntity> {
|
||||
|
||||
Page<HardAfterSaleLogVo> pageJoin(Page page, HardAfterSaleLogDto dto);
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package com.bsd.pjcloud.hard.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bsd.pjcloud.hard.api.dto.order.HardAfterSaleDto;
|
||||
import com.bsd.pjcloud.hard.api.entity.order.HardAfterSaleEntity;
|
||||
import com.bsd.pjcloud.hard.api.vo.order.HardAfterSaleVo;
|
||||
|
||||
public interface HardAfterSaleService extends IService<HardAfterSaleEntity> {
|
||||
|
||||
Page<HardAfterSaleVo> pageJoin(Page page, HardAfterSaleDto dto);
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package com.bsd.pjcloud.hard.service.impl.order;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.bsd.pjcloud.hard.api.dto.order.HardAfterSaleLogDto;
|
||||
import com.bsd.pjcloud.hard.api.entity.order.HardAfterSaleLogEntity;
|
||||
import com.bsd.pjcloud.hard.api.vo.order.HardAfterSaleLogVo;
|
||||
import com.bsd.pjcloud.hard.mapper.order.HardAfterSaleLogMapper;
|
||||
import com.bsd.pjcloud.hard.service.HardAfterSaleLogService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 售后订单日志
|
||||
*
|
||||
* @author dzc
|
||||
* @date 2025-01-07 17:23:25
|
||||
*/
|
||||
@Service
|
||||
public class HardAfterSaleLogServiceImpl extends ServiceImpl<HardAfterSaleLogMapper, HardAfterSaleLogEntity> implements HardAfterSaleLogService {
|
||||
|
||||
@Override
|
||||
public Page<HardAfterSaleLogVo> pageJoin(Page page, HardAfterSaleLogDto dto) {
|
||||
return baseMapper.pageJoin(page, dto);
|
||||
}
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package com.bsd.pjcloud.hard.service.impl.order;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.bsd.pjcloud.hard.api.dto.order.HardAfterSaleDto;
|
||||
import com.bsd.pjcloud.hard.api.entity.order.HardAfterSaleEntity;
|
||||
import com.bsd.pjcloud.hard.api.vo.order.HardAfterSaleVo;
|
||||
import com.bsd.pjcloud.hard.mapper.order.HardAfterSaleMapper;
|
||||
import com.bsd.pjcloud.hard.service.HardAfterSaleService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 售后订单
|
||||
*
|
||||
* @author dzc
|
||||
* @date 2025-01-07 17:23:08
|
||||
*/
|
||||
@Service
|
||||
public class HardAfterSaleServiceImpl extends ServiceImpl<HardAfterSaleMapper, HardAfterSaleEntity> implements HardAfterSaleService {
|
||||
|
||||
@Override
|
||||
public Page<HardAfterSaleVo> pageJoin(Page page, HardAfterSaleDto dto) {
|
||||
return baseMapper.pageJoin(page, dto);
|
||||
}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
<?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.bsd.pjcloud.hard.mapper.order.HardAfterSaleLogMapper">
|
||||
|
||||
<resultMap id="hardAfterSaleLogMap" type="com.bsd.pjcloud.hard.api.entity.order.HardAfterSaleLogEntity">
|
||||
<id property="id" column="id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="afterSaleId" column="after_sale_id"/>
|
||||
<result property="beforeStatus" column="before_status"/>
|
||||
<result property="afterStatus" column="after_status"/>
|
||||
<result property="operateType" column="operate_type"/>
|
||||
<result property="content" column="content"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
</resultMap>
|
||||
</mapper>
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
<?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.bsd.pjcloud.hard.mapper.order.HardAfterSaleMapper">
|
||||
|
||||
<resultMap id="hardAfterSaleMap" type="com.bsd.pjcloud.hard.api.entity.order.HardAfterSaleEntity">
|
||||
<id property="id" column="id"/>
|
||||
<result property="no" column="no"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="way" column="way"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="applyReason" column="apply_reason"/>
|
||||
<result property="applyDescription" column="apply_description"/>
|
||||
<result property="applyPicUrls" column="apply_pic_urls"/>
|
||||
<result property="orderId" column="order_id"/>
|
||||
<result property="orderNo" column="order_no"/>
|
||||
<result property="auditTime" column="audit_time"/>
|
||||
<result property="auditUserId" column="audit_user_id"/>
|
||||
<result property="auditReason" column="audit_reason"/>
|
||||
<result property="refundPrice" column="refund_price"/>
|
||||
<result property="payRefundId" column="pay_refund_id"/>
|
||||
<result property="refundTime" column="refund_time"/>
|
||||
<result property="deliveryTime" column="delivery_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
</resultMap>
|
||||
</mapper>
|
||||
Reference in new issue
Block a user