parent
ed4dea3373
commit
c8966780ee
@ -1,93 +0,0 @@
|
||||
package com.cyl.oms.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.data.domain.PageImpl;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.cyl.oms.convert.RefundConvert;
|
||||
import com.cyl.oms.domain.Refund;
|
||||
import com.cyl.oms.pojo.query.RefundQuery;
|
||||
import com.cyl.oms.service.RefundService;
|
||||
import com.cyl.oms.pojo.vo.RefundVO;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
/**
|
||||
* 订单售后Controller
|
||||
*
|
||||
* @author zcc
|
||||
* @date 2022-12-01
|
||||
*/
|
||||
@Api(description ="订单售后接口列表")
|
||||
@RestController
|
||||
@RequestMapping("/oms/refund")
|
||||
public class RefundController extends BaseController {
|
||||
@Autowired
|
||||
private RefundService service;
|
||||
@Autowired
|
||||
private RefundConvert convert;
|
||||
|
||||
@ApiOperation("查询订单售后列表")
|
||||
@PreAuthorize("@ss.hasPermi('oms:refund:list')")
|
||||
@PostMapping("/list")
|
||||
public ResponseEntity<Page<Refund>> list(@RequestBody RefundQuery query, Pageable page) {
|
||||
List<Refund> list = service.selectList(query, page);
|
||||
return ResponseEntity.ok(new PageImpl<>(list, page, ((com.github.pagehelper.Page)list).getTotal()));
|
||||
}
|
||||
|
||||
@ApiOperation("导出订单售后列表")
|
||||
@PreAuthorize("@ss.hasPermi('oms:refund:export')")
|
||||
@Log(title = "订单售后", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public ResponseEntity<String> export(RefundQuery query) {
|
||||
List<Refund> list = service.selectList(query, null);
|
||||
ExcelUtil<RefundVO> util = new ExcelUtil<>(RefundVO.class);
|
||||
return ResponseEntity.ok(util.writeExcel(convert.dos2vos(list), "订单售后数据"));
|
||||
}
|
||||
|
||||
@ApiOperation("获取订单售后详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('oms:refund:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public ResponseEntity<Refund> getInfo(@PathVariable("id") Long id) {
|
||||
return ResponseEntity.ok(service.selectById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("新增订单售后")
|
||||
@PreAuthorize("@ss.hasPermi('oms:refund:add')")
|
||||
@Log(title = "订单售后", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public ResponseEntity<Integer> add(@RequestBody Refund refund) {
|
||||
return ResponseEntity.ok(service.insert(refund));
|
||||
}
|
||||
|
||||
@ApiOperation("修改订单售后")
|
||||
@PreAuthorize("@ss.hasPermi('oms:refund:edit')")
|
||||
@Log(title = "订单售后", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public ResponseEntity<Integer> edit(@RequestBody Refund refund) {
|
||||
return ResponseEntity.ok(service.update(refund));
|
||||
}
|
||||
|
||||
@ApiOperation("删除订单售后")
|
||||
@PreAuthorize("@ss.hasPermi('oms:refund:remove')")
|
||||
@Log(title = "订单售后", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{id}")
|
||||
public ResponseEntity<Integer> remove(@PathVariable Long id) {
|
||||
return ResponseEntity.ok(service.deleteById(id));
|
||||
}
|
||||
}
|
||||
@ -1,93 +0,0 @@
|
||||
package com.cyl.oms.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.data.domain.PageImpl;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.cyl.oms.convert.RefundItemConvert;
|
||||
import com.cyl.oms.domain.RefundItem;
|
||||
import com.cyl.oms.pojo.query.RefundItemQuery;
|
||||
import com.cyl.oms.service.RefundItemService;
|
||||
import com.cyl.oms.pojo.vo.RefundItemVO;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
/**
|
||||
* 订单售后Controller
|
||||
*
|
||||
* @author zcc
|
||||
* @date 2022-12-01
|
||||
*/
|
||||
@Api(description ="订单售后接口列表")
|
||||
@RestController
|
||||
@RequestMapping("/oms/refundItem")
|
||||
public class RefundItemController extends BaseController {
|
||||
@Autowired
|
||||
private RefundItemService service;
|
||||
@Autowired
|
||||
private RefundItemConvert convert;
|
||||
|
||||
@ApiOperation("查询订单售后列表")
|
||||
@PreAuthorize("@ss.hasPermi('oms:refundItem:list')")
|
||||
@PostMapping("/list")
|
||||
public ResponseEntity<Page<RefundItem>> list(@RequestBody RefundItemQuery query, Pageable page) {
|
||||
List<RefundItem> list = service.selectList(query, page);
|
||||
return ResponseEntity.ok(new PageImpl<>(list, page, ((com.github.pagehelper.Page)list).getTotal()));
|
||||
}
|
||||
|
||||
@ApiOperation("导出订单售后列表")
|
||||
@PreAuthorize("@ss.hasPermi('oms:refundItem:export')")
|
||||
@Log(title = "订单售后", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public ResponseEntity<String> export(RefundItemQuery query) {
|
||||
List<RefundItem> list = service.selectList(query, null);
|
||||
ExcelUtil<RefundItemVO> util = new ExcelUtil<>(RefundItemVO.class);
|
||||
return ResponseEntity.ok(util.writeExcel(convert.dos2vos(list), "订单售后数据"));
|
||||
}
|
||||
|
||||
@ApiOperation("获取订单售后详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('oms:refundItem:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public ResponseEntity<RefundItem> getInfo(@PathVariable("id") Long id) {
|
||||
return ResponseEntity.ok(service.selectById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("新增订单售后")
|
||||
@PreAuthorize("@ss.hasPermi('oms:refundItem:add')")
|
||||
@Log(title = "订单售后", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public ResponseEntity<Integer> add(@RequestBody RefundItem refundItem) {
|
||||
return ResponseEntity.ok(service.insert(refundItem));
|
||||
}
|
||||
|
||||
@ApiOperation("修改订单售后")
|
||||
@PreAuthorize("@ss.hasPermi('oms:refundItem:edit')")
|
||||
@Log(title = "订单售后", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public ResponseEntity<Integer> edit(@RequestBody RefundItem refundItem) {
|
||||
return ResponseEntity.ok(service.update(refundItem));
|
||||
}
|
||||
|
||||
@ApiOperation("删除订单售后")
|
||||
@PreAuthorize("@ss.hasPermi('oms:refundItem:remove')")
|
||||
@Log(title = "订单售后", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{id}")
|
||||
public ResponseEntity<Integer> remove(@PathVariable Long id) {
|
||||
return ResponseEntity.ok(service.deleteById(id));
|
||||
}
|
||||
}
|
||||
@ -1,16 +0,0 @@
|
||||
package com.cyl.oms.convert;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import com.cyl.oms.domain.Refund;
|
||||
import com.cyl.oms.pojo.vo.RefundVO;
|
||||
import java.util.List;
|
||||
/**
|
||||
* 订单售后 DO <=> DTO <=> VO / BO / Query
|
||||
*
|
||||
* @author zcc
|
||||
*/
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface RefundConvert {
|
||||
|
||||
List<RefundVO> dos2vos(List<Refund> list);
|
||||
}
|
||||
@ -1,16 +0,0 @@
|
||||
package com.cyl.oms.convert;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import com.cyl.oms.domain.RefundItem;
|
||||
import com.cyl.oms.pojo.vo.RefundItemVO;
|
||||
import java.util.List;
|
||||
/**
|
||||
* 订单售后 DO <=> DTO <=> VO / BO / Query
|
||||
*
|
||||
* @author zcc
|
||||
*/
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface RefundItemConvert {
|
||||
|
||||
List<RefundItemVO> dos2vos(List<RefundItem> list);
|
||||
}
|
||||
@ -1,44 +0,0 @@
|
||||
package com.cyl.oms.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.ruoyi.common.core.domain.BaseAudit;
|
||||
import lombok.Data;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
/**
|
||||
* 订单售后对象 oms_refund_item
|
||||
*
|
||||
* @author zcc
|
||||
*/
|
||||
@ApiModel(description="订单售后对象")
|
||||
@Data
|
||||
@TableName("oms_refund_item")
|
||||
public class RefundItem extends BaseAudit {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("MEMBER_ID")
|
||||
@Excel(name = "MEMBER_ID")
|
||||
private Long memberId;
|
||||
|
||||
@ApiModelProperty("订单id")
|
||||
@Excel(name = "订单id")
|
||||
private Long orderId;
|
||||
|
||||
@ApiModelProperty("子订单id")
|
||||
@Excel(name = "子订单id")
|
||||
private Long orderItemId;
|
||||
|
||||
@ApiModelProperty("退款金额")
|
||||
@Excel(name = "退款金额")
|
||||
private BigDecimal returnAmount;
|
||||
|
||||
@ApiModelProperty("退货数量")
|
||||
@Excel(name = "退货数量")
|
||||
private Integer quantity;
|
||||
|
||||
}
|
||||
@ -1,21 +0,0 @@
|
||||
package com.cyl.oms.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.cyl.oms.domain.RefundItem;
|
||||
|
||||
/**
|
||||
* 订单售后Mapper接口
|
||||
*
|
||||
* @author zcc
|
||||
*/
|
||||
public interface RefundItemMapper extends BaseMapper<RefundItem> {
|
||||
/**
|
||||
* 查询订单售后列表
|
||||
*
|
||||
* @param refundItem 订单售后
|
||||
* @return 订单售后集合
|
||||
*/
|
||||
List<RefundItem> selectByEntity(RefundItem refundItem);
|
||||
}
|
||||
@ -1,21 +0,0 @@
|
||||
package com.cyl.oms.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.cyl.oms.domain.Refund;
|
||||
|
||||
/**
|
||||
* 订单售后Mapper接口
|
||||
*
|
||||
* @author zcc
|
||||
*/
|
||||
public interface RefundMapper extends BaseMapper<Refund> {
|
||||
/**
|
||||
* 查询订单售后列表
|
||||
*
|
||||
* @param refund 订单售后
|
||||
* @return 订单售后集合
|
||||
*/
|
||||
List<Refund> selectByEntity(Refund refund);
|
||||
}
|
||||
@ -1,31 +0,0 @@
|
||||
package com.cyl.oms.pojo.query;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* 订单售后 查询 对象
|
||||
*
|
||||
* @author zcc
|
||||
*/
|
||||
@ApiModel(description="订单售后 查询 对象")
|
||||
@Data
|
||||
public class RefundItemQuery {
|
||||
@ApiModelProperty("MEMBER_ID 精确匹配")
|
||||
private Long memberId;
|
||||
|
||||
@ApiModelProperty("订单id 精确匹配")
|
||||
private Long orderId;
|
||||
|
||||
@ApiModelProperty("子订单id 精确匹配")
|
||||
private Long orderItemId;
|
||||
|
||||
@ApiModelProperty("退款金额 精确匹配")
|
||||
private BigDecimal returnAmount;
|
||||
|
||||
@ApiModelProperty("退货数量 精确匹配")
|
||||
private Integer quantity;
|
||||
|
||||
}
|
||||
@ -1,32 +0,0 @@
|
||||
package com.cyl.oms.pojo.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.core.domain.BaseAudit;
|
||||
import lombok.Data;
|
||||
/**
|
||||
* 订单售后 数据视图对象
|
||||
*
|
||||
* @author zcc
|
||||
*/
|
||||
@Data
|
||||
public class RefundItemVO extends BaseAudit {
|
||||
/** ID */
|
||||
private Long id;
|
||||
/** MEMBER_ID */
|
||||
@Excel(name = "MEMBER_ID")
|
||||
private Long memberId;
|
||||
/** 订单id */
|
||||
@Excel(name = "订单id")
|
||||
private Long orderId;
|
||||
/** 子订单id */
|
||||
@Excel(name = "子订单id")
|
||||
private Long orderItemId;
|
||||
/** 退款金额 */
|
||||
@Excel(name = "退款金额")
|
||||
private BigDecimal returnAmount;
|
||||
/** 退货数量 */
|
||||
@Excel(name = "退货数量")
|
||||
private Integer quantity;
|
||||
}
|
||||
@ -1,103 +0,0 @@
|
||||
package com.cyl.oms.service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.cyl.oms.mapper.RefundItemMapper;
|
||||
import com.cyl.oms.domain.RefundItem;
|
||||
import com.cyl.oms.pojo.query.RefundItemQuery;
|
||||
|
||||
/**
|
||||
* 订单售后Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author zcc
|
||||
*/
|
||||
@Service
|
||||
public class RefundItemService {
|
||||
@Autowired
|
||||
private RefundItemMapper refundItemMapper;
|
||||
|
||||
/**
|
||||
* 查询订单售后
|
||||
*
|
||||
* @param id 订单售后主键
|
||||
* @return 订单售后
|
||||
*/
|
||||
public RefundItem selectById(Long id) {
|
||||
return refundItemMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单售后列表
|
||||
*
|
||||
* @param query 查询条件
|
||||
* @param page 分页条件
|
||||
* @return 订单售后
|
||||
*/
|
||||
public List<RefundItem> selectList(RefundItemQuery query, Pageable page) {
|
||||
if (page != null) {
|
||||
PageHelper.startPage(page.getPageNumber() + 1, page.getPageSize());
|
||||
}
|
||||
QueryWrapper<RefundItem> qw = new QueryWrapper<>();
|
||||
Long memberId = query.getMemberId();
|
||||
if (memberId != null) {
|
||||
qw.eq("member_id", memberId);
|
||||
}
|
||||
Long orderId = query.getOrderId();
|
||||
if (orderId != null) {
|
||||
qw.eq("order_id", orderId);
|
||||
}
|
||||
Long orderItemId = query.getOrderItemId();
|
||||
if (orderItemId != null) {
|
||||
qw.eq("order_item_id", orderItemId);
|
||||
}
|
||||
BigDecimal returnAmount = query.getReturnAmount();
|
||||
if (returnAmount != null) {
|
||||
qw.eq("return_amount", returnAmount);
|
||||
}
|
||||
Integer quantity = query.getQuantity();
|
||||
if (quantity != null) {
|
||||
qw.eq("quantity", quantity);
|
||||
}
|
||||
return refundItemMapper.selectList(qw);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单售后
|
||||
*
|
||||
* @param refundItem 订单售后
|
||||
* @return 结果
|
||||
*/
|
||||
public int insert(RefundItem refundItem) {
|
||||
refundItem.setCreateTime(LocalDateTime.now());
|
||||
return refundItemMapper.insert(refundItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单售后
|
||||
*
|
||||
* @param refundItem 订单售后
|
||||
* @return 结果
|
||||
*/
|
||||
public int update(RefundItem refundItem) {
|
||||
return refundItemMapper.updateById(refundItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单售后信息
|
||||
*
|
||||
* @param id 订单售后主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteById(Long id) {
|
||||
return refundItemMapper.deleteById(id);
|
||||
}
|
||||
}
|
||||
@ -1,132 +0,0 @@
|
||||
package com.cyl.oms.service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.cyl.oms.mapper.RefundMapper;
|
||||
import com.cyl.oms.domain.Refund;
|
||||
import com.cyl.oms.pojo.query.RefundQuery;
|
||||
|
||||
/**
|
||||
* 订单售后Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author zcc
|
||||
*/
|
||||
@Service
|
||||
public class RefundService {
|
||||
@Autowired
|
||||
private RefundMapper refundMapper;
|
||||
|
||||
/**
|
||||
* 查询订单售后
|
||||
*
|
||||
* @param id 订单售后主键
|
||||
* @return 订单售后
|
||||
*/
|
||||
public Refund selectById(Long id) {
|
||||
return refundMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单售后列表
|
||||
*
|
||||
* @param query 查询条件
|
||||
* @param page 分页条件
|
||||
* @return 订单售后
|
||||
*/
|
||||
public List<Refund> selectList(RefundQuery query, Pageable page) {
|
||||
if (page != null) {
|
||||
PageHelper.startPage(page.getPageNumber() + 1, page.getPageSize());
|
||||
}
|
||||
QueryWrapper<Refund> qw = new QueryWrapper<>();
|
||||
Long memberId = query.getMemberId();
|
||||
if (memberId != null) {
|
||||
qw.eq("member_id", memberId);
|
||||
}
|
||||
Long orderId = query.getOrderId();
|
||||
if (orderId != null) {
|
||||
qw.eq("order_id", orderId);
|
||||
}
|
||||
BigDecimal returnAmount = query.getReturnAmount();
|
||||
if (returnAmount != null) {
|
||||
qw.eq("return_amount", returnAmount);
|
||||
}
|
||||
Integer type = query.getType();
|
||||
if (type != null) {
|
||||
qw.eq("type", type);
|
||||
}
|
||||
Integer status = query.getStatus();
|
||||
if (status != null) {
|
||||
qw.eq("status", status);
|
||||
}
|
||||
LocalDateTime handleTime = query.getHandleTime();
|
||||
if (handleTime != null) {
|
||||
qw.eq("handle_time", handleTime);
|
||||
}
|
||||
Integer quantity = query.getQuantity();
|
||||
if (quantity != null) {
|
||||
qw.eq("quantity", quantity);
|
||||
}
|
||||
String reason = query.getReason();
|
||||
if (!StringUtils.isEmpty(reason)) {
|
||||
qw.eq("reason", reason);
|
||||
}
|
||||
String description = query.getDescription();
|
||||
if (!StringUtils.isEmpty(description)) {
|
||||
qw.eq("description", description);
|
||||
}
|
||||
String proofPics = query.getProofPics();
|
||||
if (!StringUtils.isEmpty(proofPics)) {
|
||||
qw.eq("proof_pics", proofPics);
|
||||
}
|
||||
String handleNote = query.getHandleNote();
|
||||
if (!StringUtils.isEmpty(handleNote)) {
|
||||
qw.eq("handle_note", handleNote);
|
||||
}
|
||||
String handleMan = query.getHandleMan();
|
||||
if (!StringUtils.isEmpty(handleMan)) {
|
||||
qw.eq("handle_man", handleMan);
|
||||
}
|
||||
return refundMapper.selectList(qw);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单售后
|
||||
*
|
||||
* @param refund 订单售后
|
||||
* @return 结果
|
||||
*/
|
||||
public int insert(Refund refund) {
|
||||
refund.setCreateTime(LocalDateTime.now());
|
||||
return refundMapper.insert(refund);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单售后
|
||||
*
|
||||
* @param refund 订单售后
|
||||
* @return 结果
|
||||
*/
|
||||
public int update(Refund refund) {
|
||||
return refundMapper.updateById(refund);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单售后信息
|
||||
*
|
||||
* @param id 订单售后主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteById(Long id) {
|
||||
return refundMapper.deleteById(id);
|
||||
}
|
||||
}
|
||||
@ -1,38 +0,0 @@
|
||||
<?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.cyl.oms.mapper.RefundItemMapper">
|
||||
|
||||
<resultMap type="RefundItem" id="RefundItemResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="memberId" column="member_id"/>
|
||||
<result property="orderId" column="order_id"/>
|
||||
<result property="orderItemId" column="order_item_id"/>
|
||||
<result property="returnAmount" column="return_amount"/>
|
||||
<result property="quantity" column="quantity"/>
|
||||
<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="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRefundItemVo">
|
||||
select id, member_id, order_id, order_item_id, return_amount, quantity, create_by, create_time, update_by, update_time from oms_refund_item
|
||||
</sql>
|
||||
|
||||
<select id="selectByEntity" parameterType="RefundItem" resultMap="RefundItemResult">
|
||||
<include refid="selectRefundItemVo"/>
|
||||
<where>
|
||||
<if test="memberId != null "> and member_id = #{memberId}</if>
|
||||
<if test="orderId != null "> and order_id = #{orderId}</if>
|
||||
<if test="orderItemId != null "> and order_item_id = #{orderItemId}</if>
|
||||
<if test="returnAmount != null "> and return_amount = #{returnAmount}</if>
|
||||
<if test="quantity != null "> and quantity = #{quantity}</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@ -1,52 +0,0 @@
|
||||
<?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.cyl.oms.mapper.RefundMapper">
|
||||
|
||||
<resultMap type="Refund" id="RefundResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="memberId" column="member_id"/>
|
||||
<result property="orderId" column="order_id"/>
|
||||
<result property="returnAmount" column="return_amount"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="handleTime" column="handle_time"/>
|
||||
<result property="quantity" column="quantity"/>
|
||||
<result property="reason" column="reason"/>
|
||||
<result property="description" column="description"/>
|
||||
<result property="proofPics" column="proof_pics"/>
|
||||
<result property="handleNote" column="handle_note"/>
|
||||
<result property="handleMan" column="handle_man"/>
|
||||
<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="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRefundVo">
|
||||
select id, member_id, order_id, return_amount, type, status, handle_time, quantity, reason, description, proof_pics, handle_note, handle_man, create_by, create_time, update_by, update_time from oms_refund
|
||||
</sql>
|
||||
|
||||
<select id="selectByEntity" parameterType="Refund" resultMap="RefundResult">
|
||||
<include refid="selectRefundVo"/>
|
||||
<where>
|
||||
<if test="memberId != null "> and member_id = #{memberId}</if>
|
||||
<if test="orderId != null "> and order_id = #{orderId}</if>
|
||||
<if test="returnAmount != null "> and return_amount = #{returnAmount}</if>
|
||||
<if test="type != null "> and type = #{type}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="handleTime != null "> and handle_time = #{handleTime}</if>
|
||||
<if test="quantity != null "> and quantity = #{quantity}</if>
|
||||
<if test="reason != null and reason != ''"> and reason = #{reason}</if>
|
||||
<if test="description != null and description != ''"> and description = #{description}</if>
|
||||
<if test="proofPics != null and proofPics != ''"> and proof_pics = #{proofPics}</if>
|
||||
<if test="handleNote != null and handleNote != ''"> and handle_note = #{handleNote}</if>
|
||||
<if test="handleMan != null and handleMan != ''"> and handle_man = #{handleMan}</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@ -1,22 +0,0 @@
|
||||
-- 菜单 SQL
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('订单售后', '3', '1', 'refund', 'oms/refund/index', 1, 0, 'C', '0', '0', 'oms:refund:list', '#', 1, sysdate(), '', null, '订单售后菜单');
|
||||
|
||||
-- 按钮父菜单ID
|
||||
SELECT @parentId := LAST_INSERT_ID();
|
||||
|
||||
-- 按钮 SQL
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('订单售后查询', @parentId, '1', '#', '', 1, 0, 'F', '0', '0', 'oms:refund:query', '#', 1, sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('订单售后新增', @parentId, '2', '#', '', 1, 0, 'F', '0', '0', 'oms:refund:add', '#', 1, sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('订单售后修改', @parentId, '3', '#', '', 1, 0, 'F', '0', '0', 'oms:refund:edit', '#', 1, sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('订单售后删除', @parentId, '4', '#', '', 1, 0, 'F', '0', '0', 'oms:refund:remove', '#', 1, sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('订单售后导出', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', 'oms:refund:export', '#', 1, sysdate(), '', null, '');
|
||||
@ -1,22 +0,0 @@
|
||||
-- 菜单 SQL
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('订单售后', '3', '1', 'refundItem', 'oms/refundItem/index', 1, 0, 'C', '0', '0', 'oms:refundItem:list', '#', 1, sysdate(), '', null, '订单售后菜单');
|
||||
|
||||
-- 按钮父菜单ID
|
||||
SELECT @parentId := LAST_INSERT_ID();
|
||||
|
||||
-- 按钮 SQL
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('订单售后查询', @parentId, '1', '#', '', 1, 0, 'F', '0', '0', 'oms:refundItem:query', '#', 1, sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('订单售后新增', @parentId, '2', '#', '', 1, 0, 'F', '0', '0', 'oms:refundItem:add', '#', 1, sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('订单售后修改', @parentId, '3', '#', '', 1, 0, 'F', '0', '0', 'oms:refundItem:edit', '#', 1, sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('订单售后删除', @parentId, '4', '#', '', 1, 0, 'F', '0', '0', 'oms:refundItem:remove', '#', 1, sysdate(), '', null, '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('订单售后导出', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', 'oms:refundItem:export', '#', 1, sysdate(), '', null, '');
|
||||
Loading…
Reference in new issue