From 8de926df8f4323336d3982e248a288d7165bb94c Mon Sep 17 00:00:00 2001 From: du <1725534722@qq.com> Date: Fri, 29 Nov 2024 13:11:09 +0800 Subject: [PATCH] =?UTF-8?q?4=E5=BC=A0=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tc/controller/AssetAppController.java | 159 +++++++++++++++++ .../tc/controller/AssetEmailController.java | 157 +++++++++++++++++ .../AssetMiniProgramsController.java | 159 +++++++++++++++++ .../AssetOfficialAccountController.java | 160 ++++++++++++++++++ .../ruoyi/tc/controller/UnitController.java | 3 +- .../java/com/ruoyi/tc/entity/AssetApp.java | 4 + .../java/com/ruoyi/tc/entity/AssetEmail.java | 15 +- .../ruoyi/tc/entity/AssetMiniPrograms.java | 61 +++---- .../ruoyi/tc/entity/AssetOfficialAccount.java | 7 +- .../entity/request/AssetAppPageRequest.java | 53 ++++++ .../entity/request/AssetEmailPageRequest.java | 53 ++++++ .../request/AssetMiniProgramsPageRequest.java | 53 ++++++ .../AssetOfficialAccountPageRequest.java | 53 ++++++ .../com/ruoyi/tc/mapper/AssetAppMapper.java | 45 +++++ .../com/ruoyi/tc/mapper/AssetEmailMapper.java | 45 +++++ .../tc/mapper/AssetMiniProgramsMapper.java | 46 +++++ .../tc/mapper/AssetOfficialAccountMapper.java | 45 +++++ .../com/ruoyi/tc/service/AssetAppService.java | 39 +++++ .../ruoyi/tc/service/AssetEmailService.java | 40 +++++ .../tc/service/AssetMiniProgramsService.java | 39 +++++ .../service/AssetOfficialAccountService.java | 38 +++++ .../tc/service/impl/AssetAppServiceImpl.java | 52 ++++++ .../service/impl/AssetEmailServiceImpl.java | 52 ++++++ .../impl/AssetMiniProgramsServiceImpl.java | 52 ++++++ .../impl/AssetOfficialAccountServiceImpl.java | 52 ++++++ .../main/resources/mapper/AssetAppMapper.xml | 30 ++++ .../resources/mapper/AssetEmailMapper.xml | 30 ++++ .../mapper/AssetMiniProgramsMapper.xml | 30 ++++ .../mapper/AssetOfficialAccountMapper.xml | 30 ++++ 29 files changed, 1555 insertions(+), 47 deletions(-) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetAppController.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetEmailController.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetMiniProgramsController.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetOfficialAccountController.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetAppPageRequest.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetEmailPageRequest.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetMiniProgramsPageRequest.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetOfficialAccountPageRequest.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetAppMapper.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetEmailMapper.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetMiniProgramsMapper.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetOfficialAccountMapper.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetAppService.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetEmailService.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetMiniProgramsService.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetOfficialAccountService.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetAppServiceImpl.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetEmailServiceImpl.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetMiniProgramsServiceImpl.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetOfficialAccountServiceImpl.java create mode 100644 ruoyi-admin/src/main/resources/mapper/AssetAppMapper.xml create mode 100644 ruoyi-admin/src/main/resources/mapper/AssetEmailMapper.xml create mode 100644 ruoyi-admin/src/main/resources/mapper/AssetMiniProgramsMapper.xml create mode 100644 ruoyi-admin/src/main/resources/mapper/AssetOfficialAccountMapper.xml diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetAppController.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetAppController.java new file mode 100644 index 0000000..09e2a83 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetAppController.java @@ -0,0 +1,159 @@ +package com.ruoyi.tc.controller; + + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.exception.ServiceException; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.tc.entity.AssetApp; +import com.ruoyi.tc.entity.request.AssetAppPageRequest; +import com.ruoyi.tc.service.AssetAppService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +import static com.ruoyi.common.core.domain.AjaxResult.success; + +/** + * 资产移动应用程序表(asset_app)表控制层 + * + * @author makejava + * @since 2024-11-28 17:13:05 + */ +@Api(tags = "资产移动应用程序表控制层") +@RestController +@RequestMapping("/tc/assetApp") +public class AssetAppController extends BaseController { + /** + * 服务对象 + */ + @Resource + private AssetAppService assetAppService; + + /** + * 分页查询 + * + * @param req 分页对象 + * @return 查询结果 + */ + @ApiOperation(value = "分页查询") + @GetMapping + public AjaxResult queryByPage(AssetAppPageRequest req) { + Page page = new Page<>(); + page.setCurrent(req.getCurrent()); + page.setSize(req.getSize()); + return success(assetAppService.page(page, req)); + } + + /** + * 通过主键查询单条app数据 + * + * @param id 主键 + * @return 单条数据 + */ + @ApiOperation(value = "通过主键查询单条app数据") + @GetMapping("/{id}") + public AjaxResult queryById(@PathVariable("id") Long id) { + return success(assetAppService.getById(id)); + } + + /** + * 新增数据 + * + * @param assetApp 实体 + * @return 新增结果 + */ + @ApiOperation(value = "新增数据") + @PostMapping + @Log(title = "新增app数据", businessType = BusinessType.INSERT) + public AjaxResult add(@RequestBody AssetApp assetApp) { + return success(assetAppService.save(assetApp)); + } + + /** + * 编辑数据 + * + * @param assetApp 实体 + * @return 编辑结果 + */ + @ApiOperation(value = "编辑数据") + @Log(title = "编辑app数据", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(AssetApp assetApp) { + return success(assetAppService.updateById(assetApp)); + } + + /** + * 删除数据 + * + * @param id 主键 + * @return 删除是否成功 + */ + @ApiOperation(value = "删除数据") + @Log(title = "删除app数据", businessType = BusinessType.DELETE) + @DeleteMapping("/{id}") + public AjaxResult deleteById(@PathVariable Long id) { + assetAppService.deleteById(id); + return success(); + } + + /** + * 下载资产导入模板 + */ + @ApiOperation(value = "下载App导入模板") + @PostMapping("/importTemplate") + public void importTemplate(HttpServletResponse response) { + ExcelUtil util = new ExcelUtil<>(AssetApp.class); + util.importTemplateExcel(response, "App导入模板"); + } + + /** + * app导出 + */ + @Transactional(rollbackFor = Exception.class) + @ApiOperation(value = "app导出") + @Log(title = "app导出", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, AssetAppPageRequest unit) { + List list = assetAppService.getAllList(unit); + ExcelUtil util = new ExcelUtil<>(AssetApp.class); + util.exportExcel(response, list, "app数据"); + } + + /** + * app导入 + */ + @Transactional(rollbackFor = Exception.class) + @ApiOperation(value = "app导入") + @Log(title = "app导入", businessType = BusinessType.IMPORT) + @PostMapping("/importData") + public AjaxResult importData(MultipartFile file) throws Exception { + ExcelUtil util = new ExcelUtil<>(AssetApp.class); + List list = util.importExcel(file.getInputStream()); + if (list != null) { + list.forEach(x->{ + AssetApp one = assetAppService.lambdaQuery().eq(AssetApp::getSsdw, x.getSsdw()) + .eq(AssetApp::getAppName, x.getAppName()).one(); + if(one!=null){ + x.setId(one.getId()); + assetAppService.updateById(x); + }else { + assetAppService.save(x); + } + }); + } else { + throw new ServiceException("app导入数据不能为空!"); + } + return AjaxResult.success("导入成功"); + } +} + diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetEmailController.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetEmailController.java new file mode 100644 index 0000000..26f7cbb --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetEmailController.java @@ -0,0 +1,157 @@ +package com.ruoyi.tc.controller; + + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.exception.ServiceException; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.tc.entity.AssetEmail; +import com.ruoyi.tc.entity.request.AssetEmailPageRequest; +import com.ruoyi.tc.service.AssetEmailService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 电子邮件资产表(asset_email)表控制层 + * + * @author makejava + * @since 2024-11-28 17:13:05 + */ +@Api(tags = "电子邮件资产") +@RestController +@RequestMapping("/tc/assetEmail") +public class AssetEmailController extends BaseController { + /** + * 服务对象 + */ + @Resource + private AssetEmailService assetEmailService; + + /** + * 分页查询 + * + * @param req 分页对象 + * @return 查询结果 + */ + @ApiOperation(value = "分页查询") + @GetMapping + public AjaxResult queryByPage(AssetEmailPageRequest req) { + Page page = new Page<>(); + page.setCurrent(req.getCurrent()); + page.setSize(req.getSize()); + return success(assetEmailService.page(page, req)); + } + + /** + * 通过主键查询单条email数据 + * + * @param id 主键 + * @return 单条数据 + */ + @ApiOperation(value = "通过主键查询单条email数据") + @GetMapping("/{id}") + public AjaxResult queryById(@PathVariable("id") Long id) { + return success(assetEmailService.getById(id)); + } + + /** + * 新增email数据 + * + * @param assetEmail 实体 + * @return 新增结果 + */ + @ApiOperation(value = "新增email数据") + @PostMapping + @Log(title = "新增email数据", businessType = BusinessType.INSERT) + public AjaxResult add(@RequestBody AssetEmail assetEmail) { + return success(assetEmailService.save(assetEmail)); + } + + /** + * 编辑email数据 + * + * @param assetEmail 实体 + * @return 编辑结果 + */ + @ApiOperation(value = "编辑email数据") + @Log(title = "编辑email数据", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(AssetEmail assetEmail) { + return success(assetEmailService.updateById(assetEmail)); + } + + /** + * 删除email数据 + * + * @param id 主键 + * @return 删除是否成功 + */ + @ApiOperation(value = "删除email数据") + @Log(title = "删除email数据", businessType = BusinessType.DELETE) + @DeleteMapping("/{id}") + public AjaxResult deleteById(@PathVariable Long id) { + assetEmailService.deleteById(id); + return success(); + } + + /** + * 下载email导入模板 + */ + @ApiOperation(value = "下载email导入模板") + @PostMapping("/importTemplate") + public void importTemplate(HttpServletResponse response) { + ExcelUtil util = new ExcelUtil<>(AssetEmail.class); + util.importTemplateExcel(response, "email导入模板"); + } + + /** + * email导出 + */ + @Transactional(rollbackFor = Exception.class) + @ApiOperation(value = "email导出") + @Log(title = "email导出", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, AssetEmailPageRequest unit) { + List list = assetEmailService.getAllList(unit); + ExcelUtil util = new ExcelUtil<>(AssetEmail.class); + util.exportExcel(response, list, "email数据"); + } + + /** + * app导入 + */ + @Transactional(rollbackFor = Exception.class) + @ApiOperation(value = "email导入") + @Log(title = "email导入", businessType = BusinessType.IMPORT) + @PostMapping("/importData") + public AjaxResult importData(MultipartFile file) throws Exception { + ExcelUtil util = new ExcelUtil<>(AssetEmail.class); + List list = util.importExcel(file.getInputStream()); + if (list != null) { + list.forEach(x->{ + AssetEmail one = assetEmailService.lambdaQuery().eq(AssetEmail::getDzyxhz, x.getDzyxhz()) + .eq(AssetEmail::getSsdw, x.getSsdw()).one(); + if(one!=null){ + x.setId(one.getId()); + assetEmailService.updateById(x); + }else { + assetEmailService.save(x); + } + }); + } else { + throw new ServiceException("email导入数据不能为空!"); + } + return AjaxResult.success("导入成功"); + } +} + diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetMiniProgramsController.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetMiniProgramsController.java new file mode 100644 index 0000000..b831f0c --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetMiniProgramsController.java @@ -0,0 +1,159 @@ +package com.ruoyi.tc.controller; + + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.exception.ServiceException; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.tc.entity.AssetMiniPrograms; +import com.ruoyi.tc.entity.request.AssetMiniProgramsPageRequest; +import com.ruoyi.tc.service.AssetMiniProgramsService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +import static com.ruoyi.common.core.domain.AjaxResult.success; + +/** + * 小程序资产表(asset_mini_programs)表控制层 + * + * @author makejava + * @since 2024-11-28 17:13:05 + */ +@Api(tags = "小程序资产") +@RestController +@RequestMapping("/tc/miniPrograms") +public class AssetMiniProgramsController extends BaseController { + /** + * 服务对象 + */ + @Resource + private AssetMiniProgramsService assetMiniProgramsService; + + /** + * 分页查询 + * + * @param req 分页对象 + * @return 查询结果 + */ + @ApiOperation(value = "分页查询") + @GetMapping + public AjaxResult queryByPage(AssetMiniProgramsPageRequest req) { + Page page = new Page<>(); + page.setCurrent(req.getCurrent()); + page.setSize(req.getSize()); + return success(assetMiniProgramsService.page(page, req)); + } + + /** + * 通过主键查询单条小程序数据 + * + * @param id 主键 + * @return 单条数据 + */ + @ApiOperation(value = "通过主键查询单条小程序数据") + @GetMapping("/{id}") + public AjaxResult queryById(@PathVariable("id") Long id) { + return success(assetMiniProgramsService.getById(id)); + } + + /** + * 新增小程序数据 + * + * @param assetMiniPrograms 实体 + * @return 新增结果 + */ + @ApiOperation(value = "新增小程序数据") + @PostMapping + @Log(title = "新增小程序数据", businessType = BusinessType.INSERT) + public AjaxResult add(@RequestBody AssetMiniPrograms assetMiniPrograms) { + return success(assetMiniProgramsService.save(assetMiniPrograms)); + } + + /** + * 编辑小程序数据 + * + * @param assetMiniPrograms 实体 + * @return 编辑结果 + */ + @ApiOperation(value = "编辑小程序数据") + @Log(title = "编辑小程序数据", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(AssetMiniPrograms assetMiniPrograms) { + return success(assetMiniProgramsService.updateById(assetMiniPrograms)); + } + + /** + * 删除小程序数据 + * + * @param id 主键 + * @return 删除是否成功 + */ + @ApiOperation(value = "删除小程序数据") + @Log(title = "删除小程序数据", businessType = BusinessType.DELETE) + @DeleteMapping("/{id}") + public AjaxResult deleteById(@PathVariable Long id) { + assetMiniProgramsService.deleteById(id); + return success(); + } + + /** + * 下载资产导入模板 + */ + @ApiOperation(value = "下载App导入模板") + @PostMapping("/importTemplate") + public void importTemplate(HttpServletResponse response) { + ExcelUtil util = new ExcelUtil<>(AssetMiniPrograms.class); + util.importTemplateExcel(response, "App导入模板"); + } + + /** + * 小程序导出 + */ + @Transactional(rollbackFor = Exception.class) + @ApiOperation(value = "小程序导出") + @Log(title = "小程序导出", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, AssetMiniProgramsPageRequest unit) { + List list = assetMiniProgramsService.getAllList(unit); + ExcelUtil util = new ExcelUtil<>(AssetMiniPrograms.class); + util.exportExcel(response, list, "小程序数据"); + } + + /** + * 小程序导入 + */ + @Transactional(rollbackFor = Exception.class) + @ApiOperation(value = "小程序导入") + @Log(title = "小程序导入", businessType = BusinessType.IMPORT) + @PostMapping("/importData") + public AjaxResult importData(MultipartFile file) throws Exception { + ExcelUtil util = new ExcelUtil<>(AssetMiniPrograms.class); + List list = util.importExcel(file.getInputStream()); + if (list != null) { + list.forEach(x->{ + AssetMiniPrograms one = assetMiniProgramsService.lambdaQuery().eq(AssetMiniPrograms::getSsdw, x.getSsdw()) + .eq(AssetMiniPrograms::getXcxmc, x.getXcxmc()).one(); + if(one!=null){ + x.setId(one.getId()); + assetMiniProgramsService.updateById(x); + }else { + assetMiniProgramsService.save(x); + } + }); + } else { + throw new ServiceException("小程序导入数据不能为空!"); + } + return AjaxResult.success("导入成功"); + } +} + diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetOfficialAccountController.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetOfficialAccountController.java new file mode 100644 index 0000000..d36a78f --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/AssetOfficialAccountController.java @@ -0,0 +1,160 @@ +package com.ruoyi.tc.controller; + + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.exception.ServiceException; +import com.ruoyi.common.utils.SecurityUtils; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.tc.entity.AssetOfficialAccount; +import com.ruoyi.tc.entity.request.AssetOfficialAccountPageRequest; +import com.ruoyi.tc.service.AssetOfficialAccountService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; +import java.security.Security; +import java.util.List; + +import static com.ruoyi.common.core.domain.AjaxResult.success; + +/** + * 公众号资产(asset_official_account)表控制层 + * + * @author makejava + * @since 2024-11-28 17:13:05 + */ +@Api(tags = "公众号资产") +@RestController +@RequestMapping("/tc/assetOfficialAccount") +public class AssetOfficialAccountController { + /** + * 服务对象 + */ + @Resource + private AssetOfficialAccountService assetOfficialAccountService; + + /** + * 分页查询 + * + * @param req 分页对象 + * @return 查询结果 + */ + @ApiOperation(value = "分页查询") + @GetMapping + public AjaxResult queryByPage(AssetOfficialAccountPageRequest req) { + Page page = new Page<>(); + page.setCurrent(req.getCurrent()); + page.setSize(req.getSize()); + return success(assetOfficialAccountService.page(page, req)); + } + + /** + * 通过主键查询单条公众号数据 + * + * @param id 主键 + * @return 单条数据 + */ + @ApiOperation(value = "通过主键查询单条公众号数据") + @GetMapping("/{id}") + public AjaxResult queryById(@PathVariable("id") Long id) { + return success(assetOfficialAccountService.getById(id)); + } + + /** + * 新增公众号数据 + * + * @param assetOfficialAccount 实体 + * @return 新增结果 + */ + @ApiOperation(value = "新增公众号数据") + @PostMapping + @Log(title = "新增公众号数据", businessType = BusinessType.INSERT) + public AjaxResult add(@RequestBody AssetOfficialAccount assetOfficialAccount) { + return success(assetOfficialAccountService.save(assetOfficialAccount)); + } + + /** + * 编辑公众号数据 + * + * @param assetOfficialAccount 实体 + * @return 编辑结果 + */ + @ApiOperation(value = "编辑公众号数据") + @Log(title = "编辑公众号数据", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(AssetOfficialAccount assetOfficialAccount) { + return success(assetOfficialAccountService.updateById(assetOfficialAccount)); + } + + /** + * 删除公众号数据 + * + * @param id 主键 + * @return 删除是否成功 + */ + @ApiOperation(value = "删除公众号数据") + @Log(title = "删除公众号数据", businessType = BusinessType.DELETE) + @DeleteMapping("/{id}") + public AjaxResult deleteById(@PathVariable Long id) { + assetOfficialAccountService.deleteById(id); + return success(); + } + + /** + * 下载公众号导入模板 + */ + @ApiOperation(value = "下载公众号导入模板") + @PostMapping("/importTemplate") + public void importTemplate(HttpServletResponse response) { + ExcelUtil util = new ExcelUtil<>(AssetOfficialAccount.class); + util.importTemplateExcel(response, "App导入模板"); + } + + /** + * app导出 + */ + @Transactional(rollbackFor = Exception.class) + @ApiOperation(value = "公众号导出") + @Log(title = "公众号导出", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, AssetOfficialAccountPageRequest unit) { + List list = assetOfficialAccountService.getAllList(unit); + ExcelUtil util = new ExcelUtil<>(AssetOfficialAccount.class); + util.exportExcel(response, list, "公众号数据"); + } + + /** + * 公众号导入 + */ + @Transactional(rollbackFor = Exception.class) + @ApiOperation(value = "公众号导入") + @Log(title = "公众号导入", businessType = BusinessType.IMPORT) + @PostMapping("/importData") + public AjaxResult importData(MultipartFile file) throws Exception { + ExcelUtil util = new ExcelUtil<>(AssetOfficialAccount.class); + List list = util.importExcel(file.getInputStream()); + if (list != null) { + list.forEach(x->{ + AssetOfficialAccount one = assetOfficialAccountService.lambdaQuery().eq(AssetOfficialAccount::getSsdw, x.getSsdw()) + .eq(AssetOfficialAccount::getGzhmc, x.getGzhmc()).one(); + if(one!=null){ + x.setId(one.getId()); + assetOfficialAccountService.updateById(x); + }else { + assetOfficialAccountService.save(x); + } + }); + } else { + throw new ServiceException("公众号导入数据不能为空!"); + } + return AjaxResult.success("导入成功"); + } +} + diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/UnitController.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/UnitController.java index 5a1b247..93cc74f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/UnitController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/controller/UnitController.java @@ -16,6 +16,7 @@ import com.ruoyi.tc.service.UnitOtherConcatService; import com.ruoyi.tc.service.UnitService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; @@ -33,7 +34,7 @@ import java.util.*; */ @Api(tags = "单位表控制层") @RestController -//@PreAuthorize("@ss.hasAnyRoles('admin,common')") +@PreAuthorize("@ss.hasAnyRoles('admin,common')") @RequestMapping("/tc/unit") public class UnitController { diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetApp.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetApp.java index 9253763..5f96f24 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetApp.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetApp.java @@ -1,5 +1,7 @@ package com.ruoyi.tc.entity; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.ruoyi.common.annotation.Excel; import com.ruoyi.tc.baseClass.BaseClass; @@ -19,8 +21,10 @@ import java.io.Serializable; @TableName(value = "asset_app") public class AssetApp extends BaseClass implements Serializable { + private static final long serialVersionUID = 1L; @ApiModelProperty("id") + @TableId(value = "id",type = IdType.AUTO) private Long id; /** * 所属单位 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetEmail.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetEmail.java index 5cf30e4..87c90e6 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetEmail.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetEmail.java @@ -1,5 +1,7 @@ package com.ruoyi.tc.entity; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.ruoyi.common.annotation.Excel; import com.ruoyi.tc.baseClass.BaseClass; @@ -21,6 +23,7 @@ public class AssetEmail extends BaseClass implements Serializable { @ApiModelProperty("id") + @TableId(value = "id",type = IdType.AUTO) private Long id; /** * 所属单位 @@ -41,10 +44,10 @@ public class AssetEmail extends BaseClass implements Serializable { @ApiModelProperty("建设类型(字典)") private String jslx; /** - * 邮箱系统供应商 + * 邮件系统供应商 */ - @Excel(name = "邮箱系统供应商", sort = 4, width = 24) - @ApiModelProperty("邮箱系统供应商") + @Excel(name = "邮件系统供应商", sort = 4, width = 24) + @ApiModelProperty("邮件系统供应商") private String yjxtgys; /** * 密码算法 @@ -53,10 +56,10 @@ public class AssetEmail extends BaseClass implements Serializable { @ApiModelProperty("密码算法") private String mmsf; /** - * 邮寄系统状态(字典) + * 邮件系统状态(字典) */ - @Excel(name = "邮寄系统状态", sort = 6, width = 20,dictType = "email_state",comboReadDict = true) - @ApiModelProperty("邮寄系统状态(字典)") + @Excel(name = "邮件系统状态", sort = 6, width = 20,dictType = "email_state",comboReadDict = true) + @ApiModelProperty("邮件系统状态(字典)") private String yjxtzc; /** * 安全防护系统(字典) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetMiniPrograms.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetMiniPrograms.java index f50f6fb..916c87e 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetMiniPrograms.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetMiniPrograms.java @@ -1,5 +1,7 @@ package com.ruoyi.tc.entity; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.ruoyi.common.annotation.Excel; import com.ruoyi.tc.baseClass.BaseClass; @@ -28,6 +30,7 @@ public class AssetMiniPrograms extends BaseClass implements Serializable { * */ @ApiModelProperty("id") + @TableId(value = "id",type = IdType.AUTO) private Long id; /** * 所属单位 @@ -62,140 +65,122 @@ public class AssetMiniPrograms extends BaseClass implements Serializable { /** * 小程序状态(字典) */ - @Excel(name = "小程序包状态", sort = 6,dictType = "email_state",comboReadDict = true) + @Excel(name = "小程序状态", sort = 6,dictType = "gzh_state",comboReadDict = true) @ApiModelProperty("小程序状态(字典)") private String state; /** * 账号原始ID */ - @Excel(name = "账号原始ID", sort = 6,dictType = "email_state",comboReadDict = true) + @Excel(name = "账号原始ID", sort = 7) @ApiModelProperty("账号原始ID") private String ysId; /** * 小程序包状态(字典) */ - @Size(max= 10,message="编码长度不能超过10") + @Excel(name = "小程序包状态", sort = 8,dictType = "email_state",comboReadDict = true) @ApiModelProperty("小程序包状态(字典)") - @Length(max= 10,message="编码长度不能超过10") private String packState; /** * 认证状态(字典) */ - @Size(max= 10,message="编码长度不能超过10") + @Excel(name = "认证状态", sort = 9,dictType = "gzh_rzzt",comboReadDict = true) @ApiModelProperty("认证状态(字典)") - @Length(max= 10,message="编码长度不能超过10") private String rzState; /** * 认证时间 */ - @Size(max= 50,message="编码长度不能超过50") + @Excel(name = "认证时间", sort = 10) @ApiModelProperty("认证时间") - @Length(max= 50,message="编码长度不能超过50") private String rzsj; /** * 认证类型(字典) */ - @Size(max= 255,message="编码长度不能超过255") + @Excel(name = "认证类型", sort = 11,dictType = "gzh_rzlx",comboReadDict = true) @ApiModelProperty("认证类型(字典)") - @Length(max= 255,message="编码长度不能超过255") private String rzlx; /** * icp备案状态 */ - @Size(max= 100,message="编码长度不能超过100") @ApiModelProperty("icp备案状态") - @Length(max= 100,message="编码长度不能超过100") + @Excel(name = "icp备案状态", sort = 12) private String icpState; /** * 域命白名单 */ - @Size(max= 255,message="编码长度不能超过255") + @Excel(name = "域名白名单", sort = 13) @ApiModelProperty("域命白名单") - @Length(max= 255,message="编码长度不能超过255") private String ymbmd; /** * 服务类目 */ - @Size(max= 255,message="编码长度不能超过255") + @Excel(name = "服务类目", sort = 14) @ApiModelProperty("服务类目") - @Length(max= 255,message="编码长度不能超过255") private String fwlm; /** * 行业电子邮箱 */ - @Size(max= 100,message="编码长度不能超过100") + @Excel(name = "行业电子邮箱", sort = 15) @ApiModelProperty("行业电子邮箱") - @Length(max= 100,message="编码长度不能超过100") private String hydzyx; /** * 所属行业(字典) */ - @Size(max= 10,message="编码长度不能超过10") @ApiModelProperty("所属行业(字典)") - @Length(max= 10,message="编码长度不能超过10") + @Excel(name = "所属行业",dictType = "app_sshy",comboReadDict = true,sort = 16, width = 18) private String sshy; /** * 重点行业(字典) */ - @Size(max= 10,message="编码长度不能超过10") + @Excel(name = "重点行业",dictType = "app_zdhy",comboReadDict = true,sort = 17, width = 18) @ApiModelProperty("重点行业(字典)") - @Length(max= 10,message="编码长度不能超过10") private String zdhy; /** * 行政区划(字典) */ - @Size(max= 10,message="编码长度不能超过10") + @Excel(name = "行政区划",dictType = "app_xzqh",comboReadDict = true,sort = 18, width = 18) @ApiModelProperty("行政区划(字典)") - @Length(max= 10,message="编码长度不能超过10") private String xzqh; /** * 系统简介 */ - @Size(max= 500,message="编码长度不能超过500") + @Excel(name = "系统简介",sort = 19, width = 24) @ApiModelProperty("系统简介") - @Length(max= 500,message="编码长度不能超过500") private String xtjj; /** * 系统责任人 */ - @Size(max= 50,message="编码长度不能超过50") + @Excel(name = "系统责任人",sort = 20) @ApiModelProperty("系统责任人") - @Length(max= 50,message="编码长度不能超过50") private String xtzrr; /** * 系统责任人电话 */ - @Size(max= 50,message="编码长度不能超过50") + @Excel(name = "系统责任人电话",sort = 21) @ApiModelProperty("系统责任人电话") - @Length(max= 50,message="编码长度不能超过50") private String xtzrrdh; /** * 系统责任人邮箱 */ - @Size(max= 50,message="编码长度不能超过50") + @Excel(name = "系统责任人邮箱",sort = 22) @ApiModelProperty("系统责任人邮箱") - @Length(max= 50,message="编码长度不能超过50") private String xtzrryx; /** * 系统责任人地址 */ - @Size(max= 255,message="编码长度不能超过255") + @Excel(name = "系统责任人地址",sort = 23,width = 24) @ApiModelProperty("系统责任人地址") - @Length(max= 255,message="编码长度不能超过255") private String xtzrrdz; /** * 引用插件appid */ - @Size(max= 255,message="编码长度不能超过255") + @Excel(name = "引用插件(APPID)",sort = 24) @ApiModelProperty("引用插件appid") - @Length(max= 255,message="编码长度不能超过255") private String yycjAppid; /** * 引用插件开发者 */ - @Size(max= 255,message="编码长度不能超过255") + @Excel(name = "引用插件(开发者)",sort = 25) @ApiModelProperty("引用插件开发者") - @Length(max= 255,message="编码长度不能超过255") private String yycjKfz; /** * 删除标志(0代表存在 2代表删除) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetOfficialAccount.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetOfficialAccount.java index dca6c78..0f511dd 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetOfficialAccount.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/AssetOfficialAccount.java @@ -1,5 +1,7 @@ package com.ruoyi.tc.entity; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.ruoyi.common.annotation.Excel; import com.ruoyi.tc.baseClass.BaseClass; @@ -22,6 +24,7 @@ public class AssetOfficialAccount extends BaseClass implements Serializable { @ApiModelProperty("id") + @TableId(value = "id",type = IdType.AUTO) private Long id; /** @@ -76,7 +79,7 @@ public class AssetOfficialAccount extends BaseClass implements Serializable { /** * 认证状态(字典) */ - @Excel(name = "公众号类型", sort = 9, dictType = "gzh_rzzt", comboReadDict = true) + @Excel(name = "认证状态", sort = 9, dictType = "gzh_rzzt", comboReadDict = true) @ApiModelProperty("认证状态(字典)") private String rzState; /** @@ -154,7 +157,7 @@ public class AssetOfficialAccount extends BaseClass implements Serializable { /** * 菜单类型 */ - @Excel(name = "菜单信息(菜单类型)", sort = 22, dictType = "gzh_cdlx", comboReadDict = true) + @Excel(name = "菜单信息(菜单类型)", sort = 22) @ApiModelProperty("菜单类型") private String cdlx; diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetAppPageRequest.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetAppPageRequest.java new file mode 100644 index 0000000..7af99d6 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetAppPageRequest.java @@ -0,0 +1,53 @@ +package com.ruoyi.tc.entity.request; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +/** + * 移动应用程序分页查询请求类 + * @author du + * @since 2024/11/15 15:37 + */ +@Data +public class AssetAppPageRequest { + + + /** + * 应用名称 + */ + @ApiModelProperty("应用名称") + private String yymc; + + /** + * 所属单位 + */ + @ApiModelProperty("所属单位") + private String dwmc; + + + /** + * 开始时间 + */ + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty("开始时间") + private Date startTime; + + /** + * 结束时间 + */ + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty("结束时间") + private Date endTime; + + @ApiModelProperty("页码") + private Long current=1L; + + @ApiModelProperty("页数") + private Long size=10L; +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetEmailPageRequest.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetEmailPageRequest.java new file mode 100644 index 0000000..76c1acc --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetEmailPageRequest.java @@ -0,0 +1,53 @@ +package com.ruoyi.tc.entity.request; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +/** + * 电子邮件资产分页查询请求类 + * @author du + * @since 2024/11/15 15:37 + */ +@Data +public class AssetEmailPageRequest { + + + /** + * 电子邮箱后缀 + */ + @ApiModelProperty("电子邮箱后缀") + private String dzyxhz; + + /** + * 所属单位 + */ + @ApiModelProperty("所属单位") + private String dwmc; + + + /** + * 开始时间 + */ + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty("开始时间") + private Date startTime; + + /** + * 结束时间 + */ + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty("结束时间") + private Date endTime; + + @ApiModelProperty("页码") + private Long current=1L; + + @ApiModelProperty("页数") + private Long size=10L; +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetMiniProgramsPageRequest.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetMiniProgramsPageRequest.java new file mode 100644 index 0000000..0c1b11e --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetMiniProgramsPageRequest.java @@ -0,0 +1,53 @@ +package com.ruoyi.tc.entity.request; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +/** + * 小程序资产分页查询请求类 + * @author du + * @since 2024/11/15 15:37 + */ +@Data +public class AssetMiniProgramsPageRequest { + + + /** + * 小程序名称 + */ + @ApiModelProperty("小程序名称") + private String xcxmc; + + /** + * 所属单位 + */ + @ApiModelProperty("所属单位") + private String dwmc; + + + /** + * 开始时间 + */ + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty("开始时间") + private Date startTime; + + /** + * 结束时间 + */ + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty("结束时间") + private Date endTime; + + @ApiModelProperty("页码") + private Long current=1L; + + @ApiModelProperty("页数") + private Long size=10L; +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetOfficialAccountPageRequest.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetOfficialAccountPageRequest.java new file mode 100644 index 0000000..aedb96c --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/entity/request/AssetOfficialAccountPageRequest.java @@ -0,0 +1,53 @@ +package com.ruoyi.tc.entity.request; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.util.Date; + +/** + * 公众号资产分页查询请求类 + * @author du + * @since 2024/11/15 15:37 + */ +@Data +public class AssetOfficialAccountPageRequest { + + + /** + * 公众号名称 + */ + @ApiModelProperty("公众号名称") + private String gzhmc; + + /** + * 所属单位 + */ + @ApiModelProperty("所属单位") + private String dwmc; + + + /** + * 开始时间 + */ + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty("开始时间") + private Date startTime; + + /** + * 结束时间 + */ + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty("结束时间") + private Date endTime; + + @ApiModelProperty("页码") + private Long current=1L; + + @ApiModelProperty("页数") + private Long size=10L; +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetAppMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetAppMapper.java new file mode 100644 index 0000000..643944a --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetAppMapper.java @@ -0,0 +1,45 @@ +package com.ruoyi.tc.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.ruoyi.tc.entity.AssetApp; +import com.ruoyi.tc.entity.request.AssetAppPageRequest; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 资产移动应用程序表(asset_app)表数据库访问层 + * @author makejava + * @since 2024-11-15 10:03:56 + */ +public interface AssetAppMapper extends BaseMapper { + + /** + * 分页查询所有数据 + * + * @param page 分页对象 + * @param as 查询实体 + * @return 所有数据 + */ + Page page(Page page,@Param("req") AssetAppPageRequest as); + + /** + * 查询所有数据 + * + * @param as 查询实体 + * @return 所有数据 + */ + List page(@Param("req")AssetAppPageRequest as); + + + + /** + * 逻辑删除 + * + * @return + */ + void deleteById(Long id); + +} + diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetEmailMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetEmailMapper.java new file mode 100644 index 0000000..5ad765c --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetEmailMapper.java @@ -0,0 +1,45 @@ +package com.ruoyi.tc.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.ruoyi.tc.entity.AssetEmail; +import com.ruoyi.tc.entity.request.AssetEmailPageRequest; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 电子邮件资产表(asset_email)表数据库访问层 + * @author makejava + * @since 2024-11-15 10:03:56 + */ +public interface AssetEmailMapper extends BaseMapper { + + /** + * 分页查询所有数据 + * + * @param page 分页对象 + * @param as 查询实体 + * @return 所有数据 + */ + Page page(Page page,@Param("req") AssetEmailPageRequest as); + + /** + * 查询所有数据 + * + * @param as 查询实体 + * @return 所有数据 + */ + List page(@Param("req")AssetEmailPageRequest as); + + + + /** + * 逻辑删除 + * + * @return + */ + String deleteById(Long id); + +} + diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetMiniProgramsMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetMiniProgramsMapper.java new file mode 100644 index 0000000..0870ef0 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetMiniProgramsMapper.java @@ -0,0 +1,46 @@ +package com.ruoyi.tc.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.ruoyi.tc.entity.AssetMiniPrograms; +import com.ruoyi.tc.entity.AssetMiniPrograms; +import com.ruoyi.tc.entity.request.AssetMiniProgramsPageRequest; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 小程序资产表(asset_mini_programs)表数据库访问层 + * @author makejava + * @since 2024-11-15 10:03:56 + */ +public interface AssetMiniProgramsMapper extends BaseMapper { + + /** + * 分页查询所有数据 + * + * @param page 分页对象 + * @param as 查询实体 + * @return 所有数据 + */ + Page page(Page page,@Param("req") AssetMiniProgramsPageRequest as); + + /** + * 查询所有数据 + * + * @param as 查询实体 + * @return 所有数据 + */ + List page(@Param("req")AssetMiniProgramsPageRequest as); + + + + /** + * 逻辑删除 + * + * @return + */ + void deleteById(Long id); + +} + diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetOfficialAccountMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetOfficialAccountMapper.java new file mode 100644 index 0000000..5a080ae --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/mapper/AssetOfficialAccountMapper.java @@ -0,0 +1,45 @@ +package com.ruoyi.tc.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.ruoyi.tc.entity.AssetOfficialAccount; +import com.ruoyi.tc.entity.request.AssetOfficialAccountPageRequest; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 公众号资产表(asset_official_account)表数据库访问层 + * @author makejava + * @since 2024-11-15 10:03:56 + */ +public interface AssetOfficialAccountMapper extends BaseMapper { + + /** + * 分页查询所有数据 + * + * @param page 分页对象 + * @param as 查询实体 + * @return 所有数据 + */ + Page page(Page page,@Param("req") AssetOfficialAccountPageRequest as); + + /** + * 查询所有数据 + * + * @param as 查询实体 + * @return 所有数据 + */ + List page(@Param("req")AssetOfficialAccountPageRequest as); + + + + /** + * 逻辑删除 + * + * @return + */ + void deleteById(Long id); + +} + diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetAppService.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetAppService.java new file mode 100644 index 0000000..d9a6fa2 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetAppService.java @@ -0,0 +1,39 @@ +package com.ruoyi.tc.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import com.ruoyi.tc.entity.AssetApp; +import com.ruoyi.tc.entity.request.AssetAppPageRequest; +import com.ruoyi.tc.entity.request.UnitRequest; + +import java.util.List; + +/** + * 资产移动应用程序表(asset_app)表服务接口 + * + * @author makejava + * @since 2024-11-28 17:13:07 + */ +public interface AssetAppService extends IService { + /** + * 分页查询所有数据 + * + * @param page 分页对象 + * @param as 查询实体 + * @return 所有数据 + */ + Page page(Page page, AssetAppPageRequest as); + + /** + * 逻辑删除 + */ + void deleteById(Long id); + + /** + * 查询所有数据 + * + * @param as 查询实体 + * @return 所有数据 + */ + List getAllList(AssetAppPageRequest as); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetEmailService.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetEmailService.java new file mode 100644 index 0000000..3dcf3d7 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetEmailService.java @@ -0,0 +1,40 @@ +package com.ruoyi.tc.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import com.ruoyi.tc.entity.AssetApp; +import com.ruoyi.tc.entity.AssetEmail; +import com.ruoyi.tc.entity.request.AssetAppPageRequest; +import com.ruoyi.tc.entity.request.AssetEmailPageRequest; + +import java.util.List; + +/** + * 电子邮件资产表(asset_email)表服务接口 + * + * @author makejava + * @since 2024-11-28 17:13:07 + */ +public interface AssetEmailService extends IService { + /** + * 分页查询所有数据 + * + * @param page 分页对象 + * @param as 查询实体 + * @return 所有数据 + */ + Page page(Page page, AssetEmailPageRequest as); + + /** + * 逻辑删除 + */ + String deleteById(Long id); + + /** + * 查询所有数据 + * + * @param as 查询实体 + * @return 所有数据 + */ + List getAllList(AssetEmailPageRequest as); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetMiniProgramsService.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetMiniProgramsService.java new file mode 100644 index 0000000..bd7d22b --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetMiniProgramsService.java @@ -0,0 +1,39 @@ +package com.ruoyi.tc.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import com.ruoyi.tc.entity.AssetMiniPrograms; +import com.ruoyi.tc.entity.AssetMiniPrograms; +import com.ruoyi.tc.entity.request.AssetMiniProgramsPageRequest; + +import java.util.List; + +/** + * 小程序资产(asset_mini_programs)表服务接口 + * + * @author makejava + * @since 2024-11-28 17:13:07 + */ +public interface AssetMiniProgramsService extends IService { + /** + * 分页查询所有数据 + * + * @param page 分页对象 + * @param as 查询实体 + * @return 所有数据 + */ + Page page(Page page, AssetMiniProgramsPageRequest as); + + /** + * 逻辑删除 + */ + void deleteById(Long id); + + /** + * 查询所有数据 + * + * @param as 查询实体 + * @return 所有数据 + */ + List getAllList(AssetMiniProgramsPageRequest as); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetOfficialAccountService.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetOfficialAccountService.java new file mode 100644 index 0000000..0c0d969 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/AssetOfficialAccountService.java @@ -0,0 +1,38 @@ +package com.ruoyi.tc.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import com.ruoyi.tc.entity.AssetOfficialAccount; +import com.ruoyi.tc.entity.request.AssetOfficialAccountPageRequest; + +import java.util.List; + +/** + * 公众号资产(asset_official_account)表服务接口 + * + * @author makejava + * @since 2024-11-28 17:13:07 + */ +public interface AssetOfficialAccountService extends IService { + /** + * 分页查询所有数据 + * + * @param page 分页对象 + * @param as 查询实体 + * @return 所有数据 + */ + Page page(Page page, AssetOfficialAccountPageRequest as); + + /** + * 逻辑删除 + */ + void deleteById(Long id); + + /** + * 查询所有数据 + * + * @param as 查询实体 + * @return 所有数据 + */ + List getAllList(AssetOfficialAccountPageRequest as); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetAppServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetAppServiceImpl.java new file mode 100644 index 0000000..089c434 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetAppServiceImpl.java @@ -0,0 +1,52 @@ +package com.ruoyi.tc.service.impl; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ruoyi.tc.entity.AssetApp; +import com.ruoyi.tc.entity.request.AssetAppPageRequest; +import com.ruoyi.tc.mapper.AssetAppMapper; +import com.ruoyi.tc.service.AssetAppService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 资产移动应用程序表(asset_app)表服务实现类 + * + * @author makejava + * @since 2024-11-28 17:13:07 + */ +@Service("assetAppService") +public class AssetAppServiceImpl extends ServiceImpl implements AssetAppService{ + /** + * 分页查询所有数据 + * + * @param page 分页对象 + * @param as 查询实体 + * @return 所有数据 + */ + @Override + public Page page(Page page, AssetAppPageRequest as) { + return baseMapper.page(page,as); + } + + /** + * 逻辑删除 + */ + @Override + public void deleteById(Long id) { + baseMapper.deleteById(id); + } + + + /** + * 查询所有数据 + * + * @param as 查询实体 + * @return 所有数据 + */ + @Override + public List getAllList(AssetAppPageRequest as) { + return baseMapper.page(as); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetEmailServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetEmailServiceImpl.java new file mode 100644 index 0000000..ac77399 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetEmailServiceImpl.java @@ -0,0 +1,52 @@ +package com.ruoyi.tc.service.impl; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ruoyi.tc.entity.AssetEmail; +import com.ruoyi.tc.entity.request.AssetEmailPageRequest; +import com.ruoyi.tc.mapper.AssetEmailMapper; +import com.ruoyi.tc.service.AssetEmailService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 电子邮件资产表(asset_email)表服务实现类 + * + * @author makejava + * @since 2024-11-28 17:13:07 + */ +@Service("assetEmailService") +public class AssetEmailServiceImpl extends ServiceImpl implements AssetEmailService { + /** + * 分页查询所有数据 + * + * @param page 分页对象 + * @param as 查询实体 + * @return 所有数据 + */ + @Override + public Page page(Page page, AssetEmailPageRequest as) { + return baseMapper.page(page,as); + } + + /** + * 逻辑删除 + */ + @Override + public String deleteById(Long id) { + return baseMapper.deleteById(id); + } + + + /** + * 查询所有数据 + * + * @param as 查询实体 + * @return 所有数据 + */ + @Override + public List getAllList(AssetEmailPageRequest as) { + return baseMapper.page(as); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetMiniProgramsServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetMiniProgramsServiceImpl.java new file mode 100644 index 0000000..83a3fe2 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetMiniProgramsServiceImpl.java @@ -0,0 +1,52 @@ +package com.ruoyi.tc.service.impl; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ruoyi.tc.entity.AssetMiniPrograms; +import com.ruoyi.tc.entity.request.AssetMiniProgramsPageRequest; +import com.ruoyi.tc.mapper.AssetMiniProgramsMapper; +import com.ruoyi.tc.service.AssetMiniProgramsService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 小程序资产(asset_mini_programs)表服务实现类 + * + * @author makejava + * @since 2024-11-28 17:13:07 + */ +@Service("assetMiniProgramsService") +public class AssetMiniProgramsServiceImpl extends ServiceImpl implements AssetMiniProgramsService{ + /** + * 分页查询所有数据 + * + * @param page 分页对象 + * @param as 查询实体 + * @return 所有数据 + */ + @Override + public Page page(Page page, AssetMiniProgramsPageRequest as) { + return baseMapper.page(page,as); + } + + /** + * 逻辑删除 + */ + @Override + public void deleteById(Long id) { + baseMapper.deleteById(id); + } + + + /** + * 查询所有数据 + * + * @param as 查询实体 + * @return 所有数据 + */ + @Override + public List getAllList(AssetMiniProgramsPageRequest as) { + return baseMapper.page(as); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetOfficialAccountServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetOfficialAccountServiceImpl.java new file mode 100644 index 0000000..d4708d1 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tc/service/impl/AssetOfficialAccountServiceImpl.java @@ -0,0 +1,52 @@ +package com.ruoyi.tc.service.impl; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ruoyi.tc.entity.AssetOfficialAccount; +import com.ruoyi.tc.entity.request.AssetOfficialAccountPageRequest; +import com.ruoyi.tc.mapper.AssetOfficialAccountMapper; +import com.ruoyi.tc.service.AssetOfficialAccountService; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 公众号资产(asset_official_account)表服务实现类 + * + * @author makejava + * @since 2024-11-28 17:13:07 + */ +@Service("assetOfficialAccountService") +public class AssetOfficialAccountServiceImpl extends ServiceImpl implements AssetOfficialAccountService{ + /** + * 分页查询所有数据 + * + * @param page 分页对象 + * @param as 查询实体 + * @return 所有数据 + */ + @Override + public Page page(Page page, AssetOfficialAccountPageRequest as) { + return baseMapper.page(page,as); + } + + /** + * 逻辑删除 + */ + @Override + public void deleteById(Long id) { + baseMapper.deleteById(id); + } + + + /** + * 查询所有数据 + * + * @param as 查询实体 + * @return 所有数据 + */ + @Override + public List getAllList(AssetOfficialAccountPageRequest as) { + return baseMapper.page(as); + } +} diff --git a/ruoyi-admin/src/main/resources/mapper/AssetAppMapper.xml b/ruoyi-admin/src/main/resources/mapper/AssetAppMapper.xml new file mode 100644 index 0000000..8b9d0ab --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/AssetAppMapper.xml @@ -0,0 +1,30 @@ + + + + + update asset_app + set del_flag = '2' + where id = #{id} + + + + + diff --git a/ruoyi-admin/src/main/resources/mapper/AssetEmailMapper.xml b/ruoyi-admin/src/main/resources/mapper/AssetEmailMapper.xml new file mode 100644 index 0000000..6551e3c --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/AssetEmailMapper.xml @@ -0,0 +1,30 @@ + + + + + update asset_email + set del_flag = '2' + where id = #{id} + + + + + diff --git a/ruoyi-admin/src/main/resources/mapper/AssetMiniProgramsMapper.xml b/ruoyi-admin/src/main/resources/mapper/AssetMiniProgramsMapper.xml new file mode 100644 index 0000000..a615a01 --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/AssetMiniProgramsMapper.xml @@ -0,0 +1,30 @@ + + + + + update asset_mini_programs + set del_flag = '2' + where id = #{id} + + + + + diff --git a/ruoyi-admin/src/main/resources/mapper/AssetOfficialAccountMapper.xml b/ruoyi-admin/src/main/resources/mapper/AssetOfficialAccountMapper.xml new file mode 100644 index 0000000..a58ee7b --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/AssetOfficialAccountMapper.xml @@ -0,0 +1,30 @@ + + + + + update asset_official_account + set del_flag = '2' + where id = #{id} + + + + +