6 files added
4 files modified
| | |
| | | import com.xcong.excoin.common.entity.QueryRequest;
|
| | | import com.xcong.excoin.modules.documentary.dto.FollowTraderInfoDto;
|
| | | import com.xcong.excoin.modules.documentary.entity.FollowTraderInfoEntity;
|
| | | import com.xcong.excoin.modules.documentary.entity.FollowTraderLabelEntity;
|
| | | import com.xcong.excoin.modules.documentary.service.DocumentaryService;
|
| | | import com.xcong.excoin.modules.systemSetting.entity.PlatformBannerEntity;
|
| | |
|
| | | import lombok.RequiredArgsConstructor;
|
| | | import lombok.extern.slf4j.Slf4j;
|
| | |
| | | private final DocumentaryService documentaryService;
|
| | |
|
| | | /**
|
| | | * 标签---列表
|
| | | * @return
|
| | | */
|
| | | @GetMapping("traderLabelList")
|
| | | public FebsResponse traderLabelList(FollowTraderLabelEntity followTraderLabelEntity, QueryRequest request) {
|
| | | Map<String, Object> data = getDataTable(documentaryService.traderLabelList(followTraderLabelEntity, request));
|
| | | return new FebsResponse().success().data(data);
|
| | | }
|
| | | |
| | | /**
|
| | | * 标签---删除
|
| | | * @return
|
| | | */
|
| | | @GetMapping("traderLabelDelete/{id}")
|
| | | @ControllerEndpoint(operation = "标签---删除", exceptionMessage = "删除失败")
|
| | | public FebsResponse traderLabelDelete(@NotNull(message = "{required}") @PathVariable Long id) {
|
| | | return documentaryService.traderLabelDelete(id);
|
| | | }
|
| | | |
| | | /**
|
| | | * 标签---新增
|
| | | */
|
| | | @PostMapping("followLabelSetAdd")
|
| | | @ControllerEndpoint(operation = "标签---新增", exceptionMessage = "新增失败")
|
| | | public FebsResponse followLabelSetAdd(@Valid FollowTraderLabelEntity followTraderLabelEntity) {
|
| | | documentaryService.followLabelSetAdd(followTraderLabelEntity);
|
| | | return new FebsResponse().success();
|
| | | }
|
| | | |
| | | /**
|
| | | * 标签---修改
|
| | | */
|
| | | @PostMapping("followLabelSetUpdate")
|
| | | @ControllerEndpoint(operation = "标签---修改", exceptionMessage = "修改失败")
|
| | | public FebsResponse followLabelSetUpdate(@Valid FollowTraderLabelEntity followTraderLabelEntity) {
|
| | | documentaryService.followLabelSetUpdate(followTraderLabelEntity);
|
| | | return new FebsResponse().success();
|
| | | }
|
| | | |
| | | /**
|
| | | * 交易员申请---列表
|
| | | * @return
|
| | | */
|
| | |
| | | import com.xcong.excoin.common.entity.FebsConstant;
|
| | | import com.xcong.excoin.common.utils.FebsUtil;
|
| | | import com.xcong.excoin.modules.documentary.entity.FollowTraderInfoEntity;
|
| | | import com.xcong.excoin.modules.documentary.entity.FollowTraderLabelEntity;
|
| | | import com.xcong.excoin.modules.documentary.mapper.FollowTraderLabelMapper;
|
| | | import com.xcong.excoin.modules.documentary.service.DocumentaryService;
|
| | | import com.xcong.excoin.modules.member.entity.MemberEntity;
|
| | | import com.xcong.excoin.modules.systemSetting.entity.PlatformTradeSettingEntity;
|
| | |
|
| | | import lombok.RequiredArgsConstructor;
|
| | | @Controller("documentaryView")
|
| | |
| | |
|
| | | private final DocumentaryService documentaryService;
|
| | |
|
| | | private final FollowTraderLabelMapper followTraderLabelMapper;
|
| | | |
| | | /**
|
| | | * 标签设置
|
| | | * @return
|
| | | */
|
| | | @GetMapping("followLabelSet")
|
| | | @RequiresPermissions("followLabelSet:view")
|
| | | public String followLabelSet() {
|
| | | return FebsUtil.view("modules/documentary/followLabelSet");
|
| | | }
|
| | | |
| | | /**
|
| | | * 标签设置---修改
|
| | | */
|
| | | @GetMapping("followLabelSetUpdate/{id}")
|
| | | @RequiresPermissions("followLabelSetUpdate:update")
|
| | | public String followLabelSetUpdate(@PathVariable long id, Model model) {
|
| | | FollowTraderLabelEntity data = followTraderLabelMapper.selectById(id);
|
| | | model.addAttribute("member", data);
|
| | | return FebsUtil.view("modules/documentary/followLabelSetDetail");
|
| | | }
|
| | | |
| | | /**
|
| | | * 标签设置---新增
|
| | | */
|
| | | @GetMapping("followLabelSetAdd")
|
| | | @RequiresPermissions("followLabelSetAdd:add")
|
| | | public String noticeManageAdd() {
|
| | | return FebsUtil.view("modules/documentary/followLabelSetAdd");
|
| | | }
|
| | | |
| | | /**
|
| | | * 交易员申请
|
| | | * @return
|
New file |
| | |
| | | package com.xcong.excoin.modules.documentary.entity;
|
| | |
|
| | | import com.baomidou.mybatisplus.annotation.IdType;
|
| | | import com.baomidou.mybatisplus.annotation.TableId;
|
| | | import com.baomidou.mybatisplus.annotation.TableName;
|
| | | import com.xcong.excoin.common.entity.BaseEntity;
|
| | |
|
| | | 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.documentary.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.documentary.entity.FollowTraderLabelEntity;
|
| | |
|
| | | public interface FollowTraderLabelMapper extends BaseMapper<FollowTraderLabelEntity> {
|
| | |
|
| | | IPage<FollowTraderLabelEntity> findFollowTraderLabelEntitysInPage(Page<FollowTraderLabelEntity> page,
|
| | | @Param("record")FollowTraderLabelEntity followTraderLabelEntity);
|
| | |
|
| | | }
|
| | |
| | | import com.xcong.excoin.common.entity.QueryRequest;
|
| | | import com.xcong.excoin.modules.documentary.dto.FollowTraderInfoDto;
|
| | | import com.xcong.excoin.modules.documentary.entity.FollowTraderInfoEntity;
|
| | | import com.xcong.excoin.modules.documentary.entity.FollowTraderLabelEntity;
|
| | |
|
| | | public interface DocumentaryService extends IService<FollowTraderInfoEntity> {
|
| | |
|
| | |
| | |
|
| | | FebsResponse traderGetFull(@NotNull(message = "{required}") Long id);
|
| | |
|
| | | IPage<FollowTraderLabelEntity> traderLabelList(FollowTraderLabelEntity followTraderLabelEntity, QueryRequest request);
|
| | |
|
| | | FebsResponse traderLabelDelete(@NotNull(message = "{required}") Long id);
|
| | |
|
| | | void followLabelSetAdd(@Valid FollowTraderLabelEntity followTraderLabelEntity);
|
| | |
|
| | | void followLabelSetUpdate(@Valid FollowTraderLabelEntity followTraderLabelEntity);
|
| | |
|
| | | }
|
| | |
| | | import com.xcong.excoin.common.entity.QueryRequest;
|
| | | import com.xcong.excoin.modules.documentary.dto.FollowTraderInfoDto;
|
| | | import com.xcong.excoin.modules.documentary.entity.FollowTraderInfoEntity;
|
| | | import com.xcong.excoin.modules.documentary.entity.FollowTraderLabelEntity;
|
| | | import com.xcong.excoin.modules.documentary.entity.FollowTraderProfitInfoEntity;
|
| | | import com.xcong.excoin.modules.documentary.mapper.FollowTraderInfoMapper;
|
| | | import com.xcong.excoin.modules.documentary.mapper.FollowTraderLabelMapper;
|
| | | import com.xcong.excoin.modules.documentary.mapper.FollowTraderProfitInfoMapper;
|
| | | import com.xcong.excoin.modules.documentary.service.DocumentaryService;
|
| | | import com.xcong.excoin.modules.member.entity.MemberAuthenticationEntity;
|
| | |
| | | public class DocumentaryServiceImpl extends ServiceImpl<FollowTraderInfoMapper, FollowTraderInfoEntity> implements DocumentaryService {
|
| | |
|
| | | private final FollowTraderInfoMapper followTraderInfoMapper;
|
| | | |
| | | private final FollowTraderLabelMapper followTraderLabelMapper;
|
| | |
|
| | | private final MemberAuthenticationMapper memberAuthenticationMapper;
|
| | |
|
| | |
| | | return new FebsResponse().success();
|
| | | }
|
| | |
|
| | | @Override
|
| | | public IPage<FollowTraderLabelEntity> traderLabelList(FollowTraderLabelEntity followTraderLabelEntity,
|
| | | QueryRequest request) {
|
| | | Page<FollowTraderLabelEntity> page = new Page<>(request.getPageNum(), request.getPageSize());
|
| | | IPage<FollowTraderLabelEntity> followTraderLabelEntitys = followTraderLabelMapper.findFollowTraderLabelEntitysInPage(page, followTraderLabelEntity);
|
| | | return followTraderLabelEntitys;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public FebsResponse traderLabelDelete(@NotNull(message = "{required}") Long id) {
|
| | | followTraderLabelMapper.deleteById(id);
|
| | | return new FebsResponse().success();
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void followLabelSetAdd(@Valid FollowTraderLabelEntity followTraderLabelEntity) {
|
| | | |
| | | followTraderLabelMapper.insert(followTraderLabelEntity);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void followLabelSetUpdate(@Valid FollowTraderLabelEntity followTraderLabelEntity) {
|
| | | followTraderLabelMapper.updateById(followTraderLabelEntity);
|
| | | }
|
| | |
|
| | | }
|
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.documentary.mapper.FollowTraderLabelMapper">
|
| | |
|
| | | <select id="findFollowTraderLabelEntitysInPage" resultType="com.xcong.excoin.modules.documentary.entity.FollowTraderLabelEntity">
|
| | | select * from follow_trader_label s
|
| | | </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">
|
| | | <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>
|
| | | <!-- 表格操作栏 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: 'title', type: null},
|
| | | tableIns
|
| | | ;
|
| | |
|
| | | form.render();
|
| | |
|
| | | // 表格初始化
|
| | | initTable();
|
| | |
|
| | | // 初始化表格操作栏各个按钮功能
|
| | | table.on('tool(userTable)', function (obj) {
|
| | | var data = obj.data,
|
| | | layEvent = obj.event;
|
| | | |
| | | if (layEvent === 'edit') {
|
| | | febs.modal.open('修改', 'modules/documentary/followLabelSetUpdate/' + data.id, {
|
| | | 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 + 'documentary/traderLabelDelete/' + 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.modal.open('新增', 'modules/documentary/followLabelSetAdd/', {
|
| | | btn: ['提交', '取消'],
|
| | | yes: function (index, layero) {
|
| | | $('#user-add').find('#submit').trigger('click');
|
| | | },
|
| | | btn2: function () {
|
| | | layer.closeAll();
|
| | | }
|
| | | });
|
| | | });
|
| | |
|
| | | |
| | | // 获取查询参数
|
| | | function getQueryParams() {
|
| | | return {};
|
| | | }
|
| | | |
| | | function initTable() {
|
| | | tableIns = febs.table.init({
|
| | | elem: $view.find('table'),
|
| | | id: 'userTable',
|
| | | url: ctx + 'documentary/traderLabelList',
|
| | | cols: [[
|
| | | {field: 'id', title: '', minWidth: 10,align:'center'},
|
| | | {field: 'labels', title: '更新内容', minWidth: 120,align:'center'},
|
| | | {title: '操作', toolbar: '#user-option', minWidth: 140, fixed : 'right'}
|
| | | ]]
|
| | | });
|
| | | }
|
| | | })
|
| | | </script> |
New file |
| | |
| | | <style>
|
| | | #user-add {
|
| | | padding: 20px 25px 25px 0;
|
| | | }
|
| | |
|
| | | #user-add .layui-treeSelect .ztree li a, .ztree li span {
|
| | | margin: 0 0 2px 3px !important;
|
| | | }
|
| | | #user-add #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-add">
|
| | | <form class="layui-form" action="" lay-filter="user-add-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">
|
| | | </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="labels" lay-verify="range|labels" |
| | | autocomplete="off" class="layui-input" >
|
| | | </div>
|
| | | </div>
|
| | | <div class="layui-form-item febs-hide">
|
| | | <button class="layui-btn" lay-submit="" lay-filter="user-add-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,
|
| | | $view = $('#user-add'),
|
| | | validate = layui.validate,
|
| | | _deptTree;
|
| | |
|
| | | form.render();
|
| | |
|
| | | formSelects.render();
|
| | |
|
| | | form.on('submit(user-add-form-submit)', function (data) {
|
| | | febs.post(ctx + 'documentary/followLabelSetAdd', data.field, function () {
|
| | | layer.closeAll();
|
| | | febs.alert.success('新增成功');
|
| | | $('#febs-user').find('#reset').click();
|
| | | });
|
| | | return false;
|
| | | });
|
| | | });
|
| | | </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="labels" data-th-id="${member.labels}" lay-verify="range|labels" |
| | | 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", {
|
| | | "labels": member.labels,
|
| | | "id": member.id
|
| | | });
|
| | | }
|
| | |
|
| | | form.on('submit(user-update-form-submit)', function (data) {
|
| | | febs.post(ctx + 'documentary/followLabelSetUpdate', data.field, function () {
|
| | | layer.closeAll();
|
| | | febs.alert.success('设置成功');
|
| | | $('#febs-user').find('#reset').click();
|
| | | });
|
| | | return false;
|
| | | });
|
| | | });
|
| | | </script> |