Compare commits
No commits in common. "eb01a2a6cb33359c19275da2e87bf26e9eebcecb" and "4c78b3d5d9dd64c633b67491c4e8dfd3898658fb" have entirely different histories.
eb01a2a6cb
...
4c78b3d5d9
|
|
@ -2,7 +2,6 @@ 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;
|
||||
|
|
@ -35,14 +34,10 @@ 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)) {
|
||||
|
|
@ -51,8 +46,4 @@ public class AccOperationListVO {
|
|||
return this.tradeStateName;
|
||||
}
|
||||
}
|
||||
|
||||
public String getPayStateName() {
|
||||
return PayStateEnum.getDesc(this.payState);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -152,6 +152,9 @@ 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,7 +1,5 @@
|
|||
package com.bonus.canteen.core.pay.constants;
|
||||
|
||||
import com.bonus.canteen.core.account.constants.AccTradeStateEnum;
|
||||
|
||||
public enum PayStateEnum {
|
||||
UN_PAY(1, "未支付"),
|
||||
PAY_INPROCESS(2, "支付中"),
|
||||
|
|
@ -30,14 +28,4 @@ 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,14 +234,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
ate.create_by,
|
||||
ate.trade_id,
|
||||
ate.trade_state,
|
||||
ate.pay_state,
|
||||
ate.amount,
|
||||
ate.wallet_bal_total as walletBal,
|
||||
ate.fail_reason
|
||||
atwd.wallet_bal
|
||||
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}
|
||||
|
|
@ -249,6 +248,9 @@ 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>
|
||||
|
|
@ -274,7 +276,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and ate.user_id = #{param.userId}
|
||||
</if>
|
||||
</where>
|
||||
order by ate.trade_id desc
|
||||
order by atwd.id desc
|
||||
</select>
|
||||
|
||||
<select id="queryTradeAndWallerInfoByOrderNo" resultType="com.bonus.canteen.core.account.domain.bo.TradeAndWalletInfo">
|
||||
|
|
|
|||
Loading…
Reference in New Issue