<if test="name != null and name != ''">
   AND a.name LIKE 
	<if test="dbName == 'oracle'">'%'||#{name}||'%'</if>
	<if test="dbName == 'mssql'">'%'+#{name}+'%'</if>
	<if test="dbName == 'mysql'">concat('%',#{name},'%')</if>
</if>

遇到分类树结构,删除时如果有下级,则将下级也删除

<update >
	DELETE FROM dm_model_type
	WHERE id = #{id} OR parent_ids LIKE '%,'||#{id}||',%'
</update>

  

相关文章:

  • 2022-12-23
  • 2021-05-28
  • 2021-08-06
  • 2022-03-08
  • 2021-09-02
猜你喜欢
  • 2021-07-25
  • 2021-11-28
  • 2021-08-04
  • 2021-07-12
  • 2022-12-23
  • 2021-08-31
相关资源
相似解决方案