| @@ -0,0 +1,189 @@ | |||
| package com.simple.domain.po; | |||
| import javax.persistence.Id; | |||
| import javax.persistence.Table; | |||
| import javax.persistence.Transient; | |||
| import java.io.Serializable; | |||
| import java.util.ArrayList; | |||
| import java.util.Date; | |||
| import java.util.List; | |||
| @Table(name = "wx_group") | |||
| public class WxGroup implements Serializable { | |||
| private static final long serialVersionUID = 1L; | |||
| @Id | |||
| protected String id; | |||
| @Transient | |||
| protected List<String> ids; | |||
| @Transient | |||
| protected String sortColumns; | |||
| public String getId() { | |||
| return id; | |||
| } | |||
| public void setId(String id) { | |||
| this.id = id; | |||
| } | |||
| public String getSortColumns() { | |||
| return sortColumns; | |||
| } | |||
| public List<String> getIds() { | |||
| return ids; | |||
| } | |||
| public void setIds(List<String> ids) { | |||
| this.ids = ids; | |||
| } | |||
| /*商场名**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="商场名",name="name") | |||
| private String name; | |||
| /*国家**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="国家",name="country") | |||
| private String country; | |||
| /*省**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="省",name="province") | |||
| private String province; | |||
| /*城市**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="城市",name="city") | |||
| private String city; | |||
| /*地址**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="地址",name="addr") | |||
| private String addr; | |||
| /***/ | |||
| @io.swagger.annotations.ApiModelProperty(value="",name="longitude") | |||
| private String longitude; | |||
| /***/ | |||
| @io.swagger.annotations.ApiModelProperty(value="",name="latitude") | |||
| private String latitude; | |||
| /***/ | |||
| @io.swagger.annotations.ApiModelProperty(value="",name="createtime") | |||
| private Date createtime; | |||
| /***/ | |||
| @io.swagger.annotations.ApiModelProperty(value="",name="logurl") | |||
| private String logurl; | |||
| public String getName() { | |||
| return name; | |||
| } | |||
| public void setName(String _name) { | |||
| name = _name; | |||
| } | |||
| public String getCountry() { | |||
| return country; | |||
| } | |||
| public void setCountry(String _country) { | |||
| country = _country; | |||
| } | |||
| public String getProvince() { | |||
| return province; | |||
| } | |||
| public void setProvince(String _province) { | |||
| province = _province; | |||
| } | |||
| public String getCity() { | |||
| return city; | |||
| } | |||
| public void setCity(String _city) { | |||
| city = _city; | |||
| } | |||
| public String getAddr() { | |||
| return addr; | |||
| } | |||
| public void setAddr(String _addr) { | |||
| addr = _addr; | |||
| } | |||
| public String getLongitude() { | |||
| return longitude; | |||
| } | |||
| public void setLongitude(String _longitude) { | |||
| longitude = _longitude; | |||
| } | |||
| public String getLatitude() { | |||
| return latitude; | |||
| } | |||
| public void setLatitude(String _latitude) { | |||
| latitude = _latitude; | |||
| } | |||
| public Date getCreatetime() { | |||
| return createtime; | |||
| } | |||
| public void setCreatetime(Date _createtime) { | |||
| createtime = _createtime; | |||
| } | |||
| public String getLogurl() { | |||
| return logurl; | |||
| } | |||
| public void setLogurl(String _logurl) { | |||
| logurl = _logurl; | |||
| } | |||
| public static enum Field | |||
| { | |||
| Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | |||
| ,Name_ASC("`name` ASC"),Name_DESC("`name` DESC") | |||
| ,Country_ASC("`country` ASC"),Country_DESC("`country` DESC") | |||
| ,Province_ASC("`province` ASC"),Province_DESC("`province` DESC") | |||
| ,City_ASC("`city` ASC"),City_DESC("`city` DESC") | |||
| ,Addr_ASC("`addr` ASC"),Addr_DESC("`addr` DESC") | |||
| ,Longitude_ASC("`longitude` ASC"),Longitude_DESC("`longitude` DESC") | |||
| ,Latitude_ASC("`latitude` ASC"),Latitude_DESC("`latitude` DESC") | |||
| ,Createtime_ASC("`createtime` ASC"),Createtime_DESC("`createtime` DESC") | |||
| ,Logurl_ASC("`logurl` ASC"),Logurl_DESC("`logurl` DESC") | |||
| ; | |||
| private String value; | |||
| Field(String value){ | |||
| this.value = value; | |||
| } | |||
| public String getValue() { | |||
| return value; | |||
| } | |||
| public void setCol(String value) { | |||
| this.value = value; | |||
| } | |||
| @Override | |||
| public String toString() { | |||
| return this.getValue(); | |||
| } | |||
| } | |||
| public void setSortColumns(Field... fields) | |||
| { | |||
| if (fields == null || fields.length == 0) { | |||
| return; | |||
| } | |||
| for (int k = 0; k < fields.length; k++) { | |||
| if (fields[k] == null) { | |||
| return; | |||
| } | |||
| } | |||
| StringBuilder sb = new StringBuilder(fields[0].toString()); | |||
| for (int k = 1; k < fields.length; k++) { | |||
| sb.append(","); | |||
| sb.append(fields[k].toString()); | |||
| } | |||
| } | |||
| public void setSortColumns(String sortColumns) | |||
| { | |||
| if (sortColumns == null || "".equals(sortColumns.trim())) { | |||
| return; | |||
| } | |||
| if (sortColumns.contains(",")) { | |||
| String[] cols = sortColumns.split(","); | |||
| List<Field> fList = new ArrayList(); | |||
| for (int k = 0; k < cols.length; k++) { | |||
| fList.add(Field.valueOf(cols[k])); | |||
| } | |||
| this.setSortColumns(fList.toArray(new Field[fList.size()])); | |||
| } else { | |||
| this.setSortColumns(Field.valueOf(sortColumns)); | |||
| } | |||
| } | |||
| } | |||