1 files added
10 files modified
| | |
| | | if (parentId == null) { |
| | | ViewMallOrderController.seeOrderFlowByOrderId = 0; |
| | | } |
| | | mallOrderInfo.setId(ViewMallMemberController.idFromMoneyFlow); |
| | | mallOrderInfo.setId(ViewMallOrderController.seeOrderFlowByOrderId); |
| | | Map<String, Object> dataTable = getDataTable(adminMallOrderService.moneyFlow(request, mallOrderInfo)); |
| | | return new FebsResponse().success().data(dataTable); |
| | | } |
| | |
| | | import cc.mrbird.febs.common.entity.FebsResponse; |
| | | import cc.mrbird.febs.mall.dto.*; |
| | | import cc.mrbird.febs.mall.service.IApiMallOrderInfoService; |
| | | import cc.mrbird.febs.mall.vo.ApiMallSubsidyAmountInfoVo; |
| | | import cc.mrbird.febs.mall.vo.MallMemberVo; |
| | | import cc.mrbird.febs.mall.vo.OrderDetailVo; |
| | | import cc.mrbird.febs.mall.vo.OrderListVo; |
| | | import io.swagger.annotations.Api; |
| | |
| | | return mallOrderInfoService.bangCardSign(bangCardSignDto); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取订单补贴信息", notes = "获取订单补贴信息") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "success", response = ApiMallSubsidyAmountInfoVo.class) |
| | | }) |
| | | @GetMapping(value = "/subsidyAmountInfo") |
| | | public FebsResponse subsidyAmountInfo() { |
| | | return mallOrderInfoService.subsidyAmountInfo(); |
| | | } |
| | | |
| | | } |
| | |
| | | BigDecimal selectSumAmountByPayMethodAndSomeStatue(@Param("payMethod")String name, @Param("statues") List<Long> values); |
| | | |
| | | Integer selectCountByCreateTimeAndMemberId(@Param("createdTime")String yyyyMMdd,@Param("memberId")Long memberId); |
| | | |
| | | BigDecimal selectTodayAmountByCreateTimeAndMemberId(@Param("createdTime")String yyyyMMdd,@Param("memberId")Long memberId); |
| | | } |
| | |
| | | if(BigDecimal.ZERO.compareTo(avaAmount) >= 0){ |
| | | mallMemberStarBuyMapper.updateStatusById(2,mallMemberStarBuy.getId()); |
| | | List<MallMemberStarBuy> mallMemberStarBuysIng = mallMemberStarBuyMapper.selectByStatusAndMemberId(1,memberId); |
| | | //如果没有其他生效中的记录,则更新用户的星级 |
| | | //如果没有其他生效中的记录,则更新用户的星级为普通,更新会员代理等级为代理 |
| | | if(CollUtil.isEmpty(mallMemberStarBuysIng)){ |
| | | mallMemberMapper.updateAccountLevelById(MemberAccountLevelEnum.NORMAL.getName(), memberId); |
| | | |
| | | //如果代理等级为手动设置,则跳过该会员 |
| | | int levelStatus = ObjectUtil.isEmpty(mallMember.getLevelStatus()) ? 0 : 1; |
| | | if(1 == levelStatus){ |
| | | continue; |
| | | } |
| | | mallMemberMapper.updateLevelById(MemberAgentLevelEnum.AGENT.getName(),mallMember.getId()); |
| | | } |
| | | } |
| | | } |
| | |
| | | void goodsComment(ApiAddCommentDtos addCommentDtos); |
| | | |
| | | FebsResponse bangCardSign(BangCardSignDto bangCardSignDto); |
| | | |
| | | FebsResponse subsidyAmountInfo(); |
| | | } |
| | |
| | | import cc.mrbird.febs.mall.entity.*; |
| | | import cc.mrbird.febs.mall.mapper.*; |
| | | import cc.mrbird.febs.mall.service.*; |
| | | import cc.mrbird.febs.mall.vo.ApiShopApplyVo; |
| | | import cc.mrbird.febs.mall.vo.OrderDetailVo; |
| | | import cc.mrbird.febs.mall.vo.OrderListVo; |
| | | import cc.mrbird.febs.mall.vo.OrderRefundVo; |
| | | import cc.mrbird.febs.mall.vo.*; |
| | | import cc.mrbird.febs.pay.model.AgreementPayDto; |
| | | import cc.mrbird.febs.pay.model.AgreementSignDto; |
| | | import cc.mrbird.febs.pay.model.UnipayDto; |
| | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public FebsResponse subsidyAmountInfo() { |
| | | MallMember member = LoginUserUtil.getLoginUser(); |
| | | ApiMallSubsidyAmountInfoVo apiMallSubsidyAmountInfoVo = new ApiMallSubsidyAmountInfoVo(); |
| | | DateTime today = DateUtil.date(); |
| | | DateTime yesterday = DateUtil.yesterday(); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | String yyyyMMddToday = sdf.format(today); |
| | | String yyyyMMddYesterday = sdf.format(yesterday); |
| | | //今日补贴 |
| | | BigDecimal todayAmount = this.baseMapper.selectTodayAmountByCreateTimeAndMemberId(yyyyMMddToday,member.getId()); |
| | | apiMallSubsidyAmountInfoVo.setTodayAmount(todayAmount); |
| | | //今日累计接单 |
| | | Integer todayTotalCnt = this.baseMapper.selectCountByCreateTimeAndMemberId(yyyyMMddToday,member.getId()); |
| | | apiMallSubsidyAmountInfoVo.setTodayTotalCnt(todayTotalCnt); |
| | | //昨日补贴 |
| | | BigDecimal yesterdayAmount = this.baseMapper.selectTodayAmountByCreateTimeAndMemberId(yyyyMMddYesterday,member.getId()); |
| | | apiMallSubsidyAmountInfoVo.setYesterdayAmount(yesterdayAmount); |
| | | //昨日累计接单 |
| | | Integer totalYesterdayCnt = this.baseMapper.selectCountByCreateTimeAndMemberId(yyyyMMddYesterday,member.getId()); |
| | | apiMallSubsidyAmountInfoVo.setTotalYesterdayCnt(totalYesterdayCnt); |
| | | //获得总额 |
| | | BigDecimal totalAmount = this.baseMapper.selectTodayAmountByCreateTimeAndMemberId(null,member.getId()); |
| | | apiMallSubsidyAmountInfoVo.setTotalAmount(totalAmount); |
| | | return new FebsResponse().success().data(apiMallSubsidyAmountInfoVo); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | private String remark; |
| | | |
| | | private String memberName; |
| | | |
| | | } |
New file |
| | |
| | | package cc.mrbird.febs.mall.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @Data |
| | | @ApiModel(value = "ApiMallSubsidyAmountInfoVo", description = "返回参数类") |
| | | public class ApiMallSubsidyAmountInfoVo { |
| | | |
| | | @ApiModelProperty(value = "获得总额") |
| | | private BigDecimal totalAmount = BigDecimal.ZERO; |
| | | |
| | | @ApiModelProperty(value = "今日补贴") |
| | | private BigDecimal todayAmount = BigDecimal.ZERO; |
| | | |
| | | @ApiModelProperty(value = "今日累计接单") |
| | | private Integer todayTotalCnt = 0; |
| | | |
| | | @ApiModelProperty(value = "昨日补贴") |
| | | private BigDecimal yesterdayAmount = BigDecimal.ZERO; |
| | | |
| | | @ApiModelProperty(value = "昨日累计接单") |
| | | private Integer totalYesterdayCnt = 0; |
| | | |
| | | } |
| | |
| | | </select> |
| | | |
| | | <select id="selectOrderMoneyFlowInPage" resultType="cc.mrbird.febs.mall.vo.AdminMallMoneyFlowVo"> |
| | | select * from mall_money_flow a where a.order_no = #{record.orderNo} |
| | | select |
| | | a.*, |
| | | b.name memberName |
| | | from mall_money_flow a |
| | | inner join mall_member b on b.id = a.rt_member_id |
| | | where a.order_no = #{record.orderNo} |
| | | order by a.CREATED_TIME desc |
| | | </select> |
| | | </mapper> |
| | |
| | | <result column="del_flag" property="delFlag" /> |
| | | <result column="deliver_type" property="deliverType" /> |
| | | <result column="shop_id" property="shopId" /> |
| | | <result column="subsidy_amount" property="subsidyAmount" /> |
| | | <collection property="items" ofType="cc.mrbird.febs.mall.entity.MallOrderItem"> |
| | | <id property="id" column="item_id" /> |
| | | <result property="orderId" column="order_id" /> |
| | |
| | | and a.order_type=#{record.orderType} |
| | | </if> |
| | | <if test="record.allStatus == 2"> |
| | | and a.status <![CDATA[<= ]]> 4 |
| | | and a.status <![CDATA[< ]]> 4 |
| | | </if> |
| | | <if test="record.allStatus == 3"> |
| | | and a.status <![CDATA[>= ]]> 5 |
| | | and a.status <![CDATA[>= ]]> 4 |
| | | </if> |
| | | </where> |
| | | order by a.created_time desc |
| | |
| | | count(a.id) |
| | | from mall_order_info a |
| | | where |
| | | date_format(a.CREATED_TIME, '%Y-%m-%d') = #{createdTime} |
| | | <if test="createdTime != null"> |
| | | and date_format(a.CREATED_TIME, '%Y-%m-%d') = #{createdTime} |
| | | </if> |
| | | and a.status = 4 |
| | | and a.member_id = #{memberId} |
| | | </select> |
| | | |
| | | <select id="selectTodayAmountByCreateTimeAndMemberId" resultType="java.math.BigDecimal"> |
| | | select |
| | | ifnull(sum(a.subsidy_amount),0) |
| | | from mall_order_info a |
| | | where |
| | | <if test="createdTime != null"> |
| | | and date_format(a.CREATED_TIME, '%Y-%m-%d') = #{createdTime} |
| | | </if> |
| | | and a.status = 4 |
| | | and a.member_id = #{memberId} |
| | | </select> |
| | | </mapper> |
| | |
| | | febs = layui.febs, |
| | | form = layui.form, |
| | | table = layui.table, |
| | | treeSelect = layui.treeSelect, |
| | | dropdown = layui.dropdown, |
| | | $view = $('#febs-orderMoneyFlow-child'), |
| | | $query = $view.find('#queryChild'), |
| | | $searchForm = $view.find('formChild'), |
| | | sortObject = {field: 'createTime', type: null}, |
| | | tableIns, |
| | | createTimeFrom, |
| | | createTimeTo; |
| | | tableIns; |
| | | |
| | | form.render(); |
| | | |
| | | initTable(); |
| | | |
| | | laydate.render({ |
| | | elem: '#user-createTime', |
| | | range: true, |
| | | trigger: 'click' |
| | | }); |
| | | |
| | | |
| | | function initTable() { |
| | | tableIns = febs.table.init({ |
| | |
| | | id: 'orderMoneyFlowChild', |
| | | url: ctx + 'admin/order/moneyFlow?parentId=1', |
| | | cols: [[ |
| | | {field: 'memberName', title: '用户名', minWidth: 80,align:'center'}, |
| | | {field: 'amount', title: '金额', minWidth: 80,align:'center'}, |
| | | {field: 'type', title: '流水类型', |
| | | templet: function (d) { |