银盛相关所有
This commit is contained in:
@@ -0,0 +1,278 @@
|
||||
package cn.pluss.platform.entity;
|
||||
|
||||
import cn.pluss.platform.exception.MsgException;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
@Setter
|
||||
@Getter
|
||||
@TableName(value = "tb_pluss_merc_change_record", autoResultMap = true)
|
||||
public class MercChangeRecord {
|
||||
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 商户基本信息
|
||||
*/
|
||||
@TableField(typeHandler = FastjsonTypeHandler.class)
|
||||
private MerchantBaseInfo baseInfo;
|
||||
|
||||
@TableField(typeHandler = FastjsonTypeHandler.class)
|
||||
private MerchantBaseInfo preBaseInfo;
|
||||
|
||||
/**
|
||||
* 法人身份证信息
|
||||
*/
|
||||
@TableField(typeHandler = FastjsonTypeHandler.class)
|
||||
private IdCard legalCardInfo;
|
||||
|
||||
@TableField(typeHandler = FastjsonTypeHandler.class)
|
||||
private IdCard preLegalCardInfo;
|
||||
|
||||
/**
|
||||
* 结算身份证信息
|
||||
*/
|
||||
@TableField(typeHandler = FastjsonTypeHandler.class)
|
||||
private IdCard idCardInfo;
|
||||
|
||||
@TableField(typeHandler = FastjsonTypeHandler.class)
|
||||
private IdCard preIdCardInfo;
|
||||
|
||||
/**
|
||||
* 结算银行卡信息
|
||||
*/
|
||||
@TableField(typeHandler = FastjsonTypeHandler.class)
|
||||
private BankCard bankCardInfo;
|
||||
|
||||
@TableField(typeHandler = FastjsonTypeHandler.class)
|
||||
private BankCard preBankCardInfo;
|
||||
|
||||
/**
|
||||
* 费率信息
|
||||
*/
|
||||
@TableField(typeHandler = FastjsonTypeHandler.class)
|
||||
private MerchantRateNew rateInfo;
|
||||
|
||||
@TableField(typeHandler = FastjsonTypeHandler.class)
|
||||
private MerchantRateNew preRateInfo;
|
||||
|
||||
private JSONObject ext;
|
||||
|
||||
@TableField("changeForm")
|
||||
private String changeForm;
|
||||
|
||||
/**
|
||||
* 状态:0: 待审核;1:审核中;2:审核驳回;3:审核通过
|
||||
*/
|
||||
private String status;
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public void setStatus(MercChangeRecord.Status status) {
|
||||
this.setStatus(status.getValue());
|
||||
}
|
||||
|
||||
/**
|
||||
* 备注信息,驳回理由
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 通道业务id
|
||||
*/
|
||||
private String applicationId;
|
||||
|
||||
/**
|
||||
* 通道id
|
||||
*/
|
||||
private String channelId;
|
||||
|
||||
public String getChannelType() {
|
||||
if ("1".equals(channelId) || "3".equals(channelId)) {
|
||||
return "D1";
|
||||
}
|
||||
|
||||
if ("4".equals(channelId)) {
|
||||
return "D0";
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getChannelName() {
|
||||
if ("1".equals(channelId)) {
|
||||
return "随行付";
|
||||
}
|
||||
|
||||
if ("3".equals(channelId)) {
|
||||
return "瑞银信";
|
||||
}
|
||||
|
||||
if ("4".equals(channelId)) {
|
||||
return "银盛";
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
if ("1".equals(channelId)) {
|
||||
return "D1次日到账-随行付通道";
|
||||
}
|
||||
|
||||
if ("3".equals(channelId)) {
|
||||
return "D1次日到账-瑞银信通道";
|
||||
}
|
||||
|
||||
if ("4".equals(channelId)) {
|
||||
return "D0实时到账-银盛通道";
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getChannelTypeDesc() {
|
||||
if ("1".equals(channelId) || "3".equals(channelId)) {
|
||||
return "次日到账";
|
||||
}
|
||||
|
||||
if ("4".equals(channelId)) {
|
||||
return "实时到账";
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@TableField(insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER)
|
||||
private String virMerchantId;
|
||||
|
||||
/**
|
||||
* 变更类型,
|
||||
* 1:基本信息变更、法人信息变更(补充);
|
||||
* 2:结算信息变更;
|
||||
* 3:费率变更;
|
||||
* 5:结算人信息变更(补充);
|
||||
*/
|
||||
private String changeType;
|
||||
|
||||
public void setChangeType(String changeType) {
|
||||
this.changeType = changeType;
|
||||
}
|
||||
|
||||
public void setChangeType(MercChangeRecord.Type changeType) {
|
||||
this.changeType = changeType.getValue();
|
||||
}
|
||||
|
||||
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 审核出结果时间
|
||||
*/
|
||||
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date resultTime;
|
||||
|
||||
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum Status {
|
||||
|
||||
EDIT("0", "编辑中"),
|
||||
AUDITING("1", "审核中"),
|
||||
REFUSE("2", "已驳回"),
|
||||
SUCCESS("3", "通过已生效"),
|
||||
/**
|
||||
* 审核通过,未生效,该状态主要用于随行付变更费率第二天生效的情况
|
||||
*/
|
||||
SUCCESS_INVALID("4", "通过未生效"),
|
||||
/**
|
||||
* 已过期
|
||||
*/
|
||||
EXPIRED("5", "已过期"),
|
||||
NO_DATA("-1", "未开通");
|
||||
|
||||
public static Status getByStatus(String value) {
|
||||
for (Status status : Status.values()) {
|
||||
if (status.getValue().equals(value)) {
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Status getAppStatus(String value) {
|
||||
Status byStatus = getByStatus(value);
|
||||
if (byStatus == Status.EDIT) {
|
||||
return Status.AUDITING;
|
||||
}
|
||||
|
||||
return byStatus;
|
||||
}
|
||||
|
||||
private final String value;
|
||||
|
||||
private final String desc;
|
||||
}
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum Type {
|
||||
BASE("1"),
|
||||
/**
|
||||
* 结算信息
|
||||
*/
|
||||
ACCOUNT("2"),
|
||||
RATE("3"),
|
||||
/**
|
||||
* 营业执照
|
||||
*/
|
||||
BLL("4"),
|
||||
CARD("5"),
|
||||
ACCOUNT_CARD("52"),
|
||||
ADDRESS("6"),
|
||||
/** 交易提额 */
|
||||
AMOUNT_LIMIT("7"),
|
||||
/** 远程交易 */
|
||||
BOUNDARY("8"),
|
||||
/** 分时结算 */
|
||||
TIME_OF_USE("9"),
|
||||
/** 重置报备 */
|
||||
RESET("10"),
|
||||
CANCELLATION("11"),
|
||||
;
|
||||
|
||||
private final String value;
|
||||
|
||||
public static Type getByValue(String value) {
|
||||
for (Type type : Type.values()) {
|
||||
if (Objects.equals(value, type.value)) {
|
||||
return type;
|
||||
}
|
||||
}
|
||||
|
||||
throw new MsgException("未知的操作类型");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,10 +2,14 @@ package cn.pluss.platform.entity;
|
||||
|
||||
import cn.pluss.platform.exception.MsgException;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.alibaba.fastjson.annotation.JSONType;
|
||||
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -18,10 +22,60 @@ import java.util.Objects;
|
||||
@Accessors(chain = true)
|
||||
public class MerchantChannelStatus {
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum AuditStatus {
|
||||
|
||||
RESET("0", null, "未开通"),
|
||||
EXAMINING("1", "-100", "待审核"),
|
||||
|
||||
CHANNEL_REQ("1", "-999","进件请求中"),
|
||||
CHANNEL_EXAMINING("1", null,"通道审核中"),
|
||||
REJECT("2", null, "已驳回"),
|
||||
SUCCESS("3", null, "进件通过"),
|
||||
SIGNING("8", null, "待签约"),
|
||||
CHANNEL_ARTIFICIAL_EXAMINING("11", null, "通道人工审核中"),
|
||||
;
|
||||
|
||||
public static AuditStatus get(String code, String thirdCode) {
|
||||
AuditStatus result = null;
|
||||
for (AuditStatus item : AuditStatus.values()) {
|
||||
if (Objects.equals(code, item.getCode()) && item.getThirdCode() == null) {
|
||||
result = item;
|
||||
}
|
||||
|
||||
if (Objects.equals(code, item.getCode()) && Objects.equals(thirdCode, item.getThirdCode())) {
|
||||
return item;
|
||||
}
|
||||
}
|
||||
|
||||
if (result == null) {
|
||||
throw new MsgException("未知的进件状态");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public static AuditStatus get(MerchantChannelStatus mcs) {
|
||||
String mcsStatus = mcs.getStatus();
|
||||
String mcsThirdStatus = mcs.getThirdStatus();
|
||||
|
||||
return get(mcsStatus, mcsThirdStatus);
|
||||
}
|
||||
|
||||
private final String code;
|
||||
|
||||
private final String thirdCode;
|
||||
|
||||
private final String desc;
|
||||
}
|
||||
|
||||
public static final int VALID_STATUS_BAN = -1;
|
||||
|
||||
public static final int VALID_STATUS_NORMAL = 0;
|
||||
|
||||
public static final int VALID_STATUS_IN_USE = 1;
|
||||
|
||||
/**
|
||||
* 微信认证授权状态 - 未授权
|
||||
*/
|
||||
@@ -96,6 +150,9 @@ public class MerchantChannelStatus {
|
||||
|
||||
private Integer channel;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String channelName;
|
||||
|
||||
private String merchantCode;
|
||||
|
||||
private String merchantId;
|
||||
@@ -105,9 +162,11 @@ public class MerchantChannelStatus {
|
||||
*/
|
||||
private String status;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String statusDesc;
|
||||
|
||||
/**
|
||||
* 微信认证状态,0:未认证;1:已认证
|
||||
* 微信认证状态, 0: 未认证; 1: 已认证; -1: 不支持
|
||||
*/
|
||||
private String authorizationStatus;
|
||||
|
||||
@@ -117,6 +176,7 @@ public class MerchantChannelStatus {
|
||||
* @return 简化的状态
|
||||
*/
|
||||
public String getAppStatus() {
|
||||
|
||||
if (Objects.equals(status, MerchantChannelStatus.AUDIT_STATUS_RESET)
|
||||
&& Objects.equals(thirdStatus, MerchantChannelStatus.AUDIT_THIRD_STATUS_WAITING)) {
|
||||
return MerchantChannelStatus.AUDIT_STATUS_REJECT;
|
||||
@@ -131,24 +191,20 @@ public class MerchantChannelStatus {
|
||||
}
|
||||
|
||||
if (MerchantChannelStatus.AUDIT_STATUS_WAITING_SIGN.equals(status)) {
|
||||
return MerchantChannelStatus.AUDIT_STATUS_EXAMINING;
|
||||
return MerchantChannelStatus.AUDIT_STATUS_WAITING_SIGN;
|
||||
}
|
||||
|
||||
if (MerchantChannelStatus.AUDIT_STATUS_SIGNED.equals(status)) {
|
||||
return MerchantChannelStatus.AUDIT_STATUS_EXAMINING;
|
||||
}
|
||||
|
||||
if (MerchantChannelStatus.AUDIT_STATUS_ARTIFICIAL_EXAMINING.equals(status)) {
|
||||
return MerchantChannelStatus.AUDIT_STATUS_EXAMINING;
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
if (MerchantChannelStatus.AUDIT_STATUS_ARTIFICIAL_EXAMINING.equals(status)) {
|
||||
return MerchantChannelStatus.AUDIT_STATUS_EXAMINING;
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
private String thirdStatus;
|
||||
|
||||
private String remark;
|
||||
@@ -159,6 +215,11 @@ public class MerchantChannelStatus {
|
||||
@TableField(insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER)
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 进件完成时间
|
||||
*/
|
||||
private Date auditSuccessTime;
|
||||
|
||||
@TableField(insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER)
|
||||
private Date updateTime;
|
||||
|
||||
@@ -173,8 +234,8 @@ public class MerchantChannelStatus {
|
||||
private String callbackStatus;
|
||||
|
||||
/**
|
||||
* @description:结算类型:D0、D1、T1
|
||||
* @date: 2021/11/2 15:20
|
||||
* 结算类型:D0、D1、T1
|
||||
* @since 2021/11/2 15:20
|
||||
*/
|
||||
private String settlementType;
|
||||
|
||||
@@ -195,8 +256,27 @@ public class MerchantChannelStatus {
|
||||
/**
|
||||
* 其他数据
|
||||
*/
|
||||
@TableField(whereStrategy = FieldStrategy.NEVER)
|
||||
private JSONObject extra;
|
||||
|
||||
public JSONObject initExtra() {
|
||||
if (extra == null) {
|
||||
extra = new JSONObject();
|
||||
setExtra(extra);
|
||||
}
|
||||
|
||||
return extra;
|
||||
}
|
||||
|
||||
public JSONObject getExtra() {
|
||||
if (extra == null) {
|
||||
extra = new JSONObject();
|
||||
setExtra(extra);
|
||||
}
|
||||
|
||||
return extra;
|
||||
}
|
||||
|
||||
private Integer valid;
|
||||
|
||||
/**
|
||||
@@ -205,6 +285,20 @@ public class MerchantChannelStatus {
|
||||
@TableField(insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER)
|
||||
private String mercName;
|
||||
|
||||
/**
|
||||
* 接口版本
|
||||
*/
|
||||
private String interfaceVersion;
|
||||
|
||||
/**
|
||||
* 支付宝认证状态, 0: 未认证; 1: 已认证; -1: 不支持
|
||||
*/
|
||||
private String aliAuthorizationStatus;
|
||||
|
||||
private String wxCertUrl;
|
||||
|
||||
private String aliCertUrl;
|
||||
|
||||
/**
|
||||
* 是否能付款
|
||||
*
|
||||
@@ -235,7 +329,7 @@ public class MerchantChannelStatus {
|
||||
}
|
||||
|
||||
if (AUDIT_STATUS_EXAMINING.equals(status)) {
|
||||
MsgException.throwException("进件审核中,请勿重复提交");
|
||||
MsgException.throwException("进件审核中,请勿重复进件");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -274,31 +368,4 @@ public class MerchantChannelStatus {
|
||||
MerchantChannelStatus.AUDIT_STATUS_DATA_EDIT.equals(mcs.getStatus()) ||
|
||||
MerchantChannelStatus.AUDIT_STATUS_FIRST_TRIAL_SUCCESS.equals(mcs.getStatus());
|
||||
}
|
||||
|
||||
/**
|
||||
* (已进件的)商户当前是否可编辑
|
||||
* @param mcs 进件记录信息
|
||||
* @return
|
||||
*/
|
||||
public static boolean isAuditedEditable(MerchantChannelStatus mcs) {
|
||||
if (mcs == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return mcs.getStatus().equals(MerchantChannelStatus.AUDIT_STATUS_SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* (未进件的)商户当前是否可编辑
|
||||
* @param mcs 进件记录信息
|
||||
* @return
|
||||
*/
|
||||
public static boolean isUnauditedEditable(MerchantChannelStatus mcs) {
|
||||
if (mcs == null) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return MerchantChannelStatus.AUDIT_STATUS_REJECT.equals(mcs.getStatus()) ||
|
||||
MerchantChannelStatus.AUDIT_STATUS_RESET.equals(mcs.getStatus());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,6 +81,10 @@ public class MerchantImage {
|
||||
* 租赁合同
|
||||
*/
|
||||
public static final String TENANCY_AGREEMENTS = "12";
|
||||
/**
|
||||
* 变更申请表
|
||||
*/
|
||||
public static final String CHANGE_FORM = "13";
|
||||
/**
|
||||
* 结算人身份证正面
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user