update m2pool 注销账号删除api,只读页,挖矿账号等信息实现
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package com.m2pool.system.api;
|
||||
|
||||
|
||||
import com.m2pool.common.core.Result.R;
|
||||
import com.m2pool.common.core.constant.ServiceNameConstants;
|
||||
import com.m2pool.system.api.entity.SysUser;
|
||||
import com.m2pool.system.api.factory.RemotePoolFallbackFactory;
|
||||
import com.m2pool.system.api.factory.RemoteUserFallbackFactory;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
|
||||
/**
|
||||
* @Description 矿池服务
|
||||
* @Date 2026/1/5 10:15
|
||||
* @Author yyb
|
||||
*/
|
||||
@FeignClient(contextId = "remotePoolService",value = ServiceNameConstants.POOL_SERVICE,fallbackFactory = RemotePoolFallbackFactory.class)
|
||||
public interface RemotePoolService {
|
||||
|
||||
@PostMapping("/user/deleteUserDataAndPutTemporaryTable")
|
||||
R<Boolean> deleteUserDataAndPutTemporaryTable();
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.m2pool.system.api.factory;
|
||||
|
||||
import com.m2pool.common.core.Result.R;
|
||||
import com.m2pool.system.api.RemotePoolService;
|
||||
import com.m2pool.system.api.RemoteUserService;
|
||||
import com.m2pool.system.api.entity.CloseAccountVo;
|
||||
import com.m2pool.system.api.entity.SysUser;
|
||||
import com.m2pool.system.api.entity.SysUserLeveDate;
|
||||
import com.m2pool.system.api.model.LoginUser;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description 矿池服务
|
||||
* @Date 2026/1/5 10:17
|
||||
* @Author yyb
|
||||
*/
|
||||
@Component
|
||||
public class RemotePoolFallbackFactory implements FallbackFactory<RemotePoolService> {
|
||||
private static final Logger log = LoggerFactory.getLogger(RemotePoolFallbackFactory.class);
|
||||
|
||||
@Override
|
||||
public RemotePoolService create(Throwable cause) {
|
||||
log.error("矿池服务调用失败:{}",cause.getMessage());
|
||||
return new RemotePoolService(){
|
||||
@Override
|
||||
public R<Boolean> deleteUserDataAndPutTemporaryTable() {
|
||||
return R.fail("注销账户失败," + cause.getMessage());
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user