当前位置: 首页 > news >正文

基于springboot接口的编写

目录

1、模糊分页查询

2、批量删除

3、新增

4、编辑


此接口非彼接口。此接口是MVC的设计模式中的Controller层,一般我们会叫Controller层里的方法为接口。他们是负责接收前端或者其它服务的传来的请求,并对请求进行相应的处理,最终再将处理结果返回给前端或者其它服务。

1、模糊分页查询

   1)Controller层

@RestController
@RequestMapping("camera")
public class CameraAlarmController {@Autowiredprivate IWarehouseOutService warehouseOutService; //注入接口/*** 获取设备相关信息* @param equipAttribute* @param equipType* @param keywords* @param pageNum* @param pageSize* @return*/@GetMapping("getOutboundEquipmentInfo")public Result getOutboundEquipmentInfo(@RequestParam(value ="operationType",required = false) Integer operationType,@RequestParam(value ="warehouseId",required = false) Integer warehouseId,@RequestParam(value ="equipAttribute",required = false) String equipAttribute,@RequestParam(value ="equipTypeId",required = false) Integer equipTypeId,@RequestParam(value = "keywords", required = false) String keywords,@RequestParam(value ="pageNum",required = false, defaultValue = "1") Integer pageNum,@RequestParam(value ="pageSize", required = false, defaultValue = "10") Integer pageSize){PageHelper.startPage(pageNum,pageSize);PageInfo<OutboundEquipmentInfoVo> pageInfo=new PageInfo<>(warehouseOutService.getOutboundEquipmentInfo(equipAttribute,equipTypeId,warehouseId,operationType,keywords));return new SuccessResult(pageInfo);}
}

在进行模糊查询操作的时候,往往有时候需要查询的参数很多,这时候也可以考虑使用实体类接收前端传参,更改如下:

 @PostMapping("/getOutboundEquipmentInfo")//这里改成post请求public Result getOutboundEquipmentInfo(@RequestBody  EquipInfoVo vo){PageHelper.startPage(vo.getPageNum(),vo.getPageSize());PageInfo<OutboundEquipmentInfoVo> pageInfo=new PageInfo<>(warehouseOutService.getOutboundEquipmentInfo(vo));return new SuccessResult(pageInfo);}

接收前端传参实体类代码如下:

@Data
@Accessors(chain = true)
public class EquipInfoVo {@JsonProperty(value = "operationType")private Integer operationType;@JsonProperty(value = "warehouseId")private Integer warehouseId;@JsonProperty(value = "equipAttribute")private String equipAttribute;@JsonProperty(value = "equipTypeId")private Integer equipTypeId;@JsonProperty(value = "keywords")private String keywords;@JsonProperty(value = "pageNum")private Integer pageNum=1;@JsonProperty(value = "pageSize")private Integer pageSize=10;
}

 2)service层

定义service层接口(此接口就是我们Java中用intrerface关键字定义的接口了)  

//这里不用加service注解
public interface IWarehouseOutService {List<OutboundEquipmentInfoVo> getOutboundEquipmentInfo(String equipAttribute,Integer equipTypeId,Integer warehouseId,Integer operationType,String keywords);}

定义service接口实现

@Service
@Slf4j
public class WarehouseOutServiceImpl implements IWarehouseOutService {@Autowiredprivate WmEquipInfoMapper wmEquipInfoMapper;@Overridepublic List<OutboundEquipmentInfoVo> getOutboundEquipmentInfo(String equipAttribute,Integer equipTypeId,Integer warehouseId,Integer operationType,String keywords) {//入库操作if (operationType==WmConstant.EQUIPMENT_INFO_INCOME){List<OutboundEquipmentInfoVo> outList=wmEquipInfoMapper.getEquipmentInformation(equipAttribute,equipTypeId,keywords);List<WmRepertoryInfoDto> allEquip = wmRepertoryInfoMapper.getAllEquip(warehouseId);outList.forEach(info->{Optional<WmRepertoryInfoDto> wmRepertoryInfoDto = allEquip.stream().filter(all -> all.getEquipId().equals(info.getId())).findFirst();if (wmRepertoryInfoDto.isPresent()){info.setInventoryQuantity(wmRepertoryInfoDto.get().getNum());info.setDamagesNum(wmRepertoryInfoDto.get().getDamagesNum());}else {info.setInventoryQuantity(0);info.setDamagesNum(0);}});return outList;}else{//出库操作List<OutboundEquipmentInfoVo> outboundEquipmentInfo = wmEquipInfoMapper.getOutboundEquipmentInfo(equipAttribute, warehouseId, equipTypeId, keywords);List<WmRelationEquipDto> relationEquipDtos=wmOutWarehouseMapper.getOutboundApproval(warehouseId);outboundEquipmentInfo.forEach(out-> relationEquipDtos.forEach(re->{if (Integer.valueOf(re.getEquipId().toString()).equals(out.getId())){Integer num=out.getInventoryQuantity()-re.getNum();out.setInventoryQuantity(num<0?0:num);}}));return outboundEquipmentInfo;}}
}

 3)mapper层

//这上面不加@Mapper注解就要,在启动类上加这个注解@MapperScan("com.zcloud.dao.mapper")
public interface WmEquipInfoMapper {List<OutboundEquipmentInfoVo> getOutboundEquipmentInfo(@Param("equipAttribute") String equipAttribute,@Param("warehouseId") Integer warehouseId,@Param("equipTypeId") Integer equipTypeId,@Param("keywords") String keywords);
}
<select id="getOutboundEquipmentInfo" resultType="com.zcloud.domain.warehousemanage.vo.OutboundEquipmentInfoVo">SELECTt2.num inventoryQuantity,t2.damages_num,( SELECT `name` FROM t_dic_item WHERE type_code = "equip_attribute" AND CODE = t1.equip_attribute ) `equipAttributeName`,( SELECT `name` FROM t_dic_item WHERE type_code = "equip_unit" AND CODE = t1.equip_unit ) equipUnitName,t1.equip_name,t1.equip_brand,t1.id,t1.equip_model,t3.`name` equipTypeNameFROMt_common_wm_equip_info t1LEFT JOIN t_common_wm_repertory_info t2 ON t1.id = t2.equip_idLEFT JOIN t_common_wm_equip_type t3 ON t1.equip_type_id = t3.idWHEREt1.removed = 0AND t2.removed =0AND t3.removed=0AND t2.warehouse_id=#{warehouseId}<if test="equipAttribute!=null and equipAttribute!=''">AND t1.equip_attribute=#{equipAttribute}</if>//注意Interge类型的条件判断是否为空的时候一定不要加非空字符串判断,因为当你传的值为0的时候,mybatis会把它判断为空字符串<if test="equipTypeId!=null">  AND t1.equip_type_id=#{equipTypeId}</if><if test="keywords!=null and keywords!=''">AND (t1.equip_name like concat('%',#{keywords})OR t1.equip_model like concat('%',#{keywords})OR t1.equip_brand like concat('%',#{keywords}))</if>
</select>
2、批量删除

    1) Controller层

  @DeleteMapping(value = "/delete", name = "仓库管理,删除仓库信息")public Result deleteWareHouseInfo(@RequestParam(value = "ids") String ids,HttpServletRequest request) {Integer userId = (Integer) RequestUtils.getCurrentUser(request).get("userId");return new SuccessResult(wareHouseInfoService.deleteWareHouseInfo(ids,userId));}

 2) service层

@Transactional //单表删除不加这个注解可以,多表关联删除一定要加
public Object deleteWareHouseInfo(Integer ids, Integer userId) {List<Integer> idList = Arrays.stream(ids.split(",")).map(s -> Integer.parseInt(s.trim())).collect(Collectors.toList());return warehouseInfoMapper.deleteByIds(idList,userId);}

 3)mapper层

Integer deleteByIds(@Param("idList")  List<Integer> idList,@Param("userId") Integer userId);
<update id="deleteByIds" parameterType="java.lang.Integer"><foreach collection="idList" item="item" separator=";">update t_warehouse_infoset removed = 1,rm_uid = #{userId},rm_time = NOW(),up_time = now()where id =#{item.id}</foreach></update>
3、新增

     1) Controller层

  @PostMapping(value = "/add", name = "仓库管理,新增采购")public Result addPurchaseInfo(@RequestBody WmPurchaseInfoAddVo dto, HttpServletRequest request) {Integer userId = (Integer) RequestUtils.getCurrentUser(request).get("userId");return new SuccessResult(wmPurchaseInfoService.addPurchaseInfo(dto,userId));}

  2) service层

   @Override@Transactionalpublic Integer addPurchaseInfo(WmPurchaseInfoAddVo dto, Integer userId) { Integer result;String orderCode = wmUtils.generateWmCode(WmConstant.PURCHASE_CODE_PREFIX, 1);dto.setOrderCode(orderCode).setCrUid(userId).setUpUid(userId);//插入采购基本信息,返回id//需要注意的是,如果待插入数据的表未设置主键自增,则在这里需要设置主键的值//而这里是设置了主键自增,所以就需要在mapper层配置sql语句的时候,设置返回自增的主键值purchaseInfoMapper.insertSelective(dto);List<WmRelationEquipDto> wmRelationEquipDtos = dto.getRelationEquip();//设置关联设备的,关联id,以及关联类型wmRelationEquipDtos.forEach(e -> {e.setRelationId(dto.getId()).setType(WmConstant.PURCHASE_RELATION).setStockPendingNum(e.getNum());});//插入关联设备信息result = relationEquipMapper.insertBatch(wmRelationEquipDtos);return result >= 1 ? 1 : 0;}

3) mapper层

    单个新增

  <insert id="insertSelective" useGeneratedKeys="true" keyProperty="id" keyColumn="id"parameterType="vip.dtcloud.domain.warehousemanage.vo.WmPurchaseInfoAddVo">insert into t_common_wm_purchase_info<trim prefix="(" suffix=")" suffixOverrides=","><if test="addVo.orderCode != null">order_code,</if><if test="addVo.orderName != null">order_name,</if><if test="addVo.purchaseMethod != null">purchase_method,</if><if test="addVo.purchaseManager != null">purchase_manager,</if><if test="addVo.orderDate != null">order_date,</if><if test="addVo.contractId != null">contract_id,</if><if test="addVo.biddingDocumentIds != null">bidding_document_ids,</if><if test="addVo.purchaseContractIds != null">purchase_contract_ids,</if><if test="addVo.meetingSummaryIds != null">meeting_summary_ids,</if><if test="addVo.otherFilesIds != null">other_files_ids,</if><if test="addVo.remark != null">remark,</if>up_time,cr_time,<if test="addVo.upUid != null">up_uid,</if><if test="addVo.crUid != null">cr_uid,</if></trim><trim prefix="values (" suffix=")" suffixOverrides=","><if test="addVo.orderCode != null">#{addVo.orderCode,jdbcType=VARCHAR},</if><if test="addVo.orderName != null">#{addVo.orderName,jdbcType=VARCHAR},</if><if test="addVo.purchaseMethod != null">#{addVo.purchaseMethod,jdbcType=VARCHAR},</if><if test="addVo.purchaseManager != null">#{addVo.purchaseManager,jdbcType=VARCHAR},</if><if test="addVo.orderDate != null">#{addVo.orderDate,jdbcType=TIMESTAMP},</if><if test="addVo.contractId != null">#{addVo.contractId,jdbcType=INTEGER},</if><if test="addVo.biddingDocumentIds != null">#{addVo.biddingDocumentIds,jdbcType=VARCHAR},</if><if test="addVo.purchaseContractIds != null">#{addVo.purchaseContractIds,jdbcType=VARCHAR},</if><if test="addVo.meetingSummaryIds != null">#{addVo.meetingSummaryIds,jdbcType=VARCHAR},</if><if test="addVo.otherFilesIds != null">#{addVo.otherFilesIds,jdbcType=VARCHAR},</if><if test="addVo.remark != null">#{addVo.remark,jdbcType=VARCHAR},</if>now(),now(),<if test="addVo.upUid != null">#{addVo.upUid,jdbcType=INTEGER},</if><if test="addVo.crUid != null">#{addVo.crUid,jdbcType=INTEGER},</if></trim></insert>

批量新增

<insert id="insertBatch">insert into t_common_wm_relation_equip (relation_id, type,equip_id, equip_serial, equip_code,num, stock_pending_num, up_time)values<foreach collection="dtoList" item="item" separator=",">( #{item.relationId,jdbcType=INTEGER}, #{item.type,jdbcType=INTEGER},#{item.equipId,jdbcType=BIGINT}, #{item.equipSerial,jdbcType=VARCHAR}, #{item.equipCode,jdbcType=VARCHAR},#{item.num,jdbcType=INTEGER}, #{item.stockPendingNum,jdbcType=INTEGER}, now())</foreach></insert>

注意 : 做批量插入的时候,插入的数量不能太多,否则会因为sql语句过长而出现无法执行的问题。一般超过5000条的话就可以使用分页去插入了。比如,可以改成如下这样的插入:

 List<List<EquipRealVariableDto>> lists = splitList(wmRelationEquipDtos, 5000);lists.forEach(e -> {result += relationEquipMapper.insertBatch(e);});

 splitList方法代码如下:

 private static <T> List<List<T>> splitList(List<T> list, int splitCount) {int length = list.size();long totalLength = (long)length + (long)splitCount - 1L;long num = totalLength / (long)splitCount;List<List<T>> newList = new ArrayList();for(int i = 0; (long)i < num; ++i) {int fromIndex = i * splitCount;int toIndex = (i + 1) * splitCount < length ? (i + 1) * splitCount : length;newList.add(list.subList(fromIndex, toIndex));}return newList;}
4、编辑

1) Controller层

  @PutMapping(value = "/edit", name = "仓库管理,修改仓库信息")public Result editWareHouseInfo(@RequestBody WmWarehouseInfoDto dto,HttpServletRequest request) {Integer userId = (Integer) RequestUtils.getCurrentUser(request).get("userId");return new SuccessResult(wareHouseInfoService.editWareHouseInfo(dto,userId));}

 2) service层

 @Overridepublic Integer editWareHouseInfo(WmWarehouseInfoDto dto, Integer userId) {dto.setUpUid(userId);return warehouseInfoMapper.updateByPrimaryKeySelective(dto);}

3) mapper层

 <update id="updateByPrimaryKeySelective" parameterType="vip.dtcloud.domain.warehousemanage.dto.WmWarehouseInfoDto">update t_common_wm_warehouse_info<set><if test="warehouseName != null">warehouse_name = #{warehouseName,jdbcType=VARCHAR},</if><if test="warehouseLocation != null">warehouse_location = #{warehouseLocation,jdbcType=VARCHAR},</if><if test="warehouseManager != null">warehouse_manager = #{warehouseManager,jdbcType=VARCHAR},</if><if test="phone != null">phone = #{phone,jdbcType=VARCHAR},</if><if test="departmentId != null">department_id = #{departmentId,jdbcType=VARCHAR},</if><if test="warehouseStatus != null">warehouse_status = #{warehouseStatus,jdbcType=INTEGER},</if>up_time = now(),<if test="upUid != null">up_uid = #{upUid,jdbcType=INTEGER},</if></set>where id = #{id,jdbcType=INTEGER}</update>

相关文章:

基于springboot接口的编写

目录 1、模糊分页查询 2、批量删除 3、新增 4、编辑 此接口非彼接口。此接口是MVC的设计模式中的Controller层&#xff0c;一般我们会叫Controller层里的方法为接口。他们是负责接收前端或者其它服务的传来的请求&#xff0c;并对请求进行相应的处理&#xff0c;最终再将处…...

【HarmonyOS】鸿蒙开发之Video组件——第3.7章

Video组件内VideoOptions属性简介 src&#xff1a;设置视频地址。currentProgressRate&#xff1a;设置视频播放倍速&#xff0c;参数说明如下&#xff1a; number|string&#xff1a;只支持 0.75 &#xff0c; 1.0 &#xff0c; 1.25 &#xff0c; 1.75 &#xff0c; 2.0 。P…...

React引入css的几种方式以及应用

1.直接引入css文件 import "./parent.css" 2.引入css模块&#xff0c;定义文件名[组件名.module.css]&#xff1b;该方式可避免类名的重复&#xff0c;每个组件都有独立的作用域&#xff0c;避免了全局污染&#xff0c;保证了类名的唯一性 import styles from &qu…...

[算法沉淀记录] 排序算法 —— 冒泡排序

排序算法 —— 冒泡排序 基本概念 冒泡排序是一种简单的排序算法。它重复地遍历要排序的列表&#xff0c;一次比较两个元素&#xff0c;并交换它们的位置&#xff0c;如果它们不是按照升序排列的。这步遍历是重复进行的&#xff0c;直到没有再需要交换&#xff0c;也就是说该…...

【机器人最短路径规划问题(栅格地图)】基于遗传算法求解

基于遗传算法求解机器人最短路径规划问题&#xff08;栅格地图&#xff09;的仿真结果 仿真结果&#xff1a; 路径长度的变化曲线&#xff1a; 遗传算法优化后的机器人避障路径&#xff1a;...

如何做代币分析:以 TRX 币为例

作者&#xff1a;lesleyfootprint.network 编译&#xff1a;cicifootprint.network 数据源&#xff1a;TRX 代币仪表板 &#xff08;仅包括以太坊数据&#xff09; 在加密货币和数字资产领域&#xff0c;代币分析起着至关重要的作用。代币分析指的是深入研究与代币相关的数据…...

关于地址引用与值引用的坑

List<UserInfo> userInfoList new List<UserInfo>(); List<UserInfo> userInfoList_new new List<UserInfo>(userInfoList);userInfoList_new 与userInfoList 指的是相同的内存吗&#xff1f; 答&#xff1a; 在C#中&#xff0c;userInfoList_new …...

初谈软件工程(一)

我就读于兰州交通大学的软件工程专业。虽然在全国众多的985、211高校中&#xff0c;兰州交通大学可能并不显眼&#xff0c;似乎未能跻身这些所谓的“顶尖”行列就意味着不被认可。然而&#xff0c;在甘肃省的教育领域中&#xff0c;它无疑是一座璀璨的明珠&#xff0c;名列前茅…...

自动化开展思路

自动化开展思路 本人在公司一直从事自动化测试推进工作&#xff0c;最近在好友的邀请下去其就职的公司分享如何开展自动化测试&#xff01; 希望能帮其解决如下几个痛点&#xff1a; 1.上线周期长&#xff1b; 2.测试时间紧张&#xff0c;上线信心不足&#xff0c;测试覆盖…...

安装使用zookeeper

先去官网下载zookeeper&#xff1a;Apache ZooKeeper 直接进入bin目录&#xff0c;使用powerShell打开。 输入: ./zkServer.cmd 命令&#xff0c;启动zookeeper。 zookeeper一般需要配合Dubbo一起使用&#xff0c;作为注册中心使用&#xff0c;可以参考另一篇博客&#xf…...

nginx实现http反向代理及负载均衡

目录 一、代理概述 1、代理概念 1.1 正向代理&#xff08;Forward Proxy&#xff09; 1.2 反向代理&#xff08;Reverse Proxy&#xff09; 1.3 正向代理与反向代理的区别 2、同构代理与异构代理 2.1 同构代理 2.2 异构代理 2.3 同构代理与异构代理的区别 二、四层代…...

vue组件中data为什么必须是一个函数

查看本专栏目录 关于作者 还是大剑师兰特&#xff1a;曾是美国某知名大学计算机专业研究生&#xff0c;现为航空航海领域高级前端工程师&#xff1b;CSDN知名博主&#xff0c;GIS领域优质创作者&#xff0c;深耕openlayers、leaflet、mapbox、cesium&#xff0c;canvas&#x…...

科技论文编写思路

科技论文编写思路 1.基本框架2.课题可行性评估1.研究目标和意义2.研究方法和技术3.可行性和可操作性4.风险和不确定性5.经济性和资源投入6.成果预期和评估 3.写作思路4.利用AI读论文5.实验流程 1.基本框架 IntroductionRelated worksMethodExperiment and analysisDiscussionC…...

Windows虚拟机克隆后修改SID

在日常使用VMware Workstation我们经常会去克隆一些Windows操作系统的虚拟机&#xff0c;克隆的虚拟机和源虚拟机的系统安全标识符&#xff08;Security Identifiers&#xff0c;SID&#xff09;相同&#xff0c;SID是标识用户、组和计算机账户的唯一的号码。 如果两台虚拟机都…...

前端架构: 脚手架工具rxjs的快速上手应用

rxjs rxjs 是一个异步的库和Promise是非常的相似 文档&#xff1a;https://www.npmjs.com/package/rxjs Weekly Downloads 44,474,389 (动态数据) 说明这个库也是非常的流行 安装 $ npm i -S rxjs 使用 import { range, filter, map } from rxjs;range(1, 200).pipe(filte…...

小程序框架(概念、工作原理、发展及应用)

引言 移动应用的普及使得用户对于轻量级、即时可用的应用程序需求越来越迫切。在这个背景下&#xff0c;小程序应运而生&#xff0c;成为一种无需下载安装、即点即用的应用形式&#xff0c;为用户提供了更便捷的体验。小程序的快速发展离不开强大的开发支持&#xff0c;而小程…...

音视频数字化(数字与模拟-电影)

针对电视屏幕,电影被称为“大荧幕”,也是娱乐行业的顶尖产业。作为一项综合艺术,从被发明至今,近200年的发展史中,无人可以替代,并始终走在时代的前列。 电影回放的原理就是“视觉残留”,也就是快速移过眼前的画面,会在人的大脑中残留短暂的时间,随着画面不断地移过,…...

在 Ubuntu 中, 使用 fsck 命令来修复磁盘文件系统

在 Ubuntu 中&#xff0c;可以使用 fsck 命令来修复磁盘文件系统。fsck 是用于检查和修复文件系统的工具。 使用 fsck 命令修复磁盘文件系统的步骤如下&#xff1a; 首先&#xff0c;您需要在命令行终端窗口中以 root 用户身份登录。 使用 fdisk -l 命令列出所有磁盘设备。 …...

LED电子显示屏连接方式解析

LED电子显示屏作为现代化数字展示设备的重要组成部分&#xff0c;其连接方式对于显示效果和稳定性至关重要。正确选择和实施连接方式不仅可以确保LED显示屏系统的正常运行&#xff0c;还可以提高其可靠性和持久性。本文将介绍LED电子显示屏常见的连接方式&#xff0c;以帮助读者…...

Mysql运维篇(五) 部署MHA--主机环境配置

一路走来&#xff0c;所有遇到的人&#xff0c;帮助过我的、伤害过我的都是朋友&#xff0c;没有一个是敌人。如有侵权&#xff0c;请留言&#xff0c;我及时删除&#xff01; 大佬博文 https://www.cnblogs.com/gomysql/p/3675429.html MySQL 高可用&#xff08;MHA&#x…...

XML Group端口详解

在XML数据映射过程中&#xff0c;经常需要对数据进行分组聚合操作。例如&#xff0c;当处理包含多个物料明细的XML文件时&#xff0c;可能需要将相同物料号的明细归为一组&#xff0c;或对相同物料号的数量进行求和计算。传统实现方式通常需要编写脚本代码&#xff0c;增加了开…...

日语学习-日语知识点小记-构建基础-JLPT-N4阶段(33):にする

日语学习-日语知识点小记-构建基础-JLPT-N4阶段(33):にする 1、前言(1)情况说明(2)工程师的信仰2、知识点(1) にする1,接续:名词+にする2,接续:疑问词+にする3,(A)は(B)にする。(2)復習:(1)复习句子(2)ために & ように(3)そう(4)にする3、…...

java 实现excel文件转pdf | 无水印 | 无限制

文章目录 目录 文章目录 前言 1.项目远程仓库配置 2.pom文件引入相关依赖 3.代码破解 二、Excel转PDF 1.代码实现 2.Aspose.License.xml 授权文件 总结 前言 java处理excel转pdf一直没找到什么好用的免费jar包工具,自己手写的难度,恐怕高级程序员花费一年的事件,也…...

条件运算符

C中的三目运算符&#xff08;也称条件运算符&#xff0c;英文&#xff1a;ternary operator&#xff09;是一种简洁的条件选择语句&#xff0c;语法如下&#xff1a; 条件表达式 ? 表达式1 : 表达式2• 如果“条件表达式”为true&#xff0c;则整个表达式的结果为“表达式1”…...

macOS多出来了:Google云端硬盘、YouTube、表格、幻灯片、Gmail、Google文档等应用

文章目录 问题现象问题原因解决办法 问题现象 macOS启动台&#xff08;Launchpad&#xff09;多出来了&#xff1a;Google云端硬盘、YouTube、表格、幻灯片、Gmail、Google文档等应用。 问题原因 很明显&#xff0c;都是Google家的办公全家桶。这些应用并不是通过独立安装的…...

屋顶变身“发电站” ,中天合创屋面分布式光伏发电项目顺利并网!

5月28日&#xff0c;中天合创屋面分布式光伏发电项目顺利并网发电&#xff0c;该项目位于内蒙古自治区鄂尔多斯市乌审旗&#xff0c;项目利用中天合创聚乙烯、聚丙烯仓库屋面作为场地建设光伏电站&#xff0c;总装机容量为9.96MWp。 项目投运后&#xff0c;每年可节约标煤3670…...

React---day11

14.4 react-redux第三方库 提供connect、thunk之类的函数 以获取一个banner数据为例子 store&#xff1a; 我们在使用异步的时候理应是要使用中间件的&#xff0c;但是configureStore 已经自动集成了 redux-thunk&#xff0c;注意action里面要返回函数 import { configureS…...

站群服务器的应用场景都有哪些?

站群服务器主要是为了多个网站的托管和管理所设计的&#xff0c;可以通过集中管理和高效资源的分配&#xff0c;来支持多个独立的网站同时运行&#xff0c;让每一个网站都可以分配到独立的IP地址&#xff0c;避免出现IP关联的风险&#xff0c;用户还可以通过控制面板进行管理功…...

【Linux系统】Linux环境变量:系统配置的隐形指挥官

。# Linux系列 文章目录 前言一、环境变量的概念二、常见的环境变量三、环境变量特点及其相关指令3.1 环境变量的全局性3.2、环境变量的生命周期 四、环境变量的组织方式五、C语言对环境变量的操作5.1 设置环境变量&#xff1a;setenv5.2 删除环境变量:unsetenv5.3 遍历所有环境…...

【WebSocket】SpringBoot项目中使用WebSocket

1. 导入坐标 如果springboot父工程没有加入websocket的起步依赖&#xff0c;添加它的坐标的时候需要带上版本号。 <dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-websocket</artifactId> </dep…...