新增实体类
parent
a93cc744cb
commit
4f66e2cfe8
|
@ -0,0 +1,38 @@
|
|||
package com.muyu.cloud.market.domin.req;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Tag(name = "订单信息列表请求对象",description = "根据入参进行服务的添加")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class OrdersAddReq {
|
||||
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
@NotEmpty(message = "订单编号不可为空")
|
||||
@Schema(
|
||||
title = "订单服务编号",
|
||||
description = "‘订单编码’和订单id主键不同,由产品类别批次系统构建",
|
||||
type = "String",
|
||||
defaultValue = "订单服务",
|
||||
requiredProperties = {"ordersNum"}
|
||||
)
|
||||
private Integer ordersNum;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -1,13 +1,52 @@
|
|||
package com.muyu.cloud.market.domin.req;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Tag(name = "订单信息列表请求对象")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Tag(name = "订单列表请求对象")
|
||||
public class OrdersListReq {
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
@NotEmpty(message = "订单编号不可为空")
|
||||
@Schema(
|
||||
description = "订单编号",
|
||||
type = "String"
|
||||
)
|
||||
private String ordersNum;
|
||||
|
||||
/**
|
||||
* 订单状态(已付款,未付款,待支付)
|
||||
*/
|
||||
@Schema(
|
||||
description = "订单状态:1-待支付 2-已付款 3-已取消",
|
||||
type = "Integer"
|
||||
)
|
||||
private Integer ordersState;
|
||||
|
||||
/**
|
||||
* 订单日期
|
||||
*/
|
||||
@Schema(
|
||||
description = "订单日期",
|
||||
type = "Date"
|
||||
)
|
||||
private Date ordersLaunchdate;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
package com.muyu.cloud.market.domin.req;
|
||||
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class OrdersUpdReq {
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package com.muyu.cloud.market.domin.resp;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class OrdersResp {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -3,19 +3,14 @@ package com.muyu.cloud.market.controller;
|
|||
import com.dtflys.forest.springboot.annotation.ForestScannerRegister;
|
||||
import com.muyu.cloud.market.domin.Orders;
|
||||
import com.muyu.cloud.market.service.OrderShowService;
|
||||
import com.muyu.cloud.pay.domain.OrderPayCustomer;
|
||||
import com.muyu.cloud.pay.domain.req.CustomerAddReq;
|
||||
import com.muyu.cloud.pay.domain.req.CustomerListReq;
|
||||
import com.muyu.cloud.pay.domain.req.CustomerUpdReq;
|
||||
import com.muyu.cloud.pay.domain.resp.CustomerResp;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -24,55 +19,25 @@ import java.util.List;
|
|||
@RequestMapping("/ordershow")
|
||||
@Tag(name = "订单控制层", description = "进行订单管理查询操作")
|
||||
public class OrderShowController {
|
||||
public OrderShowController(){
|
||||
public OrderShowController() {
|
||||
log.info("forest{}扫描路径", ForestScannerRegister.getBasePackages());
|
||||
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private OrderShowService orderShowService;
|
||||
|
||||
/**
|
||||
* 展示订单
|
||||
* @param req
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
@Operation(summary = "查看订单", description = "根据订单名称 编号 状态 查询")
|
||||
public Result<List<CustomerResp>> selectList(
|
||||
@Validated @RequestBody Orders req) {
|
||||
// return Result.success(orderShowService.selectOrderShowAndLimit(req));
|
||||
return Result.success();
|
||||
public Result<List<Orders>> selectOrderShowAndLimit(){
|
||||
return Result.success(orderShowService.selectOrderShowAndLimit());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 添加客户
|
||||
* @param orders
|
||||
* @return
|
||||
*/
|
||||
@PostMapping
|
||||
@Operation(summary = "添加客户信息",description = "添加支付平台客户信息,添加成功后可以使用支付信息")
|
||||
public Result<String> save(@Validated @RequestBody Orders orders){
|
||||
// orderShowService.save(OrderPayCustomer.addBuild(orders));
|
||||
return Result.success(null,"操作成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改客户
|
||||
* @param customerUpdReq
|
||||
* @return
|
||||
*/
|
||||
@PutMapping("/{orderCustomerId}")
|
||||
@Operation(summary = "客户信息修改",description = "通过客户id修改客户信息")
|
||||
public Result<String> update(
|
||||
@Schema(title = "客户Id",type = "Long",defaultValue = "1")
|
||||
@PathVariable("orderCustomerId") Long orderCustomerId,
|
||||
@RequestBody @Validated CustomerUpdReq customerUpdReq){
|
||||
// orderShowService.updateById( OrderPayCustomer.updBuild(customerUpdReq, ()->orderCustomerId));
|
||||
return Result.success(null,"操作成功");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,19 +1,10 @@
|
|||
package com.muyu.cloud.market.controller;
|
||||
|
||||
import com.muyu.cloud.market.domin.Orders;
|
||||
import com.muyu.cloud.pay.domain.resp.CustomerResp;
|
||||
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.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author:weiran
|
||||
* @Package:com.muyu.cloud.market.controller
|
||||
|
@ -24,23 +15,8 @@ import java.util.List;
|
|||
@Log4j2
|
||||
@RestController
|
||||
@RequestMapping("product")
|
||||
@Tag(name = "产品接口控制层",description = "进行产品接口管理、查看等相关操作")
|
||||
@Tag(name = "产品接口控制层", description = "进行产品接口管理、查看等相关操作")
|
||||
public class ProductApiController {
|
||||
|
||||
|
||||
/**
|
||||
* 展示订单
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/list")
|
||||
@Operation(summary = "查看该商品", description = "根据商品名称,编号,状态,查询")
|
||||
public Result<List<CustomerResp>> selectList(
|
||||
@Validated @RequestBody Orders req) {
|
||||
// return Result.success(orderShowService.selectOrderShowAndLimit(req));
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -2,20 +2,12 @@ package com.muyu.cloud.market.service;
|
|||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.cloud.market.domin.Orders;
|
||||
import com.muyu.cloud.pay.domain.req.CustomerListReq;
|
||||
import io.swagger.v3.oas.annotations.servers.Server;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public interface OrderShowService extends IService<Orders> {
|
||||
|
||||
List<Orders> selectOrderShowAndLimit(CustomerListReq req);
|
||||
|
||||
List<String> getCustomerAllList();
|
||||
|
||||
void disable(Long orderCustomerId);
|
||||
|
||||
List<Orders> selectOrderShowAndLimit();
|
||||
|
||||
}
|
||||
|
|
|
@ -5,47 +5,27 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||
import com.muyu.cloud.market.domin.Orders;
|
||||
import com.muyu.cloud.market.mapper.OrderShowMapper;
|
||||
import com.muyu.cloud.market.service.OrderShowService;
|
||||
import com.muyu.cloud.pay.domain.OrderPayCustomer;
|
||||
import com.muyu.cloud.pay.domain.req.CustomerListReq;
|
||||
import com.muyu.common.core.utils.StringUtils;
|
||||
import io.swagger.v3.oas.annotations.servers.Server;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Server
|
||||
@Log4j2
|
||||
public class OrderShowServiceImpl extends ServiceImpl<OrderShowMapper, Orders> implements OrderShowService {
|
||||
|
||||
@Resource
|
||||
private OrderShowService orderShowService;
|
||||
|
||||
|
||||
@Override
|
||||
public List<Orders> selectOrderShowAndLimit(CustomerListReq req) {
|
||||
LambdaQueryWrapper<OrderPayCustomer> queryWrapper = new LambdaQueryWrapper<>();
|
||||
public List<Orders> selectOrderShowAndLimit() {
|
||||
LambdaQueryWrapper<Orders> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.like(
|
||||
StringUtils.isNotEmpty(req.getAppName()),
|
||||
OrderPayCustomer::getAppName,
|
||||
req.getAppName()
|
||||
);
|
||||
queryWrapper.like(
|
||||
StringUtils.isNotEmpty(req.getAppCode()),
|
||||
OrderPayCustomer::getAppCode,
|
||||
req.getAppCode()
|
||||
);
|
||||
queryWrapper.eq(
|
||||
StringUtils.isNotEmpty(req.getStatus()),
|
||||
OrderPayCustomer::getStatus,
|
||||
req.getStatus()
|
||||
);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getCustomerAllList() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void disable(Long orderCustomerId) {
|
||||
StringUtils.isNotEmpty()
|
||||
)
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue