| | |
| | | AND `expire` = 1 <!-- 失效 --> |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <select id="getSuccessRelationshipNum" resultType="java.lang.Integer"> |
| | | SELECT IFNULL (COUNT(*),0) FROM `yeshi_ec_threesale` t |
| | | WHERE t.`state` = 1 AND (t.`worker_id` =${uid} OR t.`boss_id` = ${uid}) |
| | | </select> |
| | | |
| | | <select id="getRelationshipByBossIdAndWorkerId" resultMap="BaseResultMap"> |
| | | SELECT * FROM `yeshi_ec_threesale` t |
| | | WHERE t.`boss_id` = ${bossId} AND t.`worker_id` = ${workerId} |
| | | AND t.`state` = 0 AND (t.`expire` = 0 OR t.`expire`IS NULL) |
| | | LIMIT 1 |
| | | </select> |
| | | |
| | | </mapper> |