|
|
|
@ -28,37 +28,27 @@ public class AppActBean {
|
|
|
|
|
private String active_date;
|
|
|
|
|
private String expire_date;
|
|
|
|
|
private String banner_img;
|
|
|
|
|
private String msg_start_date;
|
|
|
|
|
private String msg_end_date;
|
|
|
|
|
private String msg_interval;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public JSONObject toJsonParam(){
|
|
|
|
|
JSONObject params = new JSONObject();
|
|
|
|
|
if(StringUtils.isNotEmpty(act_name)){
|
|
|
|
|
params.put("act_name",act_name);
|
|
|
|
|
}
|
|
|
|
|
if(StringUtils.isNotEmpty(act_url)){
|
|
|
|
|
params.put("act_url",act_url);
|
|
|
|
|
}
|
|
|
|
|
if(StringUtils.isNotEmpty(params_json)){
|
|
|
|
|
params.put("params_json",params_json);
|
|
|
|
|
}
|
|
|
|
|
if(StringUtils.isNotEmpty(desc)){
|
|
|
|
|
params.put("desc",desc);
|
|
|
|
|
}
|
|
|
|
|
if(StringUtils.isNotEmpty(act_content)){
|
|
|
|
|
params.put("act_content",act_content);
|
|
|
|
|
}
|
|
|
|
|
if(StringUtils.isNotEmpty(show_type)){
|
|
|
|
|
params.put("show_type",show_type);
|
|
|
|
|
}
|
|
|
|
|
if(StringUtils.isNotEmpty(act_img)){
|
|
|
|
|
params.put("act_img",act_img);
|
|
|
|
|
}
|
|
|
|
|
if(StringUtils.isNotEmpty(window_img)){
|
|
|
|
|
params.put("window_img",window_img);
|
|
|
|
|
}
|
|
|
|
|
if(StringUtils.isNotEmpty(banner_img)){
|
|
|
|
|
params.put("banner_img",banner_img);
|
|
|
|
|
}
|
|
|
|
|
params.put("act_name",act_name);
|
|
|
|
|
params.put("act_url",act_url);
|
|
|
|
|
params.put("params_json",params_json);
|
|
|
|
|
params.put("desc",desc);
|
|
|
|
|
params.put("act_content",act_content);
|
|
|
|
|
params.put("show_type",show_type);
|
|
|
|
|
params.put("act_img",act_img);
|
|
|
|
|
params.put("window_img",window_img);
|
|
|
|
|
params.put("banner_img",banner_img);
|
|
|
|
|
params.put("msg_interval",msg_interval);
|
|
|
|
|
params.put("is_show_window",is_show_window);
|
|
|
|
|
params.put("is_valid",is_valid);
|
|
|
|
|
params.put("msg_start_date", msg_start_date);
|
|
|
|
|
params.put("msg_end_date", msg_end_date);
|
|
|
|
|
if (active_date != null) {
|
|
|
|
|
try {
|
|
|
|
|
Date fromDate = DateUtils.parseDate(active_date, DATE_PATTERNS);
|
|
|
|
@ -75,8 +65,22 @@ public class AppActBean {
|
|
|
|
|
throw new ParamInvalidException("expire_date", "error.payment.valid.invalid_date_format");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
params.put("is_show_window",is_show_window);
|
|
|
|
|
params.put("is_valid",is_valid);
|
|
|
|
|
if (msg_start_date != null) {
|
|
|
|
|
try {
|
|
|
|
|
Date fromDate = DateUtils.parseDate(msg_start_date, DATE_PATTERNS);
|
|
|
|
|
params.put("msg_start_date", fromDate);
|
|
|
|
|
} catch (ParseException e) {
|
|
|
|
|
throw new ParamInvalidException("msg_start_date", "error.payment.valid.invalid_date_format");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (msg_end_date != null) {
|
|
|
|
|
try {
|
|
|
|
|
Date fromDate = DateUtils.parseDate(msg_end_date, DATE_PATTERNS);
|
|
|
|
|
params.put("msg_end_date", fromDate);
|
|
|
|
|
} catch (ParseException e) {
|
|
|
|
|
throw new ParamInvalidException("msg_end_date", "error.payment.valid.invalid_date_format");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return params;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -183,4 +187,28 @@ public class AppActBean {
|
|
|
|
|
public void setBanner_img(String banner_img) {
|
|
|
|
|
this.banner_img = banner_img;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getMsg_start_date() {
|
|
|
|
|
return msg_start_date;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setMsg_start_date(String msg_start_date) {
|
|
|
|
|
this.msg_start_date = msg_start_date;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getMsg_end_date() {
|
|
|
|
|
return msg_end_date;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setMsg_end_date(String msg_end_date) {
|
|
|
|
|
this.msg_end_date = msg_end_date;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public String getMsg_interval() {
|
|
|
|
|
return msg_interval;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setMsg_interval(String msg_interval) {
|
|
|
|
|
this.msg_interval = msg_interval;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|