/**
 * 
 */
package org.springblade.modules.system.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.springblade.modules.system.entity.CubeGlobalParamType;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * @author wookvn
 *
 */
public interface CubeGlobalParamTypeMapper extends BaseMapper<CubeGlobalParamType> {

	@Insert({"insert into cube_global_param(type_id,param_name,param_key,param_column_type,param_type,remark,create_time,create_user_id,create_by,tenant_id)", 
			"select ${typeId}, param_name, param_key, param_column_type, param_type, remark, now(), 0, '管理员', '${tenantId}' from cube_global_param where param_type = 1 and tenant_id = '111111'"
	})
	@InterceptorIgnore(tenantLine = "true")
	public int insertGlobalParamFromTable(@Param("typeId")int typeId,@Param("tenantId")String tenantId);
}
