选品广场接口

This commit is contained in:
kuang.yife 2023-01-15 17:23:28 +08:00
parent fb6e657848
commit 4d42753847
1 changed files with 9 additions and 1 deletions

View File

@ -129,10 +129,18 @@ public class CustomerSelectionController extends BaseController
}else { }else {
workId = workList.get(0).getWorkerId(); workId = workList.get(0).getWorkerId();
} }
// 判断是否有历史数据 - 有则删除
customerSelection.getDeptCategoryIds().forEach(selection->{ customerSelection.getDeptCategoryIds().forEach(selection->{
customerSelection.setWorkId(workId); customerSelection.setWorkId(workId);
customerSelection.setDeptCategoryId(selection); customerSelection.setDeptCategoryId(selection);
customerSelectionService.insertCustomerSelection(customerSelection); CustomerSelection param = new CustomerSelection();
param.setDeptCategoryId(selection);
param.setSelectionType(customerSelection.getSelectionType());
param.setCustomerId(customerSelection.getCustomerId());
List<CustomerSelection> customerSelections = customerSelectionService.selectCustomerSelectionList(param);
if(CollectionUtils.isEmpty(customerSelections)){
customerSelectionService.insertCustomerSelection(customerSelection);
}
}); });
return AjaxResult.success("新增成功"); return AjaxResult.success("新增成功");
}catch (Exception e){ }catch (Exception e){