控制层
parent
4097d41b73
commit
cc602e4a14
|
@ -0,0 +1,13 @@
|
|||
package com.muyu.cloud.market.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Log4j2
|
||||
@RestController
|
||||
@RequestMapping("/orders")
|
||||
@Tag(name = "运营商控制层", description = "进行订单支付所用运营商管理")
|
||||
public class OperatorsController {
|
||||
}
|
|
@ -0,0 +1,117 @@
|
|||
package com.muyu.cloud.market.controller;
|
||||
|
||||
import com.dtflys.forest.springboot.annotation.ForestScannerRegister;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.muyu.cloud.market.domin.Orders;
|
||||
import com.muyu.cloud.market.domin.req.OrdersAddReq;
|
||||
import com.muyu.cloud.market.domin.req.OrdersListReq;
|
||||
import com.muyu.cloud.market.service.OrderShowService;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@Log4j2
|
||||
@RestController
|
||||
@RequestMapping("/orders")
|
||||
@Tag(name = "订单控制层", description = "进行订单管理查询操作")
|
||||
public class OrderShowController {
|
||||
public OrderShowController() {
|
||||
log.info("forest{}扫描路径", ForestScannerRegister.getBasePackages());
|
||||
|
||||
}
|
||||
|
||||
@Resource
|
||||
private OrderShowService orderShowService;
|
||||
|
||||
/**
|
||||
* 展示订单
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
@Operation(summary = "查看订单", description = "根据订单名称 编号 状态 查询")
|
||||
public PageInfo<Orders> selectList(@Validated @RequestBody OrdersListReq req){
|
||||
PageInfo<Orders> info = orderShowService.selectList(req);
|
||||
return info;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增订单
|
||||
* @param ordersAddReq
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/addOrdeds")
|
||||
@Operation(summary = "添加订单", description = "根据ordersAddReq对象添加订单")
|
||||
Result addOrdeds(@Validated @RequestBody OrdersAddReq ordersAddReq){
|
||||
return orderShowService.addOrdeds(ordersAddReq);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单
|
||||
* @param orders
|
||||
* @return
|
||||
*/
|
||||
@PutMapping("/updateOrders")
|
||||
@Operation(summary = "修改订单", description = "根据ordersid查找订单进行修改")
|
||||
Result updateOrders(@Validated @RequestBody Orders orders){
|
||||
return orderShowService.updateOrders(orders);
|
||||
}
|
||||
|
||||
/**
|
||||
* 逻辑删除->根据orderid修改exist字段 1->0
|
||||
* 订单回收站
|
||||
* @param ordersId
|
||||
* @return
|
||||
*/
|
||||
@PutMapping("/updateByeExist/{ordersId}")
|
||||
@Operation(summary = "逻辑删除订单", description = "根据orderid修改exist字段 1->0/(类似回收站)")
|
||||
Result updateByeExist (@Validated @PathVariable("ordersId") Integer ordersId){
|
||||
return orderShowService.updateByeExist(ordersId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 逻辑删除->根据orderid修改exist字段 1->0
|
||||
* 订单回收站
|
||||
* @param ordersId
|
||||
* @return
|
||||
*/
|
||||
@PutMapping("/updateByExist/{ordersId}")
|
||||
@Operation(summary = "逻辑复原订单", description = "根据orderid修改exist字段 0->1")
|
||||
Result updateByExist(@Validated @PathVariable("ordersId") Integer ordersId){
|
||||
return orderShowService.updateByExist(ordersId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 彻底删除(根据orderid删除数据库字段)
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping("/delByOrderId/{ordersId}")
|
||||
@Operation(summary = "彻底删除订单", description = "根据根据orderid删除数据库字段")
|
||||
Result delByOrderId(@Validated @PathVariable("ordersId") Integer ordersId){
|
||||
return orderShowService.delByOrderId(ordersId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 回显
|
||||
* 根据id查内容
|
||||
* @param ordersId
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/findAllById/{ordersId}")
|
||||
@Operation(summary = "回显", description = "根据ordersId进行查询信息")
|
||||
Orders findAllById (@Validated @PathVariable("ordersId") Integer ordersId){
|
||||
return orderShowService.findAllById(ordersId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.muyu.cloud.market.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Log4j2
|
||||
@RestController
|
||||
@RequestMapping("/orders")
|
||||
@Tag(name = "订单支付控制层", description = "进行订单支付管理")
|
||||
public class OrdersPayController {
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.muyu.cloud.market.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Log4j2
|
||||
@RestController
|
||||
@RequestMapping("/orders")
|
||||
@Tag(name = "账户充值控制层", description = "进行账户充值管理")
|
||||
public class RechargeController {
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package com.muyu.cloud.market.controller;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Log4j2
|
||||
@RestController
|
||||
@RequestMapping("/orders")
|
||||
@Tag(name = "购买记录控制层", description = "进行订单购买日志管理")
|
||||
public class SalelogController {
|
||||
}
|
Loading…
Reference in New Issue