init
This commit is contained in:
3
sl-express-ms-user-api/.gitignore
vendored
Normal file
3
sl-express-ms-user-api/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
.idea
|
||||
target/
|
||||
*.iml
|
41
sl-express-ms-user-api/pom.xml
Normal file
41
sl-express-ms-user-api/pom.xml
Normal file
@@ -0,0 +1,41 @@
|
||||
<?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">
|
||||
<parent>
|
||||
<groupId>com.sl-express</groupId>
|
||||
<artifactId>sl-express-parent</artifactId>
|
||||
<version>1.4</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<version>1.1-SNAPSHOT</version>
|
||||
<groupId>com.sl-express.ms.user</groupId>
|
||||
<artifactId>sl-express-ms-user-api</artifactId>
|
||||
<description>用户微服务-Feign接口</description>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>11</maven.compiler.source>
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
<sl-express-common.version>1.2-SNAPSHOT</sl-express-common.version>
|
||||
<sl-express-user-domain.version>1.1-SNAPSHOT</sl-express-user-domain.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.sl-express.common</groupId>
|
||||
<artifactId>sl-express-common</artifactId>
|
||||
<version>${sl-express-common.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.sl-express.ms.user</groupId>
|
||||
<artifactId>sl-express-ms-user-domain</artifactId>
|
||||
<version>${sl-express-user-domain.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
@@ -0,0 +1,64 @@
|
||||
package com.sl.ms.user.api;
|
||||
|
||||
import com.sl.ms.user.domain.dto.AddressBookDTO;
|
||||
import com.sl.transport.common.util.PageResponse;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
@FeignClient(name = "sl-express-ms-user", path = "addressBook", contextId = "AddressBook")
|
||||
@ApiIgnore
|
||||
public interface AddressBookFeign {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 页码
|
||||
* @param pageSize 页大小
|
||||
* @param userId 用户ID
|
||||
* @return 地址簿
|
||||
*/
|
||||
@GetMapping("page")
|
||||
PageResponse<AddressBookDTO> page(@RequestParam("page") Integer page,
|
||||
@RequestParam("pageSize") Integer pageSize,
|
||||
@RequestParam("userId")Long userId,
|
||||
@RequestParam("keyword") String keyword,
|
||||
@RequestParam("type") Integer type);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param dto 地址簿
|
||||
* @return 地址簿
|
||||
*/
|
||||
@PostMapping
|
||||
AddressBookDTO save(@RequestBody AddressBookDTO dto);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param id 地址簿ID
|
||||
* @param dto 地址簿
|
||||
* @return 地址簿
|
||||
*/
|
||||
@PutMapping("/{id}")
|
||||
AddressBookDTO update(@PathVariable(name = "id") Long id, @RequestBody AddressBookDTO dto);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param id 地址簿ID
|
||||
* @return 地址簿
|
||||
*/
|
||||
@DeleteMapping("/{id}")
|
||||
AddressBookDTO del(@PathVariable(name = "id") Long id);
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*
|
||||
* @param id 地址簿ID
|
||||
* @return 地址簿
|
||||
*/
|
||||
@GetMapping("detail/{id}")
|
||||
AddressBookDTO detail(@PathVariable(name = "id") Long id);
|
||||
}
|
@@ -0,0 +1,67 @@
|
||||
package com.sl.ms.user.api;
|
||||
|
||||
import com.sl.ms.user.domain.dto.MemberDTO;
|
||||
import com.sl.transport.common.util.PageResponse;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
@FeignClient(name = "sl-express-ms-user", path = "member", contextId = "Member")
|
||||
@ApiIgnore
|
||||
public interface MemberFeign {
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page
|
||||
* @param pageSize
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("page")
|
||||
PageResponse<MemberDTO> page(@RequestParam("page") Integer page, @RequestParam("pageSize") Integer pageSize);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
@PostMapping
|
||||
void save(@RequestBody MemberDTO entity);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*
|
||||
* @param id
|
||||
* @param entity
|
||||
* @return
|
||||
*/
|
||||
@PutMapping("/{id}")
|
||||
void update(@PathVariable(name = "id") Long id, @RequestBody MemberDTO entity);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping("/{id}")
|
||||
void del(@PathVariable(name = "id") Long id);
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("detail/{id}")
|
||||
MemberDTO detail(@PathVariable(name = "id") Long id);
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*
|
||||
* @param openId
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("openId/{openId}")
|
||||
MemberDTO detailByOpenId(@PathVariable(name = "openId") String openId);
|
||||
}
|
Reference in New Issue
Block a user