Commit 8c821546 by guojuxing

门店分组转移上级门店修改:转移门店逻辑修复

parent 33be660a
......@@ -147,10 +147,16 @@ public class StoreGroupApiServiceImpl implements StoreGroupApiService {
tabStoreGroup.setUpdateTime(new Date());
storeGroupService.update(tabStoreGroup);
//如果上级分组有门店
//如果上级分组有门店,则新建一个未分组数据,然后把所有门店放进去
if (isNeedTransferStoreWhenNew(storeGroupParentId)) {
StoreGroupDTO noStoreGroup = new StoreGroupDTO();
noStoreGroup.setEnterpriseId(storeGroupDTO.getEnterpriseId());
noStoreGroup.setGroupLevel(oldStoreGroup.getGroupLevel());
noStoreGroup.setStoreGroupName("未分组门店" + System.currentTimeMillis());
noStoreGroup.setParentStoreGroupId(storeGroupParentId);
ServiceResponse<Integer> noStoreGroupId = save(noStoreGroup);
//转移门店
storeService.updateGroupId(storeGroupParentId, storeGroupId);
storeService.updateGroupId(storeGroupParentId, noStoreGroupId.getResult());
}
//刷新缓存
......
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