节点销售模块代码开发

This commit is contained in:
1186 2024-07-01 10:19:46 +08:00
parent ef0ef523b0
commit 9070c4b91a
43 changed files with 3099 additions and 1073 deletions

View File

@ -0,0 +1,155 @@
package com.ruoyi.web.controller;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.Config;
import com.ruoyi.system.service.ConfigService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 一些配置Controller
*
* @author HayDen
* @date 2024-06-27
*/
@Controller
@RequestMapping("/project/config")
public class ConfigController extends BaseController
{
private String prefix = "project/config";
@Autowired
private ConfigService configService;
@RequiresPermissions("project:config:view")
@GetMapping()
public String config()
{
return prefix + "/configList";
}
/**
* 查询一些配置列表
*/
@RequiresPermissions("project:config:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(Config config)
{
startPage();
List<Config> list = configService.selectConfigList(config);
return getDataTable(list);
}
/**
* 查询一些配置对象
*/
@RequiresPermissions("project:config:config")
@PostMapping("/config")
@ResponseBody
public Config findConfig(Config config)
{
config = configService.findConfig(config);
return config;
}
/**
* 导出一些配置列表
*/
@RequiresPermissions("project:config:export")
@Log(title = "一些配置", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(Config config)
{
List<Config> list = configService.selectConfigList(config);
ExcelUtil<Config> util = new ExcelUtil<Config>(Config.class);
return util.exportExcel(list, "一些配置");
}
/**
* 新增一些配置
*/
@GetMapping("/add")
public String add()
{
return prefix + "/configAdd";
}
/**
* 新增一些配置
*/
@GetMapping(value = { "/add/{id}", "/add/" })
public String add(@PathVariable(value = "id", required = false) Integer id, ModelMap mmap)
{
if (StringUtils.isNotNull(id))
{
mmap.put("config", configService.selectConfigById(id));
}
return prefix + "/configAdd";
}
/**
* 新增保存一些配置
*/
@RequiresPermissions("project:config:add")
@Log(title = "一些配置", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(Config config)
{
SysUser sysUser = getSysUser();
config.setCreateBy(sysUser.getUserName());
return toAjax(configService.updateOrAddConfig(config));
}
/**
* 修改一些配置
*/
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") Integer id, ModelMap mmap)
{
Config config = configService.selectConfigById(id);
mmap.put("config", config);
return prefix + "/configEdit";
}
/**
* 修改保存一些配置
*/
@RequiresPermissions("project:config:edit")
@Log(title = "一些配置", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(Config config)
{
SysUser sysUser = getSysUser();
config.setUpdateBy(sysUser.getUserName());
return toAjax(configService.updateOrAddConfig(config));
}
/**
* 删除一些配置
*/
@RequiresPermissions("project:config:remove")
@Log(title = "一些配置", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(configService.deleteConfigByIds(ids));
}
}

View File

@ -1,220 +0,0 @@
package com.ruoyi.web.controller;
import com.ruoyi.common.utils.StringUtils;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.system.domain.NodeSetting;
import com.ruoyi.system.domain.TMember;
import com.ruoyi.system.service.NodeSettingService;
import com.ruoyi.system.service.TMemberService;
import com.ruoyi.system.utils.NumberUtil;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.NodeBuyLog;
import com.ruoyi.system.service.NodeBuyLogService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
/**
* 节点认购记录Controller
*
* @author HayDen
* @date 2024-01-08
*/
@Controller
@RequestMapping("/project/nodeSubscribe")
public class NodeBuyLogController extends BaseController
{
private String prefix = "project/nodeBuyLog";
@Autowired
private NodeBuyLogService nodeSubscribeService;
@Autowired
private NodeSettingService nodeSettingService;
@Autowired
private TMemberService tMemberService;
@RequiresPermissions("project:nodeSubscribe:view")
@GetMapping()
public String nodeSubscribe()
{
return prefix + "/nodeSubscribeList";
}
/**
* 查询节点认购记录列表
*/
@RequiresPermissions("project:nodeSubscribe:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(NodeBuyLog nodeSubscribe)
{
if(!StringUtils.isEmpty(nodeSubscribe.getTopAddress())){
TMember tMember = tMemberService.findTMember(new TMember().setAccount(nodeSubscribe.getTopAddress()));
if(tMember == null || tMember.getTopUser().equals(0)){
return getDataTable(new ArrayList<>());
}
nodeSubscribe.setTopUserId(tMember.getId());
}
startPage();
List<NodeBuyLog> list = nodeSubscribeService.selectNodeSubscribeList(nodeSubscribe);
return getDataTable(list);
}
/**
* 查询节点认购记录对象
*/
@RequiresPermissions("project:nodeSubscribe:nodeSubscribe")
@PostMapping("/nodeSubscribe")
@ResponseBody
public NodeBuyLog findNodeSubscribe(NodeBuyLog nodeSubscribe)
{
nodeSubscribe = nodeSubscribeService.findNodeSubscribe(nodeSubscribe);
return nodeSubscribe;
}
/**
* 导出节点认购记录列表
*/
@RequiresPermissions("project:nodeSubscribe:export")
@Log(title = "节点认购记录", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(NodeBuyLog nodeSubscribe)
{
List<NodeBuyLog> list = nodeSubscribeService.selectNodeSubscribeList(nodeSubscribe);
ExcelUtil<NodeBuyLog> util = new ExcelUtil<NodeBuyLog>(NodeBuyLog.class);
return util.exportExcel(list, "节点认购记录");
}
/**
* 新增节点认购记录
*/
@GetMapping("/add")
public String add()
{
return prefix + "/nodeSubscribeAdd";
}
/**
* 新增节点认购记录
*/
@GetMapping(value = { "/add/{id}", "/add/" })
public String add(@PathVariable(value = "id", required = false) Integer id, ModelMap mmap)
{
if (StringUtils.isNotNull(id))
{
mmap.put("nodeSubscribe", nodeSubscribeService.selectNodeSubscribeById(id));
}
return prefix + "/nodeSubscribeAdd";
}
/**
* 新增保存节点认购记录
*/
@RequiresPermissions("project:nodeSubscribe:add")
@Log(title = "节点认购记录", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(NodeBuyLog nodeSubscribe)
{
SysUser sysUser = getSysUser();
nodeSubscribe.setCreateBy(sysUser.getUserName());
nodeSubscribe.setAddress(nodeSubscribe.getWalletAddress().toLowerCase());
TMember tMember = tMemberService.findTMember(new TMember().setAccount(nodeSubscribe.getAddress()));
if(tMember == null){
return error("该地址未注册");
}
nodeSubscribe.setInputAddress("");
nodeSubscribe.setOutAddress("");
//查询当前生效的节点
NodeSetting nodeSetting = nodeSettingService.findNodeSetting(new NodeSetting().setStatus(1));
if(nodeSetting == null){
return error("当前没有可分配的NFT");
}
nodeSubscribe.setNodeSettingId(nodeSetting.getId().intValue());
nodeSubscribe.setOrderNumber("0x000000000000");
nodeSubscribe.setIllustrate("后台手动分配");
nodeSubscribe.setStatus(2);
nodeSubscribe.setUserId(tMember.getId().intValue());
nodeSubscribe.setPayCoin("USDT");
return toAjax(nodeSubscribeService.updateOrAddNodeSubscribe(nodeSubscribe));
}
/**
* 修改节点认购记录
*/
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") Integer id, ModelMap mmap)
{
NodeBuyLog nodeSubscribe = nodeSubscribeService.selectNodeSubscribeById(id);
mmap.put("nodeSubscribe", nodeSubscribe);
return prefix + "/nodeSubscribeEdit";
}
/**
* 修改保存节点认购记录
*/
@RequiresPermissions("project:nodeSubscribe:edit")
@Log(title = "节点认购记录", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(NodeBuyLog nodeSubscribe)
{
SysUser sysUser = getSysUser();
nodeSubscribe.setUpdateBy(sysUser.getUserName());
NodeBuyLog log = nodeSubscribeService.findNodeSubscribe(new NodeBuyLog().setHash(nodeSubscribe.getHash()));
if(log != null){
return error("hash不能重复绑定");
}
log = nodeSubscribeService.selectNodeSubscribeById(nodeSubscribe.getId().intValue());
if(log == null || !org.apache.commons.lang3.StringUtils.isBlank(log.getHash())){
return error("无法重复绑定hash");
}
nodeSubscribe.setStatus(2);
nodeSubscribe.setCreateTime(new Date());
return toAjax(nodeSubscribeService.updateOrAddNodeSubscribe(nodeSubscribe));
}
@Log(title = "结算数据", businessType = BusinessType.UPDATE)
@PostMapping( "/settlement")
@ResponseBody
public AjaxResult settlement(String ids)
{
System.out.printf(ids);
String[] arr = ids.split(",");
Integer code = nodeSubscribeService.countLogTop(arr);
if(arr.length != code){
return error("只有未结算的数据才能结算哦!");
}
return toAjax(nodeSubscribeService.updateBuyLogTop(arr));
}
/**
* 删除节点认购记录
*/
@RequiresPermissions("project:nodeSubscribe:remove")
@Log(title = "节点认购记录", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(nodeSubscribeService.deleteNodeSubscribeByIds(ids));
}
}

View File

@ -0,0 +1,157 @@
package com.ruoyi.web.controller;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.NodeIncomeConfig;
import com.ruoyi.system.service.NodeIncomeConfigService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import java.math.BigDecimal;
import java.util.List;
/**
* 收益配置Controller
*
* @author HayDen
* @date 2024-06-27
*/
@Controller
@RequestMapping("/project/nodeIncomeConfig")
public class NodeIncomeConfigController extends BaseController
{
private String prefix = "project/nodeIncomeConfig";
@Autowired
private NodeIncomeConfigService nodeIncomeConfigService;
@RequiresPermissions("project:nodeIncomeConfig:view")
@GetMapping()
public String nodeIncomeConfig()
{
return prefix + "/nodeIncomeConfigList";
}
/**
* 查询收益配置列表
*/
@RequiresPermissions("project:nodeIncomeConfig:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(NodeIncomeConfig nodeIncomeConfig)
{
startPage();
List<NodeIncomeConfig> list = nodeIncomeConfigService.selectNodeIncomeConfigList(nodeIncomeConfig);
return getDataTable(list);
}
/**
* 查询收益配置对象
*/
@RequiresPermissions("project:nodeIncomeConfig:nodeIncomeConfig")
@PostMapping("/nodeIncomeConfig")
@ResponseBody
public NodeIncomeConfig findNodeIncomeConfig(NodeIncomeConfig nodeIncomeConfig)
{
nodeIncomeConfig = nodeIncomeConfigService.findNodeIncomeConfig(nodeIncomeConfig);
return nodeIncomeConfig;
}
/**
* 导出收益配置列表
*/
@RequiresPermissions("project:nodeIncomeConfig:export")
@Log(title = "收益配置", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(NodeIncomeConfig nodeIncomeConfig)
{
List<NodeIncomeConfig> list = nodeIncomeConfigService.selectNodeIncomeConfigList(nodeIncomeConfig);
ExcelUtil<NodeIncomeConfig> util = new ExcelUtil<NodeIncomeConfig>(NodeIncomeConfig.class);
return util.exportExcel(list, "收益配置");
}
/**
* 新增收益配置
*/
@GetMapping("/add")
public String add()
{
return prefix + "/nodeIncomeConfigAdd";
}
/**
* 新增收益配置
*/
@GetMapping(value = { "/add/{id}", "/add/" })
public String add(@PathVariable(value = "id", required = false) Integer id, ModelMap mmap)
{
if (StringUtils.isNotNull(id))
{
mmap.put("nodeIncomeConfig", nodeIncomeConfigService.selectNodeIncomeConfigById(id));
}
return prefix + "/nodeIncomeConfigAdd";
}
/**
* 新增保存收益配置
*/
@RequiresPermissions("project:nodeIncomeConfig:add")
@Log(title = "收益配置", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(NodeIncomeConfig nodeIncomeConfig)
{
SysUser sysUser = getSysUser();
nodeIncomeConfig.setCreateBy(sysUser.getUserName());
return toAjax(nodeIncomeConfigService.updateOrAddNodeIncomeConfig(nodeIncomeConfig));
}
/**
* 修改收益配置
*/
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") Integer id, ModelMap mmap)
{
NodeIncomeConfig nodeIncomeConfig = nodeIncomeConfigService.selectNodeIncomeConfigById(id);
nodeIncomeConfig.setIncome(new BigDecimal(nodeIncomeConfig.getIncome().stripTrailingZeros().toPlainString()));
mmap.put("nodeIncomeConfig", nodeIncomeConfig);
return prefix + "/nodeIncomeConfigEdit";
}
/**
* 修改保存收益配置
*/
@RequiresPermissions("project:nodeIncomeConfig:edit")
@Log(title = "收益配置", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(NodeIncomeConfig nodeIncomeConfig)
{
SysUser sysUser = getSysUser();
nodeIncomeConfig.setUpdateBy(sysUser.getUserName());
return toAjax(nodeIncomeConfigService.updateOrAddNodeIncomeConfig(nodeIncomeConfig));
}
/**
* 删除收益配置
*/
@RequiresPermissions("project:nodeIncomeConfig:remove")
@Log(title = "收益配置", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(nodeIncomeConfigService.deleteNodeIncomeConfigByIds(ids));
}
}

View File

@ -1,187 +0,0 @@
package com.ruoyi.web.controller;
import com.ruoyi.common.utils.StringUtils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.system.service.NodeSettingService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.NodePriceConfig;
import com.ruoyi.system.service.NodePriceConfigService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import javax.annotation.Resource;
/**
* 节点价格区间配置Controller
*
* @author HayDen
* @date 2024-01-08
*/
@Controller
@RequestMapping("/project/nodePriceConfig")
public class NodePriceConfigController extends BaseController
{
private String prefix = "project/nodePriceConfig";
@Autowired
private NodePriceConfigService nodePriceConfigService;
@Resource
private NodeSettingService nodeSettingService;
public Map<Long,Long> map = new HashMap<>();
@RequiresPermissions("project:nodePriceConfig:view")
@GetMapping()
public String nodePriceConfig(Long id)
{
SysUser sysUser = getSysUser();
map.put(sysUser.getUserId(),id);
return prefix + "/nodePriceConfigList";
}
/**
* 查询节点价格区间配置列表
*/
@RequiresPermissions("project:nodePriceConfig:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(NodePriceConfig nodePriceConfig)
{
startPage();
SysUser sysUser = getSysUser();
nodePriceConfig.setNodeSettingId(map.get(sysUser.getUserId()).intValue());
List<NodePriceConfig> list = nodePriceConfigService.selectNodePriceConfigList(nodePriceConfig);
return getDataTable(list);
}
/**
* 查询节点价格区间配置对象
*/
@RequiresPermissions("project:nodePriceConfig:nodePriceConfig")
@PostMapping("/nodePriceConfig")
@ResponseBody
public NodePriceConfig findNodePriceConfig(NodePriceConfig nodePriceConfig)
{
nodePriceConfig = nodePriceConfigService.findNodePriceConfig(nodePriceConfig);
return nodePriceConfig;
}
/**
* 导出节点价格区间配置列表
*/
@RequiresPermissions("project:nodePriceConfig:export")
@Log(title = "节点价格区间配置", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(NodePriceConfig nodePriceConfig)
{
List<NodePriceConfig> list = nodePriceConfigService.selectNodePriceConfigList(nodePriceConfig);
ExcelUtil<NodePriceConfig> util = new ExcelUtil<NodePriceConfig>(NodePriceConfig.class);
return util.exportExcel(list, "节点价格区间配置");
}
/**
* 新增节点价格区间配置
*/
@GetMapping("/add")
public String add()
{
return prefix + "/nodePriceConfigAdd";
}
/**
* 新增节点价格区间配置
*/
@GetMapping(value = { "/add/{id}", "/add/" })
public String add(@PathVariable(value = "id", required = false) Integer id, ModelMap mmap)
{
if (StringUtils.isNotNull(id))
{
mmap.put("nodePriceConfig", nodePriceConfigService.selectNodePriceConfigById(id));
}
return prefix + "/nodePriceConfigAdd";
}
/**
* 新增保存节点价格区间配置
*/
@RequiresPermissions("project:nodePriceConfig:add")
@Log(title = "节点价格区间配置", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(NodePriceConfig nodePriceConfig)
{
SysUser sysUser = getSysUser();
if(nodeSettingService.countPriceConfig(nodePriceConfig.getStartNum(),nodePriceConfig.getEndNum(),null,map.get(sysUser.getUserId()).intValue()) > 0){
return error("该区间的配置已存在");
}
if(nodePriceConfig.getStartNum() >= nodePriceConfig.getEndNum()){
return error("配置区间错误");
}
nodePriceConfig.setNodeSettingId(map.get(sysUser.getUserId()).intValue());
nodePriceConfig.setCreateBy(sysUser.getUserName());
return toAjax(nodePriceConfigService.updateOrAddNodePriceConfig(nodePriceConfig));
}
/**
* 修改节点价格区间配置
*/
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") Integer id, ModelMap mmap)
{
NodePriceConfig nodePriceConfig = nodePriceConfigService.selectNodePriceConfigById(id);
mmap.put("nodePriceConfig", nodePriceConfig);
return prefix + "/nodePriceConfigEdit";
}
/**
* 修改保存节点价格区间配置
*/
@RequiresPermissions("project:nodePriceConfig:edit")
@Log(title = "节点价格区间配置", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(NodePriceConfig nodePriceConfig)
{
SysUser sysUser = getSysUser();
if(nodeSettingService.countPriceConfig(nodePriceConfig.getStartNum(),nodePriceConfig.getEndNum(),nodePriceConfig.getId().intValue(),map.get(sysUser.getUserId()).intValue()) > 0){
return error("该区间的配置已存在");
}
if(nodePriceConfig.getStartNum() >= nodePriceConfig.getEndNum()){
return error("配置区间错误");
}
nodePriceConfig.setUpdateBy(sysUser.getUserName());
return toAjax(nodePriceConfigService.updateOrAddNodePriceConfig(nodePriceConfig));
}
/**
* 删除节点价格区间配置
*/
@RequiresPermissions("project:nodePriceConfig:remove")
@Log(title = "节点价格区间配置", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(nodePriceConfigService.deleteNodePriceConfigByIds(ids));
}
}

View File

@ -1,193 +0,0 @@
package com.ruoyi.web.controller;
import com.ruoyi.common.utils.StringUtils;
import java.math.BigDecimal;
import java.util.List;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.system.domain.NodeAwardSetting;
import com.ruoyi.system.service.NodeAwardSettingService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.NodeSetting;
import com.ruoyi.system.service.NodeSettingService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
/**
* 节点设置Controller
*
* @author HayDen
* @date 2024-01-08
*/
@Controller
@RequestMapping("/project/nodeSetting")
public class NodeSettingController extends BaseController
{
private String prefix = "project/nodeSetting";
@Autowired
private NodeSettingService nodeSettingService;
@Autowired
private NodeAwardSettingService nodeAwardSettingService;
@RequiresPermissions("project:nodeSetting:view")
@GetMapping()
public String nodeSetting()
{
return prefix + "/nodeSettingList";
}
/**
* 查询节点设置列表
*/
@RequiresPermissions("project:nodeSetting:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(NodeSetting nodeSetting)
{
startPage();
List<NodeSetting> list = nodeSettingService.selectNodeSettingList(nodeSetting);
return getDataTable(list);
}
/**
* 查询节点设置对象
*/
@RequiresPermissions("project:nodeSetting:nodeSetting")
@PostMapping("/nodeSetting")
@ResponseBody
public NodeSetting findNodeSetting(NodeSetting nodeSetting)
{
nodeSetting = nodeSettingService.findNodeSetting(nodeSetting);
return nodeSetting;
}
/**
* 导出节点设置列表
*/
@RequiresPermissions("project:nodeSetting:export")
@Log(title = "节点设置", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(NodeSetting nodeSetting)
{
List<NodeSetting> list = nodeSettingService.selectNodeSettingList(nodeSetting);
ExcelUtil<NodeSetting> util = new ExcelUtil<NodeSetting>(NodeSetting.class);
return util.exportExcel(list, "节点设置");
}
/**
* 新增节点设置
*/
@GetMapping("/add")
public String add()
{
return prefix + "/nodeSettingAdd";
}
/**
* 新增节点设置
*/
@GetMapping(value = { "/add/{id}", "/add/" })
public String add(@PathVariable(value = "id", required = false) Integer id, ModelMap mmap)
{
if (StringUtils.isNotNull(id))
{
mmap.put("nodeSetting", nodeSettingService.selectNodeSettingById(id));
}
return prefix + "/nodeSettingAdd";
}
/**
* 新增保存节点设置
*/
@RequiresPermissions("project:nodeSetting:add")
@Log(title = "节点设置", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(NodeSetting nodeSetting)
{
nodeSetting.setNodeName(nodeSetting.getNodeNamePs());
if(nodeSettingService.findNodeSetting(new NodeSetting().setNodeGrade(nodeSetting.getNodeGrade())) != null){
return error("该等级的盒子已存在");
}
if(nodeSetting.getStatus() == 1 && nodeSettingService.findNodeSetting(new NodeSetting().setStatus(1)) != null){
return error("只能同时存在一个可销售盒子");
}
SysUser sysUser = getSysUser();
nodeSetting.setCreateBy(sysUser.getUserName());
nodeSettingService.updateOrAddNodeSetting(nodeSetting);
//开始创建奖励配置
NodeAwardSetting nodeAwardSetting = new NodeAwardSetting();
nodeAwardSetting.setNodeSettingId(nodeSetting.getId().intValue());
nodeAwardSetting.setRebate(BigDecimal.ZERO);
nodeAwardSetting.setRbitAmount(BigDecimal.ZERO);
nodeAwardSetting.setRbitOne(BigDecimal.ZERO);
nodeAwardSetting.setNftAmount(BigDecimal.ZERO);
nodeAwardSetting.setNftOne(BigDecimal.ZERO);
nodeAwardSetting.setNftTwo(BigDecimal.ZERO);
nodeAwardSettingService.updateOrAddNodeAwardSetting(nodeAwardSetting);
return toAjax(1);
}
/**
* 修改节点设置
*/
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") Integer id, ModelMap mmap)
{
NodeSetting nodeSetting = nodeSettingService.selectNodeSettingById(id);
nodeSetting.setNodeNamePs(nodeSetting.getNodeName());
mmap.put("nodeSetting", nodeSetting);
return prefix + "/nodeSettingEdit";
}
/**
* 修改保存节点设置
*/
@RequiresPermissions("project:nodeSetting:edit")
@Log(title = "节点设置", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(NodeSetting nodeSetting)
{
if(nodeSetting.getStatus() == 1){
NodeSetting nod = nodeSettingService.findNodeSetting(new NodeSetting().setStatus(1));
if(nod != null && !nod.getId().equals(nodeSetting.getId())){
return error("只能同时存在一个可销售盒子");
}
}
nodeSetting.setNodeName(nodeSetting.getNodeNamePs());
SysUser sysUser = getSysUser();
nodeSetting.setUpdateBy(sysUser.getUserName());
return toAjax(nodeSettingService.updateOrAddNodeSetting(nodeSetting));
}
/**
* 删除节点设置
*/
@RequiresPermissions("project:nodeSetting:remove")
@Log(title = "节点设置", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(nodeSettingService.deleteNodeSettingByIds(ids));
}
}

View File

@ -1,158 +0,0 @@
package com.ruoyi.web.controller;
import com.ruoyi.common.utils.StringUtils;
import java.util.List;
import com.ruoyi.common.core.domain.entity.SysUser;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.NodeTask;
import com.ruoyi.system.service.NodeTaskService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
/**
* NEER任务配置Controller
*
* @author HayDen
* @date 2024-02-24
*/
@Controller
@RequestMapping("/project/nodeTask")
public class NodeTaskController extends BaseController
{
private String prefix = "project/nodeTask";
@Autowired
private NodeTaskService nodeTaskService;
@RequiresPermissions("project:nodeTask:view")
@GetMapping()
public String nodeTask()
{
return prefix + "/nodeTaskList";
}
/**
* 查询NEER任务配置列表
*/
@RequiresPermissions("project:nodeTask:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(NodeTask nodeTask)
{
startPage();
List<NodeTask> list = nodeTaskService.selectNodeTaskList(nodeTask);
return getDataTable(list);
}
/**
* 查询NEER任务配置对象
*/
@RequiresPermissions("project:nodeTask:nodeTask")
@PostMapping("/nodeTask")
@ResponseBody
public NodeTask findNodeTask(NodeTask nodeTask)
{
nodeTask = nodeTaskService.findNodeTask(nodeTask);
return nodeTask;
}
/**
* 导出NEER任务配置列表
*/
@RequiresPermissions("project:nodeTask:export")
@Log(title = "NEER任务配置", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(NodeTask nodeTask)
{
List<NodeTask> list = nodeTaskService.selectNodeTaskList(nodeTask);
ExcelUtil<NodeTask> util = new ExcelUtil<NodeTask>(NodeTask.class);
return util.exportExcel(list, "NEER任务配置");
}
/**
* 新增NEER任务配置
*/
@GetMapping("/add")
public String add()
{
return prefix + "/nodeTaskAdd";
}
/**
* 新增NEER任务配置
*/
@GetMapping(value = { "/add/{id}", "/add/" })
public String add(@PathVariable(value = "id", required = false) Integer id, ModelMap mmap)
{
if (StringUtils.isNotNull(id))
{
mmap.put("nodeTask", nodeTaskService.selectNodeTaskById(id));
}
return prefix + "/nodeTaskAdd";
}
/**
* 新增保存NEER任务配置
*/
@RequiresPermissions("project:nodeTask:add")
@Log(title = "NEER任务配置", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(NodeTask nodeTask)
{
SysUser sysUser = getSysUser();
nodeTask.setCreateBy(sysUser.getUserName());
return toAjax(nodeTaskService.updateOrAddNodeTask(nodeTask));
}
/**
* 修改NEER任务配置
*/
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") Integer id, ModelMap mmap)
{
NodeTask nodeTask = nodeTaskService.selectNodeTaskById(id);
mmap.put("nodeTask", nodeTask);
return prefix + "/nodeTaskEdit";
}
/**
* 修改保存NEER任务配置
*/
@RequiresPermissions("project:nodeTask:edit")
@Log(title = "NEER任务配置", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(NodeTask nodeTask)
{
SysUser sysUser = getSysUser();
nodeTask.setUpdateBy(sysUser.getUserName());
return toAjax(nodeTaskService.updateOrAddNodeTask(nodeTask));
}
/**
* 删除NEER任务配置
*/
@RequiresPermissions("project:nodeTask:remove")
@Log(title = "NEER任务配置", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(nodeTaskService.deleteNodeTaskByIds(ids));
}
}

View File

@ -1,158 +0,0 @@
package com.ruoyi.web.controller;
import com.ruoyi.common.utils.StringUtils;
import java.util.List;
import com.ruoyi.common.core.domain.entity.SysUser;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.NodeTaskLog;
import com.ruoyi.system.service.NodeTaskLogService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
/**
* 我的任务奖励Controller
*
* @author HayDen
* @date 2024-02-24
*/
@Controller
@RequestMapping("/project/nodeTaskLog")
public class NodeTaskLogController extends BaseController
{
private String prefix = "project/nodeTaskLog";
@Autowired
private NodeTaskLogService nodeTaskLogService;
@RequiresPermissions("project:nodeTaskLog:view")
@GetMapping()
public String nodeTaskLog()
{
return prefix + "/nodeTaskLogList";
}
/**
* 查询我的任务奖励列表
*/
@RequiresPermissions("project:nodeTaskLog:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(NodeTaskLog nodeTaskLog)
{
startPage();
List<NodeTaskLog> list = nodeTaskLogService.selectNodeTaskLogList(nodeTaskLog);
return getDataTable(list);
}
/**
* 查询我的任务奖励对象
*/
@RequiresPermissions("project:nodeTaskLog:nodeTaskLog")
@PostMapping("/nodeTaskLog")
@ResponseBody
public NodeTaskLog findNodeTaskLog(NodeTaskLog nodeTaskLog)
{
nodeTaskLog = nodeTaskLogService.findNodeTaskLog(nodeTaskLog);
return nodeTaskLog;
}
/**
* 导出我的任务奖励列表
*/
@RequiresPermissions("project:nodeTaskLog:export")
@Log(title = "我的任务奖励", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(NodeTaskLog nodeTaskLog)
{
List<NodeTaskLog> list = nodeTaskLogService.selectNodeTaskLogList(nodeTaskLog);
ExcelUtil<NodeTaskLog> util = new ExcelUtil<NodeTaskLog>(NodeTaskLog.class);
return util.exportExcel(list, "我的任务奖励");
}
/**
* 新增我的任务奖励
*/
@GetMapping("/add")
public String add()
{
return prefix + "/nodeTaskLogAdd";
}
/**
* 新增我的任务奖励
*/
@GetMapping(value = { "/add/{id}", "/add/" })
public String add(@PathVariable(value = "id", required = false) Integer id, ModelMap mmap)
{
if (StringUtils.isNotNull(id))
{
mmap.put("nodeTaskLog", nodeTaskLogService.selectNodeTaskLogById(id));
}
return prefix + "/nodeTaskLogAdd";
}
/**
* 新增保存我的任务奖励
*/
@RequiresPermissions("project:nodeTaskLog:add")
@Log(title = "我的任务奖励", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(NodeTaskLog nodeTaskLog)
{
SysUser sysUser = getSysUser();
nodeTaskLog.setCreateBy(sysUser.getUserName());
return toAjax(nodeTaskLogService.updateOrAddNodeTaskLog(nodeTaskLog));
}
/**
* 修改我的任务奖励
*/
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") Integer id, ModelMap mmap)
{
NodeTaskLog nodeTaskLog = nodeTaskLogService.selectNodeTaskLogById(id);
mmap.put("nodeTaskLog", nodeTaskLog);
return prefix + "/nodeTaskLogEdit";
}
/**
* 修改保存我的任务奖励
*/
@RequiresPermissions("project:nodeTaskLog:edit")
@Log(title = "我的任务奖励", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(NodeTaskLog nodeTaskLog)
{
SysUser sysUser = getSysUser();
nodeTaskLog.setUpdateBy(sysUser.getUserName());
return toAjax(nodeTaskLogService.updateOrAddNodeTaskLog(nodeTaskLog));
}
/**
* 删除我的任务奖励
*/
@RequiresPermissions("project:nodeTaskLog:remove")
@Log(title = "我的任务奖励", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(nodeTaskLogService.deleteNodeTaskLogByIds(ids));
}
}

View File

@ -1,87 +1,84 @@
package com.ruoyi.web.controller;
import com.ruoyi.common.utils.StringUtils;
import java.util.List;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.UserNode;
import com.ruoyi.system.service.UserNodeService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.Node;
import com.ruoyi.system.service.NodeService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 用户节点Controller
*
* @author HayDen
* @date 2024-01-11
* @date 2024-06-27
*/
@Controller
@RequestMapping("/project/node")
public class NodeController extends BaseController
@RequestMapping("/project/userNode")
public class UserNodeController extends BaseController
{
private String prefix = "project/node";
private String prefix = "project/userNode";
@Autowired
private NodeService nodeService;
private UserNodeService userNodeService;
@RequiresPermissions("project:node:view")
@RequiresPermissions("project:userNode:view")
@GetMapping()
public String node()
public String userNode()
{
return prefix + "/nodeList";
return prefix + "/userNodeList";
}
/**
* 查询用户节点列表
*/
@RequiresPermissions("project:node:list")
@RequiresPermissions("project:userNode:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(Node node)
public TableDataInfo list(UserNode userNode)
{
if(!StringUtils.isEmpty(node.getAddress())){
node.setAddress(node.getAddress().toLowerCase());
if(!org.apache.commons.lang3.StringUtils.isBlank(userNode.getWalletAddress())){
userNode.setWalletAddress(userNode.getWalletAddress().toLowerCase());
}
startPage();
List<Node> list = nodeService.selectNodeList(node);
List<UserNode> list = userNodeService.selectUserNodeList(userNode);
return getDataTable(list);
}
/**
* 查询用户节点对象
*/
@RequiresPermissions("project:node:node")
@PostMapping("/node")
@RequiresPermissions("project:userNode:userNode")
@PostMapping("/userNode")
@ResponseBody
public Node findNode(Node node)
public UserNode findUserNode(UserNode userNode)
{
node = nodeService.findNode(node);
return node;
userNode = userNodeService.findUserNode(userNode);
return userNode;
}
/**
* 导出用户节点列表
*/
@RequiresPermissions("project:node:export")
@RequiresPermissions("project:userNode:export")
@Log(title = "用户节点", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(Node node)
public AjaxResult export(UserNode userNode)
{
List<Node> list = nodeService.selectNodeList(node);
ExcelUtil<Node> util = new ExcelUtil<Node>(Node.class);
List<UserNode> list = userNodeService.selectUserNodeList(userNode);
ExcelUtil<UserNode> util = new ExcelUtil<UserNode>(UserNode.class);
return util.exportExcel(list, "用户节点");
}
@ -91,7 +88,7 @@ public class NodeController extends BaseController
@GetMapping("/add")
public String add()
{
return prefix + "/nodeAdd";
return prefix + "/userNodeAdd";
}
/**
* 新增用户节点
@ -101,23 +98,23 @@ public class NodeController extends BaseController
{
if (StringUtils.isNotNull(id))
{
mmap.put("node", nodeService.selectNodeById(id));
mmap.put("userNode", userNodeService.selectUserNodeById(id));
}
return prefix + "/nodeAdd";
return prefix + "/userNodeAdd";
}
/**
* 新增保存用户节点
*/
@RequiresPermissions("project:node:add")
@RequiresPermissions("project:userNode:add")
@Log(title = "用户节点", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(Node node)
public AjaxResult addSave(UserNode userNode)
{
SysUser sysUser = getSysUser();
node.setCreateBy(sysUser.getUserName());
return toAjax(nodeService.updateOrAddNode(node));
userNode.setCreateBy(sysUser.getUserName());
return toAjax(userNodeService.updateOrAddUserNode(userNode));
}
/**
@ -126,36 +123,36 @@ public class NodeController extends BaseController
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") Integer id, ModelMap mmap)
{
Node node = nodeService.selectNodeById(id);
mmap.put("node", node);
return prefix + "/nodeEdit";
UserNode userNode = userNodeService.selectUserNodeById(id);
mmap.put("userNode", userNode);
return prefix + "/userNodeEdit";
}
/**
* 修改保存用户节点
*/
@RequiresPermissions("project:node:edit")
@RequiresPermissions("project:userNode:edit")
@Log(title = "用户节点", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(Node node)
public AjaxResult editSave(UserNode userNode)
{
SysUser sysUser = getSysUser();
node.setUpdateBy(sysUser.getUserName());
return toAjax(nodeService.updateOrAddNode(node));
userNode.setUpdateBy(sysUser.getUserName());
return toAjax(userNodeService.updateOrAddUserNode(userNode));
}
/**
* 删除用户节点
*/
@RequiresPermissions("project:node:remove")
@RequiresPermissions("project:userNode:remove")
@Log(title = "用户节点", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(nodeService.deleteNodeByIds(ids));
return toAjax(userNodeService.deleteUserNodeByIds(ids));
}
}

View File

@ -0,0 +1,181 @@
package com.ruoyi.web.controller;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.system.domain.TMember;
import com.ruoyi.system.domain.UserNodeLog;
import com.ruoyi.system.service.TMemberService;
import com.ruoyi.system.service.UserNodeLogService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import java.math.BigDecimal;
import java.util.List;
/**
* 节点认购记录Controller
*
* @author HayDen
* @date 2024-06-27
*/
@Controller
@RequestMapping("/project/userNodeLog")
public class UserNodeLogController extends BaseController
{
private String prefix = "project/userNodeLog";
@Autowired
private UserNodeLogService userNodeLogService;
@Autowired
private TMemberService memberService;
@RequiresPermissions("project:userNodeLog:view")
@GetMapping()
public String userNodeLog()
{
return prefix + "/userNodeLogList";
}
/**
* 查询节点认购记录列表
*/
@RequiresPermissions("project:userNodeLog:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(UserNodeLog userNodeLog)
{
if(!org.apache.commons.lang3.StringUtils.isBlank(userNodeLog.getWalletAddress())){
userNodeLog.setWalletAddress(userNodeLog.getWalletAddress().toLowerCase());
}
startPage();
List<UserNodeLog> list = userNodeLogService.selectUserNodeLogList(userNodeLog);
return getDataTable(list);
}
/**
* 查询节点认购记录对象
*/
@RequiresPermissions("project:userNodeLog:userNodeLog")
@PostMapping("/userNodeLog")
@ResponseBody
public UserNodeLog findUserNodeLog(UserNodeLog userNodeLog)
{
userNodeLog = userNodeLogService.findUserNodeLog(userNodeLog);
return userNodeLog;
}
/**
* 导出节点认购记录列表
*/
@RequiresPermissions("project:userNodeLog:export")
@Log(title = "节点认购记录", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(UserNodeLog userNodeLog)
{
List<UserNodeLog> list = userNodeLogService.selectUserNodeLogList(userNodeLog);
ExcelUtil<UserNodeLog> util = new ExcelUtil<UserNodeLog>(UserNodeLog.class);
return util.exportExcel(list, "节点认购记录");
}
/**
* 新增节点认购记录
*/
@GetMapping("/add")
public String add()
{
return prefix + "/userNodeLogAdd";
}
/**
* 新增节点认购记录
*/
@GetMapping(value = { "/add/{id}", "/add/" })
public String add(@PathVariable(value = "id", required = false) Integer id, ModelMap mmap)
{
if (StringUtils.isNotNull(id))
{
mmap.put("userNodeLog", userNodeLogService.selectUserNodeLogById(id));
}
return prefix + "/userNodeLogAdd";
}
/**
* 新增保存节点认购记录
*/
@RequiresPermissions("project:userNodeLog:add")
@Log(title = "节点认购记录", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(UserNodeLog userNodeLog)
{
SysUser sysUser = getSysUser();
userNodeLog.setCreateBy(sysUser.getUserName());
userNodeLog.setWalletAddress(userNodeLog.getWalletAddress().toLowerCase());
TMember member = memberService.findTMember(new TMember().setAccount(userNodeLog.getWalletAddress()));
if(member == null){
return error("用户不存在");
}
userNodeLog.setUserId(member.getId().intValue());
userNodeLog.setNodeSettingId(0);
userNodeLog.setBuyAmount(BigDecimal.ZERO);
userNodeLog.setStatus(2);
userNodeLog.setOrderNumber("0000000000000000");
userNodeLog.setPayCoin("USDT");
userNodeLog.setAddressOne("0");
userNodeLog.setAwardOne(BigDecimal.ZERO);
userNodeLog.setAddressTwo("0");
userNodeLog.setAwardTwo(BigDecimal.ZERO);
userNodeLog.setIllustrate("管理系统添加节点");
userNodeLog.setDataJson("后台添加节点");
return toAjax(userNodeLogService.updateOrAddUserNodeLog(userNodeLog));
}
/**
* 修改节点认购记录
*/
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") Integer id, ModelMap mmap)
{
UserNodeLog userNodeLog = userNodeLogService.selectUserNodeLogById(id);
mmap.put("userNodeLog", userNodeLog);
return prefix + "/userNodeLogEdit";
}
/**
* 修改保存节点认购记录
*/
@RequiresPermissions("project:userNodeLog:edit")
@Log(title = "节点认购记录", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(UserNodeLog userNodeLog)
{
SysUser sysUser = getSysUser();
userNodeLog.setUpdateBy(sysUser.getUserName());
return toAjax(userNodeLogService.updateOrAddUserNodeLog(userNodeLog));
}
/**
* 删除节点认购记录
*/
@RequiresPermissions("project:userNodeLog:remove")
@Log(title = "节点认购记录", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(userNodeLogService.deleteUserNodeLogByIds(ids));
}
}

View File

@ -0,0 +1,49 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增基础配置')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-config-add">
<div class="form-group">
<label class="col-sm-3 control-label is-required">1正常0删除</label>
<div class="col-sm-8">
<input class="form-control" name="flag" required type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">key</label>
<div class="col-sm-8">
<input class="form-control" name="configKey" required type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">参数值:</label>
<div class="col-sm-8">
<input class="form-control" name="value" required type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">中文说明:</label>
<div class="col-sm-8">
<input class="form-control" name="description" required type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "project/config"
$("#form-config-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-config-add').serialize());
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,53 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改基础配置')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-config-edit" th:object="${config}">
<input name="id" th:field="*{id}" type="hidden">
<!--<div class="form-group">
<label class="col-sm-3 control-label is-required">key</label>
<div class="col-sm-8">
<input class="form-control" name="configKey" readonly th:field="*{configKey}" type="text">
</div>
</div>-->
<div class="form-group">
<label class="col-sm-3 control-label is-required">中文说明:</label>
<div class="col-sm-8">
<input class="form-control" name="description" readonly th:field="*{description}" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">参数值:</label>
<div class="col-sm-8">
<input name="value" th:field="*{value}" autocomplete="off" class="form-control" type="text" required>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "project/config";
$("#form-config-edit").validate({
focusCleanup: true
});
layui.use('laydate', function(){
var laydate = layui.laydate;
//日期时间选择器
laydate.render({
elem: '#div3'
,type: 'datetime'
});
})
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-config-edit').serialize());
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,86 @@
<!DOCTYPE html>
<html lang="zh" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro" xmlns:th="http://www.thymeleaf.org">
<head>
<th:block th:include="include :: header('基础配置列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
</div>
<!--<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="project:config:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="project:config:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="project:config:export">
<i class="fa fa-download"></i> 导出
</a>
</div>-->
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('project:config:edit')}]];
var removeFlag = [[${@permission.hasPermi('project:config:remove')}]];
var prefix = ctx + "project/config";
layui.use('laydate', function(){
var laydate = layui.laydate;
//日期时间选择器
laydate.render({
elem: '#endTime'
,type: 'datetime'
});
laydate.render({
elem: '#startTime'
,type: 'datetime'
});
})
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "基础配置",
columns: [{
checkbox: true
},
{
field: 'description',
title: '中文说明'
},
{
field: 'value',
title: '参数值',
formatter: function(value, row, index) {
return row.value;
}
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>

View File

@ -0,0 +1,37 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增收益配置')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-config-add">
<div class="form-group">
<label class="col-sm-3 control-label is-required">收益比例:</label>
<div class="col-sm-8">
<input name="income" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">代数:</label>
<div class="col-sm-8">
<input name="era" class="form-control" type="text" required>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "project/nodeIncomeConfig"
$("#form-config-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-config-add').serialize());
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,38 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改收益配置')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-config-edit" th:object="${nodeIncomeConfig}">
<input name="id" th:field="*{id}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required">收益比例:</label>
<div class="col-sm-8">
<input name="income" th:field="*{income}" onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,5})?).*$/g, '$1')" autocomplete="off" min="0" class="form-control" type="text" required>
</div>
</div>
<!--<div class="form-group">
<label class="col-sm-3 control-label is-required">代数:</label>
<div class="col-sm-8">
<input name="era" th:field="*{era}" class="form-control" type="text" required>
</div>
</div>-->
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "project/nodeIncomeConfig";
$("#form-config-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-config-edit').serialize());
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,110 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('收益配置列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>收益比例:</label>
<input type="text" autocomplete="off" name="income"/>
</li>
<li>
<label>代数:</label>
<input type="text" autocomplete="off" name="era"/>
</li>
<li class="select-time">
<label>时间:</label>
<input type="text" style="width:150px;" class="time-input" id="startTime" autocomplete="off" placeholder="开始时间" name="params[beginTime]"/>
<span>-</span>
<input type="text" style="width:150px;" class="time-input" id="endTime" autocomplete="off" placeholder="结束时间" name="params[endTime]"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<!--<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="project:nodeIncomeConfig:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="project:nodeIncomeConfig:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="project:nodeIncomeConfig:export">
<i class="fa fa-download"></i> 导出
</a>
</div>-->
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('project:nodeIncomeConfig:edit')}]];
var removeFlag = [[${@permission.hasPermi('project:nodeIncomeConfig:remove')}]];
var prefix = ctx + "project/nodeIncomeConfig";
layui.use('laydate', function(){
var laydate = layui.laydate;
//日期时间选择器
laydate.render({
elem: '#endTime'
,type: 'datetime'
});
laydate.render({
elem: '#startTime'
,type: 'datetime'
});
})
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "收益配置",
columns: [{
checkbox: true
},
{
field: 'income',
title: '收益比例'
},
{
field: 'era',
title: '代数'
},
{
field: 'createTime',
title: '时间'
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
return actions.join('');
}
}]
};
$.table.init(options);
});
</script>
</body>
</html>

View File

@ -35,7 +35,7 @@
<li>
<!--<a class="btn btn-primary btn-rounded btn-sm" onclick="authorize()"><i class="fa fa-search"></i>&nbsp;授权</a>-->
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-primary btn-rounded btn-sm" onclick="getTeamNode()"><i class="fa fa-search"></i>&nbsp;团队盒子</a>
<!--<a class="btn btn-primary btn-rounded btn-sm" onclick="getTeamNode()"><i class="fa fa-search"></i>&nbsp;团队盒子</a>-->
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
@ -55,8 +55,8 @@
</a>
</div>-->
<div class="col-sm-12 select-table table-striped">
<label>下级节点数量:</label>
<input type="text" autocomplete="off" id="nodeNumber" readonly/>
<!-- <label>下级节点数量:</label>
<input type="text" autocomplete="off" id="nodeNumber" readonly/>-->
<table id="bootstrap-table"></table>
</div>
</div>
@ -67,7 +67,7 @@
var removeFlag = [[${@permission.hasPermi('project:tMember:remove')}]];
var prefix = ctx + "project/tMember";
function getTeamNode(){
/*function getTeamNode(){
var address = $("#account").val();
if(address == null || address == ''){
$.modal.alertWarning("请输入地址");
@ -82,7 +82,7 @@
$("#nodeNumber").val(data.result);
}
});
}
}*/
layui.use('laydate', function(){
var laydate = layui.laydate;
@ -102,11 +102,7 @@
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
subordinateListUrl: prefix + "/subordinateList",
getRebateListUrl: prefix + "/getRebateList",
updateUrl: prefix + "/edit/{id}",
specificUrl: prefix + "/specific",
exportUrl: prefix + "/export",
modalName: "用户",
columns: [{
checkbox: true
@ -150,7 +146,7 @@
field: 'referId',
title: '上级ID'
},
{
/* {
field: 'rebate',
title: '返佣'
},
@ -165,7 +161,7 @@
{
field: 'accessories',
title: 'NFT配件'
},
},*/
{
field: 'teamNum',
title: '团队人数',
@ -173,10 +169,10 @@
return row.teamNum - 1;
}
},
{
/*{
field: 'buyNumber',
title: '团队盒子数量'
},
},*/
{
field: 'topUser',
title: '特定用户',
@ -191,25 +187,7 @@
{
field: 'createTime',
title: '注册时间'
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-white ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.subordinateList(\'' + row.id + '\')"><i class="fa fa-get-pocket"></i>下级</a> ');
var more = [];
more.push("<a class='btn btn-success btn-white " + editFlag + "' href='javascript:void(0)' onclick='$.operate.getRebateList1(" + row.id + ")'><i class='fa fa-facebook'></i>返佣</a> ");
more.push("<a class='btn btn-success btn-white " + editFlag + "' href='javascript:void(0)' onclick='$.operate.getRebateList2(" + row.id +",2"+ ")'><i class='fa fa-check-square-B'></i>BRIT</a> ");
more.push("<a class='btn btn-success btn-white " + editFlag + "' href='javascript:void(0)' onclick='$.operate.getRebateList3(" + row.id +',3'+ ")'><i class='fa fa-check-square-B'></i>积分</a> ");
more.push("<a class='btn btn-success btn-white " + editFlag + "' href='javascript:void(0)' onclick='$.operate.getRebateList4(" + row.id +',4'+ ")'><i class='fa fa-check-square-B'></i>配件</a> ");
actions.push('<a tabindex="0" class="btn btn-info btn-xs" role="button" data-container="body" data-placement="left" data-toggle="popover" data-html="true" data-trigger="hover" data-content="' + more.join('') + '"><i class="fa fa-chevron-circle-right"></i>相关业绩</a> ');
if (row.topUser == 0) {
actions.push('<a class="btn btn-danger btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.specificUsers(\'' + row.id + '\')"><i class="fa fa-adjust"></i>特定顶级</a>');
}
return actions.join('');
}
}]
}]
};
$.table.init(options);
});

View File

@ -0,0 +1,67 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增用户节点')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-node-add">
<div class="form-group">
<label class="col-sm-3 control-label is-required">钱包地址:</label>
<div class="col-sm-8">
<input name="walletAddress" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">节点数量:</label>
<div class="col-sm-8">
<input name="nodeNumber" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">冻结节点:</label>
<div class="col-sm-8">
<input name="nodeFreeze" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">支付总金额:</label>
<div class="col-sm-8">
<input name="buyAmountCount" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">用户id</label>
<div class="col-sm-8">
<input name="userId" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">节点总量:</label>
<div class="col-sm-8">
<input name="nodeCount" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">推广收入:</label>
<div class="col-sm-8">
<input name="promotionUsdt" class="form-control" type="text" required>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "project/userNode"
$("#form-node-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-node-add').serialize());
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,68 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改用户节点')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-node-edit" th:object="${userNode}">
<input name="id" th:field="*{id}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required">钱包地址:</label>
<div class="col-sm-8">
<input name="walletAddress" th:field="*{walletAddress}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">节点数量:</label>
<div class="col-sm-8">
<input name="nodeNumber" th:field="*{nodeNumber}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">冻结节点:</label>
<div class="col-sm-8">
<input name="nodeFreeze" th:field="*{nodeFreeze}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">支付总金额:</label>
<div class="col-sm-8">
<input name="buyAmountCount" th:field="*{buyAmountCount}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">用户id</label>
<div class="col-sm-8">
<input name="userId" th:field="*{userId}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">节点总量:</label>
<div class="col-sm-8">
<input name="nodeCount" th:field="*{nodeCount}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">推广收入:</label>
<div class="col-sm-8">
<input name="promotionUsdt" th:field="*{promotionUsdt}" class="form-control" type="text" required>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "project/userNode";
$("#form-node-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-node-edit').serialize());
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,127 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('用户节点列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>钱包地址:</label>
<input type="text" autocomplete="off" name="walletAddress"/>
</li>
<li class="select-time">
<label>时间:</label>
<input type="text" style="width:150px;" class="time-input" id="startTime" autocomplete="off" placeholder="开始时间" name="params[beginTime]"/>
<span>-</span>
<input type="text" style="width:150px;" class="time-input" id="endTime" autocomplete="off" placeholder="结束时间" name="params[endTime]"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<!--<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="project:userNode:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="project:userNode:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="project:userNode:export">
<i class="fa fa-download"></i> 导出
</a>
</div>-->
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('project:userNode:edit')}]];
var removeFlag = [[${@permission.hasPermi('project:userNode:remove')}]];
var prefix = ctx + "project/userNode";
layui.use('laydate', function(){
var laydate = layui.laydate;
//日期时间选择器
laydate.render({
elem: '#endTime'
,type: 'datetime'
});
laydate.render({
elem: '#startTime'
,type: 'datetime'
});
})
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "用户节点",
columns: [{
checkbox: true
},
{
field: 'walletAddress',
title: '钱包地址'
},
{
field: 'nodeNumber',
title: '节点数量'
},
/*{
field: 'nodeFreeze',
title: '冻结节点'
},
{
field: 'buyAmountCount',
title: '支付总金额'
},
{
field: 'userId',
title: '用户id'
},
{
field: 'nodeCount',
title: '节点总量'
},*/
{
field: 'promotionUsdt',
title: '推广收入'
},
{
field: 'createTime',
title: '时间'
}/*,
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}*/]
};
$.table.init(options);
});
</script>
</body>
</html>

View File

@ -0,0 +1,145 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('新增节点认购记录')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-log-add">
<div class="form-group">
<label class="col-sm-3 control-label is-required">钱包地址:</label>
<div class="col-sm-8">
<input name="walletAddress" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">认购数量:</label>
<div class="col-sm-8">
<input name="nodeNumber" class="form-control" type="number" required>
</div>
</div>
<!--<div class="form-group">
<label class="col-sm-3 control-label is-required">支付币种:</label>
<div class="col-sm-8">
<input name="payCoin" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">认购金额:</label>
<div class="col-sm-8">
<input name="buyAmount" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">节点配置ID</label>
<div class="col-sm-8">
<input name="nodeSettingId" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">用户id</label>
<div class="col-sm-8">
<input name="userId" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">交易hash</label>
<div class="col-sm-8">
<input name="hash" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">订单号:</label>
<div class="col-sm-8">
<input name="orderNumber" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">一代奖励:</label>
<div class="col-sm-8">
<input name="addressOne" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">一代奖励金额:</label>
<div class="col-sm-8">
<input name="awardOne" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">二代奖励:</label>
<div class="col-sm-8">
<input name="addressTwo" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">二代奖励金额:</label>
<div class="col-sm-8">
<input name="awardTwo" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">三代奖励:</label>
<div class="col-sm-8">
<input name="addressThree" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">三代奖励金额:</label>
<div class="col-sm-8">
<input name="awardThree" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">四代奖励:</label>
<div class="col-sm-8">
<input name="addressFour" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">四代奖励金额:</label>
<div class="col-sm-8">
<input name="awardFour" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">订单说明:</label>
<div class="col-sm-8">
<textarea name="illustrate" class="form-control"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">数据JSON</label>
<div class="col-sm-8">
<textarea name="dataJson" class="form-control"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">归集地址:</label>
<div class="col-sm-8">
<input name="collectionAddress" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">归集金额:</label>
<div class="col-sm-8">
<input name="collectionAmount" class="form-control" type="text">
</div>
</div>-->
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "project/userNodeLog"
$("#form-log-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-log-add').serialize());
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,146 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('修改节点认购记录')" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-log-edit" th:object="${userNodeLog}">
<input name="id" th:field="*{id}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required">钱包地址:</label>
<div class="col-sm-8">
<input name="walletAddress" th:field="*{walletAddress}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">认购数量:</label>
<div class="col-sm-8">
<input name="nodeNumber" th:field="*{nodeNumber}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">支付币种:</label>
<div class="col-sm-8">
<input name="payCoin" th:field="*{payCoin}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">认购金额:</label>
<div class="col-sm-8">
<input name="buyAmount" th:field="*{buyAmount}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">节点配置ID</label>
<div class="col-sm-8">
<input name="nodeSettingId" th:field="*{nodeSettingId}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">用户id</label>
<div class="col-sm-8">
<input name="userId" th:field="*{userId}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">交易hash</label>
<div class="col-sm-8">
<input name="hash" th:field="*{hash}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">订单号:</label>
<div class="col-sm-8">
<input name="orderNumber" th:field="*{orderNumber}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">一代奖励:</label>
<div class="col-sm-8">
<input name="addressOne" th:field="*{addressOne}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">一代奖励金额:</label>
<div class="col-sm-8">
<input name="awardOne" th:field="*{awardOne}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">二代奖励:</label>
<div class="col-sm-8">
<input name="addressTwo" th:field="*{addressTwo}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">二代奖励金额:</label>
<div class="col-sm-8">
<input name="awardTwo" th:field="*{awardTwo}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">三代奖励:</label>
<div class="col-sm-8">
<input name="addressThree" th:field="*{addressThree}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">三代奖励金额:</label>
<div class="col-sm-8">
<input name="awardThree" th:field="*{awardThree}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">四代奖励:</label>
<div class="col-sm-8">
<input name="addressFour" th:field="*{addressFour}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">四代奖励金额:</label>
<div class="col-sm-8">
<input name="awardFour" th:field="*{awardFour}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">订单说明:</label>
<div class="col-sm-8">
<textarea name="illustrate" class="form-control">[[*{illustrate}]]</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">数据JSON</label>
<div class="col-sm-8">
<textarea name="dataJson" class="form-control">[[*{dataJson}]]</textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">归集地址:</label>
<div class="col-sm-8">
<input name="collectionAddress" th:field="*{collectionAddress}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">归集金额:</label>
<div class="col-sm-8">
<input name="collectionAmount" th:field="*{collectionAmount}" class="form-control" type="text">
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "project/userNodeLog";
$("#form-log-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-log-edit').serialize());
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,232 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<th:block th:include="include :: header('节点认购记录列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 search-collapse">
<form id="formId">
<div class="select-list">
<ul>
<li>
<label>钱包地址:</label>
<input type="text" autocomplete="off" name="walletAddress"/>
</li>
<!--<li>
<label>认购数量:</label>
<input type="text" autocomplete="off" name="nodeNumber"/>
</li>
<li>
<label>支付币种:</label>
<input type="text" autocomplete="off" name="payCoin"/>
</li>
<li>
<label>认购金额:</label>
<input type="text" autocomplete="off" name="buyAmount"/>
</li>
<li>
<label>节点配置ID</label>
<input type="text" autocomplete="off" name="nodeSettingId"/>
</li>
<li>
<label>用户id</label>
<input type="text" autocomplete="off" name="userId"/>
</li>-->
<li>
<label>交易hash</label>
<input type="text" autocomplete="off" name="hash"/>
</li>
<li>
<label>订单号:</label>
<input type="text" autocomplete="off" name="orderNumber"/>
</li>
<li>
<label>订单状态:</label>
<select name="status">
<option value="">全部</option>
<option value="2">链上确认</option>
<option value="3">支付成功</option>
<option value="4">支付失败</option>
</select>
<input type="text" autocomplete="off" name="orderNumber"/>
</li>
<!--<li>
<label>一代奖励:</label>
<input type="text" autocomplete="off" name="addressOne"/>
</li>
<li>
<label>一代奖励金额:</label>
<input type="text" autocomplete="off" name="awardOne"/>
</li>
<li>
<label>二代奖励:</label>
<input type="text" autocomplete="off" name="addressTwo"/>
</li>
<li>
<label>二代奖励金额:</label>
<input type="text" autocomplete="off" name="awardTwo"/>
</li>
<li>
<label>三代奖励:</label>
<input type="text" autocomplete="off" name="addressThree"/>
</li>
<li>
<label>三代奖励金额:</label>
<input type="text" autocomplete="off" name="awardThree"/>
</li>
<li>
<label>四代奖励:</label>
<input type="text" autocomplete="off" name="addressFour"/>
</li>
<li>
<label>四代奖励金额:</label>
<input type="text" autocomplete="off" name="awardFour"/>
</li>
<li>
<label>归集地址:</label>
<input type="text" autocomplete="off" name="collectionAddress"/>
</li>
<li>
<label>归集金额:</label>
<input type="text" autocomplete="off" name="collectionAmount"/>
</li>-->
<li class="select-time">
<label>时间:</label>
<input type="text" style="width:150px;" class="time-input" id="startTime" autocomplete="off" placeholder="开始时间" name="params[beginTime]"/>
<span>-</span>
<input type="text" style="width:150px;" class="time-input" id="endTime" autocomplete="off" placeholder="结束时间" name="params[endTime]"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li>
</ul>
</div>
</form>
</div>
<div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="project:userNodeLog:add">
<i class="fa fa-plus"></i> 添加
</a>
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="project:userNodeLog:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="project:userNodeLog:export">
<i class="fa fa-download"></i> 导出
</a>-->
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('project:userNodeLog:edit')}]];
var removeFlag = [[${@permission.hasPermi('project:userNodeLog:remove')}]];
var prefix = ctx + "project/userNodeLog";
layui.use('laydate', function(){
var laydate = layui.laydate;
//日期时间选择器
laydate.render({
elem: '#endTime'
,type: 'datetime'
});
laydate.render({
elem: '#startTime'
,type: 'datetime'
});
})
$(function() {
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
modalName: "节点认购记录",
columns: [{
checkbox: true
},
{
field: 'walletAddress',
title: '钱包地址'
},
{
field: 'nodeNumber',
title: '认购数量'
},
{
field: 'payCoin',
title: '支付币种'
},
{
field: 'buyAmount',
title: '支付金额'
},
{
field: 'status',
title: '订单状态',
formatter: function(value, row, index) {
if(row.status == 1){
return "订单生成";
}else if(row.status == 2){
return "链上确认";
}else if(row.status == 3){
return "支付成功";
}else if(row.status == 4){
return "支付失败";
}
}
},
/*{
field: 'hash',
title: '交易hash'
},*/
{
field: 'orderNumber',
title: '订单号'
},
{
field: 'addressOne',
title: '一代奖励'
},
{
field: 'awardOne',
title: '一代奖励金额'
},
{
field: 'addressTwo',
title: '二代奖励'
},
{
field: 'awardTwo',
title: '二代奖励金额'
},
{
field: 'createTime',
title: '时间'
}/*,
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join('');
}
}*/]
};
$.table.init(options);
});
</script>
</body>
</html>

View File

@ -0,0 +1,69 @@
package com.ruoyi.system.domain;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
/**
* 一些配置对象 sys_config
*
* @author HayDen
* @date 2024-06-27
*/
@Setter
@Getter
@Accessors(chain = true)
public class Config extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 1正常0删除
*/
@Excel(name = "1正常0删除")
private Integer flag;
/**
* 分类根据业务分组
*/
@Excel(name = "分类,根据业务分组")
private String type;
/**
* key
*/
@Excel(name = "key")
private String configKey;
/**
* 1小数2百分数3字符串4json,5整数
*/
@Excel(name = "1小数2百分数3字符串4json,5整数")
private Integer valueType;
/**
* $column.columnComment
*/
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String value;
/**
* $column.columnComment
*/
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String defaultValue;
/**
* $column.columnComment
*/
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String description;
/**
* $column.columnComment
*/
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String defaultDescription;
}

View File

@ -1,6 +1,7 @@
package com.ruoyi.system.domain;
import java.math.BigDecimal;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
@ -8,68 +9,69 @@ import lombok.experimental.Accessors;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import java.util.Date;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 节点奖励设置对象 node_award_setting
*
*
* @author HayDen
* @date 2024-02-24
*/
@Setter
@Getter
@Accessors(chain = true)
public class NodeAwardSetting extends BaseEntity
{
public class NodeAwardSetting extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 节点奖励id
*/
@Excel(name = "节点奖励id")
* 节点奖励id
*/
@Excel(name = "节点奖励id")
private Integer nodeSettingId;
/**
* 返佣比例
*/
@Excel(name = "返佣比例")
* 返佣比例
*/
@Excel(name = "返佣比例")
private BigDecimal rebate;
/**
* 购买盒子获取Rbit奖励数量
*/
@Excel(name = "购买盒子获取Rbit奖励数量")
* 购买盒子获取Rbit奖励数量
*/
@Excel(name = "购买盒子获取Rbit奖励数量")
private BigDecimal rbitAmount;
/**
* 1代Rbit奖励比例
*/
@Excel(name = "1代Rbit奖励比例")
* 1代Rbit奖励比例
*/
@Excel(name = "1代Rbit奖励比例")
private BigDecimal rbitOne;
/**
* 2代Rbit奖励比例
*/
@Excel(name = "2代Rbit奖励比例")
* 2代Rbit奖励比例
*/
@Excel(name = "2代Rbit奖励比例")
private BigDecimal rebateTwo;
/**
* 购买盒子NFT碎片奖励数量
*/
@Excel(name = "购买盒子NFT碎片奖励数量")
* 购买盒子NFT碎片奖励数量
*/
@Excel(name = "购买盒子NFT碎片奖励数量")
private BigDecimal nftAmount;
/**
* 1代NFT碎片奖励比例
*/
@Excel(name = "1代NFT碎片奖励比例")
* 1代NFT碎片奖励比例
*/
@Excel(name = "1代NFT碎片奖励比例")
private BigDecimal nftOne;
/**
* 2代NFT碎片奖励比例
*/
@Excel(name = "2代NFT碎片奖励比例")
* 2代NFT碎片奖励比例
*/
@Excel(name = "2代NFT碎片奖励比例")
private BigDecimal nftTwo;
}

View File

@ -0,0 +1,35 @@
package com.ruoyi.system.domain;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import java.math.BigDecimal;
/**
* 收益配置对象 node_income_config
*
* @author HayDen
* @date 2024-06-27
*/
@Setter
@Getter
@Accessors(chain = true)
public class NodeIncomeConfig extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 收益比例
*/
@Excel(name = "收益比例")
private BigDecimal income;
/**
* 代数
*/
@Excel(name = "代数")
private Integer era;
}

View File

@ -98,31 +98,5 @@ public class TMember extends BaseEntity {
private Integer teamNum;
/**
* 返佣
*/
private String rebate;
/**
* BRIT
*/
private String brit;
/**
* 积分
*/
private String integral;
/**
* 配件
*/
private String accessories;
/**
* 团队购买盒子数量不算自己
*/
private Integer buyNumber;
private Integer topUser;
}

View File

@ -0,0 +1,65 @@
package com.ruoyi.system.domain;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import java.math.BigDecimal;
/**
* 用户节点对象 user_node
*
* @author HayDen
* @date 2024-06-27
*/
@Setter
@Getter
@Accessors(chain = true)
public class UserNode extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 钱包地址
*/
@Excel(name = "钱包地址")
private String walletAddress;
/**
* 节点数量
*/
@Excel(name = "节点数量")
private Integer nodeNumber;
/**
* 冻结节点
*/
@Excel(name = "冻结节点")
private Integer nodeFreeze;
/**
* 支付总金额
*/
@Excel(name = "支付总金额")
private BigDecimal buyAmountCount;
/**
* 用户id
*/
@Excel(name = "用户id")
private Integer userId;
/**
* 节点总量
*/
@Excel(name = "节点总量")
private Integer nodeCount;
/**
* 推广收入
*/
@Excel(name = "推广收入")
private BigDecimal promotionUsdt;
}

View File

@ -0,0 +1,114 @@
package com.ruoyi.system.domain;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import java.math.BigDecimal;
/**
* 节点认购记录对象 user_node_log
*
* @author HayDen
* @date 2024-06-27
*/
@Setter
@Getter
@Accessors(chain = true)
public class UserNodeLog extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 钱包地址
*/
@Excel(name = "钱包地址")
private String walletAddress;
/**
* 认购数量
*/
@Excel(name = "认购数量")
private Integer nodeNumber;
/**
* 支付币种
*/
@Excel(name = "支付币种")
private String payCoin;
/**
* 认购金额
*/
@Excel(name = "认购金额")
private BigDecimal buyAmount;
/**
* 节点配置ID
*/
@Excel(name = "节点配置ID")
private Integer nodeSettingId;
/**
* 1:订单生成 2链上确认 3支付成功 4支付失败
*/
@Excel(name = "1:订单生成 2链上确认 3支付成功 4支付失败")
private Integer status;
/**
* 用户id
*/
@Excel(name = "用户id")
private Integer userId;
/**
* 交易hash
*/
@Excel(name = "交易hash")
private String hash;
/**
* 订单号
*/
@Excel(name = "订单号")
private String orderNumber;
/**
* 一代奖励
*/
@Excel(name = "一代奖励")
private String addressOne;
/**
* 一代奖励金额
*/
@Excel(name = "一代奖励金额")
private BigDecimal awardOne;
/**
* 二代奖励
*/
@Excel(name = "二代奖励")
private String addressTwo;
/**
* 二代奖励金额
*/
@Excel(name = "二代奖励金额")
private BigDecimal awardTwo;
/**
* 订单说明
*/
@Excel(name = "订单说明")
private String illustrate;
/**
* 数据JSON
*/
@Excel(name = "数据JSON")
private String dataJson;
}

View File

@ -0,0 +1,62 @@
package com.ruoyi.system.mapper;
import com.ruoyi.system.domain.Config;
import java.util.List;
/**
* 一些配置Mapper接口
*
* @author HayDen
* @date 2024-06-27
*/
public interface ConfigMapper
{
/**
* 查询一些配置
*
* @param id 一些配置ID
* @return 一些配置
*/
Config selectConfigById(Integer id);
/**
* 查询一些配置列表
*
* @param config 一些配置
* @return 一些配置集合
*/
List<Config> selectConfigList(Config config);
/**
* 查询一些配置对象
*
* @param config 一些配置
* @return 一些配置
*/
Config findConfig(Config config);
/**
* 新增一些配置
*
* @param config 一些配置
* @return 结果
*/
int insertConfig(Config config);
/**
* 修改一些配置
*
* @param config 一些配置
* @return 结果
*/
int updateConfig(Config config);
/**
* 批量删除一些配置
*
* @param ids 需要删除的数据ID
* @return 结果
*/
int deleteConfigByIds(String[] ids);
}

View File

@ -0,0 +1,62 @@
package com.ruoyi.system.mapper;
import com.ruoyi.system.domain.NodeIncomeConfig;
import java.util.List;
/**
* 收益配置Mapper接口
*
* @author HayDen
* @date 2024-06-27
*/
public interface NodeIncomeConfigMapper
{
/**
* 查询收益配置
*
* @param id 收益配置ID
* @return 收益配置
*/
NodeIncomeConfig selectNodeIncomeConfigById(Integer id);
/**
* 查询收益配置列表
*
* @param nodeIncomeConfig 收益配置
* @return 收益配置集合
*/
List<NodeIncomeConfig> selectNodeIncomeConfigList(NodeIncomeConfig nodeIncomeConfig);
/**
* 查询收益配置对象
*
* @param nodeIncomeConfig 收益配置
* @return 收益配置
*/
NodeIncomeConfig findNodeIncomeConfig(NodeIncomeConfig nodeIncomeConfig);
/**
* 新增收益配置
*
* @param nodeIncomeConfig 收益配置
* @return 结果
*/
int insertNodeIncomeConfig(NodeIncomeConfig nodeIncomeConfig);
/**
* 修改收益配置
*
* @param nodeIncomeConfig 收益配置
* @return 结果
*/
int updateNodeIncomeConfig(NodeIncomeConfig nodeIncomeConfig);
/**
* 批量删除收益配置
*
* @param ids 需要删除的数据ID
* @return 结果
*/
int deleteNodeIncomeConfigByIds(String[] ids);
}

View File

@ -38,11 +38,6 @@ public interface TMemberMapper
List<InviteResp> findInviteRespList(InviteResp inviteResp);
/**
* 查询下级购买盒子数量汇总
*/
List<UserBoxResp> findUserBoxRespList(@Param("ids")List<Long> ids);
/**
* 查询用户对象
*

View File

@ -0,0 +1,62 @@
package com.ruoyi.system.mapper;
import com.ruoyi.system.domain.UserNodeLog;
import java.util.List;
/**
* 节点认购记录Mapper接口
*
* @author HayDen
* @date 2024-06-27
*/
public interface UserNodeLogMapper
{
/**
* 查询节点认购记录
*
* @param id 节点认购记录ID
* @return 节点认购记录
*/
UserNodeLog selectUserNodeLogById(Integer id);
/**
* 查询节点认购记录列表
*
* @param userNodeLog 节点认购记录
* @return 节点认购记录集合
*/
List<UserNodeLog> selectUserNodeLogList(UserNodeLog userNodeLog);
/**
* 查询节点认购记录对象
*
* @param userNodeLog 节点认购记录
* @return 节点认购记录
*/
UserNodeLog findUserNodeLog(UserNodeLog userNodeLog);
/**
* 新增节点认购记录
*
* @param userNodeLog 节点认购记录
* @return 结果
*/
int insertUserNodeLog(UserNodeLog userNodeLog);
/**
* 修改节点认购记录
*
* @param userNodeLog 节点认购记录
* @return 结果
*/
int updateUserNodeLog(UserNodeLog userNodeLog);
/**
* 批量删除节点认购记录
*
* @param ids 需要删除的数据ID
* @return 结果
*/
int deleteUserNodeLogByIds(String[] ids);
}

View File

@ -0,0 +1,62 @@
package com.ruoyi.system.mapper;
import com.ruoyi.system.domain.UserNode;
import java.util.List;
/**
* 用户节点Mapper接口
*
* @author HayDen
* @date 2024-06-27
*/
public interface UserNodeMapper
{
/**
* 查询用户节点
*
* @param id 用户节点ID
* @return 用户节点
*/
UserNode selectUserNodeById(Integer id);
/**
* 查询用户节点列表
*
* @param userNode 用户节点
* @return 用户节点集合
*/
List<UserNode> selectUserNodeList(UserNode userNode);
/**
* 查询用户节点对象
*
* @param userNode 用户节点
* @return 用户节点
*/
UserNode findUserNode(UserNode userNode);
/**
* 新增用户节点
*
* @param userNode 用户节点
* @return 结果
*/
int insertUserNode(UserNode userNode);
/**
* 修改用户节点
*
* @param userNode 用户节点
* @return 结果
*/
int updateUserNode(UserNode userNode);
/**
* 批量删除用户节点
*
* @param ids 需要删除的数据ID
* @return 结果
*/
int deleteUserNodeByIds(String[] ids);
}

View File

@ -0,0 +1,86 @@
package com.ruoyi.system.service;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.Config;
import com.ruoyi.system.mapper.ConfigMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 一些配置Service业务层处理
*
* @author HayDen
* @date 2024-06-27
*/
@Service
public class ConfigService
{
@Autowired
private ConfigMapper configMapper;
/**
* 查询一些配置
*
* @param id 一些配置ID
* @return 一些配置
*/
public Config selectConfigById(Integer id)
{
return configMapper.selectConfigById(id);
}
/**
* 查询一些配置列表
*
* @param config 一些配置
* @return 一些配置
*/
public List<Config> selectConfigList(Config config)
{
List<Config> configList = configMapper.selectConfigList(config);
return configList;
}
/**
* 查询一些配置对象
*
* @param config 一些配置
* @return 一些配置
*/
public Config findConfig(Config config)
{
config = configMapper.findConfig(config);
return config;
}
/**
* 修改或者添加一些配置
*
* @param config 一些配置
* @return 结果
*/
public int updateOrAddConfig(Config config) {
if (config.getId() != null){
config.setUpdateTime(DateUtils.getNowDate());
config.setDefaultValue(config.getValue());
return configMapper.updateConfig(config);
}else{
config.setCreateTime(DateUtils.getNowDate());
return configMapper.insertConfig(config);
}
}
/**
* 删除一些配置对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteConfigByIds(String ids)
{
return configMapper.deleteConfigByIds(Convert.toStrArray(ids));
}
}

View File

@ -0,0 +1,85 @@
package com.ruoyi.system.service;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.NodeIncomeConfig;
import com.ruoyi.system.mapper.NodeIncomeConfigMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 收益配置Service业务层处理
*
* @author HayDen
* @date 2024-06-27
*/
@Service
public class NodeIncomeConfigService
{
@Autowired
private NodeIncomeConfigMapper nodeIncomeConfigMapper;
/**
* 查询收益配置
*
* @param id 收益配置ID
* @return 收益配置
*/
public NodeIncomeConfig selectNodeIncomeConfigById(Integer id)
{
return nodeIncomeConfigMapper.selectNodeIncomeConfigById(id);
}
/**
* 查询收益配置列表
*
* @param nodeIncomeConfig 收益配置
* @return 收益配置
*/
public List<NodeIncomeConfig> selectNodeIncomeConfigList(NodeIncomeConfig nodeIncomeConfig)
{
List<NodeIncomeConfig> nodeIncomeConfigList = nodeIncomeConfigMapper.selectNodeIncomeConfigList(nodeIncomeConfig);
return nodeIncomeConfigList;
}
/**
* 查询收益配置对象
*
* @param nodeIncomeConfig 收益配置
* @return 收益配置
*/
public NodeIncomeConfig findNodeIncomeConfig(NodeIncomeConfig nodeIncomeConfig)
{
nodeIncomeConfig = nodeIncomeConfigMapper.findNodeIncomeConfig(nodeIncomeConfig);
return nodeIncomeConfig;
}
/**
* 修改或者添加收益配置
*
* @param nodeIncomeConfig 收益配置
* @return 结果
*/
public int updateOrAddNodeIncomeConfig(NodeIncomeConfig nodeIncomeConfig) {
if (nodeIncomeConfig.getId() != null){
nodeIncomeConfig.setUpdateTime(DateUtils.getNowDate());
return nodeIncomeConfigMapper.updateNodeIncomeConfig(nodeIncomeConfig);
}else{
nodeIncomeConfig.setCreateTime(DateUtils.getNowDate());
return nodeIncomeConfigMapper.insertNodeIncomeConfig(nodeIncomeConfig);
}
}
/**
* 删除收益配置对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteNodeIncomeConfigByIds(String ids)
{
return nodeIncomeConfigMapper.deleteNodeIncomeConfigByIds(Convert.toStrArray(ids));
}
}

View File

@ -61,14 +61,12 @@ public class TMemberService
public List<TMember> selectTMemberList(TMember tMember)
{
List<TMember> tMemberList = tMemberMapper.selectTMemberList(tMember);
for (TMember tMember1 : tMemberList){
//团队购买盒子数量不算自己
tMember1.setBuyNumber(tMemberMapper.sumBoxNumber(tMember1.getId()));
/* for (TMember tMember1 : tMemberList){
tMember1.setRebate(new BigDecimal(tMember1.getRebate()).stripTrailingZeros().toPlainString());
tMember1.setBrit(new BigDecimal(tMember1.getBrit()).stripTrailingZeros().toPlainString());
tMember1.setIntegral(new BigDecimal(tMember1.getIntegral()).stripTrailingZeros().toPlainString());
tMember1.setAccessories(new BigDecimal(tMember1.getAccessories()).stripTrailingZeros().toPlainString());
}
}*/
return tMemberList;
}

View File

@ -0,0 +1,85 @@
package com.ruoyi.system.service;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.UserNodeLog;
import com.ruoyi.system.mapper.UserNodeLogMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 节点认购记录Service业务层处理
*
* @author HayDen
* @date 2024-06-27
*/
@Service
public class UserNodeLogService
{
@Autowired
private UserNodeLogMapper userNodeLogMapper;
/**
* 查询节点认购记录
*
* @param id 节点认购记录ID
* @return 节点认购记录
*/
public UserNodeLog selectUserNodeLogById(Integer id)
{
return userNodeLogMapper.selectUserNodeLogById(id);
}
/**
* 查询节点认购记录列表
*
* @param userNodeLog 节点认购记录
* @return 节点认购记录
*/
public List<UserNodeLog> selectUserNodeLogList(UserNodeLog userNodeLog)
{
List<UserNodeLog> userNodeLogList = userNodeLogMapper.selectUserNodeLogList(userNodeLog);
return userNodeLogList;
}
/**
* 查询节点认购记录对象
*
* @param userNodeLog 节点认购记录
* @return 节点认购记录
*/
public UserNodeLog findUserNodeLog(UserNodeLog userNodeLog)
{
userNodeLog = userNodeLogMapper.findUserNodeLog(userNodeLog);
return userNodeLog;
}
/**
* 修改或者添加节点认购记录
*
* @param userNodeLog 节点认购记录
* @return 结果
*/
public int updateOrAddUserNodeLog(UserNodeLog userNodeLog) {
if (userNodeLog.getId() != null){
userNodeLog.setUpdateTime(DateUtils.getNowDate());
return userNodeLogMapper.updateUserNodeLog(userNodeLog);
}else{
userNodeLog.setCreateTime(DateUtils.getNowDate());
return userNodeLogMapper.insertUserNodeLog(userNodeLog);
}
}
/**
* 删除节点认购记录对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteUserNodeLogByIds(String ids)
{
return userNodeLogMapper.deleteUserNodeLogByIds(Convert.toStrArray(ids));
}
}

View File

@ -0,0 +1,85 @@
package com.ruoyi.system.service;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.UserNode;
import com.ruoyi.system.mapper.UserNodeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 用户节点Service业务层处理
*
* @author HayDen
* @date 2024-06-27
*/
@Service
public class UserNodeService
{
@Autowired
private UserNodeMapper userNodeMapper;
/**
* 查询用户节点
*
* @param id 用户节点ID
* @return 用户节点
*/
public UserNode selectUserNodeById(Integer id)
{
return userNodeMapper.selectUserNodeById(id);
}
/**
* 查询用户节点列表
*
* @param userNode 用户节点
* @return 用户节点
*/
public List<UserNode> selectUserNodeList(UserNode userNode)
{
List<UserNode> userNodeList = userNodeMapper.selectUserNodeList(userNode);
return userNodeList;
}
/**
* 查询用户节点对象
*
* @param userNode 用户节点
* @return 用户节点
*/
public UserNode findUserNode(UserNode userNode)
{
userNode = userNodeMapper.findUserNode(userNode);
return userNode;
}
/**
* 修改或者添加用户节点
*
* @param userNode 用户节点
* @return 结果
*/
public int updateOrAddUserNode(UserNode userNode) {
if (userNode.getId() != null){
userNode.setUpdateTime(DateUtils.getNowDate());
return userNodeMapper.updateUserNode(userNode);
}else{
userNode.setCreateTime(DateUtils.getNowDate());
return userNodeMapper.insertUserNode(userNode);
}
}
/**
* 删除用户节点对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteUserNodeByIds(String ids)
{
return userNodeMapper.deleteUserNodeByIds(Convert.toStrArray(ids));
}
}

View File

@ -0,0 +1,115 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.ConfigMapper">
<resultMap type="com.ruoyi.system.domain.Config" id="ConfigResult">
<result property="id" column="id" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="flag" column="flag" />
<result property="type" column="type" />
<result property="configKey" column="config_key" />
<result property="valueType" column="value_type" />
<result property="value" column="value" />
<result property="defaultValue" column="default_value" />
<result property="description" column="description" />
<result property="defaultDescription" column="default_description" />
</resultMap>
<sql id="selectConfigVo">
select id, create_time, update_time, flag, type, config_key, value_type, value, default_value, description, default_description from sys_config
</sql>
<select id="selectConfigList" parameterType="com.ruoyi.system.domain.Config" resultMap="ConfigResult">
<include refid="selectConfigVo"/>
<where>
<if test="id != null "> and id = #{id}</if>
<if test="flag != null "> and flag = #{flag}</if>
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="configKey != null and configKey != ''"> and config_key = #{configKey}</if>
<if test="valueType != null "> and value_type = #{valueType}</if>
<if test="value != null and value != ''"> and value = #{value}</if>
<if test="defaultValue != null and defaultValue != ''"> and default_value = #{defaultValue}</if>
<if test="description != null and description != ''"> and description = #{description}</if>
<if test="defaultDescription != null and defaultDescription != ''"> and default_description = #{defaultDescription}</if>
<if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''"> and create_time between #{params.beginTime} and #{params.endTime}</if>
</where>
order by id desc
</select>
<select id="findConfig" parameterType="com.ruoyi.system.domain.Config" resultMap="ConfigResult">
<include refid="selectConfigVo"/>
<where>
<if test="id != null "> and id = #{id}</if>
<if test="flag != null "> and flag = #{flag}</if>
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="configKey != null and configKey != ''"> and config_key = #{configKey}</if>
<if test="valueType != null "> and value_type = #{valueType}</if>
<if test="value != null and value != ''"> and value = #{value}</if>
<if test="defaultValue != null and defaultValue != ''"> and default_value = #{defaultValue}</if>
<if test="description != null and description != ''"> and description = #{description}</if>
<if test="defaultDescription != null and defaultDescription != ''"> and default_description = #{defaultDescription}</if>
</where>
limit 1
</select>
<select id="selectConfigById" parameterType="Integer" resultMap="ConfigResult">
<include refid="selectConfigVo"/>
where id = #{id}
</select>
<insert id="insertConfig" parameterType="com.ruoyi.system.domain.Config" useGeneratedKeys="true" keyProperty="id">
insert into sys_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
<if test="flag != null">flag,</if>
<if test="type != null and type != ''">type,</if>
<if test="configKey != null and configKey != ''">config_key,</if>
<if test="valueType != null">value_type,</if>
<if test="value != null and value != ''">value,</if>
<if test="defaultValue != null and defaultValue != ''">default_value,</if>
<if test="description != null and description != ''">description,</if>
<if test="defaultDescription != null and defaultDescription != ''">default_description,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="flag != null">#{flag},</if>
<if test="type != null and type != ''">#{type},</if>
<if test="configKey != null and configKey != ''">#{configKey},</if>
<if test="valueType != null">#{valueType},</if>
<if test="value != null and value != ''">#{value},</if>
<if test="defaultValue != null and defaultValue != ''">#{defaultValue},</if>
<if test="description != null and description != ''">#{description},</if>
<if test="defaultDescription != null and defaultDescription != ''">#{defaultDescription},</if>
</trim>
</insert>
<update id="updateConfig" parameterType="com.ruoyi.system.domain.Config">
update sys_config
<trim prefix="SET" suffixOverrides=",">
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="flag != null">flag = #{flag},</if>
<if test="type != null and type != ''">type = #{type},</if>
<if test="configKey != null and configKey != ''">config_key = #{configKey},</if>
<if test="valueType != null">value_type = #{valueType},</if>
<if test="value != null and value != ''">value = #{value},</if>
<if test="defaultValue != null and defaultValue != ''">default_value = #{defaultValue},</if>
<if test="description != null and description != ''">description = #{description},</if>
<if test="defaultDescription != null and defaultDescription != ''">default_description = #{defaultDescription},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteConfigByIds" parameterType="String">
delete from sys_config where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.NodeIncomeConfigMapper">
<resultMap type="com.ruoyi.system.domain.NodeIncomeConfig" id="NodeIncomeConfigResult">
<result property="id" column="id" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
<result property="income" column="income" />
<result property="era" column="era" />
</resultMap>
<sql id="selectNodeIncomeConfigVo">
select id, create_time, create_by, update_time, update_by, income, era from node_income_config
</sql>
<select id="selectNodeIncomeConfigList" parameterType="com.ruoyi.system.domain.NodeIncomeConfig" resultMap="NodeIncomeConfigResult">
<include refid="selectNodeIncomeConfigVo"/>
<where>
<if test="id != null "> and id = #{id}</if>
<if test="income != null "> and income = #{income}</if>
<if test="era != null "> and era = #{era}</if>
<if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''"> and create_time between #{params.beginTime} and #{params.endTime}</if>
</where>
order by id desc
</select>
<select id="findNodeIncomeConfig" parameterType="com.ruoyi.system.domain.NodeIncomeConfig" resultMap="NodeIncomeConfigResult">
<include refid="selectNodeIncomeConfigVo"/>
<where>
<if test="id != null "> and id = #{id}</if>
<if test="income != null "> and income = #{income}</if>
<if test="era != null "> and era = #{era}</if>
</where>
limit 1
</select>
<select id="selectNodeIncomeConfigById" parameterType="Integer" resultMap="NodeIncomeConfigResult">
<include refid="selectNodeIncomeConfigVo"/>
where id = #{id}
</select>
<insert id="insertNodeIncomeConfig" parameterType="com.ruoyi.system.domain.NodeIncomeConfig" useGeneratedKeys="true" keyProperty="id">
insert into node_income_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="createTime != null">create_time,</if>
<if test="createBy != null">create_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="income != null">income,</if>
<if test="era != null">era,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="createTime != null">#{createTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="income != null">#{income},</if>
<if test="era != null">#{era},</if>
</trim>
</insert>
<update id="updateNodeIncomeConfig" parameterType="com.ruoyi.system.domain.NodeIncomeConfig">
update node_income_config
<trim prefix="SET" suffixOverrides=",">
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="income != null">income = #{income},</if>
<if test="era != null">era = #{era},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteNodeIncomeConfigByIds" parameterType="String">
delete from node_income_config where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -64,8 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select tm.*,
(SELECT IFNULL(SUM(op_value),"0") FROM t_member_wallet_log WHERE member_id=tm.id AND op_type=12) as rebate,
(SELECT IFNULL(SUM(op_value),"0") FROM t_member_wallet_log WHERE member_id=tm.id AND op_type in(4,6,8)) as brit,
(SELECT IFNULL(SUM(op_value),"0") FROM t_member_wallet_log WHERE member_id=tm.id AND op_type in(10,11)) as integral,
(SELECT IFNULL(SUM(op_value),"0") FROM t_member_wallet_log WHERE member_id=tm.id AND op_type in(5,7,9)) as accessories
(SELECT IFNULL(SUM(op_value),"0") FROM t_member_wallet_log WHERE member_id=tm.id AND op_type in(10,11)) as integral
from t_member tm
<where>
<if test="id != null "> and tm.id = #{id}</if>
@ -104,14 +103,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="findUserBoxRespList" resultType="com.ruoyi.system.domain.vo.UserBoxResp">
SELECT tm.refer_id as referId,IFNULL(SUM(buy_number),0) as buyNumber from t_member tm
LEFT JOIN node n ON tm.id=n.user_id WHERE tm.refer_id in
<foreach collection="ids" item="referId" open="(" separator="," close=")">
#{referId}
</foreach>
GROUP BY tm.refer_id
</select>
<select id="findTMember" parameterType="com.ruoyi.system.domain.TMember" resultMap="TMemberResult">
<include refid="selectTMemberVo"/>

View File

@ -0,0 +1,165 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.UserNodeLogMapper">
<resultMap type="com.ruoyi.system.domain.UserNodeLog" id="UserNodeLogResult">
<result property="id" column="id" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
<result property="walletAddress" column="wallet_address" />
<result property="nodeNumber" column="node_number" />
<result property="payCoin" column="pay_coin" />
<result property="buyAmount" column="buy_amount" />
<result property="nodeSettingId" column="node_setting_id" />
<result property="status" column="status" />
<result property="userId" column="user_id" />
<result property="hash" column="hash" />
<result property="orderNumber" column="order_number" />
<result property="addressOne" column="address_one" />
<result property="awardOne" column="award_one" />
<result property="addressTwo" column="address_two" />
<result property="awardTwo" column="award_two" />
<result property="illustrate" column="illustrate" />
<result property="dataJson" column="data_json" />
</resultMap>
<sql id="selectUserNodeLogVo">
select id, create_time, create_by, update_time, update_by, wallet_address, node_number, pay_coin, buy_amount, node_setting_id, status, user_id, hash, order_number, address_one, award_one, address_two, award_two, illustrate, data_json from user_node_log
</sql>
<select id="selectUserNodeLogList" parameterType="com.ruoyi.system.domain.UserNodeLog" resultMap="UserNodeLogResult">
<include refid="selectUserNodeLogVo"/>
<where>
<if test="id != null "> and id = #{id}</if>
<if test="walletAddress != null and walletAddress != ''"> and wallet_address = #{walletAddress}</if>
<if test="nodeNumber != null "> and node_number = #{nodeNumber}</if>
<if test="payCoin != null and payCoin != ''"> and pay_coin = #{payCoin}</if>
<if test="buyAmount != null "> and buy_amount = #{buyAmount}</if>
<if test="nodeSettingId != null "> and node_setting_id = #{nodeSettingId}</if>
<if test="status != null "> and status = #{status}</if>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="hash != null and hash != ''"> and hash = #{hash}</if>
<if test="orderNumber != null and orderNumber != ''"> and order_number = #{orderNumber}</if>
<if test="addressOne != null and addressOne != ''"> and address_one = #{addressOne}</if>
<if test="awardOne != null "> and award_one = #{awardOne}</if>
<if test="addressTwo != null and addressTwo != ''"> and address_two = #{addressTwo}</if>
<if test="awardTwo != null "> and award_two = #{awardTwo}</if>
<if test="illustrate != null and illustrate != ''"> and illustrate = #{illustrate}</if>
<if test="dataJson != null and dataJson != ''"> and data_json = #{dataJson}</if>
<if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''"> and create_time between #{params.beginTime} and #{params.endTime}</if>
</where>
order by id desc
</select>
<select id="findUserNodeLog" parameterType="com.ruoyi.system.domain.UserNodeLog" resultMap="UserNodeLogResult">
<include refid="selectUserNodeLogVo"/>
<where>
<if test="id != null "> and id = #{id}</if>
<if test="walletAddress != null and walletAddress != ''"> and wallet_address = #{walletAddress}</if>
<if test="nodeNumber != null "> and node_number = #{nodeNumber}</if>
<if test="payCoin != null and payCoin != ''"> and pay_coin = #{payCoin}</if>
<if test="buyAmount != null "> and buy_amount = #{buyAmount}</if>
<if test="nodeSettingId != null "> and node_setting_id = #{nodeSettingId}</if>
<if test="status != null "> and status = #{status}</if>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="hash != null and hash != ''"> and hash = #{hash}</if>
<if test="orderNumber != null and orderNumber != ''"> and order_number = #{orderNumber}</if>
<if test="addressOne != null and addressOne != ''"> and address_one = #{addressOne}</if>
<if test="awardOne != null "> and award_one = #{awardOne}</if>
<if test="addressTwo != null and addressTwo != ''"> and address_two = #{addressTwo}</if>
<if test="awardTwo != null "> and award_two = #{awardTwo}</if>
<if test="illustrate != null and illustrate != ''"> and illustrate = #{illustrate}</if>
<if test="dataJson != null and dataJson != ''"> and data_json = #{dataJson}</if>
</where>
limit 1
</select>
<select id="selectUserNodeLogById" parameterType="Integer" resultMap="UserNodeLogResult">
<include refid="selectUserNodeLogVo"/>
where id = #{id}
</select>
<insert id="insertUserNodeLog" parameterType="com.ruoyi.system.domain.UserNodeLog" useGeneratedKeys="true" keyProperty="id">
insert into user_node_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="createTime != null">create_time,</if>
<if test="createBy != null">create_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="walletAddress != null and walletAddress != ''">wallet_address,</if>
<if test="nodeNumber != null">node_number,</if>
<if test="payCoin != null and payCoin != ''">pay_coin,</if>
<if test="buyAmount != null">buy_amount,</if>
<if test="nodeSettingId != null">node_setting_id,</if>
<if test="status != null">status,</if>
<if test="userId != null">user_id,</if>
<if test="hash != null">hash,</if>
<if test="orderNumber != null and orderNumber != ''">order_number,</if>
<if test="addressOne != null and addressOne != ''">address_one,</if>
<if test="awardOne != null">award_one,</if>
<if test="addressTwo != null and addressTwo != ''">address_two,</if>
<if test="awardTwo != null">award_two,</if>
<if test="illustrate != null">illustrate,</if>
<if test="dataJson != null">data_json,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="createTime != null">#{createTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="walletAddress != null and walletAddress != ''">#{walletAddress},</if>
<if test="nodeNumber != null">#{nodeNumber},</if>
<if test="payCoin != null and payCoin != ''">#{payCoin},</if>
<if test="buyAmount != null">#{buyAmount},</if>
<if test="nodeSettingId != null">#{nodeSettingId},</if>
<if test="status != null">#{status},</if>
<if test="userId != null">#{userId},</if>
<if test="hash != null">#{hash},</if>
<if test="orderNumber != null and orderNumber != ''">#{orderNumber},</if>
<if test="addressOne != null and addressOne != ''">#{addressOne},</if>
<if test="awardOne != null">#{awardOne},</if>
<if test="addressTwo != null and addressTwo != ''">#{addressTwo},</if>
<if test="awardTwo != null">#{awardTwo},</if>
<if test="illustrate != null">#{illustrate},</if>
<if test="dataJson != null">#{dataJson},</if>
</trim>
</insert>
<update id="updateUserNodeLog" parameterType="com.ruoyi.system.domain.UserNodeLog">
update user_node_log
<trim prefix="SET" suffixOverrides=",">
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="walletAddress != null and walletAddress != ''">wallet_address = #{walletAddress},</if>
<if test="nodeNumber != null">node_number = #{nodeNumber},</if>
<if test="payCoin != null and payCoin != ''">pay_coin = #{payCoin},</if>
<if test="buyAmount != null">buy_amount = #{buyAmount},</if>
<if test="nodeSettingId != null">node_setting_id = #{nodeSettingId},</if>
<if test="status != null">status = #{status},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="hash != null">hash = #{hash},</if>
<if test="orderNumber != null and orderNumber != ''">order_number = #{orderNumber},</if>
<if test="addressOne != null and addressOne != ''">address_one = #{addressOne},</if>
<if test="awardOne != null">award_one = #{awardOne},</if>
<if test="addressTwo != null and addressTwo != ''">address_two = #{addressTwo},</if>
<if test="awardTwo != null">award_two = #{awardTwo},</if>
<if test="illustrate != null">illustrate = #{illustrate},</if>
<if test="dataJson != null">data_json = #{dataJson},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteUserNodeLogByIds" parameterType="String">
delete from user_node_log where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.UserNodeMapper">
<resultMap type="com.ruoyi.system.domain.UserNode" id="UserNodeResult">
<result property="id" column="id" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
<result property="walletAddress" column="wallet_address" />
<result property="nodeNumber" column="node_number" />
<result property="nodeFreeze" column="node_freeze" />
<result property="buyAmountCount" column="buy_amount_count" />
<result property="userId" column="user_id" />
<result property="nodeCount" column="node_count" />
<result property="promotionUsdt" column="promotion_usdt" />
</resultMap>
<sql id="selectUserNodeVo">
select id, create_time, create_by, update_time, update_by, wallet_address, node_number, node_freeze, buy_amount_count, user_id, node_count, promotion_usdt from user_node
</sql>
<select id="selectUserNodeList" parameterType="com.ruoyi.system.domain.UserNode" resultMap="UserNodeResult">
<include refid="selectUserNodeVo"/>
<where>
<if test="id != null "> and id = #{id}</if>
<if test="walletAddress != null and walletAddress != ''"> and wallet_address = #{walletAddress}</if>
<if test="nodeNumber != null "> and node_number = #{nodeNumber}</if>
<if test="nodeFreeze != null "> and node_freeze = #{nodeFreeze}</if>
<if test="buyAmountCount != null "> and buy_amount_count = #{buyAmountCount}</if>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="nodeCount != null "> and node_count = #{nodeCount}</if>
<if test="promotionUsdt != null "> and promotion_usdt = #{promotionUsdt}</if>
<if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''"> and create_time between #{params.beginTime} and #{params.endTime}</if>
</where>
order by id desc
</select>
<select id="findUserNode" parameterType="com.ruoyi.system.domain.UserNode" resultMap="UserNodeResult">
<include refid="selectUserNodeVo"/>
<where>
<if test="id != null "> and id = #{id}</if>
<if test="walletAddress != null and walletAddress != ''"> and wallet_address = #{walletAddress}</if>
<if test="nodeNumber != null "> and node_number = #{nodeNumber}</if>
<if test="nodeFreeze != null "> and node_freeze = #{nodeFreeze}</if>
<if test="buyAmountCount != null "> and buy_amount_count = #{buyAmountCount}</if>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="nodeCount != null "> and node_count = #{nodeCount}</if>
<if test="promotionUsdt != null "> and promotion_usdt = #{promotionUsdt}</if>
</where>
limit 1
</select>
<select id="selectUserNodeById" parameterType="Integer" resultMap="UserNodeResult">
<include refid="selectUserNodeVo"/>
where id = #{id}
</select>
<insert id="insertUserNode" parameterType="com.ruoyi.system.domain.UserNode" useGeneratedKeys="true" keyProperty="id">
insert into user_node
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="createTime != null">create_time,</if>
<if test="createBy != null">create_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="walletAddress != null and walletAddress != ''">wallet_address,</if>
<if test="nodeNumber != null">node_number,</if>
<if test="nodeFreeze != null">node_freeze,</if>
<if test="buyAmountCount != null">buy_amount_count,</if>
<if test="userId != null">user_id,</if>
<if test="nodeCount != null">node_count,</if>
<if test="promotionUsdt != null">promotion_usdt,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="createTime != null">#{createTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="walletAddress != null and walletAddress != ''">#{walletAddress},</if>
<if test="nodeNumber != null">#{nodeNumber},</if>
<if test="nodeFreeze != null">#{nodeFreeze},</if>
<if test="buyAmountCount != null">#{buyAmountCount},</if>
<if test="userId != null">#{userId},</if>
<if test="nodeCount != null">#{nodeCount},</if>
<if test="promotionUsdt != null">#{promotionUsdt},</if>
</trim>
</insert>
<update id="updateUserNode" parameterType="com.ruoyi.system.domain.UserNode">
update user_node
<trim prefix="SET" suffixOverrides=",">
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="walletAddress != null and walletAddress != ''">wallet_address = #{walletAddress},</if>
<if test="nodeNumber != null">node_number = #{nodeNumber},</if>
<if test="nodeFreeze != null">node_freeze = #{nodeFreeze},</if>
<if test="buyAmountCount != null">buy_amount_count = #{buyAmountCount},</if>
<if test="userId != null">user_id = #{userId},</if>
<if test="nodeCount != null">node_count = #{nodeCount},</if>
<if test="promotionUsdt != null">promotion_usdt = #{promotionUsdt},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteUserNodeByIds" parameterType="String">
delete from user_node where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>