template.default.ServiceImpl.vm Maven / Gradle / Ivy
package ${package}.${moduleName}.service.impl;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import ${mainPath}.common.utils.PageUtils;
import ${mainPath}.common.utils.Query;
import ${package}.${moduleName}.dao.${className}Dao;
import ${package}.${moduleName}.entity.${className}Entity;
import ${package}.${moduleName}.service.${className}Service;
@Service("${classname}Service")
public class ${className}ServiceImpl extends ServiceImpl<${className}Dao, ${className}Entity> implements ${className}Service {
@Override
public PageUtils queryPage(Map params) {
Page<${className}Entity> page = this.selectPage(
new Query<${className}Entity>(params).getPage(),
new EntityWrapper<${className}Entity>()
);
return new PageUtils(page);
}
}