From f7967ec64c1109e0960d10f0931b31c1c7dcd499 Mon Sep 17 00:00:00 2001 From: "DESKTOP-369JRHT\\12997" <9> Date: Thu, 18 Jul 2024 14:24:58 +0800 Subject: [PATCH] banner --- fuintAdmin_zt/src/api/sys/app.js | 39 ++ fuintAdmin_zt/src/api/sys/banner.js | 37 ++ .../jiaoyiduizhang/list.vue | 122 ++++++ .../jiaoyiduizhang/tab/int.vue | 300 ++++++++++++++ .../jiaoyiduizhang/tab/oil.vue | 292 ++++++++++++++ .../jiaoyiduizhang/tab/store.vue | 299 ++++++++++++++ .../jiaoyiduizhang/tab/vip.vue | 292 ++++++++++++++ .../financialStatement/yunyingfenxi/list.vue | 122 ++++++ .../yunyingfenxi/tab/int.vue | 300 ++++++++++++++ .../yunyingfenxi/tab/oil.vue | 292 ++++++++++++++ .../yunyingfenxi/tab/store.vue | 299 ++++++++++++++ .../yunyingfenxi/tab/vip.vue | 292 ++++++++++++++ fuintAdmin_zt/src/views/setting/app/index.vue | 296 ++++++++++++++ .../src/views/setting/banner/index.vue | 373 ++++++++++++++++++ .../sys/controller/SysAppController.java | 93 +++++ .../sys/controller/SysBannerController.java | 93 +++++ .../com/fuint/business/sys/entity/SysApp.java | 68 ++++ .../fuint/business/sys/entity/SysBanner.java | 60 +++ .../business/sys/mapper/SysAppMapper.java | 85 ++++ .../business/sys/mapper/SysBannerMapper.java | 85 ++++ .../business/sys/mapper/xml/SysAppMapper.xml | 176 +++++++++ .../sys/mapper/xml/SysBannerMapper.xml | 156 ++++++++ .../business/sys/service/SysAppService.java | 58 +++ .../sys/service/SysBannerService.java | 58 +++ .../sys/service/impl/SysAppServiceImpl.java | 90 +++++ .../service/impl/SysBannerServiceImpl.java | 91 +++++ 26 files changed, 4468 insertions(+) create mode 100644 fuintAdmin_zt/src/api/sys/app.js create mode 100644 fuintAdmin_zt/src/api/sys/banner.js create mode 100644 fuintAdmin_zt/src/views/financialStatement/jiaoyiduizhang/list.vue create mode 100644 fuintAdmin_zt/src/views/financialStatement/jiaoyiduizhang/tab/int.vue create mode 100644 fuintAdmin_zt/src/views/financialStatement/jiaoyiduizhang/tab/oil.vue create mode 100644 fuintAdmin_zt/src/views/financialStatement/jiaoyiduizhang/tab/store.vue create mode 100644 fuintAdmin_zt/src/views/financialStatement/jiaoyiduizhang/tab/vip.vue create mode 100644 fuintAdmin_zt/src/views/financialStatement/yunyingfenxi/list.vue create mode 100644 fuintAdmin_zt/src/views/financialStatement/yunyingfenxi/tab/int.vue create mode 100644 fuintAdmin_zt/src/views/financialStatement/yunyingfenxi/tab/oil.vue create mode 100644 fuintAdmin_zt/src/views/financialStatement/yunyingfenxi/tab/store.vue create mode 100644 fuintAdmin_zt/src/views/financialStatement/yunyingfenxi/tab/vip.vue create mode 100644 fuintAdmin_zt/src/views/setting/app/index.vue create mode 100644 fuintAdmin_zt/src/views/setting/banner/index.vue create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/controller/SysAppController.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/controller/SysBannerController.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/entity/SysApp.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/entity/SysBanner.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/SysAppMapper.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/SysBannerMapper.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/xml/SysAppMapper.xml create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/xml/SysBannerMapper.xml create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/service/SysAppService.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/service/SysBannerService.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/service/impl/SysAppServiceImpl.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/service/impl/SysBannerServiceImpl.java diff --git a/fuintAdmin_zt/src/api/sys/app.js b/fuintAdmin_zt/src/api/sys/app.js new file mode 100644 index 000000000..b07e1c706 --- /dev/null +++ b/fuintAdmin_zt/src/api/sys/app.js @@ -0,0 +1,39 @@ +import request from '@/utils/request' + +// 分页查询所有的订单信息 +export function getAppListApi(query) { + return request({ + url: 'sys/sysApp/queryByPage', + method: 'get', + params: query + + }) +} + +// +export function deleteAppApi(AppId) { + return request({ + url: 'sys/sysApp/' + AppId, + method: 'delete' + + }) +} +// +export function saveAppApi(data) { + return request({ + url: 'sys/sysApp', + method: 'post', + data: data + }) +} + +// 保存修改信息 +export function updateAppApi(data) { + return request({ + url: 'sys/sysApp', + method: 'put', + data: data + }) +} + + diff --git a/fuintAdmin_zt/src/api/sys/banner.js b/fuintAdmin_zt/src/api/sys/banner.js new file mode 100644 index 000000000..e3a75d7a3 --- /dev/null +++ b/fuintAdmin_zt/src/api/sys/banner.js @@ -0,0 +1,37 @@ +import request from '@/utils/request' + +// 分页查询所有的订单信息 +export function getBannerListApi(query) { + return request({ + url: 'sys/sysBanner/queryByPage', + method: 'get', + params: query + }) +} + +// +export function deleteBannerApi(bannerId) { + return request({ + url: 'sys/sysBanner/' + bannerId, + method: 'delete' + }) +} +// +export function saveBannerApi(data) { + return request({ + url: 'sys/sysBanner', + method: 'post', + data: data + }) +} + +// 保存修改信息 +export function updateBannerApi(data) { + return request({ + url: 'sys/sysBanner', + method: 'put', + data: data + }) +} + + diff --git a/fuintAdmin_zt/src/views/financialStatement/jiaoyiduizhang/list.vue b/fuintAdmin_zt/src/views/financialStatement/jiaoyiduizhang/list.vue new file mode 100644 index 000000000..47174c979 --- /dev/null +++ b/fuintAdmin_zt/src/views/financialStatement/jiaoyiduizhang/list.vue @@ -0,0 +1,122 @@ + + + + + diff --git a/fuintAdmin_zt/src/views/financialStatement/jiaoyiduizhang/tab/int.vue b/fuintAdmin_zt/src/views/financialStatement/jiaoyiduizhang/tab/int.vue new file mode 100644 index 000000000..1152f8c3a --- /dev/null +++ b/fuintAdmin_zt/src/views/financialStatement/jiaoyiduizhang/tab/int.vue @@ -0,0 +1,300 @@ + + + + + + diff --git a/fuintAdmin_zt/src/views/financialStatement/jiaoyiduizhang/tab/oil.vue b/fuintAdmin_zt/src/views/financialStatement/jiaoyiduizhang/tab/oil.vue new file mode 100644 index 000000000..4974d61fc --- /dev/null +++ b/fuintAdmin_zt/src/views/financialStatement/jiaoyiduizhang/tab/oil.vue @@ -0,0 +1,292 @@ + + + + + + diff --git a/fuintAdmin_zt/src/views/financialStatement/jiaoyiduizhang/tab/store.vue b/fuintAdmin_zt/src/views/financialStatement/jiaoyiduizhang/tab/store.vue new file mode 100644 index 000000000..a613150cc --- /dev/null +++ b/fuintAdmin_zt/src/views/financialStatement/jiaoyiduizhang/tab/store.vue @@ -0,0 +1,299 @@ + + + + + + diff --git a/fuintAdmin_zt/src/views/financialStatement/jiaoyiduizhang/tab/vip.vue b/fuintAdmin_zt/src/views/financialStatement/jiaoyiduizhang/tab/vip.vue new file mode 100644 index 000000000..4014fd54b --- /dev/null +++ b/fuintAdmin_zt/src/views/financialStatement/jiaoyiduizhang/tab/vip.vue @@ -0,0 +1,292 @@ + + + + + + diff --git a/fuintAdmin_zt/src/views/financialStatement/yunyingfenxi/list.vue b/fuintAdmin_zt/src/views/financialStatement/yunyingfenxi/list.vue new file mode 100644 index 000000000..5eb6b6b66 --- /dev/null +++ b/fuintAdmin_zt/src/views/financialStatement/yunyingfenxi/list.vue @@ -0,0 +1,122 @@ + + + + + diff --git a/fuintAdmin_zt/src/views/financialStatement/yunyingfenxi/tab/int.vue b/fuintAdmin_zt/src/views/financialStatement/yunyingfenxi/tab/int.vue new file mode 100644 index 000000000..9bb19baab --- /dev/null +++ b/fuintAdmin_zt/src/views/financialStatement/yunyingfenxi/tab/int.vue @@ -0,0 +1,300 @@ + + + + + + diff --git a/fuintAdmin_zt/src/views/financialStatement/yunyingfenxi/tab/oil.vue b/fuintAdmin_zt/src/views/financialStatement/yunyingfenxi/tab/oil.vue new file mode 100644 index 000000000..14a820733 --- /dev/null +++ b/fuintAdmin_zt/src/views/financialStatement/yunyingfenxi/tab/oil.vue @@ -0,0 +1,292 @@ + + + + + + diff --git a/fuintAdmin_zt/src/views/financialStatement/yunyingfenxi/tab/store.vue b/fuintAdmin_zt/src/views/financialStatement/yunyingfenxi/tab/store.vue new file mode 100644 index 000000000..6b4c426c9 --- /dev/null +++ b/fuintAdmin_zt/src/views/financialStatement/yunyingfenxi/tab/store.vue @@ -0,0 +1,299 @@ + + + + + + diff --git a/fuintAdmin_zt/src/views/financialStatement/yunyingfenxi/tab/vip.vue b/fuintAdmin_zt/src/views/financialStatement/yunyingfenxi/tab/vip.vue new file mode 100644 index 000000000..ed91f4985 --- /dev/null +++ b/fuintAdmin_zt/src/views/financialStatement/yunyingfenxi/tab/vip.vue @@ -0,0 +1,292 @@ + + + + + + diff --git a/fuintAdmin_zt/src/views/setting/app/index.vue b/fuintAdmin_zt/src/views/setting/app/index.vue new file mode 100644 index 000000000..42cf1d562 --- /dev/null +++ b/fuintAdmin_zt/src/views/setting/app/index.vue @@ -0,0 +1,296 @@ + + + + + diff --git a/fuintAdmin_zt/src/views/setting/banner/index.vue b/fuintAdmin_zt/src/views/setting/banner/index.vue new file mode 100644 index 000000000..a43b49168 --- /dev/null +++ b/fuintAdmin_zt/src/views/setting/banner/index.vue @@ -0,0 +1,373 @@ + + + + + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/controller/SysAppController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/controller/SysAppController.java new file mode 100644 index 000000000..56e28efbc --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/controller/SysAppController.java @@ -0,0 +1,93 @@ +package com.fuint.business.sys.controller; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.fuint.business.sys.entity.SysApp; +import com.fuint.business.sys.service.SysAppService; +import com.fuint.framework.web.BaseController; +import com.fuint.framework.web.ResponseObject; +import org.springframework.web.bind.annotation.*; +import io.lettuce.core.dynamic.annotation.Param; + + +import javax.annotation.Resource; + +/** + * 小程序配置表(SysApp)表控制层 + * + * @author wangh + * @since 2024-07-16 16:46:31 + */ +@RestController +@RequestMapping("sys/sysApp") +public class SysAppController extends BaseController { + /** + * 服务对象 + */ + @Resource + private SysAppService sysAppService; + + /** + * 分页查询 + * + * @param sysApp 筛选条件 + * @param pageNo 分页对象 + * @return 查询结果 + */ + @GetMapping("queryByPage") + public ResponseObject queryByPage(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize, + @Param("sysApp") SysApp sysApp) { + Page page = new Page(pageNo, pageSize); + IPage< SysApp> iPageList = this.sysAppService.queryByPage(page, sysApp); + return getSuccessResult(iPageList); + } + + + + /** + * 通过主键查询单条数据 + * + * @param id 主键 + * @return 单条数据 + */ + @GetMapping("{id}") + public ResponseObject queryById(@PathVariable("id") Integer id) { + return getSuccessResult(this.sysAppService.queryById(id)); + } + + /** + * 新增数据 + * + * @param sysApp 实体 + * @return 新增结果 + */ + @PostMapping + public ResponseObject add(@RequestBody SysApp sysApp) { + return getSuccessResult(this.sysAppService.insert(sysApp)); + } + + /** + * 编辑数据 + * + * @param sysApp 实体 + * @return 编辑结果 + */ + @PutMapping + public ResponseObject edit(@RequestBody SysApp sysApp) { + return getSuccessResult(this.sysAppService.update(sysApp)); + } + + /** + * 删除数据 + * + * @param id 主键 + * @return 删除是否成功 + */ + @DeleteMapping("{id}") + public ResponseObject deleteById(@PathVariable("id") Integer id) { + return getSuccessResult(this.sysAppService.deleteById(id)); + } + +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/controller/SysBannerController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/controller/SysBannerController.java new file mode 100644 index 000000000..17021fe7f --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/controller/SysBannerController.java @@ -0,0 +1,93 @@ +package com.fuint.business.sys.controller; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.fuint.business.sys.entity.SysBanner; +import com.fuint.business.sys.service.SysBannerService; +import com.fuint.framework.web.BaseController; +import com.fuint.framework.web.ResponseObject; +import org.springframework.web.bind.annotation.*; +import io.lettuce.core.dynamic.annotation.Param; + + +import javax.annotation.Resource; + +/** + * 存储Banner信息的表(SysBanner)表控制层 + * + * @author wangh + * @since 2024-07-16 16:42:34 + */ +@RestController +@RequestMapping("sys/sysBanner") +public class SysBannerController extends BaseController { + /** + * 服务对象 + */ + @Resource + private SysBannerService sysBannerService; + + /** + * 分页查询 + * + * @param sysBanner 筛选条件 + * @param pageNo 分页对象 + * @return 查询结果 + */ + @GetMapping("queryByPage") + public ResponseObject queryByPage(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo, + @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize, + @Param("sysBanner") SysBanner sysBanner) { + Page page = new Page(pageNo, pageSize); + IPage< SysBanner> iPageList = this.sysBannerService.queryByPage(page, sysBanner); + return getSuccessResult(iPageList); + } + + + + /** + * 通过主键查询单条数据 + * + * @param id 主键 + * @return 单条数据 + */ + @GetMapping("{id}") + public ResponseObject queryById(@PathVariable("id") Integer id) { + return getSuccessResult(this.sysBannerService.queryById(id)); + } + + /** + * 新增数据 + * + * @param sysBanner 实体 + * @return 新增结果 + */ + @PostMapping + public ResponseObject add(@RequestBody SysBanner sysBanner) { + return getSuccessResult(this.sysBannerService.insert(sysBanner)); + } + + /** + * 编辑数据 + * + * @param sysBanner 实体 + * @return 编辑结果 + */ + @PutMapping + public ResponseObject edit(@RequestBody SysBanner sysBanner) { + return getSuccessResult(this.sysBannerService.update(sysBanner)); + } + + /** + * 删除数据 + * + * @param id 主键 + * @return 删除是否成功 + */ + @DeleteMapping("{id}") + public ResponseObject deleteById(@PathVariable("id") Integer id) { + return getSuccessResult(this.sysBannerService.deleteById(id)); + } + +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/entity/SysApp.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/entity/SysApp.java new file mode 100644 index 000000000..6e56d72fe --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/entity/SysApp.java @@ -0,0 +1,68 @@ +package com.fuint.business.sys.entity; + +import com.fuint.repository.model.base.BaseEntity; +import lombok.Data; + +/** + * 小程序配置表(SysApp)实体类 + * + * @author wangh + * @since 2024-07-16 16:46:31 + */ +@Data +public class SysApp extends BaseEntity { + private static final long serialVersionUID = -49243765149526047L; +/** + * 自增的主键,用于唯一标识每条记录 + */ + private Integer id; + private Integer storeId; +/** + * 机构名称,字符长度最多50,不能为空,且唯一 + */ + private String orgName; + private String deptId; // 机构id + private String appKey; // 密钥 +/** + * 统一社会信用代码,字符长度最多18,不能为空 + */ + private String unifiedSocialCreditCode; +/** + * 小程序appID,字符长度最多18,不能为空 + */ + private String appId; +/** + * 法人姓名,字符长度最多10,不能为空 + */ + private String legalRepresentativeName; + + /** + * 法人微信 + */ + private String legalRepresentativeWechat; + +/** + * 法人编号,字符长度最多30,可以为空 + */ + private String legalRepresentativeId; +/** + * 法人联系方式,字符长度最多20,可以为空 + */ + private String legalRepresentativeContact; +/** + * 小程序状态,枚举类型,可选值为"启用"和"停用",不能为空 + */ + private Boolean appStatus; + + + + private String createByName; + + + + + + + +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/entity/SysBanner.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/entity/SysBanner.java new file mode 100644 index 000000000..1ade4705a --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/entity/SysBanner.java @@ -0,0 +1,60 @@ +package com.fuint.business.sys.entity; + +import com.fuint.repository.model.base.BaseEntity; +import lombok.Data; + +/** + * 存储Banner信息的表(SysBanner)实体类 + * + * @author wangh + * @since 2024-07-16 16:42:34 + */ +@Data +public class SysBanner extends BaseEntity { + private static final long serialVersionUID = 132479844949819856L; +/** + * 自增 + */ + private Integer id; + private Integer storeId; +/** + * Banner名称,字符长度最多50,不能为空,且唯一 + */ + private String bannerName; +/** + * 商品图片,二进制数据类型,用于存储图片文件 + */ + private String productImage; +/** + * 系统位置,枚举类型,可选值为"首页"和"系统首页" + */ + private String systemPosition; +/** + * 排序号,整数类型,最大字符长度5,不能为空 + */ + private Integer sortOrder; +/** + * Banner链接,字符长度最多200,可以为空 + */ + private String bannerLink; +/** + * Banner状态,枚举类型,可选值为"启用"和"停用",不能为空 + */ + private Boolean bannerStatus; +/** + * 备注,字符长度最多200,可以为空 + */ + private String note; + + + private String createByName; + + + + + + + + +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/SysAppMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/SysAppMapper.java new file mode 100644 index 000000000..7a8ba0e4d --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/SysAppMapper.java @@ -0,0 +1,85 @@ +package com.fuint.business.sys.mapper; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.fuint.business.sys.entity.SysApp; +import org.apache.ibatis.annotations.Param; +import org.springframework.data.domain.Pageable; +import java.util.List; + +/** + * 小程序配置表(SysApp)表数据库访问层 + * + * @author wangh + * @since 2024-07-16 16:46:31 + */ +public interface SysAppMapper { + + /** + * 通过ID查询单条数据 + * + * @param id 主键 + * @return 实例对象 + */ + SysApp queryById(Integer id); + + /** + * 查询指定行数据 + * + * @param sysApp 查询条件 + * @param page 分页对象 + * @return 对象列表 + */ + IPage queryAllByLimit(@Param("page") Page page, @Param("sysApp")SysApp sysApp); + + /** + * 统计总行数 + * + * @param sysApp 查询条件 + * @return 总行数 + */ + long count(SysApp sysApp); + + /** + * 新增数据 + * + * @param sysApp 实例对象 + * @return 影响行数 + */ + int insert(@Param("sysApp") SysApp sysApp); + + /** + * 批量新增数据(MyBatis原生foreach方法) + * + * @param entities List 实例对象列表 + * @return 影响行数 + */ + int insertBatch(@Param("entities") List entities); + + /** + * 批量新增或按主键更新数据(MyBatis原生foreach方法) + * + * @param entities List 实例对象列表 + * @return 影响行数 + * @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参 + */ + int insertOrUpdateBatch(@Param("entities") List entities); + + /** + * 修改数据 + * + * @param sysApp 实例对象 + * @return 影响行数 + */ + int update(SysApp sysApp); + + /** + * 通过主键删除数据 + * + * @param id 主键 + * @return 影响行数 + */ + int deleteById(Integer id); + +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/SysBannerMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/SysBannerMapper.java new file mode 100644 index 000000000..79588a3ec --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/SysBannerMapper.java @@ -0,0 +1,85 @@ +package com.fuint.business.sys.mapper; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.fuint.business.sys.entity.SysBanner; +import org.apache.ibatis.annotations.Param; +import org.springframework.data.domain.Pageable; +import java.util.List; + +/** + * 存储Banner信息的表(SysBanner)表数据库访问层 + * + * @author wangh + * @since 2024-07-16 16:42:34 + */ +public interface SysBannerMapper { + + /** + * 通过ID查询单条数据 + * + * @param id 主键 + * @return 实例对象 + */ + SysBanner queryById(Integer id); + + /** + * 查询指定行数据 + * + * @param sysBanner 查询条件 + * @param page 分页对象 + * @return 对象列表 + */ + IPage queryAllByLimit(@Param("page") Page page, @Param("sysBanner") SysBanner sysBanner); + + /** + * 统计总行数 + * + * @param sysBanner 查询条件 + * @return 总行数 + */ + long count(SysBanner sysBanner); + + /** + * 新增数据 + * + * @param sysBanner 实例对象 + * @return 影响行数 + */ + int insert(@Param("sysBanner") SysBanner sysBanner); + + /** + * 批量新增数据(MyBatis原生foreach方法) + * + * @param entities List 实例对象列表 + * @return 影响行数 + */ + int insertBatch(@Param("entities") List entities); + + /** + * 批量新增或按主键更新数据(MyBatis原生foreach方法) + * + * @param entities List 实例对象列表 + * @return 影响行数 + * @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参 + */ + int insertOrUpdateBatch(@Param("entities") List entities); + + /** + * 修改数据 + * + * @param sysBanner 实例对象 + * @return 影响行数 + */ + int update(SysBanner sysBanner); + + /** + * 通过主键删除数据 + * + * @param id 主键 + * @return 影响行数 + */ + int deleteById(Integer id); + +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/xml/SysAppMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/xml/SysAppMapper.xml new file mode 100644 index 000000000..cc7926e03 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/xml/SysAppMapper.xml @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + insert into sys_app(org_name, + unified_social_credit_code, + app_id, + legal_representative_name, + legal_representative_id, + legal_representative_contact, + legal_representative_wechat, + app_key, + app_status) + values (#{sysApp.orgName}, + #{sysApp.unifiedSocialCreditCode}, + #{sysApp.appId}, + #{sysApp.legalRepresentativeName}, + #{sysApp.legalRepresentativeId}, + #{sysApp.legalRepresentativeContact}, + #{sysApp.legalRepresentativeWechat}, + #{sysApp.appKey}, + #{sysApp.appStatus}) + + + + insert into sys_app(org_name,unified_social_credit_code,app_id,legal_representative_name, +legal_representative_id,legal_representative_contact.app_status) + values + + (#{entity.orgName}#{entity.unifiedSocialCreditCode}#{entity.appId}#{entity.legalRepresentativeName}#{entity.legalRepresentativeId}#{entity.legalRepresentativeContact}#{entity.appStatus}) + + + + + insert into sys_app(org_name,unified_social_credit_code,app_id,legal_representative_name, +legal_representative_id,legal_representative_contact.app_status) + values + + (#{entity.orgName}#{entity.unifiedSocialCreditCode}#{entity.appId}#{entity.legalRepresentativeName}#{entity.legalRepresentativeId}#{entity.legalRepresentativeContact}#{entity.appStatus}) + + on duplicate key update +org_name = values(org_name)unified_social_credit_code = values(unified_social_credit_code)app_id = values(app_id)legal_representative_name = values(legal_representative_name)legal_representative_id = values(legal_representative_id)legal_representative_contact = values(legal_representative_contact)app_status = values(app_status) + + + + + update sys_app + + + org_name = #{orgName}, + + + unified_social_credit_code = #{unifiedSocialCreditCode}, + + + app_id = #{appId}, + + + legal_representative_name = #{legalRepresentativeName}, + + + legal_representative_id = #{legalRepresentativeId}, + + + legal_representative_contact = #{legalRepresentativeContact}, + + + legal_representative_wechat = #{legalRepresentativeWeChat}, + + + key = #{key}, + + + app_status = #{appStatus}, + + + where id = #{id} + + + + + delete from sys_app where id = #{id} + + + + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/xml/SysBannerMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/xml/SysBannerMapper.xml new file mode 100644 index 000000000..d09e7d6e1 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/xml/SysBannerMapper.xml @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + insert into sys_banner(banner_name,product_image,system_position,sort_order,banner_link,banner_status,note) + values (#{sysBanner.bannerName}, + #{sysBanner.productImage}, + #{sysBanner.systemPosition}, + #{sysBanner.sortOrder}, + #{sysBanner.bannerLink}, + #{sysBanner.bannerStatus}, + #{sysBanner.note}) + + + + insert into sys_banner(banner_name,product_image,system_position,sort_order,banner_link,banner_status,note) + values + + (#{entity.bannerName},#{entity.productImage},#{entity.systemPosition}#{entity.sortOrder}#{entity.bannerLink}#{entity.bannerStatus}#{entity.note}) + + + + + insert into sys_banner(banner_name,product_image,system_position,sort_order,banner_link,banner_status,note) + values + + (#{entity.bannerName}#{entity.productImage}#{entity.systemPosition}#{entity.sortOrder}#{entity.bannerLink}#{entity.bannerStatus}#{entity.note}) + + on duplicate key update +banner_name = values(banner_name)product_image = values(product_image)system_position = values(system_position)sort_order = values(sort_order)banner_link = values(banner_link)banner_status = values(banner_status)note = values(note) + + + + + update sys_banner + + + banner_name = #{bannerName}, + + + product_image = #{productImage}, + + + system_position = #{systemPosition}, + + + sort_order = #{sortOrder}, + + + banner_link = #{bannerLink}, + + + banner_status = #{bannerStatus}, + + + note = #{note}, + + + where id = #{id} + + + + + delete from sys_banner where id = #{id} + + + + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/service/SysAppService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/service/SysAppService.java new file mode 100644 index 000000000..8b71666dd --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/service/SysAppService.java @@ -0,0 +1,58 @@ +package com.fuint.business.sys.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.fuint.business.sys.entity.SysApp; +import io.lettuce.core.dynamic.annotation.Param; + + +/** + * 小程序配置表(SysApp)表服务接口 + * + * @author wangh + * @since 2024-07-16 16:46:31 + */ +public interface SysAppService { + + /** + * 通过ID查询单条数据 + * + * @param id 主键 + * @return 实例对象 + */ + SysApp queryById(Integer id); + + /** + * 分页查询 + * + * @param sysApp 筛选条件 + * @param page 分页对象 + * @return 查询结果 + */ + IPage queryByPage(@Param("page") Page page, SysApp sysApp); + + /** + * 新增数据 + * + * @param sysApp 实例对象 + * @return 实例对象 + */ + SysApp insert(SysApp sysApp); + + /** + * 修改数据 + * + * @param sysApp 实例对象 + * @return 实例对象 + */ + SysApp update(SysApp sysApp); + + /** + * 通过主键删除数据 + * + * @param id 主键 + * @return 是否成功 + */ + boolean deleteById(Integer id); + +} diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/service/SysBannerService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/service/SysBannerService.java new file mode 100644 index 000000000..93b9f264f --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/service/SysBannerService.java @@ -0,0 +1,58 @@ +package com.fuint.business.sys.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.fuint.business.sys.entity.SysBanner; +import io.lettuce.core.dynamic.annotation.Param; + + +/** + * 存储Banner信息的表(SysBanner)表服务接口 + * + * @author wangh + * @since 2024-07-16 16:42:34 + */ +public interface SysBannerService { + + /** + * 通过ID查询单条数据 + * + * @param id 主键 + * @return 实例对象 + */ + SysBanner queryById(Integer id); + + /** + * 分页查询 + * + * @param sysBanner 筛选条件 + * @param page 分页对象 + * @return 查询结果 + */ + IPage queryByPage(@Param("page") Page page, SysBanner sysBanner); + + /** + * 新增数据 + * + * @param sysBanner 实例对象 + * @return 实例对象 + */ + SysBanner insert(SysBanner sysBanner); + + /** + * 修改数据 + * + * @param sysBanner 实例对象 + * @return 实例对象 + */ + SysBanner update(SysBanner sysBanner); + + /** + * 通过主键删除数据 + * + * @param id 主键 + * @return 是否成功 + */ + boolean deleteById(Integer id); + +} diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/service/impl/SysAppServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/service/impl/SysAppServiceImpl.java new file mode 100644 index 000000000..340c61b98 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/service/impl/SysAppServiceImpl.java @@ -0,0 +1,90 @@ +package com.fuint.business.sys.service.impl; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.fuint.business.sys.entity.SysApp; +import com.fuint.business.sys.mapper.SysAppMapper; +import com.fuint.business.sys.service.SysAppService; +import org.springframework.stereotype.Service; +import com.fuint.common.util.TokenUtil; +import io.lettuce.core.dynamic.annotation.Param; +import com.fuint.common.dto.AccountInfo; + + + +import javax.annotation.Resource; + +/** + * 小程序配置表(SysApp)表服务实现类 + * + * @author wangh + * @since 2024-07-16 16:46:31 + */ +@Service("sysAppService") +public class SysAppServiceImpl implements SysAppService { + @Resource + private SysAppMapper sysAppMapper; + + /** + * 通过ID查询单条数据 + * + * @param id 主键 + * @return 实例对象 + */ + @Override + public SysApp queryById(Integer id) { + return this.sysAppMapper.queryById(id); + } + + /** + * 分页查询 + * + * @param sysApp 筛选条件 + * @param page 分页对象 + * @return 查询结果 + */ + @Override + public IPage queryByPage(@Param("page") Page page, SysApp sysApp) { + AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); +// sysApp.setStoreId(nowAccountInfo.getStoreId()); + return this.sysAppMapper.queryAllByLimit(page, sysApp); + } + + /** + * 新增数据 + * + * @param sysApp 实例对象 + * @return 实例对象 + */ + @Override + public SysApp insert(SysApp sysApp) { + AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); +// sysApp.setStoreId(nowAccountInfo.getStoreId()); + sysApp.setCreateByName(nowAccountInfo.getRealName()); + this.sysAppMapper.insert(sysApp); + return sysApp; + } + + /** + * 修改数据 + * + * @param sysApp 实例对象 + * @return 实例对象 + */ + @Override + public SysApp update(SysApp sysApp) { + this.sysAppMapper.update(sysApp); + return this.queryById(sysApp.getId()); + } + + /** + * 通过主键删除数据 + * + * @param id 主键 + * @return 是否成功 + */ + @Override + public boolean deleteById(Integer id) { + return this.sysAppMapper.deleteById(id) > 0; + } +} diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/service/impl/SysBannerServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/service/impl/SysBannerServiceImpl.java new file mode 100644 index 000000000..ef2147f9f --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/service/impl/SysBannerServiceImpl.java @@ -0,0 +1,91 @@ +package com.fuint.business.sys.service.impl; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.fuint.business.sys.entity.SysBanner; +import com.fuint.business.sys.mapper.SysBannerMapper; +import com.fuint.business.sys.service.SysBannerService; +import org.springframework.stereotype.Service; +import com.fuint.common.util.TokenUtil; +import io.lettuce.core.dynamic.annotation.Param; +import com.fuint.common.dto.AccountInfo; + + + +import javax.annotation.Resource; + +/** + * 存储Banner信息的表(SysBanner)表服务实现类 + * + * @author wangh + * @since 2024-07-16 16:42:34 + */ +@Service("sysBannerService") +public class SysBannerServiceImpl implements SysBannerService { + @Resource + private SysBannerMapper sysBannerMapper; + + /** + * 通过ID查询单条数据 + * + * @param id 主键 + * @return 实例对象 + */ + @Override + public SysBanner queryById(Integer id) { + return this.sysBannerMapper.queryById(id); + } + + /** + * 分页查询 + * + * @param sysBanner 筛选条件 + * @param page 分页对象 + * @return 查询结果 + */ + @Override + public IPage queryByPage(@Param("page") Page page, SysBanner sysBanner) { + AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); +// sysBanner.setStoreId(nowAccountInfo.getStoreId()); + return this.sysBannerMapper.queryAllByLimit(page, sysBanner); + } + + /** + * 新增数据 + * + * @param sysBanner 实例对象 + * @return 实例对象 + */ + @Override + public SysBanner insert(SysBanner sysBanner) { + AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); + sysBanner.setStoreId(nowAccountInfo.getStoreId()); + sysBanner.setCreateByName(nowAccountInfo.getRealName()); + + this.sysBannerMapper.insert(sysBanner); + return sysBanner; + } + + /** + * 修改数据 + * + * @param sysBanner 实例对象 + * @return 实例对象 + */ + @Override + public SysBanner update(SysBanner sysBanner) { + this.sysBannerMapper.update(sysBanner); + return this.queryById(sysBanner.getId()); + } + + /** + * 通过主键删除数据 + * + * @param id 主键 + * @return 是否成功 + */ + @Override + public boolean deleteById(Integer id) { + return this.sysBannerMapper.deleteById(id) > 0; + } +}