钱包操作记录查询增加字段
This commit is contained in:
parent
0c0be94e1e
commit
b1c2310c16
|
|
@ -2,6 +2,7 @@ package com.bonus.canteen.core.account.domain.vo;
|
|||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.bonus.canteen.core.account.constants.AccTradeStateEnum;
|
||||
import com.bonus.canteen.core.pay.constants.PayStateEnum;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
|
@ -34,10 +35,14 @@ public class AccOperationListVO {
|
|||
private Integer tradeState;
|
||||
@ApiModelProperty("结果名称")
|
||||
private String tradeStateName;
|
||||
@ApiModelProperty("支付状态")
|
||||
private Integer payState;
|
||||
private Integer payStateName;
|
||||
@ApiModelProperty("操作员")
|
||||
private String createBy;
|
||||
@ApiModelProperty("交易单号")
|
||||
private Long tradeId;
|
||||
private String failReason;
|
||||
|
||||
public String getTradeStateName() {
|
||||
if (ObjectUtil.isNotNull(this.tradeState)) {
|
||||
|
|
@ -46,4 +51,8 @@ public class AccOperationListVO {
|
|||
return this.tradeStateName;
|
||||
}
|
||||
}
|
||||
|
||||
public String getPayStateName() {
|
||||
return PayStateEnum.getDesc(this.payState);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -152,9 +152,6 @@ public class AccTradeServiceImpl implements IAccTradeService {
|
|||
@Override
|
||||
public List<AccOperationListVO> queryAccOperationList(AccWalletOperationQueryParam param) {
|
||||
String encryptedSearchValue = SM4EncryptUtils.sm4Encrypt(param.getSearchValue());
|
||||
if(Objects.isNull(param.getPayState())) {
|
||||
param.setPayState(PayStateEnum.PAY_SUCC.getKey());
|
||||
}
|
||||
List<AccOperationListVO> list = accTradeMapper.queryAccOperationList(param, encryptedSearchValue);
|
||||
if(CollUtil.isNotEmpty(list)) {
|
||||
for(AccOperationListVO vo : list) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
package com.bonus.canteen.core.pay.constants;
|
||||
|
||||
import com.bonus.canteen.core.account.constants.AccTradeStateEnum;
|
||||
|
||||
public enum PayStateEnum {
|
||||
UN_PAY(1, "未支付"),
|
||||
PAY_INPROCESS(2, "支付中"),
|
||||
|
|
@ -28,4 +30,14 @@ public enum PayStateEnum {
|
|||
return !UN_PAY.getKey().equals(key);
|
||||
}
|
||||
|
||||
public static String getDesc(Integer key) {
|
||||
PayStateEnum[] payStateEnums = values();
|
||||
for (PayStateEnum temp : payStateEnums) {
|
||||
if (temp.getKey().equals(key)) {
|
||||
return temp.getDesc();
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -234,13 +234,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
ate.create_by,
|
||||
ate.trade_id,
|
||||
ate.trade_state,
|
||||
ate.pay_state,
|
||||
ate.amount,
|
||||
atwd.wallet_bal
|
||||
ate.wallet_bal_total as walletBal,
|
||||
ate.fail_reason
|
||||
FROM
|
||||
account_trade ate
|
||||
LEFT JOIN sys_user su ON su.user_id = ate.user_id
|
||||
LEFT JOIN sys_dept sd ON sd.dept_id = su.dept_id
|
||||
LEFT JOIN account_trade_wallet_detail atwd ON ate.trade_id = atwd.trade_id
|
||||
<where>
|
||||
<if test="param.tradeType != null">
|
||||
ate.trade_type = #{param.tradeType}
|
||||
|
|
@ -248,9 +249,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="param.payState != null">
|
||||
and ate.pay_state = #{param.payState}
|
||||
</if>
|
||||
<if test="param.walletType != null">
|
||||
and atwd.wallet_type = #{param.walletType}
|
||||
</if>
|
||||
<if test="param.startDateTime != null">
|
||||
and ate.trade_time <![CDATA[ >= ]]> #{param.startDateTime}
|
||||
</if>
|
||||
|
|
@ -276,7 +274,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and ate.user_id = #{param.userId}
|
||||
</if>
|
||||
</where>
|
||||
order by atwd.id desc
|
||||
order by ate.trade_id desc
|
||||
</select>
|
||||
|
||||
<select id="queryTradeAndWallerInfoByOrderNo" resultType="com.bonus.canteen.core.account.domain.bo.TradeAndWalletInfo">
|
||||
|
|
|
|||
Loading…
Reference in New Issue