|
@@ -1,9 +1,11 @@
|
|
|
package cn.com.ty.lift.system.user.dao.mapper;
|
|
|
|
|
|
import cn.com.ty.lift.common.model.PushUserInfo;
|
|
|
+import cn.com.ty.lift.common.utils.MybatisSqlUtils;
|
|
|
import cn.com.xwy.boot.mybatis.MyBatisMapper;
|
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
|
-import org.apache.ibatis.annotations.Select;
|
|
|
+import org.apache.ibatis.annotations.Param;
|
|
|
+import org.apache.ibatis.annotations.SelectProvider;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
@@ -27,17 +29,20 @@ public interface IPushUserMapper extends BaseMapper<PushUserInfo> {
|
|
|
* @description 获取要推送的用户信息
|
|
|
* @date 2020/4/17 2:03 下午
|
|
|
*/
|
|
|
- @Select("select ui.user_id as userId, "
|
|
|
- + "ui.name as userName, "
|
|
|
- + "ua.mobile as mobile, "
|
|
|
- + "ua.device_model as deviceModel, "
|
|
|
- + "ua.device_flag as deviceFlag, "
|
|
|
- + "r.name as roleName from "
|
|
|
- + "user_account ua "
|
|
|
- + "left join user_info ui on ua.user_id = ui.user_id "
|
|
|
- + "left join user_role ur on ua.user_id = ur.user_id "
|
|
|
- + "left join role r on r.id = ur.role_id"
|
|
|
- + "where r.code in#{roleCodes} "
|
|
|
- + "and ur.company_id=#{companyId}")
|
|
|
- List<PushUserInfo> getPushUserInfo(Long companyId, List<String> roleCodes);
|
|
|
+ @SelectProvider(type = MybatisSqlUtils.class, method = "getPushUserInfoByRoleCodesSql")
|
|
|
+ List<PushUserInfo> getPushUserInfoByRoleCodes(@Param("companyId") Long companyId,
|
|
|
+ @Param("roleCodeList") List<String> roleCodes);
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取要推送的用户信息
|
|
|
+ *
|
|
|
+ * @param companyId 当前公司id
|
|
|
+ * @param userIdList 用户id集合
|
|
|
+ * @return 用户信息
|
|
|
+ * @description 获取要推送的用户信息
|
|
|
+ * @date 2020/4/18 7:24 下午
|
|
|
+ */
|
|
|
+ @SelectProvider(type = MybatisSqlUtils.class, method = "getPushUserInfoByIdsSql")
|
|
|
+ List<PushUserInfo> getPushUserInfoByUserIds(@Param("companyId") Long companyId,
|
|
|
+ @Param("companyId") List<Long> userIdList);
|
|
|
}
|