package com.njcn.csdevice.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njcn.csdevice.pojo.param.AppProjectQueryParm;
import com.njcn.csdevice.pojo.po.AppProjectPO;
import com.njcn.csdevice.pojo.vo.AppProjectVO;
import org.apache.ibatis.annotations.Param;

/**
 * 
 * Description:
 * 接口文档访问地址：http://serverIP:port/swagger-ui.html
 * Date: 2023/3/27  10:24【需求编号】
 *
 * @author clam
 * @version V1.0.0
 */
public interface AppProjectMapper extends BaseMapper<AppProjectPO> {
//    @Select (
//            {"<script>",
//            "SELECT\n" +
//            "\ta.id id,\n" +
//            "\ta.`name` name,\n" +
////            "\ta.user_id user_id,\n" +
////            "\t\"username\" user_name,\n" +
//            "\ta.area area,\n" +
////            "\tb.file_path topologyDiagramPath,\n" +
////            "\ta.lng lng,\n" +
////            "\ta.lat lat,\n" +
//              "\tc.name engineering_name,\n" +
//              "\ta.description description,\n"+
//             "\ta.engineering_id engineering_id,\n" +
//             "\ta.`status` STATUS,\n" +
//            "\ta.create_by create_by,\n" +
//            "\ta.create_time create_time,\n" +
//            "\ta.update_by update_by,\n" +
//            "\ta.update_time update_time\n" +
//            "FROM\n" +
//            "\tcs_project a\n" +
//            " LEFT JOIN cs_engineering c on a.engineering_id=c.id \n" +
//            "WHERE\n" +
//            "\t1 = 1 AND a.status=\"1\"\n" ,
//                    "<when test='temp.projectId!=null and temp.projectId!=\"\"'>",
//            "AND a.id = #{temp.projectId} "+
//                    "</when>",
//                    "<when test='temp.engineeringId!=null and temp.engineeringId!=\"\"'>",
//                    "AND a.engineering_id = #{temp.engineeringId} "+
//                            "</when>",
//                    "<when test='temp.endTime!=null and temp.endTime!=\"\"'>",
//                    "AND a.create_time &lt;= #{temp.endTime}" +
//                            "</when>",
//                    "<when test='temp.startTime!=null and temp.startTime!=\"\"'>",
//            "AND a.create_time &gt;= #{temp.startTime}" +
//                    "</when>",
//                    "<when test='temp.searchValue!=null and temp.searchValue!=\"\"'>",
//            "AND a.`name` like concat('%',#{temp.searchValue},'%')",
//                    "</when>",
//                    " order by a.create_time desc",
//                    "</script>"}
//                    )
    Page<AppProjectVO> getPageVo(Page<AppProjectVO> returnpage, @Param("temp")AppProjectQueryParm appProjectQueryParm);
}