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.

50 lines
1.5 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package com.service;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.IService;
import com.utils.PageUtils;
import com.entity.YonghuEntity;
import java.util.List;
import java.util.Map;
import com.entity.vo.YonghuVO;
import org.apache.ibatis.annotations.Param;
import com.entity.view.YonghuView;
/**
* 用户
*
* @author
* @email
* @date 2023-02-17 16:59:28
*/
public interface YonghuService extends IService<YonghuEntity> {
PageUtils queryPage(Map<String, Object> params);
//作用:获取普通用户分页列表(默认查询)
//使用场景:后台用户管理列表页
List<YonghuVO> selectListVO(Wrapper<YonghuEntity> wrapper);
YonghuVO selectVO(@Param("ew") Wrapper<YonghuEntity> wrapper);
//设计目的实现实体与DTO的分离
//VO特点
//只包含前端需要的字段
//可能包含计算字段(如年龄=当前时间-生日)
//避免敏感数据泄露如密码字段不会出现在VO中
List<YonghuView> selectListView(Wrapper<YonghuEntity> wrapper);
YonghuView selectView(@Param("ew") Wrapper<YonghuEntity> wrapper);
//设计目的:处理多表关联查询
//View特点
//包含关联表数据(如用户地址、优惠券数量)
PageUtils queryPage(Map<String, Object> params,Wrapper<YonghuEntity> wrapper);
//最强查询方法:组合分页参数+复杂查询条件+关联数据
}