1 files added
12 files modified
| | |
| | | private static final String URL = "http://www.qf106.com/sms.aspx"; |
| | | private static final String ID = "16880"; |
| | | private static final String ACCOUNT = "ywg"; |
| | | private static final String PASSWORD = "ywg123456"; |
| | | private static final String PASSWORD = "1!qaz2@wsx"; |
| | | |
| | | |
| | | /** |
| | |
| | | return new com.aliyun.dysmsapi20170525.Client(config); |
| | | } |
| | | |
| | | private static final String SIGNNAME = "钱阿姨"; |
| | | private static final String TEMPLATECODE = "SMS_251041117"; |
| | | private static final String SIGNNAME = "药王谷铺子"; |
| | | private static final String TEMPLATECODE = "SMS_465075162"; |
| | | public static boolean sendALiYun(String phone,String TemplateParam){ |
| | | com.aliyun.dysmsapi20170525.Client client = null; |
| | | try { |
| | |
| | | /** |
| | | * 代理-等级选择Option |
| | | */ |
| | | @GetMapping("getRollperkOption/tree") |
| | | @ControllerEndpoint(exceptionMessage = "获取等级失败") |
| | | public List<AdminAgentLevelOptionTreeVo> getRollperkOption() { |
| | | return mallMemberService.getRollperkOption(); |
| | | } |
| | | |
| | | /** |
| | | * 代理-等级选择Option |
| | | */ |
| | | @GetMapping("agentLevelOption/tree") |
| | | @ControllerEndpoint(exceptionMessage = "获取等级失败") |
| | | public List<AdminAgentLevelOptionTreeVo> agentLevelOption() { |
| | |
| | | } |
| | | |
| | | /** |
| | | * 拨付卷 |
| | | */ |
| | | @PostMapping("rollperkSetUpdate") |
| | | @ControllerEndpoint(operation = "拨付卷", exceptionMessage = "操作失败") |
| | | public FebsResponse rollperkSetUpdate(@Valid AgentLevelSetUpdateDto agentLevelSetUpdateDto) { |
| | | return mallMemberService.rollperkSetUpdate(agentLevelSetUpdateDto); |
| | | } |
| | | |
| | | /** |
| | | * 奖励设置-列表 |
| | | * |
| | | * @param rankAwardDto |
| | |
| | | |
| | | // 发送手机验证码 |
| | | if (AppContants.ACCOUNT_TYPE_MOBILE.equals(type)) { |
| | | boolean result = Sms106Send.sendVerifyCode(account, code.toString(), 2); |
| | | // boolean result = Sms106Send.sendVerifyCode(account, code.toString(), 2); |
| | | boolean result = ZzSmsSend.sendALiYun(account, code.toString()); |
| | | // boolean result = ZzSmsSend.sendVerifyCode(account, code.toString(), 2); |
| | | if (result) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | // 发送手机验证码 |
| | | if (AppContants.ACCOUNT_TYPE_MOBILE.equals(type)) { |
| | | |
| | | boolean result = Sms106Send.sendVerifyCode(account, code.toString(), 2); |
| | | // boolean result = ZzSmsSend.sendALiYun(account, code.toString()); |
| | | // boolean result = Sms106Send.sendVerifyCode(account, code.toString(), 2); |
| | | boolean result = ZzSmsSend.sendALiYun(account, code.toString()); |
| | | if (result) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | boolean flag = redisUtils.set(AppContants.VERIFY_CODE_PREFIX + account, code, 120); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 卷-设置卷-拨付卷 |
| | | * @param id |
| | | * @param model |
| | | * @return |
| | | */ |
| | | @GetMapping("rollPerkSet/{id}") |
| | | @RequiresPermissions("rollPerkSet:update") |
| | | public String rollPerkSet(@PathVariable long id, Model model) { |
| | | AdminAgentLevelSetInfoVo data = new AdminAgentLevelSetInfoVo(); |
| | | data.setId(id);//会员memberID |
| | | model.addAttribute("rollperkSet", data); |
| | | return FebsUtil.view("modules/mallMember/rollperkSet"); |
| | | } |
| | | |
| | | /** |
| | | * 奖励设置-列表 |
| | | * @return |
| | | */ |
| | |
| | | AdminRankAwardUpdateInfoVo getRankAwardUpdateInfoById(@Param("id")long id); |
| | | |
| | | int updateDicValueByTypeAndCode(@Param("type") String type, @Param("code") String code, @Param("value") String value); |
| | | |
| | | List<AdminAgentLevelOptionTreeVo> getRollperkOption(); |
| | | } |
| | |
| | | package cc.mrbird.febs.mall.mapper; |
| | | |
| | | import cc.mrbird.febs.mall.entity.MallAgentRecord; |
| | | import cc.mrbird.febs.mall.vo.AdminAgentLevelSetInfoVo; |
| | | import cc.mrbird.febs.mall.vo.ApiMallAgentRecordVo; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | |
| | | ApiMallAgentRecordVo selectApiMallAgentRecordVoByMemberIdAndState(@Param("memberId")Long memberId, @Param("state")Integer applyIng); |
| | | |
| | | List<MallAgentRecord> selectByCity(@Param("city")String city); |
| | | |
| | | AdminAgentLevelSetInfoVo getRollPerkInfo(); |
| | | } |
| | |
| | | FebsResponse agentLevelUpdate(AgentLevelUpdateDto agentLevelUpdateDto); |
| | | |
| | | List<AdminAgentLevelOptionTreeVo> getAgentLevelOption(); |
| | | List<AdminAgentLevelOptionTreeVo> getRollperkOption(); |
| | | |
| | | IPage<AdminAgentMemberVo> agentChild(QueryRequest request, MallMember mallMember); |
| | | |
| | |
| | | AdminAgentLevelSetInfoVo getAgentLevelSetInfoByMemberId(long id); |
| | | |
| | | FebsResponse agentLevelSetUpdate(AgentLevelSetUpdateDto agentLevelSetUpdateDto); |
| | | FebsResponse rollperkSetUpdate(AgentLevelSetUpdateDto agentLevelSetUpdateDto); |
| | | |
| | | FebsResponse resetPwd(Long id); |
| | | |
| | |
| | | public class AdminMallMemberServiceImpl extends ServiceImpl<MallMemberMapper, MallMember> implements IAdminMallMemberService { |
| | | |
| | | private final MallMemberMapper mallMemberMapper; |
| | | private final MallRollPerkMapper mallRollPerkMapper; |
| | | |
| | | private final MallMemberWalletMapper mallMemberWalletMapper; |
| | | |
| | |
| | | return dataDictionaryCustomMapper.getAgentLevelOption(); |
| | | } |
| | | |
| | | @Override |
| | | public List<AdminAgentLevelOptionTreeVo> getRollperkOption() { |
| | | return dataDictionaryCustomMapper.getRollperkOption(); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public List<AdminAgentLevelOptionTreeVo> agentLevelOption() { |
| | |
| | | } |
| | | |
| | | @Override |
| | | public FebsResponse rollperkSetUpdate(AgentLevelSetUpdateDto agentLevelSetUpdateDto) { |
| | | Long memberId = agentLevelSetUpdateDto.getId(); |
| | | MallMember mallMember = mallMemberMapper.selectById(memberId); |
| | | if(ObjectUtil.isEmpty(mallMember)){ |
| | | return new FebsResponse().fail().message("系统繁忙,请刷新页面重试"); |
| | | } |
| | | MallRollPerk mallRollPerk = new MallRollPerk(); |
| | | mallRollPerk.setMemberId(memberId); |
| | | mallRollPerk.setState(1); |
| | | long rollId = Long.parseLong(agentLevelSetUpdateDto.getLevelCode()); |
| | | mallRollPerk.setRollId(rollId); |
| | | mallRollPerkMapper.insert(mallRollPerk); |
| | | return new FebsResponse().success(); |
| | | } |
| | | |
| | | @Override |
| | | public FebsResponse resetPwd(Long id) { |
| | | MallMember mallMember = this.baseMapper.selectById(id); |
| | | if (mallMember == null) { |
| | |
| | | </if> |
| | | </where> |
| | | </update> |
| | | |
| | | |
| | | <select id="getRollperkOption" resultType="cc.mrbird.febs.mall.vo.AdminAgentLevelOptionTreeVo"> |
| | | select a.id id,a.roll_name name from mall_roll a |
| | | </select> |
| | | </mapper> |
| | |
| | | where a.city = #{city} |
| | | </select> |
| | | |
| | | <select id="getRollPerkInfo" resultType="cc.mrbird.febs.mall.vo.AdminAgentLevelSetInfoVo"> |
| | | select a.id ,a.roll_name levelCode from mall_roll a where id = 1 |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <!-- <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" lay-event="resetPwd">重置登录密码</button>--> |
| | | <!-- <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" lay-event="resetPayPwd">重置支付密码</button>--> |
| | | <!-- <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" lay-event="agentLevel">设置代理等级</button>--> |
| | | <button class="layui-btn layui-btn-normal layui-btn-sm" type="button" lay-event="rollPerk">拨卷</button> |
| | | </div> |
| | | </script> |
| | | <!-- 表格操作栏 end --> |
| | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | if (layEvent === 'rollPerk') { |
| | | if (checkData.length > 1) { |
| | | febs.alert.warn('请选择一个用户'); |
| | | return; |
| | | } |
| | | febs.modal.open('拨卷', 'modules/mallMember/rollPerkSet/' + checkData[0].id, { |
| | | btn: ['确认', '取消'], |
| | | yes: function (index, layero) { |
| | | $('#roll_perk-set').find('#submit').trigger('click'); |
| | | }, |
| | | btn2: function () { |
| | | layer.closeAll(); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | function systemPay(text, id, type) { |
New file |
| | |
| | | <style> |
| | | #roll_perk-set { |
| | | padding: 20px 25px 25px 0; |
| | | } |
| | | |
| | | #roll_perk-set .layui-treeSelect .ztree li a, .ztree li span { |
| | | margin: 0 0 2px 3px !important; |
| | | } |
| | | #roll_perk-set #data-permission-tree-block { |
| | | border: 1px solid #eee; |
| | | border-radius: 2px; |
| | | padding: 3px 0; |
| | | } |
| | | #roll_perk-set .layui-treeSelect .ztree li span.button.switch { |
| | | top: 1px; |
| | | left: 3px; |
| | | } |
| | | |
| | | </style> |
| | | <div class="layui-fluid" id="roll_perk-set"> |
| | | <form class="layui-form" action="" lay-filter="roll_perk-set-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"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">卷类型:</label> |
| | | <div class="layui-input-inline"> |
| | | <select lay-verify="required" name="levelCode" class="roll_perk-set-level" id="perkSet"> |
| | | <option value="">请选择</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item febs-hide"> |
| | | <button class="layui-btn" lay-submit="" lay-filter="roll_perk-set-form-submit" id="submit"></button> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | |
| | | <script data-th-inline="javascript"> |
| | | layui.use(['febs', 'form', 'formSelects', 'validate', 'treeSelect', 'eleTree'], function () { |
| | | var $ = layui.jquery, |
| | | febs = layui.febs, |
| | | layer = layui.layer, |
| | | formSelects = layui.formSelects, |
| | | treeSelect = layui.treeSelect, |
| | | form = layui.form, |
| | | eleTree = layui.eleTree, |
| | | rollperkSet = [[${rollperkSet}]], |
| | | $view = $('#roll_perk-set'), |
| | | validate = layui.validate, |
| | | _deptTree; |
| | | |
| | | form.render(); |
| | | |
| | | initUserValue(); |
| | | |
| | | function initUserValue() { |
| | | form.val("roll_perk-set-form", { |
| | | "id": rollperkSet.id, |
| | | }); |
| | | } |
| | | |
| | | //(下拉框) |
| | | $.get(ctx + 'admin/mallMember/getRollperkOption/tree', function (data) { |
| | | for (var k in data) |
| | | { |
| | | $(".roll_perk-set-level").append("<option value='" + data[k].id + "'>" + data[k].name + "</option>"); |
| | | } |
| | | layui.use('form', function () { |
| | | var form = layui.form; |
| | | // $("#perkSet").val(rollperkSet.levelCode) |
| | | form.render(); |
| | | }); |
| | | }); |
| | | |
| | | form.on('submit(roll_perk-set-form-submit)', function (data) { |
| | | febs.post(ctx + 'admin/mallMember/rollperkSetUpdate', data.field, function () { |
| | | layer.closeAll(); |
| | | febs.alert.success('操作成功'); |
| | | $('#febs-member-list').find('#reset').click(); |
| | | }); |
| | | return false; |
| | | }); |
| | | }); |
| | | </script> |