package ${package.ServiceImpl};

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import ${cfg.entityName}.${entity};
import ${cfg.voPath}.${entity}Vo;
import ${package.Mapper}.${table.mapperName};
import ${package.Service}.${table.serviceName};
import ${superServiceImplClassPackage};
import com.fjhx.utils.wrapperUtil.IWrapper;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * <p>
 * $!{table.comment} 服务实现类
 * </p>
 *
 * @author ${author}
 * @since ${date}
 */
@Service
public class ${table.serviceImplName} extends ${superServiceImplClass}<${table.mapperName}, ${entity}> implements ${table.serviceName} {

    @Override
    public Page<${entity}> getPage(Map<String, Object> condition) {

        IWrapper<${entity}> wrapper = IWrapper.getWrapper(condition);

        return page(condition, wrapper);
    }

    @Override
    public void add(${entity}Vo ${table.entityPath}Vo) {
        save(${table.entityPath}Vo);
    }

    @Override
    public void edit(${entity}Vo ${table.entityPath}Vo) {
        updateById(${table.entityPath}Vo);
    }

    @Override
    public void delete(${entity}Vo ${table.entityPath}Vo) {
        removeById(${table.entityPath}Vo.getId());
    }

}
