From 5e5df87aaf94cd0881c39af27360eeb02533f81d Mon Sep 17 00:00:00 2001 From: wanghb <17803890193@163.com> Date: Fri, 11 Aug 2023 13:33:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E4=B8=AD=E5=BF=83=EF=BC=8C?= =?UTF-8?q?=E4=B8=8B=E8=BD=BD=E4=B8=AD=E5=BF=83=EF=BC=8C=E5=B0=B1=E4=B8=9A?= =?UTF-8?q?=E4=B8=AD=E5=BF=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DownloadController.java | 2 - .../invite/controller/InviteController.java | 61 ++++++++ .../zhiyun/zhiyun03/invite/entity/Invite.java | 8 +- .../zhiyun03/invite/mapper/InviteMapper.java | 8 + .../invite/service/InviteService.java | 11 ++ .../invite/service/impl/InviteServieImpl.java | 142 ++++++++++++++++++ .../zhiyun/zhiyun03/invite/vo/InviteVo.java | 32 ++++ .../serve/controller/ServeController.java | 102 ++++++++++++- .../zhiyun/zhiyun03/serve/entity/Serve.java | 6 +- .../zhiyun03/serve/mapper/ServeMapper.java | 8 + .../zhiyun03/serve/service/ServeService.java | 11 ++ .../serve/service/impl/ServeServiceImpl.java | 132 ++++++++++++++++ .../com/zhiyun/zhiyun03/serve/vo/ServeVo.java | 36 +++++ src/main/resources/mapper/InviteMapper.xml | 41 +++++ src/main/resources/mapper/ServeMapper.xml | 44 ++++++ 15 files changed, 634 insertions(+), 10 deletions(-) create mode 100644 src/main/java/com/zhiyun/zhiyun03/invite/vo/InviteVo.java create mode 100644 src/main/java/com/zhiyun/zhiyun03/serve/vo/ServeVo.java create mode 100644 src/main/resources/mapper/InviteMapper.xml create mode 100644 src/main/resources/mapper/ServeMapper.xml diff --git a/src/main/java/com/zhiyun/zhiyun03/download/controller/DownloadController.java b/src/main/java/com/zhiyun/zhiyun03/download/controller/DownloadController.java index 74529e7..4306fcc 100644 --- a/src/main/java/com/zhiyun/zhiyun03/download/controller/DownloadController.java +++ b/src/main/java/com/zhiyun/zhiyun03/download/controller/DownloadController.java @@ -72,8 +72,6 @@ public class DownloadController { } - - @ApiOperation("删除下载") @PostMapping("/delDownload") public JsonResult delDownload(Integer id){ diff --git a/src/main/java/com/zhiyun/zhiyun03/invite/controller/InviteController.java b/src/main/java/com/zhiyun/zhiyun03/invite/controller/InviteController.java index 177baa0..b5c8ba8 100644 --- a/src/main/java/com/zhiyun/zhiyun03/invite/controller/InviteController.java +++ b/src/main/java/com/zhiyun/zhiyun03/invite/controller/InviteController.java @@ -1,4 +1,65 @@ package com.zhiyun.zhiyun03.invite.controller; +import com.zhiyun.zhiyun03.course.service.CourseService; +import com.zhiyun.zhiyun03.course.vo.CourseVo; +import com.zhiyun.zhiyun03.course.vo.PageVO; +import com.zhiyun.zhiyun03.invite.service.InviteService; +import com.zhiyun.zhiyun03.invite.vo.InviteVo; +import com.zhiyun.zhiyun03.utils.common.JsonResult; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; + +@Api("就业") +@RestController +@RequestMapping("/api/invite") public class InviteController { + @Resource + private InviteService inviteService; + + @ApiOperation("查询就业") + @GetMapping("/queryInvite") + public JsonResult> queryCourse(@ApiParam @RequestParam(value = "page",required = false,defaultValue = "1")Integer page, + @ApiParam @RequestParam(value = "limit",required = false,defaultValue = "1")Integer limit ){ + + PageVO lists = inviteService.queryInvite(page,limit); + + return JsonResult.success(lists); + } + + @ApiOperation("根据ID查询就业") + @GetMapping("/queryInviteById") + public JsonResult queryCourseById(Integer id){ + + InviteVo inviteVo =inviteService.queryInviteById(id); + + return JsonResult.success(inviteVo); + } + + @ApiOperation("就业添加") + @PostMapping("/addInvite") + public JsonResult addInvite(InviteVo vo){ + int count = inviteService.addInvite(vo); + + return JsonResult.success(); + } + + @ApiOperation("删除课程") + @DeleteMapping("delInviteById") + public JsonResult delInviteById(Integer id){ + inviteService.delInviteById(id); + return JsonResult.success(); + } + + @ApiOperation("更新课程") + @PostMapping("updateById") + public JsonResult updateById(InviteVo vo){ + int count = inviteService.updateById(vo); + return JsonResult.success(); + } + + } diff --git a/src/main/java/com/zhiyun/zhiyun03/invite/entity/Invite.java b/src/main/java/com/zhiyun/zhiyun03/invite/entity/Invite.java index a8b0ef6..0c63aaf 100644 --- a/src/main/java/com/zhiyun/zhiyun03/invite/entity/Invite.java +++ b/src/main/java/com/zhiyun/zhiyun03/invite/entity/Invite.java @@ -21,7 +21,7 @@ public class Invite { * id */ @TableId(value = "id",type = IdType.AUTO) - private int id; + private Integer id; /** * 招聘名称 @@ -32,8 +32,8 @@ public class Invite { /** * 招聘简介 */ - @TableField(value = "invite_biref") - private String inviteBiref; + @TableField(value = "invite_brief") + private String inviteBrief; /** * 招聘链接 @@ -45,7 +45,7 @@ public class Invite { * 目录id */ @TableField(value = "dir_id") - private int dirId; + private Integer dirId; /** * 招聘图片 diff --git a/src/main/java/com/zhiyun/zhiyun03/invite/mapper/InviteMapper.java b/src/main/java/com/zhiyun/zhiyun03/invite/mapper/InviteMapper.java index 7fa16c8..cb15c72 100644 --- a/src/main/java/com/zhiyun/zhiyun03/invite/mapper/InviteMapper.java +++ b/src/main/java/com/zhiyun/zhiyun03/invite/mapper/InviteMapper.java @@ -2,8 +2,16 @@ package com.zhiyun.zhiyun03.invite.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.zhiyun.zhiyun03.invite.entity.Invite; +import com.zhiyun.zhiyun03.invite.vo.InviteVo; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + @Mapper public interface InviteMapper extends BaseMapper { + List queryInvite(); + + int selectByName(String inviteName); + + int updateDownloadById(Invite invite); } diff --git a/src/main/java/com/zhiyun/zhiyun03/invite/service/InviteService.java b/src/main/java/com/zhiyun/zhiyun03/invite/service/InviteService.java index 8f0bcef..6734f3d 100644 --- a/src/main/java/com/zhiyun/zhiyun03/invite/service/InviteService.java +++ b/src/main/java/com/zhiyun/zhiyun03/invite/service/InviteService.java @@ -1,7 +1,18 @@ package com.zhiyun.zhiyun03.invite.service; import com.baomidou.mybatisplus.extension.service.IService; +import com.zhiyun.zhiyun03.course.vo.PageVO; import com.zhiyun.zhiyun03.invite.entity.Invite; +import com.zhiyun.zhiyun03.invite.vo.InviteVo; public interface InviteService extends IService { + PageVO queryInvite(Integer page, Integer limit); + + InviteVo queryInviteById(Integer id); + + int addInvite(InviteVo vo); + + int delInviteById(Integer id); + + int updateById(InviteVo vo); } diff --git a/src/main/java/com/zhiyun/zhiyun03/invite/service/impl/InviteServieImpl.java b/src/main/java/com/zhiyun/zhiyun03/invite/service/impl/InviteServieImpl.java index ff837ab..05446f2 100644 --- a/src/main/java/com/zhiyun/zhiyun03/invite/service/impl/InviteServieImpl.java +++ b/src/main/java/com/zhiyun/zhiyun03/invite/service/impl/InviteServieImpl.java @@ -1,12 +1,154 @@ package com.zhiyun.zhiyun03.invite.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.zhiyun.zhiyun03.application.entity.Directory; +import com.zhiyun.zhiyun03.application.mapper.DirectoryMapper; +import com.zhiyun.zhiyun03.course.vo.PageVO; +import com.zhiyun.zhiyun03.download.entity.Download; +import com.zhiyun.zhiyun03.download.vo.DownloadVo; import com.zhiyun.zhiyun03.invite.entity.Invite; import com.zhiyun.zhiyun03.invite.mapper.InviteMapper; import com.zhiyun.zhiyun03.invite.service.InviteService; +import com.zhiyun.zhiyun03.invite.vo.InviteVo; import com.zhiyun.zhiyun03.serve.mapper.ServeMapper; +import com.zhiyun.zhiyun03.utils.exception.ServiceException; +import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.Date; +import java.util.List; + @Service public class InviteServieImpl extends ServiceImpl implements InviteService { + + @Resource + private InviteMapper inviteMapper; + + @Resource + private DirectoryMapper directoryMapper; + + /* + * 分页查询就业 + * */ + @Override + public PageVO queryInvite(Integer page, Integer limit) { + + //开启分页 + PageHelper.startPage(page,limit); + //查询所有下载数据 + List downloadVoList = inviteMapper.queryInvite(); + + PageInfo downloadVoPageInfo = new PageInfo<>(downloadVoList); + PageVO inviteVoPageVO = new PageVO<>(); + //获取当前页 + inviteVoPageVO.setCurrentPage(downloadVoPageInfo.getPageNum()); + //总条数 + inviteVoPageVO.setTotal(downloadVoPageInfo.getTotal()); + //分页数据 + inviteVoPageVO.setList(downloadVoPageInfo.getList()); + + return inviteVoPageVO; + + } + /* + * 根据id查询就业 + * */ + @Override + public InviteVo queryInviteById(Integer id) { + //根据id查询数据 + Invite invite = inviteMapper.selectById(id); + //查询目录id + Directory directory = directoryMapper.selectById(invite.getDirId()); + InviteVo inviteVo = new InviteVo(); + //复制给vo + BeanUtils.copyProperties(invite,inviteVo); + inviteVo.setDirName(directory.getDirName()); + return inviteVo; + } + + /* + * 添加就业 + * */ + @Override + public int addInvite(InviteVo vo) { + //查询就业名称是否已经存在 + int count = inviteMapper.selectByName(vo.getInviteName()); + if (count>0) + { + throw new ServiceException("403","就业名已存在"); + } + //将vo值传给download + Invite invite = new Invite(); + BeanUtils.copyProperties(vo,invite); + //查询归属目录id + Integer dirId = directoryMapper.selectByName(vo.getDirName()); + invite.setDirId(dirId); + invite.setInviteUpdatetime(new Date()); + //添加download + int insert = inviteMapper.insert(invite); + if (insert>0) + { + return insert; + }else + { + throw new ServiceException("400","添加下载失败"); + } + } + + + /* + * 根据id删除数据 + * */ + @Override + public int delInviteById(Integer id) { + if (id == null) + { + throw new ServiceException("400","查询id值为空"); + } + //根据id删除 + int count = inviteMapper.deleteById(id); + + if (count>0) + { + return count; + }else + { + throw new ServiceException("400","删除失败"); + } + } + + /* + * 更新就业 + * */ + @Override + public int updateById(InviteVo vo) { + //查询更新的下载名是否存在 + int sum = inviteMapper.selectByName(vo.getInviteName()); + if (sum>0) + { + throw new ServiceException("403","下载已存在"); + } + + //将vo值传给download + Invite invite = new Invite(); + BeanUtils.copyProperties(vo,invite); + //查询归属目录id + Integer dirId = directoryMapper.selectByName(vo.getDirName()); + invite.setDirId(dirId); + invite.setInviteUpdatetime(new Date()); + //添加download + int updated = inviteMapper.updateDownloadById(invite); + if (updated>0) + { + return updated; + }else + { + throw new ServiceException("400","更新失败"); + } + } + + } diff --git a/src/main/java/com/zhiyun/zhiyun03/invite/vo/InviteVo.java b/src/main/java/com/zhiyun/zhiyun03/invite/vo/InviteVo.java new file mode 100644 index 0000000..49d1371 --- /dev/null +++ b/src/main/java/com/zhiyun/zhiyun03/invite/vo/InviteVo.java @@ -0,0 +1,32 @@ +package com.zhiyun.zhiyun03.invite.vo; + +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; + +@Data +public class InviteVo { + + @TableId + private Integer id; + /** + * 招聘名称 + */ + private String inviteName; + /** + * 招聘简介 + */ + private String inviteBrief; + /** + * 招聘链接 + */ + private String inviteUrl; + /** + * 归属目录 + */ + private String dirName; + /** + * 招聘图片 + */ + private String inviteImg; + +} diff --git a/src/main/java/com/zhiyun/zhiyun03/serve/controller/ServeController.java b/src/main/java/com/zhiyun/zhiyun03/serve/controller/ServeController.java index defcd5b..8bbf925 100644 --- a/src/main/java/com/zhiyun/zhiyun03/serve/controller/ServeController.java +++ b/src/main/java/com/zhiyun/zhiyun03/serve/controller/ServeController.java @@ -1,4 +1,104 @@ package com.zhiyun.zhiyun03.serve.controller; +import com.zhiyun.zhiyun03.course.vo.PageVO; +import com.zhiyun.zhiyun03.download.service.DownloadService; +import com.zhiyun.zhiyun03.download.vo.DownloadVo; +import com.zhiyun.zhiyun03.serve.service.ServeService; +import com.zhiyun.zhiyun03.serve.vo.ServeVo; +import com.zhiyun.zhiyun03.utils.common.JsonResult; +import com.zhiyun.zhiyun03.utils.oss.AliyunOssUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import java.io.File; +import java.io.FileOutputStream; + +@Api("服务相关") +@RestController +@RequestMapping("/api/serve") public class ServeController { -} + + @Resource + private AliyunOssUtil ossUtil; + + + @Resource + private ServeService serveService; + + + @ApiOperation("查询服务中心") + @GetMapping("/queryServe") + public JsonResult> queryServe(@ApiParam @RequestParam(value = "page", required = false, defaultValue = "1") Integer page, + @ApiParam @RequestParam(value = "limit", required = false, defaultValue = "5") Integer limit) { + + PageVO lists = serveService.queryServe(page, limit); + + return JsonResult.success(lists); + } + + + @ApiOperation("添加服务") + @PostMapping("/addServe") + public JsonResult addServe(ServeVo vo){ + int count = serveService.addServe(vo); + return JsonResult.success(); + + } + + @ApiOperation("图片上传") + @PostMapping("/uploadFile") + public JsonResult upload(@RequestParam("file") @RequestPart MultipartFile file){ + String upload = null; + try { + if (file != null) { + String fileName = file.getOriginalFilename(); + if (!"".equals(fileName.trim())) { + File newFile = new File(fileName); + + FileOutputStream os = new FileOutputStream(newFile); + os.write(file.getBytes()); + os.close(); + + //把file里的内容复制到newFile中 + file.transferTo(newFile); + upload = ossUtil.upload(newFile); + + } + } + } catch (Exception e) { + e.printStackTrace(); + } + String path = "https://zhiyun03.oss-cn-beijing.aliyuncs.com/"+ upload; + return JsonResult.success(path); + } + + + @ApiOperation("删除服务") + @PostMapping("/delServe") + public JsonResult delServe(Integer id){ + int count = serveService.delServe(id); + return JsonResult.success(); + + } + + @ApiOperation("根据Id查询") + @PostMapping("/queryServe") + public JsonResult queryServe(Integer id){ + ServeVo serveVo =serveService.queryById(id); + return JsonResult.success(serveVo); + + } + + @ApiOperation("更新服务") + @PostMapping("/updateServe") + public JsonResult updateServe(ServeVo vo){ + int count =serveService.updateServe(vo); + return JsonResult.success(); + } + + +} \ No newline at end of file diff --git a/src/main/java/com/zhiyun/zhiyun03/serve/entity/Serve.java b/src/main/java/com/zhiyun/zhiyun03/serve/entity/Serve.java index 05657d4..f9e64b6 100644 --- a/src/main/java/com/zhiyun/zhiyun03/serve/entity/Serve.java +++ b/src/main/java/com/zhiyun/zhiyun03/serve/entity/Serve.java @@ -21,7 +21,7 @@ public class Serve { * id */ @TableId(value = "id",type = IdType.AUTO) - private int id; + private Integer id; /** * 服务名称 @@ -32,8 +32,8 @@ public class Serve { /** * 服务简介 */ - @TableField(value = "serve_biref") - private String serveBiref; + @TableField(value = "serve_brief") + private String serveBrief; /** * 服务链接 diff --git a/src/main/java/com/zhiyun/zhiyun03/serve/mapper/ServeMapper.java b/src/main/java/com/zhiyun/zhiyun03/serve/mapper/ServeMapper.java index 0bac56d..bdfc7cb 100644 --- a/src/main/java/com/zhiyun/zhiyun03/serve/mapper/ServeMapper.java +++ b/src/main/java/com/zhiyun/zhiyun03/serve/mapper/ServeMapper.java @@ -2,8 +2,16 @@ package com.zhiyun.zhiyun03.serve.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.zhiyun.zhiyun03.serve.entity.Serve; +import com.zhiyun.zhiyun03.serve.vo.ServeVo; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + @Mapper public interface ServeMapper extends BaseMapper { + List queryService(); + + int selectByName(String serveName); + + int updateDownloadById(Serve serve); } diff --git a/src/main/java/com/zhiyun/zhiyun03/serve/service/ServeService.java b/src/main/java/com/zhiyun/zhiyun03/serve/service/ServeService.java index 0e5d707..3216d24 100644 --- a/src/main/java/com/zhiyun/zhiyun03/serve/service/ServeService.java +++ b/src/main/java/com/zhiyun/zhiyun03/serve/service/ServeService.java @@ -1,7 +1,18 @@ package com.zhiyun.zhiyun03.serve.service; import com.baomidou.mybatisplus.extension.service.IService; +import com.zhiyun.zhiyun03.course.vo.PageVO; import com.zhiyun.zhiyun03.serve.entity.Serve; +import com.zhiyun.zhiyun03.serve.vo.ServeVo; public interface ServeService extends IService { + PageVO queryServe(Integer page, Integer limit); + + int addServe(ServeVo vo); + + int delServe(Integer id); + + ServeVo queryById(Integer id); + + int updateServe(ServeVo vo); } diff --git a/src/main/java/com/zhiyun/zhiyun03/serve/service/impl/ServeServiceImpl.java b/src/main/java/com/zhiyun/zhiyun03/serve/service/impl/ServeServiceImpl.java index 0883677..abf8668 100644 --- a/src/main/java/com/zhiyun/zhiyun03/serve/service/impl/ServeServiceImpl.java +++ b/src/main/java/com/zhiyun/zhiyun03/serve/service/impl/ServeServiceImpl.java @@ -1,11 +1,143 @@ package com.zhiyun.zhiyun03.serve.service.impl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.zhiyun.zhiyun03.application.entity.Directory; +import com.zhiyun.zhiyun03.application.mapper.DirectoryMapper; +import com.zhiyun.zhiyun03.course.vo.PageVO; +import com.zhiyun.zhiyun03.invite.entity.Invite; +import com.zhiyun.zhiyun03.invite.vo.InviteVo; import com.zhiyun.zhiyun03.serve.entity.Serve; import com.zhiyun.zhiyun03.serve.mapper.ServeMapper; import com.zhiyun.zhiyun03.serve.service.ServeService; +import com.zhiyun.zhiyun03.serve.vo.ServeVo; +import com.zhiyun.zhiyun03.utils.exception.ServiceException; +import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.Date; +import java.util.List; + @Service public class ServeServiceImpl extends ServiceImpl implements ServeService { + + + @Resource + private ServeMapper serveMapper; + + @Resource + private DirectoryMapper directoryMapper; + + + + /* + * 分页查询服务中心 + * */ + @Override + public PageVO queryServe(Integer page, Integer limit) { + //开启分页 + PageHelper.startPage(page,limit); + //查询所有下载数据 + List serveVoList = serveMapper.queryService(); + + PageInfo serveVoPageInfo = new PageInfo<>(serveVoList); + PageVO serveVoPageVO = new PageVO<>(); + //获取当前页 + serveVoPageVO.setCurrentPage(serveVoPageInfo.getPageNum()); + //总条数 + serveVoPageVO.setTotal(serveVoPageInfo.getTotal()); + //分页数据 + serveVoPageVO.setList(serveVoPageInfo.getList()); + + return serveVoPageVO; + } + + + /* + * 添加数据 + * */ + @Override + public int addServe(ServeVo vo) { + //查询就业名称是否已经存在 + int count = serveMapper.selectByName(vo.getServeName()); + if (count>0) + { + throw new ServiceException("403","就业名已存在"); + } + //将vo值传给download + Serve serve = new Serve(); + BeanUtils.copyProperties(vo,serve); + //查询归属目录id + Integer dirId = directoryMapper.selectByName(vo.getDirName()); + serve.setDirId(dirId); + serve.setServeUpdatetime(new Date()); + //添加download + int insert = serveMapper.insert(serve); + if (insert>0) + { + return insert; + }else + { + throw new ServiceException("400","添加下载失败"); + } + } + + @Override + public int delServe(Integer id) { + if (id == null) + { + throw new ServiceException("400","查询id值为空"); + } + //根据id删除 + int count = serveMapper.deleteById(id); + + if (count>0) + { + return count; + }else + { + throw new ServiceException("400","删除失败"); + } + } + + @Override + public ServeVo queryById(Integer id) { + //根据id查询数据 + Serve serve = serveMapper.selectById(id); + //查询目录id + Directory directory = directoryMapper.selectById(serve.getDirId()); + ServeVo serveVo = new ServeVo(); + //复制给vo + BeanUtils.copyProperties(serve,serveVo); + serveVo.setDirName(directory.getDirName()); + return serveVo; + } + + @Override + public int updateServe(ServeVo vo) { + //查询更新的下载名是否存在 + int sum = serveMapper.selectByName(vo.getServeName()); + if (sum>0) + { + throw new ServiceException("403","下载已存在"); + } + //将vo值传给download + Serve serve = new Serve(); + BeanUtils.copyProperties(vo,serve); + //查询归属目录id + Integer dirId = directoryMapper.selectByName(vo.getDirName()); + serve.setDirId(dirId); + serve.setServeUpdatetime(new Date()); + //添加download + int updated = serveMapper.updateDownloadById(serve); + if (updated>0) + { + return updated; + }else + { + throw new ServiceException("400","更新失败"); + } + } } diff --git a/src/main/java/com/zhiyun/zhiyun03/serve/vo/ServeVo.java b/src/main/java/com/zhiyun/zhiyun03/serve/vo/ServeVo.java new file mode 100644 index 0000000..84520df --- /dev/null +++ b/src/main/java/com/zhiyun/zhiyun03/serve/vo/ServeVo.java @@ -0,0 +1,36 @@ +package com.zhiyun.zhiyun03.serve.vo; + +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; + +@Data +public class ServeVo { + /** + * id + */ + @TableId + private Integer id; + + /** + * 服务名称 + */ + private String serveName; + /** + * 服务简介 + */ + private String serveBrief; + /** + * 服务链接 + */ + private String serveUrl; + /** + * 目录id + */ + private String dirName; + /** + * 服务图片 + */ + private String serveImg; + + +} diff --git a/src/main/resources/mapper/InviteMapper.xml b/src/main/resources/mapper/InviteMapper.xml new file mode 100644 index 0000000..b3cd08a --- /dev/null +++ b/src/main/resources/mapper/InviteMapper.xml @@ -0,0 +1,41 @@ + + + + + update invite + + + invite_name=#{inviteName}, + + + invite_brief=#{inviteBrief}, + + + invite_url=#{inviteUrl}, + + + dir_id=#{dirId}, + + + invite_img=#{inviteImg} + + + + + id = #{id} + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/ServeMapper.xml b/src/main/resources/mapper/ServeMapper.xml new file mode 100644 index 0000000..40f286b --- /dev/null +++ b/src/main/resources/mapper/ServeMapper.xml @@ -0,0 +1,44 @@ + + + + + + update serve + + + serve_name=#{serveName}, + + + serve_brief=#{serveBrief}, + + + serve_url=#{serveUrl}, + + + dir_id=#{dirId}, + + + serve_img=#{serveImg} + + + + + id = #{id} + + + + + + + + + +