From 04f7bcd22e6aa12cce08571d5a4640d904d7c6f9 Mon Sep 17 00:00:00 2001 From: Aug <17674666882@163.com> Date: Mon, 19 May 2025 16:39:31 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E9=A6=96=E9=A1=B5=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/TeambuyBannerController.java | 171 ++++++++++++++++++ .../teambuyBanner/entity/TeambuyBanner.java | 67 +++++++ .../teambuyBanner/mapper/TeambuyBannerMapper.java | 17 ++ .../mapper/xml/TeambuyBannerMapper.xml | 5 + .../service/ITeambuyBannerService.java | 14 ++ .../service/impl/TeambuyBannerServiceImpl.java | 19 ++ .../teambuyBanner/vue/TeambuyBannerList.vue | 190 ++++++++++++++++++++ .../vue/modules/TeambuyBannerForm.vue | 119 +++++++++++++ .../modules/TeambuyBannerModal.Style#Drawer.vue | 84 +++++++++ .../vue/modules/TeambuyBannerModal.vue | 60 +++++++ .../teambuyBanner/vue3/TeambuyBanner.api.ts | 61 +++++++ .../teambuyBanner/vue3/TeambuyBanner.data.ts | 56 ++++++ .../teambuyBanner/vue3/TeambuyBannerList.vue | 162 +++++++++++++++++ .../vue3/components/TeambuyBannerModal.vue | 58 ++++++ .../controller/TeambuyInfoController.java | 171 ++++++++++++++++++ .../modules/teambuyInfo/entity/TeambuyInfo.java | 70 ++++++++ .../teambuyInfo/mapper/TeambuyInfoMapper.java | 17 ++ .../teambuyInfo/mapper/xml/TeambuyInfoMapper.xml | 5 + .../teambuyInfo/service/ITeambuyInfoService.java | 14 ++ .../service/impl/TeambuyInfoServiceImpl.java | 19 ++ .../modules/teambuyInfo/vue/TeambuyInfoList.vue | 196 +++++++++++++++++++++ .../teambuyInfo/vue/modules/TeambuyInfoForm.vue | 124 +++++++++++++ .../vue/modules/TeambuyInfoModal.Style#Drawer.vue | 84 +++++++++ .../teambuyInfo/vue/modules/TeambuyInfoModal.vue | 60 +++++++ .../modules/teambuyInfo/vue3/TeambuyInfo.api.ts | 61 +++++++ .../modules/teambuyInfo/vue3/TeambuyInfo.data.ts | 66 +++++++ .../modules/teambuyInfo/vue3/TeambuyInfoList.vue | 162 +++++++++++++++++ .../vue3/components/TeambuyInfoModal.vue | 58 ++++++ .../api/teambuyController/BannerController.java | 46 +++++ .../jeecg/modules/apiService/BannerService.java | 20 +++ .../modules/apiService/impl/BannerServiceImpl.java | 187 ++++++++++++++++++++ .../modules/apiService/impl/LeaderServiceImpl.java | 12 +- 32 files changed, 2449 insertions(+), 6 deletions(-) create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/controller/TeambuyBannerController.java create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/entity/TeambuyBanner.java create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/mapper/TeambuyBannerMapper.java create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/mapper/xml/TeambuyBannerMapper.xml create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/service/ITeambuyBannerService.java create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/service/impl/TeambuyBannerServiceImpl.java create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/vue/TeambuyBannerList.vue create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/vue/modules/TeambuyBannerForm.vue create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/vue/modules/TeambuyBannerModal.Style#Drawer.vue create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/vue/modules/TeambuyBannerModal.vue create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/vue3/TeambuyBanner.api.ts create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/vue3/TeambuyBanner.data.ts create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/vue3/TeambuyBannerList.vue create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/vue3/components/TeambuyBannerModal.vue create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/controller/TeambuyInfoController.java create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/entity/TeambuyInfo.java create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/mapper/TeambuyInfoMapper.java create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/mapper/xml/TeambuyInfoMapper.xml create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/service/ITeambuyInfoService.java create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/service/impl/TeambuyInfoServiceImpl.java create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/vue/TeambuyInfoList.vue create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/vue/modules/TeambuyInfoForm.vue create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/vue/modules/TeambuyInfoModal.Style#Drawer.vue create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/vue/modules/TeambuyInfoModal.vue create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/vue3/TeambuyInfo.api.ts create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/vue3/TeambuyInfo.data.ts create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/vue3/TeambuyInfoList.vue create mode 100644 jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/vue3/components/TeambuyInfoModal.vue create mode 100644 jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/teambuyController/BannerController.java create mode 100644 jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/BannerService.java create mode 100644 jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/impl/BannerServiceImpl.java diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/controller/TeambuyBannerController.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/controller/TeambuyBannerController.java new file mode 100644 index 0000000..73e76e4 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/controller/TeambuyBannerController.java @@ -0,0 +1,171 @@ +package org.jeecg.modules.teambuyBanner.controller; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.teambuyBanner.entity.TeambuyBanner; +import org.jeecg.modules.teambuyBanner.service.ITeambuyBannerService; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; + +import org.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; +import org.jeecg.common.system.base.controller.JeecgController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import org.springframework.web.servlet.ModelAndView; +import com.alibaba.fastjson.JSON; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.jeecg.common.aspect.annotation.AutoLog; + + /** + * @Description: 轮播图表 + * @Author: jeecg-boot + * @Date: 2025-05-19 + * @Version: V1.0 + */ +@Api(tags="轮播图表") +@RestController +@RequestMapping("/teambuyBanner/teambuyBanner") +@Slf4j +public class TeambuyBannerController extends JeecgController { + @Autowired + private ITeambuyBannerService teambuyBannerService; + + /** + * 分页列表查询 + * + * @param teambuyBanner + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "轮播图表-分页列表查询") + @ApiOperation(value="轮播图表-分页列表查询", notes="轮播图表-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(TeambuyBanner teambuyBanner, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(teambuyBanner, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = teambuyBannerService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param teambuyBanner + * @return + */ + @AutoLog(value = "轮播图表-添加") + @ApiOperation(value="轮播图表-添加", notes="轮播图表-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody TeambuyBanner teambuyBanner) { + teambuyBannerService.save(teambuyBanner); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param teambuyBanner + * @return + */ + @AutoLog(value = "轮播图表-编辑") + @ApiOperation(value="轮播图表-编辑", notes="轮播图表-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody TeambuyBanner teambuyBanner) { + teambuyBannerService.updateById(teambuyBanner); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "轮播图表-通过id删除") + @ApiOperation(value="轮播图表-通过id删除", notes="轮播图表-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + teambuyBannerService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "轮播图表-批量删除") + @ApiOperation(value="轮播图表-批量删除", notes="轮播图表-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.teambuyBannerService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "轮播图表-通过id查询") + @ApiOperation(value="轮播图表-通过id查询", notes="轮播图表-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + TeambuyBanner teambuyBanner = teambuyBannerService.getById(id); + if(teambuyBanner==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(teambuyBanner); + } + + /** + * 导出excel + * + * @param request + * @param teambuyBanner + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, TeambuyBanner teambuyBanner) { + return super.exportXls(request, teambuyBanner, TeambuyBanner.class, "轮播图表"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, TeambuyBanner.class); + } + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/entity/TeambuyBanner.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/entity/TeambuyBanner.java new file mode 100644 index 0000000..a491bf6 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/entity/TeambuyBanner.java @@ -0,0 +1,67 @@ +package org.jeecg.modules.teambuyBanner.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.util.Date; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * @Description: 轮播图表 + * @Author: jeecg-boot + * @Date: 2025-05-19 + * @Version: V1.0 + */ +@Data +@TableName("teambuy_banner") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="teambuy_banner对象", description="轮播图表") +public class TeambuyBanner implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + /**图片名称*/ + @Excel(name = "图片名称", width = 15) + @ApiModelProperty(value = "图片名称") + private java.lang.String title; + /**图片内容*/ + @Excel(name = "图片内容", width = 15) + @ApiModelProperty(value = "图片内容") + private java.lang.String image; + /**所属分类*/ + @Excel(name = "所属分类", width = 15, dicCode = "banner_type") + @Dict(dicCode = "banner_type") + @ApiModelProperty(value = "所属分类") + private java.lang.String type; + /**排序编号*/ + @Excel(name = "排序编号", width = 15) + @ApiModelProperty(value = "排序编号") + private java.lang.Integer orderNo; +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/mapper/TeambuyBannerMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/mapper/TeambuyBannerMapper.java new file mode 100644 index 0000000..bf26938 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/mapper/TeambuyBannerMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.teambuyBanner.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.teambuyBanner.entity.TeambuyBanner; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 轮播图表 + * @Author: jeecg-boot + * @Date: 2025-05-19 + * @Version: V1.0 + */ +public interface TeambuyBannerMapper extends BaseMapper { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/mapper/xml/TeambuyBannerMapper.xml b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/mapper/xml/TeambuyBannerMapper.xml new file mode 100644 index 0000000..2e88372 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/mapper/xml/TeambuyBannerMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/service/ITeambuyBannerService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/service/ITeambuyBannerService.java new file mode 100644 index 0000000..6deb7ae --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/service/ITeambuyBannerService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.teambuyBanner.service; + +import org.jeecg.modules.teambuyBanner.entity.TeambuyBanner; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 轮播图表 + * @Author: jeecg-boot + * @Date: 2025-05-19 + * @Version: V1.0 + */ +public interface ITeambuyBannerService extends IService { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/service/impl/TeambuyBannerServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/service/impl/TeambuyBannerServiceImpl.java new file mode 100644 index 0000000..c5f3a8f --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/service/impl/TeambuyBannerServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.teambuyBanner.service.impl; + +import org.jeecg.modules.teambuyBanner.entity.TeambuyBanner; +import org.jeecg.modules.teambuyBanner.mapper.TeambuyBannerMapper; +import org.jeecg.modules.teambuyBanner.service.ITeambuyBannerService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 轮播图表 + * @Author: jeecg-boot + * @Date: 2025-05-19 + * @Version: V1.0 + */ +@Service +public class TeambuyBannerServiceImpl extends ServiceImpl implements ITeambuyBannerService { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/vue/TeambuyBannerList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/vue/TeambuyBannerList.vue new file mode 100644 index 0000000..3efe5fe --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/vue/TeambuyBannerList.vue @@ -0,0 +1,190 @@ + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/vue/modules/TeambuyBannerForm.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/vue/modules/TeambuyBannerForm.vue new file mode 100644 index 0000000..93ca87e --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/vue/modules/TeambuyBannerForm.vue @@ -0,0 +1,119 @@ + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/vue/modules/TeambuyBannerModal.Style#Drawer.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/vue/modules/TeambuyBannerModal.Style#Drawer.vue new file mode 100644 index 0000000..2a5b13f --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/vue/modules/TeambuyBannerModal.Style#Drawer.vue @@ -0,0 +1,84 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/vue/modules/TeambuyBannerModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/vue/modules/TeambuyBannerModal.vue new file mode 100644 index 0000000..5c4835f --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/vue/modules/TeambuyBannerModal.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/vue3/TeambuyBanner.api.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/vue3/TeambuyBanner.api.ts new file mode 100644 index 0000000..9e1257c --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/vue3/TeambuyBanner.api.ts @@ -0,0 +1,61 @@ +import {defHttp} from '/@/utils/http/axios'; +import {Modal} from 'ant-design-vue'; + +enum Api { + list = '/teambuyBanner/teambuyBanner/list', + save='/teambuyBanner/teambuyBanner/add', + edit='/teambuyBanner/teambuyBanner/edit', + deleteOne = '/teambuyBanner/teambuyBanner/delete', + deleteBatch = '/teambuyBanner/teambuyBanner/deleteBatch', + importExcel = '/teambuyBanner/teambuyBanner/importExcel', + exportXls = '/teambuyBanner/teambuyBanner/exportXls', +} +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; +/** + * 列表接口 + * @param params + */ +export const list = (params) => + defHttp.get({url: Api.list, params}); + +/** + * 删除单个 + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} +/** + * 批量删除 + * @param params + */ +export const batchDelete = (params, handleSuccess) => { + Modal.confirm({ + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} +/** + * 保存或者更新 + * @param params + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({url: url, params}); +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/vue3/TeambuyBanner.data.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/vue3/TeambuyBanner.data.ts new file mode 100644 index 0000000..873ceb5 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/vue3/TeambuyBanner.data.ts @@ -0,0 +1,56 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '图片名称', + align:"center", + dataIndex: 'title' + }, + { + title: '图片内容', + align:"center", + dataIndex: 'image' + }, + { + title: '所属分类', + align:"center", + dataIndex: 'type_dictText' + }, + { + title: '排序编号', + align:"center", + dataIndex: 'orderNo' + }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '图片名称', + field: 'title', + component: 'Input', + }, + { + label: '图片内容', + field: 'image', + component: 'Input', + }, + { + label: '所属分类', + field: 'type', + component: 'JDictSelectTag', + componentProps:{ + dictCode:"banner_type" + }, + }, + { + label: '排序编号', + field: 'orderNo', + component: 'InputNumber', + }, +]; diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/vue3/TeambuyBannerList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/vue3/TeambuyBannerList.vue new file mode 100644 index 0000000..c974364 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/vue3/TeambuyBannerList.vue @@ -0,0 +1,162 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/vue3/components/TeambuyBannerModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/vue3/components/TeambuyBannerModal.vue new file mode 100644 index 0000000..aaeedc5 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyBanner/vue3/components/TeambuyBannerModal.vue @@ -0,0 +1,58 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/controller/TeambuyInfoController.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/controller/TeambuyInfoController.java new file mode 100644 index 0000000..2a8fea8 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/controller/TeambuyInfoController.java @@ -0,0 +1,171 @@ +package org.jeecg.modules.teambuyInfo.controller; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.teambuyInfo.entity.TeambuyInfo; +import org.jeecg.modules.teambuyInfo.service.ITeambuyInfoService; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; + +import org.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; +import org.jeecg.common.system.base.controller.JeecgController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import org.springframework.web.servlet.ModelAndView; +import com.alibaba.fastjson.JSON; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.jeecg.common.aspect.annotation.AutoLog; + + /** + * @Description: 展示信息 + * @Author: jeecg-boot + * @Date: 2025-05-19 + * @Version: V1.0 + */ +@Api(tags="展示信息") +@RestController +@RequestMapping("/teambuyInfo/teambuyInfo") +@Slf4j +public class TeambuyInfoController extends JeecgController { + @Autowired + private ITeambuyInfoService teambuyInfoService; + + /** + * 分页列表查询 + * + * @param teambuyInfo + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "展示信息-分页列表查询") + @ApiOperation(value="展示信息-分页列表查询", notes="展示信息-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(TeambuyInfo teambuyInfo, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(teambuyInfo, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = teambuyInfoService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param teambuyInfo + * @return + */ + @AutoLog(value = "展示信息-添加") + @ApiOperation(value="展示信息-添加", notes="展示信息-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody TeambuyInfo teambuyInfo) { + teambuyInfoService.save(teambuyInfo); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param teambuyInfo + * @return + */ + @AutoLog(value = "展示信息-编辑") + @ApiOperation(value="展示信息-编辑", notes="展示信息-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody TeambuyInfo teambuyInfo) { + teambuyInfoService.updateById(teambuyInfo); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "展示信息-通过id删除") + @ApiOperation(value="展示信息-通过id删除", notes="展示信息-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + teambuyInfoService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "展示信息-批量删除") + @ApiOperation(value="展示信息-批量删除", notes="展示信息-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.teambuyInfoService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "展示信息-通过id查询") + @ApiOperation(value="展示信息-通过id查询", notes="展示信息-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + TeambuyInfo teambuyInfo = teambuyInfoService.getById(id); + if(teambuyInfo==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(teambuyInfo); + } + + /** + * 导出excel + * + * @param request + * @param teambuyInfo + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, TeambuyInfo teambuyInfo) { + return super.exportXls(request, teambuyInfo, TeambuyInfo.class, "展示信息"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, TeambuyInfo.class); + } + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/entity/TeambuyInfo.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/entity/TeambuyInfo.java new file mode 100644 index 0000000..cb14782 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/entity/TeambuyInfo.java @@ -0,0 +1,70 @@ +package org.jeecg.modules.teambuyInfo.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.util.Date; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * @Description: 展示信息 + * @Author: jeecg-boot + * @Date: 2025-05-19 + * @Version: V1.0 + */ +@Data +@TableName("teambuy_info") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="teambuy_info对象", description="展示信息") +public class TeambuyInfo implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + /**图标*/ + @Excel(name = "图标", width = 15) + @ApiModelProperty(value = "图标") + private java.lang.String icon; + /**名称*/ + @Excel(name = "名称", width = 15) + @ApiModelProperty(value = "名称") + private java.lang.String name; + /**标题*/ + @Excel(name = "标题", width = 15) + @ApiModelProperty(value = "标题") + private java.lang.String title; + /**标签*/ + @Excel(name = "标签", width = 15) + @ApiModelProperty(value = "标签") + private java.lang.String tag; + /**价格区间*/ + @Excel(name = "价格区间", width = 15) + @ApiModelProperty(value = "价格区间") + private java.lang.String price; +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/mapper/TeambuyInfoMapper.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/mapper/TeambuyInfoMapper.java new file mode 100644 index 0000000..ae93842 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/mapper/TeambuyInfoMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.teambuyInfo.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.teambuyInfo.entity.TeambuyInfo; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 展示信息 + * @Author: jeecg-boot + * @Date: 2025-05-19 + * @Version: V1.0 + */ +public interface TeambuyInfoMapper extends BaseMapper { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/mapper/xml/TeambuyInfoMapper.xml b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/mapper/xml/TeambuyInfoMapper.xml new file mode 100644 index 0000000..d4d520a --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/mapper/xml/TeambuyInfoMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/service/ITeambuyInfoService.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/service/ITeambuyInfoService.java new file mode 100644 index 0000000..1e2bf0a --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/service/ITeambuyInfoService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.teambuyInfo.service; + +import org.jeecg.modules.teambuyInfo.entity.TeambuyInfo; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 展示信息 + * @Author: jeecg-boot + * @Date: 2025-05-19 + * @Version: V1.0 + */ +public interface ITeambuyInfoService extends IService { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/service/impl/TeambuyInfoServiceImpl.java b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/service/impl/TeambuyInfoServiceImpl.java new file mode 100644 index 0000000..af13402 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/service/impl/TeambuyInfoServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.teambuyInfo.service.impl; + +import org.jeecg.modules.teambuyInfo.entity.TeambuyInfo; +import org.jeecg.modules.teambuyInfo.mapper.TeambuyInfoMapper; +import org.jeecg.modules.teambuyInfo.service.ITeambuyInfoService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 展示信息 + * @Author: jeecg-boot + * @Date: 2025-05-19 + * @Version: V1.0 + */ +@Service +public class TeambuyInfoServiceImpl extends ServiceImpl implements ITeambuyInfoService { + +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/vue/TeambuyInfoList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/vue/TeambuyInfoList.vue new file mode 100644 index 0000000..fcc42b1 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/vue/TeambuyInfoList.vue @@ -0,0 +1,196 @@ + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/vue/modules/TeambuyInfoForm.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/vue/modules/TeambuyInfoForm.vue new file mode 100644 index 0000000..19f96d4 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/vue/modules/TeambuyInfoForm.vue @@ -0,0 +1,124 @@ + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/vue/modules/TeambuyInfoModal.Style#Drawer.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/vue/modules/TeambuyInfoModal.Style#Drawer.vue new file mode 100644 index 0000000..2c6f75c --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/vue/modules/TeambuyInfoModal.Style#Drawer.vue @@ -0,0 +1,84 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/vue/modules/TeambuyInfoModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/vue/modules/TeambuyInfoModal.vue new file mode 100644 index 0000000..5e1442e --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/vue/modules/TeambuyInfoModal.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/vue3/TeambuyInfo.api.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/vue3/TeambuyInfo.api.ts new file mode 100644 index 0000000..69a160e --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/vue3/TeambuyInfo.api.ts @@ -0,0 +1,61 @@ +import {defHttp} from '/@/utils/http/axios'; +import {Modal} from 'ant-design-vue'; + +enum Api { + list = '/teambuyInfo/teambuyInfo/list', + save='/teambuyInfo/teambuyInfo/add', + edit='/teambuyInfo/teambuyInfo/edit', + deleteOne = '/teambuyInfo/teambuyInfo/delete', + deleteBatch = '/teambuyInfo/teambuyInfo/deleteBatch', + importExcel = '/teambuyInfo/teambuyInfo/importExcel', + exportXls = '/teambuyInfo/teambuyInfo/exportXls', +} +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; +/** + * 列表接口 + * @param params + */ +export const list = (params) => + defHttp.get({url: Api.list, params}); + +/** + * 删除单个 + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} +/** + * 批量删除 + * @param params + */ +export const batchDelete = (params, handleSuccess) => { + Modal.confirm({ + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} +/** + * 保存或者更新 + * @param params + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({url: url, params}); +} diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/vue3/TeambuyInfo.data.ts b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/vue3/TeambuyInfo.data.ts new file mode 100644 index 0000000..e48885a --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/vue3/TeambuyInfo.data.ts @@ -0,0 +1,66 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '图标', + align:"center", + dataIndex: 'icon', + customRender:render.renderAvatar, + }, + { + title: '名称', + align:"center", + dataIndex: 'name' + }, + { + title: '标题', + align:"center", + dataIndex: 'title' + }, + { + title: '标签', + align:"center", + dataIndex: 'tag' + }, + { + title: '价格区间', + align:"center", + dataIndex: 'price' + }, +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '图标', + field: 'icon', + component: 'JImageUpload', + componentProps:{ + }, + }, + { + label: '名称', + field: 'name', + component: 'Input', + }, + { + label: '标题', + field: 'title', + component: 'Input', + }, + { + label: '标签', + field: 'tag', + component: 'Input', + }, + { + label: '价格区间', + field: 'price', + component: 'Input', + }, +]; diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/vue3/TeambuyInfoList.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/vue3/TeambuyInfoList.vue new file mode 100644 index 0000000..8269e61 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/vue3/TeambuyInfoList.vue @@ -0,0 +1,162 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/vue3/components/TeambuyInfoModal.vue b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/vue3/components/TeambuyInfoModal.vue new file mode 100644 index 0000000..b7f77f5 --- /dev/null +++ b/jeecg-boot-base/jeecg-boot-base-core/src/main/java/org/jeecg/modules/teambuyInfo/vue3/components/TeambuyInfoModal.vue @@ -0,0 +1,58 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/teambuyController/BannerController.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/teambuyController/BannerController.java new file mode 100644 index 0000000..df8bc92 --- /dev/null +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/teambuyController/BannerController.java @@ -0,0 +1,46 @@ +package org.jeecg.modules.api.teambuyController; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.jeecg.common.api.vo.Result; +import org.jeecg.modules.apiBean.PageBean; +import org.jeecg.modules.apiService.BannerService; +import org.jeecg.modules.teambuyOrderMember.entity.TeambuyOrderMember; +import org.springframework.web.bind.annotation.RequestHeader; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; + +@Api(tags="首页-相关接口") +@RestController +@RequestMapping("/teambuy/index") +@Slf4j +public class BannerController { + /******************************************************************************************************************/ + //轮播图 + @Resource + private BannerService bannerService; + /******************************************************************************************************************/ + //查看轮播图列表 + @ApiOperation(value="轮播图-查询轮播图列表", notes="0-首页") + @RequestMapping(value = "/queryBannerList", method = {RequestMethod.GET}) + public Result queryBannerList(String type, PageBean pageBean){ + return bannerService.queryBannerList(type, pageBean); + } + //查看展示信息列表 + @ApiOperation(value="展示信息-查询展示列表", notes="展示信息-查询展示列表") + @RequestMapping(value = "/queryInfoList", method = {RequestMethod.GET}) + public Result queryInfoList(PageBean pageBean){ + return bannerService.queryInfoList(pageBean); + } + + //查看展示信息列表 + @ApiOperation(value="展示信息-滚动列表", notes="展示信息-滚动列表") + @RequestMapping(value = "/rollList", method = {RequestMethod.GET}) + public Result rollList(PageBean pageBean){ + return bannerService.rollList(pageBean); + } +} diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/BannerService.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/BannerService.java new file mode 100644 index 0000000..b6e3c83 --- /dev/null +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/BannerService.java @@ -0,0 +1,20 @@ +package org.jeecg.modules.apiService; + +import io.swagger.annotations.ApiOperation; +import org.jeecg.common.api.vo.Result; +import org.jeecg.modules.apiBean.PageBean; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +public interface BannerService { + + //查看轮播图列表 + public Result queryBannerList(String type, PageBean pageBean); + + //查看展示信息列表 + public Result queryInfoList(PageBean pageBean); + + //查看展示信息列表 + public Result rollList(PageBean pageBean); + +} diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/impl/BannerServiceImpl.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/impl/BannerServiceImpl.java new file mode 100644 index 0000000..0848d95 --- /dev/null +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/impl/BannerServiceImpl.java @@ -0,0 +1,187 @@ +package org.jeecg.modules.apiService.impl; + +import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.commons.lang.StringUtils; +import org.jeecg.common.api.vo.Result; +import org.jeecg.modules.apiBean.PageBean; +import org.jeecg.modules.apiService.BannerService; +import org.jeecg.modules.hanHaiMember.entity.HanHaiMember; +import org.jeecg.modules.hanHaiMember.service.IHanHaiMemberService; +import org.jeecg.modules.teambuyBanner.entity.TeambuyBanner; +import org.jeecg.modules.teambuyBanner.service.ITeambuyBannerService; +import org.jeecg.modules.teambuyGoods.entity.TeambuyGoods; +import org.jeecg.modules.teambuyGoods.service.ITeambuyGoodsService; +import org.jeecg.modules.teambuyInfo.entity.TeambuyInfo; +import org.jeecg.modules.teambuyInfo.service.ITeambuyInfoService; +import org.jeecg.modules.teambuyOrderGoods.entity.TeambuyOrderGoods; +import org.jeecg.modules.teambuyOrderGoods.service.ITeambuyOrderGoodsService; +import org.jeecg.modules.teambuyOrderLeader.entity.TeambuyOrderLeader; +import org.jeecg.modules.teambuyOrderLeader.service.ITeambuyOrderLeaderService; +import org.jeecg.modules.teambuyOrderMember.entity.TeambuyOrderMember; +import org.jeecg.modules.teambuyOrderMember.service.ITeambuyOrderMemberService; +import org.jeecg.modules.teambuyTeamLeader.entity.TeambuyTeamLeader; +import org.jeecg.modules.teambuyTeamLeader.service.ITeambuyTeamLeaderService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.List; + +@Service +public class BannerServiceImpl implements BannerService { + + /******************************************************************************************************************/ + //轮播图信息 + @Resource + private IHanHaiMemberService hanHaiMemberService; + //轮播图信息 + @Resource + private ITeambuyBannerService teambuyBannerService; + //展示信息 + @Resource + private ITeambuyInfoService teambuyInfoService; + //团长信息 + @Resource + private ITeambuyTeamLeaderService teambuyTeamLeaderService; + //团餐订单信息 + @Resource + private ITeambuyOrderLeaderService teambuyOrderLeaderService; + //团员订单信息 + @Resource + private ITeambuyOrderMemberService teambuyOrderMemberService; + //团员订单商品信息 + @Resource + private ITeambuyOrderGoodsService teambuyOrderGoodsService; + //商品信息信息 + @Resource + private ITeambuyGoodsService teambuyGoodsService; + /******************************************************************************************************************/ + + //查看轮播图列表 + @Override + public Result queryBannerList(String type, PageBean pageBean) { + //返回信息 + String massege = ""; + //分页信息 + Page page = null; + //查询信息 + LambdaQueryChainWrapper query = null; + //返回信息 + Page pageList = null; + + try{ + //分页 + page = new Page(pageBean.getPageNo(), pageBean.getPageSize()); + query = teambuyBannerService + .lambdaQuery(); + + //组装查询条件 + if(StringUtils.isNotBlank(type)){ + query.eq(TeambuyBanner::getType, type); + } + + //按照排序编号升序排列 + query.orderByAsc(TeambuyBanner::getOrderNo); + + //获取轮播图信息 + pageList = query.page(page); + + return Result.OK("轮播图列表", pageList); + }catch (Exception e){ + e.printStackTrace(); + return Result.error("轮播图列表查询失败"); + } + } + + //查看展示信息列表 + @Override + public Result queryInfoList(PageBean pageBean) { + //返回信息 + String massege = ""; + //分页信息 + Page page = null; + //查询信息 + LambdaQueryChainWrapper query = null; + //返回信息 + Page pageList = null; + + try{ + //分页 + page = new Page(pageBean.getPageNo(), pageBean.getPageSize()); + query = teambuyInfoService + .lambdaQuery(); + + //按照排序编号升序排列 + query.orderByDesc(TeambuyInfo::getCreateTime); + + //获取展示信息 + pageList = query.page(page); + + return Result.OK("首页展示信息列表", pageList); + }catch (Exception e){ + e.printStackTrace(); + return Result.error("首页展示信息列表查询失败"); + } + } + + //查看团员订单列表 + @Override + public Result rollList(PageBean pageBean) { + //返回信息 + String massege = ""; + //分页信息 + Page page = null; + //查询信息 + LambdaQueryChainWrapper query = null; + //返回信息 + Page pageList = null; + + try{ + //分页 + page = new Page(pageBean.getPageNo(), pageBean.getPageSize()); + query = teambuyOrderMemberService + .lambdaQuery(); + //未取消订单 + query.eq(TeambuyOrderMember::getIsDel, "0"); + //已完成订单 + query.eq(TeambuyOrderMember::getStatus, "4"); + //按照创建时间降序排列 + query.orderByDesc(TeambuyOrderMember::getCreateTime); + + //获取团员订单信息列表 + pageList = query.page(page); + + //查询团员订单商品信息列表列表 + for (TeambuyOrderMember record : pageList.getRecords()) { + //订单所属团长信息 + TeambuyOrderLeader orderLeader = teambuyOrderLeaderService.getById(record.getOrderLeaderId()); + TeambuyTeamLeader leader = teambuyTeamLeaderService.getById(orderLeader.getUserId()); + record.setTeamLeader(leader); + + //订单商品列表 + List goodsList = teambuyOrderGoodsService + .lambdaQuery() + .eq(TeambuyOrderGoods::getOrderId, record.getId()) + .list(); + //商品详情 + for (TeambuyOrderGoods teambuyOrderGoods : goodsList) { + TeambuyGoods goods = teambuyGoodsService.getById(teambuyOrderGoods.getGoodsId()); + teambuyOrderGoods.setGoods(goods); + } + record.setGoodsList(goodsList); + } + + //查询订单所属用户信息 + for (TeambuyOrderMember record : pageList.getRecords()) { + HanHaiMember member = hanHaiMemberService.getById(record.getUserId()); + record.setHanHaiMember(member); + } + + return Result.OK("订单列表", pageList); + }catch (Exception e){ + e.printStackTrace(); + return Result.error("订单列表查询失败"); + } + } + +} diff --git a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/impl/LeaderServiceImpl.java b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/impl/LeaderServiceImpl.java index 1751796..f910988 100644 --- a/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/impl/LeaderServiceImpl.java +++ b/jeecg-boot-module-system/src/main/java/org/jeecg/modules/apiService/impl/LeaderServiceImpl.java @@ -40,8 +40,8 @@ public class LeaderServiceImpl implements LeaderService { @Override public Result addLeader(String token, TeambuyTeamLeader teamLeader) { //权限验证 - //HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token); - HanHaiMember hanHaiMember = hanHaiMemberService.getById("1919587097244078081"); + HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token); + //HanHaiMember hanHaiMember = hanHaiMemberService.getById("1919587097244078081"); //返回信息 String massege = ""; @@ -158,9 +158,9 @@ public class LeaderServiceImpl implements LeaderService { .eq(TeambuyTeamRelation::getMemberId, hanHaiMember.getId()) .one(); - if(null == relation){ - return Result.error("还没有绑定团长"); - } +// if(null == relation){ +// return Result.error("还没有绑定团长"); +// } if("0".equals(relation.getStatus())){ return Result.error("原团长解绑中,解绑成功后方可更换团长"); } @@ -172,7 +172,7 @@ public class LeaderServiceImpl implements LeaderService { //更换团长 boolean result = teambuyTeamRelationService .lambdaUpdate() - .eq(TeambuyTeamRelation::getMemberId, relation.getMemberId()) + .eq(TeambuyTeamRelation::getMemberId, hanHaiMember.getId()) .set(TeambuyTeamRelation::getLeaderId, teamRelation.getLeaderId()) .set(TeambuyTeamRelation::getStatus, "1") .update();