ServiceImpl.java.vm 2.01 KB
package ${package}.service;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import ${package}.domain.${className};
import ${package}.mapper.${className}Mapper;
import org.springframework.stereotype.Service;


/**
 * ${tableComment} 服务层实现
 * 
 * @author ${author}
 * @date ${datetime}
 */
@Service
public class ${className}ServiceImpl extends ServiceImpl<${className}Mapper, ${className}> implements I${className}Service {

}
##	@Autowired
##	private ${className}mapper ${classname}mapper;
##
##	/**
##     * 查询${tableComment}信息
##     *
##     * @param ${primaryKey.attrname} ${tableComment}ID
##     * @return ${tableComment}信息
##     */
##    @Override
##	public ${className} select${className}ById(${primaryKey.attrType} ${primaryKey.attrname})
##	{
##	    return ${classname}mapper.select${className}ById(${primaryKey.attrname});
##	}
##
##	/**
##     * 查询${tableComment}列表
##     *
##     * @param ${classname} ${tableComment}信息
##     * @return ${tableComment}集合
##     */
##	@Override
##	public List<${className}> select${className}List(${className} ${classname})
##	{
##	    return ${classname}mapper.select${className}List(${classname});
##	}
##
##    /**
##     * 新增${tableComment}
##     *
##     * @param ${classname} ${tableComment}信息
##     * @return 结果
##     */
##	@Override
##	public int insert${className}(${className} ${classname})
##	{
##	    return ${classname}mapper.insert${className}(${classname});
##	}
##
##	/**
##     * 修改${tableComment}
##     *
##     * @param ${classname} ${tableComment}信息
##     * @return 结果
##     */
##	@Override
##	public int update${className}(${className} ${classname})
##	{
##	    return ${classname}mapper.update${className}(${classname});
##	}
##
##	/**
##     * 删除${tableComment}对象
##     *
##     * @param ids 需要删除的数据ID
##     * @return 结果
##     */
##	@Override
##	public int delete${className}ByIds(String ids)
##	{
##		return ${classname}mapper.delete${className}ByIds(Convert.toStrArray(ids));
##	}