20 files added
2 files modified
New file |
| | |
| | | package com.xcong.excoin.modules.systemSetting.controller;
|
| | |
|
| | | import java.util.Map;
|
| | |
|
| | | import javax.validation.Valid;
|
| | | import javax.validation.constraints.NotNull;
|
| | |
|
| | | import org.springframework.validation.annotation.Validated;
|
| | | 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.RestController;
|
| | |
|
| | | import com.xcong.excoin.common.annotation.ControllerEndpoint;
|
| | | 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.systemSetting.entity.PlatformBannerEntity;
|
| | | import com.xcong.excoin.modules.systemSetting.entity.PlatformSymbolsSkuEntity;
|
| | | import com.xcong.excoin.modules.systemSetting.entity.PlatformTradeSettingEntity;
|
| | | import com.xcong.excoin.modules.systemSetting.service.SystemSettingService;
|
| | |
|
| | | import lombok.RequiredArgsConstructor;
|
| | |
|
| | | @Validated
|
| | | @RestController
|
| | | @RequiredArgsConstructor
|
| | | @RequestMapping(value = "/systemSetting")
|
| | | public class SystemSettingController extends BaseController{
|
| | | |
| | | private final SystemSettingService systemSettingService;
|
| | | |
| | | /**
|
| | | * 交易设置---列表
|
| | | */
|
| | | @GetMapping("platformTradeSetting")
|
| | | public FebsResponse platformTradeSetting(PlatformTradeSettingEntity platformTradeSettingEntity, QueryRequest request) {
|
| | | Map<String, Object> data = getDataTable(systemSettingService.findPlatformTradeSettingInPage(platformTradeSettingEntity, request));
|
| | | return new FebsResponse().success().data(data);
|
| | | }
|
| | | |
| | | /**
|
| | | *交易设置---确认
|
| | | * @return
|
| | | */
|
| | | @PostMapping("platformTradeSettingConfirm")
|
| | | @ControllerEndpoint(operation = "交易设置---确认", exceptionMessage = "设置失败")
|
| | | public FebsResponse platformTradeSettingConfirm(@Valid PlatformTradeSettingEntity platformTradeSettingEntity) {
|
| | | return systemSettingService.platformTradeSettingConfirm(platformTradeSettingEntity);
|
| | | }
|
| | | |
| | | /**
|
| | | * 币种规格---列表
|
| | | */
|
| | | @GetMapping("platformSymbolsSku")
|
| | | public FebsResponse platformSymbolsSku(PlatformSymbolsSkuEntity platformSymbolsSkuEntity, QueryRequest request) {
|
| | | Map<String, Object> data = getDataTable(systemSettingService.findPlatformSymbolsSkuInPage(platformSymbolsSkuEntity, request));
|
| | | return new FebsResponse().success().data(data);
|
| | | }
|
| | | |
| | | /**
|
| | | * 币种规格---确认
|
| | | * @return
|
| | | */
|
| | | @PostMapping("platformSymbolsSkuConfirm")
|
| | | @ControllerEndpoint(operation = "币种规格---确认", exceptionMessage = "设置失败")
|
| | | public FebsResponse platformSymbolsSkuConfirm(@Valid PlatformSymbolsSkuEntity platformSymbolsSkuEntity) {
|
| | | return systemSettingService.platformSymbolsSkuConfirm(platformSymbolsSkuEntity);
|
| | | }
|
| | | |
| | | /**
|
| | | * 轮播图---列表
|
| | | */
|
| | | @GetMapping("platformBanner")
|
| | | public FebsResponse platformBanner(PlatformBannerEntity platformBannerEntity, QueryRequest request) {
|
| | | Map<String, Object> data = getDataTable(systemSettingService.findPlatformBannerInPage(platformBannerEntity, request));
|
| | | return new FebsResponse().success().data(data);
|
| | | }
|
| | | |
| | | /**
|
| | | * 轮播图---确认
|
| | | * @return
|
| | | */
|
| | | @PostMapping("platformBannerConfirm")
|
| | | @ControllerEndpoint(operation = "轮播图---确认", exceptionMessage = "设置失败")
|
| | | public FebsResponse platformBannerConfirm(@Valid PlatformBannerEntity platformBannerEntity) {
|
| | | return systemSettingService.platformBannerConfirm(platformBannerEntity);
|
| | | }
|
| | | |
| | | /**
|
| | | * 轮播图---删除
|
| | | * @return
|
| | | */
|
| | | @GetMapping("platformBannerDelete/{id}")
|
| | | @ControllerEndpoint(operation = "轮播图---删除", exceptionMessage = "删除失败")
|
| | | public FebsResponse platformBannerDelete(@NotNull(message = "{required}") @PathVariable Long id) {
|
| | | return systemSettingService.platformBannerDelete(id);
|
| | | }
|
| | | |
| | | /**
|
| | | * 轮播图---新增
|
| | | */
|
| | | @GetMapping("platformBannerAdd")
|
| | | @ControllerEndpoint(operation = "轮播图---新增", exceptionMessage = "新增失败")
|
| | | public FebsResponse platformBannerAdd() {
|
| | | systemSettingService.platformBannerAdd();
|
| | | return new FebsResponse().success();
|
| | | }
|
| | | |
| | | }
|
New file |
| | |
| | | package com.xcong.excoin.modules.systemSetting.controller; |
| | | |
| | | import com.xcong.excoin.common.entity.FebsConstant; |
| | | import com.xcong.excoin.common.utils.FebsUtil; |
| | | import com.xcong.excoin.modules.systemSetting.entity.PlatformBannerEntity; |
| | | import com.xcong.excoin.modules.systemSetting.entity.PlatformSymbolsSkuEntity; |
| | | import com.xcong.excoin.modules.systemSetting.entity.PlatformTradeSettingEntity; |
| | | import com.xcong.excoin.modules.systemSetting.service.SystemSettingService; |
| | | |
| | | 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; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2020-06-10 |
| | | **/ |
| | | @Controller("systemSettingView") |
| | | @RequestMapping(FebsConstant.VIEW_PREFIX + "modules/systemSetting") |
| | | @RequiredArgsConstructor |
| | | public class ViewController { |
| | | |
| | | private final SystemSettingService systemSettingService; |
| | | |
| | | /** |
| | | * 交易设置---列表 |
| | | */ |
| | | @GetMapping("platformTradeSetting") |
| | | @RequiresPermissions("platformTradeSetting:view") |
| | | public String platformTradeSetting() { |
| | | return FebsUtil.view("modules/systemSetting/platformTradeSetting"); |
| | | } |
| | | |
| | | /** |
| | | * 交易设置---修改 |
| | | */ |
| | | @GetMapping("platformTradeSettingUpdate/{id}") |
| | | @RequiresPermissions("platformTradeSettingUpdate:update") |
| | | public String platformTradeSettingUpdate(@PathVariable long id, Model model) { |
| | | PlatformTradeSettingEntity data = systemSettingService.selectPlatformTradeSettingById(id); |
| | | model.addAttribute("member", data); |
| | | return FebsUtil.view("modules/systemSetting/platformTradeSettingDetail"); |
| | | } |
| | | |
| | | /** |
| | | * 币种规格---列表 |
| | | */ |
| | | @GetMapping("platformSymbolsSku") |
| | | @RequiresPermissions("platformSymbolsSku:view") |
| | | public String platformSymbolsSku() { |
| | | return FebsUtil.view("modules/systemSetting/platformSymbolsSku"); |
| | | } |
| | | |
| | | /** |
| | | * 币种规格---修改 |
| | | */ |
| | | @GetMapping("platformSymbolsSkuUpdate/{id}") |
| | | @RequiresPermissions("platformSymbolsSkuUpdate:update") |
| | | public String platformSymbolsSkuUpdate(@PathVariable long id, Model model) { |
| | | PlatformSymbolsSkuEntity data = systemSettingService.selectplatformSymbolsSkuById(id); |
| | | model.addAttribute("member", data); |
| | | return FebsUtil.view("modules/systemSetting/platformSymbolsSkuDetail"); |
| | | } |
| | | |
| | | /** |
| | | * 轮播图---列表 |
| | | */ |
| | | @GetMapping("platformBanner") |
| | | @RequiresPermissions("platformBanner:view") |
| | | public String platformBanner() { |
| | | return FebsUtil.view("modules/systemSetting/platformBanner"); |
| | | } |
| | | |
| | | /** |
| | | * 轮播图---修改 |
| | | */ |
| | | @GetMapping("platformBannerUpdate/{id}") |
| | | @RequiresPermissions("platformBannerUpdate:update") |
| | | public String platformBannerUpdate(@PathVariable long id, Model model) { |
| | | PlatformBannerEntity data = systemSettingService.selectPlatformBannerById(id); |
| | | model.addAttribute("member", data); |
| | | return FebsUtil.view("modules/systemSetting/platformBannerDetail"); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.xcong.excoin.modules.systemSetting.entity;
|
| | |
|
| | | import com.baomidou.mybatisplus.annotation.TableName;
|
| | | import com.xcong.excoin.common.entity.BaseEntity;
|
| | |
|
| | | import lombok.Data;
|
| | |
|
| | | @Data
|
| | | @TableName("platform_banner")
|
| | | public class PlatformBannerEntity extends BaseEntity{
|
| | |
|
| | | /**
|
| | | * |
| | | */
|
| | | private static final long serialVersionUID = 1L;
|
| | | /**
|
| | | * 标题
|
| | | */
|
| | | private String name;
|
| | | /**
|
| | | * 图片链接
|
| | | */
|
| | | private String imageUrl;
|
| | | /**
|
| | | * 是否可跳转 1-是2-否
|
| | | */
|
| | | private String isJump;
|
| | | /**
|
| | | * 跳转外部或内部 1-内2-外
|
| | | */
|
| | | private int isInside;
|
| | | /**
|
| | | * 跳转链接
|
| | | */
|
| | | private String jumpUrl;
|
| | | /**
|
| | | * 显示端口 1-pc2-手机
|
| | | */
|
| | | private int showPort;
|
| | | /**
|
| | | * 联系方式
|
| | | */
|
| | | private String sort;
|
| | | /**
|
| | | * 是否置顶 1-是2-否
|
| | | */
|
| | | private String isTop;
|
| | | }
|
New file |
| | |
| | | package com.xcong.excoin.modules.systemSetting.entity;
|
| | |
|
| | | import java.io.Serializable;
|
| | | import java.math.BigDecimal;
|
| | |
|
| | | import com.baomidou.mybatisplus.annotation.IdType;
|
| | | import com.baomidou.mybatisplus.annotation.TableId;
|
| | | import com.baomidou.mybatisplus.annotation.TableName;
|
| | |
|
| | | import lombok.Data;
|
| | |
|
| | | /**
|
| | | * 币种规格表
|
| | | * @author helius
|
| | | */
|
| | | @Data
|
| | | @TableName("platform_symbols_sku")
|
| | | public class PlatformSymbolsSkuEntity implements Serializable {
|
| | | /**
|
| | | * |
| | | */
|
| | | private static final long serialVersionUID = 1L;
|
| | | @TableId(value = "id",type = IdType.AUTO)
|
| | | private Long id;
|
| | | /**
|
| | | * 币种名称
|
| | | */
|
| | | private String name;
|
| | | /**
|
| | | * 规格
|
| | | */
|
| | | private BigDecimal lotnumber;
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.xcong.excoin.modules.systemSetting.entity;
|
| | |
|
| | | import java.io.Serializable;
|
| | | import java.math.BigDecimal;
|
| | |
|
| | | import com.baomidou.mybatisplus.annotation.IdType;
|
| | | import com.baomidou.mybatisplus.annotation.TableId;
|
| | | import com.baomidou.mybatisplus.annotation.TableName;
|
| | |
|
| | | import lombok.Data;
|
| | | /**
|
| | | * 交易设置表
|
| | | */
|
| | | @Data
|
| | | @TableName("platform_trade_setting")
|
| | | public class PlatformTradeSettingEntity implements Serializable {
|
| | | |
| | | /**
|
| | | * |
| | | */
|
| | | private static final long serialVersionUID = 1L;
|
| | | @TableId(value = "id",type = IdType.AUTO)
|
| | | private Long id;
|
| | | /**
|
| | | * 点差
|
| | | */
|
| | | private BigDecimal spread;
|
| | | /**
|
| | | * 杠杆
|
| | | */
|
| | | private BigDecimal leverageRatio;
|
| | | /**
|
| | | * 爆仓
|
| | | */
|
| | | private BigDecimal outstock;
|
| | | /**
|
| | | * 手续费率
|
| | | */
|
| | | private BigDecimal feeRatio;
|
| | | /**
|
| | | * 币币手续费率
|
| | | */
|
| | | private BigDecimal coinFeeRatio;
|
| | | /**
|
| | | * 代理返佣比例
|
| | | */
|
| | | private BigDecimal agentReturnRatio;
|
| | | /**
|
| | | * 持仓系数
|
| | | */
|
| | | private BigDecimal doingRatio;
|
| | | /**
|
| | | * 预估强平价系数
|
| | | */
|
| | | private BigDecimal forceParam;
|
| | |
|
| | | /**
|
| | | *盈亏难度系数
|
| | | */
|
| | | private BigDecimal profitParam;
|
| | | }
|
New file |
| | |
| | | package com.xcong.excoin.modules.systemSetting.mapper;
|
| | |
|
| | | import org.apache.ibatis.annotations.Param;
|
| | |
|
| | | 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.systemSetting.entity.PlatformBannerEntity;
|
| | |
|
| | | public interface PlatformBannerMapper extends BaseMapper<PlatformBannerEntity> {
|
| | |
|
| | | IPage<PlatformBannerEntity> findPlatformBannerInPage(Page<PlatformBannerEntity> page,
|
| | | @Param("record")PlatformBannerEntity platformBannerEntity);
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.xcong.excoin.modules.systemSetting.mapper;
|
| | |
|
| | | import org.apache.ibatis.annotations.Param;
|
| | |
|
| | | 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.systemSetting.entity.PlatformSymbolsSkuEntity;
|
| | |
|
| | | public interface PlatformSymbolsSkuMapper extends BaseMapper<PlatformSymbolsSkuEntity> {
|
| | |
|
| | | IPage<PlatformSymbolsSkuEntity> findPlatformSymbolsSkuInPage(Page<PlatformSymbolsSkuEntity> page,
|
| | | @Param("record") PlatformSymbolsSkuEntity platformSymbolsSkuEntity);
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.xcong.excoin.modules.systemSetting.mapper;
|
| | |
|
| | | import org.apache.ibatis.annotations.Param;
|
| | |
|
| | | 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.systemSetting.entity.PlatformTradeSettingEntity;
|
| | |
|
| | | public interface PlatformTradeSettingMapper extends BaseMapper<PlatformTradeSettingEntity> {
|
| | |
|
| | | IPage<PlatformTradeSettingEntity> findPlatformTradeSettingInPage(Page<PlatformTradeSettingEntity> page,
|
| | | @Param("record") PlatformTradeSettingEntity platformTradeSettingEntity);
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.xcong.excoin.modules.systemSetting.service.Impl;
|
| | |
|
| | | import java.util.Date;
|
| | | import java.util.HashMap;
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | | import javax.validation.Valid;
|
| | | import javax.validation.constraints.NotNull;
|
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | 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.FebsResponse;
|
| | | import com.xcong.excoin.common.entity.QueryRequest;
|
| | | import com.xcong.excoin.modules.systemSetting.entity.PlatformBannerEntity;
|
| | | import com.xcong.excoin.modules.systemSetting.entity.PlatformSymbolsSkuEntity;
|
| | | import com.xcong.excoin.modules.systemSetting.entity.PlatformTradeSettingEntity;
|
| | | import com.xcong.excoin.modules.systemSetting.mapper.PlatformBannerMapper;
|
| | | import com.xcong.excoin.modules.systemSetting.mapper.PlatformSymbolsSkuMapper;
|
| | | import com.xcong.excoin.modules.systemSetting.mapper.PlatformTradeSettingMapper;
|
| | | import com.xcong.excoin.modules.systemSetting.service.SystemSettingService;
|
| | |
|
| | | import lombok.RequiredArgsConstructor;
|
| | |
|
| | | @Service
|
| | | @RequiredArgsConstructor
|
| | | public class SystemSettingServiceImpl extends ServiceImpl<PlatformTradeSettingMapper, PlatformTradeSettingEntity> implements SystemSettingService {
|
| | | |
| | | private final PlatformTradeSettingMapper platformTradeSettingMapper;
|
| | | |
| | | private final PlatformSymbolsSkuMapper platformSymbolsSkuMapper;
|
| | | |
| | | private final PlatformBannerMapper platformBannerMapper;
|
| | | |
| | | @Override
|
| | | public IPage<PlatformTradeSettingEntity> findPlatformTradeSettingInPage(
|
| | | PlatformTradeSettingEntity platformTradeSettingEntity, QueryRequest request) {
|
| | | Page<PlatformTradeSettingEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
|
| | | IPage<PlatformTradeSettingEntity> findmemberQuickBuySaleListInPage = platformTradeSettingMapper.findPlatformTradeSettingInPage(page, platformTradeSettingEntity);
|
| | | return findmemberQuickBuySaleListInPage;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public PlatformTradeSettingEntity selectPlatformTradeSettingById(@NotNull(message = "{required}") long id) {
|
| | | PlatformTradeSettingEntity platformTradeSettingEntity = platformTradeSettingMapper.selectById(id);
|
| | | return platformTradeSettingEntity;
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public FebsResponse platformTradeSettingConfirm(@Valid PlatformTradeSettingEntity platformTradeSettingEntity) {
|
| | | platformTradeSettingMapper.updateById(platformTradeSettingEntity);
|
| | | return new FebsResponse().success();
|
| | | }
|
| | |
|
| | | @Override
|
| | | public IPage<PlatformSymbolsSkuEntity> findPlatformSymbolsSkuInPage(
|
| | | PlatformSymbolsSkuEntity platformSymbolsSkuEntity, QueryRequest request) {
|
| | | Page<PlatformSymbolsSkuEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
|
| | | IPage<PlatformSymbolsSkuEntity> findmemberQuickBuySaleListInPage = platformSymbolsSkuMapper.findPlatformSymbolsSkuInPage(page, platformSymbolsSkuEntity);
|
| | | return findmemberQuickBuySaleListInPage;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public PlatformSymbolsSkuEntity selectplatformSymbolsSkuById(@NotNull(message = "{required}") long id) {
|
| | | PlatformSymbolsSkuEntity platformSymbolsSkuEntity = platformSymbolsSkuMapper.selectById(id);
|
| | | return platformSymbolsSkuEntity;
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public FebsResponse platformSymbolsSkuConfirm(@Valid PlatformSymbolsSkuEntity platformSymbolsSkuEntity) {
|
| | | platformSymbolsSkuMapper.updateById(platformSymbolsSkuEntity);
|
| | | return new FebsResponse().success();
|
| | | }
|
| | |
|
| | | @Override
|
| | | public IPage<PlatformBannerEntity> findPlatformBannerInPage(PlatformBannerEntity platformBannerEntity,
|
| | | QueryRequest request) {
|
| | | Page<PlatformBannerEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
|
| | | IPage<PlatformBannerEntity> platformBannerEntitys = platformBannerMapper.findPlatformBannerInPage(page, platformBannerEntity);
|
| | | return platformBannerEntitys;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public PlatformBannerEntity selectPlatformBannerById(long id) {
|
| | | PlatformBannerEntity platformBannerEntity = platformBannerMapper.selectById(id);
|
| | | return platformBannerEntity;
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public FebsResponse platformBannerConfirm(@Valid PlatformBannerEntity platformBannerEntity) {
|
| | | platformBannerMapper.updateById(platformBannerEntity);
|
| | | return new FebsResponse().success();
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public FebsResponse platformBannerDelete(@NotNull(message = "{required}") Long id) {
|
| | | platformBannerMapper.deleteById(id);
|
| | | return new FebsResponse().success();
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void platformBannerAdd() {
|
| | | Map<String, Object> columnMap= new HashMap<>();
|
| | | List<PlatformBannerEntity> selectByMap = platformBannerMapper.selectByMap(columnMap);
|
| | | PlatformBannerEntity platformBannerEntity = selectByMap.get(0);
|
| | | PlatformBannerEntity platformBannerEntityAdd = new PlatformBannerEntity();
|
| | | platformBannerEntityAdd.setCreateBy(platformBannerEntity.getCreateBy());
|
| | | platformBannerEntityAdd.setCreateTime(new Date());
|
| | | platformBannerEntityAdd.setImageUrl(platformBannerEntity.getImageUrl());
|
| | | platformBannerEntityAdd.setIsInside(platformBannerEntity.getIsInside());
|
| | | platformBannerEntityAdd.setIsJump(platformBannerEntity.getIsJump());
|
| | | platformBannerEntityAdd.setIsTop(platformBannerEntity.getIsTop());
|
| | | platformBannerEntityAdd.setJumpUrl(platformBannerEntity.getJumpUrl());
|
| | | platformBannerEntityAdd.setName(platformBannerEntity.getName());
|
| | | platformBannerEntityAdd.setShowPort(platformBannerEntity.getShowPort());
|
| | | platformBannerEntityAdd.setSort(platformBannerEntity.getSort());
|
| | | platformBannerEntityAdd.setUpdateBy(platformBannerEntity.getUpdateBy());
|
| | | platformBannerEntityAdd.setUpdateTime(new Date());
|
| | | platformBannerMapper.insert(platformBannerEntityAdd);
|
| | | |
| | | }
|
| | |
|
| | | }
|
New file |
| | |
| | | package com.xcong.excoin.modules.systemSetting.service;
|
| | |
|
| | | import javax.validation.Valid;
|
| | | import javax.validation.constraints.NotNull;
|
| | |
|
| | | import com.baomidou.mybatisplus.core.metadata.IPage;
|
| | | import com.baomidou.mybatisplus.extension.service.IService;
|
| | | import com.xcong.excoin.common.entity.FebsResponse;
|
| | | import com.xcong.excoin.common.entity.QueryRequest;
|
| | | import com.xcong.excoin.modules.systemSetting.entity.PlatformBannerEntity;
|
| | | import com.xcong.excoin.modules.systemSetting.entity.PlatformSymbolsSkuEntity;
|
| | | import com.xcong.excoin.modules.systemSetting.entity.PlatformTradeSettingEntity;
|
| | |
|
| | | public interface SystemSettingService extends IService<PlatformTradeSettingEntity>{
|
| | |
|
| | | IPage<PlatformTradeSettingEntity> findPlatformTradeSettingInPage(PlatformTradeSettingEntity platformTradeSettingEntity,
|
| | | QueryRequest request);
|
| | |
|
| | | PlatformTradeSettingEntity selectPlatformTradeSettingById(@NotNull(message = "{required}") long id);
|
| | |
|
| | | FebsResponse platformTradeSettingConfirm(@Valid PlatformTradeSettingEntity platformTradeSettingEntity);
|
| | |
|
| | | IPage<PlatformSymbolsSkuEntity> findPlatformSymbolsSkuInPage(PlatformSymbolsSkuEntity platformSymbolsSkuEntity, QueryRequest request);
|
| | |
|
| | | PlatformSymbolsSkuEntity selectplatformSymbolsSkuById(@NotNull(message = "{required}")long id);
|
| | |
|
| | | FebsResponse platformSymbolsSkuConfirm(@Valid PlatformSymbolsSkuEntity platformSymbolsSkuEntity);
|
| | |
|
| | | IPage<PlatformBannerEntity> findPlatformBannerInPage(PlatformBannerEntity platformBannerEntity, QueryRequest request);
|
| | |
|
| | | PlatformBannerEntity selectPlatformBannerById(long id);
|
| | |
|
| | | FebsResponse platformBannerConfirm(@Valid PlatformBannerEntity platformBannerEntity);
|
| | |
|
| | | FebsResponse platformBannerDelete(@NotNull(message = "{required}") Long id);
|
| | |
|
| | | void platformBannerAdd();
|
| | |
|
| | | }
|
New file |
| | |
| | | <?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.xcong.excoin.modules.systemSetting.mapper.PlatformBannerMapper">
|
| | |
|
| | | <select id="findPlatformBannerInPage" resultType="com.xcong.excoin.modules.systemSetting.entity.PlatformBannerEntity">
|
| | | SELECT
|
| | | *
|
| | | FROM
|
| | | platform_banner
|
| | | order by create_time desc
|
| | | </select>
|
| | |
|
| | | </mapper> |
New file |
| | |
| | | <?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.xcong.excoin.modules.systemSetting.mapper.PlatformSymbolsSkuMapper">
|
| | |
|
| | | <select id="findPlatformSymbolsSkuInPage" resultType="com.xcong.excoin.modules.systemSetting.entity.PlatformSymbolsSkuEntity">
|
| | | SELECT
|
| | | *
|
| | | FROM
|
| | | platform_symbols_sku
|
| | | </select>
|
| | |
|
| | | </mapper> |
New file |
| | |
| | | <?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.xcong.excoin.modules.systemSetting.mapper.PlatformTradeSettingMapper">
|
| | |
|
| | |
|
| | | <select id="findPlatformTradeSettingInPage" resultType="com.xcong.excoin.modules.systemSetting.entity.PlatformTradeSettingEntity">
|
| | | SELECT
|
| | | *
|
| | | FROM
|
| | | platform_trade_setting
|
| | | </select>
|
| | |
|
| | | </mapper> |
| | |
| | | function getQueryParams() {
|
| | | return {
|
| | | account: $searchForm.find('input[name="account"]').val().trim(),
|
| | | orderStatus: $searchForm.find("select[name='orderStatus']").val(),
|
| | | orderStatus: $searchForm.find("select[name='orderStatus']").val()
|
| | | };
|
| | | }
|
| | |
|
| | |
| | | <input type="text" placeholder="手机号/邮箱/邀请码" name="account" autocomplete="off" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label layui-form-label-sm">创建时间</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" name="createTime" id="user-createTime" class="layui-input"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label layui-form-label-sm">账号类型</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="accountType"> |
| | | <option value=""></option> |
| | | <option value="1">测试账号</option> |
| | | <option value="2">正常账号</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label layui-form-label-sm">账号状态</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="accountStatus"> |
| | | <option value=""></option> |
| | | <option value="0">禁用</option> |
| | | <option value="1">正常</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label layui-form-label-sm">实名状态</label> |
| | | <div class="layui-input-inline"> |
| | | <select name="certifyStatus"> |
| | | <option value=""></option> |
| | | <option value="0">未通过</option> |
| | | <option value="1">审核中</option> |
| | | <option value="2">审核通过</option> |
| | | <option value="2">未实名</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-md2 layui-col-sm12 layui-col-xs12 table-action-area"> |
| | |
| | | </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 class="layui-btn layui-btn-sm layui-btn-primary table-action action-more" |
| | | shiro:hasAnyPermissions="user:add,user:update,user:password:reset,user:export"> |
| | | <i class="layui-icon"></i> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | febs = layui.febs, |
| | | form = layui.form, |
| | | table = layui.table, |
| | | treeSelect = layui.treeSelect, |
| | | dropdown = layui.dropdown, |
| | | $view = $('#febs-user'), |
| | | $query = $view.find('#query'), |
| | | $reset = $view.find('#reset'), |
| | | $searchForm = $view.find('form'), |
| | | sortObject = {field: 'createTime', type: null}, |
| | | tableIns, |
| | | createTimeFrom, |
| | | createTimeTo; |
| | | sortObject = {field: 'phone', type: null}, |
| | | tableIns; |
| | | |
| | | form.render(); |
| | | |
| | | // 表格初始化 |
| | | initTable(); |
| | | |
| | | // 时间组件 |
| | | laydate.render({ |
| | | elem: '#user-createTime', |
| | | range: true, |
| | | trigger: 'click' |
| | | }); |
| | | |
| | | // 新增下拉组件 |
| | | // 下拉框选择器 |
| | | treeSelect.render({ |
| | | elem: $view.find('#dept'), |
| | | type: 'get', |
| | | data: ctx + 'dept/select/tree', |
| | | placeholder: '请选择', |
| | | search: false |
| | | }); |
| | | |
| | | // 初始化表格操作栏各个按钮功能 |
| | | table.on('tool(userTable)', function (obj) { |
| | |
| | | // 刷新按钮 |
| | | $reset.on('click', function () { |
| | | $searchForm[0].reset(); |
| | | treeSelect.revokeNode('dept'); |
| | | sortObject.type = 'null'; |
| | | createTimeTo = null; |
| | | createTimeFrom = null; |
| | | tableIns.reload({where: getQueryParams(), page: {curr: 1}, initSort: sortObject}); |
| | | }); |
| | | |
| | |
| | | |
| | | // 获取查询参数 |
| | | function getQueryParams() { |
| | | var createTime = $searchForm.find('input[name="createTime"]').val(); |
| | | if (createTime) { |
| | | createTimeFrom = createTime.split(' - ')[0]; |
| | | createTimeTo = createTime.split(' - ')[1]; |
| | | } |
| | | return { |
| | | startTime: createTimeFrom, |
| | | endTime: createTimeTo, |
| | | account: $searchForm.find('input[name="account"]').val().trim(), |
| | | accountStatus: $searchForm.find("select[name='accountStatus']").val(), |
| | | accountType: $searchForm.find("select[name='accountType']").val(), |
| | | certifyStatus: $searchForm.find("select[name='certifyStatus']").val(), |
| | | invalidate_ie_cache: new Date() |
| | | }; |
| | | } |
| | | |
| | | function deleteUsers(userIds) { |
| | | var currentUserId = currentUser.userId + ''; |
| | | if (('' + userIds).split(',').indexOf(currentUserId) !== -1) { |
| | | febs.alert.warn('所选用户包含当前登录用户,无法删除'); |
| | | return; |
| | | } |
| | | febs.get(ctx + 'user/delete/' + userIds, null, function () { |
| | | febs.alert.success('删除用户成功'); |
| | | $query.click(); |
| | | }); |
| | | } |
| | | }) |
| | | </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-md2 layui-col-sm12 layui-col-xs12 table-action-area">
|
| | | <div class="layui-btn layui-btn-sm layui-btn-primary febs-button-green-plain table-action" id="add">
|
| | | 新增
|
| | | </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>
|
| | |
|
| | | <script type="text/html" id="isJump">
|
| | | {{#
|
| | | var isJump = {
|
| | | 2: {title: '否', color: 'red' },
|
| | | 1: {title: '是' , color: 'green'}
|
| | | }[d.isJump];
|
| | | }}
|
| | | <span class="layui-badge febs-bg-{{isJump.color}}">{{ isJump.title }}</span>
|
| | | </script>
|
| | | <script type="text/html" id="isInside">
|
| | | {{#
|
| | | var isInside = { |
| | | 2: {title: '外' , color: 'green'},
|
| | | 1: {title: '内', color: 'red'}
|
| | | }[d.isInside];
|
| | | }}
|
| | | <span class="layui-badge febs-bg-{{isInside.color}}">{{ isInside.title }}</span>
|
| | | </script>
|
| | | <script type="text/html" id="showPort">
|
| | | {{#
|
| | | var showPort = { |
| | | 2: {title: '手机' , color: 'green'},
|
| | | 1: {title: 'pc', color: 'red'}
|
| | | }[d.showPort];
|
| | | }}
|
| | | <span class="layui-badge febs-bg-{{showPort.color}}">{{ showPort.title }}</span>
|
| | | </script>
|
| | | <script type="text/html" id="isTop">
|
| | | {{#
|
| | | var isTop = { |
| | | 2: {title: '否', color: 'red' },
|
| | | 1: {title: '是' , color: 'green'}
|
| | | }[d.isTop];
|
| | | }}
|
| | | <span class="layui-badge febs-bg-{{isTop.color}}">{{ isTop.title }}</span>
|
| | | </script>
|
| | | <!-- 表格操作栏 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>
|
| | | <a lay-event="delete" 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(['dropdown', 'jquery', 'laydate', 'form', 'table', 'febs'], function () {
|
| | | var $ = layui.jquery,
|
| | | laydate = layui.laydate,
|
| | | febs = layui.febs,
|
| | | form = layui.form,
|
| | | table = layui.table,
|
| | | dropdown = layui.dropdown,
|
| | | $view = $('#febs-user'),
|
| | | $reset = $view.find('#reset'),
|
| | | $add = $view.find('#add'),
|
| | | $searchForm = $view.find('form'),
|
| | | sortObject = {field: 'spread', 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/systemSetting/platformBannerUpdate/' + data.id, {
|
| | | area: $(window).width() <= 1000 ? '100%' : '50%',
|
| | | btn: ['提交', '取消'],
|
| | | yes: function (index, layero) {
|
| | | $('#user-update').find('#submit').trigger('click');
|
| | | },
|
| | | btn2: function () {
|
| | | layer.closeAll();
|
| | | }
|
| | | });
|
| | | }
|
| | | if (layEvent === 'delete') {
|
| | | febs.modal.confirm('删除', '您是否确认删除?', function () {
|
| | | deleteUsers(data.id);
|
| | | });
|
| | | }
|
| | | });
|
| | | |
| | | function deleteUsers(id) {
|
| | | febs.get(ctx + 'systemSetting/platformBannerDelete/' + id, null, function () {
|
| | | febs.alert.success('确认删除');
|
| | | $reset.click();
|
| | | });
|
| | | }
|
| | | |
| | | // 刷新按钮
|
| | | $reset.on('click', function () {
|
| | | $searchForm[0].reset();
|
| | | sortObject.type = 'null';
|
| | | tableIns.reload({where: getQueryParams(), page: {curr: 1}, initSort: sortObject});
|
| | | });
|
| | | // 新增按钮
|
| | | $add.on('click', function () {
|
| | | febs.get(ctx + 'systemSetting/platformBannerAdd/', null, function () {
|
| | | febs.alert.success('确认新增');
|
| | | $reset.click();
|
| | | });
|
| | | });
|
| | |
|
| | | |
| | | // 获取查询参数
|
| | | function getQueryParams() {
|
| | | return {};
|
| | | }
|
| | | |
| | | function initTable() {
|
| | | tableIns = febs.table.init({
|
| | | elem: $view.find('table'),
|
| | | id: 'userTable',
|
| | | url: ctx + 'systemSetting/platformBanner',
|
| | | cols: [[
|
| | | {field: 'id', title: '', minWidth: 10,align:'left'},
|
| | | {field: 'name', title: '标题', minWidth: 120,align:'center'},
|
| | | {field: 'imageUrl', title: '图片链接', minWidth: 200,align:'center'},
|
| | | {field: 'jumpUrl', title: '跳转链接', minWidth: 200,align:'center'},
|
| | | {field: 'sort', title: '联系方式', minWidth: 200,align:'center'},
|
| | | |
| | | {title: '是否可跳转', templet: '#isJump', minWidth: 60,align:'center'},
|
| | | {title: '跳转外部或内部', templet: '#isInside', minWidth: 60,align:'center'},
|
| | | {title: '显示端口', templet: '#showPort', minWidth: 60,align:'center'},
|
| | | {title: '是否置顶', templet: '#isTop', minWidth: 60,align:'center'},
|
| | | |
| | | {title: '操作', toolbar: '#user-option', minWidth: 140, fixed : 'right'}
|
| | | ]]
|
| | | });
|
| | | }
|
| | | })
|
| | | </script> |
New file |
| | |
| | | <!DOCTYPE html>
|
| | | <html>
|
| | | <head>
|
| | | <meta charset="UTF-8">
|
| | | <title>Insert title here</title>
|
| | | </head>
|
| | | <body>
|
| | |
|
| | | </body>
|
| | | </html> |
New file |
| | |
| | | <style>
|
| | | #user-update {
|
| | | padding: 20px 25px 25px 0;
|
| | | }
|
| | |
|
| | | #user-update .layui-treeSelect .ztree li a, .ztree li span {
|
| | | margin: 0 0 2px 3px !important;
|
| | | }
|
| | | #user-update #data-permission-tree-block {
|
| | | border: 1px solid #eee;
|
| | | border-radius: 2px;
|
| | | padding: 3px 0;
|
| | | }
|
| | | #user-add .layui-treeSelect .ztree li span.button.switch {
|
| | | top: 1px;
|
| | | left: 3px;
|
| | | }
|
| | |
|
| | | </style>
|
| | | <div class="layui-fluid" id="user-update">
|
| | | <form class="layui-form" action="" lay-filter="user-update-form">
|
| | | <div class="layui-form-item febs-hide">
|
| | | <label class="layui-form-label febs-form-item-require">用户id:</label>
|
| | | <div class="layui-input-block">
|
| | | <input type="text" name="id" data-th-value="${member.id}">
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-form-item">
|
| | | <label class="layui-form-label febs-form-item-require">标题:</label>
|
| | | <div class="layui-input-block">
|
| | | <input type="text" name="name" minlength="4" maxlength="10" data-th-id="${member.name}"
|
| | | lay-verify="range|name" autocomplete="off" class="layui-input" >
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-form-item">
|
| | | <label class="layui-form-label febs-form-item-require">图片链接:</label>
|
| | | <div class="layui-input-block">
|
| | | <input type="text" name="imageUrl" minlength="4" maxlength="10" data-th-id="${member.imageUrl}"
|
| | | lay-verify="range|imageUrl" autocomplete="off" class="layui-input" >
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-form-item">
|
| | | <label class="layui-form-label febs-form-item-require">跳转链接:</label>
|
| | | <div class="layui-input-block">
|
| | | <input type="text" name="jumpUrl" minlength="4" maxlength="10" data-th-id="${member.jumpUrl}"
|
| | | lay-verify="range|jumpUrl" autocomplete="off" class="layui-input" >
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-form-item">
|
| | | <label class="layui-form-label febs-form-item-require">联系方式:</label>
|
| | | <div class="layui-input-block">
|
| | | <input type="text" name="sort" minlength="4" maxlength="10" data-th-id="${member.sort}"
|
| | | lay-verify="range|sort" autocomplete="off" class="layui-input" >
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-form-item">
|
| | | <label class="layui-form-label febs-form-item-require">是否置顶:</label>
|
| | | <div class="layui-input-block">
|
| | | <input type="radio" name="isTop" value="1" title="是">
|
| | | <input type="radio" name="isTop" value="2" title="否">
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-form-item">
|
| | | <label class="layui-form-label febs-form-item-require">显示端口:</label>
|
| | | <div class="layui-input-block">
|
| | | <input type="radio" name="showPort" value="1" title="pc">
|
| | | <input type="radio" name="showPort" value="2" title="手机">
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-form-item">
|
| | | <label class="layui-form-label febs-form-item-require">是否可跳转:</label>
|
| | | <div class="layui-input-block">
|
| | | <input type="radio" name="isJump" value="1" title="是">
|
| | | <input type="radio" name="isJump" value="2" title="否">
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-form-item">
|
| | | <label class="layui-form-label febs-form-item-require">跳转外部或内部:</label>
|
| | | <div class="layui-input-block">
|
| | | <input type="radio" name="isInside" value="1" title="内">
|
| | | <input type="radio" name="isInside" value="2" title="外">
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-form-item febs-hide">
|
| | | <button class="layui-btn" lay-submit="" lay-filter="user-update-form-submit" id="submit"></button>
|
| | | </div>
|
| | | </form>
|
| | | </div>
|
| | |
|
| | | <script data-th-inline="javascript">
|
| | | layui.use(['febs', 'form', 'formSelects', 'validate', 'treeSelect', 'eleTree'], function () {
|
| | | var $ = layui.$,
|
| | | febs = layui.febs,
|
| | | layer = layui.layer,
|
| | | formSelects = layui.formSelects,
|
| | | treeSelect = layui.treeSelect,
|
| | | form = layui.form,
|
| | | eleTree = layui.eleTree,
|
| | | member = [[${member}]],
|
| | | $view = $('#user-update'),
|
| | | validate = layui.validate,
|
| | | _deptTree;
|
| | |
|
| | | form.render();
|
| | |
|
| | | initUserValue();
|
| | |
|
| | | formSelects.render();
|
| | |
|
| | | function initUserValue() {
|
| | | form.val("user-update-form", {
|
| | | "id": member.id,
|
| | | "name": member.name,
|
| | | "imageUrl": member.imageUrl,
|
| | | "isInside": member.isInside,
|
| | | "showPort": member.showPort,
|
| | | "jumpUrl": member.jumpUrl,
|
| | | "sort": member.sort,
|
| | | "isTop": member.isTop,
|
| | | "isJump": member.isJump
|
| | | });
|
| | | }
|
| | |
|
| | | form.on('submit(user-update-form-submit)', function (data) {
|
| | | febs.post(ctx + 'systemSetting/platformBannerConfirm', data.field, function () {
|
| | | layer.closeAll();
|
| | | febs.alert.success('设置成功');
|
| | | $('#febs-user').find('#reset').click();
|
| | | });
|
| | | return false;
|
| | | });
|
| | | });
|
| | | </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-md2 layui-col-sm12 layui-col-xs12 table-action-area">
|
| | | <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(['dropdown', 'jquery', 'laydate', 'form', 'table', 'febs'], function () {
|
| | | var $ = layui.jquery,
|
| | | laydate = layui.laydate,
|
| | | febs = layui.febs,
|
| | | form = layui.form,
|
| | | table = layui.table,
|
| | | dropdown = layui.dropdown,
|
| | | $view = $('#febs-user'),
|
| | | $reset = $view.find('#reset'),
|
| | | $searchForm = $view.find('form'),
|
| | | sortObject = {field: 'spread', 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/systemSetting/platformSymbolsSkuUpdate/' + data.id, {
|
| | | area: $(window).width() <= 1000 ? '100%' : '50%',
|
| | | btn: ['提交', '取消'],
|
| | | yes: function (index, layero) {
|
| | | $('#user-update').find('#submit').trigger('click');
|
| | | },
|
| | | btn2: function () {
|
| | | layer.closeAll();
|
| | | }
|
| | | });
|
| | | }
|
| | | });
|
| | | |
| | | // 刷新按钮
|
| | | $reset.on('click', function () {
|
| | | $searchForm[0].reset();
|
| | | sortObject.type = 'null';
|
| | | tableIns.reload({where: getQueryParams(), page: {curr: 1}, initSort: sortObject});
|
| | | });
|
| | |
|
| | | |
| | | // 获取查询参数
|
| | | function getQueryParams() {
|
| | | return {};
|
| | | }
|
| | | |
| | | function initTable() {
|
| | | tableIns = febs.table.init({
|
| | | elem: $view.find('table'),
|
| | | id: 'userTable',
|
| | | url: ctx + 'systemSetting/platformSymbolsSku',
|
| | | cols: [[
|
| | | {field: 'id', title: '', minWidth: 120,align:'left'},
|
| | | {field: 'name', title: '标题', minWidth: 120,align:'left'},
|
| | | {field: 'imageUrl', title: '图片链接', minWidth: 200,align:'left'},
|
| | | {title: '操作', toolbar: '#user-option', minWidth: 140, fixed : 'right'}
|
| | | ]]
|
| | | });
|
| | | }
|
| | | })
|
| | | </script> |
New file |
| | |
| | | <style>
|
| | | #user-update {
|
| | | padding: 20px 25px 25px 0;
|
| | | }
|
| | |
|
| | | #user-update .layui-treeSelect .ztree li a, .ztree li span {
|
| | | margin: 0 0 2px 3px !important;
|
| | | }
|
| | | #user-update #data-permission-tree-block {
|
| | | border: 1px solid #eee;
|
| | | border-radius: 2px;
|
| | | padding: 3px 0;
|
| | | }
|
| | | #user-add .layui-treeSelect .ztree li span.button.switch {
|
| | | top: 1px;
|
| | | left: 3px;
|
| | | }
|
| | |
|
| | | </style>
|
| | | <div class="layui-fluid" id="user-update">
|
| | | <form class="layui-form" action="" lay-filter="user-update-form">
|
| | | <div class="layui-form-item febs-hide">
|
| | | <label class="layui-form-label febs-form-item-require">用户id:</label>
|
| | | <div class="layui-input-block">
|
| | | <input type="text" name="id" data-th-value="${member.id}">
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-form-item">
|
| | | <label class="layui-form-label febs-form-item-require">币种名称:</label>
|
| | | <div class="layui-input-block">
|
| | | <input type="text" name="name" minlength="4" maxlength="10" data-th-id="${member.name}"
|
| | | lay-verify="range|name" autocomplete="off" class="layui-input" >
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-form-item">
|
| | | <label class="layui-form-label febs-form-item-require">规格:</label>
|
| | | <div class="layui-input-block">
|
| | | <input type="text" name="lotnumber" minlength="4" maxlength="10" data-th-id="${member.lotnumber}"
|
| | | lay-verify="range|lotnumber" autocomplete="off" class="layui-input" >
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-form-item febs-hide">
|
| | | <button class="layui-btn" lay-submit="" lay-filter="user-update-form-submit" id="submit"></button>
|
| | | </div>
|
| | | </form>
|
| | | </div>
|
| | |
|
| | | <script data-th-inline="javascript">
|
| | | layui.use(['febs', 'form', 'formSelects', 'validate', 'treeSelect', 'eleTree'], function () {
|
| | | var $ = layui.$,
|
| | | febs = layui.febs,
|
| | | layer = layui.layer,
|
| | | formSelects = layui.formSelects,
|
| | | treeSelect = layui.treeSelect,
|
| | | form = layui.form,
|
| | | eleTree = layui.eleTree,
|
| | | member = [[${member}]],
|
| | | $view = $('#user-update'),
|
| | | validate = layui.validate,
|
| | | _deptTree;
|
| | |
|
| | | form.render();
|
| | |
|
| | | initUserValue();
|
| | |
|
| | | formSelects.render();
|
| | |
|
| | | function initUserValue() {
|
| | | form.val("user-update-form", {
|
| | | "id": member.id,
|
| | | "name": member.name,
|
| | | "lotnumber": member.lotnumber
|
| | | });
|
| | | }
|
| | |
|
| | | form.on('submit(user-update-form-submit)', function (data) {
|
| | | febs.post(ctx + 'systemSetting/platformSymbolsSkuConfirm', data.field, function () {
|
| | | layer.closeAll();
|
| | | febs.alert.success('设置成功');
|
| | | $('#febs-user').find('#reset').click();
|
| | | });
|
| | | return false;
|
| | | });
|
| | | });
|
| | | </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-md2 layui-col-sm12 layui-col-xs12 table-action-area">
|
| | | <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(['dropdown', 'jquery', 'laydate', 'form', 'table', 'febs'], function () {
|
| | | var $ = layui.jquery,
|
| | | laydate = layui.laydate,
|
| | | febs = layui.febs,
|
| | | form = layui.form,
|
| | | table = layui.table,
|
| | | dropdown = layui.dropdown,
|
| | | $view = $('#febs-user'),
|
| | | $reset = $view.find('#reset'),
|
| | | $searchForm = $view.find('form'),
|
| | | sortObject = {field: 'spread', 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/systemSetting/platformTradeSettingUpdate/' + data.id, {
|
| | | area: $(window).width() <= 1000 ? '100%' : '50%',
|
| | | btn: ['提交', '取消'],
|
| | | yes: function (index, layero) {
|
| | | $('#user-update').find('#submit').trigger('click');
|
| | | },
|
| | | btn2: function () {
|
| | | layer.closeAll();
|
| | | }
|
| | | });
|
| | | }
|
| | | });
|
| | | |
| | | // 刷新按钮
|
| | | $reset.on('click', function () {
|
| | | $searchForm[0].reset();
|
| | | sortObject.type = 'null';
|
| | | tableIns.reload({where: getQueryParams(), page: {curr: 1}, initSort: sortObject});
|
| | | });
|
| | |
|
| | | |
| | | // 获取查询参数
|
| | | function getQueryParams() {
|
| | | return {};
|
| | | }
|
| | | |
| | | function initTable() {
|
| | | tableIns = febs.table.init({
|
| | | elem: $view.find('table'),
|
| | | id: 'userTable',
|
| | | url: ctx + 'systemSetting/platformTradeSetting',
|
| | | cols: [[
|
| | | {field: 'spread', title: '点差', minWidth: 120,align:'left'},
|
| | | {field: 'leverageRatio', title: '杠杆', minWidth: 200,align:'left'},
|
| | | {field: 'outstock', title: '爆仓', minWidth: 80,align:'center'},
|
| | | {field: 'feeRatio', title: '手续费率', minWidth: 60,align:'center'},
|
| | | {field: 'coinFeeRatio', title: '币币手续费率', minWidth: 60,align:'center'},
|
| | | {field: 'agentReturnRatio', title: '代理返佣比例', minWidth: 100,align:'center'},
|
| | | {field: 'doingRatio', title: '持仓系数', minWidth: 100,align:'center'},
|
| | | {field: 'forceParam', title: '预估强平价系数', minWidth: 280,align:'center'},
|
| | | {field: 'profitParam', title: '盈亏难度系数', minWidth: 200,align:'center'},
|
| | | {title: '操作', toolbar: '#user-option', minWidth: 140, fixed : 'right'}
|
| | | ]]
|
| | | });
|
| | | }
|
| | | })
|
| | | </script> |
New file |
| | |
| | | <style>
|
| | | #user-update {
|
| | | padding: 20px 25px 25px 0;
|
| | | }
|
| | |
|
| | | #user-update .layui-treeSelect .ztree li a, .ztree li span {
|
| | | margin: 0 0 2px 3px !important;
|
| | | }
|
| | | #user-update #data-permission-tree-block {
|
| | | border: 1px solid #eee;
|
| | | border-radius: 2px;
|
| | | padding: 3px 0;
|
| | | }
|
| | | #user-add .layui-treeSelect .ztree li span.button.switch {
|
| | | top: 1px;
|
| | | left: 3px;
|
| | | }
|
| | |
|
| | | </style>
|
| | | <div class="layui-fluid" id="user-update">
|
| | | <form class="layui-form" action="" lay-filter="user-update-form">
|
| | | <div class="layui-form-item febs-hide">
|
| | | <label class="layui-form-label febs-form-item-require">用户id:</label>
|
| | | <div class="layui-input-block">
|
| | | <input type="text" name="id" data-th-value="${member.id}">
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-form-item">
|
| | | <label class="layui-form-label febs-form-item-require">点差:</label>
|
| | | <div class="layui-input-block">
|
| | | <input type="text" name="spread" minlength="4" maxlength="10" data-th-id="${member.spread}"
|
| | | lay-verify="range|spread" autocomplete="off" class="layui-input" >
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-form-item">
|
| | | <label class="layui-form-label febs-form-item-require">杠杆:</label>
|
| | | <div class="layui-input-block">
|
| | | <input type="text" name="leverageRatio" minlength="4" maxlength="10" data-th-id="${member.leverageRatio}"
|
| | | lay-verify="range|leverageRatio" autocomplete="off" class="layui-input" >
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-form-item">
|
| | | <label class="layui-form-label febs-form-item-require"> 爆仓:</label>
|
| | | <div class="layui-input-block">
|
| | | <input type="text" name="outstock" minlength="4" maxlength="10" data-th-id="${member.outstock}"
|
| | | lay-verify="range|outstock" autocomplete="off" class="layui-input" >
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-form-item">
|
| | | <label class="layui-form-label febs-form-item-require">手续费率:</label>
|
| | | <div class="layui-input-block">
|
| | | <input type="text" name="feeRatio" minlength="4" maxlength="10" data-th-id="${member.feeRatio}"
|
| | | lay-verify="range|feeRatio" autocomplete="off" class="layui-input" >
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-form-item">
|
| | | <label class="layui-form-label febs-form-item-require">币币手续费率:</label>
|
| | | <div class="layui-input-block">
|
| | | <input type="text" name="coinFeeRatio" minlength="4" maxlength="10" data-th-id="${member.coinFeeRatio}"
|
| | | lay-verify="range|coinFeeRatio" autocomplete="off" class="layui-input" >
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-form-item">
|
| | | <label class="layui-form-label febs-form-item-require">代理返佣比例:</label>
|
| | | <div class="layui-input-block">
|
| | | <input type="text" name="agentReturnRatio" minlength="4" maxlength="10" data-th-id="${member.agentReturnRatio}"
|
| | | lay-verify="range|agentReturnRatio" autocomplete="off" class="layui-input" >
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-form-item">
|
| | | <label class="layui-form-label febs-form-item-require"> 持仓系数:</label>
|
| | | <div class="layui-input-block">
|
| | | <input type="text" name="doingRatio" minlength="4" maxlength="10" data-th-id="${member.doingRatio}"
|
| | | lay-verify="range|doingRatio" autocomplete="off" class="layui-input" >
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-form-item">
|
| | | <label class="layui-form-label febs-form-item-require"> 预估强平价系数:</label>
|
| | | <div class="layui-input-block">
|
| | | <input type="text" name="forceParam" minlength="4" maxlength="10" data-th-id="${member.forceParam}"
|
| | | lay-verify="range|forceParam" autocomplete="off" class="layui-input" >
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-form-item">
|
| | | <label class="layui-form-label febs-form-item-require"> 盈亏难度系数:</label>
|
| | | <div class="layui-input-block">
|
| | | <input type="text" name="profitParam" minlength="4" maxlength="10" data-th-id="${member.profitParam}"
|
| | | lay-verify="range|profitParam" autocomplete="off" class="layui-input" >
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-form-item febs-hide">
|
| | | <button class="layui-btn" lay-submit="" lay-filter="user-update-form-submit" id="submit"></button>
|
| | | </div>
|
| | | </form>
|
| | | </div>
|
| | |
|
| | | <script data-th-inline="javascript">
|
| | | layui.use(['febs', 'form', 'formSelects', 'validate', 'treeSelect', 'eleTree'], function () {
|
| | | var $ = layui.$,
|
| | | febs = layui.febs,
|
| | | layer = layui.layer,
|
| | | formSelects = layui.formSelects,
|
| | | treeSelect = layui.treeSelect,
|
| | | form = layui.form,
|
| | | eleTree = layui.eleTree,
|
| | | member = [[${member}]],
|
| | | $view = $('#user-update'),
|
| | | validate = layui.validate,
|
| | | _deptTree;
|
| | |
|
| | | form.render();
|
| | |
|
| | | initUserValue();
|
| | |
|
| | | formSelects.render();
|
| | |
|
| | | function initUserValue() {
|
| | | form.val("user-update-form", {
|
| | | "id": member.id,
|
| | | "spread": member.spread,
|
| | | "leverageRatio": member.leverageRatio,
|
| | | "outstock": member.outstock,
|
| | | "feeRatio": member.feeRatio,
|
| | | "coinFeeRatio": member.coinFeeRatio,
|
| | | "agentReturnRatio": member.agentReturnRatio,
|
| | | "doingRatio": member.doingRatio,
|
| | | "profitParam": member.profitParam,
|
| | | "forceParam": member.forceParam
|
| | | });
|
| | | }
|
| | |
|
| | | form.on('submit(user-update-form-submit)', function (data) {
|
| | | febs.post(ctx + 'systemSetting/platformTradeSettingConfirm', data.field, function () {
|
| | | layer.closeAll();
|
| | | febs.alert.success('设置成功');
|
| | | $('#febs-user').find('#reset').click();
|
| | | });
|
| | | return false;
|
| | | });
|
| | | });
|
| | | </script> |