<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.com.ctop.common.module.mapper.ProjectMapper">

    <select id="getNameByAccountId" resultType="java.lang.String">
     select project_name  from ctop_project
     where id = (
     select project_id from ctop_user_allocation
     where account_id = #{accountId}
     )
    </select>

    <select id="getWarningInfoByProjectId" resultType="com.alibaba.fastjson.JSONObject">
     select
     id projectId,
     project_name projectName,
     max_bid maxBid,
     bid_type bidType,
     ocpx_action_type ocpxActionType
     from ctop_project
     where id = #{projectId}
    </select>

</mapper>
