puzhibing
2023-04-07 eaa20cb58afc80e3612fd6e93d6f27e181a027e7
user/guns-admin/src/main/java/com/supersavedriving/user/modular/system/service/impl/CommercialServiceImpl.java
@@ -37,11 +37,11 @@
    @Override
    public List<CommercialWarpper> queryCommercialList(Integer uid, Integer type, Integer device) throws Exception {
        if(type == 1){//弹框广告
//            CommercialUserEject commercialUserEject = commercialUserEjectService.selectOne(new EntityWrapper<CommercialUserEject>().eq("userType", 2)
//                    .eq("userId", uid).last(" and DATE_FORMAT(now(), '%Y%m%d') = DATE_FORMAT(lastDate, '%Y%m%d')"));
//            if(null != commercialUserEject){
//                return new ArrayList<>();
//            }
            CommercialUserEject commercialUserEject = commercialUserEjectService.selectOne(new EntityWrapper<CommercialUserEject>().eq("userType", 2)
                    .eq("userId", uid).last(" and DATE_FORMAT(now(), '%Y%m%d') = DATE_FORMAT(lastDate, '%Y%m%d')"));
            if(null != commercialUserEject){
                return new ArrayList<>();
            }
        }
        List<CommercialWarpper> commercialWarppers = this.baseMapper.queryCommercialList(type, device);
        if(type == 1 && commercialWarppers.size() > 0){//记录弹窗