增加了项目退款功能
This commit is contained in:
parent
1cf010127f
commit
7683dbebcd
@ -1,7 +1,7 @@
|
||||
package cn.com.tenlion.operator.controller.resource.accountitem;
|
||||
|
||||
import cn.com.tenlion.operator.enums.AccountItemTypeEnum;
|
||||
import cn.com.tenlion.operator.pojo.bos.accountitem.AccountItemBO;
|
||||
import cn.com.tenlion.operator.pojo.dtos.agent.AgentDTO;
|
||||
import cn.com.tenlion.operator.pojo.vos.accountitem.AccountItemOrderVO;
|
||||
import cn.com.tenlion.operator.util.EncryptUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
@ -13,7 +13,6 @@ import ink.wgink.interfaces.consts.ISystemConstant;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.ErrorResult;
|
||||
import ink.wgink.pojo.result.SuccessResult;
|
||||
import ink.wgink.pojo.result.SuccessResultData;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
import cn.com.tenlion.operator.pojo.dtos.accountitem.AccountItemDTO;
|
||||
import cn.com.tenlion.operator.pojo.vos.accountitem.AccountItemVO;
|
||||
@ -22,9 +21,7 @@ import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -142,7 +139,11 @@ public class AccountItemResourceController extends DefaultBaseController {
|
||||
}
|
||||
AccountItemVO accountItemVO = new AccountItemVO();
|
||||
accountItemVO.setMode(1); // 入账
|
||||
accountItemVO.setType(accountItemOrderVO.getType() == 1 || accountItemOrderVO.getType() == 5 ? accountItemOrderVO.getType() : 5); // 收入类型 充值 | 订单收入
|
||||
accountItemVO.setType((
|
||||
accountItemOrderVO.getType() == AccountItemTypeEnum.RECHARGE.getValue() ||
|
||||
accountItemOrderVO.getType() == AccountItemTypeEnum.PAYMENT_SPLIT.getValue() ||
|
||||
accountItemOrderVO.getType() == AccountItemTypeEnum.REFUND.getValue()
|
||||
) ? accountItemOrderVO.getType() : AccountItemTypeEnum.PAYMENT_SPLIT.getValue()); // 收入类型 充值 | 分账入账 | 退款入账
|
||||
accountItemVO.setAccountId(accountItemOrderVO.getUserId());
|
||||
accountItemVO.setAccountMoney(accountItemOrderVO.getAccountMoney());
|
||||
accountItemVO.setDescription(accountItemOrderVO.getDescription());
|
||||
@ -179,7 +180,12 @@ public class AccountItemResourceController extends DefaultBaseController {
|
||||
}
|
||||
AccountItemVO accountItemVO = new AccountItemVO();
|
||||
accountItemVO.setMode(2); // 出账
|
||||
accountItemVO.setType(accountItemOrderVO.getType() == 2 || accountItemOrderVO.getType() == 3 || accountItemOrderVO.getType() == 4 ? accountItemOrderVO.getType() : 2); // 支出类型 系统扣款 | 支出 | 提现
|
||||
accountItemVO.setType(
|
||||
(accountItemOrderVO.getType() == AccountItemTypeEnum.PAY_OUT.getValue() ||
|
||||
accountItemOrderVO.getType() == AccountItemTypeEnum.WITHDRAW_CASH.getValue() ||
|
||||
accountItemOrderVO.getType() == AccountItemTypeEnum.SYSTEM_DEDUCTION.getValue() ||
|
||||
accountItemOrderVO.getType() == AccountItemTypeEnum.REFUND_DEDUCTION.getValue()
|
||||
) ? accountItemOrderVO.getType() : AccountItemTypeEnum.PAY_OUT.getValue()); // 支出类型 系统扣款 | 支出 | 提现 / 退款
|
||||
accountItemVO.setAccountId(accountItemOrderVO.getUserId());
|
||||
accountItemVO.setAccountMoney(accountItemOrderVO.getAccountMoney());
|
||||
accountItemVO.setDescription(accountItemOrderVO.getDescription());
|
||||
|
@ -0,0 +1,36 @@
|
||||
package cn.com.tenlion.operator.enums;
|
||||
|
||||
/**
|
||||
* @ClassName: AccountItemTypeEnum
|
||||
* @Description:
|
||||
* @Author: wanggeng
|
||||
* @Date: 2024/8/21 15:09
|
||||
* @Version: 1.0
|
||||
*/
|
||||
public enum AccountItemTypeEnum {
|
||||
|
||||
RECHARGE(1, "充值"),
|
||||
PAY_OUT(2, "支出"),
|
||||
WITHDRAW_CASH(3, "提现"),
|
||||
SYSTEM_DEDUCTION(4, "系统扣款"),
|
||||
PAYMENT_SPLIT(5, "分账入账"),
|
||||
REFUND_DEDUCTION(6, "退款扣款"),
|
||||
REFUND(7, "退款入账");
|
||||
|
||||
|
||||
private final int value;
|
||||
private final String text;
|
||||
|
||||
AccountItemTypeEnum(int value, String text) {
|
||||
this.value = value;
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getText() {
|
||||
return text == null ? "" : text.trim();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user