feat(mall): 添加自提核销员设置功能
- 新增自提核销员设置相关的控制器方法、服务接口和实现类方法
- 在前端页面添加自提核销员设置的相关UI和交互逻辑
- 优化会员列表页面,增加自提核销状态的显示和操作
- 注释掉部分未使用的代码,提高代码可读性
| | |
| | | } |
| | | |
| | | /** |
| | | * 会员列表-核销员设置 |
| | | * 会员列表-活动核销员设置 |
| | | */ |
| | | @GetMapping("checkOrder/{id}") |
| | | @ControllerEndpoint(operation = " 会员列表-核销员设置", exceptionMessage = "操作失败") |
| | |
| | | } |
| | | |
| | | /** |
| | | * 会员列表-自提核销核销员设置 |
| | | */ |
| | | @GetMapping("checkLeader/{id}") |
| | | @ControllerEndpoint(operation = " 会员列表-自提核销员设置", exceptionMessage = "操作失败") |
| | | public FebsResponse checkLeader(@NotNull(message = "{required}") @PathVariable Long id) { |
| | | return mallMemberService.checkLeader(id); |
| | | } |
| | | |
| | | /** |
| | | * 会员列表-推销员设置 |
| | | */ |
| | | @GetMapping("downSale/{id}") |
| | |
| | | FebsResponse addMemberCoupon(MallMember member); |
| | | |
| | | FebsResponse checkOrder(Long id); |
| | | |
| | | FebsResponse checkLeader(Long id); |
| | | } |
| | |
| | | public FebsResponse checkOrder(Long id) { |
| | | |
| | | MallMember mallMember = this.baseMapper.selectById(id); |
| | | |
| | | if(ObjectUtil.isNotEmpty(mallMember)){ |
| | | mallMember.setCheckOrder(StateUpDownEnum.DOWN.getCode() == mallMember.getCheckOrder() ? StateUpDownEnum.UP.getCode() : StateUpDownEnum.DOWN.getCode()); |
| | | this.baseMapper.updateById(mallMember); |
| | | } |
| | | |
| | | return new FebsResponse().success().message("操作成功"); |
| | | } |
| | | |
| | | @Override |
| | | public FebsResponse checkLeader(Long id) { |
| | | |
| | | MallMember mallMember = this.baseMapper.selectById(id); |
| | | if(ObjectUtil.isNotEmpty(mallMember)){ |
| | | mallMember.setCheckLeader(StateUpDownEnum.DOWN.getCode() == mallMember.getCheckLeader() ? StateUpDownEnum.UP.getCode() : StateUpDownEnum.DOWN.getCode()); |
| | | this.baseMapper.updateById(mallMember); |
| | | } |
| | | |
| | | return new FebsResponse().success().message("操作成功"); |
| | | } |
| | |
| | | |
| | | orderInfo.setPayOrderNo(payResultStr); |
| | | orderInfo.setPayMethod("支付宝支付"); |
| | | agentProducer.sendOrderReturn(orderInfo.getId()); |
| | | // agentProducer.sendOrderReturn(orderInfo.getId()); |
| | | break; |
| | | case "3": |
| | | |
| | |
| | | orderInfoMapper.updateById(orderInfo); |
| | | |
| | | // agentProducer.sendReturnMoneyMsg(orderInfo.getId()); |
| | | agentProducer.sendAutoLevelUpMsg(orderInfo.getMemberId()); |
| | | // agentProducer.sendAutoLevelUpMsg(orderInfo.getMemberId()); |
| | | |
| | | // memberService.addMoneyFlow(orderInfo.getMemberId(), orderInfo.getAmount().negate(), MoneyFlowTypeEnum.PAY.getValue(), orderInfo.getOrderNo(), null, null, null, null, FlowTypeEnum.BALANCE.getValue()); |
| | | } |
| | |
| | | <div class="layui-col-md10"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label layui-form-label-sm">名称</label> |
| | | <div class="layui-input-inline"> |
| | | <input type="text" placeholder="名称" name="name" autocomplete="off" class="layui-input"> |
| | | </div> |
| | |
| | | toolbar:"#leaderToolbar", |
| | | defaultToolbar:[], |
| | | cols: [[ |
| | | {type: 'numbers', title: '', width: 80}, |
| | | {title: '操作', |
| | | templet: function (d) { |
| | | if (d.state === 3) { |
| | | return '' |
| | | + '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="leaderUpdate" shiro:hasPermission="user:update">审核</button>' |
| | | }else if(d.state === 1) { |
| | | return '' |
| | | + '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="leaderUpdate" shiro:hasPermission="user:update">修改</button>' |
| | | // + '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="fenceAdd" shiro:hasPermission="user:update">设置配送范围</button>' |
| | | // + '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="leaderCancel" shiro:hasPermission="user:update">拉黑</button>' |
| | | // + '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="leaderGoodsUpdate" shiro:hasPermission="user:update">团长商品设置</button>' |
| | | }else{ |
| | | return ''; |
| | | } |
| | | },minWidth: 200,align:'center'}, |
| | | {field: 'onlineState', title: '在线状态', templet: '#onlineStateSwitch', minWidth: 100,align:'center'}, |
| | | {field: 'name', title: '姓名', minWidth: 150,align:'left'}, |
| | | {field: 'phone', title: '电话', minWidth: 150,align:'left'}, |
| | | {field: 'addressPic', title: '自提点照片', |
| | |
| | | {field: 'addressArea', title: '自提点名称', minWidth: 150,align:'left'}, |
| | | {field: 'detailAddress', title: '自提点地址', minWidth: 150,align:'left'}, |
| | | // {field: 'totalProfit', title: '收益', minWidth: 150,align:'left'}, |
| | | {field: 'onlineState', title: '在线状态', templet: '#onlineStateSwitch', minWidth: 100,align:'center'}, |
| | | // {field: 'profitSwitch', title: '是否返利', templet: '#profitSwitch', minWidth: 100,align:'center'}, |
| | | // {field: 'bonusPercent', title: '返利比例', minWidth: 150,align:'left'}, |
| | | // {field: 'phone', title: '电话', minWidth: 150,align:'left'}, |
| | |
| | | return '' |
| | | } |
| | | }, minWidth: 80,align:'center'}, |
| | | {title: '操作', |
| | | templet: function (d) { |
| | | if (d.state === 3) { |
| | | return '' |
| | | + '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="leaderUpdate" shiro:hasPermission="user:update">审核</button>' |
| | | }else if(d.state === 1) { |
| | | return '' |
| | | + '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="leaderUpdate" shiro:hasPermission="user:update">修改</button>' |
| | | + '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="fenceAdd" shiro:hasPermission="user:update">设置配送范围</button>' |
| | | + '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="leaderCancel" shiro:hasPermission="user:update">拉黑</button>' |
| | | // + '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="leaderGoodsUpdate" shiro:hasPermission="user:update">团长商品设置</button>' |
| | | }else{ |
| | | return ''; |
| | | } |
| | | },minWidth: 200,align:'center'} |
| | | ]] |
| | | }); |
| | | } |
| | |
| | | {{# } }} |
| | | </script> |
| | | |
| | | <script type="text/html" id="checkLeaderSwitch"> |
| | | {{# if(d.checkLeader === 1) { }} |
| | | <input type="checkbox" value={{d.id}} lay-text="是|否" checked lay-skin="switch" lay-filter="checkLeaderSwitch"> |
| | | {{# } else { }} |
| | | <input type="checkbox" value={{d.id}} lay-text="是|否" lay-skin="switch" lay-filter="checkLeaderSwitch"> |
| | | {{# } }} |
| | | </script> |
| | | |
| | | <script type="text/html" id="isDoctorSwitch"> |
| | | {{# if(d.doctorState === 1) { }} |
| | | <input type="checkbox" value={{d.id}} lay-text="是|否" checked lay-skin="switch" lay-filter="isDoctorSwitch"> |
| | |
| | | } |
| | | }) |
| | | |
| | | form.on('switch(checkLeaderSwitch)', function (data) { |
| | | if (data.elem.checked) { |
| | | checkLeader(data.value); |
| | | } else { |
| | | checkLeader(data.value); |
| | | } |
| | | }) |
| | | |
| | | form.on('switch(isSalesmanSwitch)', function (data) { |
| | | if (data.elem.checked) { |
| | | upSale(data.value); |
| | |
| | | |
| | | function checkOrder(id) { |
| | | febs.get(ctx + 'admin/mallMember/checkOrder/' + id, null, function () { |
| | | febs.alert.success('操作成功'); |
| | | $query.click(); |
| | | }); |
| | | } |
| | | |
| | | function checkLeader(id) { |
| | | febs.get(ctx + 'admin/mallMember/checkLeader/' + id, null, function () { |
| | | febs.alert.success('操作成功'); |
| | | $query.click(); |
| | | }); |
| | |
| | | {type: 'checkbox'}, |
| | | {type: 'numbers', title: '', width: 80}, |
| | | {field: 'checkOrder', title: '状态', templet: '#accountStatusSwitch', minWidth: 100,align:'center'}, |
| | | {field: 'checkOrder', title: '核销员', templet: '#checkOrderSwitch', minWidth: 100,align:'center'}, |
| | | {field: 'checkOrder', title: '活动核销', templet: '#checkOrderSwitch', minWidth: 100,align:'center'}, |
| | | {field: 'checkLeader', title: '自提核销', templet: '#checkLeaderSwitch', minWidth: 100,align:'center'}, |
| | | {field: 'isSalesman', title: '推销员设置', templet: '#isSalesmanSwitch', minWidth: 100,align:'center'}, |
| | | // {title: '操作', toolbar: '#memberOption', minWidth: 200, align: 'center'}, |
| | | {field: 'name', title: '用户名', minWidth: 100,align:'center'}, |