创意工坊双创管理系统 毕业设计 JAVA+Vue+SpringBoot+MySQL(二)

本文涉及的产品
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS MySQL,集群版 2核4GB 100GB
推荐场景:
搭建个人博客
RDS MySQL Serverless 高可用系列,价值2615元额度,1个月
简介: 创意工坊双创管理系统 毕业设计 JAVA+Vue+SpringBoot+MySQL


四、核心代码

4.1 查询项目

@RequestMapping(value = "/getByPage", method = RequestMethod.GET)
@ApiOperation(value = "查询项目")
public Result<IPage<Project>> getByPage(@ModelAttribute Project project ,@ModelAttribute PageVo page){
    QueryWrapper<Project> qw = new QueryWrapper<>();
    if(!ZwzNullUtils.isNull(project.getTitle())) {
        qw.like("title",project.getTitle());
    }
    if(!ZwzNullUtils.isNull(project.getUserName())) {
        qw.like("user_name",project.getUserName());
    }
    IPage<Project> data = iProjectService.page(PageUtil.initMpPage(page),qw);
    return new ResultUtil<IPage<Project>>().setData(data);
}

4.2 移动端新增团队

@RequestMapping(value = "/insertApp", method = RequestMethod.GET)
@ApiOperation(value = "新增团队")
public Result<Team> insertApp(@RequestParam String title,@RequestParam String content){
    Team team = new Team();
    team.setTitle(title);
    team.setContent(content);
    User currUser = securityUtil.getCurrUser();
    team.setUserId(currUser.getId());
    team.setUserName(currUser.getNickname());
    team.setTime(DateUtil.now());
    iTeamService.saveOrUpdate(team);
    return new ResultUtil<Team>().setData(team);
}

4.3 查询讲座

@RequestMapping(value = "/getByPage", method = RequestMethod.GET)
@ApiOperation(value = "查询讲座")
public Result<IPage<Lecture>> getByPage(@ModelAttribute Lecture lecture ,@ModelAttribute PageVo page){
    QueryWrapper<Lecture> qw = new QueryWrapper<>();
    User currUser = securityUtil.getCurrUser();
    if(!ZwzNullUtils.isNull(lecture.getTitle())) {
        qw.like("title",lecture.getTitle());
    }
    if(!ZwzNullUtils.isNull(lecture.getContent())) {
        qw.like("content",lecture.getContent());
    }
    IPage<Lecture> data = iLectureService.page(PageUtil.initMpPage(page),qw);
    for (Lecture vo : data.getRecords()) {
        QueryWrapper<Good> goodQw = new QueryWrapper<>();
        goodQw.eq("lecture_id",vo.getId());
        goodQw.eq("user_id",currUser.getId());
        vo.setGood(iGoodService.count(goodQw));
        QueryWrapper<Collect> collectQw = new QueryWrapper<>();
        collectQw.eq("lecture_id",vo.getId());
        collectQw.eq("user_id",currUser.getId());
        vo.setCollect(iCollectService.count(collectQw));
    }
    return new ResultUtil<IPage<Lecture>>().setData(data);
}

4.4 讲座收藏

@RequestMapping(value = "/addOne", method = RequestMethod.GET)
@ApiOperation(value = "新增单条收藏")
public Result<Object> addOne(@RequestParam String id){
    Lecture l = iLectureService.getById(id);
    if(l == null) {
        return ResultUtil.error("讲座不存在");
    }
    User currUser = securityUtil.getCurrUser();
    QueryWrapper<Collect> collectQw = new QueryWrapper<>();
    collectQw.eq("lecture_id",id);
    collectQw.eq("user_id",currUser.getId());
    if(iCollectService.count(collectQw) > 0L) {
        iCollectService.remove(collectQw);
        return ResultUtil.success();
    }
    Collect collect = new Collect();
    collect.setLectureId(id);
    collect.setLectureName(l.getName());
    collect.setUserId(currUser.getId());
    collect.setUserName(currUser.getNickname());
    collect.setTime(DateUtil.now());
    iCollectService.saveOrUpdate(collect);
    return ResultUtil.success();
}

4.5 小程序登录

<swiper class="swiper-box" current="{{currentTab}}" duration="300" style="height:420px" bindchange="GetCurrentTab" data-current='6' >  
<swiper-item wx:for="{{tabCont}}" wx:key="item.index">  
  <view wx:if="{{item.index==0}}">
          <!-- 账号 -->
          <view class="section">
            <input placeholder="手机号" bindblur="logincode" />
          </view>
          <!-- 密码 -->
          <view class="section">
            <input placeholder="登入密码" bindblur="loginpassword" password="true"  />
          </view>
          <view class="section"></view>
          <!-- 提交按钮 -->
          <view wx:if='{{islogin==""}}' class='btn_box' >
            <button type="primary" bindtap="loginTo"  >登录</button>
          </view>
          <!-- 退出按钮 -->
          <view wx:else class='btn_box'>
            <button type="primary" bindtap="returnmain" >退出</button>
          </view>
  </view>
</swiper-item> 

五、免责说明

  • 本项目仅供个人学习使用,商用授权请联系博主,否则后果自负。
  • 博主拥有本软件构建后的应用系统全部内容所有权及独立的知识产权,拥有最终解释权。
  • 如有问题,欢迎在仓库 Issue 留言,看到后会第一时间回复,相关意见会酌情考虑,但没有一定被采纳的承诺或保证。

下载本系统代码或使用本系统的用户,必须同意以下内容,否则请勿下载!

  1. 出于自愿而使用/开发本软件,了解使用本软件的风险,且同意自己承担使用本软件的风险。
  2. 利用本软件构建的网站的任何信息内容以及导致的任何版权纠纷和法律争议及后果和博主无关,博主对此不承担任何责任。
  3. 在任何情况下,对于因使用或无法使用本软件而导致的任何难以合理预估的损失(包括但不仅限于商业利润损失、业务中断与业务信息丢失),博主概不承担任何责任。
  4. 必须了解使用本软件的风险,博主不承诺提供一对一的技术支持、使用担保,也不承担任何因本软件而产生的难以预料的问题的相关责任。
相关实践学习
如何在云端创建MySQL数据库
开始实验后,系统会自动创建一台自建MySQL的 源数据库 ECS 实例和一台 目标数据库 RDS。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助 &nbsp; &nbsp; 相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
相关文章
|
2天前
|
NoSQL Java Redis
软件开发常见流程之宝塔初始化安装环境配置,Lam前面不选,直接跳商城,在宝塔内点击软件商城,安Mysql5.7,安java项目管理器,安Ngnix最新版,安Redis
软件开发常见流程之宝塔初始化安装环境配置,Lam前面不选,直接跳商城,在宝塔内点击软件商城,安Mysql5.7,安java项目管理器,安Ngnix最新版,安Redis
|
2天前
|
SQL 关系型数据库 MySQL
java面试之MySQL数据库篇
java面试之MySQL数据库篇
6 0
java面试之MySQL数据库篇
|
2天前
|
移动开发 JavaScript 搜索推荐
2024年最新1000个Java毕业设计选题参考
2024年最新1000个Java毕业设计选题参考
10 0
|
9天前
|
移动开发 小程序 关系型数据库
java+ IDEA+ Uniapp+ mysql医院3D智能导诊系统源码
这是一个基于Java、IDEA、Uniapp和MySQL的医院3D智能导诊系统,采用Springboot后端框架和Redis、Mybatis Plus、RocketMQ等技术。系统通过对话式交互,精准推荐就诊科室,解决患者挂号困扰。它还具备智能预问诊功能,提升诊疗效率和准确性,确保医生能快速了解患者详情。此系统还支持小程序和H5,方便患者使用。
17 0
|
4天前
|
XML Java 关系型数据库
Action:Consider the following: If you want an embedde ,springBoot配置数据库,补全springBoot的xml和mysql配置信息就好了
Action:Consider the following: If you want an embedde ,springBoot配置数据库,补全springBoot的xml和mysql配置信息就好了
|
4天前
|
关系型数据库 MySQL 数据库
关系型数据库mysql数据增量恢复
【7月更文挑战第3天】
13 2
|
4天前
|
关系型数据库 MySQL Shell
关系型数据库mysql数据完全恢复
【7月更文挑战第3天】
12 2
|
4天前
|
存储 关系型数据库 MySQL
|
6天前
|
存储 关系型数据库 MySQL
|
5天前
|
存储 关系型数据库 MySQL