package weaver.formmode.recruit.customsearch;

import org.apache.commons.lang3.StringUtils;
import weaver.formmode.customjavacode.AbstractCustomSqlConditionJavaCode;
import weaver.general.Util;
import weaver.hrm.User;

import java.util.Map;

/**
 * 简历订阅、推送记录列表查询条件
 *
 * @author:dxfeng
 * @createTime: 2024/03/11
 * @version: 1.0
 */
public class RemindSearchTemplate extends AbstractCustomSqlConditionJavaCode {
    @Override
    public String generateSqlCondition(Map<String, Object> param) {
        String whereSql = "";
        User user = (User) param.get("user");
        whereSql += " t1.jsr = '" + user.getUID() + "'";
        String uuid = Util.null2String(param.get("uuid"));
        if (StringUtils.isNotBlank(uuid)) {
            whereSql += " and t1.uuid = '" + uuid + "'";
        }
        return whereSql;
    }
}
