feat():增加了客户接口
parent
b66b16bbf5
commit
9e2e415f75
|
@ -0,0 +1,49 @@
|
|||
package com.muyu.pay.common.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
import lombok.*;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName(value = "order_pay_customer",autoResultMap = true)
|
||||
public class OrderPayCustomer extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 服务/客户名称
|
||||
*/
|
||||
private String appName;
|
||||
|
||||
/**
|
||||
* 服务/客户编码
|
||||
*/
|
||||
private String appCode;
|
||||
|
||||
/**
|
||||
* 客户描述
|
||||
*/
|
||||
private String appDesc;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.muyu.pay.common.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
import lombok.*;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@TableName(value = "order_pay_info" ,autoResultMap = true)
|
||||
public class OrderPayInfo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 客户名称
|
||||
*/
|
||||
private String appName;
|
||||
|
||||
/**
|
||||
* 客户编号
|
||||
*/
|
||||
private String appCode;
|
||||
|
||||
/**
|
||||
* 客户单号
|
||||
*/
|
||||
private String cusOrderNumber;
|
||||
|
||||
/**
|
||||
* 支付单号
|
||||
*/
|
||||
private String payOrderNumber;
|
||||
|
||||
/**
|
||||
* 渠道商类型
|
||||
*/
|
||||
private String channelType;
|
||||
|
||||
/**
|
||||
* 渠道商单号
|
||||
*/
|
||||
private String channelOrderNumber;
|
||||
|
||||
/**
|
||||
* 支付单状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,63 @@
|
|||
package com.muyu.pay.common.domain;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
import lombok.*;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@TableName(value = "order_pay_refund",autoResultMap = true)
|
||||
public class OrderPayRefund extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 客户退单号
|
||||
*/
|
||||
private String cusOrderNumber;
|
||||
|
||||
/**
|
||||
*支付退单号
|
||||
*/
|
||||
private String payOrderNumber;
|
||||
|
||||
/**
|
||||
* 渠道商退单号
|
||||
*/
|
||||
private String channelOrderNumber;
|
||||
|
||||
/**
|
||||
* 退款金额
|
||||
*/
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 支付单号
|
||||
*/
|
||||
private String payInfoNumber;
|
||||
|
||||
/**
|
||||
* 到账时间
|
||||
*/
|
||||
private Date toAccountTIme;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package com.muyu.pay.common.domain.req;
|
||||
|
||||
import com.muyu.common.core.validation.custom.IsSystemYesNo;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
@Tag(name = "客户列表请求对象" )
|
||||
public class CustomerListReq {
|
||||
/**
|
||||
* 服务/客户名称
|
||||
*/
|
||||
@Schema(description = "客户名称 为微服务名称",type = "Long")
|
||||
private String appName;
|
||||
/**
|
||||
* 服务/客户编码
|
||||
*/
|
||||
@Schema(description = "客户编吗 为微服务名称",type = "String")
|
||||
private String appCode;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*
|
||||
*/
|
||||
@Schema(description = "客户状态 Y是开启 N是关闭",type = "String")
|
||||
@IsSystemYesNo
|
||||
private String status;
|
||||
|
||||
}
|
|
@ -82,6 +82,10 @@
|
|||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-common-rabbit</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.muyu</groupId>
|
||||
<artifactId>cloud-pay-common</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
package com.muyu.pay.server.controller;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.pay.common.domain.OrderPayCustomer;
|
||||
import com.muyu.pay.common.domain.req.CustomerListReq;
|
||||
import com.muyu.pay.server.service.OrderPayCustomerService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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;
|
||||
|
||||
@Log4j2
|
||||
@RestController
|
||||
@RequestMapping("customer")
|
||||
@RequiredArgsConstructor
|
||||
@Tag(name = "客户控制层",description = "进行客户管理查询操作")
|
||||
public class OrderPayCustomerController {
|
||||
|
||||
private final OrderPayCustomerService orderPayCustomerService;
|
||||
|
||||
@PostMapping("/list")
|
||||
@Operation(summary = "查看客户",description = "根据客户名称 编号 状态 查询")
|
||||
public Result<List<OrderPayCustomer>> selectList(
|
||||
@Validated @RequestBody CustomerListReq req){
|
||||
return Result.success(orderPayCustomerService.selectList(req));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package com.muyu.pay.server.controller;
|
||||
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Log4j2
|
||||
@RestController
|
||||
@RequestMapping("info")
|
||||
public class OrderPayInfoController {
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.muyu.pay.server.controller;
|
||||
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Log4j2
|
||||
@RestController
|
||||
@RequestMapping("refund")
|
||||
public class OrderPayRefundController {
|
||||
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
package com.muyu.pay.server.controller;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RequestMapping("test")
|
||||
@RestController
|
||||
public class TestController {
|
||||
|
||||
@PostMapping("post")
|
||||
public Result<String> post(){
|
||||
return Result.success("post成功");
|
||||
}
|
||||
|
||||
@GetMapping("get")
|
||||
public Result<String> get(){
|
||||
return Result.success("get成功");
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package com.muyu.pay.server.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.pay.common.domain.OrderPayCustomer;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface OrderPayCustomerMapper extends BaseMapper<OrderPayCustomer> {
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package com.muyu.pay.server.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.pay.common.domain.OrderPayInfo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface OrderPayInfoMapper extends BaseMapper<OrderPayInfo> {
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
package com.muyu.pay.server.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.pay.common.domain.OrderPayRefund;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface OrderPayRefundMapper extends BaseMapper<OrderPayRefund> {
|
||||
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package com.muyu.pay.server.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.pay.common.domain.OrderPayCustomer;
|
||||
import com.muyu.pay.common.domain.req.CustomerListReq;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface OrderPayCustomerService extends IService<OrderPayCustomer> {
|
||||
|
||||
|
||||
public List<OrderPayCustomer> selectList(CustomerListReq req);
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
package com.muyu.pay.server.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.pay.common.domain.OrderPayInfo;
|
||||
import com.muyu.pay.server.mapper.OrderPayInfoMapper;
|
||||
|
||||
public interface OrderPayInfoService extends IService<OrderPayInfo> {
|
||||
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.muyu.pay.server.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.pay.common.domain.OrderPayRefund;
|
||||
|
||||
public interface OrderPayRefundService extends IService<OrderPayRefund> {
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
package com.muyu.pay.server.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.common.core.utils.StringUtils;
|
||||
import com.muyu.pay.common.domain.OrderPayCustomer;
|
||||
import com.muyu.pay.common.domain.req.CustomerListReq;
|
||||
import com.muyu.pay.server.mapper.OrderPayCustomerMapper;
|
||||
import com.muyu.pay.server.service.OrderPayCustomerService;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Log4j2
|
||||
@Service
|
||||
public class OrderPayCustomerServiceImpl
|
||||
extends ServiceImpl<OrderPayCustomerMapper, OrderPayCustomer>
|
||||
implements OrderPayCustomerService {
|
||||
|
||||
@Override
|
||||
public List<OrderPayCustomer> selectList(CustomerListReq req) {
|
||||
LambdaQueryWrapper<OrderPayCustomer> 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 this.list(queryWrapper);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.muyu.pay.server.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.pay.common.domain.OrderPayInfo;
|
||||
import com.muyu.pay.server.mapper.OrderPayInfoMapper;
|
||||
import com.muyu.pay.server.service.OrderPayInfoService;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Log4j2
|
||||
@Service
|
||||
public class OrderPayInfoServiceImpl extends ServiceImpl<OrderPayInfoMapper, OrderPayInfo> implements OrderPayInfoService {
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.muyu.pay.server.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.pay.common.domain.OrderPayRefund;
|
||||
import com.muyu.pay.server.mapper.OrderPayRefundMapper;
|
||||
import com.muyu.pay.server.service.OrderPayInfoService;
|
||||
import com.muyu.pay.server.service.OrderPayRefundService;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Log4j2
|
||||
@Service
|
||||
public class OrderPayRefundServiceImpl
|
||||
extends ServiceImpl<OrderPayRefundMapper, OrderPayRefund>
|
||||
implements OrderPayRefundService {
|
||||
}
|
|
@ -49,6 +49,7 @@ spring:
|
|||
- application-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
# xxl-job 配置文件
|
||||
- application-xxl-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
# rabbit 配置文件
|
||||
- application-rabbit-config-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
logging:
|
||||
level:
|
||||
|
|
Loading…
Reference in New Issue