增加demo-api示例

This commit is contained in:
yaoyn
2025-04-28 17:25:35 +08:00
parent de240cba3e
commit db33dbaa8b
31 changed files with 164 additions and 2 deletions

105
demo/demo-api/pom.xml Normal file
View File

@ -0,0 +1,105 @@
<?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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.geg</groupId>
<artifactId>demo</artifactId>
<version>${revision}</version>
</parent>
<artifactId>demo-api</artifactId>
<name>demo-api</name>
<description>demo-api</description>
<properties>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>com.geg</groupId>
<artifactId>itc-ms-common-api</artifactId>
<version>${framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId>
</dependency>
<dependency>
<groupId>org.ssssssss</groupId>
<artifactId>magic-api-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</dependency>
<dependency>
<groupId>me.zhyd.oauth</groupId>
<artifactId>JustAuth</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.yml</include>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.yml</include>
<include>**/*.properties</include>
<include>**/*.xml</include>
<include>**/*.vm</include>
<include>**/*.ftl</include>
<include>**/*.jpg</include>
<include>**/*.png</include>
<include>**/*.xls</include>
<include>**/*.xlsx</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</build>
</project>

View File

@ -0,0 +1,22 @@
package com.xjrsoft.module.prdManage.client;
import com.xjrsoft.common.constant.GlobalConstant;
import com.xjrsoft.module.prdManage.dto.DemoAppliancePageDto;
import com.xjrsoft.module.prdManage.vo.DemoApplianceVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
/**
* @author: yjw
* @since: 2025/3/4
*/
@FeignClient(value = "demo-service",
path = GlobalConstant.CLIENT_API_PRE + "prdManage/demoAppliance")
public interface IDemoApplianceClient {
@PostMapping("/getListByQuery")
List<DemoApplianceVo> getListByQuery(@RequestBody DemoAppliancePageDto dto);
}

View File

@ -0,0 +1,67 @@
package com.xjrsoft.module.prdManage.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @title: 示例-家电管理
* @Author 管理员
* @Date: 2025-03-12
* @Version 1.0
*/
@Data
public class AddDemoApplianceDto implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
@ApiModelProperty("")
private String name;
/**
*
*/
@ApiModelProperty("")
private String serialNumber;
/**
*
*/
@ApiModelProperty("")
private String category;
/**
*
*/
@ApiModelProperty("")
private LocalDateTime purchaseDate;
/**
*
*/
@ApiModelProperty("")
private Integer warrantyPeriod;
/**
*
*/
@ApiModelProperty("")
private Integer powerRating;
/**
*
*/
@ApiModelProperty("")
private String brand;
/**
*
*/
@ApiModelProperty("")
private Double sellingPrice;
/**
*
*/
@ApiModelProperty("")
private String status;
}

View File

@ -0,0 +1,35 @@
package com.xjrsoft.module.prdManage.dto;
import com.xjrsoft.common.page.PageInput;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* @title: 分页查询入参
* @Author 管理员
* @Date: 2025-03-12
* @Version 1.0
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class DemoAppliancePageDto extends PageInput {
/**
*
*/
@ApiModelProperty("")
private String name;
/**
*
*/
@ApiModelProperty("")
private String serialNumber;
/**
*
*/
@ApiModelProperty("")
private String category;
}

View File

@ -0,0 +1,72 @@
package com.xjrsoft.module.prdManage.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @title: 示例-家电管理
* @Author 管理员
* @Date: 2025-03-12
* @Version 1.0
*/
@Data
public class UpdateDemoApplianceDto implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
@ApiModelProperty("")
private Integer id;
/**
*
*/
@ApiModelProperty("")
private String name;
/**
*
*/
@ApiModelProperty("")
private String serialNumber;
/**
*
*/
@ApiModelProperty("")
private String category;
/**
*
*/
@ApiModelProperty("")
private LocalDateTime purchaseDate;
/**
*
*/
@ApiModelProperty("")
private Integer warrantyPeriod;
/**
*
*/
@ApiModelProperty("")
private Integer powerRating;
/**
*
*/
@ApiModelProperty("")
private String brand;
/**
*
*/
@ApiModelProperty("")
private Double sellingPrice;
/**
*
*/
@ApiModelProperty("")
private String status;
}

View File

@ -0,0 +1,68 @@
package com.xjrsoft.module.prdManage.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.time.LocalDateTime;
/**
* @title: 分页列表出参
* @Author 管理员
* @Date: 2025-03-12
* @Version 1.0
*/
@Data
public class DemoAppliancePageVo {
/**
*
*/
@ApiModelProperty("")
private String id;
/**
*
*/
@ApiModelProperty("")
private String name;
/**
*
*/
@ApiModelProperty("")
private String serialNumber;
/**
*
*/
@ApiModelProperty("")
private String category;
/**
*
*/
@ApiModelProperty("")
private LocalDateTime purchaseDate;
/**
*
*/
@ApiModelProperty("")
private Integer warrantyPeriod;
/**
*
*/
@ApiModelProperty("")
private Integer powerRating;
/**
*
*/
@ApiModelProperty("")
private String brand;
/**
*
*/
@ApiModelProperty("")
private Double sellingPrice;
/**
*
*/
@ApiModelProperty("")
private String status;
}

View File

@ -0,0 +1,70 @@
package com.xjrsoft.module.prdManage.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.time.LocalDateTime;
/**
* @title: 表单出参
* @Author 管理员
* @Date: 2025-03-12
* @Version 1.0
*/
@Data
public class DemoApplianceVo {
/**
*
*/
@ApiModelProperty("")
private Integer id;
/**
*
*/
@ApiModelProperty("")
private String name;
/**
*
*/
@ApiModelProperty("")
private String serialNumber;
/**
*
*/
@ApiModelProperty("")
private String category;
/**
*
*/
@ApiModelProperty("")
private LocalDateTime purchaseDate;
/**
*
*/
@ApiModelProperty("")
private Integer warrantyPeriod;
/**
*
*/
@ApiModelProperty("")
private Integer powerRating;
/**
*
*/
@ApiModelProperty("")
private String brand;
/**
*
*/
@ApiModelProperty("")
private Double sellingPrice;
/**
*
*/
@ApiModelProperty("")
private String status;
}

View File

@ -0,0 +1,57 @@
package com.xjrsoft.module.relationManage.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @title: demo_客户管理
* @Author 管理员
* @Date: 2025-03-11
* @Version 1.0
*/
@Data
public class AddDemoCustomerDto implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
@ApiModelProperty("")
private String name;
/**
*
*/
@ApiModelProperty("")
private String gender;
/**
*
*/
@ApiModelProperty("")
private String phone;
/**
*
*/
@ApiModelProperty("")
private String email;
/**
*
*/
@ApiModelProperty("")
private String address;
/**
*
*/
@ApiModelProperty("")
private String company;
/**
*
*/
@ApiModelProperty("")
private String position;
}

View File

@ -0,0 +1,40 @@
package com.xjrsoft.module.relationManage.dto;
import com.xjrsoft.common.page.PageInput;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* @title: 分页查询入参
* @Author 管理员
* @Date: 2025-03-11
* @Version 1.0
*/
@Data
@EqualsAndHashCode(callSuper = false)
public class DemoCustomerPageDto extends PageInput {
/**
*
*/
@ApiModelProperty("")
private String name;
/**
*
*/
@ApiModelProperty("")
private String gender;
/**
*
*/
@ApiModelProperty("")
private String phone;
/**
*
*/
@ApiModelProperty("")
private String email;
}

View File

@ -0,0 +1,61 @@
package com.xjrsoft.module.relationManage.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @title: demo_客户管理
* @Author 管理员
* @Date: 2025-03-11
* @Version 1.0
*/
@Data
public class UpdateDemoCustomerDto implements Serializable {
private static final long serialVersionUID = 1L;
/**
*
*/
@ApiModelProperty("")
private Long id;
/**
*
*/
@ApiModelProperty("")
private String name;
/**
*
*/
@ApiModelProperty("")
private String gender;
/**
*
*/
@ApiModelProperty("")
private String phone;
/**
*
*/
@ApiModelProperty("")
private String email;
/**
*
*/
@ApiModelProperty("")
private String address;
/**
*
*/
@ApiModelProperty("")
private String company;
/**
*
*/
@ApiModelProperty("")
private String position;
}

View File

@ -0,0 +1,56 @@
package com.xjrsoft.module.relationManage.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @title: 分页列表出参
* @Author 管理员
* @Date: 2025-03-11
* @Version 1.0
*/
@Data
public class DemoCustomerPageVo {
/**
*
*/
@ApiModelProperty("")
private String id;
/**
*
*/
@ApiModelProperty("")
private String name;
/**
*
*/
@ApiModelProperty("")
private String gender;
/**
*
*/
@ApiModelProperty("")
private String phone;
/**
*
*/
@ApiModelProperty("")
private String email;
/**
*
*/
@ApiModelProperty("")
private String address;
/**
*
*/
@ApiModelProperty("")
private String company;
/**
*
*/
@ApiModelProperty("")
private String position;
}

View File

@ -0,0 +1,74 @@
package com.xjrsoft.module.relationManage.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.time.LocalDateTime;
/**
* @title: 表单出参
* @Author 管理员
* @Date: 2025-03-11
* @Version 1.0
*/
@Data
public class DemoCustomerVo {
/**
*
*/
@ApiModelProperty("")
private Long id;
/**
*
*/
@ApiModelProperty("")
private String name;
/**
*
*/
@ApiModelProperty("")
private String gender;
/**
*
*/
@ApiModelProperty("")
private String phone;
/**
*
*/
@ApiModelProperty("")
private String email;
/**
*
*/
@ApiModelProperty("")
private String address;
/**
*
*/
@ApiModelProperty("")
private String company;
/**
*
*/
@ApiModelProperty("")
private String position;
@ApiModelProperty("")
private LocalDateTime createDate;
/**
*
*/
@ApiModelProperty("")
private Long createUserId;
/**
*
*/
@ApiModelProperty("")
private Long deptId;
}