From 6c3c5ed10452614616ba7e474ea9d7f78cea9b6f Mon Sep 17 00:00:00 2001 From: haoxr <1490493387@qq.com> Date: Thu, 7 Jan 2021 23:53:36 +0800 Subject: [PATCH] =?UTF-8?q?feat:seata=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../youlai/mall/pms/api/SkuFeignService.java | 18 ++++++++++++++++++ .../mall/ums/api/MemberFeignService.java | 13 +++++++++---- .../com/youlai/mall/ums/pojo/UmsMember.java | 2 +- 3 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 mall-pms/pms-api/src/main/java/com/youlai/mall/pms/api/SkuFeignService.java diff --git a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/api/SkuFeignService.java b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/api/SkuFeignService.java new file mode 100644 index 000000000..498d7042d --- /dev/null +++ b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/api/SkuFeignService.java @@ -0,0 +1,18 @@ +package com.youlai.mall.pms.api; + +import com.youlai.common.core.result.Result; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.*; + +@FeignClient("mall-pms") +public interface SkuFeignService { + + /** + * 修改商品库存 + */ + @PutMapping("/api.app/v1/skus/{id}/stock") + Result updateStock(@PathVariable Long id, @RequestParam Integer num); + +} + + diff --git a/mall-ums/ums-api/src/main/java/com/youlai/mall/ums/api/MemberFeignService.java b/mall-ums/ums-api/src/main/java/com/youlai/mall/ums/api/MemberFeignService.java index 04a2421e0..3093c9ba6 100644 --- a/mall-ums/ums-api/src/main/java/com/youlai/mall/ums/api/MemberFeignService.java +++ b/mall-ums/ums-api/src/main/java/com/youlai/mall/ums/api/MemberFeignService.java @@ -5,10 +5,7 @@ import com.youlai.mall.ums.pojo.UmsMember; import com.youlai.mall.ums.pojo.dto.AuthMemberDTO; import com.youlai.mall.ums.pojo.dto.MemberDTO; import org.springframework.cloud.openfeign.FeignClient; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.*; @FeignClient("mall-ums") public interface MemberFeignService { @@ -28,6 +25,14 @@ public interface MemberFeignService { */ @GetMapping("/api.app/v1/members/openid/{openid}") Result getMemberByOpenid(@PathVariable String openid); + + + /** + * 修改会员积分 + */ + @PutMapping("/api.app/v1/members/{id}/point") + Result updatePoint(@PathVariable Long id, @RequestParam Integer point); + } diff --git a/mall-ums/ums-api/src/main/java/com/youlai/mall/ums/pojo/UmsMember.java b/mall-ums/ums-api/src/main/java/com/youlai/mall/ums/pojo/UmsMember.java index 936e2374b..0aebb9632 100644 --- a/mall-ums/ums-api/src/main/java/com/youlai/mall/ums/pojo/UmsMember.java +++ b/mall-ums/ums-api/src/main/java/com/youlai/mall/ums/pojo/UmsMember.java @@ -31,7 +31,7 @@ public class UmsMember { private Integer status; - private Integer integration; + private Integer point; }