parent
cb077c8161
commit
99782a3bf9
@ -0,0 +1,93 @@
|
||||
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.OrderConvert;
|
||||
import com.cyl.oms.domain.Order;
|
||||
import com.cyl.oms.pojo.query.OrderQuery;
|
||||
import com.cyl.oms.service.OrderService;
|
||||
import com.cyl.oms.pojo.vo.OrderVO;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
/**
|
||||
* 订单表Controller
|
||||
*
|
||||
* @author zcc
|
||||
* @date 2022-12-01
|
||||
*/
|
||||
@Api(description ="订单表接口列表")
|
||||
@RestController
|
||||
@RequestMapping("/oms/order")
|
||||
public class OrderController extends BaseController {
|
||||
@Autowired
|
||||
private OrderService service;
|
||||
@Autowired
|
||||
private OrderConvert convert;
|
||||
|
||||
@ApiOperation("查询订单表列表")
|
||||
@PreAuthorize("@ss.hasPermi('oms:order:list')")
|
||||
@PostMapping("/list")
|
||||
public ResponseEntity<Page<Order>> list(@RequestBody OrderQuery query, Pageable page) {
|
||||
List<Order> list = service.selectList(query, page);
|
||||
return ResponseEntity.ok(new PageImpl<>(list, page, ((com.github.pagehelper.Page)list).getTotal()));
|
||||
}
|
||||
|
||||
@ApiOperation("导出订单表列表")
|
||||
@PreAuthorize("@ss.hasPermi('oms:order:export')")
|
||||
@Log(title = "订单表", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public ResponseEntity<String> export(OrderQuery query) {
|
||||
List<Order> list = service.selectList(query, null);
|
||||
ExcelUtil<OrderVO> util = new ExcelUtil<>(OrderVO.class);
|
||||
return ResponseEntity.ok(util.writeExcel(convert.dos2vos(list), "订单表数据"));
|
||||
}
|
||||
|
||||
@ApiOperation("获取订单表详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('oms:order:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public ResponseEntity<Order> getInfo(@PathVariable("id") Long id) {
|
||||
return ResponseEntity.ok(service.selectById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("新增订单表")
|
||||
@PreAuthorize("@ss.hasPermi('oms:order:add')")
|
||||
@Log(title = "订单表", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public ResponseEntity<Integer> add(@RequestBody Order order) {
|
||||
return ResponseEntity.ok(service.insert(order));
|
||||
}
|
||||
|
||||
@ApiOperation("修改订单表")
|
||||
@PreAuthorize("@ss.hasPermi('oms:order:edit')")
|
||||
@Log(title = "订单表", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public ResponseEntity<Integer> edit(@RequestBody Order order) {
|
||||
return ResponseEntity.ok(service.update(order));
|
||||
}
|
||||
|
||||
@ApiOperation("删除订单表")
|
||||
@PreAuthorize("@ss.hasPermi('oms:order:remove')")
|
||||
@Log(title = "订单表", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{id}")
|
||||
public ResponseEntity<Integer> remove(@PathVariable Long id) {
|
||||
return ResponseEntity.ok(service.deleteById(id));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,93 @@
|
||||
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.OrderDeliveryHistoryConvert;
|
||||
import com.cyl.oms.domain.OrderDeliveryHistory;
|
||||
import com.cyl.oms.pojo.query.OrderDeliveryHistoryQuery;
|
||||
import com.cyl.oms.service.OrderDeliveryHistoryService;
|
||||
import com.cyl.oms.pojo.vo.OrderDeliveryHistoryVO;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
/**
|
||||
* 订单发货记录Controller
|
||||
*
|
||||
* @author zcc
|
||||
* @date 2022-12-01
|
||||
*/
|
||||
@Api(description ="订单发货记录接口列表")
|
||||
@RestController
|
||||
@RequestMapping("/oms/orderDeliveryHistory")
|
||||
public class OrderDeliveryHistoryController extends BaseController {
|
||||
@Autowired
|
||||
private OrderDeliveryHistoryService service;
|
||||
@Autowired
|
||||
private OrderDeliveryHistoryConvert convert;
|
||||
|
||||
@ApiOperation("查询订单发货记录列表")
|
||||
@PreAuthorize("@ss.hasPermi('oms:orderDeliveryHistory:list')")
|
||||
@PostMapping("/list")
|
||||
public ResponseEntity<Page<OrderDeliveryHistory>> list(@RequestBody OrderDeliveryHistoryQuery query, Pageable page) {
|
||||
List<OrderDeliveryHistory> list = service.selectList(query, page);
|
||||
return ResponseEntity.ok(new PageImpl<>(list, page, ((com.github.pagehelper.Page)list).getTotal()));
|
||||
}
|
||||
|
||||
@ApiOperation("导出订单发货记录列表")
|
||||
@PreAuthorize("@ss.hasPermi('oms:orderDeliveryHistory:export')")
|
||||
@Log(title = "订单发货记录", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public ResponseEntity<String> export(OrderDeliveryHistoryQuery query) {
|
||||
List<OrderDeliveryHistory> list = service.selectList(query, null);
|
||||
ExcelUtil<OrderDeliveryHistoryVO> util = new ExcelUtil<>(OrderDeliveryHistoryVO.class);
|
||||
return ResponseEntity.ok(util.writeExcel(convert.dos2vos(list), "订单发货记录数据"));
|
||||
}
|
||||
|
||||
@ApiOperation("获取订单发货记录详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('oms:orderDeliveryHistory:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public ResponseEntity<OrderDeliveryHistory> getInfo(@PathVariable("id") Long id) {
|
||||
return ResponseEntity.ok(service.selectById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("新增订单发货记录")
|
||||
@PreAuthorize("@ss.hasPermi('oms:orderDeliveryHistory:add')")
|
||||
@Log(title = "订单发货记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public ResponseEntity<Integer> add(@RequestBody OrderDeliveryHistory orderDeliveryHistory) {
|
||||
return ResponseEntity.ok(service.insert(orderDeliveryHistory));
|
||||
}
|
||||
|
||||
@ApiOperation("修改订单发货记录")
|
||||
@PreAuthorize("@ss.hasPermi('oms:orderDeliveryHistory:edit')")
|
||||
@Log(title = "订单发货记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public ResponseEntity<Integer> edit(@RequestBody OrderDeliveryHistory orderDeliveryHistory) {
|
||||
return ResponseEntity.ok(service.update(orderDeliveryHistory));
|
||||
}
|
||||
|
||||
@ApiOperation("删除订单发货记录")
|
||||
@PreAuthorize("@ss.hasPermi('oms:orderDeliveryHistory:remove')")
|
||||
@Log(title = "订单发货记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{id}")
|
||||
public ResponseEntity<Integer> remove(@PathVariable Long id) {
|
||||
return ResponseEntity.ok(service.deleteById(id));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,93 @@
|
||||
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.OrderItemConvert;
|
||||
import com.cyl.oms.domain.OrderItem;
|
||||
import com.cyl.oms.pojo.query.OrderItemQuery;
|
||||
import com.cyl.oms.service.OrderItemService;
|
||||
import com.cyl.oms.pojo.vo.OrderItemVO;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
/**
|
||||
* 订单中所包含的商品Controller
|
||||
*
|
||||
* @author zcc
|
||||
* @date 2022-12-01
|
||||
*/
|
||||
@Api(description ="订单中所包含的商品接口列表")
|
||||
@RestController
|
||||
@RequestMapping("/oms/orderItem")
|
||||
public class OrderItemController extends BaseController {
|
||||
@Autowired
|
||||
private OrderItemService service;
|
||||
@Autowired
|
||||
private OrderItemConvert convert;
|
||||
|
||||
@ApiOperation("查询订单中所包含的商品列表")
|
||||
@PreAuthorize("@ss.hasPermi('oms:orderItem:list')")
|
||||
@PostMapping("/list")
|
||||
public ResponseEntity<Page<OrderItem>> list(@RequestBody OrderItemQuery query, Pageable page) {
|
||||
List<OrderItem> list = service.selectList(query, page);
|
||||
return ResponseEntity.ok(new PageImpl<>(list, page, ((com.github.pagehelper.Page)list).getTotal()));
|
||||
}
|
||||
|
||||
@ApiOperation("导出订单中所包含的商品列表")
|
||||
@PreAuthorize("@ss.hasPermi('oms:orderItem:export')")
|
||||
@Log(title = "订单中所包含的商品", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public ResponseEntity<String> export(OrderItemQuery query) {
|
||||
List<OrderItem> list = service.selectList(query, null);
|
||||
ExcelUtil<OrderItemVO> util = new ExcelUtil<>(OrderItemVO.class);
|
||||
return ResponseEntity.ok(util.writeExcel(convert.dos2vos(list), "订单中所包含的商品数据"));
|
||||
}
|
||||
|
||||
@ApiOperation("获取订单中所包含的商品详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('oms:orderItem:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public ResponseEntity<OrderItem> getInfo(@PathVariable("id") Long id) {
|
||||
return ResponseEntity.ok(service.selectById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("新增订单中所包含的商品")
|
||||
@PreAuthorize("@ss.hasPermi('oms:orderItem:add')")
|
||||
@Log(title = "订单中所包含的商品", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public ResponseEntity<Integer> add(@RequestBody OrderItem orderItem) {
|
||||
return ResponseEntity.ok(service.insert(orderItem));
|
||||
}
|
||||
|
||||
@ApiOperation("修改订单中所包含的商品")
|
||||
@PreAuthorize("@ss.hasPermi('oms:orderItem:edit')")
|
||||
@Log(title = "订单中所包含的商品", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public ResponseEntity<Integer> edit(@RequestBody OrderItem orderItem) {
|
||||
return ResponseEntity.ok(service.update(orderItem));
|
||||
}
|
||||
|
||||
@ApiOperation("删除订单中所包含的商品")
|
||||
@PreAuthorize("@ss.hasPermi('oms:orderItem:remove')")
|
||||
@Log(title = "订单中所包含的商品", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{id}")
|
||||
public ResponseEntity<Integer> remove(@PathVariable Long id) {
|
||||
return ResponseEntity.ok(service.deleteById(id));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,93 @@
|
||||
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.OrderOperateHistoryConvert;
|
||||
import com.cyl.oms.domain.OrderOperateHistory;
|
||||
import com.cyl.oms.pojo.query.OrderOperateHistoryQuery;
|
||||
import com.cyl.oms.service.OrderOperateHistoryService;
|
||||
import com.cyl.oms.pojo.vo.OrderOperateHistoryVO;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
/**
|
||||
* 订单操作历史记录Controller
|
||||
*
|
||||
* @author zcc
|
||||
* @date 2022-12-01
|
||||
*/
|
||||
@Api(description ="订单操作历史记录接口列表")
|
||||
@RestController
|
||||
@RequestMapping("/oms/orderOperateHistory")
|
||||
public class OrderOperateHistoryController extends BaseController {
|
||||
@Autowired
|
||||
private OrderOperateHistoryService service;
|
||||
@Autowired
|
||||
private OrderOperateHistoryConvert convert;
|
||||
|
||||
@ApiOperation("查询订单操作历史记录列表")
|
||||
@PreAuthorize("@ss.hasPermi('oms:orderOperateHistory:list')")
|
||||
@PostMapping("/list")
|
||||
public ResponseEntity<Page<OrderOperateHistory>> list(@RequestBody OrderOperateHistoryQuery query, Pageable page) {
|
||||
List<OrderOperateHistory> list = service.selectList(query, page);
|
||||
return ResponseEntity.ok(new PageImpl<>(list, page, ((com.github.pagehelper.Page)list).getTotal()));
|
||||
}
|
||||
|
||||
@ApiOperation("导出订单操作历史记录列表")
|
||||
@PreAuthorize("@ss.hasPermi('oms:orderOperateHistory:export')")
|
||||
@Log(title = "订单操作历史记录", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public ResponseEntity<String> export(OrderOperateHistoryQuery query) {
|
||||
List<OrderOperateHistory> list = service.selectList(query, null);
|
||||
ExcelUtil<OrderOperateHistoryVO> util = new ExcelUtil<>(OrderOperateHistoryVO.class);
|
||||
return ResponseEntity.ok(util.writeExcel(convert.dos2vos(list), "订单操作历史记录数据"));
|
||||
}
|
||||
|
||||
@ApiOperation("获取订单操作历史记录详细信息")
|
||||
@PreAuthorize("@ss.hasPermi('oms:orderOperateHistory:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public ResponseEntity<OrderOperateHistory> getInfo(@PathVariable("id") Long id) {
|
||||
return ResponseEntity.ok(service.selectById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("新增订单操作历史记录")
|
||||
@PreAuthorize("@ss.hasPermi('oms:orderOperateHistory:add')")
|
||||
@Log(title = "订单操作历史记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public ResponseEntity<Integer> add(@RequestBody OrderOperateHistory orderOperateHistory) {
|
||||
return ResponseEntity.ok(service.insert(orderOperateHistory));
|
||||
}
|
||||
|
||||
@ApiOperation("修改订单操作历史记录")
|
||||
@PreAuthorize("@ss.hasPermi('oms:orderOperateHistory:edit')")
|
||||
@Log(title = "订单操作历史记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public ResponseEntity<Integer> edit(@RequestBody OrderOperateHistory orderOperateHistory) {
|
||||
return ResponseEntity.ok(service.update(orderOperateHistory));
|
||||
}
|
||||
|
||||
@ApiOperation("删除订单操作历史记录")
|
||||
@PreAuthorize("@ss.hasPermi('oms:orderOperateHistory:remove')")
|
||||
@Log(title = "订单操作历史记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{id}")
|
||||
public ResponseEntity<Integer> remove(@PathVariable Long id) {
|
||||
return ResponseEntity.ok(service.deleteById(id));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,93 @@
|
||||
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));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,93 @@
|
||||
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));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package com.cyl.oms.convert;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import com.cyl.oms.domain.Order;
|
||||
import com.cyl.oms.pojo.vo.OrderVO;
|
||||
import java.util.List;
|
||||
/**
|
||||
* 订单表 DO <=> DTO <=> VO / BO / Query
|
||||
*
|
||||
* @author zcc
|
||||
*/
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface OrderConvert {
|
||||
|
||||
List<OrderVO> dos2vos(List<Order> list);
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package com.cyl.oms.convert;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import com.cyl.oms.domain.OrderDeliveryHistory;
|
||||
import com.cyl.oms.pojo.vo.OrderDeliveryHistoryVO;
|
||||
import java.util.List;
|
||||
/**
|
||||
* 订单发货记录 DO <=> DTO <=> VO / BO / Query
|
||||
*
|
||||
* @author zcc
|
||||
*/
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface OrderDeliveryHistoryConvert {
|
||||
|
||||
List<OrderDeliveryHistoryVO> dos2vos(List<OrderDeliveryHistory> list);
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package com.cyl.oms.convert;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import com.cyl.oms.domain.OrderItem;
|
||||
import com.cyl.oms.pojo.vo.OrderItemVO;
|
||||
import java.util.List;
|
||||
/**
|
||||
* 订单中所包含的商品 DO <=> DTO <=> VO / BO / Query
|
||||
*
|
||||
* @author zcc
|
||||
*/
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface OrderItemConvert {
|
||||
|
||||
List<OrderItemVO> dos2vos(List<OrderItem> list);
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
package com.cyl.oms.convert;
|
||||
|
||||
import org.mapstruct.Mapper;
|
||||
import com.cyl.oms.domain.OrderOperateHistory;
|
||||
import com.cyl.oms.pojo.vo.OrderOperateHistoryVO;
|
||||
import java.util.List;
|
||||
/**
|
||||
* 订单操作历史记录 DO <=> DTO <=> VO / BO / Query
|
||||
*
|
||||
* @author zcc
|
||||
*/
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface OrderOperateHistoryConvert {
|
||||
|
||||
List<OrderOperateHistoryVO> dos2vos(List<OrderOperateHistory> list);
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
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);
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
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);
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
package com.cyl.oms.domain;
|
||||
|
||||
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_order_delivery_history
|
||||
*
|
||||
* @author zcc
|
||||
*/
|
||||
@ApiModel(description="订单发货记录对象")
|
||||
@Data
|
||||
@TableName("oms_order_delivery_history")
|
||||
public class OrderDeliveryHistory extends BaseAudit {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("订单id")
|
||||
@Excel(name = "订单id")
|
||||
private Long orderId;
|
||||
|
||||
@ApiModelProperty("物流公司(配送方式)")
|
||||
@Excel(name = "物流公司(配送方式)")
|
||||
private String deliveryCompany;
|
||||
|
||||
@ApiModelProperty("物流单号")
|
||||
@Excel(name = "物流单号")
|
||||
private String deliverySn;
|
||||
|
||||
}
|
||||
@ -0,0 +1,80 @@
|
||||
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_order_item
|
||||
*
|
||||
* @author zcc
|
||||
*/
|
||||
@ApiModel(description="订单中所包含的商品对象")
|
||||
@Data
|
||||
@TableName("oms_order_item")
|
||||
public class OrderItem extends BaseAudit {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("订单id")
|
||||
@Excel(name = "订单id")
|
||||
private Long orderId;
|
||||
|
||||
@ApiModelProperty("PRODUCT_ID")
|
||||
@Excel(name = "PRODUCT_ID")
|
||||
private Long productId;
|
||||
|
||||
@ApiModelProperty("商品编码")
|
||||
@Excel(name = "商品编码")
|
||||
private String outProductId;
|
||||
|
||||
@ApiModelProperty("商品sku id")
|
||||
@Excel(name = "商品sku id")
|
||||
private Long skuId;
|
||||
|
||||
@ApiModelProperty("sku编码")
|
||||
@Excel(name = "sku编码")
|
||||
private String outSkuId;
|
||||
|
||||
@ApiModelProperty("商品快照id")
|
||||
@Excel(name = "商品快照id")
|
||||
private Long productSnapshotId;
|
||||
|
||||
@ApiModelProperty("sku快照id")
|
||||
@Excel(name = "sku快照id")
|
||||
private Long skuSnapshotId;
|
||||
|
||||
@ApiModelProperty("展示图片")
|
||||
@Excel(name = "展示图片")
|
||||
private String pic;
|
||||
|
||||
@ApiModelProperty("PRODUCT_NAME")
|
||||
@Excel(name = "PRODUCT_NAME")
|
||||
private String productName;
|
||||
|
||||
@ApiModelProperty("销售价格")
|
||||
@Excel(name = "销售价格")
|
||||
private BigDecimal salePrice;
|
||||
|
||||
@ApiModelProperty("采购价")
|
||||
@Excel(name = "采购价")
|
||||
private BigDecimal purchasePrice;
|
||||
|
||||
@ApiModelProperty("购买数量")
|
||||
@Excel(name = "购买数量")
|
||||
private Integer quantity;
|
||||
|
||||
@ApiModelProperty("商品分类id")
|
||||
@Excel(name = "商品分类id")
|
||||
private Long productCategoryId;
|
||||
|
||||
@ApiModelProperty("商品sku属性:[{"key":"颜色","value":"颜色"},{"key":"容量","value":"4G"}]")
|
||||
@Excel(name = "商品sku属性:[{"key":"颜色","value":"颜色"},{"key":"容量","value":"4G"}]")
|
||||
private String spData;
|
||||
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
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;
|
||||
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
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.OrderDeliveryHistory;
|
||||
|
||||
/**
|
||||
* 订单发货记录Mapper接口
|
||||
*
|
||||
* @author zcc
|
||||
*/
|
||||
public interface OrderDeliveryHistoryMapper extends BaseMapper<OrderDeliveryHistory> {
|
||||
/**
|
||||
* 查询订单发货记录列表
|
||||
*
|
||||
* @param orderDeliveryHistory 订单发货记录
|
||||
* @return 订单发货记录集合
|
||||
*/
|
||||
List<OrderDeliveryHistory> selectByEntity(OrderDeliveryHistory orderDeliveryHistory);
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
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.OrderItem;
|
||||
|
||||
/**
|
||||
* 订单中所包含的商品Mapper接口
|
||||
*
|
||||
* @author zcc
|
||||
*/
|
||||
public interface OrderItemMapper extends BaseMapper<OrderItem> {
|
||||
/**
|
||||
* 查询订单中所包含的商品列表
|
||||
*
|
||||
* @param orderItem 订单中所包含的商品
|
||||
* @return 订单中所包含的商品集合
|
||||
*/
|
||||
List<OrderItem> selectByEntity(OrderItem orderItem);
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
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.Order;
|
||||
|
||||
/**
|
||||
* 订单表Mapper接口
|
||||
*
|
||||
* @author zcc
|
||||
*/
|
||||
public interface OrderMapper extends BaseMapper<Order> {
|
||||
/**
|
||||
* 查询订单表列表
|
||||
*
|
||||
* @param order 订单表
|
||||
* @return 订单表集合
|
||||
*/
|
||||
List<Order> selectByEntity(Order order);
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
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.OrderOperateHistory;
|
||||
|
||||
/**
|
||||
* 订单操作历史记录Mapper接口
|
||||
*
|
||||
* @author zcc
|
||||
*/
|
||||
public interface OrderOperateHistoryMapper extends BaseMapper<OrderOperateHistory> {
|
||||
/**
|
||||
* 查询订单操作历史记录列表
|
||||
*
|
||||
* @param orderOperateHistory 订单操作历史记录
|
||||
* @return 订单操作历史记录集合
|
||||
*/
|
||||
List<OrderOperateHistory> selectByEntity(OrderOperateHistory orderOperateHistory);
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
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);
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
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);
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.cyl.oms.pojo.query;
|
||||
|
||||
import lombok.Data;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* 订单发货记录 查询 对象
|
||||
*
|
||||
* @author zcc
|
||||
*/
|
||||
@ApiModel(description="订单发货记录 查询 对象")
|
||||
@Data
|
||||
public class OrderDeliveryHistoryQuery {
|
||||
@ApiModelProperty("订单id 精确匹配")
|
||||
private Long orderId;
|
||||
|
||||
@ApiModelProperty("物流公司 精确匹配")
|
||||
private String deliveryCompany;
|
||||
|
||||
@ApiModelProperty("物流单号 精确匹配")
|
||||
private String deliverySn;
|
||||
|
||||
}
|
||||
@ -0,0 +1,58 @@
|
||||
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 OrderItemQuery {
|
||||
@ApiModelProperty("订单id 精确匹配")
|
||||
private Long orderId;
|
||||
|
||||
@ApiModelProperty("PRODUCT_ID 精确匹配")
|
||||
private Long productId;
|
||||
|
||||
@ApiModelProperty("商品编码 精确匹配")
|
||||
private String outProductId;
|
||||
|
||||
@ApiModelProperty("商品sku id 精确匹配")
|
||||
private Long skuId;
|
||||
|
||||
@ApiModelProperty("sku编码 精确匹配")
|
||||
private String outSkuId;
|
||||
|
||||
@ApiModelProperty("商品快照id 精确匹配")
|
||||
private Long productSnapshotId;
|
||||
|
||||
@ApiModelProperty("sku快照id 精确匹配")
|
||||
private Long skuSnapshotId;
|
||||
|
||||
@ApiModelProperty("展示图片 精确匹配")
|
||||
private String pic;
|
||||
|
||||
@ApiModelProperty("PRODUCT_NAME 精确匹配")
|
||||
private String productNameLike;
|
||||
|
||||
@ApiModelProperty("销售价格 精确匹配")
|
||||
private BigDecimal salePrice;
|
||||
|
||||
@ApiModelProperty("采购价 精确匹配")
|
||||
private BigDecimal purchasePrice;
|
||||
|
||||
@ApiModelProperty("购买数量 精确匹配")
|
||||
private Integer quantity;
|
||||
|
||||
@ApiModelProperty("商品分类id 精确匹配")
|
||||
private Long productCategoryId;
|
||||
|
||||
@ApiModelProperty("商品sku属性:[{"key":"颜色","value":"颜色"},{"key":"容量","value":"4G"}] 精确匹配")
|
||||
private String spData;
|
||||
|
||||
}
|
||||
@ -0,0 +1,31 @@
|
||||
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;
|
||||
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package com.cyl.oms.pojo.vo;
|
||||
|
||||
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 OrderDeliveryHistoryVO extends BaseAudit {
|
||||
/** ID */
|
||||
private Long id;
|
||||
/** 订单id */
|
||||
@Excel(name = "订单id")
|
||||
private Long orderId;
|
||||
/** 物流公司(配送方式) */
|
||||
@Excel(name = "物流公司(配送方式)")
|
||||
private String deliveryCompany;
|
||||
/** 物流单号 */
|
||||
@Excel(name = "物流单号")
|
||||
private String deliverySn;
|
||||
}
|
||||
@ -0,0 +1,59 @@
|
||||
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 OrderItemVO extends BaseAudit {
|
||||
/** ID */
|
||||
private Long id;
|
||||
/** 订单id */
|
||||
@Excel(name = "订单id")
|
||||
private Long orderId;
|
||||
/** PRODUCT_ID */
|
||||
@Excel(name = "PRODUCT_ID")
|
||||
private Long productId;
|
||||
/** 商品编码 */
|
||||
@Excel(name = "商品编码")
|
||||
private String outProductId;
|
||||
/** 商品sku id */
|
||||
@Excel(name = "商品sku id")
|
||||
private Long skuId;
|
||||
/** sku编码 */
|
||||
@Excel(name = "sku编码")
|
||||
private String outSkuId;
|
||||
/** 商品快照id */
|
||||
@Excel(name = "商品快照id")
|
||||
private Long productSnapshotId;
|
||||
/** sku快照id */
|
||||
@Excel(name = "sku快照id")
|
||||
private Long skuSnapshotId;
|
||||
/** 展示图片 */
|
||||
@Excel(name = "展示图片")
|
||||
private String pic;
|
||||
/** PRODUCT_NAME */
|
||||
@Excel(name = "PRODUCT_NAME")
|
||||
private String productName;
|
||||
/** 销售价格 */
|
||||
@Excel(name = "销售价格")
|
||||
private BigDecimal salePrice;
|
||||
/** 采购价 */
|
||||
@Excel(name = "采购价")
|
||||
private BigDecimal purchasePrice;
|
||||
/** 购买数量 */
|
||||
@Excel(name = "购买数量")
|
||||
private Integer quantity;
|
||||
/** 商品分类id */
|
||||
@Excel(name = "商品分类id")
|
||||
private Long productCategoryId;
|
||||
/** 商品sku属性:[{"key":"颜色","value":"颜色"},{"key":"容量","value":"4G"}] */
|
||||
@Excel(name = "商品sku属性:[{"key":"颜色","value":"颜色"},{"key":"容量","value":"4G"}]")
|
||||
private String spData;
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
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;
|
||||
}
|
||||
@ -0,0 +1,94 @@
|
||||
package com.cyl.oms.service;
|
||||
|
||||
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.OrderDeliveryHistoryMapper;
|
||||
import com.cyl.oms.domain.OrderDeliveryHistory;
|
||||
import com.cyl.oms.pojo.query.OrderDeliveryHistoryQuery;
|
||||
|
||||
/**
|
||||
* 订单发货记录Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author zcc
|
||||
*/
|
||||
@Service
|
||||
public class OrderDeliveryHistoryService {
|
||||
@Autowired
|
||||
private OrderDeliveryHistoryMapper orderDeliveryHistoryMapper;
|
||||
|
||||
/**
|
||||
* 查询订单发货记录
|
||||
*
|
||||
* @param id 订单发货记录主键
|
||||
* @return 订单发货记录
|
||||
*/
|
||||
public OrderDeliveryHistory selectById(Long id) {
|
||||
return orderDeliveryHistoryMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单发货记录列表
|
||||
*
|
||||
* @param query 查询条件
|
||||
* @param page 分页条件
|
||||
* @return 订单发货记录
|
||||
*/
|
||||
public List<OrderDeliveryHistory> selectList(OrderDeliveryHistoryQuery query, Pageable page) {
|
||||
if (page != null) {
|
||||
PageHelper.startPage(page.getPageNumber() + 1, page.getPageSize());
|
||||
}
|
||||
QueryWrapper<OrderDeliveryHistory> qw = new QueryWrapper<>();
|
||||
Long orderId = query.getOrderId();
|
||||
if (orderId != null) {
|
||||
qw.eq("order_id", orderId);
|
||||
}
|
||||
String deliveryCompany = query.getDeliveryCompany();
|
||||
if (!StringUtils.isEmpty(deliveryCompany)) {
|
||||
qw.eq("delivery_company", deliveryCompany);
|
||||
}
|
||||
String deliverySn = query.getDeliverySn();
|
||||
if (!StringUtils.isEmpty(deliverySn)) {
|
||||
qw.eq("delivery_sn", deliverySn);
|
||||
}
|
||||
return orderDeliveryHistoryMapper.selectList(qw);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单发货记录
|
||||
*
|
||||
* @param orderDeliveryHistory 订单发货记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insert(OrderDeliveryHistory orderDeliveryHistory) {
|
||||
orderDeliveryHistory.setCreateTime(LocalDateTime.now());
|
||||
return orderDeliveryHistoryMapper.insert(orderDeliveryHistory);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单发货记录
|
||||
*
|
||||
* @param orderDeliveryHistory 订单发货记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int update(OrderDeliveryHistory orderDeliveryHistory) {
|
||||
return orderDeliveryHistoryMapper.updateById(orderDeliveryHistory);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单发货记录信息
|
||||
*
|
||||
* @param id 订单发货记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteById(Long id) {
|
||||
return orderDeliveryHistoryMapper.deleteById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,139 @@
|
||||
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.OrderItemMapper;
|
||||
import com.cyl.oms.domain.OrderItem;
|
||||
import com.cyl.oms.pojo.query.OrderItemQuery;
|
||||
|
||||
/**
|
||||
* 订单中所包含的商品Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author zcc
|
||||
*/
|
||||
@Service
|
||||
public class OrderItemService {
|
||||
@Autowired
|
||||
private OrderItemMapper orderItemMapper;
|
||||
|
||||
/**
|
||||
* 查询订单中所包含的商品
|
||||
*
|
||||
* @param id 订单中所包含的商品主键
|
||||
* @return 订单中所包含的商品
|
||||
*/
|
||||
public OrderItem selectById(Long id) {
|
||||
return orderItemMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单中所包含的商品列表
|
||||
*
|
||||
* @param query 查询条件
|
||||
* @param page 分页条件
|
||||
* @return 订单中所包含的商品
|
||||
*/
|
||||
public List<OrderItem> selectList(OrderItemQuery query, Pageable page) {
|
||||
if (page != null) {
|
||||
PageHelper.startPage(page.getPageNumber() + 1, page.getPageSize());
|
||||
}
|
||||
QueryWrapper<OrderItem> qw = new QueryWrapper<>();
|
||||
Long orderId = query.getOrderId();
|
||||
if (orderId != null) {
|
||||
qw.eq("order_id", orderId);
|
||||
}
|
||||
Long productId = query.getProductId();
|
||||
if (productId != null) {
|
||||
qw.eq("product_id", productId);
|
||||
}
|
||||
String outProductId = query.getOutProductId();
|
||||
if (!StringUtils.isEmpty(outProductId)) {
|
||||
qw.eq("out_product_id", outProductId);
|
||||
}
|
||||
Long skuId = query.getSkuId();
|
||||
if (skuId != null) {
|
||||
qw.eq("sku_id", skuId);
|
||||
}
|
||||
String outSkuId = query.getOutSkuId();
|
||||
if (!StringUtils.isEmpty(outSkuId)) {
|
||||
qw.eq("out_sku_id", outSkuId);
|
||||
}
|
||||
Long productSnapshotId = query.getProductSnapshotId();
|
||||
if (productSnapshotId != null) {
|
||||
qw.eq("product_snapshot_id", productSnapshotId);
|
||||
}
|
||||
Long skuSnapshotId = query.getSkuSnapshotId();
|
||||
if (skuSnapshotId != null) {
|
||||
qw.eq("sku_snapshot_id", skuSnapshotId);
|
||||
}
|
||||
String pic = query.getPic();
|
||||
if (!StringUtils.isEmpty(pic)) {
|
||||
qw.eq("pic", pic);
|
||||
}
|
||||
String productNameLike = query.getProductNameLike();
|
||||
if (!StringUtils.isEmpty(productNameLike)) {
|
||||
qw.like("product_name", productNameLike);
|
||||
}
|
||||
BigDecimal salePrice = query.getSalePrice();
|
||||
if (salePrice != null) {
|
||||
qw.eq("sale_price", salePrice);
|
||||
}
|
||||
BigDecimal purchasePrice = query.getPurchasePrice();
|
||||
if (purchasePrice != null) {
|
||||
qw.eq("purchase_price", purchasePrice);
|
||||
}
|
||||
Integer quantity = query.getQuantity();
|
||||
if (quantity != null) {
|
||||
qw.eq("quantity", quantity);
|
||||
}
|
||||
Long productCategoryId = query.getProductCategoryId();
|
||||
if (productCategoryId != null) {
|
||||
qw.eq("product_category_id", productCategoryId);
|
||||
}
|
||||
String spData = query.getSpData();
|
||||
if (!StringUtils.isEmpty(spData)) {
|
||||
qw.eq("sp_data", spData);
|
||||
}
|
||||
return orderItemMapper.selectList(qw);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单中所包含的商品
|
||||
*
|
||||
* @param orderItem 订单中所包含的商品
|
||||
* @return 结果
|
||||
*/
|
||||
public int insert(OrderItem orderItem) {
|
||||
orderItem.setCreateTime(LocalDateTime.now());
|
||||
return orderItemMapper.insert(orderItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单中所包含的商品
|
||||
*
|
||||
* @param orderItem 订单中所包含的商品
|
||||
* @return 结果
|
||||
*/
|
||||
public int update(OrderItem orderItem) {
|
||||
return orderItemMapper.updateById(orderItem);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单中所包含的商品信息
|
||||
*
|
||||
* @param id 订单中所包含的商品主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteById(Long id) {
|
||||
return orderItemMapper.deleteById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,98 @@
|
||||
package com.cyl.oms.service;
|
||||
|
||||
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.OrderOperateHistoryMapper;
|
||||
import com.cyl.oms.domain.OrderOperateHistory;
|
||||
import com.cyl.oms.pojo.query.OrderOperateHistoryQuery;
|
||||
|
||||
/**
|
||||
* 订单操作历史记录Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author zcc
|
||||
*/
|
||||
@Service
|
||||
public class OrderOperateHistoryService {
|
||||
@Autowired
|
||||
private OrderOperateHistoryMapper orderOperateHistoryMapper;
|
||||
|
||||
/**
|
||||
* 查询订单操作历史记录
|
||||
*
|
||||
* @param id 订单操作历史记录主键
|
||||
* @return 订单操作历史记录
|
||||
*/
|
||||
public OrderOperateHistory selectById(Long id) {
|
||||
return orderOperateHistoryMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单操作历史记录列表
|
||||
*
|
||||
* @param query 查询条件
|
||||
* @param page 分页条件
|
||||
* @return 订单操作历史记录
|
||||
*/
|
||||
public List<OrderOperateHistory> selectList(OrderOperateHistoryQuery query, Pageable page) {
|
||||
if (page != null) {
|
||||
PageHelper.startPage(page.getPageNumber() + 1, page.getPageSize());
|
||||
}
|
||||
QueryWrapper<OrderOperateHistory> qw = new QueryWrapper<>();
|
||||
Long orderId = query.getOrderId();
|
||||
if (orderId != null) {
|
||||
qw.eq("order_id", orderId);
|
||||
}
|
||||
String operateMan = query.getOperateMan();
|
||||
if (!StringUtils.isEmpty(operateMan)) {
|
||||
qw.eq("operate_man", operateMan);
|
||||
}
|
||||
Integer orderStatus = query.getOrderStatus();
|
||||
if (orderStatus != null) {
|
||||
qw.eq("order_status", orderStatus);
|
||||
}
|
||||
String note = query.getNote();
|
||||
if (!StringUtils.isEmpty(note)) {
|
||||
qw.eq("note", note);
|
||||
}
|
||||
return orderOperateHistoryMapper.selectList(qw);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单操作历史记录
|
||||
*
|
||||
* @param orderOperateHistory 订单操作历史记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insert(OrderOperateHistory orderOperateHistory) {
|
||||
orderOperateHistory.setCreateTime(LocalDateTime.now());
|
||||
return orderOperateHistoryMapper.insert(orderOperateHistory);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单操作历史记录
|
||||
*
|
||||
* @param orderOperateHistory 订单操作历史记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int update(OrderOperateHistory orderOperateHistory) {
|
||||
return orderOperateHistoryMapper.updateById(orderOperateHistory);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单操作历史记录信息
|
||||
*
|
||||
* @param id 订单操作历史记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteById(Long id) {
|
||||
return orderOperateHistoryMapper.deleteById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,196 @@
|
||||
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.OrderMapper;
|
||||
import com.cyl.oms.domain.Order;
|
||||
import com.cyl.oms.pojo.query.OrderQuery;
|
||||
|
||||
/**
|
||||
* 订单表Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author zcc
|
||||
*/
|
||||
@Service
|
||||
public class OrderService {
|
||||
@Autowired
|
||||
private OrderMapper orderMapper;
|
||||
|
||||
/**
|
||||
* 查询订单表
|
||||
*
|
||||
* @param id 订单表主键
|
||||
* @return 订单表
|
||||
*/
|
||||
public Order selectById(Long id) {
|
||||
return orderMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单表列表
|
||||
*
|
||||
* @param query 查询条件
|
||||
* @param page 分页条件
|
||||
* @return 订单表
|
||||
*/
|
||||
public List<Order> selectList(OrderQuery query, Pageable page) {
|
||||
if (page != null) {
|
||||
PageHelper.startPage(page.getPageNumber() + 1, page.getPageSize());
|
||||
}
|
||||
QueryWrapper<Order> qw = new QueryWrapper<>();
|
||||
Long memberId = query.getMemberId();
|
||||
if (memberId != null) {
|
||||
qw.eq("member_id", memberId);
|
||||
}
|
||||
String memberUsernameLike = query.getMemberUsernameLike();
|
||||
if (!StringUtils.isEmpty(memberUsernameLike)) {
|
||||
qw.like("member_username", memberUsernameLike);
|
||||
}
|
||||
BigDecimal totalAmount = query.getTotalAmount();
|
||||
if (totalAmount != null) {
|
||||
qw.eq("total_amount", totalAmount);
|
||||
}
|
||||
BigDecimal purchasePrice = query.getPurchasePrice();
|
||||
if (purchasePrice != null) {
|
||||
qw.eq("purchase_price", purchasePrice);
|
||||
}
|
||||
BigDecimal payAmount = query.getPayAmount();
|
||||
if (payAmount != null) {
|
||||
qw.eq("pay_amount", payAmount);
|
||||
}
|
||||
BigDecimal freightAmount = query.getFreightAmount();
|
||||
if (freightAmount != null) {
|
||||
qw.eq("freight_amount", freightAmount);
|
||||
}
|
||||
Integer payType = query.getPayType();
|
||||
if (payType != null) {
|
||||
qw.eq("pay_type", payType);
|
||||
}
|
||||
Integer status = query.getStatus();
|
||||
if (status != null) {
|
||||
qw.eq("status", status);
|
||||
}
|
||||
Integer refundStatus = query.getRefundStatus();
|
||||
if (refundStatus != null) {
|
||||
qw.eq("refund_status", refundStatus);
|
||||
}
|
||||
String deliveryCompany = query.getDeliveryCompany();
|
||||
if (!StringUtils.isEmpty(deliveryCompany)) {
|
||||
qw.eq("delivery_company", deliveryCompany);
|
||||
}
|
||||
String deliverySn = query.getDeliverySn();
|
||||
if (!StringUtils.isEmpty(deliverySn)) {
|
||||
qw.eq("delivery_sn", deliverySn);
|
||||
}
|
||||
Integer autoConfirmDay = query.getAutoConfirmDay();
|
||||
if (autoConfirmDay != null) {
|
||||
qw.eq("auto_confirm_day", autoConfirmDay);
|
||||
}
|
||||
String receiverNameLike = query.getReceiverNameLike();
|
||||
if (!StringUtils.isEmpty(receiverNameLike)) {
|
||||
qw.like("receiver_name", receiverNameLike);
|
||||
}
|
||||
String receiverPhone = query.getReceiverPhone();
|
||||
if (!StringUtils.isEmpty(receiverPhone)) {
|
||||
qw.eq("receiver_phone", receiverPhone);
|
||||
}
|
||||
String receiverPostCode = query.getReceiverPostCode();
|
||||
if (!StringUtils.isEmpty(receiverPostCode)) {
|
||||
qw.eq("receiver_post_code", receiverPostCode);
|
||||
}
|
||||
String receiverProvince = query.getReceiverProvince();
|
||||
if (!StringUtils.isEmpty(receiverProvince)) {
|
||||
qw.eq("receiver_province", receiverProvince);
|
||||
}
|
||||
String receiverCity = query.getReceiverCity();
|
||||
if (!StringUtils.isEmpty(receiverCity)) {
|
||||
qw.eq("receiver_city", receiverCity);
|
||||
}
|
||||
String receiverDistrict = query.getReceiverDistrict();
|
||||
if (!StringUtils.isEmpty(receiverDistrict)) {
|
||||
qw.eq("receiver_district", receiverDistrict);
|
||||
}
|
||||
Long receiverProvinceId = query.getReceiverProvinceId();
|
||||
if (receiverProvinceId != null) {
|
||||
qw.eq("receiver_province_id", receiverProvinceId);
|
||||
}
|
||||
Long receiverCityId = query.getReceiverCityId();
|
||||
if (receiverCityId != null) {
|
||||
qw.eq("receiver_city_id", receiverCityId);
|
||||
}
|
||||
Long receiverDistrictId = query.getReceiverDistrictId();
|
||||
if (receiverDistrictId != null) {
|
||||
qw.eq("receiver_district_id", receiverDistrictId);
|
||||
}
|
||||
String receiverDetailAddress = query.getReceiverDetailAddress();
|
||||
if (!StringUtils.isEmpty(receiverDetailAddress)) {
|
||||
qw.eq("receiver_detail_address", receiverDetailAddress);
|
||||
}
|
||||
String note = query.getNote();
|
||||
if (!StringUtils.isEmpty(note)) {
|
||||
qw.eq("note", note);
|
||||
}
|
||||
Integer confirmStatus = query.getConfirmStatus();
|
||||
if (confirmStatus != null) {
|
||||
qw.eq("confirm_status", confirmStatus);
|
||||
}
|
||||
Integer deleteStatus = query.getDeleteStatus();
|
||||
if (deleteStatus != null) {
|
||||
qw.eq("delete_status", deleteStatus);
|
||||
}
|
||||
LocalDateTime paymentTime = query.getPaymentTime();
|
||||
if (paymentTime != null) {
|
||||
qw.eq("payment_time", paymentTime);
|
||||
}
|
||||
LocalDateTime deliveryTime = query.getDeliveryTime();
|
||||
if (deliveryTime != null) {
|
||||
qw.eq("delivery_time", deliveryTime);
|
||||
}
|
||||
LocalDateTime receiveTime = query.getReceiveTime();
|
||||
if (receiveTime != null) {
|
||||
qw.eq("receive_time", receiveTime);
|
||||
}
|
||||
return orderMapper.selectList(qw);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单表
|
||||
*
|
||||
* @param order 订单表
|
||||
* @return 结果
|
||||
*/
|
||||
public int insert(Order order) {
|
||||
order.setCreateTime(LocalDateTime.now());
|
||||
return orderMapper.insert(order);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单表
|
||||
*
|
||||
* @param order 订单表
|
||||
* @return 结果
|
||||
*/
|
||||
public int update(Order order) {
|
||||
return orderMapper.updateById(order);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单表信息
|
||||
*
|
||||
* @param id 订单表主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteById(Long id) {
|
||||
return orderMapper.deleteById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,103 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,132 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
<?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.OrderDeliveryHistoryMapper">
|
||||
|
||||
<resultMap type="OrderDeliveryHistory" id="OrderDeliveryHistoryResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="orderId" column="order_id"/>
|
||||
<result property="deliveryCompany" column="delivery_company"/>
|
||||
<result property="deliverySn" column="delivery_sn"/>
|
||||
<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="selectOrderDeliveryHistoryVo">
|
||||
select id, order_id, delivery_company, delivery_sn, create_by, create_time, update_by, update_time from oms_order_delivery_history
|
||||
</sql>
|
||||
|
||||
<select id="selectByEntity" parameterType="OrderDeliveryHistory" resultMap="OrderDeliveryHistoryResult">
|
||||
<include refid="selectOrderDeliveryHistoryVo"/>
|
||||
<where>
|
||||
<if test="orderId != null "> and order_id = #{orderId}</if>
|
||||
<if test="deliveryCompany != null and deliveryCompany != ''"> and delivery_company = #{deliveryCompany}</if>
|
||||
<if test="deliverySn != null and deliverySn != ''"> and delivery_sn = #{deliverySn}</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,56 @@
|
||||
<?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.OrderItemMapper">
|
||||
|
||||
<resultMap type="OrderItem" id="OrderItemResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="orderId" column="order_id"/>
|
||||
<result property="productId" column="product_id"/>
|
||||
<result property="outProductId" column="out_product_id"/>
|
||||
<result property="skuId" column="sku_id"/>
|
||||
<result property="outSkuId" column="out_sku_id"/>
|
||||
<result property="productSnapshotId" column="product_snapshot_id"/>
|
||||
<result property="skuSnapshotId" column="sku_snapshot_id"/>
|
||||
<result property="pic" column="pic"/>
|
||||
<result property="productName" column="product_name"/>
|
||||
<result property="salePrice" column="sale_price"/>
|
||||
<result property="purchasePrice" column="purchase_price"/>
|
||||
<result property="quantity" column="quantity"/>
|
||||
<result property="productCategoryId" column="product_category_id"/>
|
||||
<result property="spData" column="sp_data"/>
|
||||
<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="selectOrderItemVo">
|
||||
select id, order_id, product_id, out_product_id, sku_id, out_sku_id, product_snapshot_id, sku_snapshot_id, pic, product_name, sale_price, purchase_price, quantity, product_category_id, sp_data, create_by, create_time, update_by, update_time from oms_order_item
|
||||
</sql>
|
||||
|
||||
<select id="selectByEntity" parameterType="OrderItem" resultMap="OrderItemResult">
|
||||
<include refid="selectOrderItemVo"/>
|
||||
<where>
|
||||
<if test="orderId != null "> and order_id = #{orderId}</if>
|
||||
<if test="productId != null "> and product_id = #{productId}</if>
|
||||
<if test="outProductId != null and outProductId != ''"> and out_product_id = #{outProductId}</if>
|
||||
<if test="skuId != null "> and sku_id = #{skuId}</if>
|
||||
<if test="outSkuId != null and outSkuId != ''"> and out_sku_id = #{outSkuId}</if>
|
||||
<if test="productSnapshotId != null "> and product_snapshot_id = #{productSnapshotId}</if>
|
||||
<if test="skuSnapshotId != null "> and sku_snapshot_id = #{skuSnapshotId}</if>
|
||||
<if test="pic != null and pic != ''"> and pic = #{pic}</if>
|
||||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="salePrice != null "> and sale_price = #{salePrice}</if>
|
||||
<if test="purchasePrice != null "> and purchase_price = #{purchasePrice}</if>
|
||||
<if test="quantity != null "> and quantity = #{quantity}</if>
|
||||
<if test="productCategoryId != null "> and product_category_id = #{productCategoryId}</if>
|
||||
<if test="spData != null and spData != ''"> and sp_data = #{spData}</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,84 @@
|
||||
<?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.OrderMapper">
|
||||
|
||||
<resultMap type="Order" id="OrderResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="memberId" column="member_id"/>
|
||||
<result property="memberUsername" column="member_username"/>
|
||||
<result property="totalAmount" column="total_amount"/>
|
||||
<result property="purchasePrice" column="purchase_price"/>
|
||||
<result property="payAmount" column="pay_amount"/>
|
||||
<result property="freightAmount" column="freight_amount"/>
|
||||
<result property="payType" column="pay_type"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="refundStatus" column="refund_status"/>
|
||||
<result property="deliveryCompany" column="delivery_company"/>
|
||||
<result property="deliverySn" column="delivery_sn"/>
|
||||
<result property="autoConfirmDay" column="auto_confirm_day"/>
|
||||
<result property="receiverName" column="receiver_name"/>
|
||||
<result property="receiverPhone" column="receiver_phone"/>
|
||||
<result property="receiverPostCode" column="receiver_post_code"/>
|
||||
<result property="receiverProvince" column="receiver_province"/>
|
||||
<result property="receiverCity" column="receiver_city"/>
|
||||
<result property="receiverDistrict" column="receiver_district"/>
|
||||
<result property="receiverProvinceId" column="receiver_province_id"/>
|
||||
<result property="receiverCityId" column="receiver_city_id"/>
|
||||
<result property="receiverDistrictId" column="receiver_district_id"/>
|
||||
<result property="receiverDetailAddress" column="receiver_detail_address"/>
|
||||
<result property="note" column="note"/>
|
||||
<result property="confirmStatus" column="confirm_status"/>
|
||||
<result property="deleteStatus" column="delete_status"/>
|
||||
<result property="paymentTime" column="payment_time"/>
|
||||
<result property="deliveryTime" column="delivery_time"/>
|
||||
<result property="receiveTime" column="receive_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="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="selectOrderVo">
|
||||
select id, member_id, member_username, total_amount, purchase_price, pay_amount, freight_amount, pay_type, status, refund_status, delivery_company, delivery_sn, auto_confirm_day, receiver_name, receiver_phone, receiver_post_code, receiver_province, receiver_city, receiver_district, receiver_province_id, receiver_city_id, receiver_district_id, receiver_detail_address, note, confirm_status, delete_status, payment_time, delivery_time, receive_time, create_by, create_time, update_by, update_time from oms_order
|
||||
</sql>
|
||||
|
||||
<select id="selectByEntity" parameterType="Order" resultMap="OrderResult">
|
||||
<include refid="selectOrderVo"/>
|
||||
<where>
|
||||
<if test="memberId != null "> and member_id = #{memberId}</if>
|
||||
<if test="memberUsername != null and memberUsername != ''"> and member_username like concat('%', #{memberUsername}, '%')</if>
|
||||
<if test="totalAmount != null "> and total_amount = #{totalAmount}</if>
|
||||
<if test="purchasePrice != null "> and purchase_price = #{purchasePrice}</if>
|
||||
<if test="payAmount != null "> and pay_amount = #{payAmount}</if>
|
||||
<if test="freightAmount != null "> and freight_amount = #{freightAmount}</if>
|
||||
<if test="payType != null "> and pay_type = #{payType}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="refundStatus != null "> and refund_status = #{refundStatus}</if>
|
||||
<if test="deliveryCompany != null and deliveryCompany != ''"> and delivery_company = #{deliveryCompany}</if>
|
||||
<if test="deliverySn != null and deliverySn != ''"> and delivery_sn = #{deliverySn}</if>
|
||||
<if test="autoConfirmDay != null "> and auto_confirm_day = #{autoConfirmDay}</if>
|
||||
<if test="receiverName != null and receiverName != ''"> and receiver_name like concat('%', #{receiverName}, '%')</if>
|
||||
<if test="receiverPhone != null and receiverPhone != ''"> and receiver_phone = #{receiverPhone}</if>
|
||||
<if test="receiverPostCode != null and receiverPostCode != ''"> and receiver_post_code = #{receiverPostCode}</if>
|
||||
<if test="receiverProvince != null and receiverProvince != ''"> and receiver_province = #{receiverProvince}</if>
|
||||
<if test="receiverCity != null and receiverCity != ''"> and receiver_city = #{receiverCity}</if>
|
||||
<if test="receiverDistrict != null and receiverDistrict != ''"> and receiver_district = #{receiverDistrict}</if>
|
||||
<if test="receiverProvinceId != null "> and receiver_province_id = #{receiverProvinceId}</if>
|
||||
<if test="receiverCityId != null "> and receiver_city_id = #{receiverCityId}</if>
|
||||
<if test="receiverDistrictId != null "> and receiver_district_id = #{receiverDistrictId}</if>
|
||||
<if test="receiverDetailAddress != null and receiverDetailAddress != ''"> and receiver_detail_address = #{receiverDetailAddress}</if>
|
||||
<if test="note != null and note != ''"> and note = #{note}</if>
|
||||
<if test="confirmStatus != null "> and confirm_status = #{confirmStatus}</if>
|
||||
<if test="deleteStatus != null "> and delete_status = #{deleteStatus}</if>
|
||||
<if test="paymentTime != null "> and payment_time = #{paymentTime}</if>
|
||||
<if test="deliveryTime != null "> and delivery_time = #{deliveryTime}</if>
|
||||
<if test="receiveTime != null "> and receive_time = #{receiveTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,36 @@
|
||||
<?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.OrderOperateHistoryMapper">
|
||||
|
||||
<resultMap type="OrderOperateHistory" id="OrderOperateHistoryResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="orderId" column="order_id"/>
|
||||
<result property="operateMan" column="operate_man"/>
|
||||
<result property="orderStatus" column="order_status"/>
|
||||
<result property="note" column="note"/>
|
||||
<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="selectOrderOperateHistoryVo">
|
||||
select id, order_id, operate_man, order_status, note, create_by, create_time, update_by, update_time from oms_order_operate_history
|
||||
</sql>
|
||||
|
||||
<select id="selectByEntity" parameterType="OrderOperateHistory" resultMap="OrderOperateHistoryResult">
|
||||
<include refid="selectOrderOperateHistoryVo"/>
|
||||
<where>
|
||||
<if test="orderId != null "> and order_id = #{orderId}</if>
|
||||
<if test="operateMan != null and operateMan != ''"> and operate_man = #{operateMan}</if>
|
||||
<if test="orderStatus != null "> and order_status = #{orderStatus}</if>
|
||||
<if test="note != null and note != ''"> and note = #{note}</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@ -0,0 +1,38 @@
|
||||
<?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>
|
||||
@ -0,0 +1,52 @@
|
||||
<?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>
|
||||
@ -0,0 +1,22 @@
|
||||
-- 菜单 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', 'order', 'oms/order/index', 1, 0, 'C', '0', '0', 'oms:order: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:order: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:order: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:order: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:order: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:order:export', '#', 1, sysdate(), '', null, '');
|
||||
@ -0,0 +1,22 @@
|
||||
-- 菜单 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', 'orderDeliveryHistory', 'oms/orderDeliveryHistory/index', 1, 0, 'C', '0', '0', 'oms:orderDeliveryHistory: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:orderDeliveryHistory: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:orderDeliveryHistory: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:orderDeliveryHistory: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:orderDeliveryHistory: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:orderDeliveryHistory:export', '#', 1, sysdate(), '', null, '');
|
||||
@ -0,0 +1,22 @@
|
||||
-- 菜单 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', 'orderItem', 'oms/orderItem/index', 1, 0, 'C', '0', '0', 'oms:orderItem: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:orderItem: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:orderItem: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:orderItem: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:orderItem: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:orderItem:export', '#', 1, sysdate(), '', null, '');
|
||||
@ -0,0 +1,22 @@
|
||||
-- 菜单 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', 'orderOperateHistory', 'oms/orderOperateHistory/index', 1, 0, 'C', '0', '0', 'oms:orderOperateHistory: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:orderOperateHistory: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:orderOperateHistory: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:orderOperateHistory: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:orderOperateHistory: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:orderOperateHistory:export', '#', 1, sysdate(), '', null, '');
|
||||
@ -0,0 +1,22 @@
|
||||
-- 菜单 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, '');
|
||||
@ -0,0 +1,22 @@
|
||||
-- 菜单 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