Skip to content

Commit

Permalink
dict增加英文支持
Browse files Browse the repository at this point in the history
  • Loading branch information
cFrost-sun committed Sep 24, 2017
1 parent 7eee78c commit 5f4281e
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 6 deletions.
2 changes: 1 addition & 1 deletion euler-web-authentication-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>net.eulerframework</groupId>
<artifactId>euler-framework</artifactId>
<version>0.3.4</version>
<version>0.3.5</version>
</parent>
<artifactId>euler-web-authentication-impl</artifactId>
<name>Euler Web Authentication Implement</name>
Expand Down
2 changes: 1 addition & 1 deletion euler-web-authentication/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>net.eulerframework</groupId>
<artifactId>euler-framework</artifactId>
<version>0.3.4</version>
<version>0.3.5</version>
</parent>
<artifactId>euler-web-authentication</artifactId>
<name>Euler Web Authentication</name>
Expand Down
2 changes: 1 addition & 1 deletion euler-web-basic/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>net.eulerframework</groupId>
<artifactId>euler-framework</artifactId>
<version>0.3.4</version>
<version>0.3.5</version>
</parent>
<artifactId>euler-web-basic</artifactId>
<name>Euler Web Basic</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import org.hibernate.criterion.MatchMode;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
import org.springframework.util.Assert;
import org.springframework.util.CollectionUtils;

import net.eulerframework.common.util.StringUtils;
import net.eulerframework.web.core.base.dao.impl.hibernate5.BaseDao;
Expand Down Expand Up @@ -61,5 +63,18 @@ public EasyUIPageResponse<Dictionary> findDictionaryByPage(QueryRequest queryReq

return this.pageQuery(detachedCriteria, pageIndex, pageSize);
}

/**
* @param key
* @return
*/
public Dictionary findDictionaryByKey(String key) {
Assert.hasText(key);
DetachedCriteria detachedCriteria = DetachedCriteria.forClass(this.entityClass);
detachedCriteria.add(Restrictions.eq("key", key));
List<Dictionary> ret = this.query(detachedCriteria);

return CollectionUtils.isEmpty(ret) ? null : ret.get(0);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ public class Dictionary extends UUIDEntity<Dictionary> {
@Column(name = "DICT_KEY", nullable = false)
private String key;
@Column(name = "DICT_VALUE")
private String value;
private String value;
@Column(name = "DICT_VALUE_ENUS")
private String valueEnUs;
@Column(name = "SHOW_ORDER", nullable = false)
private Integer showOrder;
public String getCode() {
Expand All @@ -43,6 +45,12 @@ public String getValue() {
public void setValue(String value) {
this.value = value;
}
public String getValueEnUs() {
return valueEnUs;
}
public void setValueEnUs(String valueEnUs) {
this.valueEnUs = valueEnUs;
}
public Integer getShowOrder() {
return showOrder;
}
Expand Down
2 changes: 1 addition & 1 deletion euler-web-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>net.eulerframework</groupId>
<artifactId>euler-framework</artifactId>
<version>0.3.4</version>
<version>0.3.5</version>
</parent>
<artifactId>euler-web-core</artifactId>
<name>Euler Web Core</name>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</parent>

<artifactId>euler-framework</artifactId>
<version>0.3.4</version>
<version>0.3.5</version>
<packaging>pom</packaging>
<name>Euler Framework Parent Pom</name>
<url>https://eulerproject.io/euler-framework</url>
Expand Down

0 comments on commit 5f4281e

Please sign in to comment.