编号:ZSSAC-163 描述:修改路径
This commit is contained in:
parent
cfee6f1704
commit
bf5b5ad0e4
@ -60,12 +60,6 @@
|
||||
<groupId>com.smarterFramework</groupId>
|
||||
<artifactId>sf-file</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.smarterFramework</groupId>
|
||||
<artifactId>sf-order</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
@ -0,0 +1,109 @@
|
||||
package com.sf.order.controller;
|
||||
|
||||
import com.sf.common.annotation.Log;
|
||||
import com.sf.common.core.controller.BaseController;
|
||||
import com.sf.common.core.domain.AjaxResult;
|
||||
import com.sf.common.core.page.TableDataInfo;
|
||||
import com.sf.common.enums.BusinessType;
|
||||
import com.sf.common.utils.poi.ExcelUtil;
|
||||
import com.sf.order.domain.OrderInfo;
|
||||
import com.sf.order.domain.dto.OrderCreateDto;
|
||||
import com.sf.order.domain.req.OrderListreqVo;
|
||||
import com.sf.order.domain.res.OrderListResVo;
|
||||
import com.sf.order.service.IOrderInfoService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单基础信息Controller
|
||||
*
|
||||
* @author ztzh
|
||||
* @date 2024-04-09
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/order")
|
||||
public class OrderInfoController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IOrderInfoService orderInfoService;
|
||||
|
||||
/**
|
||||
* 查询订单基础信息列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(OrderInfo orderInfo) {
|
||||
startPage();
|
||||
List<OrderInfo> list = orderInfoService.selectOrderInfoList(orderInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单基础信息列表
|
||||
*/
|
||||
@GetMapping("/query/list")
|
||||
public TableDataInfo queryList(OrderListreqVo vo) {
|
||||
startPage();
|
||||
List<OrderListResVo> list = orderInfoService.queryList(vo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出订单基础信息列表
|
||||
*/
|
||||
@Log(title = "订单基础信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, OrderInfo orderInfo) {
|
||||
List<OrderInfo> list = orderInfoService.selectOrderInfoList(orderInfo);
|
||||
ExcelUtil<OrderInfo> util = new ExcelUtil<OrderInfo>(OrderInfo.class);
|
||||
util.exportExcel(response, list, "订单基础信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订单基础信息详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(orderInfoService.selectOrderInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单基础信息
|
||||
*/
|
||||
@Log(title = "创建订单基础信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping(value = "/createOrder")
|
||||
public AjaxResult createOrder(@RequestBody OrderCreateDto orderCreateDto) {
|
||||
return toAjax(orderInfoService.createOrder(orderCreateDto));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单基础信息
|
||||
*/
|
||||
@Log(title = "订单基础信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody OrderInfo orderInfo) {
|
||||
return toAjax(orderInfoService.updateOrderInfo(orderInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 支付订单
|
||||
*/
|
||||
@Operation(summary = "支付订单")
|
||||
@PostMapping(value = "/pay/{orderId}")
|
||||
private String orderPay(@PathVariable(value = "orderId") Long orderId) {
|
||||
orderInfoService.orderPay(orderId);
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单基础信息
|
||||
*/
|
||||
@Log(title = "订单基础信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(orderInfoService.deleteOrderInfoByIds(ids));
|
||||
}
|
||||
}
|
@ -1,6 +1,5 @@
|
||||
package com.sf.order.domain.req;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
@ -3,8 +3,6 @@ package com.sf.order.domain.res;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 活动信息详情
|
||||
*
|
@ -1,7 +1,5 @@
|
||||
package com.sf.order.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.sf.common.exception.ServiceException;
|
||||
import com.sf.common.utils.DateUtils;
|
||||
import com.sf.common.utils.SnowflakeIdWorker;
|
||||
@ -14,6 +12,7 @@ import com.sf.order.service.IOrderInfoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单基础信息Service业务层处理
|
@ -1,34 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>smarterFramework</artifactId>
|
||||
<groupId>com.smarterFramework</groupId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>sf-order</artifactId>
|
||||
|
||||
<description>
|
||||
order订单模块
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- 通用工具-->
|
||||
<dependency>
|
||||
<groupId>com.smarterFramework</groupId>
|
||||
<artifactId>sf-common</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.swagger.core.v3</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>2.1.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
Loading…
x
Reference in New Issue
Block a user