|
|
|
@ -0,0 +1,73 @@
|
|
|
|
|
// 定义当前类所在的包路径
|
|
|
|
|
package com.service.impl;
|
|
|
|
|
|
|
|
|
|
// 导入字符串处理工具类
|
|
|
|
|
import com.utils.StringUtil;
|
|
|
|
|
// 导入字典服务接口
|
|
|
|
|
import com.service.DictionaryService;
|
|
|
|
|
// 导入类差异比较工具
|
|
|
|
|
import com.utils.ClazzDiff;
|
|
|
|
|
// 导入Spring Bean属性复制工具
|
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
|
// 导入Spring依赖注入注解
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
// 导入Spring服务注解
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
// 导入Java反射Field类
|
|
|
|
|
import java.lang.reflect.Field;
|
|
|
|
|
// 导入Java集合类
|
|
|
|
|
import java.util.*;
|
|
|
|
|
// 导入MyBatis-Plus分页插件
|
|
|
|
|
import com.baomidou.mybatisplus.plugins.Page;
|
|
|
|
|
// 导入MyBatis-Plus服务实现基类
|
|
|
|
|
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
|
|
|
|
// 导入Spring事务注解
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
// 导入分页工具类
|
|
|
|
|
import com.utils.PageUtils;
|
|
|
|
|
// 导入查询参数封装类
|
|
|
|
|
import com.utils.Query;
|
|
|
|
|
// 导入Spring上下文加载器
|
|
|
|
|
import org.springframework.web.context.ContextLoader;
|
|
|
|
|
// 导入Servlet上下文接口
|
|
|
|
|
import javax.servlet.ServletContext;
|
|
|
|
|
// 导入HTTP请求对象
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
// 导入Spring空值注解
|
|
|
|
|
import org.springframework.lang.Nullable;
|
|
|
|
|
// 导入Spring断言工具
|
|
|
|
|
import org.springframework.util.Assert;
|
|
|
|
|
// 导入教练DAO接口
|
|
|
|
|
import com.dao.JiaolianDao;
|
|
|
|
|
// 导入教练实体类
|
|
|
|
|
import com.entity.JiaolianEntity;
|
|
|
|
|
// 导入教练服务接口
|
|
|
|
|
import com.service.JiaolianService;
|
|
|
|
|
// 导入教练视图类
|
|
|
|
|
import com.entity.view.JiaolianView;
|
|
|
|
|
|
|
|
|
|
// 声明为Spring服务组件,指定bean名称
|
|
|
|
|
@Service("jiaolianService")
|
|
|
|
|
// 启用类级别事务管理
|
|
|
|
|
@Transactional
|
|
|
|
|
// 教练服务实现类
|
|
|
|
|
// 继承MyBatis-Plus通用服务实现类
|
|
|
|
|
// 实现教练服务接口
|
|
|
|
|
public class JiaolianServiceImpl
|
|
|
|
|
extends ServiceImpl<JiaolianDao, JiaolianEntity>
|
|
|
|
|
implements JiaolianService {
|
|
|
|
|
|
|
|
|
|
// 实现分页查询方法
|
|
|
|
|
@Override
|
|
|
|
|
public PageUtils queryPage(Map<String,Object> params) {
|
|
|
|
|
// 创建分页查询对象
|
|
|
|
|
Page<JiaolianView> page = new Query<JiaolianView>(params).getPage();
|
|
|
|
|
|
|
|
|
|
// 执行分页查询并设置结果
|
|
|
|
|
page.setRecords(baseMapper.selectListView(page,params));
|
|
|
|
|
|
|
|
|
|
// 返回分页工具对象
|
|
|
|
|
return new PageUtils(page);
|
|
|
|
|
}
|
|
|
|
|
// 类结束
|
|
|
|
|
}
|