yonge 3 anni fa
parent
commit
bd200f772a

+ 10 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/SysConfig.java

@@ -32,6 +32,8 @@ public class SysConfig extends BaseEntity {
 	/** 修改时间 */
 	private java.util.Date modifyOn;
 	
+	private Long modifyBy;
+	
 	@ApiModelProperty(value = "消息组", required = true)
 	private String group;
 	
@@ -99,6 +101,14 @@ public class SysConfig extends BaseEntity {
 		this.group = group;
 	}
 
+	public Long getModifyBy() {
+		return modifyBy;
+	}
+
+	public void setModifyBy(Long modifyBy) {
+		this.modifyBy = modifyBy;
+	}
+
 	@Override
 	public String toString() {
 		return ToStringBuilder.reflectionToString(this);

+ 11 - 3
cooleshow-user/user-biz/src/main/resources/config/mybatis/SubjectMapper.xml

@@ -83,7 +83,15 @@
 	</select>
 
     <select id="findByParentId" resultMap="Subject">
-        SELECT * FROM subject <include refid="querySubPageSql"/>
+        SELECT * FROM subject
+        <where>
+            <if test="parentId != null">
+                AND parent_subject_id_ = #{parentId}
+            </if>
+            <if test="delFlag != null">
+                AND del_flag_ = #{delFlag,typeHandler=com.yonge.cooleshow.common.dal.CustomEnumTypeHandler}
+            </if>
+        </where>
     </select>
 
     <select id="queryNameByIds" resultType="java.util.Map">
@@ -98,10 +106,10 @@
             <if test="delFlag != null">
                 AND del_flag_ = #{delFlag,typeHandler=com.yonge.cooleshow.common.dal.CustomEnumTypeHandler}
             </if>
-            <if test="queryType == 'category'">
+            <if test="queryType != null and queryType == 'category'">
             	and (parent_subject_id_ = 0 or parent_subject_id_ is null)
             </if>
-            <if test="queryType == 'list'">
+            <if test="queryType != null and queryType == 'list'">
             	and parent_subject_id_ > 0
             </if>
         </where>

+ 9 - 2
cooleshow-user/user-biz/src/main/resources/config/mybatis/SysConfigMapper.xml

@@ -11,6 +11,7 @@
 		<result column="create_on_" property="createOn" />
 		<result column="modify_on_" property="modifyOn" />
 		<result column="group_" property="group" />
+		<result column="modify_by_" property="modifyBy" />
 	</resultMap>
 
 	<!-- 根据主键查询一条记录 -->
@@ -33,8 +34,8 @@
 		<!-- <selectKey resultClass="int" keyProperty="id" > SELECT SEQ_WSDEFINITION_ID.nextval 
 			AS ID FROM DUAL </selectKey> -->
 		INSERT INTO sys_config
-		(id_,param_name_,param_value_,description_,create_on_,modify_on_,group_)
-		VALUES(#{id},#{paramName},#{paramValue},#{description},#{createOn},#{modifyOn},#{group})
+		(id_,param_name_,param_value_,description_,create_on_,modify_on_,group_,modify_by_)
+		VALUES(#{id},#{paramName},#{paramValue},#{description},#{createOn},#{modifyOn},#{group},#{modifyBy})
 	</insert>
 
 	<!-- 根据主键查询一条记录 -->
@@ -56,6 +57,9 @@
 			<if test="group != null">
 				group_ = #{group},
 			</if>
+			<if test="modifyBy != null">
+				modify_by_ = #{modifyBy},
+			</if>
 		</set>
 		WHERE id_ = #{id}
 	</update>
@@ -75,6 +79,9 @@
 				<if test="config.group != null">
 					group_ = #{config.group},
 				</if>
+				<if test="config.modifyBy != null">
+					modify_by_ = #{config.modifyBy},
+				</if>
 					modify_on_ = NOW()
 			</set>
 				WHERE id_ = #{config.id}