嗨森逛服务
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hai-server/hai-service/src/main/java/com/hai/dao/BsDistributionUserRelMapper...

42 lines
1.6 KiB

package com.hai.dao;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
import java.util.Map;
/**
* mapper扩展类
*/
public interface BsDistributionUserRelMapperExt {
@Select({
"<script> " +
" select agent_id as agentId , agent_name as agentName from bs_distribution_user_rel where status = 100 group by agent_id " +
"</script>"
})
List<Map<String , Object>> getDistributionAgent();
@Select({
"<script> " +
" select user_id as userId , user_name as userName from bs_distribution_user_rel where popularize_user_id is null and status = 100 " +
"<if test='agentId != null'> and agent_id = #{agentId} </if>" +
" group by user_id; " +
"</script>"
})
List<Map<String , Object>> getDistributionFirst(@Param("agentId") Long agentId);
@Select({
"<script> " +
" select user_id as userId , user_name as userName from bs_distribution_user_rel where status = 100 " +
"<if test='agentId != null'> and agent_id = #{agentId} </if>" +
"<if test='popularizeUserId != null'> and popularize_user_id = #{popularizeUserId} </if>" +
"<if test='popularizeUserId == null'> and popularize_user_id is not null </if>" +
" group by user_id; " +
"</script>"
})
List<Map<String , Object>> getDistributionSecond(@Param("agentId") Long agentId , @Param("popularizeUserId") Long popularizeUserId);
}