package com.ssj.dao.sys.feedback.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import com.ssj.bean.sys.feedback.domain.SconPhotoFeedbackDetail;

@Repository
public interface SconPhotoFeedbackDetailDao extends JpaRepository<SconPhotoFeedbackDetail, String>{

	public List<SconPhotoFeedbackDetail> findByFeedbackIdOrderByNumAsc(String feedbackId);

	@Query(nativeQuery = true, value = "select t2.* from scon_feedback t1 left join scon_photo_feedback_detail t2 on t1.id = t2.feedback_id where t1.biz_id=?1 order by num")
	public List<SconPhotoFeedbackDetail> findPhotoByPid (String bizId);
}
