package com.chenyang.nse.bussiness.dao.table.core.desensitizationimgtask;

import com.chenyang.nse.bussiness.dao.BaseDao;
import com.chenyang.nse.bussiness.entity.orm.table.core.desensitizationimgtask.DesensitizationImgInfo;
import com.chenyang.nse.bussiness.entity.vo.dataproject.ImgTaskVO;
import java.util.List;
import org.hibernate.transform.Transformers;
import org.springframework.stereotype.Repository;

@Repository
public class DesensitizationImgInfoDao extends BaseDao<DesensitizationImgInfo, String> {
   public List<ImgTaskVO> editInitQuery(String taskid) {
      String sql = "select a.taskname taskname,a.remark remark,b.sourceDirPath sourceDirPath,b.maskingImgType maskingImgType,b.maskingContent maskingContent,b.targetDirPath targetDirPath,b.taskid taskid from DESENSITIZATIONIMGTASK a left outer join DESENSITIZATIONIMGINFO b on a.id = b.taskid where b.taskid='" + taskid + "'";
      List<ImgTaskVO> list = this.getSession().createNativeQuery(sql).setResultTransformer(Transformers.aliasToBean(ImgTaskVO.class)).getResultList();
      return list;
   }
}
