commit | author | age
|
a18bfa
|
1 |
package cn.autoform.bean.seache; |
Z |
2 |
|
|
3 |
import cn.autoform.bean.form.CpnType; |
|
4 |
import cn.autoform.util.tool.ObjectUtil; |
|
5 |
import cn.autoform.util.tool.RequestContext; |
|
6 |
import lombok.Data; |
|
7 |
|
|
8 |
@Data |
|
9 |
public class SeacheConditions { |
|
10 |
|
|
11 |
/** |
|
12 |
* key |
|
13 |
*/ |
|
14 |
public static final String PARAM_KEY = "search"; |
|
15 |
|
|
16 |
/** |
|
17 |
* 控件类型 |
|
18 |
*/ |
|
19 |
private CpnType type; |
|
20 |
|
|
21 |
/** |
|
22 |
* 控件别名 |
|
23 |
*/ |
|
24 |
private String fieldName; |
|
25 |
|
|
26 |
/** |
|
27 |
* 左值 |
|
28 |
*/ |
|
29 |
private Object valueLeft; |
|
30 |
|
|
31 |
/** |
|
32 |
* 右值 |
|
33 |
*/ |
|
34 |
private Object valueRight; |
|
35 |
|
|
36 |
public SeacheConditions(CpnType type, String fieldName, Object valueLeft, Object valueRight) { |
|
37 |
super(); |
|
38 |
this.type = type; |
|
39 |
this.fieldName = fieldName; |
|
40 |
this.valueLeft = valueLeft; |
|
41 |
this.valueRight = valueRight; |
|
42 |
} |
|
43 |
|
|
44 |
public SeacheConditions() { |
|
45 |
super(); |
|
46 |
} |
|
47 |
|
|
48 |
public String getFieldName() { |
|
49 |
if(ObjectUtil.empty(RequestContext.getFormId())) { |
|
50 |
return fieldName; |
|
51 |
}else{ |
|
52 |
return RequestContext.getFormName(RequestContext.getTenantId(), RequestContext.getFormId()) + "." + fieldName; |
|
53 |
} |
|
54 |
} |
|
55 |
} |