package com.yihu.jw.dao;/** * Created by nature of king on 2018/6/8. */ import com.yihu.jw.entity.health.bank.ActivityDO; import com.yihu.jw.entity.health.bank.TaskGoodsDO; 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; import java.util.List; /** * @author wangzhinan * @create 2018-06-08 15:28 * @desc 商品 dao **/ public interface TaskGoodsDao extends PagingAndSortingRepository,JpaSpecificationExecutor { @Query("select t from TaskGoodsDO t where t.activityId=?1") List selectByActivityId(String activityId); @Query("select t from TaskGoodsDO t where t.id=?1") TaskGoodsDO selectById(String di); @Modifying @Query("delete from TaskGoodsDO tg where tg.activityId=?1") void deleteByActivityId(String activityId); }