<?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="com.xunwang.ucenter.mapper.MiniProgramOpenidUidMapper">

    <select id="selectShareCourseCount" resultType="java.lang.Integer">
        select COUNT(1) from `teacher_courses` where display = '上架' and uid = #{uid} ;
    </select>

    <select id="selectShareNeedCount" resultType="java.lang.Integer">
        select COUNT(1) from `stu_needs` where display = '上架' and uid = #{uid} ;
    </select>

    <select id="selectShareOrderCount" resultType="java.lang.Integer">
        select COUNT(1) from `order_info` where is_refund = '0' and status = '支付成功' and recommend_uid = #{uid} ;
    </select>

</mapper>
