1234567891011121314151617181920212223242526272829303132 |
- 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<TaskGoodsDO,String>,JpaSpecificationExecutor<TaskGoodsDO> {
- @Query("select t from TaskGoodsDO t where t.activityId=?1")
- List<TaskGoodsDO> 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);
- }
|