package com.fzzy.api.view.repository; import com.fzzy.api.entity.Api1105; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; import org.springframework.transaction.annotation.Transactional; import java.util.Date; import java.util.List; public interface Api1105Rep extends JpaRepository { /** * 根据表单主键更新操作标志状态 * * @param id 主键ID * @param czbz 操作标志 * @return */ @Transactional @Modifying @Query("update Api1105 set czbz=:czbz where hwdm =:id ") int updateStatus(@Param("id") String id, @Param("czbz") String czbz); /** * 根据货位代码查询 * * @param hwdm * @return */ @Query("from Api1105 where hwdm=:hwdm ") List findPushDataByHwdm(@Param("hwdm") String hwdm); /** * @param kqdm * @return */ @Query("from Api1105 where kqdm=:kqdm ") List findPushData(@Param("kqdm") String kqdm); /** * * @param kqdm * @return */ @Query("from Api1105 where kqdm=:kqdm and zhgxsj >=:start and zhgxsj <:end order by zhgxsj ") List findPushDataTime(@Param("kqdm") String kqdm, @Param("start") Date start, @Param("end") Date end); /** * 根据货位代码查询 * * @param hwdm * @return */ @Query("from Api1105 where hwdm=:hwdm ") Api1105 findDataByHwdm(@Param("hwdm") String hwdm); }