| | |
| | | <resultMap id="dataResult" type="cn.huge.module.file.domain.po.FileRelate"> |
| | | <result property="id" column="id"/> |
| | | <result property="fileId" column="file_id"/> |
| | | <result property="mainId" column="main_id"/> |
| | | <result property="ownerId" column="owner_id"/> |
| | | <result property="ownerCat" column="owner_cat"/> |
| | | <result property="ownerType" column="owner_type"/> |
| | |
| | | <sql id="column-part"> |
| | | id, |
| | | file_id, |
| | | main_id, |
| | | owner_id, |
| | | owner_cat, |
| | | owner_type, |
| | |
| | | <!-- 更新实体字段 --> |
| | | <sql id="set-part"> |
| | | <if test="entity.fileId != null">file_id = #{entity.fileId},</if> |
| | | <if test="entity.mainId != null">main_id = #{entity.mainId},</if> |
| | | <if test="entity.ownerId != null">owner_id = #{entity.ownerId},</if> |
| | | <if test="entity.ownerCat != null">owner_cat = #{entity.ownerCat},</if> |
| | | <if test="entity.ownerType != null">owner_type = #{entity.ownerType},</if> |
| | |
| | | <if test="terms.fileId != null and terms.fileId !=''"> |
| | | and file_id = #{terms.fileId} |
| | | </if> |
| | | <if test="terms.mainId != null and terms.mainId !=''"> |
| | | and main_id = #{terms.mainId} |
| | | </if> |
| | | <if test="terms.ownerId != null and terms.ownerId !=''"> |
| | | and owner_id = #{terms.ownerId} |
| | | </if> |