Commit 2341841d by guojuxing

加注释

parent d9456d04
......@@ -99,6 +99,7 @@ public class StoreGroupApiServiceImpl implements StoreGroupApiService {
}
int storeGroupId = storeGroupDTO.getStoreGroupId();
TabStoreGroup oldStoreGroup;
//初始化的门店分组不允许编辑
ServiceResponse<TabStoreGroup> oldStoreGroupResponse = validIsDefault(storeGroupId);
if (oldStoreGroupResponse.isSuccess()) {
oldStoreGroup = oldStoreGroupResponse.getResult();
......@@ -112,12 +113,15 @@ public class StoreGroupApiServiceImpl implements StoreGroupApiService {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "父级ID参数错误");
}
int storeGroupParentId = storeGroupDTO.getParentStoreGroupId();
//初始化的门店分组下面不允许有子分组
ServiceResponse<TabStoreGroup> authValid = validIsDefault(storeGroupParentId);
if (!authValid.isSuccess()) {
return ServiceResponse.failure(authValid.getCode(), authValid.getMessage());
}
//验证上级分组是改动
int oldStoreGroupParentId = oldStoreGroup.getParentStoreGroupId();
boolean hasEditParentId = storeGroupParentId != oldStoreGroupParentId;
if (hasEditParentId) {
//验证父级ID的层级和当前层级是否相差一,如果是,则正确,否则,数据异常
TabStoreGroup parentStoreGroup = storeGroupService.getStoreGroupById(storeGroupParentId);
......
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