Merge branch 'master' of http://120.27.238.55:7000/r/agent
9 files added
14 files modified
New file |
| | |
| | | package com.xcong.excoin.common.utils; |
| | | |
| | | import com.fasterxml.jackson.core.JsonGenerator; |
| | | import com.fasterxml.jackson.databind.JsonSerializer; |
| | | import com.fasterxml.jackson.databind.SerializerProvider; |
| | | |
| | | import java.io.IOException; |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * BigDecimal保留两位小数 |
| | | * |
| | | */ |
| | | public class BigDecimalSerialize extends JsonSerializer<BigDecimal> { |
| | | |
| | | @Override |
| | | public void serialize(BigDecimal value, JsonGenerator gen, SerializerProvider serializers) throws IOException { |
| | | if (value != null && !"".equals(value)) { |
| | | gen.writeString(((BigDecimal) value).setScale(2, BigDecimal.ROUND_HALF_DOWN) + ""); |
| | | |
| | | } else { |
| | | gen.writeString(value + ""); |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | return new FebsResponse().success().data(data); |
| | | } |
| | | |
| | | /** |
| | | * 数据总览 |
| | | * @param memberEntity |
| | | * @param request |
| | | * @return |
| | | */ |
| | | |
| | | @GetMapping("allMemberData") |
| | | public FebsResponse allMemberData(MemberEntity memberEntity, QueryRequest request) { |
| | | User user = getCurrentUser(); |
| | | memberEntity.setRefererIds(FebsConstant.USER_TYPE_ADMIN.equals(user.getType()) ? FebsConstant.DEFAULT_REFERER_ID : user.getInviteId()); |
| | | Map<String, Object> data = getDataTable(memberService.findAllMemberDataList(memberEntity, request)); |
| | | return new FebsResponse().success().data(data); |
| | | } |
| | | |
| | | @GetMapping("getMemberAssets") |
| | | public FebsResponse getMemberAssets(MemberEntity memberEntity, QueryRequest request) { |
| | | User user = getCurrentUser(); |
| | |
| | | |
| | | private final IUserService userService; |
| | | |
| | | /** |
| | | * 数据总览 |
| | | * @return |
| | | */ |
| | | @GetMapping("allMemberData") |
| | | @RequiresPermissions("allMemberData:view") |
| | | public String allMemberData() { |
| | | return FebsUtil.view("modules/contract/total-data"); |
| | | } |
| | | |
| | | @GetMapping("member") |
| | | @RequiresPermissions("amember:view") |
| | | public String member() { |
New file |
| | |
| | | package com.xcong.excoin.modules.agent.pojo; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class MemberDataInfoVo { |
| | | |
| | | private int memberCount;//注册人数 |
| | | private String notNullNumber;//持仓人数 |
| | | |
| | | private String walletNumber;//币币账户不为空的人数 |
| | | private String walletCoinNumber;//合约账户不为空的人数 |
| | | private String platformProfitAndLoss;//平台总盈亏 |
| | | |
| | | private String walletNum;//币币余额 |
| | | private String walletCoinNum;//合约余额 |
| | | private String agentNum;//代理账户余额 |
| | | |
| | | private double avalableCoin;//币币可用 |
| | | |
| | | private double totalCoin;//总资产 |
| | | |
| | | private double avalableContract;//合约可用 |
| | | |
| | | private double totalContract;//合约总 |
| | | |
| | | private double chargeUsdt;//充值USDT |
| | | |
| | | private double appealUsdt;//提现USDT |
| | | |
| | | private double chargeCoin;//充币 |
| | | |
| | | private double appealCoin;//提币 |
| | | |
| | | private String fee;//佣金 |
| | | |
| | | private String closingPrice;//开仓费 |
| | | |
| | | private String sellClosingPrice;//平仓费 |
| | | |
| | | private String doingPrice;//持仓费 |
| | | |
| | | private String yingkui; |
| | | |
| | | private double allCoin; |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.xcong.excoin.common.entity.QueryRequest; |
| | | import com.xcong.excoin.modules.agent.entity.MemberEntity; |
| | | import com.xcong.excoin.modules.agent.pojo.MemberDataInfoVo; |
| | | |
| | | /** |
| | | * @author helius |
| | |
| | | IPage<MemberEntity> findFeeAmountList(MemberEntity memberEntity, QueryRequest request); |
| | | |
| | | IPage<MemberEntity> findMemberAssetList(MemberEntity memberEntity, QueryRequest request); |
| | | |
| | | IPage<MemberDataInfoVo> findAllMemberDataList(MemberEntity memberEntity, QueryRequest request); |
| | | } |
| | |
| | | import com.xcong.excoin.common.entity.QueryRequest; |
| | | import com.xcong.excoin.modules.agent.entity.MemberEntity; |
| | | import com.xcong.excoin.modules.agent.mapper.MemberMapper; |
| | | import com.xcong.excoin.modules.agent.pojo.MemberDataInfoVo; |
| | | import com.xcong.excoin.modules.agent.service.IMemberService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | Page<MemberEntity> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | return this.baseMapper.selectMemberAssetsList(page, memberEntity); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<MemberDataInfoVo> findAllMemberDataList(MemberEntity memberEntity, QueryRequest request) { |
| | | return null; |
| | | } |
| | | } |
| | |
| | | return new FebsResponse().success().data(data); |
| | | } |
| | | |
| | | @GetMapping("getHistoryDocumentaryList") |
| | | public FebsResponse getHistoryDocumentaryList(ContractOrderEntity contractOrderEntity, QueryRequest request) { |
| | | User user = getCurrentUser(); |
| | | if (user.getType().equals(FebsConstant.USER_TYPE_ADMIN)) { |
| | | contractOrderEntity.setRefererIds(FebsConstant.DEFAULT_REFERER_ID); |
| | | } else { |
| | | contractOrderEntity.setRefererIds(user.getInviteId()); |
| | | } |
| | | Map<String, Object> data = getDataTable(contractOrderService.findHistoryDocumentaryListInPage(contractOrderEntity, request)); |
| | | return new FebsResponse().success().data(data); |
| | | } |
| | | |
| | | @GetMapping("getHistoryDocumentaryprofitList") |
| | | public FebsResponse getHistoryDocumentaryprofitList(ContractOrderEntity contractOrderEntity, QueryRequest request,Integer parentId) { |
| | | User user = getCurrentUser(); |
| | | if (user.getType().equals(FebsConstant.USER_TYPE_ADMIN)) { |
| | | contractOrderEntity.setRefererIds(FebsConstant.DEFAULT_REFERER_ID); |
| | | } else { |
| | | contractOrderEntity.setRefererIds(user.getInviteId()); |
| | | } |
| | | if(parentId==null){ |
| | | ViewController.idFromMember=0; |
| | | } |
| | | contractOrderEntity.setId(ViewController.idFromMember); |
| | | Map<String, Object> data = getDataTable(contractOrderService.findHistoryDocumentaryprofitListInPage(contractOrderEntity, request)); |
| | | return new FebsResponse().success().data(data); |
| | | } |
| | | |
| | | |
| | | @GetMapping("getHistoryList") |
| | | public FebsResponse getHistoryList(ContractOrderEntity contractOrderEntity, QueryRequest request) { |
| | | User user = getCurrentUser(); |
| | |
| | | import com.xcong.excoin.common.utils.FebsUtil; |
| | | 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; |
| | | |
| | | /** |
| | |
| | | public String returnMoney() { |
| | | return FebsUtil.view("modules/contract/return-list"); |
| | | } |
| | | |
| | | @GetMapping("getHistoryDocumentaryList") |
| | | @RequiresPermissions("getHistoryDocumentaryList:view") |
| | | public String getHistoryDocumentaryList() { |
| | | return FebsUtil.view("modules/documentary/documentaryContract"); |
| | | } |
| | | /** |
| | | *交易员利润分成---详情 |
| | | */ |
| | | public static long idFromMember; |
| | | @GetMapping("seeFollowerInfo/{id}") |
| | | public String seeFollowerInfo(@PathVariable long id, Model model) { |
| | | idFromMember = id; |
| | | return FebsUtil.view("modules/documentary/seeFollowerInfo"); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.xcong.excoin.common.entity.BaseEntity; |
| | | import com.xcong.excoin.common.utils.BigDecimalSerialize; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | |
| | | |
| | | private int orderType; |
| | | |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal closingFeeAmount; |
| | | |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal holdingFeeAmount; |
| | | |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal openingFeeAmount; |
| | | |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal returnAmount; |
| | | |
| | | private Long refererId; |
| | | |
| | | private String inviteId; |
| | | |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal returnRatio; |
| | | |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal childReturnRatio; |
| | | |
| | | /** |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.xcong.excoin.common.entity.BaseEntity; |
| | | import com.xcong.excoin.common.utils.BigDecimalSerialize; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | |
| | | /** |
| | | * 币种规格 |
| | | */ |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal symbolSku; |
| | | |
| | | /** |
| | | * 开仓价 |
| | | */ |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal openingPrice; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 开仓手续费 |
| | | */ |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal openingFeeAmount; |
| | | |
| | | /** |
| | | * 保证金 |
| | | */ |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal bondAmount; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 市场价 |
| | | */ |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal markPrice; |
| | | |
| | | /** |
| | | * 止损价 |
| | | */ |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal stopLossPrice; |
| | | |
| | | /** |
| | | * 止盈价 |
| | | */ |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal stopProfitPrice; |
| | | |
| | | /** |
| | | * 预付款金额 |
| | | */ |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal prePaymentAmount; |
| | | |
| | | /** |
| | | * 预估强平价 |
| | | */ |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal forceClosingPrice; |
| | | |
| | | private int operateNo; |
| | |
| | | /** |
| | | * 持仓费 |
| | | */ |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal holdAmount; |
| | | |
| | | private String inviteId; |
| | | |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal loseOrProfit; |
| | | |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal returnRatio; |
| | | |
| | | private int isProfit; |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.xcong.excoin.common.entity.BaseEntity; |
| | | import com.xcong.excoin.common.utils.BigDecimalSerialize; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 合约订单历史表 |
| | |
| | | /** |
| | | * 委托开仓价 |
| | | */ |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal entrustOpeningPrice; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 币种规格 |
| | | */ |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal symbolSku; |
| | | |
| | | /** |
| | | * 平仓价 |
| | | */ |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal closingPrice; |
| | | |
| | | /** |
| | | * 平仓手续费 |
| | | */ |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal closingFeeAmount; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 止损价 |
| | | */ |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal stopLossPrice; |
| | | |
| | | /** |
| | | * 止盈价 |
| | | */ |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal stopProfitPrice; |
| | | |
| | | /** |
| | | * 盈亏金额 |
| | | */ |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal rewardAmount; |
| | | |
| | | /** |
| | | * 盈亏比例 |
| | | */ |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal rewardRatio; |
| | | |
| | | /** |
| | | * 开仓价 |
| | | */ |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal openingPrice; |
| | | |
| | | /** |
| | | * 开仓手续费 |
| | | */ |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal openingFeeAmount; |
| | | |
| | | private Date openingTime; |
| | |
| | | /** |
| | | * 预付款金额 |
| | | */ |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal prePaymentAmount; |
| | | |
| | | /** |
| | | * 保证金 |
| | | */ |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal bondAmount; |
| | | |
| | | /** |
| | | * 市场价 |
| | | */ |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal markPrice; |
| | | |
| | | /** |
| | | * 预估强平价 |
| | | */ |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal forceClosingPrice; |
| | | |
| | | /** |
| | | * 1普通合约2跟单合约 |
| | | */ |
| | | private int contractType; |
| | | |
| | | /** |
| | | * 持仓费 |
| | | */ |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal holdAmount; |
| | | |
| | | private int operateNo; |
| | |
| | | |
| | | @TableField(exist = false) |
| | | private String timeType; |
| | | /** |
| | | * 盈亏金额返利 |
| | | */ |
| | | @TableField(exist = false) |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal rewardAmountProfit; |
| | | @TableField(exist = false) |
| | | private List<Long> IDs; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.xcong.excoin.modules.contract.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.xcong.excoin.common.entity.BaseEntity; |
| | | import com.xcong.excoin.common.utils.BigDecimalSerialize; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @Data |
| | | @TableName("follow_follower_profit") |
| | | public class FollowFollowerProfitEntity extends BaseEntity{ |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private static final long serialVersionUID = 1L; |
| | | public static final Integer IS_FOLLOW_Y = 1; |
| | | public static final Integer IS_FOLLOW_N = 2; |
| | | |
| | | /** |
| | | * 跟随者ID |
| | | */ |
| | | private Long memberId; |
| | | /** |
| | | * 交易员ID |
| | | */ |
| | | private Long tradeId; |
| | | /** |
| | | * 交易员会员ID |
| | | */ |
| | | private Long tradeMemberId; |
| | | /** |
| | | * 累计跟随本金 |
| | | */ |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal totalPrincipal; |
| | | /** |
| | | * 累计收益 |
| | | */ |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal totalProfit; |
| | | /** |
| | | * 是否跟随 1-是 2-否 |
| | | */ |
| | | private Integer isFollow; |
| | | } |
New file |
| | |
| | | package com.xcong.excoin.modules.contract.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.xcong.excoin.common.entity.BaseEntity; |
| | | import com.xcong.excoin.common.utils.BigDecimalSerialize; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 交易员信息表 |
| | | */ |
| | | @Data |
| | | @TableName("follow_trader_info") |
| | | public class FollowTraderInfoEntity extends BaseEntity{ |
| | | /** |
| | | * |
| | | */ |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date entryTime; |
| | | /** |
| | | * 会员ID |
| | | */ |
| | | private Long memberId; |
| | | /** |
| | | * 头像 |
| | | */ |
| | | private String avatar; |
| | | /** |
| | | * 名称 |
| | | */ |
| | | private String nickname; |
| | | /** |
| | | * 宣言 |
| | | */ |
| | | private String declaration; |
| | | /** |
| | | * 是否满员 1-是2-否 |
| | | */ |
| | | private Integer isAll; |
| | | public static final Integer IS_ALL_Y = 1; |
| | | public static final Integer IS_ALL_N = 2; |
| | | /** |
| | | * 设置成首页 |
| | | */ |
| | | private Integer isSetFrist; |
| | | public static final Integer IS_SETFRIST_Y = 1; |
| | | public static final Integer IS_SETFRIST_N = 0; |
| | | /** |
| | | * 利润 |
| | | */ |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal profitRatio; |
| | | /** |
| | | * 审核状态 1通过2不通过3待审核 |
| | | */ |
| | | private Integer verifyStatus; |
| | | public static final Integer VERIFYSTATUS_Y = 1; |
| | | public static final Integer VERIFYSTATUS_N = 2; |
| | | public static final Integer VERIFYSTATUS_ING = 3; |
| | | /** |
| | | * 是否开启带单 1是2否 |
| | | */ |
| | | private Integer isOpen; |
| | | public static final Integer ISOPEN_Y = 1; |
| | | public static final Integer ISOPEN_N = 2; |
| | | |
| | | /** |
| | | * 最大跟随人数 |
| | | */ |
| | | private Integer followNum; |
| | | |
| | | @TableField(exist = false) |
| | | private String account; |
| | | |
| | | @TableField(exist = false) |
| | | private String realName; |
| | | @TableField(exist = false) |
| | | private String phone; |
| | | @TableField(exist = false) |
| | | private String email; |
| | | @TableField(exist = false) |
| | | private String inviteId; |
| | | @TableField(exist = false) |
| | | private int accountType; |
| | | |
| | | @TableField(exist = false) |
| | | private double walletNum; |
| | | @TableField(exist = false) |
| | | private double walletCoinNum; |
| | | @TableField(exist = false) |
| | | private double agentNum; |
| | | @TableField(exist = false) |
| | | private String isok; |
| | | //当前跟随人数 |
| | | @TableField(exist = false) |
| | | private String followNumNow; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.xcong.excoin.modules.contract.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @TableName("follow_trader_label") |
| | | public class FollowTraderLabelEntity{ |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id",type = IdType.AUTO) |
| | | private Long id; |
| | | /** |
| | | * 标签 |
| | | */ |
| | | private String labels; |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.xcong.excoin.modules.contract.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.xcong.excoin.common.entity.BaseEntity; |
| | | import com.xcong.excoin.common.utils.BigDecimalSerialize; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @Data |
| | | @TableName("follow_trader_profit_info") |
| | | public class FollowTraderProfitInfoEntity extends BaseEntity{ |
| | | |
| | | /** |
| | | * |
| | | */ |
| | | private static final long serialVersionUID = 1L; |
| | | /** |
| | | * 交易员ID |
| | | */ |
| | | private Long traderId; |
| | | /** |
| | | * 会员ID |
| | | */ |
| | | private Long memberId; |
| | | /** |
| | | * 累计收益率 |
| | | */ |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal totalProfitRatio; |
| | | /** |
| | | * 带单总收益 |
| | | */ |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal totalProfit; |
| | | /** |
| | | * 跟随者总收益 |
| | | */ |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal followerTotalProfit; |
| | | /** |
| | | * 胜率 |
| | | */ |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal winRate; |
| | | /** |
| | | * 累计跟随人数 |
| | | */ |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal totalFollowerCnt; |
| | | /** |
| | | * 交易笔数 |
| | | */ |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal totalOrderCnt; |
| | | |
| | | @TableField(exist = false) |
| | | private String account; |
| | | |
| | | @TableField(exist = false) |
| | | private String realName; |
| | | /** |
| | | * 手机号(包含国际手机号) |
| | | */ |
| | | @TableField(exist = false) |
| | | private String phone; |
| | | /** |
| | | * 邮箱 |
| | | */ |
| | | @TableField(exist = false) |
| | | private String email; |
| | | /** |
| | | * 邀请码 |
| | | */ |
| | | @TableField(exist = false) |
| | | private String inviteId; |
| | | |
| | | /** |
| | | * 账号类型 |
| | | */ |
| | | @TableField(exist = false) |
| | | private int accountType; |
| | | |
| | | /** |
| | | * 利润率 |
| | | */ |
| | | @TableField(exist = false) |
| | | private BigDecimal profitRatio; |
| | | /** |
| | | * 总返利 |
| | | */ |
| | | @TableField(exist = false) |
| | | private BigDecimal profitRatioTotal; |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | import com.xcong.excoin.modules.contract.entity.ContractOrderEntity; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author helius |
| | | */ |
| | | public interface ContractOrderMapper extends BaseMapper<ContractOrderEntity> { |
| | | |
| | | IPage<ContractOrderEntity> selectHistoryOrderListInPage(Page<ContractOrderEntity> page, @Param("record") ContractOrderEntity contractOrderEntity); |
| | | IPage<ContractOrderEntity> selectHistoryDocumentaryListInPage(Page<ContractOrderEntity> page, @Param("record") ContractOrderEntity contractOrderEntity); |
| | | IPage<ContractOrderEntity> selectHistoryDocumentaryprofitListInPage(Page<ContractOrderEntity> page, @Param("record") ContractOrderEntity contractOrderEntity); |
| | | |
| | | List<Long> selectFollowContractIdList(@Param("orderNoTrade")String orderNoTrade); |
| | | } |
| | |
| | | |
| | | IPage<ContractOrderEntity> findHistoryOrderListInPage(ContractOrderEntity contractOrderEntity, QueryRequest request); |
| | | |
| | | IPage<ContractOrderEntity> findHistoryDocumentaryListInPage(ContractOrderEntity contractOrderEntity, QueryRequest request); |
| | | IPage<ContractOrderEntity> findHistoryDocumentaryprofitListInPage(ContractOrderEntity contractOrderEntity, QueryRequest request); |
| | | |
| | | IPage<AgentReturnEntity> findAgentReturnList(AgentReturnEntity agentReturnEntity, QueryRequest request); |
| | | } |
| | |
| | | package com.xcong.excoin.modules.contract.service.impl; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author wzy |
| | |
| | | } |
| | | |
| | | @Override |
| | | public IPage<ContractOrderEntity> findHistoryDocumentaryListInPage(ContractOrderEntity contractOrderEntity, QueryRequest request) { |
| | | Page<ContractOrderEntity> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | return this.baseMapper.selectHistoryDocumentaryListInPage(page, contractOrderEntity); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<ContractOrderEntity> findHistoryDocumentaryprofitListInPage(ContractOrderEntity contractOrderEntity, QueryRequest request) { |
| | | //获取当前订单的全部跟随合约List<Long> IDs |
| | | ContractOrderEntity contractOrderEntityTrade = this.baseMapper.selectById(contractOrderEntity.getId()); |
| | | String orderNoTrade = contractOrderEntityTrade.getOrderNo(); |
| | | List<Long> ids = this.baseMapper.selectFollowContractIdList(orderNoTrade); |
| | | if(CollUtil.isEmpty(ids)){ |
| | | return null; |
| | | } |
| | | contractOrderEntity.setIDs(ids); |
| | | //查询全部跟单合约和返佣 |
| | | Page<ContractOrderEntity> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | IPage<ContractOrderEntity> contractOrderEntityIPage = this.baseMapper.selectHistoryDocumentaryprofitListInPage(page, contractOrderEntity); |
| | | return this.baseMapper.selectHistoryDocumentaryprofitListInPage(page, contractOrderEntity); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<AgentReturnEntity> findAgentReturnList(AgentReturnEntity agentReturnEntity, QueryRequest request) { |
| | | Page<AgentReturnEntity> page = new Page<>(request.getPageNum(), request.getPageSize()); |
| | | return agentReturnMapper.selectAgentReturnList(page, agentReturnEntity); |
| | |
| | | package com.xcong.excoin.modules.contract.vo; |
| | | |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.xcong.excoin.common.utils.BigDecimalSerialize; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | |
| | | |
| | | private String email; |
| | | |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal usdtAmount; |
| | | |
| | | @JsonSerialize(using = BigDecimalSerialize.class) |
| | | private BigDecimal coinAmount; |
| | | |
| | | private String orderNo; |
| | |
| | | order by c.create_time desc |
| | | </select> |
| | | |
| | | <select id="selectHistoryDocumentaryListInPage" resultType="com.xcong.excoin.modules.contract.entity.ContractOrderEntity"> |
| | | select |
| | | a.phone, |
| | | a.email, |
| | | a.referer_id, |
| | | concat(b.first_name, b.second_name) name, |
| | | c.opening_fee_amount*(select fee_spread_ratio from platform_trade_setting) opening_fee_amount, |
| | | c.closing_fee_amount*(select fee_spread_ratio from platform_trade_setting) closing_fee_amount, |
| | | c.* |
| | | from member a |
| | | left join member_authentication b on a.id=b.member_id |
| | | inner join contract_order c on a.id=c.member_id |
| | | <where> |
| | | <if test="record!=null"> |
| | | <if test="record.refererIds!=null and record.refererIds!=''"> |
| | | and a.invite_id=#{record.refererIds} |
| | | </if> |
| | | <if test="record.name!=null and record.name!=''"> |
| | | and (a.phone=#{record.name} or a.email=#{record.name} or a.invite_id=#{record.name}) |
| | | </if> |
| | | <if test='record.timeType=="1"'> |
| | | and TO_DAYS(c.create_time) = TO_DAYS(NOW()) |
| | | </if> |
| | | <if test='record.timeType=="2"'> |
| | | and TO_DAYS(NOW()) - TO_DAYS(c.create_time) = 1 |
| | | </if> |
| | | <if test='record.timeType=="3"'> |
| | | and YEARWEEK(date_format(c.create_time,'%Y-%m-%d')) = YEARWEEK(now()) |
| | | </if> |
| | | <if test='record.timeType=="4"'> |
| | | and DATE_FORMAT(c.create_time, '%Y%m' ) = DATE_FORMAT( CURDATE() , '%Y%m' ) |
| | | </if> |
| | | and c.order_status = 1 |
| | | and c.contract_type = 2 |
| | | and c.closing_time is not null |
| | | </if> |
| | | </where> |
| | | order by c.create_time desc |
| | | </select> |
| | | |
| | | <select id="selectHistoryDocumentaryprofitListInPage" resultType="com.xcong.excoin.modules.contract.entity.ContractOrderEntity"> |
| | | select |
| | | a.phone, |
| | | a.email, |
| | | a.referer_id, |
| | | concat(b.first_name, b.second_name) name, |
| | | c.opening_fee_amount*(select fee_spread_ratio from platform_trade_setting) opening_fee_amount, |
| | | c.closing_fee_amount*(select fee_spread_ratio from platform_trade_setting) closing_fee_amount, |
| | | c.*, |
| | | d.amount rewardAmountProfit |
| | | from member a |
| | | left join member_authentication b on a.id=b.member_id |
| | | inner join contract_order c on a.id=c.member_id |
| | | left join follow_trader_profit_detail d on d.order_no = c.order_no |
| | | where |
| | | c.id in ( |
| | | <foreach collection="record.IDs" item="Ids" separator=","> |
| | | #{Ids} |
| | | </foreach> |
| | | ) |
| | | order by d.amount desc |
| | | </select> |
| | | |
| | | <select id="selectFollowContractIdList" resultType="long"> |
| | | SELECT |
| | | order_id |
| | | FROM |
| | | follow_follower_order_relation |
| | | WHERE |
| | | order_type = 2 |
| | | and trade_order_no = #{orderNoTrade} |
| | | and member_id != trade_member_id |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <div class="layui-fluid layui-anim febs-anim" id="febs-user" 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 id=usersTable></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> |
| | | </script> |
| | | <!-- 表格操作栏 end --> |
| | | <script data-th-inline="none" type="text/javascript"> |
| | | // 引入组件并初始化 |
| | | layui.use([ 'jquery', 'form', 'table', 'febs'], function () { |
| | | var $ = layui.jquery, |
| | | laydate = layui.laydate, |
| | | febs = layui.febs, |
| | | form = layui.form, |
| | | table = layui.table, |
| | | $view = $('#febs-user'), |
| | | tableIns; |
| | | |
| | | form.render(); |
| | | // 表格初始化 |
| | | initTable(); |
| | | |
| | | function initTable() { |
| | | |
| | | tableInss = febs.table.init({ |
| | | elem: $('#usersTable'), |
| | | url: ctx + 'member/memberDataInfo', |
| | | cols: [[ |
| | | {field: 'memberCount', title: '注册用户数', minWidth: 120,align:'center'}, |
| | | {field: 'notNullNumber', title: '持仓用户数', minWidth: 120,align:'center'}, |
| | | {field: 'walletNumber', title: '币币账户有余额个数', minWidth: 200,align:'center'}, |
| | | {field: 'walletNum', title: '币币账户余额', minWidth: 200,align:'center'}, |
| | | {field: 'walletCoinNumber', title: '合约账户有余额个数', minWidth: 200,align:'center'}, |
| | | {field: 'walletCoinNum', title: '合约账户余额', minWidth: 200,align:'center'}, |
| | | {field: 'agentNum', title: '代理账户余额', minWidth: 200,align:'center'}, |
| | | {field: 'allCoin', title: '平台总资产', minWidth: 200,align:'center'}, |
| | | {field: 'platformProfitAndLoss', title: '平台剩余USDT', |
| | | templet: function (d) { |
| | | if (d.platformProfitAndLoss > '0') { |
| | | return '<span style="color:green;">'+d.platformProfitAndLoss+'</span>' |
| | | } else { |
| | | return '<span style="color:red;">'+d.platformProfitAndLoss+'</span>' |
| | | } |
| | | }, minWidth: 200,align:'center'}, |
| | | {field: 'chargeCoin', title: '充币', minWidth: 200,align:'center'}, |
| | | {field: 'appealCoin', title: '提币', minWidth: 200,align:'center'}, |
| | | {field: 'fee', title: '佣金', minWidth: 200,align:'center'}, |
| | | {field: 'closingPrice', title: '开仓手续费', minWidth: 200,align:'center'}, |
| | | {field: 'sellClosingPrice', title: '平仓手续费', minWidth: 200,align:'center'}, |
| | | {field: 'doingPrice', title: '持仓手续费', minWidth: 200,align:'center'}, |
| | | {field: 'yingkui', title: '订单盈亏', |
| | | templet: function (d) { |
| | | if (d.yingkui > '0') { |
| | | return '<span style="color:green;">'+d.yingkui+'</span>' |
| | | } else { |
| | | return '<span style="color:red;">'+d.yingkui+'</span>' |
| | | } |
| | | }, minWidth: 200,align:'center'}, |
| | | {field: 'chargeUsdt', title: 'usdt充值', minWidth: 200,align:'center'}, |
| | | {field: 'appealUsdt', title: 'usdt提现', minWidth: 200,align:'center'}, |
| | | ]] |
| | | }); |
| | | } |
| | | }) |
| | | </script> |
New file |
| | |
| | | <div class="layui-fluid layui-anim febs-anim" id="febs-user" 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 class="layui-inline"> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" placeholder="上级UID" name="refererId" |
| | | autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <div class="layui-input-block"> |
| | | <input type="radio" name="timeType" value="1" title="今日"> |
| | | <input type="radio" name="timeType" value="2" title="昨日"> |
| | | <input type="radio" name="timeType" value="3" title="本周"> |
| | | <input type="radio" name="timeType" value="4" title="本月"> |
| | | </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="open-type"> |
| | | {{# |
| | | var openType = { |
| | | 1: {title: '开多', color : 'blue'}, |
| | | 2: {title: '开空', color : 'red'}, |
| | | 3: {title: '平多', color : 'blue'}, |
| | | 4: {title: '平空', color : 'red'} |
| | | }[d.orderType]; |
| | | }} |
| | | <span class="layui-badge febs-bg-{{openType.color}}">{{ openType.title }}</span> |
| | | </script> |
| | | <script type="text/html" id="closing-type"> |
| | | {{# |
| | | var closingType = { |
| | | 0: {title: '-'}, |
| | | 2: {title: '平多'}, |
| | | 3: {title: '平空'}, |
| | | 4: {title: '爆仓平多'}, |
| | | 5: {title: '爆仓平空'}, |
| | | 6: {title: '止盈平多'}, |
| | | 7: {title: '止盈平空'}, |
| | | 8: {title: '止损平多'}, |
| | | 9: {title: '止损平空'}, |
| | | }[d.closingType]; |
| | | }} |
| | | <span>{{ closingType.title }}</span> |
| | | </script> |
| | | |
| | | <script type="text/html" id="contract-type"> |
| | | {{# |
| | | var contractType = { |
| | | 1: {title: '普通合约'}, |
| | | 2: {title: '跟单合约'}, |
| | | }[d.contractType]; |
| | | }} |
| | | <span>{{ contractType.title }}</span> |
| | | </script> |
| | | <script type="text/html" id="loseOrProfit"> |
| | | {{# if(d.orderType == 3 || d.orderType == 4){ }} |
| | | {{# if(d.rewardAmount >= 0){ }} |
| | | <span style="color: green">{{ d.rewardAmount }}</span> |
| | | {{# } else { }} |
| | | <span style="color: red">{{ d.rewardAmount }}</span> |
| | | {{# } }} |
| | | {{# } }} |
| | | </script> |
| | | <!-- 表格字段状态格式化 start --> |
| | | |
| | | <script data-th-inline="none" type="text/javascript"> |
| | | // 引入组件并初始化 |
| | | layui.use(['dropdown', 'jquery', 'laydate', 'form', 'table', 'febs', 'treeSelect'], function () { |
| | | var $ = layui.jquery, |
| | | laydate = layui.laydate, |
| | | febs = layui.febs, |
| | | form = layui.form, |
| | | table = layui.table, |
| | | $view = $('#febs-user'), |
| | | $query = $view.find('#query'), |
| | | $reset = $view.find('#reset'), |
| | | $searchForm = $view.find('form'), |
| | | sortObject = {field: 'createTime', type: null}, |
| | | tableIns, |
| | | timeType; |
| | | |
| | | form.render(); |
| | | |
| | | // 表格初始化 |
| | | initTable(); |
| | | // 初始化表格操作栏各个按钮功能 |
| | | table.on('tool(userTable)', function (obj) { |
| | | var data = obj.data, |
| | | layEvent = obj.event; |
| | | if (layEvent === 'seeFollowerInfo') { |
| | | febs.modal.open('跟单分红', 'contract/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(); |
| | | } |
| | | }); |
| | | |
| | | // 查询按钮 |
| | | $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(); |
| | | sortObject.type = 'null'; |
| | | timeType = null; |
| | | tableIns.reload({where: getQueryParams(), page: {curr: 1}, initSort: sortObject}); |
| | | }); |
| | | |
| | | function initTable() { |
| | | tableIns = febs.table.init({ |
| | | elem: $view.find('table'), |
| | | id: 'userTable', |
| | | url: ctx + 'order/getHistoryDocumentaryList', |
| | | cols: [[ |
| | | {type: 'checkbox'}, |
| | | {field: 'orderNo', title: '订单编号', minWidth: 180, align: 'center'}, |
| | | {field: 'symbol', title: '合约名称', minWidth: 100, align: 'center'}, |
| | | {title: '跟单分红', |
| | | templet: function (d) { |
| | | return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="seeFollowerInfo" shiro:hasPermission="user:update">查看</button>' |
| | | }, minWidth: 100,align:'center'}, |
| | | { title: '合约类型', templet: '#contract-type', minWidth: 100, align: 'center'}, |
| | | {field: 'refererId', title: '上级UID', minWidth: 100, align: 'center'}, |
| | | {field: 'name', title: '姓名', minWidth: 130, align: 'center'}, |
| | | {field: 'phone', title: '联系方式', minWidth: 130, align: 'center'}, |
| | | {field: 'email', title: '邮箱', minWidth: 140, align: 'center'}, |
| | | {title: '开仓类型', templet: '#open-type', minWidth: 100, align: 'center'}, |
| | | {field: 'entrustPrice', title: '委托价', minWidth: 100, align: 'center'}, |
| | | {field: 'openingPrice', title: '开仓价', minWidth: 130, align: 'center'}, |
| | | {field: 'openingFeeAmount', title: '开仓手续费', minWidth: 130, align: 'center'}, |
| | | {field: 'openingTime', title: '开仓时间', minWidth: 180, align: 'center'}, |
| | | {field: 'bondAmount', title: '保证金', minWidth: 120, align: 'center'}, |
| | | {field: 'symbolCnt', title: '成交量', minWidth: 100, align: 'center'}, |
| | | {field: 'stopProfitPrice', title: '止盈', minWidth: 100, align: 'center'}, |
| | | {field: 'stopLossPrice', title: '止损', minWidth: 120, align: 'center'}, |
| | | {field: 'holdAmount', title: '持仓费', minWidth: 140, align: 'center'}, |
| | | {templet: '#loseOrProfit', title: '平仓盈亏', minWidth: 140, align: 'center'}, |
| | | {field: 'closingPrice', title: '平仓价', minWidth: 140, align: 'center'}, |
| | | {field: 'closingFeeAmount', title: '平仓手续费', minWidth: 140, align: 'center'}, |
| | | { title: '平仓类型', templet: '#closing-type', minWidth: 100, align: 'center'}, |
| | | {field: 'closingTime', title: '平仓时间', minWidth: 180, align: 'center'}, |
| | | ]] |
| | | }); |
| | | } |
| | | |
| | | // 获取查询参数 |
| | | function getQueryParams() { |
| | | var type = $searchForm.find('input[name="timeType"]:checked').val(); |
| | | if (type) { |
| | | timeType = type; |
| | | } |
| | | return { |
| | | timeType : timeType, |
| | | name: $searchForm.find('input[name="account"]').val().trim(), |
| | | refererId: $searchForm.find('input[name="refererId"]').val().trim(), |
| | | invalidate_ie_cache: new Date() |
| | | }; |
| | | } |
| | | }) |
| | | </script> |
New file |
| | |
| | | |
| | | <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> |
| | | <!-- 表格字段状态格式化 start --> |
| | | <script type="text/html" id="open-type"> |
| | | {{# |
| | | var openType = { |
| | | 1: {title: '开多', color : 'blue'}, |
| | | 2: {title: '开空', color : 'red'}, |
| | | 3: {title: '平多', color : 'blue'}, |
| | | 4: {title: '平空', color : 'red'} |
| | | }[d.orderType]; |
| | | }} |
| | | <span class="layui-badge febs-bg-{{openType.color}}">{{ openType.title }}</span> |
| | | </script> |
| | | <script type="text/html" id="closing-type"> |
| | | {{# |
| | | var closingType = { |
| | | 0: {title: '-'}, |
| | | 2: {title: '平多'}, |
| | | 3: {title: '平空'}, |
| | | 4: {title: '爆仓平多'}, |
| | | 5: {title: '爆仓平空'}, |
| | | 6: {title: '止盈平多'}, |
| | | 7: {title: '止盈平空'}, |
| | | 8: {title: '止损平多'}, |
| | | 9: {title: '止损平空'}, |
| | | }[d.closingType]; |
| | | }} |
| | | <span>{{ closingType.title }}</span> |
| | | </script> |
| | | |
| | | <script type="text/html" id="contract-type"> |
| | | {{# |
| | | var contractType = { |
| | | 1: {title: '普通合约'}, |
| | | 2: {title: '跟单合约'}, |
| | | }[d.contractType]; |
| | | }} |
| | | <span>{{ contractType.title }}</span> |
| | | </script> |
| | | <script type="text/html" id="loseOrProfit"> |
| | | {{# if(d.orderType == 3 || d.orderType == 4){ }} |
| | | {{# if(d.rewardAmount >= 0){ }} |
| | | <span style="color: green">{{ d.rewardAmount }}</span> |
| | | {{# } else { }} |
| | | <span style="color: red">{{ d.rewardAmount }}</span> |
| | | {{# } }} |
| | | {{# } }} |
| | | </script> |
| | | <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 + 'order/getHistoryDocumentaryprofitList?parentId=1', |
| | | totalRow: true, |
| | | cols: [[ |
| | | {field: 'orderNo', title: '订单编号', minWidth: 180, align: 'center'}, |
| | | {field: 'symbol', title: '合约名称', minWidth: 100, align: 'center'}, |
| | | { title: '合约类型', templet: '#contract-type', minWidth: 100, align: 'center'}, |
| | | {field: 'rewardAmountProfit', title: '返利金额', minWidth: 100, align: 'center',totalRow: true}, |
| | | {title: '开仓类型', templet: '#open-type', minWidth: 100, align: 'center'}, |
| | | {field: 'openingPrice', title: '开仓价', minWidth: 130, align: 'center'}, |
| | | {field: 'openingFeeAmount', title: '开仓手续费', minWidth: 130, align: 'center'}, |
| | | {field: 'openingTime', title: '开仓时间', minWidth: 180, align: 'center'}, |
| | | {field: 'bondAmount', title: '保证金', minWidth: 120, align: 'center'}, |
| | | {field: 'symbolCnt', title: '成交量', minWidth: 100, align: 'center'}, |
| | | {templet: '#loseOrProfit', title: '平仓盈亏', minWidth: 140, align: 'center'}, |
| | | {field: 'closingPrice', title: '平仓价', minWidth: 140, align: 'center'}, |
| | | {field: 'closingFeeAmount', title: '平仓手续费', minWidth: 140, align: 'center'}, |
| | | { title: '平仓类型', templet: '#closing-type', minWidth: 100, align: 'center'}, |
| | | {field: 'closingTime', title: '平仓时间', minWidth: 180, align: 'center'}, |
| | | ]] |
| | | }); |
| | | } |
| | | |
| | | }) |
| | | </script> |