更新后端,采用Springboot+mybatis
This commit is contained in:
78
src/main/java/com/jsh/erp/service/ICommonQuery.java
Normal file
78
src/main/java/com/jsh/erp/service/ICommonQuery.java
Normal file
@@ -0,0 +1,78 @@
|
||||
package com.jsh.erp.service;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 通用查询接口
|
||||
* 功能:1、单条查询 2、分页+搜索 3、查询数量
|
||||
*
|
||||
* @author jishenghua
|
||||
* @version 1.0
|
||||
*/
|
||||
public interface ICommonQuery {
|
||||
/**
|
||||
* 查询:解析JSON,查询资源。
|
||||
*
|
||||
* @param condition 资源id
|
||||
* @return 资源
|
||||
*/
|
||||
Object selectOne(String condition);
|
||||
|
||||
/**
|
||||
* 自定义查询
|
||||
*
|
||||
* @param parameterMap 查询参数
|
||||
* @return 查询结果
|
||||
*/
|
||||
List<?> select(Map<String, String> parameterMap);
|
||||
|
||||
/**
|
||||
* 查询数量
|
||||
*
|
||||
* @param parameterMap 查询参数
|
||||
* @return 查询结果
|
||||
*/
|
||||
int counts(Map<String, String> parameterMap);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param beanJson
|
||||
* @return
|
||||
*/
|
||||
int insert(String beanJson, HttpServletRequest request);
|
||||
|
||||
/**
|
||||
* 更新数据
|
||||
*
|
||||
* @param beanJson
|
||||
* @return
|
||||
*/
|
||||
int update(String beanJson, Long id);
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
int delete(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除数据
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
int batchDelete(String ids);
|
||||
|
||||
/**
|
||||
* 查询名称是否存在
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
int checkIsNameExist(Long id, String name);
|
||||
}
|
||||
Reference in New Issue
Block a user