Mysql中两个字段都是null,但是mysql并不支持直接使用判断 A == B

@Select("select count(DISTINCT(id)) from (\n" +
            "SELECT\n" +
            "\tv.id\n" +
            "FROM\n" +
            "\tplatform_data_annotation_verify v,\n" +
            "\tplatform_data_annotation_assigner_info p \n" +
            "WHERE\n" +
            "\tp.task_id = #{task_id} and v.task_id = #{task_id}\n" +
            "\tand  (FIND_IN_SET(#{userId},v.commit_user) > 0 or FIND_IN_SET(#{userId},v.assigner) >0)\n" +
            "\tAND v.site_id = p.site_id \n" +
            "\tAND v.site_name_cn = p.site_name_cn \n" +
            "\tAND ((v.site_name_en = p.site_name_en) or (v.site_name_en is null and p.site_name_en is null)) \n" +
            "\tAND ((v.channel = p.channel) or (v.channel is null and p.channel is null)) \n" +
            "\tAND ((v.country = p.country) or (v.country is null and p.country is null)) \n" +
            "\tAND ((v.pingtai_type = p.pingtai_type) or (v.pingtai_type is null and p.pingtai_type is null)) \n" +
            "\tAND ((v.yewu_biaoqian = p.yewu_biaoqian) or (v.yewu_biaoqian is null and p.yewu_biaoqian is null)) \n" +
            "\tAND ((v.wangmin_guimo = p.wangmin_guimo) or (v.wangmin_guimo is null and p.wangmin_guimo is null)) \n" +
            "\tAND ((v.monthly_active_users = p.monthly_active_users) or (v.monthly_active_users is null and p.monthly_active_users is null)) \n" +
            "\tAND ((v.affiliated_company = p.affiliated_company) or (v.affiliated_company is null and p.affiliated_company is null)) \n" +
            "\tAND ((v.launch_date = p.launch_date) or (v.launch_date is null and p.launch_date is null)) \n" +
            "\tAND ((v.monthly_publication_volume = p.monthly_publication_volume) or (v.monthly_publication_volume is null and p.monthly_publication_volume))\n" +
            "\t) t")
    public long  getConsistentCount(@Param("userId") Integer userId, @Param("task_id")Integer task_id);

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值