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

淄博企业网站建设有限公司移动互联网开发技术是什么

淄博企业网站建设有限公司,移动互联网开发技术是什么,网站推广是怎么做的,友情链接交换平台源码文章目录 一、项目演示二、项目介绍三、运行截图四、主要代码1.保存宠物信息代码2.提交订单信息代码3.查询评论信息代码 一、项目演示 项目演示地址#xff1a; 视频地址 二、项目介绍 项目描述#xff1a;这是一个基于SpringBootuniApp框架开发的宠物领养微信小程序系统。… 文章目录 一、项目演示二、项目介绍三、运行截图四、主要代码1.保存宠物信息代码2.提交订单信息代码3.查询评论信息代码 一、项目演示 项目演示地址 视频地址 二、项目介绍 项目描述这是一个基于SpringBootuniApp框架开发的宠物领养微信小程序系统。首先这是一个前后端分离的项目前端分为用户端和管理端用户端使用微信小程序(uniApp开发)管理端使用Web页面(Vue开发)。然后这项目代码简洁规范注释说明详细易于理解和学习。其次这项目功能丰富具有一个宠物领养微信小程序系统该有的所有功能。 项目功能此项目分为两个角色普通用户和管理员。普通用户有登录注册、浏览宠物信息、浏览论坛帖子信息、管理自己发布的宠物信息、管理个人基本信息、管理自己发布的论坛帖子信息、评论帖子、收藏宠物、拍下宠物、管理自己的订单信息等等功能。管理员有管理所有用户信息、管理所有轮播图信息、管理所有首页板块信息、管理所有宠物分类信息、管理所有宠物信息、管理所有订单信息、管理所有论坛帖子信息、管理所有评论信息、查看收益数据图表等等功能。 应用技术SpringBoot uniApp Vue3 MySQL MyBatis Redis ElementUI-Plus uni-ui Vite TypeScript 运行环境IntelliJ IDEA2019.3.5 MySQL5.7项目压缩包中自带) Redis5.0.5项目压缩包中自带 JDK1.8 Maven3.6.3项目压缩包中自带 Node16.20.2项目压缩包中自带 微信开发者工具项目压缩包中自带 Visual Studio Code项目压缩包中自带 三、运行截图 四、主要代码 1.保存宠物信息代码 /*** 保存宠物信息* param petDTO* return*/Overridepublic ResponseDTOBoolean savePet(PetDTO petDTO) {// 进行统一表单验证CodeMsg validate ValidateEntityUtil.validate(petDTO);if (!validate.getCode().equals(CodeMsg.SUCCESS.getCode())) {return ResponseDTO.errorByMsg(validate);}Pet pet CopyUtil.copy(petDTO, Pet.class);if(CommonUtil.isEmpty(pet.getId())) {// 添加操作pet.setId(UuidUtil.getShortUuid());pet.setCreateTime(new Date());pet.setState(PetStateEnum.WAIT.getCode());batchInsertPicture(petDTO.getPhotoList(), pet.getId());if(petMapper.insertSelective(pet) 0) {return ResponseDTO.errorByMsg(CodeMsg.PET_ADD_ERROR);}} else {// 修改操作pet.setState(Optional.ofNullable(pet.getState()).orElse(PetStateEnum.WAIT.getCode()));PictureExample pictureExample new PictureExample();pictureExample.createCriteria().andRefIdEqualTo(pet.getId());pictureMapper.deleteByExample(pictureExample);batchInsertPicture(petDTO.getPhotoList(), pet.getId());if(petMapper.updateByPrimaryKeySelective(pet) 0) {return ResponseDTO.errorByMsg(CodeMsg.PET_EDIT_ERROR);}}return ResponseDTO.successByMsg(true, 保存成功);}2.提交订单信息代码 /*** 提交订单信息* param orderDTO* return*/Overridepublic ResponseDTOBoolean submitOrder(OrderDTO orderDTO) {// 进行统一表单验证CodeMsg validate ValidateEntityUtil.validate(orderDTO);if (!validate.getCode().equals(CodeMsg.SUCCESS.getCode())) {return ResponseDTO.errorByMsg(validate);}Order order CopyUtil.copy(orderDTO, Order.class);Pet pet petMapper.selectByPrimaryKey(order.getPetId());if(pet.getUserId().equals(order.getUserId())) {return ResponseDTO.errorByMsg(CodeMsg.ORDER_REPEAT_ERROR);}if(!PetStateEnum.SUCCESS.getCode().equals(pet.getState())) {return ResponseDTO.errorByMsg(CodeMsg.ORDER_PET_STATE_ERROR);}Category category categoryMapper.selectByPrimaryKey(pet.getCategoryId());order.setCategoryName(Optional.ofNullable(category.getName()).orElse());Plate plate plateMapper.selectByPrimaryKey(pet.getPlateId());order.setPlateName(Optional.ofNullable(plate.getName()).orElse());order.setId(UuidUtil.getShortUuid());order.setTotalPrice(pet.getPrice());order.setPetName(pet.getName());order.setPetInfo(pet.getInfo());PictureExample pictureExample new PictureExample();pictureExample.createCriteria().andTypeEqualTo(PictureTypeEnum.PET.getCode()).andRefIdEqualTo(pet.getId());pictureExample.setOrderByClause(sort asc);ListPicture pictureList pictureMapper.selectByExample(pictureExample);if(pictureList.size() 0) {order.setPetPhoto(pictureList.get(0).getPhoto());}order.setSellerId(pet.getUserId());order.setCreateTime(new Date());if(orderMapper.insertSelective(order) 0) {return ResponseDTO.errorByMsg(CodeMsg.ORDER_ADD_ERROR);}pet.setState(PetStateEnum.SELL.getCode());petMapper.updateByPrimaryKeySelective(pet);return ResponseDTO.successByMsg(true, 下单成功);}3.查询评论信息代码 /*** 查询评论信息* param commentDTO* return*/Overridepublic ResponseDTOListCommentDTO getCommentList(CommentDTO commentDTO) {CommentExample commentExample new CommentExample();CommentExample.Criteria criteria commentExample.createCriteria();int total 0;if(!CommonUtil.isEmpty(commentDTO.getPostId())) {criteria.andPostIdEqualTo(commentDTO.getPostId());total commentMapper.countByExample(commentExample);}// 先查所有父级评论criteria.andParentIdEqualTo();commentExample.setOrderByClause(create_time desc);ListComment commentList commentMapper.selectByExample(commentExample);ListCommentDTO commentDTOList CopyUtil.copyList(commentList, CommentDTO.class);for(CommentDTO comment : commentDTOList) {User user userMapper.selectByPrimaryKey(comment.getUserId());comment.setUserDTO(CopyUtil.copy(user, UserDTO.class));// 查询子评论CommentExample childCommentExample new CommentExample();childCommentExample.createCriteria().andParentIdEqualTo(comment.getId());childCommentExample.setOrderByClause(create_time desc);ListComment childCommentList commentMapper.selectByExample(childCommentExample);// 查询子评论ListCommentDTO childCommentDTOList CopyUtil.copyList(childCommentList, CommentDTO.class);for(CommentDTO childComment : childCommentDTOList) {childComment.setUserDTO(CopyUtil.copy(userMapper.selectByPrimaryKey(childComment.getUserId()), UserDTO.class));childComment.setReplyUserDTO(CopyUtil.copy(userMapper.selectByPrimaryKey(childComment.getReplyId()), UserDTO.class));}comment.setChildCommentDTOList(childCommentDTOList);}return ResponseDTO.successByMsg(commentDTOList, String.valueOf(total));}
http://www.zqtcl.cn/news/335553/

相关文章:

  • 智能建站实验报告成功营销网站
  • 基于jsp的网站开发开题报告青海公路工程建设市场信用信息服务网站
  • 做网站页面的软件wordpress如何开启page页面评论
  • 做网站最简单的长春财经学院
  • 导购网站 icp备案要求网站设置ico
  • ftp做网站营销策划方案步骤
  • 网站建设若干意见wordpress查看数据库密码
  • 什么网站可以做宣传西安网站建设聚星互联
  • 产品展示网站源码2015年做哪些网站致富
  • 潍坊网站制作推广怎样做彩票网站
  • 做视频网站被判刑自己怎么做企业网站建设
  • 安庆网站建设兼职哪个公司的卡网络最好
  • tp框架做响应式网站青岛网站建设首选
  • 外国自适应企业网站做网站模板用什么框架
  • win7做网站服务器隐私浏览器
  • 优秀的设计网站广州排名推广
  • 做电商设计有什么好的网站推荐软件产品开发流程图
  • 建设网站请示宣传企业网站建设的
  • 汉中定制网站建设公司网站建设建站知识
  • 做壁纸网站建站优化办事效率高
  • linux 做网站数据库怎么开发ios软件
  • 沛县网站设计html制作网页的代码
  • 南昌网站建设公司如何万维网络(临沂网站建设)
  • 张家界做网站洛阳网站建设哪家专业
  • 快餐网站模板电子版邀请函制作软件免费
  • 有什么做视频的素材网站网站名称注册保护
  • 北京 顺义 网站制作h5网站网站建设
  • 网站在百度上搜不到了wordpress导航菜单加图片
  • wordpress网站访问慢网站建设35类
  • 绍兴做网站价格字体