From fc4a207d2a953ff7a41614fcf898a4f92dc79393 Mon Sep 17 00:00:00 2001 From: linhw <5331581+linhw11@user.noreply.gitee.com> Date: Tue, 23 Jul 2024 13:53:20 +0800 Subject: [PATCH] ~ --- .../app/controller/AppEventsController.java | 108 ++++++++++++ .../controller/AppEventsUserController.java | 108 ++++++++++++ .../java/com/ruoyi/app/domain/AppEvents.java | 158 ++++++++++++++++++ .../com/ruoyi/app/domain/AppEventsUser.java | 112 +++++++++++++ .../com/ruoyi/app/mapper/AppEventsMapper.java | 61 +++++++ .../ruoyi/app/mapper/AppEventsUserMapper.java | 61 +++++++ .../ruoyi/app/service/IAppEventsService.java | 61 +++++++ .../app/service/IAppEventsUserService.java | 61 +++++++ .../service/impl/AppEventsServiceImpl.java | 96 +++++++++++ .../impl/AppEventsUserServiceImpl.java | 96 +++++++++++ .../resources/mapper/app/AppEventsMapper.xml | 112 +++++++++++++ .../mapper/app/AppEventsUserMapper.xml | 97 +++++++++++ 12 files changed, 1131 insertions(+) create mode 100644 gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/controller/AppEventsController.java create mode 100644 gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/controller/AppEventsUserController.java create mode 100644 gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/AppEvents.java create mode 100644 gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/AppEventsUser.java create mode 100644 gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/mapper/AppEventsMapper.java create mode 100644 gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/mapper/AppEventsUserMapper.java create mode 100644 gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/IAppEventsService.java create mode 100644 gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/IAppEventsUserService.java create mode 100644 gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/impl/AppEventsServiceImpl.java create mode 100644 gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/impl/AppEventsUserServiceImpl.java create mode 100644 gan-modules/ruoyi-gan/src/main/resources/mapper/app/AppEventsMapper.xml create mode 100644 gan-modules/ruoyi-gan/src/main/resources/mapper/app/AppEventsUserMapper.xml diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/controller/AppEventsController.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/controller/AppEventsController.java new file mode 100644 index 0000000..295015f --- /dev/null +++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/controller/AppEventsController.java @@ -0,0 +1,108 @@ +package com.ruoyi.app.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; + +import com.ruoyi.common.core.domain.R; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.log.annotation.Log; +import com.ruoyi.common.log.enums.BusinessType; +import com.ruoyi.common.security.annotation.RequiresPermissions; +import com.ruoyi.app.domain.AppEvents; +import com.ruoyi.app.service.IAppEventsService; +import com.ruoyi.common.core.web.controller.BaseController; +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.common.core.utils.poi.ExcelUtil; +import com.ruoyi.common.core.web.page.TableDataInfo; + +/** + * 活动发布Controller + * + * @author wyh + * @date 2024-07-23 + */ +@RestController +@RequestMapping("/events") +@Api(tags = "活动发布" , description = "活动发布") +public class AppEventsController extends BaseController +{ + @Autowired + private IAppEventsService appEventsService; + + /** + * 查询活动发布列表 + */ + @GetMapping("/list") + @ApiOperation(value = "查询活动发布", notes = "查询活动发布", httpMethod = "GET") + public TableDataInfo list(AppEvents appEvents) + { + startPage(); + List list = appEventsService.selectAppEventsList(appEvents); + return getDataTable(list); + } + + /** + * 导出活动发布列表 + */ + @Log(title = "活动发布", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, AppEvents appEvents) + { + List list = appEventsService.selectAppEventsList(appEvents); + ExcelUtil util = new ExcelUtil(AppEvents.class); + util.exportExcel(response, list, "活动发布数据"); + } + + /** + * 获取活动发布详细信息 + */ + @GetMapping(value = "/{id}") + @ApiOperation(value = "获取活动发布详细信息", notes = "获取活动发布详细信息", httpMethod = "GET") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(appEventsService.selectAppEventsById(id)); + } + + /** + * 新增活动发布 + */ + @ApiOperation(value = "新增活动发布", notes = "新增活动发布", httpMethod = "POST") + @Log(title = "活动发布", businessType = BusinessType.INSERT) + @PostMapping("/add") + public AjaxResult add(@RequestBody AppEvents appEvents) + { + return toAjax(appEventsService.insertAppEvents(appEvents)); + } + + /** + * 修改活动发布 + */ + @ApiOperation(value = "修改活动发布", notes = "修改活动发布", httpMethod = "PUT") + @Log(title = "活动发布", businessType = BusinessType.UPDATE) + @PutMapping("/edit") + public AjaxResult edit(@RequestBody AppEvents appEvents) + { + return toAjax(appEventsService.updateAppEvents(appEvents)); + } + + /** + * 删除活动发布 + */ + @Log(title = "活动发布", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(appEventsService.deleteAppEventsByIds(ids)); + } +} diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/controller/AppEventsUserController.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/controller/AppEventsUserController.java new file mode 100644 index 0000000..0edf805 --- /dev/null +++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/controller/AppEventsUserController.java @@ -0,0 +1,108 @@ +package com.ruoyi.app.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; + +import com.ruoyi.common.core.domain.R; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.log.annotation.Log; +import com.ruoyi.common.log.enums.BusinessType; +import com.ruoyi.common.security.annotation.RequiresPermissions; +import com.ruoyi.app.domain.AppEventsUser; +import com.ruoyi.app.service.IAppEventsUserService; +import com.ruoyi.common.core.web.controller.BaseController; +import com.ruoyi.common.core.web.domain.AjaxResult; +import com.ruoyi.common.core.utils.poi.ExcelUtil; +import com.ruoyi.common.core.web.page.TableDataInfo; + +/** + * 活动发布Controller + * + * @author wyh + * @date 2024-07-23 + */ +@RestController +@RequestMapping("/user") +@Api(tags = "活动发布" , description = "活动发布") +public class AppEventsUserController extends BaseController +{ + @Autowired + private IAppEventsUserService appEventsUserService; + + /** + * 查询活动发布列表 + */ + @GetMapping("/list") + @ApiOperation(value = "查询活动发布", notes = "查询活动发布", httpMethod = "GET") + public TableDataInfo list(AppEventsUser appEventsUser) + { + startPage(); + List list = appEventsUserService.selectAppEventsUserList(appEventsUser); + return getDataTable(list); + } + + /** + * 导出活动发布列表 + */ + @Log(title = "活动发布", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, AppEventsUser appEventsUser) + { + List list = appEventsUserService.selectAppEventsUserList(appEventsUser); + ExcelUtil util = new ExcelUtil(AppEventsUser.class); + util.exportExcel(response, list, "活动发布数据"); + } + + /** + * 获取活动发布详细信息 + */ + @GetMapping(value = "/{id}") + @ApiOperation(value = "获取活动发布详细信息", notes = "获取活动发布详细信息", httpMethod = "GET") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(appEventsUserService.selectAppEventsUserById(id)); + } + + /** + * 新增活动发布 + */ + @ApiOperation(value = "新增活动发布", notes = "新增活动发布", httpMethod = "POST") + @Log(title = "活动发布", businessType = BusinessType.INSERT) + @PostMapping("/add") + public AjaxResult add(@RequestBody AppEventsUser appEventsUser) + { + return toAjax(appEventsUserService.insertAppEventsUser(appEventsUser)); + } + + /** + * 修改活动发布 + */ + @ApiOperation(value = "修改活动发布", notes = "修改活动发布", httpMethod = "PUT") + @Log(title = "活动发布", businessType = BusinessType.UPDATE) + @PutMapping("/edit") + public AjaxResult edit(@RequestBody AppEventsUser appEventsUser) + { + return toAjax(appEventsUserService.updateAppEventsUser(appEventsUser)); + } + + /** + * 删除活动发布 + */ + @Log(title = "活动发布", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(appEventsUserService.deleteAppEventsUserByIds(ids)); + } +} diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/AppEvents.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/AppEvents.java new file mode 100644 index 0000000..b8e20a8 --- /dev/null +++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/AppEvents.java @@ -0,0 +1,158 @@ +package com.ruoyi.app.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.core.annotation.Excel; +import com.ruoyi.common.core.web.domain.BaseEntity; + +/** + * 活动发布对象 app_events + * + * @author wyh + * @date 2024-07-23 + */ +public class AppEvents extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 话题id */ + private Long id; + + /** 活动标题 */ + @Excel(name = "活动标题") + private String title; + + /** 活动内容 */ + @Excel(name = "活动内容") + private String content; + + /** 封面 */ + @Excel(name = "封面") + private String img; + + /** 负责人 */ + @Excel(name = "负责人") + private String name; + + /** 公司名称 */ + @Excel(name = "公司名称") + private String companyName; + + /** 开始时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date startTime; + + /** 结束时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date endTime; + + /** 状态:1-未开始,2-报名中,3-已结束 */ + @Excel(name = "状态:1-未开始,2-报名中,3-已结束") + private Long type; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setTitle(String title) + { + this.title = title; + } + + public String getTitle() + { + return title; + } + public void setContent(String content) + { + this.content = content; + } + + public String getContent() + { + return content; + } + public void setImg(String img) + { + this.img = img; + } + + public String getImg() + { + return img; + } + public void setName(String name) + { + this.name = name; + } + + public String getName() + { + return name; + } + public void setCompanyName(String companyName) + { + this.companyName = companyName; + } + + public String getCompanyName() + { + return companyName; + } + public void setStartTime(Date startTime) + { + this.startTime = startTime; + } + + public Date getStartTime() + { + return startTime; + } + public void setEndTime(Date endTime) + { + this.endTime = endTime; + } + + public Date getEndTime() + { + return endTime; + } + public void setType(Long type) + { + this.type = type; + } + + public Long getType() + { + return type; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("title", getTitle()) + .append("content", getContent()) + .append("img", getImg()) + .append("name", getName()) + .append("companyName", getCompanyName()) + .append("startTime", getStartTime()) + .append("endTime", getEndTime()) + .append("createTime", getCreateTime()) + .append("updateTime", getUpdateTime()) + .append("createBy", getCreateBy()) + .append("updateBy", getUpdateBy()) + .append("remark", getRemark()) + .append("type", getType()) + .toString(); + } +} diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/AppEventsUser.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/AppEventsUser.java new file mode 100644 index 0000000..9dd2c5c --- /dev/null +++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/domain/AppEventsUser.java @@ -0,0 +1,112 @@ +package com.ruoyi.app.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.core.annotation.Excel; +import com.ruoyi.common.core.web.domain.BaseEntity; + +/** + * 活动发布对象 app_events_user + * + * @author wyh + * @date 2024-07-23 + */ +public class AppEventsUser extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 话题id */ + private Long id; + + /** 活动id */ + @Excel(name = "活动id") + private Long eventsId; + + /** 负责人 */ + @Excel(name = "负责人") + private String name; + + /** 公司名称 */ + @Excel(name = "公司名称") + private String companyName; + + /** 手机号 */ + @Excel(name = "手机号") + private String phone; + + /** 微信号 */ + @Excel(name = "微信号") + private String wechatId; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setEventsId(Long eventsId) + { + this.eventsId = eventsId; + } + + public Long getEventsId() + { + return eventsId; + } + public void setName(String name) + { + this.name = name; + } + + public String getName() + { + return name; + } + public void setCompanyName(String companyName) + { + this.companyName = companyName; + } + + public String getCompanyName() + { + return companyName; + } + public void setPhone(String phone) + { + this.phone = phone; + } + + public String getPhone() + { + return phone; + } + public void setWechatId(String wechatId) + { + this.wechatId = wechatId; + } + + public String getWechatId() + { + return wechatId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("eventsId", getEventsId()) + .append("name", getName()) + .append("companyName", getCompanyName()) + .append("phone", getPhone()) + .append("wechatId", getWechatId()) + .append("createTime", getCreateTime()) + .append("updateTime", getUpdateTime()) + .append("createBy", getCreateBy()) + .append("updateBy", getUpdateBy()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/mapper/AppEventsMapper.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/mapper/AppEventsMapper.java new file mode 100644 index 0000000..34f2277 --- /dev/null +++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/mapper/AppEventsMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.app.mapper; + +import java.util.List; +import com.ruoyi.app.domain.AppEvents; + +/** + * 活动发布Mapper接口 + * + * @author wyh + * @date 2024-07-23 + */ +public interface AppEventsMapper +{ + /** + * 查询活动发布 + * + * @param id 活动发布主键 + * @return 活动发布 + */ + public AppEvents selectAppEventsById(Long id); + + /** + * 查询活动发布列表 + * + * @param appEvents 活动发布 + * @return 活动发布集合 + */ + public List selectAppEventsList(AppEvents appEvents); + + /** + * 新增活动发布 + * + * @param appEvents 活动发布 + * @return 结果 + */ + public int insertAppEvents(AppEvents appEvents); + + /** + * 修改活动发布 + * + * @param appEvents 活动发布 + * @return 结果 + */ + public int updateAppEvents(AppEvents appEvents); + + /** + * 删除活动发布 + * + * @param id 活动发布主键 + * @return 结果 + */ + public int deleteAppEventsById(Long id); + + /** + * 批量删除活动发布 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteAppEventsByIds(Long[] ids); +} diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/mapper/AppEventsUserMapper.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/mapper/AppEventsUserMapper.java new file mode 100644 index 0000000..f029f69 --- /dev/null +++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/mapper/AppEventsUserMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.app.mapper; + +import java.util.List; +import com.ruoyi.app.domain.AppEventsUser; + +/** + * 活动发布Mapper接口 + * + * @author wyh + * @date 2024-07-23 + */ +public interface AppEventsUserMapper +{ + /** + * 查询活动发布 + * + * @param id 活动发布主键 + * @return 活动发布 + */ + public AppEventsUser selectAppEventsUserById(Long id); + + /** + * 查询活动发布列表 + * + * @param appEventsUser 活动发布 + * @return 活动发布集合 + */ + public List selectAppEventsUserList(AppEventsUser appEventsUser); + + /** + * 新增活动发布 + * + * @param appEventsUser 活动发布 + * @return 结果 + */ + public int insertAppEventsUser(AppEventsUser appEventsUser); + + /** + * 修改活动发布 + * + * @param appEventsUser 活动发布 + * @return 结果 + */ + public int updateAppEventsUser(AppEventsUser appEventsUser); + + /** + * 删除活动发布 + * + * @param id 活动发布主键 + * @return 结果 + */ + public int deleteAppEventsUserById(Long id); + + /** + * 批量删除活动发布 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteAppEventsUserByIds(Long[] ids); +} diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/IAppEventsService.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/IAppEventsService.java new file mode 100644 index 0000000..c31a95c --- /dev/null +++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/IAppEventsService.java @@ -0,0 +1,61 @@ +package com.ruoyi.app.service; + +import java.util.List; +import com.ruoyi.app.domain.AppEvents; + +/** + * 活动发布Service接口 + * + * @author wyh + * @date 2024-07-23 + */ +public interface IAppEventsService +{ + /** + * 查询活动发布 + * + * @param id 活动发布主键 + * @return 活动发布 + */ + public AppEvents selectAppEventsById(Long id); + + /** + * 查询活动发布列表 + * + * @param appEvents 活动发布 + * @return 活动发布集合 + */ + public List selectAppEventsList(AppEvents appEvents); + + /** + * 新增活动发布 + * + * @param appEvents 活动发布 + * @return 结果 + */ + public int insertAppEvents(AppEvents appEvents); + + /** + * 修改活动发布 + * + * @param appEvents 活动发布 + * @return 结果 + */ + public int updateAppEvents(AppEvents appEvents); + + /** + * 批量删除活动发布 + * + * @param ids 需要删除的活动发布主键集合 + * @return 结果 + */ + public int deleteAppEventsByIds(Long[] ids); + + /** + * 删除活动发布信息 + * + * @param id 活动发布主键 + * @return 结果 + */ + public int deleteAppEventsById(Long id); +} diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/IAppEventsUserService.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/IAppEventsUserService.java new file mode 100644 index 0000000..f2309a8 --- /dev/null +++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/IAppEventsUserService.java @@ -0,0 +1,61 @@ +package com.ruoyi.app.service; + +import java.util.List; +import com.ruoyi.app.domain.AppEventsUser; + +/** + * 活动发布Service接口 + * + * @author wyh + * @date 2024-07-23 + */ +public interface IAppEventsUserService +{ + /** + * 查询活动发布 + * + * @param id 活动发布主键 + * @return 活动发布 + */ + public AppEventsUser selectAppEventsUserById(Long id); + + /** + * 查询活动发布列表 + * + * @param appEventsUser 活动发布 + * @return 活动发布集合 + */ + public List selectAppEventsUserList(AppEventsUser appEventsUser); + + /** + * 新增活动发布 + * + * @param appEventsUser 活动发布 + * @return 结果 + */ + public int insertAppEventsUser(AppEventsUser appEventsUser); + + /** + * 修改活动发布 + * + * @param appEventsUser 活动发布 + * @return 结果 + */ + public int updateAppEventsUser(AppEventsUser appEventsUser); + + /** + * 批量删除活动发布 + * + * @param ids 需要删除的活动发布主键集合 + * @return 结果 + */ + public int deleteAppEventsUserByIds(Long[] ids); + + /** + * 删除活动发布信息 + * + * @param id 活动发布主键 + * @return 结果 + */ + public int deleteAppEventsUserById(Long id); +} diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/impl/AppEventsServiceImpl.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/impl/AppEventsServiceImpl.java new file mode 100644 index 0000000..5d6b0d3 --- /dev/null +++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/impl/AppEventsServiceImpl.java @@ -0,0 +1,96 @@ +package com.ruoyi.app.service.impl; + +import java.util.List; +import com.ruoyi.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.app.mapper.AppEventsMapper; +import com.ruoyi.app.domain.AppEvents; +import com.ruoyi.app.service.IAppEventsService; + +/** + * 活动发布Service业务层处理 + * + * @author wyh + * @date 2024-07-23 + */ +@Service +public class AppEventsServiceImpl implements IAppEventsService +{ + @Autowired + private AppEventsMapper appEventsMapper; + + /** + * 查询活动发布 + * + * @param id 活动发布主键 + * @return 活动发布 + */ + @Override + public AppEvents selectAppEventsById(Long id) + { + return appEventsMapper.selectAppEventsById(id); + } + + /** + * 查询活动发布列表 + * + * @param appEvents 活动发布 + * @return 活动发布 + */ + @Override + public List selectAppEventsList(AppEvents appEvents) + { + return appEventsMapper.selectAppEventsList(appEvents); + } + + /** + * 新增活动发布 + * + * @param appEvents 活动发布 + * @return 结果 + */ + @Override + public int insertAppEvents(AppEvents appEvents) + { + appEvents.setCreateTime(DateUtils.getNowDate()); + return appEventsMapper.insertAppEvents(appEvents); + } + + /** + * 修改活动发布 + * + * @param appEvents 活动发布 + * @return 结果 + */ + @Override + public int updateAppEvents(AppEvents appEvents) + { + appEvents.setUpdateTime(DateUtils.getNowDate()); + return appEventsMapper.updateAppEvents(appEvents); + } + + /** + * 批量删除活动发布 + * + * @param ids 需要删除的活动发布主键 + * @return 结果 + */ + @Override + public int deleteAppEventsByIds(Long[] ids) + { + return appEventsMapper.deleteAppEventsByIds(ids); + } + + /** + * 删除活动发布信息 + * + * @param id 活动发布主键 + * @return 结果 + */ + @Override + public int deleteAppEventsById(Long id) + { + return appEventsMapper.deleteAppEventsById(id); + } +} diff --git a/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/impl/AppEventsUserServiceImpl.java b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/impl/AppEventsUserServiceImpl.java new file mode 100644 index 0000000..66a3b03 --- /dev/null +++ b/gan-modules/ruoyi-gan/src/main/java/com/ruoyi/app/service/impl/AppEventsUserServiceImpl.java @@ -0,0 +1,96 @@ +package com.ruoyi.app.service.impl; + +import java.util.List; +import com.ruoyi.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.app.mapper.AppEventsUserMapper; +import com.ruoyi.app.domain.AppEventsUser; +import com.ruoyi.app.service.IAppEventsUserService; + +/** + * 活动发布Service业务层处理 + * + * @author wyh + * @date 2024-07-23 + */ +@Service +public class AppEventsUserServiceImpl implements IAppEventsUserService +{ + @Autowired + private AppEventsUserMapper appEventsUserMapper; + + /** + * 查询活动发布 + * + * @param id 活动发布主键 + * @return 活动发布 + */ + @Override + public AppEventsUser selectAppEventsUserById(Long id) + { + return appEventsUserMapper.selectAppEventsUserById(id); + } + + /** + * 查询活动发布列表 + * + * @param appEventsUser 活动发布 + * @return 活动发布 + */ + @Override + public List selectAppEventsUserList(AppEventsUser appEventsUser) + { + return appEventsUserMapper.selectAppEventsUserList(appEventsUser); + } + + /** + * 新增活动发布 + * + * @param appEventsUser 活动发布 + * @return 结果 + */ + @Override + public int insertAppEventsUser(AppEventsUser appEventsUser) + { + appEventsUser.setCreateTime(DateUtils.getNowDate()); + return appEventsUserMapper.insertAppEventsUser(appEventsUser); + } + + /** + * 修改活动发布 + * + * @param appEventsUser 活动发布 + * @return 结果 + */ + @Override + public int updateAppEventsUser(AppEventsUser appEventsUser) + { + appEventsUser.setUpdateTime(DateUtils.getNowDate()); + return appEventsUserMapper.updateAppEventsUser(appEventsUser); + } + + /** + * 批量删除活动发布 + * + * @param ids 需要删除的活动发布主键 + * @return 结果 + */ + @Override + public int deleteAppEventsUserByIds(Long[] ids) + { + return appEventsUserMapper.deleteAppEventsUserByIds(ids); + } + + /** + * 删除活动发布信息 + * + * @param id 活动发布主键 + * @return 结果 + */ + @Override + public int deleteAppEventsUserById(Long id) + { + return appEventsUserMapper.deleteAppEventsUserById(id); + } +} diff --git a/gan-modules/ruoyi-gan/src/main/resources/mapper/app/AppEventsMapper.xml b/gan-modules/ruoyi-gan/src/main/resources/mapper/app/AppEventsMapper.xml new file mode 100644 index 0000000..7cbcdd3 --- /dev/null +++ b/gan-modules/ruoyi-gan/src/main/resources/mapper/app/AppEventsMapper.xml @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + select id, title, content, img, name, company_name, start_time, end_time, create_time, update_time, create_by, updateBy, remark, type from app_events + + + + + + + + insert into app_events + + title, + content, + img, + name, + company_name, + start_time, + end_time, + create_time, + update_time, + create_by, + updateBy, + remark, + type, + + + #{title}, + #{content}, + #{img}, + #{name}, + #{companyName}, + #{startTime}, + #{endTime}, + #{createTime}, + #{updateTime}, + #{createBy}, + #{updateBy}, + #{remark}, + #{type}, + + + + + update app_events + + title = #{title}, + content = #{content}, + img = #{img}, + name = #{name}, + company_name = #{companyName}, + start_time = #{startTime}, + end_time = #{endTime}, + create_time = #{createTime}, + update_time = #{updateTime}, + create_by = #{createBy}, + updateBy = #{updateBy}, + remark = #{remark}, + type = #{type}, + + where id = #{id} + + + + delete from app_events where id = #{id} + + + + delete from app_events where id in + + #{id} + + + \ No newline at end of file diff --git a/gan-modules/ruoyi-gan/src/main/resources/mapper/app/AppEventsUserMapper.xml b/gan-modules/ruoyi-gan/src/main/resources/mapper/app/AppEventsUserMapper.xml new file mode 100644 index 0000000..f5e913b --- /dev/null +++ b/gan-modules/ruoyi-gan/src/main/resources/mapper/app/AppEventsUserMapper.xml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + select id, events_id, name, company_name, phone, wechat_id, create_time, update_time, create_by, updateBy, remark from app_events_user + + + + + + + + insert into app_events_user + + events_id, + name, + company_name, + phone, + wechat_id, + create_time, + update_time, + create_by, + updateBy, + remark, + + + #{eventsId}, + #{name}, + #{companyName}, + #{phone}, + #{wechatId}, + #{createTime}, + #{updateTime}, + #{createBy}, + #{updateBy}, + #{remark}, + + + + + update app_events_user + + events_id = #{eventsId}, + name = #{name}, + company_name = #{companyName}, + phone = #{phone}, + wechat_id = #{wechatId}, + create_time = #{createTime}, + update_time = #{updateTime}, + create_by = #{createBy}, + updateBy = #{updateBy}, + remark = #{remark}, + + where id = #{id} + + + + delete from app_events_user where id = #{id} + + + + delete from app_events_user where id in + + #{id} + + + \ No newline at end of file