Browse Source

Merge branch 'master' of https://gitee.com/zouxuan/mec

zouxuan 5 years ago
parent
commit
2ed9200e6d

+ 2 - 1
cms/src/main/resources/config/mybatis/SysNewsInformationMapper.xml

@@ -90,8 +90,9 @@
 	
 	<!-- 分页查询 -->
 	<select id="queryPage" resultMap="SysNewsInformation" parameterType="map">
-		SELECT * FROM sys_news_information ORDER BY id_ 
+		SELECT * FROM sys_news_information
 		<include refid="queryCondition" />
+		<include refid="global.orderby" />
 		<include refid="global.limit"/>
 	</select>
 	

+ 12 - 2
mec-common/common-core/src/main/java/com/ym/mec/common/dal/CustomEnumTypeHandler.java

@@ -45,9 +45,19 @@ public class CustomEnumTypeHandler extends BaseTypeHandler<BaseEnum> {
 	}
 
 	public BaseEnum convert(Object name) {
+		Object code = null;
 		for (BaseEnum enumBaseInterface : type.getEnumConstants()) {
-			if (enumBaseInterface.getCode().equals(name)) {
-				return enumBaseInterface;
+
+			code = enumBaseInterface.getCode();
+
+			if (code instanceof Integer) {
+				if ((int)code == Integer.parseInt(name.toString())) {
+					return enumBaseInterface;
+				}
+			} else {
+				if (code.equals(name)) {
+					return enumBaseInterface;
+				}
 			}
 		}
 		return null;

+ 1 - 1
mec-common/common-core/src/main/java/com/ym/mec/common/page/QueryInfo.java

@@ -22,7 +22,7 @@ public class QueryInfo {
 	/**
 	 * 默认排序列
 	 */
-	private String sort = "create_on_";
+	private String sort = "create_time_";
 	/**
 	 * 默认排序方向
 	 */