io.gitee.mingbaobaba.apijson.querycondition.query.conditions.ApiJsonQueryMapWrapper Maven / Gradle / Ivy
package io.gitee.mingbaobaba.apijson.querycondition.query.conditions;
import org.springframework.util.CollectionUtils;
import java.util.HashMap;
import java.util.Map;
/**
* 基于Map形式构建查询参数
*
* @author yingsheng.ye
* @version 1.0.0
* @since 2023/6/20 5:18
*/
public class ApiJsonQueryMapWrapper extends AbstractBaseWrapper> implements ApiJsonQuery {
private final Map mapParams = new HashMap<>();
public ApiJsonQueryMapWrapper setQueryParam(Map params) {
mapParams.putAll(params);
return typedThis;
}
@Override
protected void buildParams() {
super.buildParams();
if (!CollectionUtils.isEmpty(mapParams)) {
apiJsonParams.putAll(mapParams);
}
}
}