From 068bb884d199fade4b2132608c9e824492815a7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8D=A2=E5=BA=8F=E6=8C=AF?= Date: Tue, 11 Jun 2024 13:55:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B1=89=E4=B8=B0=E6=B9=96Vlog=E7=9F=AD?= =?UTF-8?q?=E8=A7=86=E9=A2=91=E5=BA=94=E7=94=A8=E7=B3=BB=E7=BB=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/GodTemplateInfoController.java | 98 ++++ .../templateInfo/domain/GodTemplateInfo.java | 262 ++++++++++ .../mapper/GodTemplateInfoMapper.java | 62 +++ .../service/IGodTemplateInfoService.java | 62 +++ .../impl/GodTemplateInfoServiceImpl.java | 94 ++++ .../godTemplateInfo/GodTemplateInfoMapper.xml | 137 +++++ .../src/api/godTemplateInfo/templateInfo.js | 44 ++ .../godTemplateInfo/templateInfo/index.vue | 466 ++++++++++++++++++ 8 files changed, 1225 insertions(+) create mode 100644 God-Vue-master/god-system/src/main/java/com/god/templateInfo/controller/GodTemplateInfoController.java create mode 100644 God-Vue-master/god-system/src/main/java/com/god/templateInfo/domain/GodTemplateInfo.java create mode 100644 God-Vue-master/god-system/src/main/java/com/god/templateInfo/mapper/GodTemplateInfoMapper.java create mode 100644 God-Vue-master/god-system/src/main/java/com/god/templateInfo/service/IGodTemplateInfoService.java create mode 100644 God-Vue-master/god-system/src/main/java/com/god/templateInfo/service/impl/GodTemplateInfoServiceImpl.java create mode 100644 God-Vue-master/god-system/src/main/resources/mapper/godTemplateInfo/GodTemplateInfoMapper.xml create mode 100644 god-ui/src/api/godTemplateInfo/templateInfo.js create mode 100644 god-ui/src/views/godTemplateInfo/templateInfo/index.vue diff --git a/God-Vue-master/god-system/src/main/java/com/god/templateInfo/controller/GodTemplateInfoController.java b/God-Vue-master/god-system/src/main/java/com/god/templateInfo/controller/GodTemplateInfoController.java new file mode 100644 index 00000000..26c7c26d --- /dev/null +++ b/God-Vue-master/god-system/src/main/java/com/god/templateInfo/controller/GodTemplateInfoController.java @@ -0,0 +1,98 @@ +package com.god.templateInfo.controller; + +import com.god.common.annotation.Log; +import com.god.common.core.controller.BaseController; +import com.god.common.core.domain.AjaxResult; +import com.god.common.core.page.TableDataInfo; +import com.god.common.enums.BusinessType; +import com.god.common.utils.poi.ExcelUtil; +import com.god.templateInfo.domain.GodTemplateInfo; +import com.god.templateInfo.service.IGodTemplateInfoService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 模板管理Controller + * + * @author Lxz + * @date 2024-06-11 + */ +@RestController +@RequestMapping("/godTemplateInfo/templateInfo") +public class GodTemplateInfoController extends BaseController +{ + @Autowired + private IGodTemplateInfoService godTemplateInfoService; + + /** + * 查询模板管理列表 + */ + @PreAuthorize("@ss.hasPermi('godTemplateInfo:templateInfo:list')") + @GetMapping("/list") + public TableDataInfo list(GodTemplateInfo godTemplateInfo) + { + startPage(); + List list = godTemplateInfoService.selectGodTemplateInfoList(godTemplateInfo); + return getDataTable(list); + } + + /** + * 导出模板管理列表 + */ + @PreAuthorize("@ss.hasPermi('godTemplateInfo:templateInfo:export')") + @Log(title = "模板管理", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, GodTemplateInfo godTemplateInfo) + { + List list = godTemplateInfoService.selectGodTemplateInfoList(godTemplateInfo); + ExcelUtil util = new ExcelUtil(GodTemplateInfo.class); + util.exportExcel(response, list, "模板管理数据"); + } + + /** + * 获取模板管理详细信息 + */ + @PreAuthorize("@ss.hasPermi('godTemplateInfo:templateInfo:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) + { + return success(godTemplateInfoService.selectGodTemplateInfoById(id)); + } + + /** + * 新增模板管理 + */ + @PreAuthorize("@ss.hasPermi('godTemplateInfo:templateInfo:add')") + @Log(title = "模板管理", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody GodTemplateInfo godTemplateInfo) + { + return toAjax(godTemplateInfoService.insertGodTemplateInfo(godTemplateInfo)); + } + + /** + * 修改模板管理 + */ + @PreAuthorize("@ss.hasPermi('godTemplateInfo:templateInfo:edit')") + @Log(title = "模板管理", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody GodTemplateInfo godTemplateInfo) + { + return toAjax(godTemplateInfoService.updateGodTemplateInfo(godTemplateInfo)); + } + + /** + * 删除模板管理 + */ + @PreAuthorize("@ss.hasPermi('godTemplateInfo:templateInfo:remove')") + @Log(title = "模板管理", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) + { + return toAjax(godTemplateInfoService.deleteGodTemplateInfoByIds(ids)); + } +} diff --git a/God-Vue-master/god-system/src/main/java/com/god/templateInfo/domain/GodTemplateInfo.java b/God-Vue-master/god-system/src/main/java/com/god/templateInfo/domain/GodTemplateInfo.java new file mode 100644 index 00000000..31de80d8 --- /dev/null +++ b/God-Vue-master/god-system/src/main/java/com/god/templateInfo/domain/GodTemplateInfo.java @@ -0,0 +1,262 @@ +package com.god.templateInfo.domain; + +import com.god.common.annotation.Excel; +import com.god.common.core.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 模板管理对象 god_template_info + * + * @author Lxz + * @date 2024-06-11 + */ +public class GodTemplateInfo extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private String id; + + /** 模板名称 */ + @Excel(name = "模板名称") + private String templateName; + + /** 模板类型 */ + @Excel(name = "模板类型") + private String templateType; + + /** 价格 */ + @Excel(name = "价格") + private String price; + + /** 视频 */ + @Excel(name = "视频") + private String video; + + /** 时间 */ + @Excel(name = "时间") + private String times; + + /** 系统类型 */ + @Excel(name = "系统类型") + private String sysType; + + /** 模块类型 */ + @Excel(name = "模块类型") + private String moduleType; + + /** 预留1 */ + @Excel(name = "预留1") + private String reserveOne; + + /** 预留2 */ + @Excel(name = "预留2") + private String reserveTwo; + + /** 预留3 */ + @Excel(name = "预留3") + private String reserveThree; + + /** 预留4 */ + @Excel(name = "预留4") + private String reserveFour; + + /** 预留5 */ + @Excel(name = "预留5") + private String reserveFive; + + /** 预留6 */ + @Excel(name = "预留6") + private String reserveSix; + + /** 预留7 */ + @Excel(name = "预留7") + private String reserveSeven; + + /** 预留8 */ + @Excel(name = "预留8") + private String reserveEight; + + /** 预留9 */ + @Excel(name = "预留9") + private String reserveNine; + + public void setId(String id) + { + this.id = id; + } + + public String getId() + { + return id; + } + public void setTemplateName(String templateName) + { + this.templateName = templateName; + } + + public String getTemplateName() + { + return templateName; + } + public void setTemplateType(String templateType) + { + this.templateType = templateType; + } + + public String getTemplateType() + { + return templateType; + } + public void setPrice(String price) + { + this.price = price; + } + + public String getPrice() + { + return price; + } + public void setVideo(String video) + { + this.video = video; + } + + public String getVideo() + { + return video; + } + public void setTimes(String times) + { + this.times = times; + } + + public String getTimes() + { + return times; + } + public void setSysType(String sysType) + { + this.sysType = sysType; + } + + public String getSysType() + { + return sysType; + } + public void setModuleType(String moduleType) + { + this.moduleType = moduleType; + } + + public String getModuleType() + { + return moduleType; + } + public void setReserveOne(String reserveOne) + { + this.reserveOne = reserveOne; + } + + public String getReserveOne() + { + return reserveOne; + } + public void setReserveTwo(String reserveTwo) + { + this.reserveTwo = reserveTwo; + } + + public String getReserveTwo() + { + return reserveTwo; + } + public void setReserveThree(String reserveThree) + { + this.reserveThree = reserveThree; + } + + public String getReserveThree() + { + return reserveThree; + } + public void setReserveFour(String reserveFour) + { + this.reserveFour = reserveFour; + } + + public String getReserveFour() + { + return reserveFour; + } + public void setReserveFive(String reserveFive) + { + this.reserveFive = reserveFive; + } + + public String getReserveFive() + { + return reserveFive; + } + public void setReserveSix(String reserveSix) + { + this.reserveSix = reserveSix; + } + + public String getReserveSix() + { + return reserveSix; + } + public void setReserveSeven(String reserveSeven) + { + this.reserveSeven = reserveSeven; + } + + public String getReserveSeven() + { + return reserveSeven; + } + public void setReserveEight(String reserveEight) + { + this.reserveEight = reserveEight; + } + + public String getReserveEight() + { + return reserveEight; + } + public void setReserveNine(String reserveNine) + { + this.reserveNine = reserveNine; + } + + public String getReserveNine() + { + return reserveNine; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("templateName", getTemplateName()) + .append("templateType", getTemplateType()) + .append("price", getPrice()) + .append("video", getVideo()) + .append("times", getTimes()) + .append("remark", getRemark()) + .append("sysType", getSysType()) + .append("moduleType", getModuleType()) + .append("reserveOne", getReserveOne()) + .append("reserveTwo", getReserveTwo()) + .append("reserveThree", getReserveThree()) + .append("reserveFour", getReserveFour()) + .append("reserveFive", getReserveFive()) + .append("reserveSix", getReserveSix()) + .append("reserveSeven", getReserveSeven()) + .append("reserveEight", getReserveEight()) + .append("reserveNine", getReserveNine()) + .toString(); + } +} diff --git a/God-Vue-master/god-system/src/main/java/com/god/templateInfo/mapper/GodTemplateInfoMapper.java b/God-Vue-master/god-system/src/main/java/com/god/templateInfo/mapper/GodTemplateInfoMapper.java new file mode 100644 index 00000000..4e628094 --- /dev/null +++ b/God-Vue-master/god-system/src/main/java/com/god/templateInfo/mapper/GodTemplateInfoMapper.java @@ -0,0 +1,62 @@ +package com.god.templateInfo.mapper; + +import com.god.templateInfo.domain.GodTemplateInfo; + +import java.util.List; + +/** + * 模板管理Mapper接口 + * + * @author Lxz + * @date 2024-06-11 + */ +public interface GodTemplateInfoMapper +{ + /** + * 查询模板管理 + * + * @param id 模板管理主键 + * @return 模板管理 + */ + public GodTemplateInfo selectGodTemplateInfoById(String id); + + /** + * 查询模板管理列表 + * + * @param godTemplateInfo 模板管理 + * @return 模板管理集合 + */ + public List selectGodTemplateInfoList(GodTemplateInfo godTemplateInfo); + + /** + * 新增模板管理 + * + * @param godTemplateInfo 模板管理 + * @return 结果 + */ + public int insertGodTemplateInfo(GodTemplateInfo godTemplateInfo); + + /** + * 修改模板管理 + * + * @param godTemplateInfo 模板管理 + * @return 结果 + */ + public int updateGodTemplateInfo(GodTemplateInfo godTemplateInfo); + + /** + * 删除模板管理 + * + * @param id 模板管理主键 + * @return 结果 + */ + public int deleteGodTemplateInfoById(String id); + + /** + * 批量删除模板管理 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteGodTemplateInfoByIds(String[] ids); +} diff --git a/God-Vue-master/god-system/src/main/java/com/god/templateInfo/service/IGodTemplateInfoService.java b/God-Vue-master/god-system/src/main/java/com/god/templateInfo/service/IGodTemplateInfoService.java new file mode 100644 index 00000000..c6ff606b --- /dev/null +++ b/God-Vue-master/god-system/src/main/java/com/god/templateInfo/service/IGodTemplateInfoService.java @@ -0,0 +1,62 @@ +package com.god.templateInfo.service; + +import com.god.templateInfo.domain.GodTemplateInfo; + +import java.util.List; + +/** + * 模板管理Service接口 + * + * @author Lxz + * @date 2024-06-11 + */ +public interface IGodTemplateInfoService +{ + /** + * 查询模板管理 + * + * @param id 模板管理主键 + * @return 模板管理 + */ + public GodTemplateInfo selectGodTemplateInfoById(String id); + + /** + * 查询模板管理列表 + * + * @param godTemplateInfo 模板管理 + * @return 模板管理集合 + */ + public List selectGodTemplateInfoList(GodTemplateInfo godTemplateInfo); + + /** + * 新增模板管理 + * + * @param godTemplateInfo 模板管理 + * @return 结果 + */ + public int insertGodTemplateInfo(GodTemplateInfo godTemplateInfo); + + /** + * 修改模板管理 + * + * @param godTemplateInfo 模板管理 + * @return 结果 + */ + public int updateGodTemplateInfo(GodTemplateInfo godTemplateInfo); + + /** + * 批量删除模板管理 + * + * @param ids 需要删除的模板管理主键集合 + * @return 结果 + */ + public int deleteGodTemplateInfoByIds(String[] ids); + + /** + * 删除模板管理信息 + * + * @param id 模板管理主键 + * @return 结果 + */ + public int deleteGodTemplateInfoById(String id); +} diff --git a/God-Vue-master/god-system/src/main/java/com/god/templateInfo/service/impl/GodTemplateInfoServiceImpl.java b/God-Vue-master/god-system/src/main/java/com/god/templateInfo/service/impl/GodTemplateInfoServiceImpl.java new file mode 100644 index 00000000..3c7b8f3c --- /dev/null +++ b/God-Vue-master/god-system/src/main/java/com/god/templateInfo/service/impl/GodTemplateInfoServiceImpl.java @@ -0,0 +1,94 @@ +package com.god.templateInfo.service.impl; + +import com.god.templateInfo.domain.GodTemplateInfo; +import com.god.templateInfo.mapper.GodTemplateInfoMapper; +import com.god.templateInfo.service.IGodTemplateInfoService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 模板管理Service业务层处理 + * + * @author Lxz + * @date 2024-06-11 + */ +@Service +public class GodTemplateInfoServiceImpl implements IGodTemplateInfoService +{ + @Autowired + private GodTemplateInfoMapper godTemplateInfoMapper; + + /** + * 查询模板管理 + * + * @param id 模板管理主键 + * @return 模板管理 + */ + @Override + public GodTemplateInfo selectGodTemplateInfoById(String id) + { + return godTemplateInfoMapper.selectGodTemplateInfoById(id); + } + + /** + * 查询模板管理列表 + * + * @param godTemplateInfo 模板管理 + * @return 模板管理 + */ + @Override + public List selectGodTemplateInfoList(GodTemplateInfo godTemplateInfo) + { + return godTemplateInfoMapper.selectGodTemplateInfoList(godTemplateInfo); + } + + /** + * 新增模板管理 + * + * @param godTemplateInfo 模板管理 + * @return 结果 + */ + @Override + public int insertGodTemplateInfo(GodTemplateInfo godTemplateInfo) + { + return godTemplateInfoMapper.insertGodTemplateInfo(godTemplateInfo); + } + + /** + * 修改模板管理 + * + * @param godTemplateInfo 模板管理 + * @return 结果 + */ + @Override + public int updateGodTemplateInfo(GodTemplateInfo godTemplateInfo) + { + return godTemplateInfoMapper.updateGodTemplateInfo(godTemplateInfo); + } + + /** + * 批量删除模板管理 + * + * @param ids 需要删除的模板管理主键 + * @return 结果 + */ + @Override + public int deleteGodTemplateInfoByIds(String[] ids) + { + return godTemplateInfoMapper.deleteGodTemplateInfoByIds(ids); + } + + /** + * 删除模板管理信息 + * + * @param id 模板管理主键 + * @return 结果 + */ + @Override + public int deleteGodTemplateInfoById(String id) + { + return godTemplateInfoMapper.deleteGodTemplateInfoById(id); + } +} diff --git a/God-Vue-master/god-system/src/main/resources/mapper/godTemplateInfo/GodTemplateInfoMapper.xml b/God-Vue-master/god-system/src/main/resources/mapper/godTemplateInfo/GodTemplateInfoMapper.xml new file mode 100644 index 00000000..4f147c31 --- /dev/null +++ b/God-Vue-master/god-system/src/main/resources/mapper/godTemplateInfo/GodTemplateInfoMapper.xml @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, template_name, template_type, price, video, times, remark, sys_type, module_type, reserve_one, reserve_two, reserve_three, reserve_four, reserve_five, reserve_six, reserve_seven, reserve_eight, reserve_nine from god_template_info + + + + + + + + insert into god_template_info + + id, + template_name, + template_type, + price, + video, + times, + remark, + sys_type, + module_type, + reserve_one, + reserve_two, + reserve_three, + reserve_four, + reserve_five, + reserve_six, + reserve_seven, + reserve_eight, + reserve_nine, + + + #{id}, + #{templateName}, + #{templateType}, + #{price}, + #{video}, + #{times}, + #{remark}, + #{sysType}, + #{moduleType}, + #{reserveOne}, + #{reserveTwo}, + #{reserveThree}, + #{reserveFour}, + #{reserveFive}, + #{reserveSix}, + #{reserveSeven}, + #{reserveEight}, + #{reserveNine}, + + + + + update god_template_info + + template_name = #{templateName}, + template_type = #{templateType}, + price = #{price}, + video = #{video}, + times = #{times}, + remark = #{remark}, + sys_type = #{sysType}, + module_type = #{moduleType}, + reserve_one = #{reserveOne}, + reserve_two = #{reserveTwo}, + reserve_three = #{reserveThree}, + reserve_four = #{reserveFour}, + reserve_five = #{reserveFive}, + reserve_six = #{reserveSix}, + reserve_seven = #{reserveSeven}, + reserve_eight = #{reserveEight}, + reserve_nine = #{reserveNine}, + + where id = #{id} + + + + delete from god_template_info where id = #{id} + + + + delete from god_template_info where id in + + #{id} + + + \ No newline at end of file diff --git a/god-ui/src/api/godTemplateInfo/templateInfo.js b/god-ui/src/api/godTemplateInfo/templateInfo.js new file mode 100644 index 00000000..f3206f8a --- /dev/null +++ b/god-ui/src/api/godTemplateInfo/templateInfo.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询模板管理列表 +export function listTemplateInfo(query) { + return request({ + url: '/godTemplateInfo/templateInfo/list', + method: 'get', + params: query + }) +} + +// 查询模板管理详细 +export function getTemplateInfo(id) { + return request({ + url: '/godTemplateInfo/templateInfo/' + id, + method: 'get' + }) +} + +// 新增模板管理 +export function addTemplateInfo(data) { + return request({ + url: '/godTemplateInfo/templateInfo', + method: 'post', + data: data + }) +} + +// 修改模板管理 +export function updateTemplateInfo(data) { + return request({ + url: '/godTemplateInfo/templateInfo', + method: 'put', + data: data + }) +} + +// 删除模板管理 +export function delTemplateInfo(id) { + return request({ + url: '/godTemplateInfo/templateInfo/' + id, + method: 'delete' + }) +} diff --git a/god-ui/src/views/godTemplateInfo/templateInfo/index.vue b/god-ui/src/views/godTemplateInfo/templateInfo/index.vue new file mode 100644 index 00000000..b82d20d0 --- /dev/null +++ b/god-ui/src/views/godTemplateInfo/templateInfo/index.vue @@ -0,0 +1,466 @@ + + +