调整框架及订单模块
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
<module>tashow-product-api</module>
|
||||
<module>tashow-trade-api</module>
|
||||
<module>tashow-pay-api</module>
|
||||
<module>tashow-member-api</module>
|
||||
<module>tashow-user-api</module>
|
||||
</modules>
|
||||
|
||||
</project>
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
/**
|
||||
* 消息队列的消息
|
||||
*/
|
||||
package com.tashow.cloud.memberapi.message;
|
||||
@@ -8,7 +8,7 @@
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>tashow-member-api</artifactId>
|
||||
<artifactId>tashow-user-api</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>${project.artifactId}</name>
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.tashow.cloud.memberapi.api.address;
|
||||
package com.tashow.cloud.userapi.api.address;
|
||||
|
||||
import com.tashow.cloud.common.pojo.CommonResult;
|
||||
import com.tashow.cloud.memberapi.api.address.dto.MemberAddressRespDTO;
|
||||
import com.tashow.cloud.memberapi.enums.ApiConstants;
|
||||
import com.tashow.cloud.userapi.api.address.dto.MemberAddressRespDTO;
|
||||
import com.tashow.cloud.userapi.enums.ApiConstants;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.tashow.cloud.memberapi.api.address.dto;
|
||||
package com.tashow.cloud.userapi.api.address.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
* member API 包,定义暴露给其它模块的 API
|
||||
*/
|
||||
package com.tashow.cloud.memberapi.api;
|
||||
package com.tashow.cloud.userapi.api;
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.tashow.cloud.memberapi.api.user;
|
||||
package com.tashow.cloud.userapi.api.user;
|
||||
|
||||
import com.tashow.cloud.common.pojo.CommonResult;
|
||||
import com.tashow.cloud.memberapi.api.user.dto.MemberUserRespDTO;
|
||||
import com.tashow.cloud.memberapi.enums.ApiConstants;
|
||||
import com.tashow.cloud.userapi.api.user.dto.UserMemberRespDTO;
|
||||
import com.tashow.cloud.userapi.enums.ApiConstants;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
@@ -17,9 +17,9 @@ import static com.tashow.cloud.common.util.collection.CollectionUtils.convertMap
|
||||
* RPC 服务 - 会员用户
|
||||
*/
|
||||
@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory =
|
||||
public interface MemberUserApi {
|
||||
public interface UserMemberApi {
|
||||
|
||||
String PREFIX = ApiConstants.PREFIX + "/user";
|
||||
String PREFIX = ApiConstants.PREFIX + "/member";
|
||||
|
||||
|
||||
/**
|
||||
@@ -28,9 +28,9 @@ public interface MemberUserApi {
|
||||
* @param ids 用户编号的数组
|
||||
* @return 会员用户 Map
|
||||
*/
|
||||
default Map<Long, MemberUserRespDTO> getUserMap(Collection<Long> ids) {
|
||||
List<MemberUserRespDTO> list = getUserList(ids).getCheckedData();
|
||||
return convertMap(list, MemberUserRespDTO::getId);
|
||||
default Map<Long, UserMemberRespDTO> getUserMap(Collection<Long> ids) {
|
||||
List<UserMemberRespDTO> list = getUserList(ids).getCheckedData();
|
||||
return convertMap(list, UserMemberRespDTO::getId);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -39,7 +39,7 @@ public interface MemberUserApi {
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(PREFIX + "/get")
|
||||
CommonResult<MemberUserRespDTO> getUser(@RequestParam("id") Long id);
|
||||
CommonResult<UserMemberRespDTO> getUser(@RequestParam("id") Long id);
|
||||
|
||||
/**
|
||||
* 获得会员用户信息们
|
||||
@@ -47,7 +47,7 @@ public interface MemberUserApi {
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(PREFIX + "/list")
|
||||
CommonResult<List<MemberUserRespDTO>> getUserList(@RequestParam("ids") Collection<Long> ids);
|
||||
CommonResult<List<UserMemberRespDTO>> getUserList(@RequestParam("ids") Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 基于用户昵称,模糊匹配用户列表
|
||||
@@ -55,7 +55,7 @@ public interface MemberUserApi {
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(PREFIX + "/list-by-nickname")
|
||||
CommonResult<List<MemberUserRespDTO>> getUserListByNickname(@RequestParam("nickname") String nickname);
|
||||
CommonResult<List<UserMemberRespDTO>> getUserListByNickname(@RequestParam("nickname") String nickname);
|
||||
|
||||
/**
|
||||
* 基于手机号,精准匹配用户
|
||||
@@ -63,7 +63,7 @@ public interface MemberUserApi {
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(PREFIX + "/get-by-mobile")
|
||||
CommonResult<MemberUserRespDTO> getUserByMobile(@RequestParam("mobile") String mobile);
|
||||
CommonResult<UserMemberRespDTO> getUserByMobile(@RequestParam("mobile") String mobile);
|
||||
|
||||
/**
|
||||
* 校验用户是否存在
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.tashow.cloud.memberapi.api.user.dto;
|
||||
package com.tashow.cloud.userapi.api.user.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.time.LocalDateTime;
|
||||
* RPC 服务 - 用户信息 Response DTO
|
||||
*/
|
||||
@Data
|
||||
public class MemberUserRespDTO {
|
||||
public class UserMemberRespDTO {
|
||||
|
||||
//用户编号
|
||||
private Long id;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.tashow.cloud.memberapi.enums;
|
||||
package com.tashow.cloud.userapi.enums;
|
||||
|
||||
|
||||
import com.tashow.cloud.common.enums.RpcConstants;
|
||||
@@ -15,9 +15,9 @@ public class ApiConstants {
|
||||
*
|
||||
* 注意,需要保证和 spring.application.name 保持一致
|
||||
*/
|
||||
public static final String NAME = "member-server";
|
||||
public static final String NAME = "user-server";
|
||||
|
||||
public static final String PREFIX = RpcConstants.RPC_API_PREFIX + "/member";
|
||||
public static final String PREFIX = RpcConstants.RPC_API_PREFIX + "/user";
|
||||
|
||||
public static final String VERSION = "1.0.0";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.tashow.cloud.memberapi.enums;
|
||||
package com.tashow.cloud.userapi.enums;
|
||||
|
||||
/**
|
||||
* Member 字典类型的枚举类
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.tashow.cloud.memberapi.enums;
|
||||
package com.tashow.cloud.userapi.enums;
|
||||
|
||||
|
||||
import com.tashow.cloud.common.exception.ErrorCode;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.tashow.cloud.memberapi.enums;
|
||||
package com.tashow.cloud.userapi.enums;
|
||||
|
||||
import cn.hutool.core.util.EnumUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.tashow.cloud.memberapi.enums.point;
|
||||
package com.tashow.cloud.userapi.enums.point;
|
||||
|
||||
import cn.hutool.core.util.EnumUtil;
|
||||
import com.tashow.cloud.common.core.ArrayValuable;
|
||||
@@ -0,0 +1,4 @@
|
||||
/**
|
||||
* 消息队列的消息
|
||||
*/
|
||||
package com.tashow.cloud.userapi.message;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.tashow.cloud.memberapi.message.user;
|
||||
package com.tashow.cloud.userapi.message.user;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
Reference in New Issue
Block a user