From b23b037f0e7925b4ada5e8c6397bf4c91e313f4a Mon Sep 17 00:00:00 2001 From: "382696293@qq.com" <382696293@qq.com> Date: Wed, 27 Mar 2024 09:40:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=86=9C=E5=B8=83=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/core/domain/entity/WxLining.java | 157 ++++++++++ .../common/core/mapper/WxLiningMapper.java | 61 ++++ .../main/resources/mapper/WxLiningMapper.xml | 109 +++++++ .../system/controller/WxLiningController.java | 100 ++++++ .../system/service/IWxLiningService.java | 63 ++++ .../service/impl/WxLiningServiceImpl.java | 91 ++++++ flossom-ui/src/api/system/lining.js | 44 +++ flossom-ui/src/views/system/lining/index.vue | 293 ++++++++++++++++++ 8 files changed, 918 insertions(+) create mode 100644 flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxLining.java create mode 100644 flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/mapper/WxLiningMapper.java create mode 100644 flossom-common/flossom-common-core/src/main/resources/mapper/WxLiningMapper.xml create mode 100644 flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxLiningController.java create mode 100644 flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxLiningService.java create mode 100644 flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxLiningServiceImpl.java create mode 100644 flossom-ui/src/api/system/lining.js create mode 100644 flossom-ui/src/views/system/lining/index.vue diff --git a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxLining.java b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxLining.java new file mode 100644 index 0000000..7270595 --- /dev/null +++ b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxLining.java @@ -0,0 +1,157 @@ +package com.flossom.common.core.domain.entity; + +import com.flossom.common.core.annotation.Excel; +import com.flossom.common.core.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 膜布对象 wx_lining + * + * @author flossom + * @date 2024-03-26 + */ +public class WxLining extends BaseEntity { + private static final long serialVersionUID = 1L; + + private Long id; + + /** + * 膜布编码 + */ + @Excel(name = "膜布编码") + private String code; + + /** + * 膜布名称 + */ + @Excel(name = "膜布名称") + private String name; + + /** + * 膜布描述 + */ + @Excel(name = "膜布描述") + private String desc; + + /** + * 购买入口是否显示(1是/0否) + */ + @Excel(name = "购买入口是否显示", readConverterExp = "1=是/0否") + private Long isShowBuy; + + /** + * 购买商城appid + */ + @Excel(name = "购买商城appid") + private String skipAppid; + + /** + * 购买商城PATH + */ + @Excel(name = "购买商城PATH") + private String skipPath; + + /** + * 膜布图标 + */ + @Excel(name = "膜布图标") + private String icon; + + /** + * 状态(0正常 1禁用) + */ + @Excel(name = "状态", readConverterExp = "0=正常,1=禁用") + private Long status; + + public void setId(Long id) { + this.id = id; + } + + public Long getId() { + return id; + } + + public void setCode(String code) { + this.code = code; + } + + public String getCode() { + return code; + } + + public void setName(String name) { + this.name = name; + } + + public String getName() { + return name; + } + + public void setDesc(String desc) { + this.desc = desc; + } + + public String getDesc() { + return desc; + } + + public void setIsShowBuy(Long isShowBuy) { + this.isShowBuy = isShowBuy; + } + + public Long getIsShowBuy() { + return isShowBuy; + } + + public void setSkipAppid(String skipAppid) { + this.skipAppid = skipAppid; + } + + public String getSkipAppid() { + return skipAppid; + } + + public void setSkipPath(String skipPath) { + this.skipPath = skipPath; + } + + public String getSkipPath() { + return skipPath; + } + + public void setIcon(String icon) { + this.icon = icon; + } + + public String getIcon() { + return icon; + } + + public void setStatus(Long status) { + this.status = status; + } + + public Long getStatus() { + return status; + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("code", getCode()) + .append("name", getName()) + .append("desc", getDesc()) + .append("isShowBuy", getIsShowBuy()) + .append("skipAppid", getSkipAppid()) + .append("skipPath", getSkipPath()) + .append("icon", getIcon()) + .append("status", getStatus()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/mapper/WxLiningMapper.java b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/mapper/WxLiningMapper.java new file mode 100644 index 0000000..7606fcb --- /dev/null +++ b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/mapper/WxLiningMapper.java @@ -0,0 +1,61 @@ +package com.flossom.common.core.mapper; + +import com.flossom.common.core.domain.entity.WxLining; + +import java.util.List; + +/** + * 膜布Mapper接口 + * + * @author flossom + * @date 2024-03-26 + */ +public interface WxLiningMapper { + /** + * 查询膜布 + * + * @param id 膜布主键 + * @return 膜布 + */ + public WxLining selectWxLiningById(Long id); + + /** + * 查询膜布列表 + * + * @param wxLining 膜布 + * @return 膜布集合 + */ + public List selectWxLiningList(WxLining wxLining); + + /** + * 新增膜布 + * + * @param wxLining 膜布 + * @return 结果 + */ + public int insertWxLining(WxLining wxLining); + + /** + * 修改膜布 + * + * @param wxLining 膜布 + * @return 结果 + */ + public int updateWxLining(WxLining wxLining); + + /** + * 删除膜布 + * + * @param id 膜布主键 + * @return 结果 + */ + public int deleteWxLiningById(Long id); + + /** + * 批量删除膜布 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteWxLiningByIds(Long[] ids); +} diff --git a/flossom-common/flossom-common-core/src/main/resources/mapper/WxLiningMapper.xml b/flossom-common/flossom-common-core/src/main/resources/mapper/WxLiningMapper.xml new file mode 100644 index 0000000..7a8a61c --- /dev/null +++ b/flossom-common/flossom-common-core/src/main/resources/mapper/WxLiningMapper.xml @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + select id, code, name, `desc`, is_show_buy, skip_appid, skip_path, icon, status, create_by, create_time, update_by, update_time from wx_lining + + + + + + + + insert into wx_lining + + id, + code, + name, + `desc`, + is_show_buy, + skip_appid, + skip_path, + icon, + status, + create_by, + create_time, + update_by, + update_time, + + + #{id}, + #{code}, + #{name}, + #{desc}, + #{isShowBuy}, + #{skipAppid}, + #{skipPath}, + #{icon}, + #{status}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update wx_lining + + code = #{code}, + name = #{name}, + `desc` = #{desc}, + is_show_buy = #{isShowBuy}, + skip_appid = #{skipAppid}, + skip_path = #{skipPath}, + icon = #{icon}, + status = #{status}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from wx_lining where id = #{id} + + + + delete from wx_lining where id in + + #{id} + + + \ No newline at end of file diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxLiningController.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxLiningController.java new file mode 100644 index 0000000..4e8a317 --- /dev/null +++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxLiningController.java @@ -0,0 +1,100 @@ +package com.flossom.system.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; + +import com.flossom.common.core.domain.entity.WxLining; +import com.flossom.common.core.utils.poi.ExcelUtil; +import com.flossom.common.core.web.controller.BaseController; +import com.flossom.common.core.web.domain.AjaxResult; +import com.flossom.common.core.web.page.TableDataInfo; +import com.flossom.common.log.annotation.Log; +import com.flossom.common.log.enums.BusinessType; +import com.flossom.common.security.annotation.RequiresPermissions; +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.flossom.system.service.IWxLiningService; + +/** + * 膜布Controller + * + * @author flossom + * @date 2024-03-26 + */ +@RestController +@RequestMapping("/lining") +public class WxLiningController extends BaseController { + + @Autowired + private IWxLiningService wxLiningService; + + /** + * 查询膜布列表 + */ + @RequiresPermissions("system:lining:list") + @GetMapping("/list") + public TableDataInfo list(WxLining wxLining) { + List list = wxLiningService.selectWxLiningList(wxLining); + return getDataTable(list); + } + + /** + * 导出膜布列表 + */ + @RequiresPermissions("system:lining:export") + @Log(title = "膜布", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, WxLining wxLining) { + List list = wxLiningService.selectWxLiningList(wxLining); + ExcelUtil util = new ExcelUtil(WxLining.class); + util.exportExcel(response, list, "膜布数据"); + } + + /** + * 获取膜布详细信息 + */ + @RequiresPermissions("system:lining:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return success(wxLiningService.selectWxLiningById(id)); + } + + /** + * 新增膜布 + */ + @RequiresPermissions("system:lining:add") + @Log(title = "膜布", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody WxLining wxLining) { + return toAjax(wxLiningService.insertWxLining(wxLining)); + } + + /** + * 修改膜布 + */ + @RequiresPermissions("system:lining:edit") + @Log(title = "膜布", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody WxLining wxLining) { + return toAjax(wxLiningService.updateWxLining(wxLining)); + } + + /** + * 删除膜布 + */ + @RequiresPermissions("system:lining:remove") + @Log(title = "膜布", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(wxLiningService.deleteWxLiningByIds(ids)); + } + +} diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxLiningService.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxLiningService.java new file mode 100644 index 0000000..8a44f85 --- /dev/null +++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxLiningService.java @@ -0,0 +1,63 @@ +package com.flossom.system.service; + +import com.flossom.common.core.domain.entity.WxLining; + +import java.util.List; + +/** + * 膜布Service接口 + * + * @author flossom + * @date 2024-03-26 + */ +public interface IWxLiningService { + + /** + * 查询膜布 + * + * @param id 膜布主键 + * @return 膜布 + */ + public WxLining selectWxLiningById(Long id); + + /** + * 查询膜布列表 + * + * @param wxLining 膜布 + * @return 膜布集合 + */ + public List selectWxLiningList(WxLining wxLining); + + /** + * 新增膜布 + * + * @param wxLining 膜布 + * @return 结果 + */ + public int insertWxLining(WxLining wxLining); + + /** + * 修改膜布 + * + * @param wxLining 膜布 + * @return 结果 + */ + public int updateWxLining(WxLining wxLining); + + /** + * 批量删除膜布 + * + * @param ids 需要删除的膜布主键集合 + * @return 结果 + */ + public int deleteWxLiningByIds(Long[] ids); + + /** + * 删除膜布信息 + * + * @param id 膜布主键 + * @return 结果 + */ + public int deleteWxLiningById(Long id); + +} diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxLiningServiceImpl.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxLiningServiceImpl.java new file mode 100644 index 0000000..f4fbbd7 --- /dev/null +++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxLiningServiceImpl.java @@ -0,0 +1,91 @@ +package com.flossom.system.service.impl; + +import java.util.List; + +import com.flossom.common.core.domain.entity.WxLining; +import com.flossom.common.core.mapper.WxLiningMapper; +import com.flossom.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.flossom.system.service.IWxLiningService; + +/** + * 膜布Service业务层处理 + * + * @author flossom + * @date 2024-03-26 + */ +@Service +public class WxLiningServiceImpl implements IWxLiningService { + + @Autowired + private WxLiningMapper wxLiningMapper; + + /** + * 查询膜布 + * + * @param id 膜布主键 + * @return 膜布 + */ + @Override + public WxLining selectWxLiningById(Long id) { + return wxLiningMapper.selectWxLiningById(id); + } + + /** + * 查询膜布列表 + * + * @param wxLining 膜布 + * @return 膜布 + */ + @Override + public List selectWxLiningList(WxLining wxLining) { + return wxLiningMapper.selectWxLiningList(wxLining); + } + + /** + * 新增膜布 + * + * @param wxLining 膜布 + * @return 结果 + */ + @Override + public int insertWxLining(WxLining wxLining) { + wxLining.setCreateTime(DateUtils.getNowDate()); + return wxLiningMapper.insertWxLining(wxLining); + } + + /** + * 修改膜布 + * + * @param wxLining 膜布 + * @return 结果 + */ + @Override + public int updateWxLining(WxLining wxLining) { + wxLining.setUpdateTime(DateUtils.getNowDate()); + return wxLiningMapper.updateWxLining(wxLining); + } + + /** + * 批量删除膜布 + * + * @param ids 需要删除的膜布主键 + * @return 结果 + */ + @Override + public int deleteWxLiningByIds(Long[] ids) { + return wxLiningMapper.deleteWxLiningByIds(ids); + } + + /** + * 删除膜布信息 + * + * @param id 膜布主键 + * @return 结果 + */ + @Override + public int deleteWxLiningById(Long id) { + return wxLiningMapper.deleteWxLiningById(id); + } +} diff --git a/flossom-ui/src/api/system/lining.js b/flossom-ui/src/api/system/lining.js new file mode 100644 index 0000000..13db68d --- /dev/null +++ b/flossom-ui/src/api/system/lining.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询膜布列表 +export function listLining(query) { + return request({ + url: '/system/lining/list', + method: 'get', + params: query + }) +} + +// 查询膜布详细 +export function getLining(id) { + return request({ + url: '/system/lining/' + id, + method: 'get' + }) +} + +// 新增膜布 +export function addLining(data) { + return request({ + url: '/system/lining', + method: 'post', + data: data + }) +} + +// 修改膜布 +export function updateLining(data) { + return request({ + url: '/system/lining', + method: 'put', + data: data + }) +} + +// 删除膜布 +export function delLining(id) { + return request({ + url: '/system/lining/' + id, + method: 'delete' + }) +} diff --git a/flossom-ui/src/views/system/lining/index.vue b/flossom-ui/src/views/system/lining/index.vue new file mode 100644 index 0000000..bf2fc26 --- /dev/null +++ b/flossom-ui/src/views/system/lining/index.vue @@ -0,0 +1,293 @@ + + + +