|
@@ -138,18 +138,18 @@
|
|
|
SELECT * FROM `subject`
|
|
|
<where>
|
|
|
parent_subject_id_ != 0 AND del_flag_ = 0
|
|
|
- <if test="parentSubjectId != null and topLeverCategoryId != ''">
|
|
|
- parent_subject_id_ = #{parentSubjectId}
|
|
|
+ <if test="parentSubjectId != null and parentSubjectId != ''">
|
|
|
+ AND parent_subject_id_ = #{parentSubjectId}
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
- <select id="search" resultType="com.ym.mec.biz.dal.entity.Subject">
|
|
|
+ <select id="search" resultMap="Subject">
|
|
|
SELECT * FROM `subject`
|
|
|
<where>
|
|
|
del_flag_ = 0
|
|
|
<if test="search != null and search != ''">
|
|
|
- (id_ = #{search} or name_ like concat('%', #{search}, '%')
|
|
|
+ AND (id_ = #{search} or name_ like concat('%', #{search}, '%'))
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|