/**
 * 
 */
package com.platomix.userprofile.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;

/**
 * @author wookvn
 *
 */
@Mapper
public interface DynamicExecuteMapper {

	@Update("${value}")
	public void execute(String sql);
	
	@Select("<script><![CDATA[ ${value} ]]></script>")
	public List<JSONObject> list(String sql);
	
	@Select("<script><![CDATA[ ${sql} ]]></script>")
	public List<JSONObject> pageList(IPage<?> page, @Param("sql") String sql);
	
	@Select("<script><![CDATA[ ${value} ]]></script>")
	public JSONObject get(String sql);
}
