后端代码1

java 复制代码
// 新增
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();
        }
    }
  1. 黑马瑞吉外卖知识点:

黑马云岚到家 第二章 客户管理- 5实名认证没有开发!

相关推荐
Devin~Y9 小时前
大厂Java面试实录:Spring Boot/Cloud、Kafka、Redis、K8s 与 Spring AI(RAG/Agent)三轮连环问
java·spring boot·redis·mysql·spring cloud·kafka·kubernetes
zb2006412010 小时前
SpringBoot详解
java·spring boot·后端
霸道流氓气质12 小时前
SpringBoot+LangChain4j+Ollama+RAG(检索增强生成)实现私有文档向量化检索回答
java·spring boot·后端
MiNG MENS12 小时前
基于SpringBoot和Leaflet的行政区划地图掩膜效果实战
java·spring boot·后端
2601_9498146912 小时前
Spring Boot中的404错误:原因、影响及处理策略
java·spring boot·后端
RDCJM12 小时前
Spring Boot spring.factories文件详细说明
spring boot·后端·spring
雨白16 小时前
使用 Kotlin 与 Spring Boot 从零搭建 Web 应用
spring boot·kotlin
一 乐16 小时前
交通感知与车路协同系统|基于springboot + vue交通感知与车路协同系统(源码+数据库+文档)
java·数据库·vue.js·spring boot·论文·毕设·交通感知与车路协同系统
uElY ITER16 小时前
基于Spring Boot 3 + Spring Security6 + JWT + Redis实现登录、token身份认证
spring boot·redis·spring
book123_0_9917 小时前
Spring Boot 条件注解:@ConditionalOnProperty 完全解析
java·spring boot·后端