mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-10 10:19:54 +08:00
update 测试会员钱包流水导出
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package com.jsowell.web.controller.pile;
|
package com.jsowell.web.controller.pile;
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.alibaba.fastjson2.JSON;
|
||||||
|
import com.alibaba.nacos.shaded.org.checkerframework.checker.units.qual.A;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.jsowell.common.annotation.Log;
|
import com.jsowell.common.annotation.Log;
|
||||||
@@ -20,10 +21,9 @@ import com.jsowell.pile.domain.MemberBasicInfo;
|
|||||||
import com.jsowell.pile.domain.MemberPlateNumberRelation;
|
import com.jsowell.pile.domain.MemberPlateNumberRelation;
|
||||||
import com.jsowell.pile.domain.PileMerchantInfo;
|
import com.jsowell.pile.domain.PileMerchantInfo;
|
||||||
import com.jsowell.pile.dto.*;
|
import com.jsowell.pile.dto.*;
|
||||||
import com.jsowell.pile.service.MemberBasicInfoService;
|
import com.jsowell.pile.service.*;
|
||||||
import com.jsowell.pile.service.MemberPlateNumberRelationService;
|
|
||||||
import com.jsowell.pile.service.MemberTransactionRecordService;
|
|
||||||
import com.jsowell.pile.util.UserUtils;
|
import com.jsowell.pile.util.UserUtils;
|
||||||
|
import com.jsowell.pile.vo.MemberWalletLogVO2;
|
||||||
import com.jsowell.pile.vo.base.MerchantInfoVO;
|
import com.jsowell.pile.vo.base.MerchantInfoVO;
|
||||||
import com.jsowell.pile.vo.uniapp.customer.MemberVO;
|
import com.jsowell.pile.vo.uniapp.customer.MemberVO;
|
||||||
import com.jsowell.pile.vo.uniapp.customer.MemberWalletLogVO;
|
import com.jsowell.pile.vo.uniapp.customer.MemberWalletLogVO;
|
||||||
@@ -56,6 +56,9 @@ public class MemberBasicInfoController extends BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private MemberPlateNumberRelationService memberPlateNumberRelationService;
|
private MemberPlateNumberRelationService memberPlateNumberRelationService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MemberWalletLogService memberWalletLogService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询会员基础信息列表
|
* 查询会员基础信息列表
|
||||||
*/
|
*/
|
||||||
@@ -339,4 +342,17 @@ public class MemberBasicInfoController extends BaseController {
|
|||||||
return AjaxResult.error("查询会员明细发生未知异常,请稍后重试");
|
return AjaxResult.error("查询会员明细发生未知异常,请稍后重试");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出会员钱包流水
|
||||||
|
* @param response
|
||||||
|
* @param dto
|
||||||
|
*/
|
||||||
|
@PostMapping("/exportMemberWalletLog")
|
||||||
|
public void exportMemberWalletLog(HttpServletResponse response, UniAppQueryMemberBalanceDTO dto){
|
||||||
|
List<MemberWalletLogVO2> memberWalletLogVO2 = memberWalletLogService.getByMemberId(dto.getMemberId());
|
||||||
|
ExcelUtil<MemberWalletLogVO2> util = new ExcelUtil<MemberWalletLogVO2>(MemberWalletLogVO2.class);
|
||||||
|
util.exportExcel(response, memberWalletLogVO2, "会员钱包流水");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.jsowell.pile.mapper;
|
|||||||
|
|
||||||
import com.jsowell.pile.domain.MemberWalletLog;
|
import com.jsowell.pile.domain.MemberWalletLog;
|
||||||
import com.jsowell.pile.dto.UniAppQueryMemberBalanceDTO;
|
import com.jsowell.pile.dto.UniAppQueryMemberBalanceDTO;
|
||||||
|
import com.jsowell.pile.vo.MemberWalletLogVO2;
|
||||||
import com.jsowell.pile.vo.uniapp.customer.MemberBalanceVO;
|
import com.jsowell.pile.vo.uniapp.customer.MemberBalanceVO;
|
||||||
import com.jsowell.pile.vo.uniapp.customer.MemberWalletLogVO;
|
import com.jsowell.pile.vo.uniapp.customer.MemberWalletLogVO;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
@@ -102,4 +103,6 @@ public interface MemberWalletLogMapper {
|
|||||||
List<MemberBalanceVO> getMemberRefundAmount(List<String> memberIds);
|
List<MemberBalanceVO> getMemberRefundAmount(List<String> memberIds);
|
||||||
|
|
||||||
List<MemberWalletLog> getOrderRecord(@Param("orderCode") String orderCode, @Param("type") String type);
|
List<MemberWalletLog> getOrderRecord(@Param("orderCode") String orderCode, @Param("type") String type);
|
||||||
|
|
||||||
|
List<MemberWalletLogVO2> getByMemberId(String memberId);
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.jsowell.pile.service;
|
package com.jsowell.pile.service;
|
||||||
|
|
||||||
import com.jsowell.pile.domain.MemberWalletLog;
|
import com.jsowell.pile.domain.MemberWalletLog;
|
||||||
|
import com.jsowell.pile.vo.MemberWalletLogVO2;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -30,5 +31,7 @@ public interface MemberWalletLogService {
|
|||||||
int batchInsert(List<MemberWalletLog> list);
|
int batchInsert(List<MemberWalletLog> list);
|
||||||
|
|
||||||
List<MemberWalletLog> getOrderRecord(String orderCode, String type);
|
List<MemberWalletLog> getOrderRecord(String orderCode, String type);
|
||||||
|
|
||||||
|
List<MemberWalletLogVO2> getByMemberId(String memberId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,21 @@
|
|||||||
package com.jsowell.pile.service.impl;
|
package com.jsowell.pile.service.impl;
|
||||||
|
|
||||||
|
import com.jsowell.common.exception.BusinessException;
|
||||||
import com.jsowell.pile.domain.MemberWalletLog;
|
import com.jsowell.pile.domain.MemberWalletLog;
|
||||||
|
import com.jsowell.pile.dto.QueryMemberInfoDTO;
|
||||||
import com.jsowell.pile.mapper.MemberWalletLogMapper;
|
import com.jsowell.pile.mapper.MemberWalletLogMapper;
|
||||||
import com.jsowell.pile.service.MemberWalletLogService;
|
import com.jsowell.pile.service.MemberWalletLogService;
|
||||||
|
import com.jsowell.pile.vo.MemberWalletLogVO2;
|
||||||
|
import com.jsowell.pile.vo.uniapp.customer.MemberVO;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
public class MemberWalletLogServiceImpl implements MemberWalletLogService {
|
public class MemberWalletLogServiceImpl implements MemberWalletLogService {
|
||||||
@@ -73,5 +82,11 @@ public class MemberWalletLogServiceImpl implements MemberWalletLogService {
|
|||||||
public int batchInsert(List<MemberWalletLog> list) {
|
public int batchInsert(List<MemberWalletLog> list) {
|
||||||
return memberWalletLogMapper.batchInsert(list);
|
return memberWalletLogMapper.batchInsert(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<MemberWalletLogVO2> getByMemberId(String memberId) {
|
||||||
|
return memberWalletLogMapper.getByMemberId(memberId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,93 @@
|
|||||||
|
package com.jsowell.pile.vo;
|
||||||
|
import com.jsowell.common.annotation.Excel;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
/**
|
||||||
|
* 会员钱包余额明细相关
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Builder
|
||||||
|
public class MemberWalletLogVO2 {
|
||||||
|
/**
|
||||||
|
* 会员id
|
||||||
|
*/
|
||||||
|
@Excel(name = "会员id")
|
||||||
|
private String memberId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 交易类型 1-进账;2-出账
|
||||||
|
*/
|
||||||
|
@Excel(name = "交易类型", readConverterExp = "1=进账,2=出账")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 钱包编号
|
||||||
|
*/
|
||||||
|
@Excel(name = "钱包编号")
|
||||||
|
private String walletCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子类型 10-充值, 11-赠送, 12-订单结算退款,20-后管扣款, 21-订单付款, 22-用户退款
|
||||||
|
*/
|
||||||
|
@Excel(name = "操作类型(10-充值, 11-赠送, 12-订单结算退款,20-后管扣款, 21-订单付款, 22-用户退款)",
|
||||||
|
readConverterExp = "10=充值,11=赠送,12=订单结算退款,20=后管扣款,21=订单付款,22=用户退款")
|
||||||
|
private String subType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 充值/消费人员
|
||||||
|
*/
|
||||||
|
@Excel(name = "充值/消费人员")
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 出账/入账金额
|
||||||
|
*/
|
||||||
|
@Excel(name = "出账/入账金额")
|
||||||
|
private BigDecimal amount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 交易时间
|
||||||
|
*/
|
||||||
|
@Excel(name = "交易时间")
|
||||||
|
private String transactionTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 余额类型(1-本金,2-赠送)
|
||||||
|
*/
|
||||||
|
private String category;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 关联订单
|
||||||
|
*/
|
||||||
|
private String relatedOrderCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付金额
|
||||||
|
*/
|
||||||
|
private BigDecimal payAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单金额
|
||||||
|
*/
|
||||||
|
private BigDecimal orderAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 退款金额
|
||||||
|
*/
|
||||||
|
private BigDecimal refundAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变动前金额
|
||||||
|
*/
|
||||||
|
private BigDecimal beforeAmount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 变动后金额
|
||||||
|
*/
|
||||||
|
private BigDecimal afterAmount;
|
||||||
|
}
|
||||||
@@ -651,4 +651,26 @@
|
|||||||
where related_order_code = #{orderCode,jdbcType=VARCHAR}
|
where related_order_code = #{orderCode,jdbcType=VARCHAR}
|
||||||
and type = #{type,jdbcType=VARCHAR}
|
and type = #{type,jdbcType=VARCHAR}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getByMemberId" resultType="com.jsowell.pile.vo.MemberWalletLogVO2">
|
||||||
|
SELECT
|
||||||
|
member_id AS memberId,
|
||||||
|
type,
|
||||||
|
wallet_code AS walletCode,
|
||||||
|
sub_type AS subType,
|
||||||
|
create_by AS createBy,
|
||||||
|
amount,
|
||||||
|
create_time AS transactionTime,
|
||||||
|
create_time AS createTime,
|
||||||
|
category,
|
||||||
|
related_order_code AS relatedOrderCode,
|
||||||
|
before_amount AS beforeAmount,
|
||||||
|
after_amount AS afterAmount
|
||||||
|
FROM member_wallet_log
|
||||||
|
where
|
||||||
|
<if test="memberId != null and memberId != ''">
|
||||||
|
member_id = #{memberId,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Reference in New Issue
Block a user