|
|
@@ -71,17 +71,27 @@ public class StoreFocusServiceImpl implements StoreFocusService {
|
|
|
int count = 0;
|
|
|
while (it.hasNext()) {
|
|
|
Long id = (Long) it.next();
|
|
|
- List<StoreFocus> list = storeFocusDao.findStoreFocusByUseruuAndEnuuAndStoreid(
|
|
|
- SystemSession.getUser().getUserUU(), SystemSession.getUser().getEnterprise().getUu(), id);
|
|
|
- if (list.size()>0){
|
|
|
- storeFocusDao.delete(list.get(0).getId());
|
|
|
- count++;
|
|
|
+ if (SystemSession.getUser().getEnterprise() == null) {
|
|
|
+ List<StoreFocus> list = storeFocusDao.findFocusByUseruuAndDissociativeAndStoreid(
|
|
|
+ SystemSession.getUser().getUserUU(), Type.PERSONAL.value(), id);
|
|
|
+ if (list.size()>0){
|
|
|
+ storeFocusDao.delete(list.get(0).getId());
|
|
|
+ count++;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ List<StoreFocus> list = storeFocusDao.findStoreFocusByUseruuAndEnuuAndStoreid(
|
|
|
+ SystemSession.getUser().getUserUU(), SystemSession.getUser().getEnterprise().getUu(), id);
|
|
|
+ if (list.size()>0){
|
|
|
+ storeFocusDao.delete(list.get(0).getId());
|
|
|
+ count++;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
System.out.println("删除的条数" + count);
|
|
|
return "success";
|
|
|
}
|
|
|
|
|
|
+
|
|
|
@Override
|
|
|
public Page<StoreFocus> getPageStoreFocus(final PageInfo info) {
|
|
|
if (SystemSession.getUser().getEnterprise() != null) {
|