package com.sifang.modules.q7link.utils;

import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Record;
import com.sifang.modules.sunshine.SystemSetting.utils.StringUtil;

import java.util.List;

public class Q7DataUtil {

    public static List<Record> getAllQQProjectCode() {
        return Db.find(" SELECT p.code,p.name FROM `crm_supply_material_project` p WHERE p.status='0'  ORDER BY create_time DESC ");
    }

    public static List<Record> getQQProjectByCode(String code) {
        return Db.find(" SELECT p.code,p.name FROM `crm_supply_material_project` p WHERE p.status='0' AND p.code in ("+ StringUtil.joinInSql(code.split(","))+" ) ORDER BY create_time DESC ");
    }
}
