MerchantParams.java
1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
package com.diligrp.cashier.trade.domain;
import com.diligrp.cashier.shared.util.JsonUtils;
import java.util.Objects;
public class MerchantParams {
// 收银台配置
private CashierParams cashier;
public static MerchantParams decode(String params) {
return JsonUtils.fromJsonString(params, MerchantParams.class);
}
public CashierParams getCashier() {
return cashier;
}
public void setCashier(CashierParams cashier) {
this.cashier = cashier;
}
public static class CashierParams {
// PC收银台地址
private String pcUrl;
// 小程序收银台地址
private String miniProUrl;
// H5收银台地址
private String h5Url;
// 小程序收银台地址
private String appUrl;
public void override(CashierParams params) {
if (Objects.isNull(this.pcUrl)) {
this.pcUrl = params.getPcUrl();
}
if (Objects.isNull(this.miniProUrl)) {
this.miniProUrl = params.getMiniProUrl();
}
if (Objects.isNull(this.h5Url)) {
this.h5Url = params.getH5Url();
}
if (Objects.isNull(this.appUrl)) {
this.appUrl = params.getAppUrl();
}
}
public String getPcUrl() {
return pcUrl;
}
public void setPcUrl(String pcUrl) {
this.pcUrl = pcUrl;
}
public String getMiniProUrl() {
return miniProUrl;
}
public void setMiniProUrl(String miniProUrl) {
this.miniProUrl = miniProUrl;
}
public String getH5Url() {
return h5Url;
}
public void setH5Url(String h5Url) {
this.h5Url = h5Url;
}
public String getAppUrl() {
return appUrl;
}
public void setAppUrl(String appUrl) {
this.appUrl = appUrl;
}
}
}