|
|
|
|
/**
|
|
|
|
|
* Author: Tom Shuo
|
|
|
|
|
*/
|
|
|
|
|
package ${package.ServiceImpl!};
|
|
|
|
|
|
|
|
|
|
import ${packageName!}.pojo.entity.${entityKey!};
|
|
|
|
|
import ${packageName!}.pojo.vo.gen.${entityKey!}GenVO;
|
|
|
|
|
import ${packageName!}.excel.gen.${entityKey!}GenExcel;
|
|
|
|
|
import ${packageName!}.mapper.gen.${table.mapperName!};
|
|
|
|
|
import ${packageName!}.service.gen.${table.serviceName!};
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
|
#if(hasSuperEntity){
|
|
|
|
|
import ${superServiceImplClassPackage!};
|
|
|
|
|
#}else{
|
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
|
#}
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* ${table.comment!} 服务实现类
|
|
|
|
|
*
|
|
|
|
|
* @author ${author!}
|
|
|
|
|
* @since ${date!}
|
|
|
|
|
*/
|
|
|
|
|
@Service
|
|
|
|
|
#if(hasSuperEntity){
|
|
|
|
|
public class ${table.serviceImplName!} extends ${superServiceImplClass!}<${table.mapperName!}, ${entity!}> implements ${table.serviceName!} {
|
|
|
|
|
#}else{
|
|
|
|
|
public class ${table.serviceImplName!} extends ServiceImpl<${table.mapperName!}, ${entity!}> implements ${table.serviceName!} {
|
|
|
|
|
#}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public IPage<${entityKey!}GenVO> select${entityKey!}Page(IPage<${entityKey!}GenVO> page, ${entityKey!}GenVO ${entityKeyPath!}) {
|
|
|
|
|
return page.setRecords(baseMapper.select${entityKey!}Page(page, ${entityKeyPath!}));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public List<${entityKey!}GenExcel> export${entityKey!}(Wrapper<${entityKey!}> queryWrapper) {
|
|
|
|
|
List<${entityKey!}GenExcel> ${entityKeyPath!}List = baseMapper.export${entityKey!}(queryWrapper);
|
|
|
|
|
//${entityKeyPath!}List.forEach(${entityKeyPath!} -> {
|
|
|
|
|
// ${entityKeyPath!}.setTypeName(DictCache.getValue(DictEnum.YES_NO, ${entity!}.getType()));
|
|
|
|
|
//});
|
|
|
|
|
return ${entityKeyPath!}List;
|
|
|
|
|
}
|
|
|
|
|
}
|