// 新增
public JsonResultVo<?> create(@ApiIgnore @RequestAttribute(ConstVal.REQ_USER) BaseUser baseUser,
@RequestBody IUTradeBuyPreserveVo iuTradeBuyPreserveVo) {
//权限判断
if (!baseCompanyService.dataPermission(baseUser, iuTradeBuyPreserveVo.getCompanyid(), Enums.SYSTEM_ID.XIANHUO)) {
return JsonResultVo.failYThrowEx(Enums.RETCODE.TRADE_NO_DATA_RIGHT);
}
if (!tradeBuyPreserveService.save(iuTradeBuyPreserveVo)) {
return ofRetFail(Enums.RETCODE.SQL_ERROR);
} else {
for (TradeBuyPreserveLine tradeBuyPreserveLine :
iuTradeBuyPreserveVo.getTradeBuyPreserveLineList()) {
tradeBuyPreserveLine.setPreserveId(iuTradeBuyPreserveVo.getId());
tradeBuyPreserveLineService.save(tradeBuyPreserveLine);
}
return JsonResultVo.success();
}
}
- 黑马瑞吉外卖知识点:
黑马云岚到家 第二章 客户管理- 5实名认证没有开发!