update v1.1.0 新增用户详情挖矿账户所有收益金额、时间、状态、转账地址查询。用户列表接口新增返回挖矿账户状态
This commit is contained in:
parent
eeee428a94
commit
1ea709d1a8
|
@ -5,11 +5,9 @@ import com.m2pool.common.core.web.page.TableDataInfo;
|
|||
import com.m2pool.common.security.annotation.RequiresLogin;
|
||||
import com.m2pool.manage.dto.ManageBroadcastDto;
|
||||
import com.m2pool.manage.dto.ManageUserDto;
|
||||
import com.m2pool.manage.dto.ManageUserInfoDto;
|
||||
import com.m2pool.manage.service.ManageUserService;
|
||||
import com.m2pool.manage.vo.EmailVo;
|
||||
import com.m2pool.manage.vo.ManageBaseVo;
|
||||
import com.m2pool.manage.vo.ManageUserVo;
|
||||
import com.m2pool.manage.vo.PageVo;
|
||||
import com.m2pool.manage.vo.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
|
@ -33,7 +31,7 @@ public class ManageUserController {
|
|||
private ManageUserService manageUserService;
|
||||
|
||||
@PostMapping("/list/info")
|
||||
@ApiOperation(value = "管理系统:查询注册用户信息列表")
|
||||
@ApiOperation(value = "管理系统:查询注册用户信息列表,包括邮箱、挖矿账号、起付额、挖矿账户状态")
|
||||
@RequiresLogin
|
||||
public TableDataInfo<ManageUserDto> listInfo(@RequestBody ManageUserVo manageUserVo){
|
||||
return manageUserService.listInfo(manageUserVo);
|
||||
|
@ -47,4 +45,13 @@ public class ManageUserController {
|
|||
manageUserService.sendTextMailMessage(emailVo.getTo(),emailVo.getSubject(),emailVo.getText());
|
||||
}
|
||||
|
||||
@PostMapping("/get/user/info")
|
||||
@ApiOperation(value = "管理系统:挖矿账户所有收益金额、时间、状态、转账地址")
|
||||
@RequiresLogin
|
||||
public R<ManageUserInfoDto> getUserInfo(@RequestBody ManageUserInfoVo manageUserInfoVo){
|
||||
return manageUserService.getUserInfo(manageUserInfoVo);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -34,4 +34,8 @@ public class ManageUserDto {
|
|||
|
||||
@ApiModelProperty(value = "最小起付金额",example = "100.0")
|
||||
private String amount;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "挖矿用户状态",example = "0 11")
|
||||
private Integer status;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
package com.m2pool.manage.dto;
|
||||
|
||||
import com.alibaba.nacos.shaded.org.checkerframework.checker.units.qual.A;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @Description 查询用户详情信息放回对象
|
||||
* @Date 2025/5/22 17:18
|
||||
* @Author yyb
|
||||
*/
|
||||
@Builder
|
||||
@Data
|
||||
@ApiModel(value = "ManageUserInfoDto", description = "查询用户详情信息放回对象")
|
||||
public class ManageUserInfoDto {
|
||||
|
||||
|
||||
@ApiModelProperty(value = "用户对应的挖矿账号(一个用户可以对应多个)",example = "ceshi1")
|
||||
private String user;
|
||||
|
||||
@ApiModelProperty(value = "币种",example = "nexa")
|
||||
private String coin;
|
||||
|
||||
@ApiModelProperty(value = "转账地址",example = "D7tviVPKtTd2qnkzJEVfZWQqzV6NyQqHxw")
|
||||
private String address;
|
||||
|
||||
@ApiModelProperty(value = "交易创建时间",example = "2025-06-16 00:00:00")
|
||||
private LocalDateTime createDate;
|
||||
|
||||
@ApiModelProperty(value = "",example = "2025-06-16 00:00:00")
|
||||
private LocalDateTime shouldOutDate;
|
||||
|
||||
@ApiModelProperty(value = "最大高度",example = "100000")
|
||||
private String maxHeight;
|
||||
|
||||
@ApiModelProperty(value = "交易金额",example = " 273920.9666238700")
|
||||
private BigDecimal amount;
|
||||
}
|
|
@ -2,6 +2,7 @@ package com.m2pool.manage.mapper;
|
|||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.m2pool.manage.dto.ManageUserDto;
|
||||
import com.m2pool.manage.dto.ManageUserInfoDto;
|
||||
import com.m2pool.manage.entity.ManageBroadcast;
|
||||
import com.m2pool.manage.vo.ManageBaseVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
@ -21,4 +22,12 @@ public interface ManageBroadcastMapper extends BaseMapper<ManageBroadcast> {
|
|||
*/
|
||||
List<ManageUserDto> selectUserListByPage(@Param("coin") String coin,@Param("user")String user,@Param("minerUser") String minerUser);
|
||||
|
||||
|
||||
/**
|
||||
* 管理系统:挖矿账户所有收益金额、时间、状态、转账地址
|
||||
* @param user
|
||||
* @param coin
|
||||
* @return
|
||||
*/
|
||||
ManageUserInfoDto getUserInfo(@Param("user") String user,@Param("coin") String coin);
|
||||
}
|
||||
|
|
|
@ -3,10 +3,9 @@ package com.m2pool.manage.service;
|
|||
import com.m2pool.common.core.Result.R;
|
||||
import com.m2pool.common.core.web.page.TableDataInfo;
|
||||
import com.m2pool.manage.dto.ManageUserDto;
|
||||
import com.m2pool.manage.vo.ManageBaseVo;
|
||||
import com.m2pool.manage.dto.ManageUserInfoDto;
|
||||
import com.m2pool.manage.vo.ManageUserInfoVo;
|
||||
import com.m2pool.manage.vo.ManageUserVo;
|
||||
import com.m2pool.manage.vo.PageVo;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
@ -28,4 +27,12 @@ public interface ManageUserService{
|
|||
* @param text
|
||||
*/
|
||||
void sendTextMailMessage(String to,String subject,String text);
|
||||
|
||||
|
||||
/**
|
||||
* 管理系统:挖矿账户所有收益金额、时间、状态、转账地址
|
||||
* @param manageUserInfoVo
|
||||
* @return
|
||||
*/
|
||||
R<ManageUserInfoDto> getUserInfo(ManageUserInfoVo manageUserInfoVo);
|
||||
}
|
||||
|
|
|
@ -7,9 +7,11 @@ import com.m2pool.common.core.constant.HttpStatus;
|
|||
import com.m2pool.common.core.web.page.TableDataInfo;
|
||||
import com.m2pool.manage.dto.ManageBroadcastDto;
|
||||
import com.m2pool.manage.dto.ManageUserDto;
|
||||
import com.m2pool.manage.dto.ManageUserInfoDto;
|
||||
import com.m2pool.manage.mapper.ManageBroadcastMapper;
|
||||
import com.m2pool.manage.service.ManageUserService;
|
||||
import com.m2pool.manage.vo.ManageBaseVo;
|
||||
import com.m2pool.manage.vo.ManageUserInfoVo;
|
||||
import com.m2pool.manage.vo.ManageUserVo;
|
||||
import com.m2pool.manage.vo.PageVo;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
@ -83,4 +85,10 @@ public class ManageUserServiceImpl implements ManageUserService {
|
|||
//System.out.println("发送邮件失败:"+e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public R<ManageUserInfoDto> getUserInfo(ManageUserInfoVo manageUserInfoVo) {
|
||||
ManageUserInfoDto manageUserInfoDto = manageBroadcastMapper.getUserInfo(manageUserInfoVo.getMinerUser(), manageUserInfoVo.getCoin());
|
||||
return R.success(manageUserInfoDto);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
package com.m2pool.manage.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Description 查询用户详情信请求对象
|
||||
* @Date 2025/5/22 17:18
|
||||
* @Author yyb
|
||||
*/
|
||||
@Builder
|
||||
@Data
|
||||
@ApiModel(value = "ManageUserInfoVo", description = "查询用户详情信请求对象")
|
||||
public class ManageUserInfoVo {
|
||||
|
||||
|
||||
@ApiModelProperty(value = "用户对应的挖矿账号(一个用户可以对应多个)",example = "ceshi1",required = true)
|
||||
private String minerUser;
|
||||
|
||||
@ApiModelProperty(value = "币种",example = "nexa",required = true)
|
||||
private String coin;
|
||||
|
||||
}
|
|
@ -12,7 +12,8 @@
|
|||
uma.miner_user as minerUser,
|
||||
uma.coin,
|
||||
uab.balance,
|
||||
COALESCE(uab.amount,0)
|
||||
COALESCE(uab.amount,0),
|
||||
uma.status
|
||||
FROM
|
||||
user_account_balance uab
|
||||
LEFT JOIN user_miner_account uma ON uab.ma_id = uma.id
|
||||
|
@ -26,4 +27,22 @@
|
|||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="getUserInfo" resultType="com.m2pool.manage.dto.ManageUserInfoDto">
|
||||
SELECT
|
||||
id,
|
||||
coin,
|
||||
`user`,
|
||||
address,
|
||||
create_date,
|
||||
should_out_date,
|
||||
max_height,
|
||||
amount,
|
||||
state
|
||||
FROM
|
||||
wallet_inv2
|
||||
WHERE
|
||||
coin = #{coin}
|
||||
AND `user` = #{user};
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
Loading…
Reference in New Issue