mitao
2025-02-14 ce0403c1d94ba031ecc832d0acfcb3650c33ef6b
ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/feignClient/SysUserClient.java
@@ -1,9 +1,14 @@
package com.ruoyi.system.api.feignClient;
import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.api.domain.CustomConfig;
import com.ruoyi.system.api.domain.DelayTask;
import com.ruoyi.system.api.domain.SysRole;
import com.ruoyi.system.api.domain.SysUser;
import com.ruoyi.system.api.domain.WebsocketMessageDTO;
import com.ruoyi.system.api.domain.dto.MgtAfterSaleSettingDTO;
import com.ruoyi.system.api.factory.SysUserFallbackFactory;
import java.util.List;
import org.springframework.cloud.openfeign.FeignClient;
@@ -11,6 +16,7 @@
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.RequestHeader;
@FeignClient(contextId = "sysUserClient", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = SysUserFallbackFactory.class)
public interface SysUserClient {
@@ -63,6 +69,9 @@
    @PostMapping("/user/queryUserByPhone")
    R<SysUser>  queryUserByPhone(@RequestBody String phone);
    @PostMapping("/user/queryUserByPhone1")
    R<SysUser>  queryUserByPhone1(@RequestBody String phone);
    /**
     * 通过账号查询用户
     * @param userName
@@ -71,4 +80,46 @@
    @PostMapping("/user/queryUserByUserName")
    R<SysUser>  queryUserByUserName(@RequestBody String userName);
    /**
     * 延时任务控制
     */
    @PostMapping("/delay-task/getDelayTask")
    public R<DelayTask> getDelayTask(@RequestBody String key,
            @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
    @PostMapping("/delay-task/addDelayTask")
    public R<?> addDelayTask(@RequestBody DelayTask delayTask,
            @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
    @PostMapping("/delay-task/deleteDelayTask")
    public R<?> deleteDelayTask(@RequestBody String key,
            @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
    @GetMapping("/custom-config/{configId}")
    R<CustomConfig>  getconfig(@PathVariable("configId") String configId);
    @PostMapping("/user/list-by-name")
    R<List<SysUser>> getUserListByName(@RequestBody SysUser sysUser,
            @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
    @GetMapping("/custom-config/get-after-sale-setting")
    R<MgtAfterSaleSettingDTO> getAfterSaleSetting();
    @PostMapping("/websocket/push-by-client-type")
    R<?> pushByClientType(@RequestBody WebsocketMessageDTO dto,
            @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
    @GetMapping("/websocket/push-all/{message}")
    R<?> pushAll(@PathVariable("message") String message,
            @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
    /**
     * 批量向指定用户推送消息
     * @param dto
     * @return
     */
    @PostMapping("/websocket/push-batch")
    R<?> pushBatch(@RequestBody WebsocketMessageDTO dto,
            @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}