src/main/java/cc/mrbird/febs/common/enumerates/FlowTypeEnum.java
@@ -25,7 +25,11 @@ /** * 佣金 */ COMMISSION(4); COMMISSION(4), /** * 微信 */ WECHAT(5); private final int value; src/main/java/cc/mrbird/febs/common/enumerates/MoneyFlowTypeEnum.java
@@ -52,7 +52,7 @@ */ TRANSFER(9), /** * 支付 * 余额支付 */ PAY(10), /** @@ -103,7 +103,12 @@ /** * 团长提成(收益) */ RECHARGE_SEND(20); RECHARGE_SEND(20), /** * 微信支付 */ WECHAT_PAY(21); private final int value; src/main/java/cc/mrbird/febs/mall/controller/AdminMallMemberController.java
@@ -135,6 +135,16 @@ */ @GetMapping("getMoneyFlowList") public FebsResponse getMoneyFlowList(MoneyFlowListDto moneyFlowListDto, QueryRequest request) { String startTime = moneyFlowListDto.getStartTime(); String endTime = moneyFlowListDto.getEndTime(); if(StrUtil.isNotBlank(startTime) && StrUtil.isNotBlank(endTime)){ DateTime dateStartTime= DateUtil.parseDate(startTime); DateTime dateEndTime = DateUtil.parseDate(endTime); int compare = DateUtil.compare(dateStartTime, dateEndTime); if(compare >= 0){ return new FebsResponse().fail().message("请输入正确的开始时间和结束时间"); } } Map<String, Object> data = getDataTable(mallMemberService.getMoneyFlowListInPage(moneyFlowListDto, request)); return new FebsResponse().success().data(data); } src/main/java/cc/mrbird/febs/mall/controller/AdminSystemController.java
@@ -22,6 +22,8 @@ import org.springframework.web.bind.annotation.RestController; import java.math.BigDecimal; import java.util.Arrays; import java.util.List; import java.util.Map; @Slf4j @@ -132,4 +134,29 @@ dataDictionaryCustomMapper.updateById(dic); return new FebsResponse().success(); } // public static void main(String[] args) { // List<Integer> lines = Arrays.asList(new Integer[]{1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0}); // //数字连续出现的计数 // Integer symbol = 0; // //数字连续出现的次数限制 // Integer times = 3; // //出现的数字 // Integer symbolNum = 1; // //满足规则的次数 // Integer timesOneSign = 0; // for(int i=0;i<lines.size();i++){ // if(symbolNum == lines.get(i)){ // symbol = symbol + 1; // if(symbol >= times){ // timesOneSign = timesOneSign + 1; // symbol = 0; // } // }else{ // symbol = 0; // } // } // // System.out.println(timesOneSign); // } } src/main/java/cc/mrbird/febs/mall/dto/MoneyFlowListDto.java
@@ -1,5 +1,6 @@ package cc.mrbird.febs.mall.dto; import com.baomidou.mybatisplus.annotation.TableField; import io.swagger.annotations.ApiModel; import lombok.Data; @@ -15,4 +16,8 @@ private Integer flowType; private String startTime; private String endTime; } src/main/java/cc/mrbird/febs/pay/controller/XcxPayController.java
@@ -303,6 +303,15 @@ order.setPayTime(new Date()); order.setDeliveryState(OrderDeliveryStateEnum.DELIVERY_WAIT.getValue()); mallOrderInfoMapper.updateById(order); mallMoneyFlowService.addMoneyFlow( order.getMemberId(), order.getAmount(), MoneyFlowTypeEnum.WECHAT_PAY.getValue(), order.getOrderNo(), FlowTypeEnum.WECHAT.getValue(), "微信支付", 2); threadResult.success().message("支付成功"); } else { log.info("订单状态不为待付款,order status=", order.getStatus()); src/main/resources/mapper/modules/MallMoneyFlowMapper.xml
@@ -63,6 +63,12 @@ <if test="record.flowType!=null and record.flowType!=''"> and a.flow_type like concat('%', #{record.flowType},'%') </if> <if test="record.startTime != null and record.startTime != ''"> and a.created_time >= #{record.startTime} </if> <if test="record.endTime != null and record.endTime != ''"> and a.created_time <= #{record.endTime} </if> </if> </where> order by a.created_time desc src/main/resources/templates/febs/views/modules/mallMember/moneyFlowList.html
@@ -33,8 +33,8 @@ <!-- <option value="7">一代收益</option>--> <!-- <option value="8">提现</option>--> <!-- <option value="9">转账</option>--> <option value="10">支付</option> <!-- <option value="11">退款</option>--> <option value="10">余额支付</option> <option value="11">退款</option> <!-- <option value="12">佣金转竞猜积分</option>--> <!-- <option value="13">佣金转余额</option>--> <!-- <option value="14">竞猜积分签到</option>--> @@ -43,8 +43,25 @@ <!-- <option value="17">抽奖</option>--> <option value="18">充值</option> <option value="20">赠送金额</option> <option value="21">微信支付</option> <!-- <option value="19">收益</option>--> </select> </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="startTime" id="febs-money-flow-start" lay-verify="date" placeholder="yyyy-MM-dd" 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="endTime" id="febs-money-flow-end" lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input"> </div> </div> <!-- <div class="layui-inline">--> @@ -80,7 +97,7 @@ <!-- 表格操作栏 end --> <script data-th-inline="none" type="text/javascript"> // 引入组件并初始化 layui.use([ 'jquery', 'form', 'table', 'febs'], function () { layui.use([ 'jquery', 'form', 'table', 'febs','laydate'], function () { var $ = layui.jquery, febs = layui.febs, form = layui.form, @@ -90,7 +107,17 @@ $reset = $view.find('#reset'), $searchForm = $view.find('form'), sortObject = {field: 'phone', type: null}, laydate = layui.laydate, tableIns; //日期范围 laydate.render({ elem: '#febs-money-flow-start' }); laydate.render({ elem: '#febs-money-flow-end' }); form.render(); @@ -121,10 +148,11 @@ elem: $view.find('table'), id: 'moneyFlowTable', url: ctx + 'admin/mallMember/getMoneyFlowList', totalRow : true, cols: [[ {field: 'name', title: '用户昵称', minWidth: 100,align:'left'}, {field: 'name', title: '用户昵称', minWidth: 100,align:'left',totalRowText:"合计"}, {field: 'phone', title: '手机号码', minWidth: 150,align:'left'}, {field: 'amount', title: '金额', minWidth: 150,align:'left'}, {field: 'amount', title: '金额', minWidth: 150,align:'left', totalRow:true}, {field: 'type', title: '流水类型', templet: function (d) { if (d.type === 1) { @@ -146,7 +174,7 @@ }else if (d.type === 9) { return '<span>转账</span>' }else if (d.type === 10) { return '<span>支付</span>' return '<span>余额支付</span>' }else if (d.type === 11) { return '<span>退款</span>' }else if (d.type === 12) { @@ -167,6 +195,8 @@ return '<span>收益</span>' }else if (d.type === 20) { return '<span>赠送金额</span>' }else if (d.type === 21) { return '<span>微信支付</span>' }else{ return '' } @@ -193,7 +223,15 @@ // 获取查询参数 function getQueryParams() { let startTimestr = $searchForm.find('input[name="startTime"]').val().trim(); let endTimeStr = $searchForm.find('input[name="endTime"]').val().trim(); if(startTimestr != '' && endTimeStr != '' && startTimestr >= endTimeStr){ febs.alert.warn('开始时间需要小于结束时间'); return{}; } return { startTime: $searchForm.find('input[name="startTime"]').val().trim(), endTime: $searchForm.find('input[name="endTime"]').val().trim(), name: $searchForm.find('input[name="name"]').val().trim(), phone: $searchForm.find('input[name="phone"]').val().trim(), type: $searchForm.find("select[name='type']").val(), src/main/resources/templates/febs/views/modules/order/deliverGoods.html
@@ -98,7 +98,7 @@ febs.post(ctx + 'admin/order/deliverGoods', data.field, function () { layer.closeAll(); febs.alert.success('操作成功'); $('#febs-order').find('#reset').click(); $('#febs-order').find('#query').click(); }); return false; }); src/main/resources/templates/febs/views/modules/order/orderList.html
@@ -324,6 +324,7 @@ btn: ['确认', '取消'], yes: function (index, layero) { $('#deliver-update').find('#submit').trigger('click'); // $query.click(); }, btn2: function () { layer.closeAll();