邱宇豪
2023-09-26 9538bdb6ee3714e030d41807e6ab46cd6258d590
hd/pipe/materialsManage/src/main/resources/mapping/SysEmbedmentGoodsMapper.xml
@@ -27,6 +27,10 @@
    <if test="embedmentType != null">
      and embedment_type=#{embedmentType}
    </if>
    <if test="embedmentModel != null">
      and embedment_model=#{embedmentModel}
    </if>
  </select>
  <insert id="insert" >
@@ -129,14 +133,18 @@
        sag.remark as remark,
        sd.dict_name as dictName
        from sys_embedment_goods sag
        left join  sys_dict sd on sag.assist_type=sd.dict_id
        left join  sys_dict sd on sag.embedment_type=sd.dict_id
        where  sag.is_use=1
        <if test="assistName!=null and assistName!='' ">
            and sag.assist_name like concat('%',#{assistName},'%')
        <if test="embedmentName!=null and embedmentName!='' ">
            and sag.embedment_name like concat('%',#{embedmentName},'%')
        </if>
        <if test="companyId!=null and companyId!='' ">
            and sag.company_id=#{companyId}
        </if>
        <if test="id!=null and id!='' ">
            and sag.id=#{id}
        </if>
        order by  sag.create_time desc
  </select>
  <select id="findEntity" parameterType="java.lang.String" resultType="com.thhy.materials.modules.biz.embedment.entity.SysEmbedmentGoodsEntity">
@@ -152,8 +160,8 @@
        sag.create_time as createTime,
        sag.remark as remark,
      sd.dict_name as dictName from sys_embedment_goods sag left join  sys_dict sd
      on sag.assist_type=sd.dict_id
      where  sag.is_use=1 and sag.id=#{assistId}
      on sag.embedment_type=sd.dict_id
      where  sag.is_use=1 and sag.id=#{id}
  </select>
  <update id="delete" parameterType="java.lang.String" >
    update sys_embedment_goods set
@@ -220,8 +228,5 @@
    </set>
    where id = #{id,jdbcType=VARCHAR}
  </update>
  <select id="assistGood" parameterType="java.lang.String" resultType="java.lang.String">
    select id from sys_assist_record where assist_id=#{assistId} and is_use=1
  </select>
</mapper>