| | |
| | | |
| | | MyTeamVo myTeamVo = new MyTeamVo(); |
| | | myTeamVo.setTeam(list); |
| | | myTeamVo.setMyAchieve(this.baseMapper.selectAchieveByMemberId(mallMember.getInviteId(), 1)); |
| | | myTeamVo.setMyAchieve(mallOrderInfoMapper.selectTotalAmount(memberId)); |
| | | myTeamVo.setMyTeamAchieve(this.baseMapper.selectAchieveByMemberId(mallMember.getInviteId(), 2)); |
| | | myTeamVo.setMyTeamCnt(this.baseMapper.selectAllChildAgentListByInviteId(mallMember.getInviteId()).size()); |
| | | return new FebsResponse().success().data(myTeamVo); |
| | |
| | | withdraw.setAmount(withdrawalDto.getAmount()); |
| | | withdraw.setStatus(1); |
| | | withdraw.setAmountFee(serviceFee); |
| | | withdraw.setRemark(withdrawalDto.getBankNo()); |
| | | // withdraw.setWtihdrawTypeId(mallMemberBank.getId()); |
| | | this.baseMapper.insert(withdraw); |
| | | //生成提现流水记录 |
| | | Long subsidyAmountFlowId = mallMoneyFlowService.addMoneyFlow( |
| | | memberId, |
| | | orderNo, |
| | | withdrawalDto.getAmount(), |
| | | withdrawalDto.getAmount().negate(), |
| | | MallMoneyFlowTypeEnum.WITHDRAW.getCode(), |
| | | MallMoneyFlow.STATUS_ING, |
| | | MallMoneyFlow.IS_RETURN_Y, |
| | |
| | | a.invite_id, |
| | | 2 isCurrent, |
| | | a.created_time, |
| | | p.prize_score, |
| | | u.description levelName, |
| | | (select sum(e.amount) |
| | | from mall_order_info e |
| | | inner join mall_member b on e.member_id=b.ID |
| | | inner join mall_order_item c on e.id = c.order_id -- and c.is_normal=2 |
| | | where e.status in (2, 3, 4) and e.order_type=1 and (b.invite_id=a.invite_id or b.referrer_id=a.invite_id)) amount, |
| | | where e.status <![CDATA[>= ]]> 4 and (b.invite_id=a.invite_id or b.referrer_id=a.invite_id)) amount, |
| | | (select count(1) from mall_member e |
| | | inner join mall_order_info b on e.id=b.member_id and b.status in (2, 3, 4) |
| | | inner join mall_order_info b on e.id=b.member_id and b.status <![CDATA[>= ]]> 4 |
| | | where find_in_set(a.invite_id, e.referrer_ids)) orderCnt, |
| | | (select count(1) from mall_member x where find_in_set(a.invite_id, x.referrer_ids)) cnt |
| | | from mall_member a |
| | | inner join mall_member_wallet p on a.id=p.member_id |
| | | left join data_dictionary_custom u on a.level=u.code and u.type='AGENT_LEVEL' |
| | | where a.referrer_id=#{inviteId} |
| | | </select> |
| | | |
| | |
| | | |
| | | <select id="selectAchieveByMemberId" resultType="java.math.BigDecimal"> |
| | | select IFNULL(sum(IFNULL(a.amount, 0)), 0) |
| | | from mall_achieve_record a |
| | | from mall_order_info a |
| | | inner join mall_member b on a.member_id=b.ID |
| | | where 1=1 |
| | | and a.status <![CDATA[>= ]]> 4 |
| | | <if test="type == 1"> |
| | | and b.invite_id=#{inviteId} |
| | | </if> |
| | |
| | | a.remark remark, |
| | | a.status status, |
| | | b.name, |
| | | b.bind_phone bindPhone, |
| | | c.bank_no bankNo, |
| | | b.phone |
| | | from mall_member_withdraw a |
| | | inner join mall_member b on a.member_id=b.id |
| | | inner join mall_member_bank c on c.member_id=b.id |
| | | <where> |
| | | <if test="record != null" > |
| | | <if test="record.name!=null and record.name!=''"> |
| | |
| | | |
| | | <select id="selectTotalAmount" resultType="java.math.BigDecimal"> |
| | | select IFNULL(sum(IFNULL(amount,0)),0) from mall_order_info |
| | | where member_id=#{memberId} and status in (2, 3, 4) and order_type=1 |
| | | where member_id=#{memberId} and status <![CDATA[>= ]]> 4 |
| | | </select> |
| | | |
| | | <select id="selectTotalAmountForDate" resultType="java.math.BigDecimal"> |
| | |
| | | {field: 'phone', title: '账号', minWidth: 150,align:'left'}, |
| | | {field: 'amount', title: '金额', minWidth: 150,align:'left'}, |
| | | {field: 'amountFee', title: '手续费', minWidth: 150,align:'left'}, |
| | | {field: 'bankNo', title: '地址', minWidth: 300,align:'left'}, |
| | | {field: 'remark', title: '地址', minWidth: 300,align:'left'}, |
| | | {field: 'status', title: '状态', |
| | | templet: function (d) { |
| | | if (d.status === 1) { |