luodangjia
2024-09-18 a96c5eddcd63fa6f09e4cdce9e28c7b846068f0c
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/feignClient/AppUserClient.java
@@ -1,14 +1,16 @@
package com.ruoyi.account.api.feignClient;
import com.ruoyi.account.api.dto.GiveVipDto;
import com.ruoyi.account.api.model.TAppCoupon;
import com.ruoyi.account.api.model.TAppUser;
import com.ruoyi.account.api.model.TAppUserAddress;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.account.api.factory.AppUserFallbackFactory;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.dto.PointChangeDto;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@@ -21,6 +23,21 @@
    @ApiOperation(value = "管理后台-根据手机号查询用户ids", tags = {"管理后台-活动费用统计"})
    @PostMapping(value = "/t-app-user/user/getUserIdsByPhone")
    public R<List<Long>> getUserIdsByPhone(@RequestParam("phone") String phone);
    /**
     * 根据用户id查询用户信息
     * @param appUserIds 用户id集合
     * @return
     */
    @PostMapping(value = "/t-app-user/user/getUserByIds")
    public R<List<TAppUser>> getUserByIds(@RequestBody List<Long> appUserIds);
    /**
     * 远程调用 通过地址id 查询地址信息
     * @param id
     * @return
     */
    @GetMapping(value = "/t-app-user-address/getAddressById/{id}")
    public R<TAppUserAddress> getAddressById(@PathVariable("id") Long id);
    
    
    /**
@@ -28,6 +45,44 @@
     * @param id
     * @return
     */
    @GetMapping(value = "/user/getUserById")
    R<TAppUser> getUserById(Long id);
    @PostMapping(value = "/t-app-user/user/getUserById/{id}")
    R<TAppUser> getUserById(@PathVariable("id") Long id);
    @PostMapping(value = "/t-app-user/user/coupon/getById")
    R<TAppCoupon> couponGetById(@RequestParam("id")Long id);
    @PostMapping("/t-app-user/user/updateAppUser")
    R updateAppUser(@RequestBody TAppUser appUser);
    @PostMapping("/t-app-user/user/points/change")
    R change(@RequestBody PointChangeDto points);
    @PostMapping("/t-app-user/user/points/change/down")
    R changeDown(@RequestBody PointChangeDto points);
    /**
     * 通过手机号查询用户
     * @param phone
     * @return
     */
    @GetMapping("/t-app-user/user/selectByPhone")
    R<TAppUser> selectByPhone(@RequestParam("phone") String phone);
    /**
     * 通过手机号模糊查询用户
     * @param phone
     * @return
     */
    @GetMapping("/t-app-user/user/selectByPhoneLike")
    R<List<TAppUser>> selectByPhoneLike(@RequestParam("phone") String phone);
    /**
     * 远程调用 积分兑换订单 退款回退积分
     * @return
     */
    @PostMapping(value = "/t-app-user/refundPoints/{param}")
    public R refundPoints(@PathVariable("param")String param);
    @PostMapping(value = "/t-app-user/user/give/vip")
    public R giveVip(@RequestBody GiveVipDto giveVipDto);
}