init
This commit is contained in:
94
src/main/java/com/newyetai/config/dao/ConfigMapper.java
Normal file
94
src/main/java/com/newyetai/config/dao/ConfigMapper.java
Normal file
@@ -0,0 +1,94 @@
|
||||
package com.newyetai.config.dao;
|
||||
|
||||
import com.newyetai.config.dto.ConfigDTO;
|
||||
import com.newyetai.config.dto.ConfigPageQueryDTO;
|
||||
import com.newyetai.config.dto.ConfigQueryDTO;
|
||||
import com.newyetai.config.dto.OrgInfoDTO;
|
||||
import com.newyetai.config.entity.Config;
|
||||
import com.newyetai.tkmybatis.mybatis.MyMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 配置mapper
|
||||
*
|
||||
* @author sr on 2019-10-20
|
||||
*/
|
||||
public interface ConfigMapper extends MyMapper<Config> {
|
||||
|
||||
/**
|
||||
* 排除已经被分配的配置机构,剩余的机构
|
||||
*
|
||||
* @param configCode 配置代码
|
||||
* @return {@link List}<{@link OrgInfoDTO}>
|
||||
*/
|
||||
List<OrgInfoDTO> orgList(@Param("configCode") String configCode);
|
||||
|
||||
List<ConfigDTO> page(@Param("param") ConfigPageQueryDTO queryDTO);
|
||||
|
||||
List<ConfigDTO> list(@Param("param") ConfigQueryDTO queryDTO);
|
||||
|
||||
/**
|
||||
* 查询配置
|
||||
*
|
||||
* @param config
|
||||
* @return
|
||||
* @author sr on 2019-11-05
|
||||
*/
|
||||
List<Config> find(@Param("param") Config config);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param configCode
|
||||
* @param orgIds
|
||||
* @return
|
||||
*/
|
||||
List<Config> listByCodeAndOrgIds(@Param("configCode") String configCode, @Param("orgIds") Set<Long> orgIds);
|
||||
|
||||
/**
|
||||
* 校验配置编码是否存在
|
||||
* @param orgId
|
||||
* @param configCode
|
||||
* @param configId 为空则判断所有(新增),不为空代表判断除该id之外的(修改)
|
||||
* @return
|
||||
* @author sr on 2019-10-20
|
||||
*/
|
||||
int existConfigCode(@Param("orgId") Long orgId, @Param("configCode") String configCode, @Param("configId") Long configId);
|
||||
|
||||
/**
|
||||
* 根据编码获取配置
|
||||
* @param platformOrgId
|
||||
* @param orgId
|
||||
* @param configCode
|
||||
* @return
|
||||
* @author sr on 2019-10-23
|
||||
*/
|
||||
ConfigDTO queryConfigByCode(@Param("platformOrgId") Long platformOrgId,
|
||||
@Param("orgId") Long orgId, @Param("configCode") String configCode);
|
||||
|
||||
/**
|
||||
* 根据编码获取机构配置
|
||||
* @param orgId
|
||||
* @param configCode
|
||||
* @return
|
||||
* @author sr on 2019-10-23
|
||||
*/
|
||||
ConfigDTO queryOrgConfigByCode(@Param("orgId") Long orgId, @Param("configCode") String configCode);
|
||||
|
||||
/**
|
||||
* 新增并校验是否重复(org_id,config_code),重复则不新增
|
||||
*
|
||||
* @param config
|
||||
*/
|
||||
int saveAndCheckExist(@Param("param") Config config, @Param("userId") Long userId);
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param configCode 配置代码
|
||||
* @param userId 用户id
|
||||
*/
|
||||
void batchDelete(@Param("configCode") String configCode, @Param("userId") Long userId);
|
||||
}
|
||||
Reference in New Issue
Block a user