兴安访客小程序对接部分迁移
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package com.dcsoft.system.api;
|
||||
|
||||
import com.dcsoft.common.core.web.domain.AjaxResult;
|
||||
import com.dcsoft.system.api.domain.SmsDTO;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
@@ -59,4 +61,50 @@ public interface RemoteUserService
|
||||
*/
|
||||
@PostMapping("/user/updateOpenId")
|
||||
public R<Boolean> updateOpenId(@RequestBody SysUser sysUser, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
|
||||
/**
|
||||
* 发送短信
|
||||
*
|
||||
* @param smsDTO
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping("/user/sendMessage")
|
||||
public AjaxResult sendMessage(@RequestBody SmsDTO smsDTO, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
|
||||
/**
|
||||
* 通过用户名查询用户信息(不返回异常信息)
|
||||
*
|
||||
* @param username 用户名
|
||||
* @param source 请求来源
|
||||
* @return 结果
|
||||
*/
|
||||
@GetMapping("/user/infos/{username}")
|
||||
public R<LoginUser> getUserInfos(@PathVariable("username") String username, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
|
||||
/**
|
||||
* 查询系统配置
|
||||
* @param configKey
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/config/configKey/{configKey}")
|
||||
AjaxResult selectConfigByKey(@PathVariable("configKey") String configKey);
|
||||
|
||||
/**
|
||||
* 更新用户基本信息
|
||||
*
|
||||
* @param sysUser 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping("/role/insertVisitor")
|
||||
public AjaxResult insertVisitor(@RequestBody SysUser sysUser, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
|
||||
/**
|
||||
* 更新用户基本信息
|
||||
*
|
||||
* @param sysUser 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping("/user/updateByUserId")
|
||||
public R<?> updateByUserId(@RequestBody SysUser sysUser, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.dcsoft.system.api.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class SmsDTO {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* code值
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 短信模板入参
|
||||
*/
|
||||
private String captcha;
|
||||
|
||||
/**
|
||||
* 模板id
|
||||
*/
|
||||
private String templateId;
|
||||
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.dcsoft.system.api.factory;
|
||||
|
||||
import com.dcsoft.common.core.web.domain.AjaxResult;
|
||||
import com.dcsoft.system.api.domain.SmsDTO;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
@@ -31,6 +33,11 @@ public class RemoteUserFallbackFactory implements FallbackFactory<RemoteUserServ
|
||||
return R.fail("获取用户失败:" + throwable.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<LoginUser> getUserInfos(String username, String source) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<Boolean> registerUserInfo(SysUser sysUser, String source)
|
||||
{
|
||||
@@ -48,6 +55,26 @@ public class RemoteUserFallbackFactory implements FallbackFactory<RemoteUserServ
|
||||
return R.fail("绑定用户openid失败:" + throwable.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<?> updateByUserId(SysUser sysUser, String source) {
|
||||
return R.fail("更新用户信息失败:" + throwable.getMessage());
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult insertVisitor(SysUser sysUser, String source) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult sendMessage(SmsDTO smsDTO, String source) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult selectConfigByKey(String configKey) {
|
||||
return null;
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user