package cc.smtweb.system.bpm.web.design.db;

import cc.smtweb.framework.core.db.vo.ModelDatabase;
import cc.smtweb.framework.core.mvc.service.DefaultComboHandler;

import java.util.List;

/**
 * Created by Akmm at 2022/3/22 19:25
 */
public class ModelDatabaseComboHandler extends DefaultComboHandler<ModelDatabase> {
    public ModelDatabaseComboHandler() {
        super(ModelDatabase.ENTITY_NAME);
    }

    @Override
    protected void buildCondition(StringBuilder sql, List<Object> args) {
        super.buildCondition(sql, args);
        long prj_id = params.readLong("prj_id");
        if (prj_id > 0) {
            sql.append(" and db_prj_id=?");
            args.add(prj_id);
        }
    }
}
