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.

36 lines
1.1 KiB

3 years ago
package com.zh.project0512.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zh.project0512.model.UserAccount;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.Map;
/**
* <p>
* Mapper
* </p>
*
* @author zh
* @since 2022-06-08
*/
public interface UserAccountMapper extends BaseMapper<UserAccount> {
@Select("<script>" +
3 years ago
"select t1.*,t2.name as userName,t3.departmentId,t3.name as departmentName " +
"from userAccount as t1 " +
"left join user as t2 on t1.userId = t2.id " +
"left join qywxDepartment as t3 on t2.main_department = t3.departmentId " +
3 years ago
"where 1=1" +
3 years ago
"<if test='ew != null'>" +
"<if test='ew.nonEmptyOfWhere'>" +
"AND" +
"</if>" +
"${ew.sqlSegment}" +
"</if>" +
"</script>")
IPage<Map> listAll(IPage<Map> page, @Param("ew") Wrapper<UserAccount> queryWrapper);
}