feat():增加了客户接口

master
Cui YongXing 2024-07-31 20:34:50 +08:00
parent b66b16bbf5
commit 9e2e415f75
19 changed files with 406 additions and 23 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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>

View File

@ -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));
}
}

View File

@ -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 {
}

View File

@ -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 {
}

View File

@ -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成功");
}
}

View File

@ -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> {
}

View File

@ -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> {
}

View File

@ -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> {
}

View File

@ -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);
}

View File

@ -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> {
}

View File

@ -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> {
}

View File

@ -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);
}
}

View File

@ -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 {
}

View File

@ -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 {
}

View File

@ -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: