【谷粒商城基础篇】仓储服务:仓库维护

news/2025/1/16 5:55:15/

在这里插入图片描述

谷粒商城笔记合集

分布式基础篇分布式高级篇高可用集群篇
===简介&环境搭建===
项目简介与分布式概念(第一、二章)
基础环境搭建(第三章)
===整合SpringCloud===
整合SpringCloud、SpringCloud alibaba(第四、五章)
===前端知识===
前端开发基础知识(第六章)
===商品服务开发===
商品服务开发:基础概念、三级分类(第七、八章)
商品服务开发:品牌管理(第九章)
商品服务开发:属性分组、平台属性(第十、十一章)
商品服务:商品维护(第十二、十三章)
===仓储服务开发===
仓储服务:仓库维护(第十四章)
基础篇总结(第十五章)

十四、仓储服务&仓库维护⚠️

14.1 后端开发:整合仓储服务⚠️

  1. 修改 网关服务 的路由配置并重启:application.yaml

    spring:cloud:gateway:routes:- id: ware_routeuri: lb://bilimall-warepredicates:- Path=/api/ware/**filters:- RewritePath=/api/?(?<segment>.*),/$\{segment}
    
  2. 修改 仓储服务 的配置文件:注册中心、配置中心、服务名、Mybatis等

    spring:datasource:username: rootpassword: bilimallurl: jdbc:mysql://114.132.162.129:3306/bilimall_wms?useUnicode=true&characterEncoding=utf-8&useSSL=falsedriver-class-name: com.mysql.cj.jdbc.Drivercloud:nacos:discovery:server-addr: 114.132.162.129:8848application:name: bilimall-warejackson:date-format: yyyy-MM-dd HH:mm:ss
    mybatis-plus:# mapper文件扫描:不仅扫描我的类路径,还包括依赖的其他类路径mapper-locations: classpath*:/mapper/**/*.xmlglobal-config:db-config:id-type: auto # 数据库主键自增
    server:port: 12000
    logging:level: cn.lzwei: debug
    
  3. 修改 仓储服务 的主启动类:cn/lzwei/bilimall/ware/BilimallWareApplication.java

    @EnableTransactionManagement
    @EnableFeignClients(basePackages = "cn.lzwei.bilimall.ware.feign")
    @EnableDiscoveryClient
    @MapperScan("cn.lzwei.bilimall.ware.dao")
    @SpringBootApplication
    public class BilimallWareApplication {public static void main(String[] args) {SpringApplication.run(BilimallWareApplication.class, args);}}
    

14.2 API:查询 仓库列表

在这里插入图片描述

  1. WareInfoController:查询仓库列表

    @RestController
    @RequestMapping("ware/wareinfo")
    public class WareInfoController {@Autowiredprivate WareInfoService wareInfoService;/*** 查询仓库列表:模糊查询*/@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params){PageUtils page = wareInfoService.queryPage(params);return R.ok().put("page", page);}
    }
    
  2. WareInfoService:查询仓库列表

    public interface WareInfoService extends IService<WareInfoEntity> {PageUtils queryPage(Map<String, Object> params);
    }
    
  3. WareInfoServiceImpl:查询仓库列表

    @Service("wareInfoService")
    public class WareInfoServiceImpl extends ServiceImpl<WareInfoDao, WareInfoEntity> implements WareInfoService {@Overridepublic PageUtils queryPage(Map<String, Object> params) {QueryWrapper<WareInfoEntity> queryWrapper = new QueryWrapper<>();String key = (String) params.get("key");if(!StringUtils.isNullOrEmpty(key)){queryWrapper.and(item->{item.eq("id",key).or().like("name",key).or().like("areacode",key);});}IPage<WareInfoEntity> page = this.page(new Query<WareInfoEntity>().getPage(params),queryWrapper);return new PageUtils(page);}
    }
    

14.3 API:查询 商品库存

在这里插入图片描述

  1. WareSkuController:查询商品库存列表

    @RestController
    @RequestMapping("ware/waresku")
    public class WareSkuController {@Autowiredprivate WareSkuService wareSkuService;/*** 查询商品库存列表:仓库、指定商品*/@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params){PageUtils page = wareSkuService.queryPage(params);return R.ok().put("page", page);}
    }
    
  2. WareSkuService:查询商品库存列表

    public interface WareSkuService extends IService<WareSkuEntity> {/*** 查询商品库存列表:仓库、指定商品*/PageUtils queryPage(Map<String, Object> params);
    }
    
  3. WareSkuServiceImpl:查询商品库存列表

    @Service("wareSkuService")
    public class WareSkuServiceImpl extends ServiceImpl<WareSkuDao, WareSkuEntity> implements WareSkuService {/*** 查询商品库存列表:仓库、指定商品*/@Overridepublic PageUtils queryPage(Map<String, Object> params) {QueryWrapper<WareSkuEntity> queryWrapper = new QueryWrapper<>();//1.仓库String wareId = (String) params.get("wareId");if(!StringUtils.isNullOrEmpty(wareId)){queryWrapper.eq("ware_id",wareId);}//2.指定商品String skuId = (String) params.get("skuId");if(!StringUtils.isNullOrEmpty(skuId)){queryWrapper.eq("sku_id",skuId);}IPage<WareSkuEntity> page = this.page(new Query<WareSkuEntity>().getPage(params),queryWrapper);return new PageUtils(page);}
    }
    

14.4 API:查询 采购需求

在这里插入图片描述

  1. PurchaseDetailController

    @RestController
    @RequestMapping("ware/purchasedetail")
    public class PurchaseDetailController {@Autowiredprivate PurchaseDetailService purchaseDetailService;/*** 查询采购需求列表:模糊查询、状态、指定仓库*/@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params){PageUtils page = purchaseDetailService.queryPage(params);return R.ok().put("page", page);}
    }
    
  2. PurchaseDetailService

    public interface PurchaseDetailService extends IService<PurchaseDetailEntity> {/*** 查询采购需求列表:模糊查询、状态、指定仓库*/PageUtils queryPage(Map<String, Object> params);
    }
    
  3. PurchaseDetailServiceImpl

    @Service("purchaseDetailService")
    public class PurchaseDetailServiceImpl extends ServiceImpl<PurchaseDetailDao, PurchaseDetailEntity> implements PurchaseDetailService {/*** 查询采购需求列表:模糊查询、状态、指定仓库*/@Overridepublic PageUtils queryPage(Map<String, Object> params) {QueryWrapper<PurchaseDetailEntity> queryWrapper = new QueryWrapper<>();//1.模糊查询String key = (String) params.get("key");if (!StringUtils.isNullOrEmpty(key)){queryWrapper.and(item->{item.eq("purchase_id",key).or().eq("id",key).or().eq("sku_id",key);});}//2.状态String status = (String) params.get("status");if (!StringUtils.isNullOrEmpty(status)){queryWrapper.eq("status",status);}//3.指定仓库String wareId = (String) params.get("wareId");if (!StringUtils.isNullOrEmpty(wareId)){queryWrapper.eq("ware_id",wareId);}IPage<PurchaseDetailEntity> page = this.page(new Query<PurchaseDetailEntity>().getPage(params),queryWrapper);return new PageUtils(page);}
    }
    

14.5 API:新增 采购单

在这里插入图片描述

新增采购单,同时保存相关时间信息:PurchaseController

@RestController
@RequestMapping("ware/purchase")
public class PurchaseController {@Autowiredprivate PurchaseService purchaseService;/*** 保存*/@RequestMapping("/save")public R save(@RequestBody PurchaseEntity purchase){purchase.setCreateTime(new Date());purchase.setUpdateTime(new Date());purchaseService.save(purchase);return R.ok();}
}

14.5 API:合并采购需求⚠️

在这里插入图片描述

14.5.1 查询 可被合并到的采购单

在这里插入图片描述

  1. PurchaseController

    @RestController
    @RequestMapping("ware/purchase")
    public class PurchaseController {@Autowiredprivate PurchaseService purchaseService;/*** 获取采购单列表:状态为 新建、已分配*/@GetMapping("/unreceive/list")public R unrecivePurchase(@RequestParam Map<String, Object> params){PageUtils page=purchaseService.getUnrecivePurchase(params);return R.ok().put("page",page);}
    }
    
  2. PurchaseService

    public interface PurchaseService extends IService<PurchaseEntity> {/*** 获取采购单列表:状态为 新建、已分配*/PageUtils getUnrecivePurchase(Map<String, Object> params);
    }
    
  3. PurchaseServiceImpl

    @Service("purchaseService")
    public class PurchaseServiceImpl extends ServiceImpl<PurchaseDao, PurchaseEntity> implements PurchaseService {/*** 获取采购单列表:状态为 新建、已分配*/@Overridepublic PageUtils getUnrecivePurchase(Map<String, Object> params) {QueryWrapper<PurchaseEntity> queryWrapper = new QueryWrapper<>();queryWrapper.eq("status",0).or().eq("status",1);IPage<PurchaseEntity> page = this.page(new Query<PurchaseEntity>().getPage(params),queryWrapper);return new PageUtils(page);}
    }
    

14.5.2 合并采购需求⚠️

在这里插入图片描述

  1. 公共服务 中创建 采购单、采购需求 状态的枚举常量类:cn/lzwei/common/constant/WareConstant.java

    public class WareConstant {//采购单状态public enum PurchaseType{CREATE(0,"新建"),ASSIGNED(1,"已分配"),RECEIVED(2,"已领取"),FINISHED(3,"已完成"),HASEXECPTION(4,"有异常");private Integer code;private String msg;PurchaseType(Integer code,String msg){this.code=code;this.msg=msg;}public Integer getCode() {return code;}public String getMsg() {return msg;}}//采购需求状态public enum PurchaseDetailType{CREATE(0,"新建"),ASSIGNED(1,"已分配"),BUYING(2,"正在采购"),FINISHED(3,"已完成"),FAILED(4,"采购失败");private Integer code;private String msg;PurchaseDetailType(Integer code,String msg){this.code=code;this.msg=msg;}public Integer getCode() {return code;}public String getMsg() {return msg;}}
    }
    
  2. 仓储服务 中创建用来接收请求的VO:cn/lzwei/bilimall/ware/vo/MergePurchaseVo.java

    @Data
    public class MergePurchaseVo {//采购单idprivate Long purchaseId;//采购需求列表private List<Long> items;
    }
    
  3. PurchaseController:合并采购需求

    @RestController
    @RequestMapping("ware/purchase")
    public class PurchaseController {@Autowiredprivate PurchaseService purchaseService;/*** 合并采购需求:1.指定采购单,更新对应的采购需求以及采购单信息;2.无指定采购单,创建采购单并更新采购需求以及采购单信息*/@PostMapping("/merge")public R mergePurchase(@RequestBody MergePurchaseVo mergePurchaseVo){purchaseService.mergePurchase(mergePurchaseVo);return R.ok();}
    }
    
  4. PurchaseService:合并采购需求

    public interface PurchaseService extends IService<PurchaseEntity> {/*** 合并采购需求:1.指定采购单,更新对应的采购需求以及采购单信息;2.无指定采购单,创建采购单并更新采购需求以及采购单信息*/void mergePurchase(MergePurchaseVo mergePurchaseVo);
    }
    
  5. PurchaseServiceImpl:合并采购需求

    @Service("purchaseService")
    public class PurchaseServiceImpl extends ServiceImpl<PurchaseDao, PurchaseEntity> implements PurchaseService {@ResourcePurchaseDetailService purchaseDetailService;/*** 合并采购需求:1.指定采购单,更新对应的采购需求以及采购单信息;2.无指定采购单,创建采购单并更新采购需求以及采购单信息*/@Transactional@Overridepublic void mergePurchase(MergePurchaseVo mergePurchaseVo) {//判断是否有指定采购单Long purchaseId = mergePurchaseVo.getPurchaseId();if(purchaseId==null){//新建采购单PurchaseEntity purchaseEntity = new PurchaseEntity();purchaseEntity.setCreateTime(new Date());purchaseEntity.setUpdateTime(new Date());purchaseEntity.setStatus(WareConstant.PurchaseType.CREATE.getCode()); //新建状态this.save(purchaseEntity);purchaseId=purchaseEntity.getId();}//TODO 确认采购单状态是0、1才可以合并//1.获取采购单集合List<Long> items = mergePurchaseVo.getItems();Long finalPurchaseId = purchaseId;List<PurchaseDetailEntity> purchaseDetailEntities = items.stream().map(item -> {PurchaseDetailEntity purchaseDetailEntity = new PurchaseDetailEntity();purchaseDetailEntity.setId(item);purchaseDetailEntity.setPurchaseId(finalPurchaseId);purchaseDetailEntity.setStatus(WareConstant.PurchaseDetailType.ASSIGNED.getCode());return purchaseDetailEntity;}).collect(Collectors.toList());//2.更新采购需求上的采购单id和状态purchaseDetailService.updateBatchById(purchaseDetailEntities);//3.修改采购单的更新时间PurchaseEntity purchaseEntity = new PurchaseEntity();purchaseEntity.setId(finalPurchaseId);purchaseEntity.setUpdateTime(new Date());this.updateById(purchaseEntity);}
    }
    

14.6 API:模拟领取采购单💡

在这里插入图片描述

  1. PurchaseController:模拟领取采购单

    @RestController
    @RequestMapping("ware/purchase")
    public class PurchaseController {@Autowiredprivate PurchaseService purchaseService;/*** 模拟领取采购单:需要验证采购单、采购需求的状态*/@PostMapping("/received")public R receivedPurchase(@RequestBody List<Long> ids){purchaseService.receivedPurchase(ids);return R.ok();}
    }
    
  2. PurchaseService:模拟领取采购单

    public interface PurchaseService extends IService<PurchaseEntity> {/*** 模拟领取采购单:需要验证采购单、采购需求的状态*/void receivedPurchase(List<Long> ids);
    }
    
  3. PurchaseServiceImpl:模拟领取采购单

    @Service("purchaseService")
    public class PurchaseServiceImpl extends ServiceImpl<PurchaseDao, PurchaseEntity> implements PurchaseService {@ResourcePurchaseDetailService purchaseDetailService;/*** 模拟领取采购单:需要验证采购单、采购需求的状态*/@Transactional@Overridepublic void receivedPurchase(List<Long> ids) {//1.验证采购单状态:只有新建、已分配的采购单可以被领取List<PurchaseEntity> purchaseEntities = ids.stream().map(item -> {PurchaseEntity purchaseEntity = this.getById(item);return purchaseEntity;}).filter(item->{Integer status = item.getStatus();if(status==WareConstant.PurchaseType.CREATE.getCode() || status==WareConstant.PurchaseType.ASSIGNED.getCode()){return true;}return false;}).map(item->{//2.更新采购单状态、更新时间item.setStatus(WareConstant.PurchaseType.RECEIVED.getCode());item.setUpdateTime(new Date());return item;}).collect(Collectors.toList());this.updateBatchById(purchaseEntities);//遍历每一份采购单for (PurchaseEntity purchaseEntity : purchaseEntities) {//3.获取采购单下的采购需求:状态必须为新建、已分配Long id = purchaseEntity.getId();List<PurchaseDetailEntity> purchaseDetailEntities = purchaseDetailService.listDetailByPurchaseId(id);List<PurchaseDetailEntity> collect = purchaseDetailEntities.stream().map(item -> {PurchaseDetailEntity purchaseDetailEntity = new PurchaseDetailEntity();purchaseDetailEntity.setId(item.getId());purchaseDetailEntity.setStatus(WareConstant.PurchaseDetailType.BUYING.getCode());return purchaseDetailEntity;}).collect(Collectors.toList());//4.更新采购需求的状态purchaseDetailService.updateBatchById(collect);}}
    }
    
  4. PurchaseDetailService:获取采购单下新建或已分配状态的采购需求

    public interface PurchaseDetailService extends IService<PurchaseDetailEntity> {/*** 获取采购单下新建或已分配状态的采购需求:用于领取采购单*/List<PurchaseDetailEntity> listDetailByPurchaseId(Long id);
    }
    
  5. PurchaseDetailServiceImpl:获取采购单下新建或已分配状态的采购需求

    @Service("purchaseDetailService")
    public class PurchaseDetailServiceImpl extends ServiceImpl<PurchaseDetailDao, PurchaseDetailEntity> implements PurchaseDetailService {/*** 获取采购单下新建或已分配状态的采购需求:用于领取采购单*/@Overridepublic List<PurchaseDetailEntity> listDetailByPurchaseId(Long id) {//获取采购单下新建或已分配状态的采购需求QueryWrapper<PurchaseDetailEntity> queryWrapper = new QueryWrapper<PurchaseDetailEntity>().eq("purchase_id", id).and(item->{item.eq("status",0).or().eq("status",1);});return this.list(queryWrapper);}
    }
    

14.7 API:模拟完成采购单⚠️

14.7.1 效果

采购完成前

在这里插入图片描述

模拟采购

在这里插入图片描述

采购完成后

在这里插入图片描述

14.7.2 商品服务开发

  • SkuInfoController.java:用于仓库服务远程调用查询商品名称

    @RestController
    @RequestMapping("product/skuinfo")
    public class SkuInfoController {@Autowiredprivate SkuInfoService skuInfoService;/*** 信息:将用于仓库服务远程调用查询商品名称*/@RequestMapping("/info/{skuId}")public R info(@PathVariable("skuId") Long skuId){SkuInfoEntity skuInfo = skuInfoService.getById(skuId);return R.ok().put("skuInfo", skuInfo);}
    }
    

14.7.3 库存服务开发

  1. 创建接收数据的采购单VO:cn/lzwei/bilimall/ware/vo/PurchaseDoneVo.java

    @Data
    public class PurchaseDoneVo {//采购单id@NotNullprivate Long id;//采购需求列表完成状况private List<PurchaseDetailsDoneVo> items;
    }
    
  2. 创建接收数据的采购需求VO:cn/lzwei/bilimall/ware/vo/PurchaseDetailsDoneVo.java

    @Data
    public class PurchaseDetailsDoneVo {//采购需求idprivate Long itemId;//采购需求状态private Integer status;//失败原因private String reason;
    }
    
  3. 创建远程调用商品服务的接口:cn/lzwei/bilimall/ware/feign/ProductFeignService.java

    @FeignClient(name = "bilimall-product")
    public interface ProductFeignService {//获取商品服务的sku信息@RequestMapping("/product/skuinfo/info/{skuId}")R info(@PathVariable("skuId") Long skuId);
    }
    
  4. PurchaseController:模拟完成采购:更新采购需求的状态 ——> 更新采购单状态 ——> 添加库存

    @RestController
    @RequestMapping("ware/purchase")
    public class PurchaseController {@Autowiredprivate PurchaseService purchaseService;/*** 模拟完成采购:更新采购需求的状态 ——> 更新采购单状态 ——> 添加库存*/@PostMapping("/done")public R done(@Valid @RequestBody PurchaseDoneVo purchaseDoneVo){purchaseService.done(purchaseDoneVo);return R.ok();}
    }
    
  5. PurchaseService:模拟完成采购:更新采购需求的状态 ——> 更新采购单状态 ——> 添加库存

    public interface PurchaseService extends IService<PurchaseEntity> {/*** 模拟完成采购:更新采购需求的状态 ——> 更新采购单状态 ——> 添加库存*/void done(PurchaseDoneVo purchaseDoneVo);
    }
    
  6. PurchaseServiceImpl:模拟完成采购:更新采购需求的状态 ——> 更新采购单状态 ——> 添加库存

    @Service("purchaseService")
    public class PurchaseServiceImpl extends ServiceImpl<PurchaseDao, PurchaseEntity> implements PurchaseService {@ResourcePurchaseDetailService purchaseDetailService;@ResourceWareSkuService wareSkuService;@ResourceProductFeignService productFeignService;/*** 模拟完成采购:更新采购需求的状态 ——> 更新采购单状态 ——> 添加库存*/@Transactional@Overridepublic void done(PurchaseDoneVo purchaseDoneVo) {//此采购单状态为新建、已分配、已领取时才可被完成Long PurchaseId = purchaseDoneVo.getId();PurchaseEntity purchase = this.getById(PurchaseId);Integer purchaseCanDone = purchase.getStatus();if(purchaseCanDone==WareConstant.PurchaseType.CREATE.getCode() ||purchaseCanDone==WareConstant.PurchaseType.ASSIGNED.getCode() ||purchaseCanDone==WareConstant.PurchaseType.RECEIVED.getCode()){//标志位:用于判断采购单状态boolean purchaseStatus=true;//遍历采购需求列表List<PurchaseDetailsDoneVo> items = purchaseDoneVo.getItems();for (PurchaseDetailsDoneVo item : items) {//采购需求状态为新建、已分配、正在采购时才可被完成Long itemId = item.getItemId();PurchaseDetailEntity purchaseDetailEntity = purchaseDetailService.getById(itemId);Integer purchaseDetailCanDone = purchaseDetailEntity.getStatus();if(purchaseDetailCanDone==WareConstant.PurchaseDetailType.CREATE.getCode() ||purchaseDetailCanDone==WareConstant.PurchaseDetailType.ASSIGNED.getCode() ||purchaseDetailCanDone==WareConstant.PurchaseDetailType.BUYING.getCode()){//1.更新采购需求状态Integer status = item.getStatus();purchaseDetailEntity.setStatus(status);purchaseDetailService.updateById(purchaseDetailEntity);if(status==4){//采购失败purchaseStatus=false;}else{//采购完成//2.添加或者修改采购完成的商品库存:需要skuid、仓库id、库存、sku名字(调用远程服务)Long skuId = purchaseDetailEntity.getSkuId();Long wareId = purchaseDetailEntity.getWareId();Integer skuNum = purchaseDetailEntity.getSkuNum();Map<String,Object> skuInfo = (Map<String, Object>) productFeignService.info(skuId).get("skuInfo");String skuName= (String) skuInfo.get("skuName");wareSkuService.addWare(skuId,wareId,skuNum,skuName);}}}//3.根据采购需求列表的状态更新采购单状态PurchaseEntity purchaseEntity = new PurchaseEntity();purchaseEntity.setId(PurchaseId);purchaseEntity.setStatus(purchaseStatus?WareConstant.PurchaseType.FINISHED.getCode():WareConstant.PurchaseType.HASEXECPTION.getCode());purchaseEntity.setUpdateTime(new Date());this.updateById(purchaseEntity);}}
    }
    
  7. WareSkuService:添加或者修改采购完成的商品库存

    public interface WareSkuService extends IService<WareSkuEntity> {/*** 添加或者修改采购完成的商品库存:需要skuid、仓库id、库存、sku名字(调用远程服务)*/void addWare(Long skuId, Long wareId, Integer skuNum, String skuName);
    }
    
  8. WareSkuServiceImpl:添加或者修改采购完成的商品库存

    @Service("wareSkuService")
    public class WareSkuServiceImpl extends ServiceImpl<WareSkuDao, WareSkuEntity> implements WareSkuService {/*** 添加或者修改采购完成的商品库存:需要skuid、仓库id、库存、sku名字(调用远程服务)*/@Overridepublic void addWare(Long skuId, Long wareId, Integer skuNum, String skuName) {//判断仓库是否存在该商品记录QueryWrapper<WareSkuEntity> queryWrapper = new QueryWrapper<>();queryWrapper.eq("sku_id",skuId).eq("ware_id",wareId);List<WareSkuEntity> list = this.list(queryWrapper);if(list==null || list.size()==0){//1.新增:不存在库存记录WareSkuEntity wareSkuEntity = new WareSkuEntity();wareSkuEntity.setSkuId(skuId);wareSkuEntity.setWareId(wareId);wareSkuEntity.setStock(skuNum);wareSkuEntity.setSkuName(skuName);this.save(wareSkuEntity);}else{//2.修改:存在库存记录baseMapper.updateSkuStock(skuId,wareId,skuNum);}}
    }
    
  9. WareSkuDao.java:完成采购单,商品存在库存记录时更新库存

    @Mapper
    public interface WareSkuDao extends BaseMapper<WareSkuEntity> {void updateSkuStock(@Param(value = "skuId") Long skuId,@Param(value = "wareId") Long wareId,@Param(value = "skuNum") Integer skuNum);
    }
    
  10. WareSkuDao.xml:完成采购单,商品存在库存记录时更新库存

    <mapper namespace="cn.lzwei.bilimall.ware.dao.WareSkuDao"><update id="updateSkuStock">UPDATE `wms_ware_sku` SET stock=stock+#{skuNum} WHERE sku_id=#{skuId} AND ware_id=#{wareId}</update>
    </mapper>
    

http://www.ppmy.cn/news/9280.html

相关文章

C语言进阶内功修炼——深度剖析数据在内存中的存储

&#x1f412;个人主页&#xff1a;平凡的小苏 &#x1f4da;学习格言&#xff1a;别人可以拷贝我的模式&#xff0c;但不能拷贝我不断往前的激情 目录 &#x1f680;1. 数据类型介绍 &#x1f307;1.1 类型的基本归类&#xff1a; &#x1f680;2. 整形在内存中的存储 &am…

2022年报表开发工具Stimulsoft产品迭代汇总

Stimulsoft Reports是一款报告编写器&#xff0c;主要用于在桌面和Web上从头开始创建任何复杂的报告。可以在大多数平台上轻松实现部署&#xff0c;如ASP.NET, WinForms, .NET Core, JavaScript, WPF, Angular, Blazor, PHP, Java等&#xff0c;在你的应用程序中嵌入报告设计器…

C语言—— 表达式求值

C语言—— 表达式求值一、隐式类型转换二、 整型提升三、 算术转换四、操作符的属性表达式求值的顺序一部分是由操作符的 优先级和结合性决定。同样&#xff0c;有些表达式的操作数在求值的过程中可能需要转换为其他类型。一、隐式类型转换 C语言的整型算术运算总是至少以缺省…

JMeter自定义函数

JMeter二次开发需求一般集中在2个方向&#xff1a;针对请求类&#xff0c;即需要和服务器进行通信的&#xff0c;我们一般是做java请求的二次开发针对数据处理类型&#xff0c;是不需要和服务器进行通信&#xff0c;是在客户端完成的&#xff0c;一般是做JMeter的自定义函数除了…

蓝桥杯Python练习题15-区间k大数查询

资源限制   内存限制&#xff1a;256.0MB C/C时间限制&#xff1a;1.0s Java时间限制&#xff1a;3.0s Python时间限制&#xff1a;5.0s 问题描述   给定一个序列&#xff0c;每次询问序列中第l个数到第r个数中第K大的数是哪个。 输入格式   第一行包含一个数n&#xf…

Windows下redis环境搭建(可查看源码及Debug调试进入源码)及简易使用

Windows下redis环境搭建&#xff08;可查看源码及Debug调试进入源码&#xff09;及简易使用 在我们使用redis进行学习的过程中&#xff0c;在Windows平台上进行学习是一个非常高效的选择&#xff0c;因此下面介绍如何在Windows环境下搭建一个redis环境&#xff08;即可Debug调试…

前端学习笔记--06 node.js

运行在服务器的JavaScript 不需要浏览器&#xff0c;可以直接使用nodejs运行代码模拟服务器效果&#xff0c;比如tomcatnpm&#xff08;node package manage,节点包管理工具&#xff09;包管理工具 npm常用命令&#xff1a; 1.npm init -y 默认初始化 2.npm install xx 安装包…

Linux Free 命令

目录 Free命令有什么用 各项名词解释 服务器实际可用内存看哪个值 为什么free2是实际可用内存 结论 Free命令语法 Free命令有什么用 熟悉的都知道&#xff0c;这是用来Linux主机内存使用情况的。如下&#xff1a; 各项名词解释 可以把上图看为3部分&#xff0c;分别是 M…