package cn.stylefeng.guns.zjxl.dao;

import cn.stylefeng.guns.zjxl.model.ZjxlArticleContent;
import cn.stylefeng.guns.zjxl.model.ZjxlSystemDict;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

/***
 * @ClassName: ZjxlSystemDictDao
 * @Description:
 * @Auther: shi kejing
 * @Date: 2020/11/4 9:14
 */
public interface ZjxlSystemDictDao extends PagingAndSortingRepository<ZjxlSystemDict,Long>, JpaSpecificationExecutor<ZjxlSystemDict> {

    @Modifying
    @Query("delete from ZjxlSystemDict a where a.systemDictId = ?1")
    int deleteBySystemDictId(String id);

    @Modifying
    @Query("update ZjxlSystemDict a set a.systemDictIsLine = ?2 where a.systemDictId = ?1")
    int updateBySystemDictId(String id, Integer isLine);
}
