|
|
@@ -22,6 +22,7 @@ import com.zhongshu.card.server.core.util.CommonUtil;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.checkerframework.checker.units.qual.A;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.data.domain.Page;
|
|
|
import org.springframework.data.domain.Pageable;
|
|
|
@@ -181,9 +182,18 @@ public class DeviceBindServiceImpl extends SuperService implements DeviceBindSer
|
|
|
shopOids.add(param.getShopInfoOid());
|
|
|
}
|
|
|
}
|
|
|
- if (ObjectUtils.isEmpty(shopOids)) {
|
|
|
- return ResultContent.buildFail("请选择查询商户或所有的");
|
|
|
+// if (ObjectUtils.isEmpty(shopOids)) {
|
|
|
+// return ResultContent.buildFail("请选择查询商户或所有的");
|
|
|
+// }
|
|
|
+ String oid = getCurrentOid();
|
|
|
+ Organization organization = organizationDao.findTopByOid(oid);
|
|
|
+ if (ObjectUtils.isNotEmpty(organization)) {
|
|
|
+ if (organization.getAuthType() == AuthType.School) {
|
|
|
+ // 查询这个学校绑定的设备
|
|
|
+ param.setSchoolInfoOid(oid);
|
|
|
+ }
|
|
|
}
|
|
|
+ param.setShopInfoOids(shopOids);
|
|
|
Page<DeviceBind> page = deviceBindDao.page(pageable, param);
|
|
|
return ResultContent.buildSuccess(PageEntityUtil.concurrent2PageModel(page, this::toModel));
|
|
|
}
|