|
@@ -70,7 +70,9 @@ public class MySysUserBrandService extends SysUserBrandServiceImpl {
|
|
|
|
|
|
public SysUserBrand getUserBrandById(long userId , long brandId){
|
|
|
QueryWrapper<SysUserBrand> queryWrapper = new QueryWrapper<>();
|
|
|
- queryWrapper.eq("user_id" , userId);
|
|
|
+ if(!ObjectUtils.isEmpty(userId)){
|
|
|
+ queryWrapper.eq("user_id" , userId);
|
|
|
+ }
|
|
|
queryWrapper.eq("brand_id" , brandId);
|
|
|
queryWrapper.eq("enable" , 1);
|
|
|
return getBaseMapper().selectOne(queryWrapper);
|