From 6ed309c5a80c36e752bfd799cbaba7665cf7364b Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Fri, 14 May 2021 17:31:02 +0800
Subject: [PATCH] 20210514 云顶
---
src/main/java/com/xcong/excoin/modules/yunding/entity/YdProductEntity.java | 6
src/main/java/com/xcong/excoin/modules/member/entity/MemberAccountMoneyChangeEntity.java | 13
src/main/java/com/xcong/excoin/modules/yunding/controller/BasicSettingController.java | 56 +++
src/main/resources/templates/febs/views/modules/yunding/agentOrderList.html | 188 ++++++++++++
src/main/java/com/xcong/excoin/modules/yunding/vo/YdAgentOrderVo.java | 42 ++
src/main/java/com/xcong/excoin/modules/yunding/service/IBasicSettingService.java | 11
src/main/java/com/xcong/excoin/modules/yunding/service/impl/BasicSettingServiceImpl.java | 62 +++
src/main/resources/mapper/modules/BasicSettingMapper.xml | 94 ++++++
src/main/java/com/xcong/excoin/modules/yunding/mapper/BasicSettingMapper.java | 17 +
src/main/resources/templates/febs/views/modules/yunding/ydProductList.html | 12
src/main/java/com/xcong/excoin/modules/yunding/controller/ViewController.java | 46 +++
src/main/resources/templates/febs/views/modules/yunding/seeOrder.html | 68 ++++
src/main/resources/templates/febs/views/modules/yunding/seeAgentReturn.html | 69 ++++
src/main/resources/templates/febs/views/modules/yunding/ydMemberList.html | 113 ++++---
src/main/java/com/xcong/excoin/modules/yunding/entity/YdOrderEntity.java | 6
src/main/resources/templates/febs/views/modules/yunding/seeReturn.html | 59 +++
src/main/java/com/xcong/excoin/modules/yunding/vo/YdMemberVo.java | 9
17 files changed, 810 insertions(+), 61 deletions(-)
diff --git a/src/main/java/com/xcong/excoin/modules/member/entity/MemberAccountMoneyChangeEntity.java b/src/main/java/com/xcong/excoin/modules/member/entity/MemberAccountMoneyChangeEntity.java
index a9eed51..9e899e1 100644
--- a/src/main/java/com/xcong/excoin/modules/member/entity/MemberAccountMoneyChangeEntity.java
+++ b/src/main/java/com/xcong/excoin/modules/member/entity/MemberAccountMoneyChangeEntity.java
@@ -44,7 +44,6 @@
/**
* 金额
*/
- @JsonSerialize(using = BigDecimalSerialize.class)
private BigDecimal amount;
/**
* 记录内容
@@ -101,4 +100,16 @@
*/
@TableField(exist = false)
private Integer accountType;
+ @TableField(exist = false)
+ private String phoneTo;
+ @TableField(exist = false)
+ private String phoneFrom;
+ @TableField(exist = false)
+ private String amountOrder;
+ @TableField(exist = false)
+ private Integer typeOrder;
+ @TableField(exist = false)
+ private String name;
+ @TableField(exist = false)
+ private String quantityOrder;
}
diff --git a/src/main/java/com/xcong/excoin/modules/yunding/controller/BasicSettingController.java b/src/main/java/com/xcong/excoin/modules/yunding/controller/BasicSettingController.java
index 6d98dd6..9247031 100644
--- a/src/main/java/com/xcong/excoin/modules/yunding/controller/BasicSettingController.java
+++ b/src/main/java/com/xcong/excoin/modules/yunding/controller/BasicSettingController.java
@@ -3,7 +3,7 @@
import com.xcong.excoin.common.controller.BaseController;
import com.xcong.excoin.common.entity.FebsResponse;
import com.xcong.excoin.common.entity.QueryRequest;
-import com.xcong.excoin.modules.trademanage.entity.ContractOrderEntity;
+import com.xcong.excoin.modules.member.entity.MemberEntity;
import com.xcong.excoin.modules.yunding.entity.YdOrderEntity;
import com.xcong.excoin.modules.yunding.entity.YdProductEntity;
import com.xcong.excoin.modules.yunding.service.IBasicSettingService;
@@ -14,6 +14,7 @@
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+import java.lang.reflect.Member;
import java.util.Map;
@Slf4j
@@ -26,13 +27,23 @@
private final IBasicSettingService basicSettingService;
/**
- * 订单查询
+ * 算力订单查询
*/
@GetMapping("getOrderList")
public FebsResponse getOrderList(YdOrderEntity ydOrderEntity, QueryRequest request) {
Map<String, Object> data = getDataTable(basicSettingService.getOrderList(ydOrderEntity, request));
return new FebsResponse().success().data(data);
}
+
+ /**
+ * 代理订单查询
+ */
+ @GetMapping("getAgentOrderList")
+ public FebsResponse getAgentOrderList(YdOrderEntity ydOrderEntity, QueryRequest request) {
+ Map<String, Object> data = getDataTable(basicSettingService.getAgentOrderList(ydOrderEntity, request));
+ return new FebsResponse().success().data(data);
+ }
+
/**
* 产品查询
*/
@@ -41,6 +52,7 @@
Map<String, Object> data = getDataTable(basicSettingService.getYdProductList(ydProductEntity, request));
return new FebsResponse().success().data(data);
}
+
/**
* 会员算力查询
*/
@@ -49,4 +61,44 @@
Map<String, Object> data = getDataTable(basicSettingService.getYdMemberList(ydOrderEntity, request));
return new FebsResponse().success().data(data);
}
+
+ /**
+ * 会员算力查询---返利详情
+ */
+ @GetMapping("/seeAgentReturn")
+ public FebsResponse seeAgentReturn(QueryRequest request, MemberEntity memberEntity, Integer parentId) {
+ if(parentId==null){
+ ViewController.idFromMember=0;
+ }
+ memberEntity.setId(ViewController.idFromMember);
+ Map<String, Object> dataTable = getDataTable(basicSettingService.seeAgentReturn(request, memberEntity));
+ return new FebsResponse().success().data(dataTable);
+ }
+
+ /**
+ * 会员算力查询---返利详情
+ */
+ @GetMapping("/seeReturn")
+ public FebsResponse seeReturn(QueryRequest request, MemberEntity memberEntity, Integer parentId) {
+ if(parentId==null){
+ ViewController.idFromMember=0;
+ }
+ memberEntity.setId(ViewController.idFromMember);
+ Map<String, Object> dataTable = getDataTable(basicSettingService.seeReturn(request, memberEntity));
+ return new FebsResponse().success().data(dataTable);
+ }
+
+ /**
+ * 会员算力查询---订单详情
+ */
+ @GetMapping("/seeOrder")
+ public FebsResponse seeOrder(QueryRequest request, MemberEntity memberEntity, Integer parentId) {
+ if(parentId==null){
+ ViewController.idFromMember=0;
+ }
+ memberEntity.setId(ViewController.idFromMember);
+ Map<String, Object> dataTable = getDataTable(basicSettingService.seeOrder(request, memberEntity));
+ return new FebsResponse().success().data(dataTable);
+ }
+
}
diff --git a/src/main/java/com/xcong/excoin/modules/yunding/controller/ViewController.java b/src/main/java/com/xcong/excoin/modules/yunding/controller/ViewController.java
index 895a871..1cf344a 100644
--- a/src/main/java/com/xcong/excoin/modules/yunding/controller/ViewController.java
+++ b/src/main/java/com/xcong/excoin/modules/yunding/controller/ViewController.java
@@ -1,13 +1,20 @@
package com.xcong.excoin.modules.yunding.controller;
import com.xcong.excoin.common.entity.FebsConstant;
+import com.xcong.excoin.common.entity.FebsResponse;
+import com.xcong.excoin.common.entity.QueryRequest;
import com.xcong.excoin.common.utils.FebsUtil;
+import com.xcong.excoin.modules.documentary.entity.FollowTraderProfitInfoEntity;
import com.xcong.excoin.modules.yunding.service.IBasicSettingService;
import lombok.RequiredArgsConstructor;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
+
+import java.util.Map;
@Controller("yundingView")
@RequestMapping(FebsConstant.VIEW_PREFIX + "modules/yunding")
@@ -16,14 +23,25 @@
private final IBasicSettingService basicSettingService;
+ public static long idFromMember;
+
/**
- * 订单查询
+ * 产品订单查询
* @return
*/
@GetMapping("yundingOrderList")
@RequiresPermissions("yundingOrderList:view")
public String memberOrderList() {
return FebsUtil.view("modules/yunding/yundingOrderList");
+ }
+ /**
+ * 代理订单查询
+ * @return
+ */
+ @GetMapping("agentOrderList")
+ @RequiresPermissions("agentOrderList:view")
+ public String agentOrderList() {
+ return FebsUtil.view("modules/yunding/agentOrderList");
}
/**
@@ -45,4 +63,30 @@
public String ydMemberList() {
return FebsUtil.view("modules/yunding/ydMemberList");
}
+
+ /**
+ * 会员算力查询---返利记录
+ */
+ @GetMapping("seeAgentReturn/{id}")
+ public String seeAgentReturn(@PathVariable long id, Model model) {
+ idFromMember = id;
+ return FebsUtil.view("modules/yunding/seeAgentReturn");
+ }
+ /**
+ * 会员算力查询---挖矿详情
+ */
+ @GetMapping("seeReturn/{id}")
+ public String seeReturn(@PathVariable long id, Model model) {
+ idFromMember = id;
+ return FebsUtil.view("modules/yunding/seeReturn");
+ }
+ /**
+ * 会员算力查询---订单详情
+ */
+ @GetMapping("seeOrder/{id}")
+ public String seeOrder(@PathVariable long id, Model model) {
+ idFromMember = id;
+ return FebsUtil.view("modules/yunding/seeOrder");
+ }
+
}
diff --git a/src/main/java/com/xcong/excoin/modules/yunding/entity/YdOrderEntity.java b/src/main/java/com/xcong/excoin/modules/yunding/entity/YdOrderEntity.java
index 7ef2088..065519f 100644
--- a/src/main/java/com/xcong/excoin/modules/yunding/entity/YdOrderEntity.java
+++ b/src/main/java/com/xcong/excoin/modules/yunding/entity/YdOrderEntity.java
@@ -66,6 +66,12 @@
private BigDecimal todayProfit;
/**
+ * 订单类型 1-矿机订单 2-代理订单
+ */
+
+ private Integer type;
+
+ /**
* 1:待生效 2:生效中 3:已终止
*/
diff --git a/src/main/java/com/xcong/excoin/modules/yunding/entity/YdProductEntity.java b/src/main/java/com/xcong/excoin/modules/yunding/entity/YdProductEntity.java
index 9f8f7cc..6943eae 100644
--- a/src/main/java/com/xcong/excoin/modules/yunding/entity/YdProductEntity.java
+++ b/src/main/java/com/xcong/excoin/modules/yunding/entity/YdProductEntity.java
@@ -99,5 +99,11 @@
private Integer favourable;
+ /**
+ * 销售状态 1-热售中 2-售罄 3-未开售
+ */
+
+ private Integer status;
+
}
diff --git a/src/main/java/com/xcong/excoin/modules/yunding/mapper/BasicSettingMapper.java b/src/main/java/com/xcong/excoin/modules/yunding/mapper/BasicSettingMapper.java
index fa504d1..58273c2 100644
--- a/src/main/java/com/xcong/excoin/modules/yunding/mapper/BasicSettingMapper.java
+++ b/src/main/java/com/xcong/excoin/modules/yunding/mapper/BasicSettingMapper.java
@@ -3,9 +3,12 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.xcong.excoin.modules.member.entity.MemberAccountMoneyChangeEntity;
+import com.xcong.excoin.modules.member.entity.MemberEntity;
import com.xcong.excoin.modules.yunding.entity.BasicSettingEntity;
import com.xcong.excoin.modules.yunding.entity.YdOrderEntity;
import com.xcong.excoin.modules.yunding.entity.YdProductEntity;
+import com.xcong.excoin.modules.yunding.vo.YdAgentOrderVo;
import com.xcong.excoin.modules.yunding.vo.YdMemberVo;
import org.apache.ibatis.annotations.Param;
@@ -21,11 +24,23 @@
int selectPowerByMemberIdAndState(@Param("memberId")long memberId, @Param("state")int orderStateReady);
- BigDecimal selectAmountByMemberId(@Param("memberId")long memberId);
+ BigDecimal selectAmountByMemberId(@Param("memberId")long memberId,@Param("type")int type);
BigDecimal selectChargeAmountByMemberIdAndStatus(@Param("memberId")long memberId, @Param("status")int status);
BigDecimal selectWithdrawAmountByMemberIdAndStatusAndIsInside(@Param("memberId")long memberId,
@Param("status")int status,
@Param("isInside")String isInside);
+
+ IPage<YdAgentOrderVo> getAgentOrderList(Page<YdOrderEntity> page, @Param("record")YdOrderEntity ydOrderEntity);
+
+ BigDecimal selectAgentReturnByMemberId(@Param("memberId")long memberId);
+
+ IPage<MemberAccountMoneyChangeEntity> seeAgentReturn(Page<MemberAccountMoneyChangeEntity> page, @Param("record") MemberEntity memberEntity);
+
+ BigDecimal selectTotalProfitByMemberIdAndType(@Param("memberId")long memberId, @Param("type")int type);
+
+ IPage<MemberAccountMoneyChangeEntity> seeReturn(Page<MemberAccountMoneyChangeEntity> page, @Param("record")MemberEntity memberEntity);
+
+ IPage<YdOrderEntity> seeOrder(Page<YdOrderEntity> page,@Param("record") MemberEntity memberEntity);
}
diff --git a/src/main/java/com/xcong/excoin/modules/yunding/service/IBasicSettingService.java b/src/main/java/com/xcong/excoin/modules/yunding/service/IBasicSettingService.java
index b3f0459..b460ed4 100644
--- a/src/main/java/com/xcong/excoin/modules/yunding/service/IBasicSettingService.java
+++ b/src/main/java/com/xcong/excoin/modules/yunding/service/IBasicSettingService.java
@@ -3,9 +3,12 @@
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xcong.excoin.common.entity.QueryRequest;
+import com.xcong.excoin.modules.member.entity.MemberAccountMoneyChangeEntity;
+import com.xcong.excoin.modules.member.entity.MemberEntity;
import com.xcong.excoin.modules.yunding.entity.BasicSettingEntity;
import com.xcong.excoin.modules.yunding.entity.YdOrderEntity;
import com.xcong.excoin.modules.yunding.entity.YdProductEntity;
+import com.xcong.excoin.modules.yunding.vo.YdAgentOrderVo;
import com.xcong.excoin.modules.yunding.vo.YdMemberVo;
public interface IBasicSettingService extends IService<BasicSettingEntity> {
@@ -15,4 +18,12 @@
IPage<YdProductEntity> getYdProductList(YdProductEntity ydProductEntity, QueryRequest request);
IPage<YdMemberVo> getYdMemberList(YdOrderEntity ydOrderEntity, QueryRequest request);
+
+ IPage<YdAgentOrderVo> getAgentOrderList(YdOrderEntity ydOrderEntity, QueryRequest request);
+
+ IPage<MemberAccountMoneyChangeEntity> seeAgentReturn(QueryRequest request, MemberEntity memberEntity);
+
+ IPage<MemberAccountMoneyChangeEntity> seeReturn(QueryRequest request, MemberEntity memberEntity);
+
+ IPage<YdOrderEntity> seeOrder(QueryRequest request, MemberEntity memberEntity);
}
diff --git a/src/main/java/com/xcong/excoin/modules/yunding/service/impl/BasicSettingServiceImpl.java b/src/main/java/com/xcong/excoin/modules/yunding/service/impl/BasicSettingServiceImpl.java
index e27ce29..e25f885 100644
--- a/src/main/java/com/xcong/excoin/modules/yunding/service/impl/BasicSettingServiceImpl.java
+++ b/src/main/java/com/xcong/excoin/modules/yunding/service/impl/BasicSettingServiceImpl.java
@@ -1,10 +1,13 @@
package com.xcong.excoin.modules.yunding.service.impl;
import cn.hutool.core.collection.CollUtil;
+import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xcong.excoin.common.entity.QueryRequest;
+import com.xcong.excoin.modules.member.entity.MemberAccountMoneyChangeEntity;
+import com.xcong.excoin.modules.member.entity.MemberEntity;
import com.xcong.excoin.modules.member.entity.MemberWalletCoinEntity;
import com.xcong.excoin.modules.member.mapper.MemberWalletCoinMapper;
import com.xcong.excoin.modules.yunding.entity.BasicSettingEntity;
@@ -12,6 +15,7 @@
import com.xcong.excoin.modules.yunding.entity.YdProductEntity;
import com.xcong.excoin.modules.yunding.mapper.BasicSettingMapper;
import com.xcong.excoin.modules.yunding.service.IBasicSettingService;
+import com.xcong.excoin.modules.yunding.vo.YdAgentOrderVo;
import com.xcong.excoin.modules.yunding.vo.YdMemberVo;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@@ -33,7 +37,7 @@
@Override
public IPage<YdOrderEntity> getOrderList(YdOrderEntity ydOrderEntity, QueryRequest request) {
- log.info("订单列表");
+ log.info("产品订单列表");
Page<YdOrderEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
IPage<YdOrderEntity> ydOrderEntitys = basicSettingMapper.getOrderList(page, ydOrderEntity);
return ydOrderEntitys;
@@ -62,16 +66,62 @@
ydMemberVo.setQuantityWork(quantityWork);
int quantityEnd = basicSettingMapper.selectPowerByMemberIdAndState(memberId,YdOrderEntity.ORDER_STATE_END);
ydMemberVo.setQuantityEnd(quantityEnd);
- BigDecimal totalUsed = basicSettingMapper.selectAmountByMemberId(memberId);
- ydMemberVo.setTotalUsed(totalUsed);
+ BigDecimal totalUsed = basicSettingMapper.selectAmountByMemberId(memberId,1);
+ ydMemberVo.setTotalUsed(totalUsed == null ? BigDecimal.ZERO : totalUsed);
+
+ BigDecimal agentUsed = basicSettingMapper.selectAmountByMemberId(memberId,2);
+ ydMemberVo.setAgentUsed(agentUsed == null ? BigDecimal.ZERO : agentUsed);
MemberWalletCoinEntity memberWalletCoinEntity = memberWalletCoinMapper.findWalletCoinByMemberIdAndWalletCode(memberId, "USDT");
- ydMemberVo.setAvailableBalance(memberWalletCoinEntity.getAvailableBalance());
+ if(ObjectUtil.isNotEmpty(memberWalletCoinEntity)){
+ ydMemberVo.setAvailableBalance(memberWalletCoinEntity.getAvailableBalance() == null ? BigDecimal.ZERO : memberWalletCoinEntity.getAvailableBalance());
+ }else{
+ ydMemberVo.setAvailableBalance(BigDecimal.ZERO);
+ }
BigDecimal inBalance = basicSettingMapper.selectChargeAmountByMemberIdAndStatus(memberId,1);
- ydMemberVo.setInBalance(inBalance);
+ ydMemberVo.setInBalance(inBalance == null ? BigDecimal.ZERO : inBalance);
BigDecimal outBalance = basicSettingMapper.selectWithdrawAmountByMemberIdAndStatusAndIsInside(memberId,2,"N");
- ydMemberVo.setOutBalance(outBalance);
+ ydMemberVo.setOutBalance(outBalance == null ? BigDecimal.ZERO : outBalance);
+ BigDecimal returnAgent = basicSettingMapper.selectAgentReturnByMemberId(memberId);
+ ydMemberVo.setReturnAgent(returnAgent == null ? BigDecimal.ZERO : returnAgent);
+
+ BigDecimal totalProfit = basicSettingMapper.selectTotalProfitByMemberIdAndType(memberId,1);
+ ydMemberVo.setTotalProfit(totalProfit);
+
}
}
return ydMemberVos;
}
+
+ @Override
+ public IPage<YdAgentOrderVo> getAgentOrderList(YdOrderEntity ydOrderEntity, QueryRequest request) {
+ log.info("代理订单列表");
+ Page<YdOrderEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
+ IPage<YdAgentOrderVo> ydOrderEntitys = basicSettingMapper.getAgentOrderList(page, ydOrderEntity);
+ return ydOrderEntitys;
+ }
+
+ @Override
+ public IPage<MemberAccountMoneyChangeEntity> seeAgentReturn(QueryRequest request, MemberEntity memberEntity) {
+ log.info("会员算力查询---返利详情");
+ Page<MemberAccountMoneyChangeEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
+ IPage<MemberAccountMoneyChangeEntity> memberAccountMoneyChangeEntitys = basicSettingMapper.seeAgentReturn(page, memberEntity);
+ return memberAccountMoneyChangeEntitys;
+ }
+
+ @Override
+ public IPage<MemberAccountMoneyChangeEntity> seeReturn(QueryRequest request, MemberEntity memberEntity) {
+ log.info("会员算力查询---挖矿详情");
+ Page<MemberAccountMoneyChangeEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
+ IPage<MemberAccountMoneyChangeEntity> memberAccountMoneyChangeEntitys = basicSettingMapper.seeReturn(page, memberEntity);
+ return memberAccountMoneyChangeEntitys;
+ }
+
+ @Override
+ public IPage<YdOrderEntity> seeOrder(QueryRequest request, MemberEntity memberEntity) {
+ log.info("会员算力查询---订单详情");
+ Page<YdOrderEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
+ IPage<YdOrderEntity> ydOrderEntitys = basicSettingMapper.seeOrder(page, memberEntity);
+ return ydOrderEntitys;
+ }
+
}
diff --git a/src/main/java/com/xcong/excoin/modules/yunding/vo/YdAgentOrderVo.java b/src/main/java/com/xcong/excoin/modules/yunding/vo/YdAgentOrderVo.java
new file mode 100644
index 0000000..da5c43b
--- /dev/null
+++ b/src/main/java/com/xcong/excoin/modules/yunding/vo/YdAgentOrderVo.java
@@ -0,0 +1,42 @@
+package com.xcong.excoin.modules.yunding.vo;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+public class YdAgentOrderVo {
+
+ /**
+ * 会员ID
+ */
+
+ private Long memberId;
+
+ /**
+ * 产品ID
+ */
+
+ private Long productId;
+
+ /**
+ * 名称
+ */
+ private String name;
+ /**
+ * 总金额
+ */
+
+ private BigDecimal amount;
+
+ private String account;
+ private String phone;
+ private String inviteId;
+
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ private Date createTime;
+
+}
diff --git a/src/main/java/com/xcong/excoin/modules/yunding/vo/YdMemberVo.java b/src/main/java/com/xcong/excoin/modules/yunding/vo/YdMemberVo.java
index a5cd811..30e83c5 100644
--- a/src/main/java/com/xcong/excoin/modules/yunding/vo/YdMemberVo.java
+++ b/src/main/java/com/xcong/excoin/modules/yunding/vo/YdMemberVo.java
@@ -27,5 +27,14 @@
//提现金额
@JsonSerialize(using = BigDecimalSerialize.class)
private BigDecimal outBalance;
+ //购买代理金额
+ @JsonSerialize(using = BigDecimalSerialize.class)
+ private BigDecimal agentUsed;
+ //获得返利金额
+ @JsonSerialize(using = BigDecimalSerialize.class)
+ private BigDecimal returnAgent;
+
+ //总收益
+ private BigDecimal totalProfit;
}
diff --git a/src/main/resources/mapper/modules/BasicSettingMapper.xml b/src/main/resources/mapper/modules/BasicSettingMapper.xml
index 8e43d7e..204ba1e 100644
--- a/src/main/resources/mapper/modules/BasicSettingMapper.xml
+++ b/src/main/resources/mapper/modules/BasicSettingMapper.xml
@@ -12,9 +12,28 @@
left join member c on c.id = a.member_id
<if test="record != null">
<where>
+ and a.type=1
<if test="record.state != null" >
and a.state=#{record.state}
</if>
+ <if test="record.account!=null and record.account!=''">
+ and (c.phone = #{record.account} or c.email = #{record.account} or c.invite_id=#{record.account})
+ </if>
+ </where>
+ </if>
+ ORDER BY a.create_time DESC
+ </select>
+
+ <select id="getAgentOrderList" resultType="com.xcong.excoin.modules.yunding.vo.YdAgentOrderVo">
+ SELECT
+ *
+ FROM
+ yd_order a
+ left join yd_basic_level_setting b on b.id = a.product_id
+ left join member c on c.id = a.member_id
+ <if test="record != null">
+ <where>
+ and a.type=2
<if test="record.account!=null and record.account!=''">
and (c.phone = #{record.account} or c.email = #{record.account} or c.invite_id=#{record.account})
</if>
@@ -60,6 +79,7 @@
FROM
yd_order a
where a.member_id = #{memberId}
+ and type = #{type}
</select>
@@ -83,4 +103,78 @@
</select>
+
+ <select id="selectAgentReturnByMemberId" resultType="java.math.BigDecimal">
+ SELECT
+ IFNULL(sum(amount),0)
+ FROM
+ member_account_money_change
+ WHERE
+ member_id = #{memberId}
+ AND type = 6
+ AND status = 1
+ </select>
+
+ <select id="seeAgentReturn" resultType="com.xcong.excoin.modules.member.entity.MemberAccountMoneyChangeEntity">
+ SELECT
+ b.phone phoneTo,
+ a.content content,
+ a.amount amount,
+ a.symbol symbol,
+ a.status status,
+ c.phone phoneFrom,
+ d.amount amountOrder,
+ d.type typeOrder
+ FROM
+ member_account_money_change a
+ left join member b on b.id = a.member_id
+ left join member c on c.id = (
+ select member_id from yd_order where id = a.withdraw_id
+ )
+ left join yd_order d on d.id = a.withdraw_id
+ where a.type=6
+ and a.member_id = #{record.id}
+ ORDER BY a.create_time DESC
+ </select>
+
+ <select id="selectTotalProfitByMemberIdAndType" resultType="java.math.BigDecimal">
+ SELECT
+ IFNULL(sum(total_profit),0)
+ FROM
+ yd_order a
+ where a.member_id = #{memberId}
+ and a.type = #{type}
+ </select>
+
+ <select id="seeReturn" resultType="com.xcong.excoin.modules.member.entity.MemberAccountMoneyChangeEntity">
+ SELECT
+ a.content content,
+ a.amount amount,
+ a.symbol symbol,
+ a.status status,
+ b.phone phoneFrom,
+ d.quantity quantityOrder,
+ e.name name
+ FROM
+ member_account_money_change a
+ left join member b on b.id = a.member_id
+ left join yd_order d on d.id = a.withdraw_id
+ left join yd_product e on e.id = d.product_id
+ where a.type=4
+ and a.member_id = #{record.id}
+ ORDER BY a.create_time DESC
+ </select>
+
+ <select id="seeOrder" resultType="com.xcong.excoin.modules.yunding.entity.YdOrderEntity">
+ SELECT
+ *
+ FROM
+ yd_order a
+ left join yd_product e on e.id = a.product_id
+ where a.member_id = #{record.id}
+ and a.type = 1
+ ORDER BY a.buy_time DESC
+ </select>
+
+
</mapper>
\ No newline at end of file
diff --git a/src/main/resources/templates/febs/views/modules/yunding/agentOrderList.html b/src/main/resources/templates/febs/views/modules/yunding/agentOrderList.html
new file mode 100644
index 0000000..68dcf80
--- /dev/null
+++ b/src/main/resources/templates/febs/views/modules/yunding/agentOrderList.html
@@ -0,0 +1,188 @@
+<div class="layui-fluid layui-anim febs-anim" id="trader-profit" lay-title="订单查询">
+ <div class="layui-row febs-container">
+ <div class="layui-col-md12">
+ <div class="layui-card">
+ <div class="layui-card-body febs-table-full">
+ <form class="layui-form layui-table-form" lay-filter="user-table-form">
+ <div class="layui-row">
+ <div class="layui-col-md10">
+ <div class="layui-form-item">
+ <div class="layui-inline">
+ <div class="layui-input-inline">
+ <input type="text" placeholder="手机号/邮箱/邀请码" name="account" autocomplete="off" class="layui-input">
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="layui-col-md2 layui-col-sm12 layui-col-xs12 table-action-area">
+ <div class="layui-btn layui-btn-sm layui-btn-primary febs-button-blue-plain table-action" id="query">
+ <i class="layui-icon"></i>
+ </div>
+ <div class="layui-btn layui-btn-sm layui-btn-primary febs-button-green-plain table-action" id="reset">
+ <i class="layui-icon"></i>
+ </div>
+ </div>
+ </div>
+ </form>
+ <table lay-filter="userTable" lay-data="{id: 'userTable'}"></table>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+<!-- 表格操作栏 start -->
+<script type="text/html" id="user-option">
+ <span shiro:lacksPermission="user:view,user:update,user:delete">
+ <span class="layui-badge-dot febs-bg-orange"></span> 无权限
+ </span>
+ <a lay-event="edit" shiro:hasPermission="user:update"><i
+ class="layui-icon febs-edit-area febs-blue"></i></a>
+</script>
+<!-- 表格操作栏 end -->
+<script data-th-inline="none" type="text/javascript">
+ // 引入组件并初始化
+ layui.use([ 'jquery', 'form', 'table', 'febs'], function () {
+ var $ = layui.jquery,
+ febs = layui.febs,
+ form = layui.form,
+ table = layui.table,
+ $view = $('#trader-profit'),
+ $query = $view.find('#query'),
+ $reset = $view.find('#reset'),
+ $searchForm = $view.find('form'),
+ sortObject = {field: 'phone', type: null},
+ tableIns;
+
+ form.render();
+
+ // 表格初始化
+ initTable();
+
+ // 初始化表格操作栏各个按钮功能
+ table.on('tool(userTable)', function (obj) {
+ var data = obj.data,
+ layEvent = obj.event;
+
+ if (layEvent === 'edit') {
+ febs.modal.open('交易员审核', 'modules/documentary/traderDetail/' + data.id, {
+ btn: ['确认', '取消'],
+ yes: function (index, layero) {
+ $('#user-update').find('#submit').trigger('click');
+ },
+ btn2: function () {
+ layer.closeAll();
+ }
+ });
+ }
+
+ if (layEvent === 'seeFollowerInfo') {
+ febs.modal.open('跟随者详情', 'modules/documentary/seeFollowerInfo/' + data.id, {
+ area: $(window).width() <= 750 ? '90%' : '80%',
+ offset: '30px',
+ btn2: function () {
+ layer.closeAll();
+ },
+ cancel: function(){
+ var index=parent.layer.getFrameIndex(window.name); //获取当前窗口的name
+ parent.layer.close(index);//关闭当前窗口
+ window.parent.location.reload();//刷新
+ }
+ });
+ $query.click();
+ }
+ if (layEvent === 'modifyProfitRatio') {
+ febs.modal.open('收益率修改', 'modules/documentary/modifyProfitRatio/' + data.id, {
+ btn: ['确认', '取消'],
+ yes: function (index, layero) {
+ $('#user-update').find('#submit').trigger('click');
+ },
+ btn2: function () {
+ layer.closeAll();
+ }
+ });
+ $query.click();
+ }
+ if (layEvent === 'getOut') {
+ febs.modal.confirm('确认', '您是否要踢出该交易员?', function () {
+ confirmUsers(data.id);
+ });
+ }
+ if (layEvent === 'getOn') {
+ febs.modal.confirm('确认', '您是否推荐当前交易员?', function () {
+ confirmUsersGetOn(data.id);
+ });
+ }
+ if (layEvent === 'getOutFrist') {
+ febs.modal.confirm('确认', '您是否取消推荐当前交易员?', function () {
+ confirmUsersGetOutFrist(data.id);
+ });
+ }
+ if (layEvent === 'getFull') {
+ febs.modal.confirm('确认', '您是否要设置成【满员】状态?', function () {
+ cancelUsers(data.id);
+ });
+ }
+ });
+
+ function confirmUsers(id) {
+ febs.get(ctx + 'documentary/traderGetOut/' + id, null, function () {
+ febs.alert.success('踢出成功');
+ $query.click();
+ });
+ }
+ function confirmUsersGetOn(id) {
+ febs.get(ctx + 'documentary/traderGetOn/' + id, null, function () {
+ febs.alert.success('设置成功');
+ $query.click();
+ });
+ }
+ function confirmUsersGetOutFrist(id) {
+ febs.get(ctx + 'documentary/traderGetOutFrist/' + id, null, function () {
+ febs.alert.success('设置成功');
+ $query.click();
+ });
+ }
+ function cancelUsers(id) {
+ febs.get(ctx + 'documentary/traderGetFull/' + id, null, function () {
+ febs.alert.success('设置成功');
+ $query.click();
+ });
+ }
+
+
+ // 查询按钮
+ $query.on('click', function () {
+ var params = $.extend(getQueryParams(), {field: sortObject.field, order: sortObject.type});
+ tableIns.reload({where: params, page: {curr: 1}});
+ });
+
+ // 刷新按钮
+ $reset.on('click', function () {
+ $searchForm[0].reset();
+ tableIns.reload({where: getQueryParams(), page: {curr: 1}});
+ });
+
+ function initTable() {
+ tableIns = febs.table.init({
+ elem: $view.find('table'),
+ id: 'userTable',
+ url: ctx + 'yd/getAgentOrderList',
+ cols: [[
+ {field: 'phone', title: '手机号', minWidth: 100,align:'left'},
+ {field: 'inviteId', title: '邀请码UID', minWidth: 80,align:'center'},
+ {field: 'name', title: '产品名称', minWidth: 80,align:'center'},
+ {field: 'amount', title: '总金额', minWidth: 80,align:'center'},
+ {field: 'createTime', title: '购买日期', minWidth: 80,align:'center'},
+ ]]
+ });
+ }
+
+ // 获取查询参数
+ function getQueryParams() {
+ return {
+ account: $searchForm.find('input[name="account"]').val().trim(),
+ };
+ }
+
+ })
+</script>
\ No newline at end of file
diff --git a/src/main/resources/templates/febs/views/modules/yunding/seeAgentReturn.html b/src/main/resources/templates/febs/views/modules/yunding/seeAgentReturn.html
new file mode 100644
index 0000000..c775b21
--- /dev/null
+++ b/src/main/resources/templates/febs/views/modules/yunding/seeAgentReturn.html
@@ -0,0 +1,69 @@
+
+<div class="layui-fluid layui-anim febs-anim" id="febs-user-child" lay-title="返利详情">
+ <div class="layui-row febs-container">
+ <div class="layui-col-md12">
+ <div class="layui-card">
+ <div class="layui-card-body febs-table-full">
+ <table lay-filter="userTableChild" lay-data="{id: 'userTableChild'}"></table>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+<script data-th-inline="none" type="text/javascript">
+ layui.use(['dropdown', 'jquery', 'laydate', 'form', 'table', 'febs', 'treeSelect' ,'eleTree'], function () {
+ var $ = layui.jquery,
+ laydate = layui.laydate,
+ febs = layui.febs,
+ form = layui.form,
+ table = layui.table,
+ treeSelect = layui.treeSelect,
+ dropdown = layui.dropdown,
+ $view = $('#febs-user-child'),
+ $query = $view.find('#queryChild'),
+ $searchForm = $view.find('formChild'),
+ sortObject = {field: 'createTime', type: null},
+ tableIns,
+ createTimeFrom,
+ createTimeTo;
+
+ form.render();
+
+ initTable();
+
+ laydate.render({
+ elem: '#user-createTime',
+ range: true,
+ trigger: 'click'
+ });
+
+
+ function initTable() {
+ tableIns = febs.table.init({
+ elem: $view.find('table'),
+ id: 'userTable',
+ url: ctx + 'yd/seeAgentReturn?parentId=1',
+ cols: [[
+ {field: 'phoneFrom', title: '来自于', minWidth: 150,align:'center'},
+ {field: 'amountOrder', title: '订单金额', minWidth: 150,align:'center'},
+ {field: 'typeOrder', title: '类型',
+ templet: function (d) {
+ if (d.typeOrder === 1) {
+ return '<span>矿机订单</span>'
+ }else if(d.typeOrder === 2){
+ return '<span>代理订单</span>'
+ }else{
+ return ''
+ }
+ }, minWidth: 80,align:'center'},
+ {field: 'content', title: '内容', minWidth: 100,align:'left'},
+ {field: 'amount', title: '金额', minWidth: 100,align:'left'},
+ {field: 'symbol', title: '币种', minWidth: 80,align:'center'},
+ {field: 'status', title: '状态', minWidth: 150,align:'left'},
+ {field: 'phoneTo', title: '接收方', minWidth: 100,align:'left'},
+ ]]
+ });
+ }
+
+ })
+</script>
\ No newline at end of file
diff --git a/src/main/resources/templates/febs/views/modules/yunding/seeOrder.html b/src/main/resources/templates/febs/views/modules/yunding/seeOrder.html
new file mode 100644
index 0000000..62c00bf
--- /dev/null
+++ b/src/main/resources/templates/febs/views/modules/yunding/seeOrder.html
@@ -0,0 +1,68 @@
+
+<div class="layui-fluid layui-anim febs-anim" id="febs-user-child" lay-title="订单详情">
+ <div class="layui-row febs-container">
+ <div class="layui-col-md12">
+ <div class="layui-card">
+ <div class="layui-card-body febs-table-full">
+ <table lay-filter="userTableChild" lay-data="{id: 'userTableChild'}"></table>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+<script data-th-inline="none" type="text/javascript">
+ layui.use(['dropdown', 'jquery', 'laydate', 'form', 'table', 'febs', 'treeSelect' ,'eleTree'], function () {
+ var $ = layui.jquery,
+ laydate = layui.laydate,
+ febs = layui.febs,
+ form = layui.form,
+ table = layui.table,
+ treeSelect = layui.treeSelect,
+ dropdown = layui.dropdown,
+ $view = $('#febs-user-child'),
+ $query = $view.find('#queryChild'),
+ $searchForm = $view.find('formChild'),
+ sortObject = {field: 'createTime', type: null},
+ tableIns,
+ createTimeFrom,
+ createTimeTo;
+
+ form.render();
+
+ initTable();
+
+ laydate.render({
+ elem: '#user-createTime',
+ range: true,
+ trigger: 'click'
+ });
+
+
+ function initTable() {
+ tableIns = febs.table.init({
+ elem: $view.find('table'),
+ id: 'userTable',
+ url: ctx + 'yd/seeOrder?parentId=1',
+ cols: [[
+ {field: 'name', title: '产品名称', minWidth: 150,align:'center'},
+ {field: 'quantity', title: '算力', minWidth: 150,align:'center'},
+ {field: 'state', title: '状态',
+ templet: function (d) {
+ if (d.state === 1) {
+ return '<span>待生效</span>'
+ }else if(d.state === 2){
+ return '<span>生效中</span>'
+ }else if(d.state === 3){
+ return '<span>已终止</span>'
+ }else{
+ return ''
+ }
+ }, minWidth: 80,align:'center'},
+ {field: 'buyTime', title: '购买时间', minWidth: 100,align:'left'},
+ {field: 'totalProfit', title: '累计收益', minWidth: 100,align:'left'},
+ ]]
+ });
+ }
+
+ })
+</script>
\ No newline at end of file
diff --git a/src/main/resources/templates/febs/views/modules/yunding/seeReturn.html b/src/main/resources/templates/febs/views/modules/yunding/seeReturn.html
new file mode 100644
index 0000000..3857fb6
--- /dev/null
+++ b/src/main/resources/templates/febs/views/modules/yunding/seeReturn.html
@@ -0,0 +1,59 @@
+
+<div class="layui-fluid layui-anim febs-anim" id="febs-user-child" lay-title="挖矿详情">
+ <div class="layui-row febs-container">
+ <div class="layui-col-md12">
+ <div class="layui-card">
+ <div class="layui-card-body febs-table-full">
+ <table lay-filter="userTableChild" lay-data="{id: 'userTableChild'}"></table>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+<script data-th-inline="none" type="text/javascript">
+ layui.use(['dropdown', 'jquery', 'laydate', 'form', 'table', 'febs', 'treeSelect' ,'eleTree'], function () {
+ var $ = layui.jquery,
+ laydate = layui.laydate,
+ febs = layui.febs,
+ form = layui.form,
+ table = layui.table,
+ treeSelect = layui.treeSelect,
+ dropdown = layui.dropdown,
+ $view = $('#febs-user-child'),
+ $query = $view.find('#queryChild'),
+ $searchForm = $view.find('formChild'),
+ sortObject = {field: 'createTime', type: null},
+ tableIns,
+ createTimeFrom,
+ createTimeTo;
+
+ form.render();
+
+ initTable();
+
+ laydate.render({
+ elem: '#user-createTime',
+ range: true,
+ trigger: 'click'
+ });
+
+
+ function initTable() {
+ tableIns = febs.table.init({
+ elem: $view.find('table'),
+ id: 'userTable',
+ url: ctx + 'yd/seeReturn?parentId=1',
+ cols: [[
+ {field: 'phoneFrom', title: '用户', minWidth: 150,align:'center'},
+ {field: 'name', title: '产品名称', minWidth: 150,align:'center'},
+ {field: 'quantityOrder', title: '算力', minWidth: 150,align:'center'},
+ {field: 'content', title: '内容', minWidth: 100,align:'left'},
+ {field: 'amount', title: '金额', minWidth: 100,align:'left'},
+ {field: 'symbol', title: '币种', minWidth: 80,align:'center'},
+ {field: 'status', title: '状态', minWidth: 150,align:'left'},
+ ]]
+ });
+ }
+
+ })
+</script>
\ No newline at end of file
diff --git a/src/main/resources/templates/febs/views/modules/yunding/ydMemberList.html b/src/main/resources/templates/febs/views/modules/yunding/ydMemberList.html
index b2a1186..e692492 100644
--- a/src/main/resources/templates/febs/views/modules/yunding/ydMemberList.html
+++ b/src/main/resources/templates/febs/views/modules/yunding/ydMemberList.html
@@ -74,20 +74,8 @@
var data = obj.data,
layEvent = obj.event;
- if (layEvent === 'edit') {
- febs.modal.open('交易员审核', 'modules/documentary/traderDetail/' + data.id, {
- btn: ['确认', '取消'],
- yes: function (index, layero) {
- $('#user-update').find('#submit').trigger('click');
- },
- btn2: function () {
- layer.closeAll();
- }
- });
- }
-
- if (layEvent === 'seeFollowerInfo') {
- febs.modal.open('跟随者详情', 'modules/documentary/seeFollowerInfo/' + data.id, {
+ if (layEvent === 'seeAgentReturn') {
+ febs.modal.open('返利详情', 'modules/yunding/seeAgentReturn/' + data.id, {
area: $(window).width() <= 750 ? '90%' : '80%',
offset: '30px',
btn2: function () {
@@ -99,38 +87,33 @@
window.parent.location.reload();//刷新
}
});
- $query.click();
}
- if (layEvent === 'modifyProfitRatio') {
- febs.modal.open('收益率修改', 'modules/documentary/modifyProfitRatio/' + data.id, {
- btn: ['确认', '取消'],
- yes: function (index, layero) {
- $('#user-update').find('#submit').trigger('click');
- },
+ if (layEvent === 'seeReturn') {
+ febs.modal.open('返利详情', 'modules/yunding/seeReturn/' + data.id, {
+ area: $(window).width() <= 750 ? '90%' : '80%',
+ offset: '30px',
btn2: function () {
layer.closeAll();
+ },
+ cancel: function(){
+ var index=parent.layer.getFrameIndex(window.name); //获取当前窗口的name
+ parent.layer.close(index);//关闭当前窗口
+ window.parent.location.reload();//刷新
}
});
- $query.click();
}
- if (layEvent === 'getOut') {
- febs.modal.confirm('确认', '您是否要踢出该交易员?', function () {
- confirmUsers(data.id);
- });
- }
- if (layEvent === 'getOn') {
- febs.modal.confirm('确认', '您是否推荐当前交易员?', function () {
- confirmUsersGetOn(data.id);
- });
- }
- if (layEvent === 'getOutFrist') {
- febs.modal.confirm('确认', '您是否取消推荐当前交易员?', function () {
- confirmUsersGetOutFrist(data.id);
- });
- }
- if (layEvent === 'getFull') {
- febs.modal.confirm('确认', '您是否要设置成【满员】状态?', function () {
- cancelUsers(data.id);
+ if (layEvent === 'seeOrder') {
+ febs.modal.open('订单详情', 'modules/yunding/seeOrder/' + data.id, {
+ area: $(window).width() <= 750 ? '90%' : '80%',
+ offset: '30px',
+ btn2: function () {
+ layer.closeAll();
+ },
+ cancel: function(){
+ var index=parent.layer.getFrameIndex(window.name); //获取当前窗口的name
+ parent.layer.close(index);//关闭当前窗口
+ window.parent.location.reload();//刷新
+ }
});
}
});
@@ -183,23 +166,15 @@
{field: 'availableBalance', title: '账户余额',
templet: function (d) {
if (d.availableBalance > 0) {
- return '<span style="color:green;">'+d.availableBalance+'</span>'
+ return '<span style="color:blue;">'+d.availableBalance+'</span>'
}else{
return '<span>'+d.availableBalance+'</span>'
- }
- }, minWidth: 80,align:'center'},
- {field: 'totalUsed', title: '购买金额',
- templet: function (d) {
- if (d.totalUsed > 0) {
- return '<span style="color:green;">'+d.totalUsed+'</span>'
- }else{
- return '<span>'+d.totalUsed+'</span>'
}
}, minWidth: 80,align:'center'},
{field: 'inBalance', title: '充值金额',
templet: function (d) {
if (d.inBalance > 0) {
- return '<span style="color:green;">'+d.inBalance+'</span>'
+ return '<span style="color:blue;">'+d.inBalance+'</span>'
}else{
return '<span>'+d.inBalance+'</span>'
}
@@ -210,6 +185,14 @@
return '<span style="color:red;">'+d.outBalance+'</span>'
}else{
return '<span>'+d.outBalance+'</span>'
+ }
+ }, minWidth: 80,align:'center'},
+ {field: 'totalUsed', title: '购买算力金额',
+ templet: function (d) {
+ if (d.totalUsed > 0) {
+ return '<span style="color:blue;">'+d.totalUsed+'</span>'
+ }else{
+ return '<span>'+d.totalUsed+'</span>'
}
}, minWidth: 80,align:'center'},
{field: 'quantityReady', title: '待生效算力',
@@ -236,6 +219,36 @@
return '<span>'+d.quantityEnd+'</span>'
}
}, minWidth: 80,align:'center'},
+ {field: 'totalProfit', title: '累计收益',
+ templet: function (d) {
+ if (d.totalProfit > 0) {
+ return '<span style="color:blue;">'+d.totalProfit+'</span>'
+ }else{
+ return '<span>'+d.totalProfit+'</span>'
+ }
+ }, minWidth: 80,align:'center'},
+ {field: 'agentUsed', title: '购买代理金额',
+ templet: function (d) {
+ if (d.agentUsed > 0) {
+ return '<span style="color:blue;">'+d.agentUsed+'</span>'
+ }else{
+ return '<span>'+d.agentUsed+'</span>'
+ }
+ }, minWidth: 80,align:'center'},
+ {field: 'returnAgent', title: '收到返利',
+ templet: function (d) {
+ if (d.returnAgent > 0) {
+ return '<span style="color:blue;">'+d.returnAgent+'</span>'
+ }else{
+ return '<span>'+d.returnAgent+'</span>'
+ }
+ }, minWidth: 80,align:'center'},
+ {title: '操作',
+ templet: function (d) {
+ return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="seeAgentReturn" shiro:hasPermission="user:update">返利详情</button>'
+ +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="seeReturn" shiro:hasPermission="user:update">挖矿详情</button>'
+ +'<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="seeOrder" shiro:hasPermission="user:update">订单详情</button>'
+ }, minWidth: 250,align:'center'},
]]
});
}
diff --git a/src/main/resources/templates/febs/views/modules/yunding/ydProductList.html b/src/main/resources/templates/febs/views/modules/yunding/ydProductList.html
index 969a8ed..ed93481 100644
--- a/src/main/resources/templates/febs/views/modules/yunding/ydProductList.html
+++ b/src/main/resources/templates/febs/views/modules/yunding/ydProductList.html
@@ -196,6 +196,18 @@
return ''
}
}, minWidth: 80,align:'center'},
+ {field: 'status', title: '销售状态',
+ templet: function (d) {
+ if (d.status === 1) {
+ return '<span style="color:blue;">热售中</span>'
+ } else if (d.status === 2) {
+ return '<span style="color:blue;">售罄</span>'
+ } else if (d.status === 3) {
+ return '<span style="color:blue;">未开售</span>'
+ } else {
+ return ''
+ }
+ }, minWidth: 80,align:'center'},
]]
});
--
Gitblit v1.9.1