package cn.estsh.i3plus.pojo.wms.repository;

import cn.estsh.i3plus.pojo.base.jpa.dao.BaseRepository;
import cn.estsh.i3plus.pojo.wms.bean.WmsTrans;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

/**
 * @Description : 仓库交易记录表
 * @Reference :
 * @Author : jimmy.zeng
 * @CreateDate : 2018-11-02 9:49
 * @Modify:
 **/
@Repository
public interface WmsTransRepository extends BaseRepository<WmsTrans, Long> {

    @Modifying
    @Query("delete from WmsTrans w where w.groupId =:groupId and w.isValid = 1")
    void deleteByGroupId(@Param("groupId") Long groupId);
}
