• mysql if


      long now = LibDateUtils.DateTime2LibDateTime(DateTime.Now);
                long today = LibDateUtils.Date2LibDate(DateTime.Now);
                string planSql = $@"SELECT plan.code as plan_id,comb.quiz_id,commUser.user_code AS creator_id,plan.name as plan_name,
                commUser.user_name AS creator_name
                FROM ers_{ModuleName}_comb_detail comb
                INNER JOIN ers_{ModuleName}_comb ersComb ON ersComb.id = comb.comb_id
                INNER JOIN comm_user commUser ON commUser.id = ersComb.creator_id
                INNER JOIN ers_{ModuleName}_plan plan ON comb.comb_id=plan.comb_id
                INNER JOIN ers_plan_config config ON plan.config_id=config.id    WHERE comb.quiz_id={id}  AND plan.company_id=1 
                AND plan.publish_status=1 AND plan.is_deleted=FALSE  AND ( if(config.is_over_submit_time,{now} >= plan.begin_time AND plan.expire_to>={today},{now} BETWEEN plan.begin_time AND plan.end_time) OR plan.begin_time>{now})";
                return this.DataAccess.ExecuteDataTable(planSql, false)
  • 相关阅读:
    第一个SWT程序
    稀疏数组
    算法与数据结构
    《Java核心技术》学习笔记 第1-3章
    算术运算符
    5.11 rw zip file
    5.10 gob序列化
    5.9 piping between writer and reader
    5.7 io.MultiWriter(buf, f)
    5.7 读写 二进制数据
  • 原文地址:https://www.cnblogs.com/deepalley/p/14721058.html
Copyright © 2020-2023  润新知