Commit 007ffcf0 by 陶光胜

Merge branch 'developer' of http://115.159.76.241/base_platform_enterprise/gic-store into developer

parents e961f19d 0f344c32
......@@ -379,8 +379,10 @@ public class StoreApiServiceImpl implements StoreApiService {
storeDTO.setStoreGroupId(Integer.valueOf(groupId));
} else {
// 未命中
TabStoreGroup group = storeGroupService.selectUnGroupedStore(storeDTO.getEnterpriseId());
storeDTO.setStoreGroupId(group.getStoreGroupId());
if (storeDTO.getStoreGroupId() != null) {
TabStoreGroup group = storeGroupService.selectUnGroupedStore(storeDTO.getEnterpriseId());
storeDTO.setStoreGroupId(group.getStoreGroupId());
}
}
}
return null;
......
......@@ -112,7 +112,10 @@ public class StoreGroupApiServiceImpl implements StoreGroupApiService {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "父级ID参数错误");
}
int storeGroupParentId = storeGroupDTO.getParentStoreGroupId();
validIsDefault(storeGroupParentId);
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) {
......@@ -164,7 +167,10 @@ public class StoreGroupApiServiceImpl implements StoreGroupApiService {
if (StringUtils.isBlank(storeGroupDTO.getStoreGroupName())) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "名称不能为空");
}
validIsDefault(storeGroupDTO.getStoreGroupId());
ServiceResponse<TabStoreGroup> authValid = validIsDefault(storeGroupDTO.getStoreGroupId());
if (!authValid.isSuccess()) {
return ServiceResponse.failure(authValid.getCode(), authValid.getMessage());
}
if (storeGroupService.isRepeatName(storeGroupDTO.getStoreGroupName(), storeGroupDTO.getStoreGroupId(),
storeGroupDTO.getEnterpriseId())) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "名称不能重复");
......@@ -244,6 +250,10 @@ public class StoreGroupApiServiceImpl implements StoreGroupApiService {
if (isContainStore(storeGroupId)) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "该分组下存在门店,不能删除");
}
ServiceResponse<TabStoreGroup> authValid = validIsDefault(storeGroupId);
if (!authValid.isSuccess()) {
return ServiceResponse.failure(authValid.getCode(), authValid.getMessage());
}
TabStoreGroup tabStoreGroup = new TabStoreGroup();
tabStoreGroup.setStoreGroupId(storeGroupId);
tabStoreGroup.setStatus(0);
......@@ -269,7 +279,10 @@ public class StoreGroupApiServiceImpl implements StoreGroupApiService {
if (tabStoreGroup == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "主键错误,查询不到数据");
}
validIsDefault(storeGroupId);
ServiceResponse<TabStoreGroup> authValid = validIsDefault(storeGroupId);
if (!authValid.isSuccess()) {
return ServiceResponse.failure(authValid.getCode(), authValid.getMessage());
}
if (setSortValue == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "拖拽排序值不能为空");
}
......
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