Commit 885ec8c9 by xiehongfei

fix:修改clerkIsSuperAdmin为是否有所有门店的管辖权限

parent d227321e
......@@ -6,12 +6,14 @@ import java.net.URLDecoder;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletResponse;
import com.gic.api.base.commons.Page;
import com.gic.enterprise.api.dto.EnterpriseSettingDTO;
import com.gic.enterprise.api.dto.StoreWidgetDTO;
import com.gic.enterprise.api.service.StoreWidgetService;
......@@ -479,7 +481,28 @@ public class LoginController extends WebBaseController {
private boolean isAllAuth(String key) {
StoreWidgetDTO storeWidgetDTO = storeWidgetService.getStoreWidgetBykey(key);
return storeWidgetDTO != null && storeWidgetDTO.getSelectType().intValue() == 0;
if (storeWidgetDTO != null) {
if (storeWidgetDTO.getSelectType().intValue() == 0) {
logger.info("isAllAuth selectType 0");
return true;
}
if (storeWidgetDTO.getSelectType().intValue() == 4) {
logger.info("isAllAuth selectType 4");
Page page = new Page();
page.setPageSize(1);
page.setCurrentPage(1);
Page listRightData = storeWidgetService.listRightData(key, page, null);
logger.info("listRightData resp:{}", JSONObject.toJSONString(listRightData));
if (listRightData.getTotalCount() > 0) {
Object rightDataItem = listRightData.getResult().get(0);
JSONObject rightDataItemJsonObject = JSONObject.parseObject(JSONObject.toJSONString(rightDataItem));
if (Objects.equals(rightDataItemJsonObject.getString("name"), "所有门店")) {
return true;
}
}
}
}
return false;
}
@RequestMapping("get-login-session")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment