diff --git a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxOtherSetting.java b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxOtherSetting.java new file mode 100644 index 0000000..144d7a2 --- /dev/null +++ b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxOtherSetting.java @@ -0,0 +1,101 @@ +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_other_setting + * + * @author flossom + * @date 2023-12-13 + */ +public class WxOtherSetting extends BaseEntity { + private static final long serialVersionUID = 1L; + + /** + * $column.columnComment + */ + private Long id; + + /** + * 商城跳转appid + */ + @Excel(name = "商城跳转appid") + private String skipAppid; + + /** + * 商城路径 + */ + @Excel(name = "商城路径") + private String skipPath; + + /** + * 系统版本 + */ + @Excel(name = "系统版本") + private String sysVersion; + + /** + * 状态(0正常 1停用) + */ + @Excel(name = "状态", readConverterExp = "0=正常,1=停用") + private Integer status; + + public void setId(Long id) { + this.id = id; + } + + public Long getId() { + return id; + } + + 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 setSysVersion(String sysVersion) { + this.sysVersion = sysVersion; + } + + public String getSysVersion() { + return sysVersion; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Integer getStatus() { + return status; + } + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("skipAppid", getSkipAppid()) + .append("skipPath", getSkipPath()) + .append("sysVersion", getSysVersion()) + .append("status", getStatus()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/flossom-common/flossom-common-hzMapper/src/main/java/com/flossom/hzMapper/mapper/WxOtherSettingMapper.java b/flossom-common/flossom-common-hzMapper/src/main/java/com/flossom/hzMapper/mapper/WxOtherSettingMapper.java new file mode 100644 index 0000000..2ab746b --- /dev/null +++ b/flossom-common/flossom-common-hzMapper/src/main/java/com/flossom/hzMapper/mapper/WxOtherSettingMapper.java @@ -0,0 +1,62 @@ +package com.flossom.hzMapper.mapper; + +import com.flossom.common.core.domain.entity.WxOtherSetting; + +import java.util.List; + + +/** + * 其他配置Mapper接口 + * + * @author flossom + * @date 2023-12-13 + */ +public interface WxOtherSettingMapper { + /** + * 查询其他配置 + * + * @param id 其他配置主键 + * @return 其他配置 + */ + public WxOtherSetting selectWxOtherSettingById(Long id); + + /** + * 查询其他配置列表 + * + * @param wxOtherSetting 其他配置 + * @return 其他配置集合 + */ + public List selectWxOtherSettingList(WxOtherSetting wxOtherSetting); + + /** + * 新增其他配置 + * + * @param wxOtherSetting 其他配置 + * @return 结果 + */ + public int insertWxOtherSetting(WxOtherSetting wxOtherSetting); + + /** + * 修改其他配置 + * + * @param wxOtherSetting 其他配置 + * @return 结果 + */ + public int updateWxOtherSetting(WxOtherSetting wxOtherSetting); + + /** + * 删除其他配置 + * + * @param id 其他配置主键 + * @return 结果 + */ + public int deleteWxOtherSettingById(Long id); + + /** + * 批量删除其他配置 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteWxOtherSettingByIds(Long[] ids); +} diff --git a/flossom-common/flossom-common-hzMapper/src/main/resources/mapper/hzMapper/WxOtherSettingMapper.xml b/flossom-common/flossom-common-hzMapper/src/main/resources/mapper/hzMapper/WxOtherSettingMapper.xml new file mode 100644 index 0000000..484bbdb --- /dev/null +++ b/flossom-common/flossom-common-hzMapper/src/main/resources/mapper/hzMapper/WxOtherSettingMapper.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + select id, skip_appid, skip_path, sys_version, status, create_by, create_time, update_by, update_time, remark from wx_other_setting + + + + + + + + insert into wx_other_setting + + id, + skip_appid, + skip_path, + sys_version, + status, + create_by, + create_time, + update_by, + update_time, + remark, + + + #{id}, + #{skipAppid}, + #{skipPath}, + #{sysVersion}, + #{status}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + + update wx_other_setting + + skip_appid = #{skipAppid}, + skip_path = #{skipPath}, + sys_version = #{sysVersion}, + status = #{status}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where id = #{id} + + + + delete from wx_other_setting where id = #{id} + + + + delete from wx_other_setting where id in + + #{id} + + + \ No newline at end of file diff --git a/flossom-modules/flossom-mini-program/src/main/java/com/flossom/miniProgram/controller/SystemSettingController.java b/flossom-modules/flossom-mini-program/src/main/java/com/flossom/miniProgram/controller/SystemSettingController.java index 55a5426..137b9d3 100644 --- a/flossom-modules/flossom-mini-program/src/main/java/com/flossom/miniProgram/controller/SystemSettingController.java +++ b/flossom-modules/flossom-mini-program/src/main/java/com/flossom/miniProgram/controller/SystemSettingController.java @@ -90,4 +90,14 @@ public class SystemSettingController extends BaseController { return AjaxResult.success(systemSettingService.getContactWorker()); } + /** + * 获取 其他配置 + * + * @return + */ + @GetMapping("/getOtherSetting") + public AjaxResult getOtherSetting() { + return AjaxResult.success(systemSettingService.getOtherSetting()); + } + } diff --git a/flossom-modules/flossom-mini-program/src/main/java/com/flossom/miniProgram/service/ISystemSettingService.java b/flossom-modules/flossom-mini-program/src/main/java/com/flossom/miniProgram/service/ISystemSettingService.java index 0f52bad..24f0c0f 100644 --- a/flossom-modules/flossom-mini-program/src/main/java/com/flossom/miniProgram/service/ISystemSettingService.java +++ b/flossom-modules/flossom-mini-program/src/main/java/com/flossom/miniProgram/service/ISystemSettingService.java @@ -1,6 +1,7 @@ package com.flossom.miniProgram.service; +import com.flossom.common.core.domain.entity.WxOtherSetting; import com.flossom.common.core.domain.entity.WxSystemSetting; public interface ISystemSettingService { @@ -19,4 +20,5 @@ public interface ISystemSettingService { WxSystemSetting getContactWorker(); + WxOtherSetting getOtherSetting(); } diff --git a/flossom-modules/flossom-mini-program/src/main/java/com/flossom/miniProgram/service/impl/SystemSettingServiceImpl.java b/flossom-modules/flossom-mini-program/src/main/java/com/flossom/miniProgram/service/impl/SystemSettingServiceImpl.java index 7c6bbb6..8aa8052 100644 --- a/flossom-modules/flossom-mini-program/src/main/java/com/flossom/miniProgram/service/impl/SystemSettingServiceImpl.java +++ b/flossom-modules/flossom-mini-program/src/main/java/com/flossom/miniProgram/service/impl/SystemSettingServiceImpl.java @@ -1,7 +1,9 @@ package com.flossom.miniProgram.service.impl; +import com.flossom.common.core.domain.entity.WxOtherSetting; import com.flossom.common.core.domain.entity.WxSystemSetting; import com.flossom.hzMapper.Enums.SystemSettingKeyEnum; +import com.flossom.hzMapper.mapper.WxOtherSettingMapper; import com.flossom.hzMapper.mapper.WxSystemSettingMapper; import com.flossom.miniProgram.service.ISystemSettingService; import org.springframework.beans.factory.annotation.Autowired; @@ -13,6 +15,9 @@ public class SystemSettingServiceImpl implements ISystemSettingService { @Autowired private WxSystemSettingMapper systemSettingMapper; + @Autowired + private WxOtherSettingMapper wxOtherSettingMapper; + /** * 获取 用户协议 * @@ -83,4 +88,9 @@ public class SystemSettingServiceImpl implements ISystemSettingService { public WxSystemSetting getContactWorker() { return systemSettingMapper.getSystemSettingByKey(SystemSettingKeyEnum.CONTACT_WORKER.getKey()); } + + @Override + public WxOtherSetting getOtherSetting() { + return wxOtherSettingMapper.selectWxOtherSettingById(1L); + } } diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxOtherSettingController.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxOtherSettingController.java new file mode 100644 index 0000000..185e387 --- /dev/null +++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxOtherSettingController.java @@ -0,0 +1,99 @@ +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.WxOtherSetting; +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.IWxOtherSettingService; + +/** + * 其他配置Controller + * + * @author flossom + * @date 2023-12-13 + */ +@RestController +@RequestMapping("/otherSetting") +public class WxOtherSettingController extends BaseController { + @Autowired + private IWxOtherSettingService wxOtherSettingService; + + /** + * 查询其他配置列表 + */ + @RequiresPermissions("system:otherSetting:list") + @GetMapping("/list") + public TableDataInfo list(WxOtherSetting wxOtherSetting) { + startPage(); + List list = wxOtherSettingService.selectWxOtherSettingList(wxOtherSetting); + return getDataTable(list); + } + + /** + * 导出其他配置列表 + */ + @RequiresPermissions("system:otherSetting:export") + @Log(title = "其他配置", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, WxOtherSetting wxOtherSetting) { + List list = wxOtherSettingService.selectWxOtherSettingList(wxOtherSetting); + ExcelUtil util = new ExcelUtil(WxOtherSetting.class); + util.exportExcel(response, list, "其他配置数据"); + } + + /** + * 获取其他配置详细信息 + */ + @RequiresPermissions("system:otherSetting:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return success(wxOtherSettingService.selectWxOtherSettingById(id)); + } + + /** + * 新增其他配置 + */ + @RequiresPermissions("system:otherSetting:add") + @Log(title = "其他配置", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody WxOtherSetting wxOtherSetting) { + return toAjax(wxOtherSettingService.insertWxOtherSetting(wxOtherSetting)); + } + + /** + * 修改其他配置 + */ + @RequiresPermissions("system:otherSetting:edit") + @Log(title = "其他配置", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody WxOtherSetting wxOtherSetting) { + return toAjax(wxOtherSettingService.updateWxOtherSetting(wxOtherSetting)); + } + + /** + * 删除其他配置 + */ + @RequiresPermissions("system:otherSetting:remove") + @Log(title = "其他配置", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return toAjax(wxOtherSettingService.deleteWxOtherSettingByIds(ids)); + } +} diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxOtherSettingService.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxOtherSettingService.java new file mode 100644 index 0000000..7967e51 --- /dev/null +++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxOtherSettingService.java @@ -0,0 +1,61 @@ +package com.flossom.system.service; + +import com.flossom.common.core.domain.entity.WxOtherSetting; + +import java.util.List; + +/** + * 其他配置Service接口 + * + * @author flossom + * @date 2023-12-13 + */ +public interface IWxOtherSettingService { + /** + * 查询其他配置 + * + * @param id 其他配置主键 + * @return 其他配置 + */ + public WxOtherSetting selectWxOtherSettingById(Long id); + + /** + * 查询其他配置列表 + * + * @param wxOtherSetting 其他配置 + * @return 其他配置集合 + */ + public List selectWxOtherSettingList(WxOtherSetting wxOtherSetting); + + /** + * 新增其他配置 + * + * @param wxOtherSetting 其他配置 + * @return 结果 + */ + public int insertWxOtherSetting(WxOtherSetting wxOtherSetting); + + /** + * 修改其他配置 + * + * @param wxOtherSetting 其他配置 + * @return 结果 + */ + public int updateWxOtherSetting(WxOtherSetting wxOtherSetting); + + /** + * 批量删除其他配置 + * + * @param ids 需要删除的其他配置主键集合 + * @return 结果 + */ + public int deleteWxOtherSettingByIds(Long[] ids); + + /** + * 删除其他配置信息 + * + * @param id 其他配置主键 + * @return 结果 + */ + public int deleteWxOtherSettingById(Long id); +} diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxOtherSettingServiceImpl.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxOtherSettingServiceImpl.java new file mode 100644 index 0000000..542f517 --- /dev/null +++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxOtherSettingServiceImpl.java @@ -0,0 +1,90 @@ +package com.flossom.system.service.impl; + +import java.util.List; + +import com.flossom.common.core.domain.entity.WxOtherSetting; +import com.flossom.common.core.utils.DateUtils; +import com.flossom.hzMapper.mapper.WxOtherSettingMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.flossom.system.service.IWxOtherSettingService; + +/** + * 其他配置Service业务层处理 + * + * @author flossom + * @date 2023-12-13 + */ +@Service +public class WxOtherSettingServiceImpl implements IWxOtherSettingService { + @Autowired + private WxOtherSettingMapper wxOtherSettingMapper; + + /** + * 查询其他配置 + * + * @param id 其他配置主键 + * @return 其他配置 + */ + @Override + public WxOtherSetting selectWxOtherSettingById(Long id) { + return wxOtherSettingMapper.selectWxOtherSettingById(id); + } + + /** + * 查询其他配置列表 + * + * @param wxOtherSetting 其他配置 + * @return 其他配置 + */ + @Override + public List selectWxOtherSettingList(WxOtherSetting wxOtherSetting) { + return wxOtherSettingMapper.selectWxOtherSettingList(wxOtherSetting); + } + + /** + * 新增其他配置 + * + * @param wxOtherSetting 其他配置 + * @return 结果 + */ + @Override + public int insertWxOtherSetting(WxOtherSetting wxOtherSetting) { + wxOtherSetting.setCreateTime(DateUtils.getNowDate()); + return wxOtherSettingMapper.insertWxOtherSetting(wxOtherSetting); + } + + /** + * 修改其他配置 + * + * @param wxOtherSetting 其他配置 + * @return 结果 + */ + @Override + public int updateWxOtherSetting(WxOtherSetting wxOtherSetting) { + wxOtherSetting.setUpdateTime(DateUtils.getNowDate()); + return wxOtherSettingMapper.updateWxOtherSetting(wxOtherSetting); + } + + /** + * 批量删除其他配置 + * + * @param ids 需要删除的其他配置主键 + * @return 结果 + */ + @Override + public int deleteWxOtherSettingByIds(Long[] ids) { + return wxOtherSettingMapper.deleteWxOtherSettingByIds(ids); + } + + /** + * 删除其他配置信息 + * + * @param id 其他配置主键 + * @return 结果 + */ + @Override + public int deleteWxOtherSettingById(Long id) { + return wxOtherSettingMapper.deleteWxOtherSettingById(id); + } +} diff --git a/flossom-ui/src/api/system/otherSetting.js b/flossom-ui/src/api/system/otherSetting.js new file mode 100644 index 0000000..3f3708e --- /dev/null +++ b/flossom-ui/src/api/system/otherSetting.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询其他配置列表 +export function listOtherSetting(query) { + return request({ + url: '/system/otherSetting/list', + method: 'get', + params: query + }) +} + +// 查询其他配置详细 +export function getOtherSetting(id) { + return request({ + url: '/system/otherSetting/' + id, + method: 'get' + }) +} + +// 新增其他配置 +export function addOtherSetting(data) { + return request({ + url: '/system/otherSetting', + method: 'post', + data: data + }) +} + +// 修改其他配置 +export function updateOtherSetting(data) { + return request({ + url: '/system/otherSetting', + method: 'put', + data: data + }) +} + +// 删除其他配置 +export function delOtherSetting(id) { + return request({ + url: '/system/otherSetting/' + id, + method: 'delete' + }) +} diff --git a/flossom-ui/src/views/system/otherSetting/index.vue b/flossom-ui/src/views/system/otherSetting/index.vue new file mode 100644 index 0000000..9cbb290 --- /dev/null +++ b/flossom-ui/src/views/system/otherSetting/index.vue @@ -0,0 +1,285 @@ + + +