feat:seata单元测试

This commit is contained in:
haoxr 2021-01-07 23:53:36 +08:00
parent 0a9d911929
commit 6c3c5ed104
3 changed files with 28 additions and 5 deletions

View File

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

View File

@ -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.AuthMemberDTO;
import com.youlai.mall.ums.pojo.dto.MemberDTO; import com.youlai.mall.ums.pojo.dto.MemberDTO;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@FeignClient("mall-ums") @FeignClient("mall-ums")
public interface MemberFeignService { public interface MemberFeignService {
@ -28,6 +25,14 @@ public interface MemberFeignService {
*/ */
@GetMapping("/api.app/v1/members/openid/{openid}") @GetMapping("/api.app/v1/members/openid/{openid}")
Result<AuthMemberDTO> getMemberByOpenid(@PathVariable String openid); Result<AuthMemberDTO> getMemberByOpenid(@PathVariable String openid);
/**
* 修改会员积分
*/
@PutMapping("/api.app/v1/members/{id}/point")
Result updatePoint(@PathVariable Long id, @RequestParam Integer point);
} }

View File

@ -31,7 +31,7 @@ public class UmsMember {
private Integer status; private Integer status;
private Integer integration; private Integer point;
} }