15 files modified
3 files added
| | |
| | | log.info("/ /` / / \\ | |\\/| | |_) | | | |_ | | | |_ "); |
| | | log.info("\\_\\_, \\_\\_/ |_| | |_| |_|__ |_|__ |_| |_|__ "); |
| | | log.info(" "); |
| | | log.info("KSS-BACK 权限系统启动完毕,地址:{}", url); |
| | | log.info("IGT 权限系统启动完毕,地址:{}", url); |
| | | |
| | | boolean auto = febsProperties.isAutoOpenBrowser(); |
| | | if (auto && StringUtils.equalsIgnoreCase(active, FebsConstant.DEVELOP)) { |
| | |
| | | package cc.mrbird.febs.dapp.controller; |
| | | |
| | | import cc.mrbird.febs.common.annotation.ControllerEndpoint; |
| | | import cc.mrbird.febs.common.controller.BaseController; |
| | | import cc.mrbird.febs.common.entity.FebsResponse; |
| | | import cc.mrbird.febs.common.entity.QueryRequest; |
| | |
| | | import cc.mrbird.febs.dapp.entity.DappMemberEntity; |
| | | import cc.mrbird.febs.dapp.entity.DappTransferRecordEntity; |
| | | import cc.mrbird.febs.dapp.service.DappMemberService; |
| | | import cc.mrbird.febs.dapp.service.DappSystemService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import java.math.BigDecimal; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | |
| | | public class MemberController extends BaseController { |
| | | |
| | | private final DappMemberService dappMemberService; |
| | | private final DappSystemService dappSystemService; |
| | | |
| | | @RequestMapping(value = "/list") |
| | | public FebsResponse list(DappMemberEntity member, QueryRequest request) { |
| | |
| | | dappMemberService.setNewestPrice(priceSettingDto); |
| | | return new FebsResponse().success(); |
| | | } |
| | | |
| | | @GetMapping(value = "/findDicByType/{type}") |
| | | public FebsResponse findDicByType(@PathVariable("type") String type) { |
| | | return new FebsResponse().success().data(dappSystemService.findDataDicByType(type)); |
| | | } |
| | | |
| | | /** |
| | | * 字典表设置 |
| | | * @param map |
| | | * @return |
| | | */ |
| | | @PostMapping(value = "/levelSystemSetting") |
| | | public FebsResponse levelSystemSetting(@RequestBody Map<String, Object> map) { |
| | | dappSystemService.levelSystemSetting(map); |
| | | return new FebsResponse().success().message("设置成功"); |
| | | } |
| | | |
| | | /** |
| | | * 挂机方案设置启用 |
| | | */ |
| | | @GetMapping("enableOnHook/{id}") |
| | | @ControllerEndpoint(operation = "挂机方案设置启用", exceptionMessage = "设置失败") |
| | | public FebsResponse enableOnHook(@NotNull(message = "{required}") @PathVariable Long id) { |
| | | return dappSystemService.enableOnHook(id); |
| | | } |
| | | |
| | | /** |
| | | * 挂机方案设置禁用 |
| | | */ |
| | | @GetMapping("disableOnHook/{id}") |
| | | @ControllerEndpoint(operation = "挂机方案设置禁用", exceptionMessage = "设置失败") |
| | | public FebsResponse disableOnHook(@NotNull(message = "{required}") @PathVariable Long id) { |
| | | return dappSystemService.disableOnHook(id); |
| | | } |
| | | } |
| | |
| | | model.addAttribute("newestPrice", price); |
| | | return FebsUtil.view("dapp/newest-price-setting"); |
| | | } |
| | | |
| | | /** |
| | | * 会员等级设置 |
| | | * @return |
| | | */ |
| | | @GetMapping("memberLevelSet") |
| | | @RequiresPermissions("memberLevelSet:view") |
| | | public String memberLevelSet() { |
| | | return FebsUtil.view("dapp/member-level-set"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 挂机方案设置 |
| | | * @return |
| | | */ |
| | | @GetMapping("onHookPlanSet") |
| | | @RequiresPermissions("onHookPlanSet:view") |
| | | public String onHookPlanSet() { |
| | | return FebsUtil.view("dapp/on-hook-plan-set"); |
| | | } |
| | | } |
| | |
| | | package cc.mrbird.febs.dapp.entity; |
| | | |
| | | import cc.mrbird.febs.common.entity.BaseEntity; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | |
| | | private String sourceFlag; |
| | | |
| | | private String symbol; |
| | | |
| | | @TableField(exist = false) |
| | | private String address; |
| | | } |
| New file |
| | |
| | | package cc.mrbird.febs.dapp.enumerate; |
| | | |
| | | import lombok.Getter; |
| | | |
| | | @Getter |
| | | public enum DataDictionaryEnum { |
| | | /** |
| | | * 挂机方案 |
| | | * value格式:{"amount":"0","multipleTimes":"2","state":2} |
| | | * multiple:倍数 |
| | | * amount:金额 |
| | | * state:是否启用 1:开启2:禁用 |
| | | */ |
| | | PLAN_A("ONHOOK_PLAN","PLAN_A"), |
| | | PLAN_B("ONHOOK_PLAN","PLAN_B"), |
| | | PLAN_C("ONHOOK_PLAN","PLAN_C"), |
| | | PLAN_D("ONHOOK_PLAN","PLAN_D"), |
| | | PLAN_E("ONHOOK_PLAN","PLAN_E"), |
| | | |
| | | PLAN_F("ONHOOK_PLAN","PLAN_F"), |
| | | PLAN_G("ONHOOK_PLAN","PLAN_G"), |
| | | PLAN_H("ONHOOK_PLAN","PLAN_H"), |
| | | PLAN_I("ONHOOK_PLAN","PLAN_I"), |
| | | PLAN_J("ONHOOK_PLAN","PLAN_J"), |
| | | |
| | | |
| | | /** |
| | | * 佣金等级 |
| | | * value格式:{"hangingRevenue":"2","profitSharing":"0","runningCommission":"0","promotionConditions":"0"} |
| | | * "hangingRevenue":(挂机收益) |
| | | * "profitSharing":(盈利分成) |
| | | * "runningCommission":(流水佣金) |
| | | * "promotionConditions":(晋升条件,上一级代理(3个)) |
| | | */ |
| | | LEVEL_GP("COMMISSION_LEVEL","LEVEL_GP"), |
| | | LEVEL_SP("COMMISSION_LEVEL","LEVEL_SP"), |
| | | LEVEL_BP("COMMISSION_LEVEL","LEVEL_BP"), |
| | | LEVEL_GIB("COMMISSION_LEVEL","LEVEL_GIB"), |
| | | LEVEL_AIB("COMMISSION_LEVEL","LEVEL_AIB"), |
| | | LEVEL_CIB("COMMISSION_LEVEL","LEVEL_CIB"), |
| | | LEVEL_FIB("COMMISSION_LEVEL","LEVEL_FIB"), |
| | | LEVEL_IB("COMMISSION_LEVEL","LEVEL_IB"), |
| | | LEVEL_MB("COMMISSION_LEVEL","LEVEL_MB"); |
| | | |
| | | |
| | | private String type; |
| | | |
| | | private String code; |
| | | |
| | | DataDictionaryEnum(String type, String code) { |
| | | this.type = type; |
| | | this.code = code; |
| | | } |
| | | } |
| | |
| | | package cc.mrbird.febs.dapp.service; |
| | | |
| | | import cc.mrbird.febs.common.entity.FebsResponse; |
| | | import cc.mrbird.febs.dapp.dto.SystemDto; |
| | | import cc.mrbird.febs.dapp.entity.DappMineDataEntity; |
| | | import cc.mrbird.febs.dapp.entity.DappPriceRecordEntity; |
| | | import cc.mrbird.febs.dapp.entity.DataDictionaryCustom; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | |
| | | void tfcNewPrice(); |
| | | |
| | | List<DappPriceRecordEntity> findPriceListIn24H(); |
| | | |
| | | List<DataDictionaryCustom> findDataDicByType(String type); |
| | | |
| | | void levelSystemSetting(Map<String, Object> map); |
| | | |
| | | FebsResponse enableOnHook(Long id); |
| | | |
| | | FebsResponse disableOnHook(Long id); |
| | | } |
| | |
| | | package cc.mrbird.febs.dapp.service.impl; |
| | | |
| | | import cc.mrbird.febs.common.contants.AppContants; |
| | | import cc.mrbird.febs.common.entity.FebsResponse; |
| | | import cc.mrbird.febs.common.utils.LoginUserUtil; |
| | | import cc.mrbird.febs.common.utils.RedisUtils; |
| | | import cc.mrbird.febs.dapp.chain.ChainEnum; |
| | |
| | | import cn.hutool.core.date.DateTime; |
| | | import cn.hutool.core.date.DateUnit; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import cn.hutool.core.util.RandomUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | }); |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | | public List<DataDictionaryCustom> findDataDicByType(String type) { |
| | | return dataDictionaryCustomMapper.selectDicByType(type); |
| | | } |
| | | |
| | | @Override |
| | | public void levelSystemSetting(Map<String, Object> map) { |
| | | for (Map.Entry<String, Object> entry : map.entrySet()) { |
| | | if (entry.getValue() instanceof String) { |
| | | dataDictionaryCustomMapper.updateDicValueByTypeAndCode(null, entry.getKey(), (String) entry.getValue()); |
| | | } else { |
| | | List<LinkedHashMap<String, Object>> value = (List<LinkedHashMap<String, Object>>) entry.getValue(); |
| | | |
| | | for (LinkedHashMap<String, Object> dic : value) { |
| | | String type = (String) dic.get("type"); |
| | | String code = (String) dic.get("code"); |
| | | String dataValue = (String) dic.get("value"); |
| | | dataDictionaryCustomMapper.updateDicValueByTypeAndCode(type, code, dataValue); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public FebsResponse enableOnHook(Long id) { |
| | | DataDictionaryCustom dataDictionaryCustom = dataDictionaryCustomMapper.selectById(id); |
| | | if (ObjectUtil.isEmpty(dataDictionaryCustom)) { |
| | | return new FebsResponse().fail().message("网络繁忙,请刷新当前页面"); |
| | | } |
| | | String type = dataDictionaryCustom.getType(); |
| | | String code = dataDictionaryCustom.getCode(); |
| | | String dicValue = dataDictionaryCustom.getValue(); |
| | | cn.hutool.json.JSONObject jsonObject = JSONUtil.parseObj(dicValue); |
| | | jsonObject.set("state",1); |
| | | dataDictionaryCustomMapper.updateDicValueByTypeAndCode(type, code, jsonObject.toString()); |
| | | return new FebsResponse().success(); |
| | | } |
| | | |
| | | @Override |
| | | public FebsResponse disableOnHook(Long id) { |
| | | DataDictionaryCustom dataDictionaryCustom = dataDictionaryCustomMapper.selectById(id); |
| | | if (ObjectUtil.isEmpty(dataDictionaryCustom)) { |
| | | return new FebsResponse().fail().message("网络繁忙,请刷新当前页面"); |
| | | } |
| | | String type = dataDictionaryCustom.getType(); |
| | | String code = dataDictionaryCustom.getCode(); |
| | | String dicValue = dataDictionaryCustom.getValue(); |
| | | cn.hutool.json.JSONObject jsonObject = JSONUtil.parseObj(dicValue); |
| | | jsonObject.set("state",2); |
| | | dataDictionaryCustomMapper.updateDicValueByTypeAndCode(type, code, jsonObject.toString()); |
| | | return new FebsResponse().success(); |
| | | } |
| | | } |
| | |
| | | username: ct_test |
| | | password: 123456 |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | url: jdbc:mysql://120.27.238.55:3306/db_tfc?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2b8 |
| | | url: jdbc:mysql://120.27.238.55:3306/db_igt?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2b8 |
| | | |
| | | redis: |
| | | # Redis数据库索引(默认为 0) |
| | |
| | | |
| | | spring: |
| | | profiles: |
| | | active: dev |
| | | active: test |
| | | |
| | | thymeleaf: |
| | | cache: false |
| | |
| | | select * from dapp_transfer_record |
| | | <where> |
| | | <if test="record.address != '' and record.address != null"> |
| | | and address=#{record.address} |
| | | and (from_address = #{record.address} or to_address = #{record.address}) |
| | | </if> |
| | | </where> |
| | | order by create_time desc |
| | |
| | | <html xmlns:th="http://www.thymeleaf.org"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title>ANT-LAB 权限系统</title> |
| | | <title>IGT 权限系统</title> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | |
| | | <html xmlns:th="http://www.thymeleaf.org"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title>ANT-LAB 权限系统</title> |
| | | <title>IGT 权限系统</title> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | |
| | | <html xmlns:th="http://www.thymeleaf.org"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title>ANT-LAB 权限系统</title> |
| | | <title>IGT 权限系统</title> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| New file |
| | |
| | | <div class="layui-fluid layui-anim febs-anim" id="member-level-set" lay-title="会员级别设置"> |
| | | <div class="layui-row layui-col-space8 febs-container"> |
| | | <form class="layui-form" action="" lay-filter="member-level-set-form"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body"> |
| | | <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief"> |
| | | <ul class="layui-tab-title"> |
| | | <li class="layui-this">级别设置</li> |
| | | </ul> |
| | | <div class="layui-tab-content"> |
| | | <div class="layui-tab-item layui-show"> |
| | | <table id="levelSetTable" lay-filter="levelSetTable"></table> |
| | | <div class="layui-word-aux">注意:</div> |
| | | <div class="layui-word-aux">1、修改数据,直接点击对应单元格,输入修改内容,点击保存即可</div> |
| | | <div class="layui-word-aux">2、级别顺序:MB->IB->FIB->CIB->AIB->GIB->BP->SP->GP</div> |
| | | <div class="layui-word-aux">3、晋升条件:多少个上一级别才能晋升</div> |
| | | <div class="layui-word-aux">4、流水佣金:本团队流水乘以对应级别的佣金百分比(1%-5%)</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-card-footer"> |
| | | <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="member-level-set-form-submit" id="submit">保存</button> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | <style> |
| | | .layui-form-label { |
| | | width: 120px; |
| | | } |
| | | |
| | | .layui-form-item .layui-input-block { |
| | | margin-left: 150px; |
| | | } |
| | | |
| | | .layui-table-form .layui-form-item { |
| | | margin-bottom: 20px !important; |
| | | } |
| | | </style> |
| | | <script data-th-inline="javascript" type="text/javascript"> |
| | | layui.use(['dropdown', 'jquery', 'validate', 'febs', 'form', 'eleTree', 'table'], function () { |
| | | var $ = layui.jquery, |
| | | febs = layui.febs, |
| | | form = layui.form, |
| | | table = layui.table, |
| | | validate = layui.validate, |
| | | $view = $('#member-level-set') |
| | | , levelSetArr; |
| | | |
| | | form.verify(validate); |
| | | form.render(); |
| | | |
| | | table.render({ |
| | | elem: '#levelSetTable' |
| | | ,cols: [[ //表头 |
| | | {field: 'description', title: '等级',} |
| | | ,{field: 'hangingRevenue', title: '挂机收益(%)', edit:'text'} |
| | | ,{field: 'profitSharing', title: '盈利分成(%)', edit:'text'} |
| | | ,{field: 'runningCommission', title: '流水佣金(%)', edit:'text'} |
| | | ,{field: 'promotionConditions', title: '晋升条件', edit:'text'} |
| | | ,{field: 'type', title: '类型', hide:'true'} |
| | | ,{field: 'code', title: '编码', hide:'true'} |
| | | ]] |
| | | ,data: [] |
| | | }); |
| | | table.on('edit(levelSetTable)', function(obj){ |
| | | var value = obj.value //得到修改后的值 |
| | | ,data = obj.data //得到所在行所有键值 |
| | | ,field = obj.field; //得到字段 |
| | | for (let i = 0; i < levelSetArr.length; i++) { |
| | | if (levelSetArr[i].code === data.code) { |
| | | var valueData = {}; |
| | | valueData.hangingRevenue = data.hangingRevenue; |
| | | valueData.profitSharing = data.profitSharing; |
| | | valueData.runningCommission = data.runningCommission; |
| | | valueData.promotionConditions = data.promotionConditions; |
| | | levelSetArr[i].value = JSON.stringify(valueData); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | dicDataReq("COMMISSION_LEVEL"); |
| | | function dicDataReq(type) { |
| | | $.get(ctx + 'member/findDicByType/' + type, function (r) { |
| | | if (r.code === 200) { |
| | | let levelList = r.data; |
| | | if ("COMMISSION_LEVEL" == type) { |
| | | for (let i = 0; i < levelList.length; i++) { |
| | | levelList[i].hangingRevenue = JSON.parse(levelList[i].value).hangingRevenue; |
| | | levelList[i].profitSharing = JSON.parse(levelList[i].value).profitSharing; |
| | | levelList[i].runningCommission = JSON.parse(levelList[i].value).runningCommission; |
| | | levelList[i].promotionConditions = JSON.parse(levelList[i].value).promotionConditions; |
| | | } |
| | | levelSetArr = levelList; |
| | | console.log(levelList); |
| | | table.reload('levelSetTable', { |
| | | data : levelList |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | form.on('submit(member-level-set-form-submit)', function (data) { |
| | | data.field.levelSetTable = levelSetArr; |
| | | $.ajax({ |
| | | 'url':ctx + 'member/levelSystemSetting', |
| | | 'type':'post', |
| | | 'dataType':'json', |
| | | 'headers' : {'Content-Type' : 'application/json;charset=utf-8'}, |
| | | 'traditional': true, |
| | | 'data':JSON.stringify(data.field), |
| | | 'success':function (data) { |
| | | if (data.code == 200) { |
| | | febs.alert.success(data.message); |
| | | } |
| | | }, |
| | | 'error':function () { |
| | | febs.alert.warn('服务器繁忙'); |
| | | } |
| | | }) |
| | | return false; |
| | | }); |
| | | }); |
| | | </script> |
| New file |
| | |
| | | <div class="layui-fluid layui-anim febs-anim" id="on-hook-plan-set" lay-title="挂机方案设置"> |
| | | <div class="layui-row layui-col-space8 febs-container"> |
| | | <form class="layui-form" action="" lay-filter="on-hook-plan-set-form"> |
| | | <div class="layui-card"> |
| | | <div class="layui-card-body"> |
| | | <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief"> |
| | | <ul class="layui-tab-title"> |
| | | <li class="layui-this">挂机方案设置</li> |
| | | </ul> |
| | | <div class="layui-tab-content"> |
| | | <div class="layui-tab-item layui-show"> |
| | | <table id="onHookPlanTable" lay-filter="onHookPlanTable"></table> |
| | | <div class="layui-word-aux">注意:</div> |
| | | <div class="layui-word-aux">1、修改数据,直接点击对应单元格,输入修改内容,点击保存即可</div> |
| | | <div class="layui-word-aux">2、是否启用,点击之后即可设置,无需点击保存</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-card-footer"> |
| | | <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="on-hook-plan-set-form-submit" id="submit">保存</button> |
| | | </div> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | <style> |
| | | .layui-form-label { |
| | | width: 120px; |
| | | } |
| | | |
| | | .layui-form-item .layui-input-block { |
| | | margin-left: 150px; |
| | | } |
| | | |
| | | .layui-table-form .layui-form-item { |
| | | margin-bottom: 20px !important; |
| | | } |
| | | </style> |
| | | <script type="text/html" id="isEnableSwitch"> |
| | | {{# if(d.state === 1) { }} |
| | | <input type="checkbox" value={{d.id}} lay-text="启用|禁用" checked lay-skin="switch" lay-filter="isEnableSwitch"> |
| | | {{# } else { }} |
| | | <input type="checkbox" value={{d.id}} lay-text="启用|禁用" lay-skin="switch" lay-filter="isEnableSwitch"> |
| | | {{# } }} |
| | | </script> |
| | | <script data-th-inline="javascript" type="text/javascript"> |
| | | layui.use(['dropdown', 'jquery', 'validate', 'febs', 'form', 'eleTree', 'table'], function () { |
| | | var $ = layui.jquery, |
| | | febs = layui.febs, |
| | | form = layui.form, |
| | | table = layui.table, |
| | | validate = layui.validate, |
| | | $view = $('#on-hook-plan-set') |
| | | , planSetArr; |
| | | |
| | | form.verify(validate); |
| | | form.render(); |
| | | |
| | | table.render({ |
| | | elem: '#onHookPlanTable' |
| | | ,cols: [[ //表头 |
| | | {field: 'description', title: '挂机方案',} |
| | | ,{field: 'multipleTimes', title: '倍数', edit:'text'} |
| | | ,{field: 'amount', title: '金额', edit:'text'} |
| | | ,{field: 'state', title: '是否启用',templet: '#isEnableSwitch'} |
| | | ,{field: 'type', title: '类型', hide:'true'} |
| | | ,{field: 'code', title: '编码', hide:'true'} |
| | | ]] |
| | | ,data: [] |
| | | }); |
| | | table.on('edit(onHookPlanTable)', function(obj){ |
| | | let value = obj.value //得到修改后的值 |
| | | ,data = obj.data //得到所在行所有键值 |
| | | ,field = obj.field; //得到字段 |
| | | for (let i = 0; i < planSetArr.length; i++) { |
| | | if (planSetArr[i].code === data.code) { |
| | | let planData = {}; |
| | | planData.multipleTimes = data.multipleTimes; |
| | | planData.amount = data.amount; |
| | | planData.state = data.state; |
| | | planSetArr[i].value = JSON.stringify(planData); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | dicDataReq("ONHOOK_PLAN"); |
| | | function dicDataReq(type) { |
| | | $.get(ctx + 'member/findDicByType/' + type, function (r) { |
| | | if (r.code === 200) { |
| | | let planList = r.data; |
| | | if ("ONHOOK_PLAN" == type) { |
| | | for (let i = 0; i < planList.length; i++) { |
| | | planList[i].multipleTimes = JSON.parse(planList[i].value).multipleTimes; |
| | | planList[i].amount = JSON.parse(planList[i].value).amount; |
| | | planList[i].state = JSON.parse(planList[i].value).state; |
| | | } |
| | | planSetArr = planList; |
| | | table.reload('onHookPlanTable', { |
| | | data : planList |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | //滑动按钮 |
| | | form.on('switch(isEnableSwitch)', function (data) { |
| | | if (data.elem.checked) { |
| | | enableOnHook(data.value); |
| | | } else { |
| | | disableOnHook(data.value); |
| | | } |
| | | }) |
| | | function enableOnHook(id) { |
| | | febs.get(ctx + 'member/enableOnHook/' + id, null, function () { |
| | | febs.alert.success('设置成功'); |
| | | }); |
| | | } |
| | | function disableOnHook(id) { |
| | | febs.get(ctx + 'member/disableOnHook/' + id, null, function () { |
| | | febs.alert.success('设置成功'); |
| | | }); |
| | | } |
| | | |
| | | form.on('submit(on-hook-plan-set-form-submit)', function (data) { |
| | | data.field.onHookPlanTable = planSetArr; |
| | | $.ajax({ |
| | | 'url':ctx + 'member/levelSystemSetting', |
| | | 'type':'post', |
| | | 'dataType':'json', |
| | | 'headers' : {'Content-Type' : 'application/json;charset=utf-8'}, |
| | | 'traditional': true, |
| | | 'data':JSON.stringify(data.field), |
| | | 'success':function (data) { |
| | | if (data.code == 200) { |
| | | febs.alert.success(data.message); |
| | | } |
| | | }, |
| | | 'error':function () { |
| | | febs.alert.warn('服务器繁忙'); |
| | | } |
| | | }) |
| | | return false; |
| | | }); |
| | | }); |
| | | </script> |
| | |
| | | <div class="layui-side-scroll"> |
| | | <div class="layui-logo" style="cursor: pointer"> |
| | | <img data-th-src="@{febs/images/logo.png}"> |
| | | <span>ANT-LAB 权限系统</span> |
| | | <span>IGT 权限系统</span> |
| | | </div> |
| | | <script |
| | | type="text/html" |
| | |
| | | <html xmlns:th="http://www.thymeleaf.org"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title>ANT-LAB 权限系统</title> |
| | | <title>IGT 权限系统</title> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | |
| | | <div class="layui-container"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-xs12 layui-col-lg4 layui-col-lg-offset4 febs-tc"> |
| | | <div class="layui-logo"><span><b>ANT-LAB</b> 权限系统</span></div> |
| | | <div class="layui-logo"><span><b>IGT</b> 权限系统</span></div> |
| | | </div> |
| | | <div class="layui-col-xs12 layui-col-lg4 layui-col-lg-offset4" id="login-div"> |
| | | <div class="layui-form" lay-filter="login-form"> |
| | |
| | | xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title>ANT-LAB 权限系统</title> |
| | | <title>IGT 权限系统</title> |
| | | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |