first commit

This commit is contained in:
陈现府
2025-11-20 10:45:16 +08:00
commit 8355431361
2643 changed files with 291314 additions and 0 deletions
@@ -0,0 +1,140 @@
package com.mhd.system.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.mhd.system.domain.SysProduct;
import com.mhd.system.domain.dto.SysAccountingRulesDTO;
import com.mhd.system.domain.vo.SysAccountingRulesVO;
import com.mhd.system.service.ISysAccountingRulesService;
import com.mhd.system.service.ISysProductService;
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.mhd.common.log.annotation.Log;
import com.mhd.common.log.enums.BusinessType;
import com.mhd.common.security.annotation.RequiresPermissions;
import com.mhd.common.core.web.controller.BaseController;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.common.core.utils.poi.ExcelUtil;
import com.mhd.common.core.web.page.TableDataInfo;
/**
* 计费规则Controller
*
* @author mhd
* @date 2022-07-28
*/
@RestController
@RequestMapping("/rules")
public class SysAccountingRulesController extends BaseController
{
@Autowired
private ISysAccountingRulesService sysAccountingRulesService;
@Autowired
private ISysProductService iSysProductService;
/**
* 查询计费规则列表
*/
@RequiresPermissions("system:rules:list")
@GetMapping("/list")
public TableDataInfo list(SysAccountingRulesDTO sysAccountingRulesDTO)
{
startPage();
List<SysAccountingRulesVO> list = sysAccountingRulesService.selectSysAccountingRulesList(sysAccountingRulesDTO);
return getDataTable(list);
}
/**
* 查询所有产品名称
*/
@RequiresPermissions("system:rules:list")
@GetMapping("/product/list")
public TableDataInfo productList()
{
List<SysProduct> list = iSysProductService.selectSysProductList(null);
return getDataTable(list);
}
/**
* 查询所有计费规则
*/
@RequiresPermissions("system:rules:list")
@GetMapping("/rulesList/{accountingId}")
public TableDataInfo rulesList(@PathVariable("accountingId") Long accountingId)
{
if (accountingId != 0){
SysAccountingRulesDTO sysAccountingRulesDTO = new SysAccountingRulesDTO();
sysAccountingRulesDTO.setProductId(accountingId);
List<SysAccountingRulesVO> list = sysAccountingRulesService.selectSysAccountingRulesList(sysAccountingRulesDTO);
return getDataTable(list);
}else {
List<SysAccountingRulesVO> list = sysAccountingRulesService.selectSysAccountingRulesList(null);
return getDataTable(list);
}
}
/**
* 导出计费规则列表
*/
@RequiresPermissions("system:rules:export")
@Log(title = "计费规则", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SysAccountingRulesDTO sysAccountingRulesDTO)
{
List<SysAccountingRulesVO> list = sysAccountingRulesService.selectSysAccountingRulesList(sysAccountingRulesDTO);
ExcelUtil<SysAccountingRulesVO> util = new ExcelUtil<SysAccountingRulesVO>(SysAccountingRulesVO.class);
util.exportExcel(response, list, "计费规则数据");
}
/**
* 获取计费规则详细信息
*/
@RequiresPermissions("system:rules:query")
@GetMapping(value = "/{accountingId}")
public AjaxResult getInfo(@PathVariable("accountingId") Long accountingId)
{
SysAccountingRulesVO sysAccountingRulesVO = sysAccountingRulesService.selectSysAccountingRulesByAccountingId(accountingId);
return AjaxResult.success(sysAccountingRulesVO);
}
/**
* 新增计费规则
*/
@RequiresPermissions("system:rules:add")
@Log(title = "计费规则", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SysAccountingRulesDTO sysAccountingRulesDTO)
{
return toAjax(sysAccountingRulesService.insertSysAccountingRules(sysAccountingRulesDTO));
}
/**
* 修改计费规则
*/
@RequiresPermissions("system:rules:edit")
@Log(title = "计费规则", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SysAccountingRulesDTO sysAccountingRulesDTO)
{
return toAjax(sysAccountingRulesService.updateSysAccountingRules(sysAccountingRulesDTO));
}
/**
* 删除计费规则
*/
@RequiresPermissions("system:rules:remove")
@Log(title = "计费规则", businessType = BusinessType.DELETE)
@DeleteMapping("/{accountingIds}")
public AjaxResult remove(@PathVariable Long[] accountingIds)
{
return toAjax(sysAccountingRulesService.deleteSysAccountingRulesByAccountingIds(accountingIds));
}
}
@@ -0,0 +1,105 @@
package com.mhd.system.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.mhd.system.domain.SysCompanyAgreement;
import com.mhd.system.service.ISysCompanyAgreementService;
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.mhd.common.log.annotation.Log;
import com.mhd.common.log.enums.BusinessType;
import com.mhd.common.security.annotation.RequiresPermissions;
import com.mhd.common.core.web.controller.BaseController;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.common.core.utils.poi.ExcelUtil;
import com.mhd.common.core.web.page.TableDataInfo;
/**
* 门户管理 -- 用户协议Controller
*
* @author mhd
* @date 2022-07-27
*/
@RestController
@RequestMapping("/agreement")
public class SysCompanyAgreementController extends BaseController
{
@Autowired
private ISysCompanyAgreementService sysCompanyAgreementService;
/**
* 查询门户管理 -- 用户协议列表
*/
@RequiresPermissions("system:agreement:list")
@GetMapping("/list")
public TableDataInfo list(SysCompanyAgreement sysCompanyAgreement)
{
startPage();
List<SysCompanyAgreement> list = sysCompanyAgreementService.selectSysCompanyAgreementList(sysCompanyAgreement);
return getDataTable(list);
}
/**
* 导出门户管理 -- 用户协议列表
*/
@RequiresPermissions("system:agreement:export")
@Log(title = "门户管理 -- 用户协议", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SysCompanyAgreement sysCompanyAgreement)
{
List<SysCompanyAgreement> list = sysCompanyAgreementService.selectSysCompanyAgreementList(sysCompanyAgreement);
ExcelUtil<SysCompanyAgreement> util = new ExcelUtil<SysCompanyAgreement>(SysCompanyAgreement.class);
util.exportExcel(response, list, "门户管理 -- 用户协议数据");
}
/**
* 获取门户管理 -- 用户协议详细信息
*/
@RequiresPermissions("system:agreement:query")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(sysCompanyAgreementService.selectSysCompanyAgreementById(id));
}
/**
* 新增门户管理 -- 用户协议
*/
@RequiresPermissions("system:agreement:add")
@Log(title = "门户管理 -- 用户协议", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SysCompanyAgreement sysCompanyAgreement)
{
return toAjax(sysCompanyAgreementService.insertSysCompanyAgreement(sysCompanyAgreement));
}
/**
* 修改门户管理 -- 用户协议
*/
@RequiresPermissions("system:agreement:edit")
@Log(title = "门户管理 -- 用户协议", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SysCompanyAgreement sysCompanyAgreement)
{
return toAjax(sysCompanyAgreementService.updateSysCompanyAgreement(sysCompanyAgreement));
}
/**
* 删除门户管理 -- 用户协议
*/
@RequiresPermissions("system:agreement:remove")
@Log(title = "门户管理 -- 用户协议", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sysCompanyAgreementService.deleteSysCompanyAgreementByIds(ids));
}
}
@@ -0,0 +1,105 @@
package com.mhd.system.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.mhd.system.domain.SysCompanyApp;
import com.mhd.system.service.ISysCompanyAppService;
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.mhd.common.log.annotation.Log;
import com.mhd.common.log.enums.BusinessType;
import com.mhd.common.security.annotation.RequiresPermissions;
import com.mhd.common.core.web.controller.BaseController;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.common.core.utils.poi.ExcelUtil;
import com.mhd.common.core.web.page.TableDataInfo;
/**
* 门户管理--APP管理Controller
*
* @author mhd
* @date 2022-07-27
*/
@RestController
@RequestMapping("/app")
public class SysCompanyAppController extends BaseController
{
@Autowired
private ISysCompanyAppService sysCompanyAppService;
/**
* 查询门户管理--APP管理列表
*/
@RequiresPermissions("system:app:list")
@GetMapping("/list")
public TableDataInfo list(SysCompanyApp sysCompanyApp)
{
startPage();
List<SysCompanyApp> list = sysCompanyAppService.selectSysCompanyAppList(sysCompanyApp);
return getDataTable(list);
}
/**
* 导出门户管理--APP管理列表
*/
@RequiresPermissions("system:app:export")
@Log(title = "门户管理--APP管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SysCompanyApp sysCompanyApp)
{
List<SysCompanyApp> list = sysCompanyAppService.selectSysCompanyAppList(sysCompanyApp);
ExcelUtil<SysCompanyApp> util = new ExcelUtil<SysCompanyApp>(SysCompanyApp.class);
util.exportExcel(response, list, "门户管理--APP管理数据");
}
/**
* 获取门户管理--APP管理详细信息
*/
@RequiresPermissions("system:app:query")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(sysCompanyAppService.selectSysCompanyAppById(id));
}
/**
* 新增门户管理--APP管理
*/
@RequiresPermissions("system:app:add")
@Log(title = "门户管理--APP管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SysCompanyApp sysCompanyApp)
{
return toAjax(sysCompanyAppService.insertSysCompanyApp(sysCompanyApp));
}
/**
* 修改门户管理--APP管理
*/
@RequiresPermissions("system:app:edit")
@Log(title = "门户管理--APP管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SysCompanyApp sysCompanyApp)
{
return toAjax(sysCompanyAppService.updateSysCompanyApp(sysCompanyApp));
}
/**
* 删除门户管理--APP管理
*/
@RequiresPermissions("system:app:remove")
@Log(title = "门户管理--APP管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sysCompanyAppService.deleteSysCompanyAppByIds(ids));
}
}
@@ -0,0 +1,105 @@
package com.mhd.system.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.mhd.system.domain.SysCompanyBasics;
import com.mhd.system.service.ISysCompanyBasicsService;
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.mhd.common.log.annotation.Log;
import com.mhd.common.log.enums.BusinessType;
import com.mhd.common.security.annotation.RequiresPermissions;
import com.mhd.common.core.web.controller.BaseController;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.common.core.utils.poi.ExcelUtil;
import com.mhd.common.core.web.page.TableDataInfo;
/**
* 门户管理--基础信息Controller
*
* @author mhd
* @date 2022-07-27
*/
@RestController
@RequestMapping("/basics")
public class SysCompanyBasicsController extends BaseController
{
@Autowired
private ISysCompanyBasicsService sysCompanyBasicsService;
/**
* 查询门户管理--基础信息列表
*/
@RequiresPermissions("system:basics:list")
@GetMapping("/list")
public TableDataInfo list(SysCompanyBasics sysCompanyBasics)
{
startPage();
List<SysCompanyBasics> list = sysCompanyBasicsService.selectSysCompanyBasicsList(sysCompanyBasics);
return getDataTable(list);
}
/**
* 导出门户管理--基础信息列表
*/
@RequiresPermissions("system:basics:export")
@Log(title = "门户管理--基础信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SysCompanyBasics sysCompanyBasics)
{
List<SysCompanyBasics> list = sysCompanyBasicsService.selectSysCompanyBasicsList(sysCompanyBasics);
ExcelUtil<SysCompanyBasics> util = new ExcelUtil<SysCompanyBasics>(SysCompanyBasics.class);
util.exportExcel(response, list, "门户管理--基础信息数据");
}
/**
* 获取门户管理--基础信息详细信息
*/
@RequiresPermissions("system:basics:query")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(sysCompanyBasicsService.selectSysCompanyBasicsById(id));
}
/**
* 新增门户管理--基础信息
*/
@RequiresPermissions("system:basics:add")
@Log(title = "门户管理--基础信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SysCompanyBasics sysCompanyBasics)
{
return toAjax(sysCompanyBasicsService.insertSysCompanyBasics(sysCompanyBasics));
}
/**
* 修改门户管理--基础信息
*/
@RequiresPermissions("system:basics:edit")
@Log(title = "门户管理--基础信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SysCompanyBasics sysCompanyBasics)
{
return toAjax(sysCompanyBasicsService.updateSysCompanyBasics(sysCompanyBasics));
}
/**
* 删除门户管理--基础信息
*/
@RequiresPermissions("system:basics:remove")
@Log(title = "门户管理--基础信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sysCompanyBasicsService.deleteSysCompanyBasicsByIds(ids));
}
}
@@ -0,0 +1,159 @@
package com.mhd.system.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.mhd.system.domain.SysCompany;
import com.mhd.system.service.ISysCompanyService;
import com.mhd.common.core.exception.ServiceException;
import com.mhd.common.security.utils.SecurityUtils;
import com.mhd.system.api.model.LoginUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
import com.mhd.common.log.annotation.Log;
import com.mhd.common.log.enums.BusinessType;
import com.mhd.common.security.annotation.RequiresPermissions;
import com.mhd.common.core.web.controller.BaseController;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.common.core.utils.poi.ExcelUtil;
import com.mhd.common.core.web.page.TableDataInfo;
/**
* 公司管理Controller
*
* @author mhd
* @date 2022-07-22
*/
@RestController
@RequestMapping("/company")
public class SysCompanyController extends BaseController
{
@Autowired
private ISysCompanyService sysCompanyService;
/**
* 查询公司管理列表
*/
@RequiresPermissions("system:company:list")
@GetMapping("/list")
public TableDataInfo list(SysCompany sysCompany)
{
startPage();
LoginUser user= SecurityUtils.getLoginUser();
if(!ObjectUtils.isEmpty(user)&&!user.getUsername().equals("admin")){
SysCompany company=sysCompanyService.selectSysCompanyByUserId(user.getUserid());
if(!ObjectUtils.isEmpty(company)){
sysCompany.setCompanyId(company.getCompanyId());
}
}
List<SysCompany> list = sysCompanyService.selectSysCompanyList(sysCompany);
return getDataTable(list);
}
/**
* 导出公司管理列表
*/
@RequiresPermissions("system:company:export")
@Log(title = "公司管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SysCompany sysCompany)
{
List<SysCompany> list = sysCompanyService.selectSysCompanyList(sysCompany);
ExcelUtil<SysCompany> util = new ExcelUtil<SysCompany>(SysCompany.class);
util.exportExcel(response, list, "公司管理数据");
}
/**
* 获取公司管理详细信息
*/
@RequiresPermissions("system:company:query")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(sysCompanyService.selectSysCompanyById(id));
}
/**
* 新增公司管理
*/
@RequiresPermissions("system:company:add")
@Log(title = "公司管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SysCompany sysCompany)
{
try{
return toAjax(sysCompanyService.insertSysCompany(sysCompany));
}catch(ServiceException e){
return AjaxResult.error(e.getMessage());
}catch(Exception e){
e.printStackTrace();
return toAjax(false);
}
}
/**
* 修改公司管理
*/
@RequiresPermissions("system:company:edit")
@Log(title = "公司管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SysCompany sysCompany)
{
try{
return toAjax(sysCompanyService.updateSysCompany(sysCompany));
}catch(ServiceException e){
return AjaxResult.error(e.getMessage());
}catch(Exception e){
e.printStackTrace();
return toAjax(false);
}
}
/**
* 删除公司管理
*/
@RequiresPermissions("system:company:remove")
@Log(title = "公司管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sysCompanyService.deleteSysCompanyByIds(ids));
}
/**
* 启用公司管理
*/
@RequiresPermissions("system:company:enable")
@GetMapping("/enable/{id}")
public AjaxResult enable(@PathVariable("id") Long id)
{
return toAjax(sysCompanyService.enableSysCompanyById(id));
}
/**
* 禁用公司管理
*/
@RequiresPermissions("system:company:disable")
@GetMapping("/disable/{id}")
public AjaxResult disable(@PathVariable("id") Long id)
{
return toAjax(sysCompanyService.disableSysCompanyById(id));
}
/**
* 加载公司列表树
*/
@GetMapping("/companyTreeselect/{level}")
public AjaxResult companyTreeselect(@PathVariable("level") Integer level)
{
LoginUser user= SecurityUtils.getLoginUser();
SysCompany sysCompany=new SysCompany();
if(!user.getUsername().equals("admin")){
SysCompany sysCompanyP=sysCompanyService.selectSysCompanyByUserId(user.getUserid());
sysCompany.setCompanyId(sysCompanyP.getCompanyId());
}
sysCompany.setLevel(level);
List<SysCompany> depts = sysCompanyService.selectCompanyList(sysCompany);
return AjaxResult.success(sysCompanyService.buildDeptTreeSelect(depts,level));
}
}
@@ -0,0 +1,125 @@
package com.mhd.system.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.mhd.system.domain.SysComplaintfeedback;
import com.mhd.system.service.ISysComplaintfeedbackService;
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.mhd.common.log.annotation.Log;
import com.mhd.common.log.enums.BusinessType;
import com.mhd.common.security.annotation.RequiresPermissions;
import com.mhd.common.core.web.controller.BaseController;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.common.core.utils.poi.ExcelUtil;
import com.mhd.common.core.web.page.TableDataInfo;
/**
* 意见投诉反馈Controller
*
* @author mhd
* @date 2022-07-29
*/
@RestController
@RequestMapping("/Complaintfeedback")
public class SysComplaintfeedbackController extends BaseController
{
@Autowired
private ISysComplaintfeedbackService sysComplaintfeedbackService;
/**
* 查询意见投诉反馈列表
*/
@RequiresPermissions("system:Complaintfeedback:list")
@GetMapping("/list")
public TableDataInfo list(SysComplaintfeedback sysComplaintfeedback)
{
startPage();
List<SysComplaintfeedback> list = sysComplaintfeedbackService.selectSysComplaintfeedbackList(sysComplaintfeedback);
return getDataTable(list);
}
/**
* 导出意见投诉反馈列表
*/
@RequiresPermissions("system:Complaintfeedback:export")
@Log(title = "意见投诉反馈", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SysComplaintfeedback sysComplaintfeedback)
{
List<SysComplaintfeedback> list = sysComplaintfeedbackService.selectSysComplaintfeedbackList(sysComplaintfeedback);
ExcelUtil<SysComplaintfeedback> util = new ExcelUtil<SysComplaintfeedback>(SysComplaintfeedback.class);
util.exportExcel(response, list, "意见投诉反馈数据");
}
/**
* 获取详细信息
*/
@RequiresPermissions("system:Complaintfeedback:query")
@GetMapping(value = "/{feedbackId}")
public AjaxResult getInfo(@PathVariable("feedbackId") Long[] feedbackId)
{
return AjaxResult.success(sysComplaintfeedbackService.selectSysComplaintfeedbackByFeedbackId(feedbackId));
}
/**
* 新增意见投诉反馈
*/
@RequiresPermissions("system:Complaintfeedback:add")
@Log(title = "意见投诉反馈", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SysComplaintfeedback sysComplaintfeedback)
{
return toAjax(sysComplaintfeedbackService.insertSysComplaintfeedback(sysComplaintfeedback));
}
/**
* 修改意见投诉反馈
*/
@RequiresPermissions("system:Complaintfeedback:edit")
@Log(title = "意见投诉反馈", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SysComplaintfeedback sysComplaintfeedback)
{
return toAjax(sysComplaintfeedbackService.updateSysComplaintfeedback(sysComplaintfeedback));
}
/**
* 删除意见投诉反馈
*/
@RequiresPermissions("system:Complaintfeedback:remove")
@Log(title = "意见投诉反馈", businessType = BusinessType.DELETE)
@DeleteMapping("/{feedbackIds}")
public AjaxResult remove(@PathVariable Long[] feedbackIds)
{
return toAjax(sysComplaintfeedbackService.deleteSysComplaintfeedbackByFeedbackIds(feedbackIds));
}
/**
* 标记为已读
*/
@RequiresPermissions("system:Complaintfeedback:updateStatus")
@Log(title = "消息已读", businessType = BusinessType.UPDATE)
@GetMapping("/status/{feedbackIds}")
public AjaxResult updateStatus(@PathVariable("feedbackIds")Long[] feedbackIds) {
return toAjax(sysComplaintfeedbackService.updateStatus(feedbackIds));
}
/**
* 未读消息记录条数
*/
@GetMapping("/unReadNum/{feedbackIds}")
public AjaxResult unReadNum(@PathVariable("feedbackIds")Long feedbackIds) {
return AjaxResult.success(sysComplaintfeedbackService.unReadSum(feedbackIds));
}
}
@@ -0,0 +1,135 @@
package com.mhd.system.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.mhd.system.domain.SysConfig;
import com.mhd.system.service.ISysConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.mhd.common.core.constant.UserConstants;
import com.mhd.common.core.utils.poi.ExcelUtil;
import com.mhd.common.core.web.controller.BaseController;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.common.core.web.page.TableDataInfo;
import com.mhd.common.log.annotation.Log;
import com.mhd.common.log.enums.BusinessType;
import com.mhd.common.security.annotation.RequiresPermissions;
import com.mhd.common.security.utils.SecurityUtils;
/**
* 参数配置 信息操作处理
*
* @author mhd
*/
@RestController
@RequestMapping("/config")
public class SysConfigController extends BaseController
{
@Autowired
private ISysConfigService configService;
/**
* 获取参数配置列表
*/
@RequiresPermissions("system:config:list")
@GetMapping("/list")
public TableDataInfo list(SysConfig config)
{
startPage();
List<SysConfig> list = configService.selectConfigList(config);
return getDataTable(list);
}
@Log(title = "参数管理", businessType = BusinessType.EXPORT)
@RequiresPermissions("system:config:export")
@PostMapping("/export")
public void export(HttpServletResponse response, SysConfig config)
{
List<SysConfig> list = configService.selectConfigList(config);
ExcelUtil<SysConfig> util = new ExcelUtil<SysConfig>(SysConfig.class);
util.exportExcel(response, list, "参数数据");
}
/**
* 根据参数编号获取详细信息
*/
@GetMapping(value = "/{configId}")
public AjaxResult getInfo(@PathVariable Long configId)
{
return AjaxResult.success(configService.selectConfigById(configId));
}
/**
* 根据参数键名查询参数值
*/
@GetMapping(value = "/configKey/{configKey}")
public AjaxResult getConfigKey(@PathVariable String configKey)
{
return AjaxResult.success(configService.selectConfigByKey(configKey));
}
/**
* 新增参数配置
*/
@RequiresPermissions("system:config:add")
@Log(title = "参数管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@Validated @RequestBody SysConfig config)
{
if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config)))
{
return AjaxResult.error("新增参数'" + config.getConfigName() + "'失败,参数键名已存在");
}
config.setCreateBy(SecurityUtils.getUsername());
return toAjax(configService.insertConfig(config));
}
/**
* 修改参数配置
*/
@RequiresPermissions("system:config:edit")
@Log(title = "参数管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@Validated @RequestBody SysConfig config)
{
if (UserConstants.NOT_UNIQUE.equals(configService.checkConfigKeyUnique(config)))
{
return AjaxResult.error("修改参数'" + config.getConfigName() + "'失败,参数键名已存在");
}
config.setUpdateBy(SecurityUtils.getUsername());
return toAjax(configService.updateConfig(config));
}
/**
* 删除参数配置
*/
@RequiresPermissions("system:config:remove")
@Log(title = "参数管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{configIds}")
public AjaxResult remove(@PathVariable Long[] configIds)
{
configService.deleteConfigByIds(configIds);
return success();
}
/**
* 刷新参数缓存
*/
@RequiresPermissions("system:config:remove")
@Log(title = "参数管理", businessType = BusinessType.CLEAN)
@DeleteMapping("/refreshCache")
public AjaxResult refreshCache()
{
configService.resetConfigCache();
return AjaxResult.success();
}
}
@@ -0,0 +1,105 @@
package com.mhd.system.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.mhd.system.domain.SysDepartInterfaceInfo;
import com.mhd.system.service.ISysDepartInterfaceInfoService;
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.mhd.common.log.annotation.Log;
import com.mhd.common.log.enums.BusinessType;
import com.mhd.common.security.annotation.RequiresPermissions;
import com.mhd.common.core.web.controller.BaseController;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.common.core.utils.poi.ExcelUtil;
import com.mhd.common.core.web.page.TableDataInfo;
/**
* 三方接口配置信息Controller
*
* @author mhd
* @date 2022-07-27
*/
@RestController
@RequestMapping("/info")
public class SysDepartInterfaceInfoController extends BaseController
{
@Autowired
private ISysDepartInterfaceInfoService sysDepartInterfaceInfoService;
/**
* 查询三方接口配置信息列表
*/
@RequiresPermissions("system:info:list")
@GetMapping("/list")
public TableDataInfo list(SysDepartInterfaceInfo sysDepartInterfaceInfo)
{
startPage();
List<SysDepartInterfaceInfo> list = sysDepartInterfaceInfoService.selectSysDepartInterfaceInfoList(sysDepartInterfaceInfo);
return getDataTable(list);
}
/**
* 导出三方接口配置信息列表
*/
@RequiresPermissions("system:info:export")
@Log(title = "三方接口配置信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SysDepartInterfaceInfo sysDepartInterfaceInfo)
{
List<SysDepartInterfaceInfo> list = sysDepartInterfaceInfoService.selectSysDepartInterfaceInfoList(sysDepartInterfaceInfo);
ExcelUtil<SysDepartInterfaceInfo> util = new ExcelUtil<SysDepartInterfaceInfo>(SysDepartInterfaceInfo.class);
util.exportExcel(response, list, "三方接口配置信息数据");
}
/**
* 获取三方接口配置信息详细信息
*/
@RequiresPermissions("system:info:query")
@GetMapping(value = "/{departInfoId}")
public AjaxResult getInfo(@PathVariable("departInfoId") Long departInfoId)
{
return AjaxResult.success(sysDepartInterfaceInfoService.selectSysDepartInterfaceInfoByDepartInfoId(departInfoId));
}
/**
* 新增三方接口配置信息
*/
@RequiresPermissions("system:info:add")
@Log(title = "三方接口配置信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SysDepartInterfaceInfo sysDepartInterfaceInfo)
{
return toAjax(sysDepartInterfaceInfoService.insertSysDepartInterfaceInfo(sysDepartInterfaceInfo));
}
/**
* 修改三方接口配置信息
*/
@RequiresPermissions("system:info:edit")
@Log(title = "三方接口配置信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SysDepartInterfaceInfo sysDepartInterfaceInfo)
{
return toAjax(sysDepartInterfaceInfoService.updateSysDepartInterfaceInfo(sysDepartInterfaceInfo));
}
/**
* 删除三方接口配置信息
*/
@RequiresPermissions("system:info:remove")
@Log(title = "三方接口配置信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{departInfoIds}")
public AjaxResult remove(@PathVariable Long[] departInfoIds)
{
return toAjax(sysDepartInterfaceInfoService.deleteSysDepartInterfaceInfoByDepartInfoIds(departInfoIds));
}
}
@@ -0,0 +1,167 @@
package com.mhd.system.controller;
import java.util.Iterator;
import java.util.List;
import com.mhd.system.service.ISysDeptService;
import org.apache.commons.lang3.ArrayUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.mhd.common.core.constant.UserConstants;
import com.mhd.common.core.utils.StringUtils;
import com.mhd.common.core.web.controller.BaseController;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.common.log.annotation.Log;
import com.mhd.common.log.enums.BusinessType;
import com.mhd.common.security.annotation.RequiresPermissions;
import com.mhd.common.security.utils.SecurityUtils;
import com.mhd.system.api.domain.SysDept;
/**
* 部门信息
*
* @author mhd
*/
@RestController
@RequestMapping("/dept")
public class SysDeptController extends BaseController
{
@Autowired
private ISysDeptService deptService;
/**
* 获取部门列表
*/
@RequiresPermissions("system:dept:list")
@GetMapping("/list")
public AjaxResult list(SysDept dept)
{
List<SysDept> depts = deptService.selectDeptList(dept);
return AjaxResult.success(depts);
}
/**
* 查询部门列表(排除节点)
*/
@RequiresPermissions("system:dept:list")
@GetMapping("/list/exclude/{deptId}")
public AjaxResult excludeChild(@PathVariable(value = "deptId", required = false) Long deptId)
{
List<SysDept> depts = deptService.selectDeptList(new SysDept());
Iterator<SysDept> it = depts.iterator();
while (it.hasNext())
{
SysDept d = (SysDept) it.next();
if (d.getDeptId().intValue() == deptId
|| ArrayUtils.contains(StringUtils.split(d.getAncestors(), ","), deptId + ""))
{
it.remove();
}
}
return AjaxResult.success(depts);
}
/**
* 根据部门编号获取详细信息
*/
@RequiresPermissions("system:dept:query")
@GetMapping(value = "/{deptId}")
public AjaxResult getInfo(@PathVariable Long deptId)
{
deptService.checkDeptDataScope(deptId);
return AjaxResult.success(deptService.selectDeptById(deptId));
}
/**
* 获取部门下拉树列表
*/
@GetMapping("/treeselect")
public AjaxResult treeselect(SysDept dept)
{
List<SysDept> depts = deptService.selectDeptList(dept);
return AjaxResult.success(deptService.buildDeptTreeSelect(depts));
}
/**
* 加载对应角色部门列表树
*/
@GetMapping(value = "/roleDeptTreeselect/{roleId}")
public AjaxResult roleDeptTreeselect(@PathVariable("roleId") Long roleId)
{
List<SysDept> depts = deptService.selectDeptList(new SysDept());
AjaxResult ajax = AjaxResult.success();
ajax.put("checkedKeys", deptService.selectDeptListByRoleId(roleId));
ajax.put("depts", deptService.buildDeptTreeSelect(depts));
return ajax;
}
/**
* 新增部门
*/
@RequiresPermissions("system:dept:add")
@Log(title = "部门管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@Validated @RequestBody SysDept dept)
{
if (UserConstants.NOT_UNIQUE.equals(deptService.checkDeptNameUnique(dept)))
{
return AjaxResult.error("新增部门'" + dept.getDeptName() + "'失败,部门名称已存在");
}
dept.setCreateBy(SecurityUtils.getUsername());
return toAjax(deptService.insertDept(dept));
}
/**
* 修改部门
*/
@RequiresPermissions("system:dept:edit")
@Log(title = "部门管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@Validated @RequestBody SysDept dept)
{
Long deptId = dept.getDeptId();
deptService.checkDeptDataScope(deptId);
if (UserConstants.NOT_UNIQUE.equals(deptService.checkDeptNameUnique(dept)))
{
return AjaxResult.error("修改部门'" + dept.getDeptName() + "'失败,部门名称已存在");
}
else if (dept.getParentId().equals(deptId))
{
return AjaxResult.error("修改部门'" + dept.getDeptName() + "'失败,上级部门不能是自己");
}
else if (StringUtils.equals(UserConstants.DEPT_DISABLE, dept.getStatus()) && deptService.selectNormalChildrenDeptById(deptId) > 0)
{
return AjaxResult.error("该部门包含未停用的子部门!");
}
dept.setUpdateBy(SecurityUtils.getUsername());
return toAjax(deptService.updateDept(dept));
}
/**
* 删除部门
*/
@RequiresPermissions("system:dept:remove")
@Log(title = "部门管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{deptId}")
public AjaxResult remove(@PathVariable Long deptId)
{
if (deptService.hasChildByDeptId(deptId))
{
return AjaxResult.error("存在下级部门,不允许删除");
}
/* if (deptService.checkDeptExistUser(deptId))
{
return AjaxResult.error("部门存在用户,不允许删除");
}*/
deptService.checkDeptDataScope(deptId);
return toAjax(deptService.deleteDeptById(deptId));
}
}
@@ -0,0 +1,170 @@
package com.mhd.system.controller;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.mhd.common.core.domain.entity.R;
import com.mhd.common.core.web.page.TableDataInfoApi;
import com.mhd.system.domain.vo.SysDictDataVO;
import com.mhd.system.service.ISysDictDataService;
import com.mhd.system.service.ISysDictTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import com.mhd.common.core.utils.StringUtils;
import com.mhd.common.core.utils.poi.ExcelUtil;
import com.mhd.common.core.web.controller.BaseController;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.common.core.web.page.TableDataInfo;
import com.mhd.common.log.annotation.Log;
import com.mhd.common.log.enums.BusinessType;
import com.mhd.common.security.utils.SecurityUtils;
import com.mhd.system.api.domain.SysDictData;
/**
* 数据字典信息
*
* @author mhd
*/
@RestController
@RequestMapping("/dict/data")
public class SysDictDataController extends BaseController
{
@Autowired
private ISysDictDataService dictDataService;
@Autowired
private ISysDictTypeService dictTypeService;
// @RequiresPermissions("system:dict:list")
@GetMapping("/list")
public TableDataInfo list(SysDictData dictData)
{
startPage();
List<SysDictData> list = dictDataService.selectDictList(dictData);
return getDataTable(list);
}
@PostMapping("/getDictDataList")
public R<List<SysDictData>> getDictDataList(@RequestBody SysDictData sysDictData)
{
List<SysDictData> list = dictDataService.selectDictDataList(sysDictData);
return R.ok(list);
}
@GetMapping("/getList")
public AjaxResult getList(SysDictData dictData)
{
List<SysDictData> list = dictDataService.selectDictDataList(dictData);
return AjaxResult.success(list);
}
@Log(title = "字典数据", businessType = BusinessType.EXPORT)
// @RequiresPermissions("system:dict:export")
@PostMapping("/export")
public void export(HttpServletResponse response, SysDictData dictData)
{
List<SysDictData> list = dictDataService.selectDictDataList(dictData);
ExcelUtil<SysDictData> util = new ExcelUtil<SysDictData>(SysDictData.class);
util.exportExcel(response, list, "字典数据");
}
/**
* 查询字典数据详细
*/
// @RequiresPermissions("system:dict:query")
@GetMapping(value = "/{dictCode}")
public AjaxResult getInfo(@PathVariable Long dictCode)
{
return AjaxResult.success(dictDataService.selectDictDataById(dictCode));
}
/**
* 根据字典类型查询字典数据信息
*/
@GetMapping(value = "/type/{dictType}")
public AjaxResult dictType(@PathVariable(value = "dictType") String dictType)
{
List<SysDictData> data = dictTypeService.selectDictDataByType(dictType);
if (StringUtils.isNull(data))
{
data = new ArrayList<SysDictData>();
}
return AjaxResult.success(data);
}
/**
* 根据字典类型查询字典数据信息
*/
@GetMapping(value = "/selectDictDataByOpen")
public AjaxResult getDictDataByOpen(@RequestParam("dictType") String dictType, @RequestParam("topOrgId") Long topOrgId) {
List<SysDictData> data = dictDataService.getDictDataByOpen(dictType,topOrgId);
if (StringUtils.isNull(data)) {
data = new ArrayList<SysDictData>();
}
return AjaxResult.success(data);
}
/**
* 新增字典类型
*/
// @RequiresPermissions("system:dict:add")
@Log(title = "字典数据", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@Validated @RequestBody SysDictData dict)
{
return toAjax(dictDataService.insertDictData(dict));
}
/**
* 修改保存字典类型
*/
// @RequiresPermissions("system:dict:edit")
@Log(title = "字典数据", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@Validated @RequestBody SysDictData dict)
{
return toAjax(dictDataService.updateDictData(dict));
}
/**
* 删除字典类型
*/
// @RequiresPermissions("system:dict:remove")
@Log(title = "字典类型", businessType = BusinessType.DELETE)
@DeleteMapping("/{dictCodes}")
public AjaxResult remove(@PathVariable Long[] dictCodes)
{
dictDataService.deleteDictDataByIds(dictCodes);
return success();
}
/**
* @Description 获取全部数据字典
* @Author Alex
* @Date 2022/12/30 22:16
*/
@GetMapping("/datalist")
public AjaxResult datalist(SysDictData dictData)
{
SysDictDataVO sysDictDataVO = dictDataService.datalist(dictData);
return AjaxResult.success(sysDictDataVO);
}
@PostMapping("/findDatalist")
public AjaxResult findDatalist(@RequestBody SysDictData dictData)
{
List<SysDictData> list = dictDataService.selectDictDataList(dictData);
return AjaxResult.success(list);
}
/**
* 查询银行卡字典信息(图标+银行名称)
* @return
*/
@GetMapping("/bankInfoList")
public AjaxResult bankInfoList()
{
return AjaxResult.success(dictDataService.bankInfoList());
}
}
@@ -0,0 +1,133 @@
package com.mhd.system.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.mhd.system.service.ISysDictTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.mhd.common.core.constant.UserConstants;
import com.mhd.common.core.utils.poi.ExcelUtil;
import com.mhd.common.core.web.controller.BaseController;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.common.core.web.page.TableDataInfo;
import com.mhd.common.log.annotation.Log;
import com.mhd.common.log.enums.BusinessType;
import com.mhd.common.security.utils.SecurityUtils;
import com.mhd.system.api.domain.SysDictType;
/**
* 数据字典信息
*
* @author mhd
*/
@RestController
@RequestMapping("/dict/type")
public class SysDictTypeController extends BaseController
{
@Autowired
private ISysDictTypeService dictTypeService;
// @RequiresPermissions("system:dict:list")
@GetMapping("/list")
public TableDataInfo list(SysDictType dictType)
{
startPage();
List<SysDictType> list = dictTypeService.selectDictTypeList(dictType);
return getDataTable(list);
}
@Log(title = "字典类型", businessType = BusinessType.EXPORT)
// @RequiresPermissions("system:dict:export")
@PostMapping("/export")
public void export(HttpServletResponse response, SysDictType dictType)
{
List<SysDictType> list = dictTypeService.selectDictTypeList(dictType);
ExcelUtil<SysDictType> util = new ExcelUtil<SysDictType>(SysDictType.class);
util.exportExcel(response, list, "字典类型");
}
/**
* 查询字典类型详细
*/
// @RequiresPermissions("system:dict:query")
@GetMapping(value = "/{dictId}")
public AjaxResult getInfo(@PathVariable Long dictId)
{
return AjaxResult.success(dictTypeService.selectDictTypeById(dictId));
}
/**
* 新增字典类型
*/
// @RequiresPermissions("system:dict:add")
@Log(title = "字典类型", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@Validated @RequestBody SysDictType dict)
{
if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict)))
{
return AjaxResult.error("新增字典'" + dict.getDictName() + "'失败,字典类型已存在");
}
dict.setCreateBy(SecurityUtils.getUsername());
return toAjax(dictTypeService.insertDictType(dict));
}
/**
* 修改字典类型
*/
// @RequiresPermissions("system:dict:edit")
@Log(title = "字典类型", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@Validated @RequestBody SysDictType dict)
{
if (UserConstants.NOT_UNIQUE.equals(dictTypeService.checkDictTypeUnique(dict)))
{
return AjaxResult.error("修改字典'" + dict.getDictName() + "'失败,字典类型已存在");
}
dict.setUpdateBy(SecurityUtils.getUsername());
return toAjax(dictTypeService.updateDictType(dict));
}
/**
* 删除字典类型
*/
// @RequiresPermissions("system:dict:remove")
@Log(title = "字典类型", businessType = BusinessType.DELETE)
@DeleteMapping("/{dictIds}")
public AjaxResult remove(@PathVariable Long[] dictIds)
{
dictTypeService.deleteDictTypeByIds(dictIds);
return success();
}
/**
* 刷新字典缓存
*/
// @RequiresPermissions("system:dict:remove")
@Log(title = "字典类型", businessType = BusinessType.CLEAN)
@DeleteMapping("/refreshCache")
public AjaxResult refreshCache()
{
dictTypeService.resetDictCache();
return AjaxResult.success();
}
/**
* 获取字典选择框列表
*/
@GetMapping("/optionselect")
public AjaxResult optionselect()
{
List<SysDictType> dictTypes = dictTypeService.selectDictTypeAll();
return AjaxResult.success(dictTypes);
}
}
@@ -0,0 +1,105 @@
package com.mhd.system.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.mhd.system.domain.SysEquipmentGps;
import com.mhd.system.service.ISysEquipmentGpsService;
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.mhd.common.log.annotation.Log;
import com.mhd.common.log.enums.BusinessType;
import com.mhd.common.security.annotation.RequiresPermissions;
import com.mhd.common.core.web.controller.BaseController;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.common.core.utils.poi.ExcelUtil;
import com.mhd.common.core.web.page.TableDataInfo;
/**
* 设备管理 -- GPS管理Controller
*
* @author mhd
* @date 2022-07-28
*/
@RestController
@RequestMapping("/gps")
public class SysEquipmentGpsController extends BaseController
{
@Autowired
private ISysEquipmentGpsService sysEquipmentGpsService;
/**
* 查询设备管理 -- GPS管理列表
*/
@RequiresPermissions("system:gps:list")
@GetMapping("/list")
public TableDataInfo list(SysEquipmentGps sysEquipmentGps)
{
startPage();
List<SysEquipmentGps> list = sysEquipmentGpsService.selectSysEquipmentGpsList(sysEquipmentGps);
return getDataTable(list);
}
/**
* 导出设备管理 -- GPS管理列表
*/
@RequiresPermissions("system:gps:export")
@Log(title = "设备管理 -- GPS管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SysEquipmentGps sysEquipmentGps)
{
List<SysEquipmentGps> list = sysEquipmentGpsService.selectSysEquipmentGpsList(sysEquipmentGps);
ExcelUtil<SysEquipmentGps> util = new ExcelUtil<SysEquipmentGps>(SysEquipmentGps.class);
util.exportExcel(response, list, "设备管理 -- GPS管理数据");
}
/**
* 获取设备管理 -- GPS管理详细信息
*/
@RequiresPermissions("system:gps:query")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(sysEquipmentGpsService.selectSysEquipmentGpsById(id));
}
/**
* 新增设备管理 -- GPS管理
*/
@RequiresPermissions("system:gps:add")
@Log(title = "设备管理 -- GPS管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SysEquipmentGps sysEquipmentGps)
{
return toAjax(sysEquipmentGpsService.insertSysEquipmentGps(sysEquipmentGps));
}
/**
* 修改设备管理 -- GPS管理
*/
@RequiresPermissions("system:gps:edit")
@Log(title = "设备管理 -- GPS管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SysEquipmentGps sysEquipmentGps)
{
return toAjax(sysEquipmentGpsService.updateSysEquipmentGps(sysEquipmentGps));
}
/**
* 删除设备管理 -- GPS管理
*/
@RequiresPermissions("system:gps:remove")
@Log(title = "设备管理 -- GPS管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sysEquipmentGpsService.deleteSysEquipmentGpsByIds(ids));
}
}
@@ -0,0 +1,105 @@
package com.mhd.system.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.mhd.system.domain.SysEquipmentPrinter;
import com.mhd.system.service.ISysEquipmentPrinterService;
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.mhd.common.log.annotation.Log;
import com.mhd.common.log.enums.BusinessType;
import com.mhd.common.security.annotation.RequiresPermissions;
import com.mhd.common.core.web.controller.BaseController;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.common.core.utils.poi.ExcelUtil;
import com.mhd.common.core.web.page.TableDataInfo;
/**
* 设备管理 -- 打印机管理Controller
*
* @author mhd
* @date 2022-07-28
*/
@RestController
@RequestMapping("/printer")
public class SysEquipmentPrinterController extends BaseController
{
@Autowired
private ISysEquipmentPrinterService sysEquipmentPrinterService;
/**
* 查询设备管理 -- 打印机管理列表
*/
@RequiresPermissions("system:printer:list")
@GetMapping("/list")
public TableDataInfo list(SysEquipmentPrinter sysEquipmentPrinter)
{
startPage();
List<SysEquipmentPrinter> list = sysEquipmentPrinterService.selectSysEquipmentPrinterList(sysEquipmentPrinter);
return getDataTable(list);
}
/**
* 导出设备管理 -- 打印机管理列表
*/
@RequiresPermissions("system:printer:export")
@Log(title = "设备管理 -- 打印机管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SysEquipmentPrinter sysEquipmentPrinter)
{
List<SysEquipmentPrinter> list = sysEquipmentPrinterService.selectSysEquipmentPrinterList(sysEquipmentPrinter);
ExcelUtil<SysEquipmentPrinter> util = new ExcelUtil<SysEquipmentPrinter>(SysEquipmentPrinter.class);
util.exportExcel(response, list, "设备管理 -- 打印机管理数据");
}
/**
* 获取设备管理 -- 打印机管理详细信息
*/
@RequiresPermissions("system:printer:query")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(sysEquipmentPrinterService.selectSysEquipmentPrinterById(id));
}
/**
* 新增设备管理 -- 打印机管理
*/
@RequiresPermissions("system:printer:add")
@Log(title = "设备管理 -- 打印机管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SysEquipmentPrinter sysEquipmentPrinter)
{
return toAjax(sysEquipmentPrinterService.insertSysEquipmentPrinter(sysEquipmentPrinter));
}
/**
* 修改设备管理 -- 打印机管理
*/
@RequiresPermissions("system:printer:edit")
@Log(title = "设备管理 -- 打印机管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SysEquipmentPrinter sysEquipmentPrinter)
{
return toAjax(sysEquipmentPrinterService.updateSysEquipmentPrinter(sysEquipmentPrinter));
}
/**
* 删除设备管理 -- 打印机管理
*/
@RequiresPermissions("system:printer:remove")
@Log(title = "设备管理 -- 打印机管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sysEquipmentPrinterService.deleteSysEquipmentPrinterByIds(ids));
}
}
@@ -0,0 +1,105 @@
package com.mhd.system.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.mhd.system.domain.SysEquipmentTemplate;
import com.mhd.system.service.ISysEquipmentTemplateService;
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.mhd.common.log.annotation.Log;
import com.mhd.common.log.enums.BusinessType;
import com.mhd.common.security.annotation.RequiresPermissions;
import com.mhd.common.core.web.controller.BaseController;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.common.core.utils.poi.ExcelUtil;
import com.mhd.common.core.web.page.TableDataInfo;
/**
* 设备管理 -- 打印模板Controller
*
* @author mhd
* @date 2022-07-28
*/
@RestController
@RequestMapping("/template")
public class SysEquipmentTemplateController extends BaseController
{
@Autowired
private ISysEquipmentTemplateService sysEquipmentTemplateService;
/**
* 查询设备管理 -- 打印模板列表
*/
@RequiresPermissions("system:template:list")
@GetMapping("/list")
public TableDataInfo list(SysEquipmentTemplate sysEquipmentTemplate)
{
startPage();
List<SysEquipmentTemplate> list = sysEquipmentTemplateService.selectSysEquipmentTemplateList(sysEquipmentTemplate);
return getDataTable(list);
}
/**
* 导出设备管理 -- 打印模板列表
*/
@RequiresPermissions("system:template:export")
@Log(title = "设备管理 -- 打印模板", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SysEquipmentTemplate sysEquipmentTemplate)
{
List<SysEquipmentTemplate> list = sysEquipmentTemplateService.selectSysEquipmentTemplateList(sysEquipmentTemplate);
ExcelUtil<SysEquipmentTemplate> util = new ExcelUtil<SysEquipmentTemplate>(SysEquipmentTemplate.class);
util.exportExcel(response, list, "设备管理 -- 打印模板数据");
}
/**
* 获取设备管理 -- 打印模板详细信息
*/
@RequiresPermissions("system:template:query")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(sysEquipmentTemplateService.selectSysEquipmentTemplateById(id));
}
/**
* 新增设备管理 -- 打印模板
*/
@RequiresPermissions("system:template:add")
@Log(title = "设备管理 -- 打印模板", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SysEquipmentTemplate sysEquipmentTemplate)
{
return toAjax(sysEquipmentTemplateService.insertSysEquipmentTemplate(sysEquipmentTemplate));
}
/**
* 修改设备管理 -- 打印模板
*/
@RequiresPermissions("system:template:edit")
@Log(title = "设备管理 -- 打印模板", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SysEquipmentTemplate sysEquipmentTemplate)
{
return toAjax(sysEquipmentTemplateService.updateSysEquipmentTemplate(sysEquipmentTemplate));
}
/**
* 删除设备管理 -- 打印模板
*/
@RequiresPermissions("system:template:remove")
@Log(title = "设备管理 -- 打印模板", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sysEquipmentTemplateService.deleteSysEquipmentTemplateByIds(ids));
}
}
@@ -0,0 +1,53 @@
package com.mhd.system.controller;
import java.util.List;
import com.mhd.system.domain.dto.SysLogininforDTO;
import com.mhd.system.service.ISysLogininforService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.mhd.common.core.web.controller.BaseController;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.common.core.web.page.TableDataInfo;
import com.mhd.common.security.annotation.InnerAuth;
import com.mhd.system.api.domain.SysLogininforPo;
/**
* 系统访问记录
*
* @author mhd
*/
@RestController
@RequestMapping("/logininfor")
public class SysLogininforController extends BaseController
{
@Autowired
private ISysLogininforService logininforService;
@GetMapping("/list")
public TableDataInfo list(SysLogininforDTO sysLogininforDto)
{
startPage();
List<SysLogininforPo> list = logininforService.selectLogininforList(sysLogininforDto);
return getDataTable(list);
}
@DeleteMapping("/clean")
public AjaxResult clean()
{
logininforService.cleanLogininfor();
return AjaxResult.success();
}
@InnerAuth
@PostMapping
public AjaxResult add(@RequestBody SysLogininforPo logininfor)
{
return toAjax(logininforService.insertLogininfor(logininfor));
}
}
@@ -0,0 +1,176 @@
package com.mhd.system.controller;
import java.util.List;
import com.mhd.system.domain.SysMenu;
import com.mhd.system.service.ISysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.mhd.common.core.constant.UserConstants;
import com.mhd.common.core.utils.StringUtils;
import com.mhd.common.core.web.controller.BaseController;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.common.log.annotation.Log;
import com.mhd.common.log.enums.BusinessType;
import com.mhd.common.security.annotation.RequiresPermissions;
import com.mhd.common.security.utils.SecurityUtils;
/**
* 菜单信息
*
* @author mhd
*/
@RestController
@RequestMapping("/menu")
public class SysMenuController extends BaseController
{
@Autowired
private ISysMenuService menuService;
/**
* 获取菜单列表
*/
@RequiresPermissions("system:menu:list")
@GetMapping("/list")
public AjaxResult list(SysMenu menu)
{
Long userId = SecurityUtils.getLoginUser().getUserid();
List<SysMenu> menus = menuService.selectMenuList(menu, userId);
return AjaxResult.success(menus);
}
/**
* 根据菜单编号获取详细信息
*/
@RequiresPermissions("system:menu:query")
@GetMapping(value = "/{menuId}")
public AjaxResult getInfo(@PathVariable Long menuId)
{
return AjaxResult.success(menuService.selectMenuById(menuId));
}
/**
* 获取菜单下拉树列表
*/
@GetMapping("/treeselect")
public AjaxResult treeselect(SysMenu menu)
{
Long userId = SecurityUtils.getLoginUser().getUserid();
List<SysMenu> menus = menuService.selectMenuList(menu, userId);
return AjaxResult.success(menuService.buildMenuTreeSelect(menus));
}
/**
* 加载对应角色菜单列表树
*/
@GetMapping(value = "/roleMenuTreeselect/{roleId}")
public AjaxResult roleMenuTreeselect(@PathVariable("roleId") Long roleId)
{
Long userId = SecurityUtils.getLoginUser().getUserid();
List<SysMenu> menus = menuService.selectMenuList(userId);
AjaxResult ajax = AjaxResult.success();
ajax.put("checkedKeys", menuService.selectMenuListByRoleId(roleId));
ajax.put("menus", menuService.buildMenuTreeSelect(menus));
return ajax;
}
/**
* 新增菜单
*/
@RequiresPermissions("system:menu:add")
@Log(title = "菜单管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@Validated @RequestBody SysMenu menu)
{
if (UserConstants.NOT_UNIQUE.equals(menuService.checkMenuNameUnique(menu)))
{
return AjaxResult.error("新增菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
}
else if (UserConstants.YES_FRAME.equals(menu.getIsFrame()) && !StringUtils.ishttp(menu.getPath()))
{
return AjaxResult.error("新增菜单'" + menu.getMenuName() + "'失败,地址必须以http(s)://开头");
}
menu.setCreateBy(SecurityUtils.getUsername());
return toAjax(menuService.insertMenu(menu));
}
/**
* 修改菜单
*/
@RequiresPermissions("system:menu:edit")
@Log(title = "菜单管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@Validated @RequestBody SysMenu menu)
{
if (UserConstants.NOT_UNIQUE.equals(menuService.checkMenuNameUnique(menu)))
{
return AjaxResult.error("修改菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
}
else if (UserConstants.YES_FRAME.equals(menu.getIsFrame()) && !StringUtils.ishttp(menu.getPath()))
{
return AjaxResult.error("修改菜单'" + menu.getMenuName() + "'失败,地址必须以http(s)://开头");
}
else if (menu.getMenuId().equals(menu.getParentId()))
{
return AjaxResult.error("修改菜单'" + menu.getMenuName() + "'失败,上级菜单不能选择自己");
}
menu.setUpdateBy(SecurityUtils.getUsername());
return toAjax(menuService.updateMenu(menu));
}
/**
* 删除菜单
*/
@RequiresPermissions("system:menu:remove")
@Log(title = "菜单管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{menuId}")
public AjaxResult remove(@PathVariable("menuId") Long menuId)
{
if (menuService.hasChildByMenuId(menuId))
{
return AjaxResult.error("存在子菜单,不允许删除");
}
if (menuService.checkMenuExistRole(menuId))
{
return AjaxResult.error("菜单已分配,不允许删除");
}
return toAjax(menuService.deleteMenuById(menuId));
}
/**
* 获取路由信息
*
* @return 路由信息
*/
@GetMapping("getRouters")
public AjaxResult getRouters()
{
Long userId = SecurityUtils.getLoginUser().getUserid();
List<SysMenu> menus = menuService.selectMenuTreeByUserId(userId);
return AjaxResult.success(menuService.buildMenus(menus));
}
/**
* 加载对应角色菜单列表树
*/
@GetMapping(value = "/productMenuTreeselect/{productId}")
public AjaxResult productMenuTreeselect(@PathVariable("productId") Long productId)
{
Long userId = SecurityUtils.getLoginUser().getUserid();
List<SysMenu> menus = menuService.selectMenuList(userId);
AjaxResult ajax = AjaxResult.success();
ajax.put("checkedKeys", menuService.selectMenuListByProductId(productId));
ajax.put("menus", menuService.buildMenuTreeSelect(menus));
return ajax;
}
}
@@ -0,0 +1,105 @@
package com.mhd.system.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.mhd.system.domain.SysMsgCenter;
import com.mhd.system.service.ISysMsgCenterService;
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.mhd.common.log.annotation.Log;
import com.mhd.common.log.enums.BusinessType;
import com.mhd.common.security.annotation.RequiresPermissions;
import com.mhd.common.core.web.controller.BaseController;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.common.core.utils.poi.ExcelUtil;
import com.mhd.common.core.web.page.TableDataInfo;
/**
* 消息中心-站内Controller
*
* @author mhd
* @date 2022-07-27
*/
@RestController
@RequestMapping("/center")
public class SysMsgCenterController extends BaseController
{
@Autowired
private ISysMsgCenterService sysMsgCenterService;
/**
* 查询消息中心-站内列表
*/
@RequiresPermissions("system:center:list")
@GetMapping("/list")
public TableDataInfo list(SysMsgCenter sysMsgCenter)
{
startPage();
List<SysMsgCenter> list = sysMsgCenterService.selectSysMsgCenterList(sysMsgCenter);
return getDataTable(list);
}
/**
* 导出消息中心-站内列表
*/
@RequiresPermissions("system:center:export")
@Log(title = "消息中心-站内", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SysMsgCenter sysMsgCenter)
{
List<SysMsgCenter> list = sysMsgCenterService.selectSysMsgCenterList(sysMsgCenter);
ExcelUtil<SysMsgCenter> util = new ExcelUtil<SysMsgCenter>(SysMsgCenter.class);
util.exportExcel(response, list, "消息中心-站内数据");
}
/**
* 获取消息中心-站内详细信息
*/
@RequiresPermissions("system:center:query")
@GetMapping(value = "/{msgCenterId}")
public AjaxResult getInfo(@PathVariable("msgCenterId") Long msgCenterId)
{
return AjaxResult.success(sysMsgCenterService.selectSysMsgCenterByMsgCenterId(msgCenterId));
}
/**
* 新增消息中心-站内
*/
@RequiresPermissions("system:center:add")
@Log(title = "消息中心-站内", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SysMsgCenter sysMsgCenter)
{
return toAjax(sysMsgCenterService.insertSysMsgCenter(sysMsgCenter));
}
/**
* 修改消息中心-站内
*/
@RequiresPermissions("system:center:edit")
@Log(title = "消息中心-站内", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SysMsgCenter sysMsgCenter)
{
return toAjax(sysMsgCenterService.updateSysMsgCenter(sysMsgCenter));
}
/**
* 删除消息中心-站内
*/
@RequiresPermissions("system:center:remove")
@Log(title = "消息中心-站内", businessType = BusinessType.DELETE)
@DeleteMapping("/{msgCenterIds}")
public AjaxResult remove(@PathVariable Long[] msgCenterIds)
{
return toAjax(sysMsgCenterService.deleteSysMsgCenterByMsgCenterIds(msgCenterIds));
}
}
@@ -0,0 +1,107 @@
package com.mhd.system.controller;
import java.util.List;
import com.mhd.system.domain.SysMsgPush;
import com.mhd.system.domain.dto.SysMsgPushDTO;
import com.mhd.system.service.ISysMsgPushService;
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.mhd.common.log.annotation.Log;
import com.mhd.common.log.enums.BusinessType;
import com.mhd.common.security.annotation.RequiresPermissions;
import com.mhd.common.core.web.controller.BaseController;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.common.core.web.page.TableDataInfo;
/**
* 消息推送Controller
*
* @author mhd
* @date 2022-07-27
*/
@RestController
@RequestMapping("/push")
public class SysMsgPushController extends BaseController
{
@Autowired
private ISysMsgPushService sysMsgPushService;
/**
* 查询消息推送列表
*/
@RequiresPermissions("system:push:list")
@GetMapping("/list")
public TableDataInfo list(SysMsgPushDTO sysMsgPushDto)
{
startPage();
List<SysMsgPush> list = sysMsgPushService.selectSysMsgPushList(sysMsgPushDto);
return getDataTable(list);
}
/**
* 导出消息推送列表
*/
/* @RequiresPermissions("system:push:export")
@Log(title = "消息推送", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SysMsgPush sysMsgPush)
{
List<SysMsgPush> list = sysMsgPushService.selectSysMsgPushList(sysMsgPush);
ExcelUtil<SysMsgPush> util = new ExcelUtil<SysMsgPush>(SysMsgPush.class);
util.exportExcel(response, list, "消息推送数据");
}*/
/**
* 获取消息推送详细信息
*/
@RequiresPermissions("system:push:query")
@GetMapping(value = "/{msgPushId}")
public AjaxResult getInfo(@PathVariable("msgPushId") Long msgPushId)
{
return AjaxResult.success(sysMsgPushService.selectSysMsgPushByMsgPushId(msgPushId));
}
/**
* 新增消息推送
*/
@RequiresPermissions("system:push:add")
@Log(title = "消息推送", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SysMsgPush sysMsgPush)
{
return toAjax(sysMsgPushService.insertSysMsgPush(sysMsgPush));
}
/**
* 修改消息推送
*/
@RequiresPermissions("system:push:edit")
@Log(title = "消息推送", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SysMsgPush sysMsgPush)
{
AjaxResult ajaxResult = toAjax(sysMsgPushService.updateSysMsgPush(sysMsgPush));
return ajaxResult;
}
/**
* 删除消息推送
*/
@RequiresPermissions("system:push:remove")
@Log(title = "消息推送", businessType = BusinessType.DELETE)
@DeleteMapping("/{msgIds}")
public AjaxResult remove(@PathVariable Long[] msgIds)
{
return toAjax(sysMsgPushService.deleteSysMsgPushByMsgIds(msgIds));
}
}
@@ -0,0 +1,93 @@
package com.mhd.system.controller;
import java.util.List;
import com.mhd.system.domain.SysNotice;
import com.mhd.system.service.ISysNoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.mhd.common.core.web.controller.BaseController;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.common.core.web.page.TableDataInfo;
import com.mhd.common.log.annotation.Log;
import com.mhd.common.log.enums.BusinessType;
import com.mhd.common.security.annotation.RequiresPermissions;
import com.mhd.common.security.utils.SecurityUtils;
/**
* 公告 信息操作处理
*
* @author mhd
*/
@RestController
@RequestMapping("/notice")
public class SysNoticeController extends BaseController
{
@Autowired
private ISysNoticeService noticeService;
/**
* 获取通知公告列表
*/
@RequiresPermissions("system:notice:list")
@GetMapping("/list")
public TableDataInfo list(SysNotice notice)
{
startPage();
List<SysNotice> list = noticeService.selectNoticeList(notice);
return getDataTable(list);
}
/**
* 根据通知公告编号获取详细信息
*/
@RequiresPermissions("system:notice:query")
@GetMapping(value = "/{noticeId}")
public AjaxResult getInfo(@PathVariable Long noticeId)
{
return AjaxResult.success(noticeService.selectNoticeById(noticeId));
}
/**
* 新增通知公告
*/
@RequiresPermissions("system:notice:add")
@Log(title = "通知公告", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@Validated @RequestBody SysNotice notice)
{
notice.setCreateBy(SecurityUtils.getUsername());
return toAjax(noticeService.insertNotice(notice));
}
/**
* 修改通知公告
*/
@RequiresPermissions("system:notice:edit")
@Log(title = "通知公告", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@Validated @RequestBody SysNotice notice)
{
notice.setUpdateBy(SecurityUtils.getUsername());
return toAjax(noticeService.updateNotice(notice));
}
/**
* 删除通知公告
*/
@RequiresPermissions("system:notice:remove")
@Log(title = "通知公告", businessType = BusinessType.DELETE)
@DeleteMapping("/{noticeIds}")
public AjaxResult remove(@PathVariable Long[] noticeIds)
{
return toAjax(noticeService.deleteNoticeByIds(noticeIds));
}
}
@@ -0,0 +1,61 @@
package com.mhd.system.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.mhd.system.domain.dto.SysOperLogDTO;
import com.mhd.system.service.ISysOperLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.mhd.common.core.utils.poi.ExcelUtil;
import com.mhd.common.core.web.controller.BaseController;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.common.core.web.page.TableDataInfo;
import com.mhd.common.log.annotation.Log;
import com.mhd.common.log.enums.BusinessType;
import com.mhd.common.security.annotation.InnerAuth;
import com.mhd.common.security.annotation.RequiresPermissions;
import com.mhd.system.api.domain.SysOperLogPo;
/**
* 操作日志记录
*
* @author mhd
*/
@RestController
@RequestMapping("/operlog")
public class SysOperlogController extends BaseController
{
@Autowired
private ISysOperLogService operLogService;
@GetMapping("/list")
public TableDataInfo list(SysOperLogDTO sysOperLogDTO)
{
startPage();
List<SysOperLogPo> list = operLogService.selectOperLogList(sysOperLogDTO);
return getDataTable(list);
}
@RequiresPermissions("system:operlog:remove")
@Log(title = "操作日志", businessType = BusinessType.CLEAN)
@DeleteMapping("/clean")
public AjaxResult clean()
{
operLogService.cleanOperLog();
return AjaxResult.success();
}
@InnerAuth
@PostMapping
public AjaxResult add(@RequestBody SysOperLogPo operLog)
{
return toAjax(operLogService.insertOperlog(operLog));
}
}
@@ -0,0 +1,107 @@
package com.mhd.system.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.mhd.system.domain.SysPlatCompany;
import com.mhd.system.domain.dto.SysPlatCompanyDTO;
import com.mhd.system.domain.vo.SysPlatCompanyVO;
import com.mhd.system.service.ISysPlatCompanyService;
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.mhd.common.log.annotation.Log;
import com.mhd.common.log.enums.BusinessType;
import com.mhd.common.security.annotation.RequiresPermissions;
import com.mhd.common.core.web.controller.BaseController;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.common.core.utils.poi.ExcelUtil;
import com.mhd.common.core.web.page.TableDataInfo;
/**
* 公司系统平台Controller
*
* @author mhd
* @date 2022-07-26
*/
@RestController
@RequestMapping("/playCompany")
public class SysPlatCompanyController extends BaseController
{
@Autowired
private ISysPlatCompanyService sysPlatCompanyService;
/**
* 查询公司系统平台列表
*/
@RequiresPermissions("system:playCompany:list")
@GetMapping("/list")
public TableDataInfo list(SysPlatCompanyDTO sysPlatCompanyDTO)
{
startPage();
List<SysPlatCompanyVO> list = sysPlatCompanyService.selectSysPlatCompanyList(sysPlatCompanyDTO);
return getDataTable(list);
}
/**
* 导出公司系统平台列表
*/
@RequiresPermissions("system:playCompany:export")
@Log(title = "公司系统平台", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SysPlatCompanyDTO sysPlatCompanyDTO)
{
List<SysPlatCompanyVO> list = sysPlatCompanyService.selectSysPlatCompanyList(sysPlatCompanyDTO);
ExcelUtil<SysPlatCompanyVO> util = new ExcelUtil<SysPlatCompanyVO>(SysPlatCompanyVO.class);
util.exportExcel(response, list, "公司系统平台数据");
}
/**
* 获取公司系统平台详细信息
*/
@RequiresPermissions("system:playCompany:query")
@GetMapping(value = "/{sysPlatId}")
public AjaxResult getInfo(@PathVariable("sysPlatId") Long sysPlatId)
{
return AjaxResult.success(sysPlatCompanyService.selectSysPlatCompanyBySysPlatId(sysPlatId));
}
/**
* 新增公司系统平台
*/
@RequiresPermissions("system:playCompany:add")
@Log(title = "公司系统平台", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SysPlatCompany sysPlatCompany)
{
return toAjax(sysPlatCompanyService.insertSysPlatCompany(sysPlatCompany));
}
/**
* 修改公司系统平台
*/
@RequiresPermissions("system:playCompany:edit")
@Log(title = "公司系统平台", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SysPlatCompany sysPlatCompany)
{
return toAjax(sysPlatCompanyService.updateSysPlatCompany(sysPlatCompany));
}
/**
* 删除公司系统平台
*/
@RequiresPermissions("system:playCompany:remove")
@Log(title = "公司系统平台", businessType = BusinessType.DELETE)
@DeleteMapping("/{sysPlatIds}")
public AjaxResult remove(@PathVariable Long[] sysPlatIds)
{
return toAjax(sysPlatCompanyService.deleteSysPlatCompanyBySysPlatIds(sysPlatIds));
}
}
@@ -0,0 +1,132 @@
package com.mhd.system.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.mhd.system.domain.SysPost;
import com.mhd.system.service.ISysPostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.mhd.common.core.constant.UserConstants;
import com.mhd.common.core.utils.poi.ExcelUtil;
import com.mhd.common.core.web.controller.BaseController;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.common.core.web.page.TableDataInfo;
import com.mhd.common.log.annotation.Log;
import com.mhd.common.log.enums.BusinessType;
import com.mhd.common.security.annotation.RequiresPermissions;
import com.mhd.common.security.utils.SecurityUtils;
/**
* 岗位信息操作处理
*
* @author mhd
*/
@RestController
@RequestMapping("/post")
public class SysPostController extends BaseController
{
@Autowired
private ISysPostService postService;
/**
* 获取岗位列表
*/
@RequiresPermissions("system:post:list")
@GetMapping("/list")
public TableDataInfo list(SysPost post)
{
startPage();
List<SysPost> list = postService.selectPostList(post);
return getDataTable(list);
}
@Log(title = "岗位管理", businessType = BusinessType.EXPORT)
@RequiresPermissions("system:post:export")
@PostMapping("/export")
public void export(HttpServletResponse response, SysPost post)
{
List<SysPost> list = postService.selectPostList(post);
ExcelUtil<SysPost> util = new ExcelUtil<SysPost>(SysPost.class);
util.exportExcel(response, list, "岗位数据");
}
/**
* 根据岗位编号获取详细信息
*/
@RequiresPermissions("system:post:query")
@GetMapping(value = "/{postId}")
public AjaxResult getInfo(@PathVariable Long postId)
{
return AjaxResult.success(postService.selectPostById(postId));
}
/**
* 新增岗位
*/
@RequiresPermissions("system:post:add")
@Log(title = "岗位管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@Validated @RequestBody SysPost post)
{
if (UserConstants.NOT_UNIQUE.equals(postService.checkPostNameUnique(post)))
{
return AjaxResult.error("新增岗位'" + post.getPostName() + "'失败,岗位名称已存在");
}
else if (UserConstants.NOT_UNIQUE.equals(postService.checkPostCodeUnique(post)))
{
return AjaxResult.error("新增岗位'" + post.getPostName() + "'失败,岗位编码已存在");
}
post.setCreateBy(SecurityUtils.getUsername());
return toAjax(postService.insertPost(post));
}
/**
* 修改岗位
*/
@RequiresPermissions("system:post:edit")
@Log(title = "岗位管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@Validated @RequestBody SysPost post)
{
if (UserConstants.NOT_UNIQUE.equals(postService.checkPostNameUnique(post)))
{
return AjaxResult.error("修改岗位'" + post.getPostName() + "'失败,岗位名称已存在");
}
else if (UserConstants.NOT_UNIQUE.equals(postService.checkPostCodeUnique(post)))
{
return AjaxResult.error("修改岗位'" + post.getPostName() + "'失败,岗位编码已存在");
}
post.setUpdateBy(SecurityUtils.getUsername());
return toAjax(postService.updatePost(post));
}
/**
* 删除岗位
*/
@RequiresPermissions("system:post:remove")
@Log(title = "岗位管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{postIds}")
public AjaxResult remove(@PathVariable Long[] postIds)
{
return toAjax(postService.deletePostByIds(postIds));
}
/**
* 获取岗位选择框列表
*/
@GetMapping("/optionselect")
public AjaxResult optionselect()
{
List<SysPost> posts = postService.selectPostAll();
return AjaxResult.success(posts);
}
}
@@ -0,0 +1,118 @@
package com.mhd.system.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.mhd.system.domain.SysProduct;
import com.mhd.system.domain.dto.SysProductDTO;
import com.mhd.system.domain.vo.TreeSelect;
import com.mhd.system.service.ISysProductService;
import com.mhd.system.service.ISysRoleService;
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.mhd.common.log.annotation.Log;
import com.mhd.common.log.enums.BusinessType;
import com.mhd.common.security.annotation.RequiresPermissions;
import com.mhd.common.core.web.controller.BaseController;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.common.core.utils.poi.ExcelUtil;
import com.mhd.common.core.web.page.TableDataInfo;
/**
* 系统产品Controller
*
* @author mhd
* @date 2022-07-21
*/
@RestController
@RequestMapping("/product")
public class SysProductController extends BaseController
{
@Autowired
private ISysProductService sysProductService;
@Autowired
private ISysRoleService roleService;
/**
* 查询系统产品列表
*/
@RequiresPermissions("system:product:list")
@GetMapping("/list")
public TableDataInfo list(SysProduct sysProduct)
{
startPage();
List<SysProduct> list = sysProductService.selectSysProductList(sysProduct);
return getDataTable(list);
}
/**
* 导出系统产品列表
*/
@RequiresPermissions("system:product:export")
@Log(title = "系统产品", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SysProduct sysProduct)
{
List<SysProduct> list = sysProductService.selectSysProductList(sysProduct);
ExcelUtil<SysProduct> util = new ExcelUtil<SysProduct>(SysProduct.class);
util.exportExcel(response, list, "系统产品数据");
}
/**
* 获取系统产品详细信息
*/
@RequiresPermissions("system:product:query")
@GetMapping(value = "/{productId}")
public AjaxResult getInfo(@PathVariable("productId") Long productId)
{
return AjaxResult.success(sysProductService.selectSysProductByProductId(productId));
}
/**
* 新增系统产品
*/
@RequiresPermissions("system:product:add")
@Log(title = "系统产品", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SysProductDTO sysProduct)
{
return toAjax(sysProductService.insertSysProduct(sysProduct));
}
/**
* 修改系统产品
*/
@RequiresPermissions("system:product:edit")
@Log(title = "系统产品", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SysProductDTO sysProduct)
{
return toAjax(sysProductService.updateSysProduct(sysProduct));
}
/**
* 删除系统产品
*/
@RequiresPermissions("system:product:remove")
@Log(title = "系统产品", businessType = BusinessType.DELETE)
@DeleteMapping("/{productIds}")
public AjaxResult remove(@PathVariable Long[] productIds)
{
return toAjax(sysProductService.deleteSysProductByProductIds(productIds));
}
@RequiresPermissions("system:product:list")
@GetMapping("/prodectTreeList")
public AjaxResult prodectTreeList()
{
List<TreeSelect> list = sysProductService.selectProductTreeList();
return AjaxResult.success(list);
}
}
@@ -0,0 +1,105 @@
package com.mhd.system.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.mhd.system.domain.SysProductMenu;
import com.mhd.system.service.ISysProductMenuService;
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.mhd.common.log.annotation.Log;
import com.mhd.common.log.enums.BusinessType;
import com.mhd.common.security.annotation.RequiresPermissions;
import com.mhd.common.core.web.controller.BaseController;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.common.core.utils.poi.ExcelUtil;
import com.mhd.common.core.web.page.TableDataInfo;
/**
* 【请填写功能名称】Controller
*
* @author mhd
* @date 2022-07-21
*/
@RestController
@RequestMapping("/product/menu")
public class SysProductMenuController extends BaseController
{
@Autowired
private ISysProductMenuService sysProductMenuService;
/**
* 查询【请填写功能名称】列表
*/
@RequiresPermissions("system:menu:list")
@GetMapping("/list")
public TableDataInfo list(SysProductMenu sysProductMenu)
{
startPage();
List<SysProductMenu> list = sysProductMenuService.selectSysProductMenuList(sysProductMenu);
return getDataTable(list);
}
/**
* 导出【请填写功能名称】列表
*/
@RequiresPermissions("system:menu:export")
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SysProductMenu sysProductMenu)
{
List<SysProductMenu> list = sysProductMenuService.selectSysProductMenuList(sysProductMenu);
ExcelUtil<SysProductMenu> util = new ExcelUtil<SysProductMenu>(SysProductMenu.class);
util.exportExcel(response, list, "【请填写功能名称】数据");
}
/**
* 获取【请填写功能名称】详细信息
*/
@RequiresPermissions("system:menu:query")
@GetMapping(value = "/{productId}")
public AjaxResult getInfo(@PathVariable("productId") Long productId)
{
return AjaxResult.success(sysProductMenuService.selectSysProductMenuByProductId(productId));
}
/**
* 新增【请填写功能名称】
*/
@RequiresPermissions("system:menu:add")
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SysProductMenu sysProductMenu)
{
return toAjax(sysProductMenuService.insertSysProductMenu(sysProductMenu));
}
/**
* 修改【请填写功能名称】
*/
@RequiresPermissions("system:menu:edit")
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SysProductMenu sysProductMenu)
{
return toAjax(sysProductMenuService.updateSysProductMenu(sysProductMenu));
}
/**
* 删除【请填写功能名称】
*/
@RequiresPermissions("system:menu:remove")
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
@DeleteMapping("/{productIds}")
public AjaxResult remove(@PathVariable Long[] productIds)
{
return toAjax(sysProductMenuService.deleteSysProductMenuByProductIds(productIds));
}
}
@@ -0,0 +1,160 @@
package com.mhd.system.controller;
import java.util.Arrays;
import com.mhd.system.service.ISysUserService;
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.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import com.mhd.common.core.constant.UserConstants;
import com.mhd.common.core.domain.entity.R;
import com.mhd.common.core.utils.StringUtils;
import com.mhd.common.core.utils.file.FileTypeUtils;
import com.mhd.common.core.utils.file.MimeTypeUtils;
import com.mhd.common.core.web.controller.BaseController;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.common.log.annotation.Log;
import com.mhd.common.log.enums.BusinessType;
import com.mhd.common.security.service.TokenService;
import com.mhd.common.security.utils.SecurityUtils;
import com.mhd.system.api.RemoteFileService;
import com.mhd.system.api.domain.SysFile;
import com.mhd.system.api.domain.SysUser;
import com.mhd.system.api.model.LoginUser;
/**
* 个人信息 业务处理
*
* @author mhd
*/
@RestController
@RequestMapping("/user/profile")
public class SysProfileController extends BaseController
{
@Autowired
private ISysUserService userService;
@Autowired
private TokenService tokenService;
@Autowired
private RemoteFileService remoteFileService;
/**
* 个人信息
*/
@GetMapping
public AjaxResult profile()
{
String username = SecurityUtils.getLoginUser().getUsername();
SysUser user = userService.selectUserByUserName(username);
AjaxResult ajax = AjaxResult.success(user);
ajax.put("roleGroup", userService.selectUserRoleGroup(username));
ajax.put("postGroup", userService.selectUserPostGroup(username));
return ajax;
}
/**
* 修改用户
*/
@Log(title = "个人信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult updateProfile(@RequestBody SysUser user)
{
LoginUser loginUser = SecurityUtils.getLoginUser();
SysUser sysUser = loginUser.getSysUser();
user.setUserName(sysUser.getUserName());
if (StringUtils.isNotEmpty(user.getPhonenumber())
&& UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
{
return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,手机号码已存在");
}
else if (StringUtils.isNotEmpty(user.getEmail())
&& UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
{
return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在");
}
user.setUserId(sysUser.getUserId());
user.setPassword(null);
if (userService.updateUserProfile(user) > 0)
{
// 更新缓存用户信息
loginUser.getSysUser().setNickName(user.getNickName());
loginUser.getSysUser().setPhonenumber(user.getPhonenumber());
loginUser.getSysUser().setEmail(user.getEmail());
loginUser.getSysUser().setSex(user.getSex());
tokenService.setLoginUser(loginUser);
return AjaxResult.success();
}
return AjaxResult.error("修改个人信息异常,请联系管理员");
}
/**
* 重置密码
*/
@Log(title = "个人信息", businessType = BusinessType.UPDATE)
@PutMapping("/updatePwd")
public AjaxResult updatePwd(String oldPassword, String newPassword)
{
String username = SecurityUtils.getLoginUser().getUsername();
SysUser user = userService.selectUserByUserName(username);
String password = user.getPassword();
if (!SecurityUtils.matchesPassword(oldPassword, password))
{
return AjaxResult.error("修改密码失败,旧密码错误");
}
if (SecurityUtils.matchesPassword(newPassword, password))
{
return AjaxResult.error("新密码不能与旧密码相同");
}
if (userService.resetUserPwd(username, SecurityUtils.encryptPassword(newPassword)) > 0)
{
// 更新缓存用户密码
LoginUser loginUser = SecurityUtils.getLoginUser();
loginUser.getSysUser().setPassword(SecurityUtils.encryptPassword(newPassword));
tokenService.setLoginUser(loginUser);
return AjaxResult.success();
}
return AjaxResult.error("修改密码异常,请联系管理员");
}
/**
* 头像上传
*/
@Log(title = "用户头像", businessType = BusinessType.UPDATE)
@PostMapping("/avatar")
public AjaxResult avatar(@RequestParam("avatarfile") MultipartFile file)
{
if (!file.isEmpty())
{
LoginUser loginUser = SecurityUtils.getLoginUser();
String extension = FileTypeUtils.getExtension(file);
if (!StringUtils.equalsAnyIgnoreCase(extension, MimeTypeUtils.IMAGE_EXTENSION))
{
return AjaxResult.error("文件格式不正确,请上传" + Arrays.toString(MimeTypeUtils.IMAGE_EXTENSION) + "格式");
}
R<SysFile> fileResult = remoteFileService.upload(file);
if (StringUtils.isNull(fileResult) || StringUtils.isNull(fileResult.getData()))
{
return AjaxResult.error("文件服务异常,请联系管理员");
}
String url = fileResult.getData().getUrl();
if (userService.updateUserAvatar(loginUser.getUsername(), url))
{
AjaxResult ajax = AjaxResult.success();
ajax.put("imgUrl", url);
// 更新缓存用户头像
loginUser.getSysUser().setAvatar(url);
tokenService.setLoginUser(loginUser);
return ajax;
}
}
return AjaxResult.error("上传图片异常,请联系管理员");
}
}
@@ -0,0 +1,253 @@
package com.mhd.system.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.mhd.system.api.model.LoginUser;
import com.mhd.system.domain.SysCompany;
import com.mhd.system.domain.SysUserRole;
import com.mhd.system.service.ISysCompanyService;
import com.mhd.system.service.ISysRoleService;
import com.mhd.system.service.ISysUserService;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.mhd.common.core.constant.UserConstants;
import com.mhd.common.core.utils.poi.ExcelUtil;
import com.mhd.common.core.web.controller.BaseController;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.common.core.web.page.TableDataInfo;
import com.mhd.common.log.annotation.Log;
import com.mhd.common.log.enums.BusinessType;
import com.mhd.common.security.annotation.RequiresPermissions;
import com.mhd.common.security.utils.SecurityUtils;
import com.mhd.system.api.domain.SysRole;
import com.mhd.system.api.domain.SysUser;
/**
* 角色信息
*
* @author mhd
*/
@RestController
@RequestMapping("/role")
public class SysRoleController extends BaseController
{
@Autowired
private ISysRoleService roleService;
@Autowired
private ISysUserService userService;
@Autowired
private ISysCompanyService companyService ;
@RequiresPermissions("system:role:list")
@GetMapping("/list")
public TableDataInfo list(SysRole role)
{
startPage();
LoginUser loginUser= SecurityUtils.getLoginUser();//获取登录人信息
if(loginUser.getUsername().equals("admin")){
role.setCreateBy(loginUser.getUsername());
}else{
boolean isTrue=false;
for (String roleA:loginUser.getRoles() ) {
if(roleA.equals("platform_admin")){
SysCompany sysCompany=companyService.selectSysCompanyByUserId(loginUser.getUserid());
if(ObjectUtils.isNotEmpty(sysCompany)){
role.setCompanyId(sysCompany.getCompanyId());
isTrue=true;
break;
}
}
}
if(isTrue==false){
role.setCreateBy(loginUser.getUsername());
}
}
List<SysRole> list = roleService.selectRoleList(role);
return getDataTable(list);
}
@Log(title = "角色管理", businessType = BusinessType.EXPORT)
@RequiresPermissions("system:role:export")
@PostMapping("/export")
public void export(HttpServletResponse response, SysRole role)
{
List<SysRole> list = roleService.selectRoleList(role);
ExcelUtil<SysRole> util = new ExcelUtil<SysRole>(SysRole.class);
util.exportExcel(response, list, "角色数据");
}
/**
* 根据角色编号获取详细信息
*/
@RequiresPermissions("system:role:query")
@GetMapping(value = "/{roleId}")
public AjaxResult getInfo(@PathVariable Long roleId)
{
roleService.checkRoleDataScope(roleId);
return AjaxResult.success(roleService.selectRoleById(roleId));
}
/**
* 新增角色
*/
@RequiresPermissions("system:role:add")
@Log(title = "角色管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@Validated @RequestBody SysRole role)
{
if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role)))
{
return AjaxResult.error("新增角色'" + role.getRoleName() + "'失败,角色名称已存在");
}
else if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleKeyUnique(role)))
{
return AjaxResult.error("新增角色'" + role.getRoleName() + "'失败,角色权限已存在");
}
LoginUser loginUser= SecurityUtils.getLoginUser();//获取登录人信息
if(loginUser.getUsername().equals("admin")){
role.setCreateBy(SecurityUtils.getUsername());
}else{
role.setCreateBy(String.valueOf(SecurityUtils.getUserId()));
}
return toAjax(roleService.insertRole(role));
}
/**
* 修改保存角色
*/
@RequiresPermissions("system:role:edit")
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@Validated @RequestBody SysRole role)
{
roleService.checkRoleAllowed(role);
roleService.checkRoleDataScope(role.getRoleId());
if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleNameUnique(role)))
{
return AjaxResult.error("修改角色'" + role.getRoleName() + "'失败,角色名称已存在");
}
else if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleKeyUnique(role)))
{
return AjaxResult.error("修改角色'" + role.getRoleName() + "'失败,角色权限已存在");
}
role.setUpdateBy(SecurityUtils.getUsername());
return toAjax(roleService.updateRole(role));
}
/**
* 修改保存数据权限
*/
@RequiresPermissions("system:role:edit")
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
@PutMapping("/dataScope")
public AjaxResult dataScope(@RequestBody SysRole role)
{
roleService.checkRoleAllowed(role);
roleService.checkRoleDataScope(role.getRoleId());
return toAjax(roleService.authDataScope(role));
}
/**
* 状态修改
*/
@RequiresPermissions("system:role:edit")
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
@PutMapping("/changeStatus")
public AjaxResult changeStatus(@RequestBody SysRole role)
{
roleService.checkRoleAllowed(role);
roleService.checkRoleDataScope(role.getRoleId());
role.setUpdateBy(SecurityUtils.getUsername());
return toAjax(roleService.updateRoleStatus(role));
}
/**
* 删除角色
*/
@RequiresPermissions("system:role:remove")
@Log(title = "角色管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{roleIds}")
public AjaxResult remove(@PathVariable Long[] roleIds)
{
return toAjax(roleService.deleteRoleByIds(roleIds));
}
/**
* 获取角色选择框列表
*/
@RequiresPermissions("system:role:query")
@GetMapping("/optionselect")
public AjaxResult optionselect()
{
return AjaxResult.success(roleService.selectRoleAll());
}
/**
* 查询已分配用户角色列表
*/
@RequiresPermissions("system:role:list")
@GetMapping("/authUser/allocatedList")
public TableDataInfo allocatedList(SysUser user)
{
startPage();
List<SysUser> list = userService.selectAllocatedList(user);
return getDataTable(list);
}
/**
* 查询未分配用户角色列表
*/
@RequiresPermissions("system:role:list")
@GetMapping("/authUser/unallocatedList")
public TableDataInfo unallocatedList(SysUser user)
{
startPage();
List<SysUser> list = userService.selectUnallocatedList(user);
return getDataTable(list);
}
/**
* 取消授权用户
*/
@RequiresPermissions("system:role:edit")
@Log(title = "角色管理", businessType = BusinessType.GRANT)
@PutMapping("/authUser/cancel")
public AjaxResult cancelAuthUser(@RequestBody SysUserRole userRole)
{
return toAjax(roleService.deleteAuthUser(userRole));
}
/**
* 批量取消授权用户
*/
@RequiresPermissions("system:role:edit")
@Log(title = "角色管理", businessType = BusinessType.GRANT)
@PutMapping("/authUser/cancelAll")
public AjaxResult cancelAuthUserAll(Long roleId, Long[] userIds)
{
return toAjax(roleService.deleteAuthUsers(roleId, userIds));
}
/**
* 批量选择用户授权
*/
@RequiresPermissions("system:role:edit")
@Log(title = "角色管理", businessType = BusinessType.GRANT)
@PutMapping("/authUser/selectAll")
public AjaxResult selectAuthUserAll(Long roleId, Long[] userIds)
{
roleService.checkRoleDataScope(roleId);
return toAjax(roleService.insertAuthUsers(roleId, userIds));
}
}
@@ -0,0 +1,118 @@
package com.mhd.system.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.mhd.common.security.utils.SecurityUtils;
import com.mhd.system.domain.SysTenantManagement;
import com.mhd.system.domain.dto.SysTenantManagementDTO;
import com.mhd.system.domain.vo.SysTenantManagementVO;
import com.mhd.system.service.ISysTenantManagementService;
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.mhd.common.log.annotation.Log;
import com.mhd.common.log.enums.BusinessType;
import com.mhd.common.security.annotation.RequiresPermissions;
import com.mhd.common.core.web.controller.BaseController;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.common.core.utils.poi.ExcelUtil;
import com.mhd.common.core.web.page.TableDataInfo;
/**
* 租户管理Controller
*
* @author mhd
* @date 2022-07-31
*/
@RestController
@RequestMapping("/management")
public class SysTenantManagementController extends BaseController
{
@Autowired
private ISysTenantManagementService sysTenantManagementService;
/**
* 查询租户管理列表
*/
@RequiresPermissions("system:management:list")
@GetMapping("/list")
public TableDataInfo list(SysTenantManagementDTO sysTenantManagement)
{
startPage();
List<SysTenantManagementVO> list = sysTenantManagementService.selectSysTenantManagementList(sysTenantManagement);
return getDataTable(list);
}
/**
* 导出租户管理列表
*/
@RequiresPermissions("system:management:export")
@Log(title = "租户管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, SysTenantManagementDTO sysTenantManagement)
{
List<SysTenantManagementVO> list = sysTenantManagementService.selectSysTenantManagementList(sysTenantManagement);
ExcelUtil<SysTenantManagementVO> util = new ExcelUtil<SysTenantManagementVO>(SysTenantManagementVO.class);
util.exportExcel(response, list, "租户管理数据");
}
/**
* 获取租户管理详细信息
*/
@RequiresPermissions("system:management:query")
@GetMapping(value = "/{tenantId}")
public AjaxResult getInfo(@PathVariable("tenantId") Long tenantId)
{
return AjaxResult.success(sysTenantManagementService.selectSysTenantManagementByTenantId(tenantId));
}
/**
* 新增租户管理
*/
@RequiresPermissions("system:management:add")
@Log(title = "租户管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SysTenantManagement sysTenantManagement)
{
return toAjax(sysTenantManagementService.insertSysTenantManagement(sysTenantManagement));
}
/**
* 修改租户管理
*/
@RequiresPermissions("system:management:edit")
@Log(title = "租户管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SysTenantManagement sysTenantManagement)
{
return toAjax(sysTenantManagementService.updateSysTenantManagement(sysTenantManagement));
}
/**
* 状态修改
*/
@RequiresPermissions("system:user:edit")
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
@PutMapping("/changeStatus")
public AjaxResult changeStatus(@RequestBody SysTenantManagement sysTenantManagement)
{
sysTenantManagement.setUpdateBy(SecurityUtils.getUsername());
return toAjax(sysTenantManagementService.updateStatus(sysTenantManagement));
}
/**
* 删除租户管理
*/
@RequiresPermissions("system:management:remove")
@Log(title = "租户管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{tenantIds}")
public AjaxResult remove(@PathVariable Long[] tenantIds)
{
return toAjax(sysTenantManagementService.deleteSysTenantManagementByTenantIds(tenantIds));
}
}
@@ -0,0 +1,326 @@
package com.mhd.system.controller;
import java.io.IOException;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import javax.servlet.http.HttpServletResponse;
import com.mhd.system.domain.SysCompany;
import com.mhd.system.service.*;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import com.mhd.common.core.constant.UserConstants;
import com.mhd.common.core.domain.entity.R;
import com.mhd.common.core.utils.StringUtils;
import com.mhd.common.core.utils.poi.ExcelUtil;
import com.mhd.common.core.web.controller.BaseController;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.common.core.web.page.TableDataInfo;
import com.mhd.common.log.annotation.Log;
import com.mhd.common.log.enums.BusinessType;
import com.mhd.common.security.annotation.InnerAuth;
import com.mhd.common.security.annotation.RequiresPermissions;
import com.mhd.common.security.utils.SecurityUtils;
import com.mhd.system.api.domain.SysRole;
import com.mhd.system.api.domain.SysUser;
import com.mhd.system.api.model.LoginUser;
/**
* 用户信息
*
* @author mhd
*/
@RestController
@RequestMapping("/user")
public class SysUserController extends BaseController
{
@Autowired
private ISysUserService userService;
@Autowired
private ISysRoleService roleService;
@Autowired
private ISysPostService postService;
@Autowired
private ISysPermissionService permissionService;
@Autowired
private ISysConfigService configService;
@Autowired
private ISysCompanyService companyService ;
/**
* 获取用户列表
*/
@RequiresPermissions("system:user:list")
@GetMapping("/list")
public TableDataInfo list(SysUser user)
{
startPage();
LoginUser loginUser= SecurityUtils.getLoginUser();//获取登录人信息
for (String role:loginUser.getRoles() ) {
if(role.equals("admin")){
break;
}else if(role.equals("platform_admin")){
SysCompany sysCompany=companyService.selectSysCompanyByUserId(loginUser.getUserid());
if(ObjectUtils.isNotEmpty(sysCompany)){
user.setCompanyId(sysCompany.getCompanyId());
break;
}
}
}
List<SysUser> list = userService.selectUserList(user);
return getDataTable(list);
}
@Log(title = "用户管理", businessType = BusinessType.EXPORT)
@RequiresPermissions("system:user:export")
@PostMapping("/export")
public void export(HttpServletResponse response, SysUser user)
{
List<SysUser> list = userService.selectUserList(user);
ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
util.exportExcel(response, list, "用户数据");
}
@Log(title = "用户管理", businessType = BusinessType.IMPORT)
@RequiresPermissions("system:user:import")
@PostMapping("/importData")
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
{
ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
List<SysUser> userList = util.importExcel(file.getInputStream());
String operName = SecurityUtils.getLoginUser().getUsername();
String message = userService.importUser(userList, updateSupport, operName);
return AjaxResult.success(message);
}
@PostMapping("/importTemplate")
public void importTemplate(HttpServletResponse response) throws IOException
{
ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
util.importTemplateExcel(response, "用户数据");
}
/**
* 获取当前用户信息
*/
@InnerAuth
@GetMapping("/info/{username}")
public R<LoginUser> info(@PathVariable("username") String username)
{
SysUser sysUser = userService.selectUserByUserName(username);
if (StringUtils.isNull(sysUser))
{
return R.fail("用户名或密码错误");
}
// 角色集合
Set<String> roles = permissionService.getRolePermission(sysUser.getUserId());
// 权限集合
Set<String> permissions = permissionService.getMenuPermission(sysUser.getUserId());
LoginUser sysUserVo = new LoginUser();
sysUserVo.setSysUser(sysUser);
sysUserVo.setRoles(roles);
sysUserVo.setPermissions(permissions);
return R.ok(sysUserVo);
}
/**
* 注册用户信息
*/
@InnerAuth
@PostMapping("/register")
public R<Boolean> register(@RequestBody SysUser sysUser)
{
String username = sysUser.getUserName();
if (!("true".equals(configService.selectConfigByKey("sys.account.registerUser"))))
{
return R.fail("当前系统没有开启注册功能!");
}
if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(username)))
{
return R.fail("保存用户'" + username + "'失败,注册账号已存在");
}
return R.ok(userService.registerUser(sysUser));
}
/**
* 获取用户信息
*
* @return 用户信息
*/
@GetMapping("getInfo")
public AjaxResult getInfo()
{
Long userId = SecurityUtils.getLoginUser().getUserid();
// 角色集合
Set<String> roles = permissionService.getRolePermission(userId);
// 权限集合
Set<String> permissions = permissionService.getMenuPermission(userId);
AjaxResult ajax = AjaxResult.success();
ajax.put("user", userService.selectUserById(userId));
ajax.put("roles", roles);
ajax.put("permissions", permissions);
return ajax;
}
/**
* 根据用户编号获取详细信息
*/
@RequiresPermissions("system:user:query")
@GetMapping(value = { "/", "/{userId}" })
public AjaxResult getInfo(@PathVariable(value = "userId", required = false) Long userId)
{
userService.checkUserDataScope(userId);
AjaxResult ajax = AjaxResult.success();
List<SysRole> roles = roleService.selectRoleAll();
ajax.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
ajax.put("posts", postService.selectPostAll());
if (StringUtils.isNotNull(userId))
{
SysUser sysUser = userService.selectUserById(userId);
ajax.put(AjaxResult.DATA_TAG, sysUser);
ajax.put("postIds", postService.selectPostListByUserId(userId));
ajax.put("roleIds", sysUser.getRoles().stream().map(SysRole::getRoleId).collect(Collectors.toList()));
}
return ajax;
}
/**
* 新增用户
*/
@RequiresPermissions("system:user:add")
@Log(title = "用户管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@Validated @RequestBody SysUser user)
{
if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(user.getUserName())))
{
return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,登录账号已存在");
}
else if (StringUtils.isNotEmpty(user.getPhonenumber())
&& UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
{
return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,手机号码已存在");
}
else if (StringUtils.isNotEmpty(user.getEmail())
&& UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
{
return AjaxResult.error("新增用户'" + user.getUserName() + "'失败,邮箱账号已存在");
}
user.setCreateBy(SecurityUtils.getUsername());
user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
return toAjax(userService.insertUser(user));
}
/**
* 修改用户
*/
@RequiresPermissions("system:user:edit")
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@Validated @RequestBody SysUser user)
{
userService.checkUserAllowed(user);
userService.checkUserDataScope(user.getUserId());
if (StringUtils.isNotEmpty(user.getPhonenumber())
&& UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
{
return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,手机号码已存在");
}
else if (StringUtils.isNotEmpty(user.getEmail())
&& UserConstants.NOT_UNIQUE.equals(userService.checkEmailUnique(user)))
{
return AjaxResult.error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在");
}
user.setUpdateBy(SecurityUtils.getUsername());
return toAjax(userService.updateUser(user));
}
/**
* 删除用户
*/
@RequiresPermissions("system:user:remove")
@Log(title = "用户管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{userIds}")
public AjaxResult remove(@PathVariable Long[] userIds)
{
if (ArrayUtils.contains(userIds, SecurityUtils.getUserId()))
{
return AjaxResult.error("当前用户不能删除");
}
return toAjax(userService.deleteUserByIds(userIds));
}
/**
* 重置密码
*/
@RequiresPermissions("system:user:edit")
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
@PutMapping("/resetPwd")
public AjaxResult resetPwd(@RequestBody SysUser user)
{
userService.checkUserAllowed(user);
userService.checkUserDataScope(user.getUserId());
user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
user.setUpdateBy(SecurityUtils.getUsername());
return toAjax(userService.resetPwd(user));
}
/**
* 状态修改
*/
@RequiresPermissions("system:user:edit")
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
@PutMapping("/changeStatus")
public AjaxResult changeStatus(@RequestBody SysUser user)
{
userService.checkUserAllowed(user);
userService.checkUserDataScope(user.getUserId());
user.setUpdateBy(SecurityUtils.getUsername());
return toAjax(userService.updateUserStatus(user));
}
/**
* 根据用户编号获取授权角色
*/
@RequiresPermissions("system:user:query")
@GetMapping("/authRole/{userId}")
public AjaxResult authRole(@PathVariable("userId") Long userId)
{
AjaxResult ajax = AjaxResult.success();
SysUser user = userService.selectUserById(userId);
List<SysRole> roles = roleService.selectRolesByUserId(userId);
ajax.put("user", user);
ajax.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
return ajax;
}
/**
* 用户授权角色
*/
@RequiresPermissions("system:user:edit")
@Log(title = "用户管理", businessType = BusinessType.GRANT)
@PutMapping("/authRole")
public AjaxResult insertAuthRole(Long userId, Long[] roleIds)
{
userService.checkUserDataScope(userId);
userService.insertUserAuth(userId, roleIds);
return success();
}
}
@@ -0,0 +1,57 @@
package com.mhd.system.controller;
import java.util.Collection;
import java.util.List;
import com.mhd.common.core.utils.PageUtils;
import com.mhd.system.domain.SysUserOnline;
import com.mhd.system.domain.dto.SysUserOnlineDTO;
import com.mhd.system.service.ISysUserOnlineService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.mhd.common.core.constant.CacheConstants;
import com.mhd.common.core.web.controller.BaseController;
import com.mhd.common.core.web.domain.AjaxResult;
import com.mhd.common.core.web.page.TableDataInfo;
import com.mhd.common.redis.service.RedisService;
/**
* 在线用户监控
*
* @author mhd
*/
@RestController
@RequestMapping("/online")
public class SysUserOnlineController extends BaseController
{
@Autowired
private ISysUserOnlineService userOnlineService;
@Autowired
private RedisService redisService;
@ApiOperation("统计当前在线人数")
@GetMapping("currentlyOnline")
public AjaxResult currentlyOnline() {
Collection<String> keys = redisService.keys(CacheConstants.LOGIN_TOKEN_KEY + "*");
return AjaxResult.success(keys.size());
}
@ApiOperation("在线用户列表")
@GetMapping("/list")
public TableDataInfo list(SysUserOnlineDTO sysUserOnlineDTO) {
List<SysUserOnline> userOnlineList = userOnlineService.list(sysUserOnlineDTO);
int size = userOnlineList.size();
List<SysUserOnline> list = PageUtils.subList(userOnlineList, sysUserOnlineDTO.getPageSize(), sysUserOnlineDTO.getPageNum());
return getDataTable(list, size);
}
@ApiOperation("强退用户")
@PostMapping("/forceLogout")
public AjaxResult forceLogout(@RequestBody SysUserOnlineDTO sysUserOnlineDTO) {
userOnlineService.forceLogout(sysUserOnlineDTO);
return AjaxResult.success();
}
}
@@ -0,0 +1,53 @@
package com.mhd.system.domain;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.mhd.common.core.annotation.Excel;
import com.mhd.common.core.web.domain.BaseEntity;
/**
* 计费规则对象 sys_accounting_rules
*
* @author mhd
* @date 2022-07-28
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class SysAccountingRules extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 计费规则id */
private Long accountingId;
/** 对应产品id */
private Long productId;
/** 名称 */
@Excel(name = "名称")
private String accountingName;
/** 单价 */
@Excel(name = "单价")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal unitPrice;
/** 单位 */
@Excel(name = "单位")
private String unit;
/** 金额 */
@Excel(name = "金额")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal money;
/** 删除标志(0代表存在 1代表删除) */
private String delFlag;
}
@@ -0,0 +1,174 @@
package com.mhd.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.mhd.common.core.annotation.Excel;
import com.mhd.common.core.web.domain.BaseEntity;
import java.util.ArrayList;
import java.util.List;
/**
* 公司管理对象 sys_company
*
* @author mhd
* @date 2022-07-22
*/
public class SysCompany extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** */
private Long companyId;
/** 上级公司id */
@Excel(name = "上级公司id")
private Long parentCompanyId;
/** 公司名称 */
@Excel(name = "公司名称")
private String companyName;
/** 公司地址 */
@Excel(name = "公司地址")
private String companyAddress;
/** 联系电话 */
@Excel(name = "联系电话")
private String phone;
/** 是否禁用 0-否 1-是 */
@Excel(name = "是否禁用 0-否 1-是")
private Integer isDisable;
/** 是否删除 0-否 1-是 */
@Excel(name = "是否删除 0-否 1-是")
private Integer delFlag;
/** 公司级别 0-总公司 1-分公司 2-子公司*/
@Excel(name = "公司级别 0-总公司 1-分公司 2-子公司")
private Integer level;
/** 公司 */
private List<SysCompany> children = new ArrayList<SysCompany>();
@Excel(name = "用户id")
private Long userId;
@Excel(name = "用户账号")
private String userName;
public void setParentCompanyId(Long parentCompanyId)
{
this.parentCompanyId = parentCompanyId;
}
public Long getParentCompanyId()
{
return parentCompanyId;
}
public void setCompanyName(String companyName)
{
this.companyName = companyName;
}
public String getCompanyName()
{
return companyName;
}
public void setCompanyAddress(String companyAddress)
{
this.companyAddress = companyAddress;
}
public String getCompanyAddress()
{
return companyAddress;
}
public void setPhone(String phone)
{
this.phone = phone;
}
public String getPhone()
{
return phone;
}
public void setIsDisable(Integer isDisable)
{
this.isDisable = isDisable;
}
public Integer getIsDisable()
{
return isDisable;
}
public Long getCompanyId() {
return companyId;
}
public void setCompanyId(Long companyId) {
this.companyId = companyId;
}
public Integer getDelFlag() {
return delFlag;
}
public void setDelFlag(Integer delFlag) {
this.delFlag = delFlag;
}
public Integer getLevel() {
return level;
}
public void setLevel(Integer level) {
this.level = level;
}
public List<SysCompany> getChildren()
{
return children;
}
public void setChildren(List<SysCompany> children)
{
this.children = children;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getCompanyId())
.append("parentCompanyId", getParentCompanyId())
.append("companyName", getCompanyName())
.append("companyAddress", getCompanyAddress())
.append("phone", getPhone())
.append("isDisable", getIsDisable())
.append("isDeleted", getDelFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("level", getLevel())
.append("userId", getUserId())
.append("userName", getUserName())
.toString();
}
}
@@ -0,0 +1,107 @@
package com.mhd.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.mhd.common.core.annotation.Excel;
import com.mhd.common.core.web.domain.BaseEntity;
/**
* 门户管理 -- 用户协议对象 sys_company_agreement
*
* @author mhd
* @date 2022-07-27
*/
public class SysCompanyAgreement extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 协议名称 */
@Excel(name = "协议名称")
private String agreementName;
/** 协议内容 */
@Excel(name = "协议内容")
private String agreementCont;
/** 1:客户 2:司机 应用类型 */
@Excel(name = "1:客户 2:司机 应用类型")
private String type;
/** 显示状态:0-正常,1-停用,默认0 */
@Excel(name = "显示状态:0-正常,1-停用,默认0")
private Integer statusFlag;
/** 删除状态:0-正常,1-已删除,默认0 */
private Integer delFlag;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setAgreementName(String agreementName)
{
this.agreementName = agreementName;
}
public String getAgreementName()
{
return agreementName;
}
public void setAgreementCont(String agreementCont)
{
this.agreementCont = agreementCont;
}
public String getAgreementCont()
{
return agreementCont;
}
public void setType(String type)
{
this.type = type;
}
public String getType()
{
return type;
}
public void setStatusFlag(Integer statusFlag)
{
this.statusFlag = statusFlag;
}
public Integer getStatusFlag()
{
return statusFlag;
}
public void setDelFlag(Integer delFlag)
{
this.delFlag = delFlag;
}
public Integer getDelFlag()
{
return delFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("agreementName", getAgreementName())
.append("agreementCont", getAgreementCont())
.append("type", getType())
.append("createTime", getCreateTime())
.append("statusFlag", getStatusFlag())
.append("delFlag", getDelFlag())
.toString();
}
}
@@ -0,0 +1,152 @@
package com.mhd.system.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.mhd.common.core.annotation.Excel;
import com.mhd.common.core.web.domain.BaseEntity;
/**
* 门户管理--APP管理对象 sys_company_app
*
* @author mhd
* @date 2022-07-27
*/
public class SysCompanyApp extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** app名称 */
@Excel(name = "app名称")
private String appName;
/** app下载地址/二维码地址 */
@Excel(name = "app下载地址/二维码地址")
private String appDownload;
/** banner图片地址 */
@Excel(name = "banner图片地址")
private String banner;
/** 主色 */
@Excel(name = "主色")
private String masterColor;
/** 版本号 */
@Excel(name = "版本号")
private String appVersion;
/** 上架时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "上架时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createDatetime;
/** 显示状态:0-正常,1-停用,默认0 */
@Excel(name = "显示状态:0-正常,1-停用,默认0")
private Integer statusFlag;
/** 删除状态:0-正常,1-已删除,默认0 */
private Integer delFlag;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setAppName(String appName)
{
this.appName = appName;
}
public String getAppName()
{
return appName;
}
public void setAppDownload(String appDownload)
{
this.appDownload = appDownload;
}
public String getAppDownload()
{
return appDownload;
}
public void setBanner(String banner)
{
this.banner = banner;
}
public String getBanner()
{
return banner;
}
public void setMasterColor(String masterColor)
{
this.masterColor = masterColor;
}
public String getMasterColor()
{
return masterColor;
}
public void setAppVersion(String appVersion)
{
this.appVersion = appVersion;
}
public String getAppVersion()
{
return appVersion;
}
public void setCreateDatetime(Date createDatetime)
{
this.createDatetime = createDatetime;
}
public Date getCreateDatetime()
{
return createDatetime;
}
public void setStatusFlag(Integer statusFlag)
{
this.statusFlag = statusFlag;
}
public Integer getStatusFlag()
{
return statusFlag;
}
public void setDelFlag(Integer delFlag)
{
this.delFlag = delFlag;
}
public Integer getDelFlag()
{
return delFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("appName", getAppName())
.append("appDownload", getAppDownload())
.append("banner", getBanner())
.append("masterColor", getMasterColor())
.append("appVersion", getAppVersion())
.append("createDatetime", getCreateDatetime())
.append("updateTime", getUpdateTime())
.append("statusFlag", getStatusFlag())
.append("delFlag", getDelFlag())
.toString();
}
}
@@ -0,0 +1,148 @@
package com.mhd.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.mhd.common.core.annotation.Excel;
import com.mhd.common.core.web.domain.BaseEntity;
/**
* 门户管理--基础信息对象 sys_company_basics
*
* @author mhd
* @date 2022-07-27
*/
public class SysCompanyBasics extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 公司名称 */
@Excel(name = "公司名称")
private String companyName;
/** 电话 */
@Excel(name = "电话")
private String telphone;
/** 公司地址 */
@Excel(name = "公司地址")
private String companyAddress;
/** 网址 */
@Excel(name = "网址")
private String companyHttp;
/** 公司介绍 */
@Excel(name = "公司介绍")
private String companyInfo;
/** logo */
@Excel(name = "logo")
private String companyLogo;
/** 显示状态:0-正常,1-停用,默认0 */
@Excel(name = "显示状态:0-正常,1-停用,默认0")
private Integer statusFlag;
/** 删除状态:0-正常,1-已删除,默认0 */
private Integer delFlag;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setCompanyName(String companyName)
{
this.companyName = companyName;
}
public String getCompanyName()
{
return companyName;
}
public void setTelphone(String telphone)
{
this.telphone = telphone;
}
public String getTelphone()
{
return telphone;
}
public void setCompanyAddress(String companyAddress)
{
this.companyAddress = companyAddress;
}
public String getCompanyAddress()
{
return companyAddress;
}
public void setCompanyHttp(String companyHttp)
{
this.companyHttp = companyHttp;
}
public String getCompanyHttp()
{
return companyHttp;
}
public void setCompanyInfo(String companyInfo)
{
this.companyInfo = companyInfo;
}
public String getCompanyInfo()
{
return companyInfo;
}
public void setCompanyLogo(String companyLogo)
{
this.companyLogo = companyLogo;
}
public String getCompanyLogo()
{
return companyLogo;
}
public void setStatusFlag(Integer statusFlag)
{
this.statusFlag = statusFlag;
}
public Integer getStatusFlag()
{
return statusFlag;
}
public void setDelFlag(Integer delFlag)
{
this.delFlag = delFlag;
}
public Integer getDelFlag()
{
return delFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("companyName", getCompanyName())
.append("telphone", getTelphone())
.append("companyAddress", getCompanyAddress())
.append("companyHttp", getCompanyHttp())
.append("companyInfo", getCompanyInfo())
.append("companyLogo", getCompanyLogo())
.append("statusFlag", getStatusFlag())
.append("delFlag", getDelFlag())
.toString();
}
}
@@ -0,0 +1,154 @@
package com.mhd.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.mhd.common.core.web.domain.BaseEntity;
/**
* 意见投诉反馈对象 sys_complaintfeedback
*
* @author mhd
* @date 2022-07-29
*/
public class SysComplaintfeedback extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long feedbackId;
/** 创建人 */
private String creadBy;
/** 标题 */
private String title;
/** 信息来源(0-司机,1-货主,2-pc) */
private Integer messageSource;
/** 是否已读(0-未读,1-已读,2-已回复) */
private Integer messageStatus;
/** 回复内容 */
private String replyContent;
/** 关联运单号 */
private String waybillId;
/** 内容 */
private String problemContent;
/** 截图地址 */
private String problemScreenshotsAddress;
/** 信息是否已删除(0-正常,1-删除,默认为0) */
private Integer delFlag;
public void setFeedbackId(Long feedbackId)
{
this.feedbackId = feedbackId;
}
public Long getFeedbackId()
{
return feedbackId;
}
public void setCreadBy(String creadBy)
{
this.creadBy = creadBy;
}
public String getCreadBy()
{
return creadBy;
}
public void setTitle(String title)
{
this.title = title;
}
public String getTitle()
{
return title;
}
public void setMessageSource(Integer messageSource)
{
this.messageSource = messageSource;
}
public Integer getMessageSource()
{
return messageSource;
}
public void setMessageStatus(Integer messageStatus)
{
this.messageStatus = messageStatus;
}
public Integer getMessageStatus()
{
return messageStatus;
}
public void setReplyContent(String replyContent)
{
this.replyContent = replyContent;
}
public String getReplyContent()
{
return replyContent;
}
public void setWaybillId(String waybillId)
{
this.waybillId = waybillId;
}
public String getWaybillId()
{
return waybillId;
}
public void setProblemContent(String problemContent)
{
this.problemContent = problemContent;
}
public String getProblemContent()
{
return problemContent;
}
public void setProblemScreenshotsAddress(String problemScreenshotsAddress)
{
this.problemScreenshotsAddress = problemScreenshotsAddress;
}
public String getProblemScreenshotsAddress()
{
return problemScreenshotsAddress;
}
public void setDelFlag(Integer delFlag)
{
this.delFlag = delFlag;
}
public Integer getDelFlag()
{
return delFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("feedbackId", getFeedbackId())
.append("creadBy", getCreadBy())
.append("createTime", getCreateTime())
.append("title", getTitle())
.append("messageSource", getMessageSource())
.append("messageStatus", getMessageStatus())
.append("replyContent", getReplyContent())
.append("waybillId", getWaybillId())
.append("problemContent", getProblemContent())
.append("problemScreenshotsAddress", getProblemScreenshotsAddress())
.append("delFlag", getDelFlag())
.toString();
}
}
@@ -0,0 +1,111 @@
package com.mhd.system.domain;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.mhd.common.core.annotation.Excel;
import com.mhd.common.core.annotation.Excel.ColumnType;
import com.mhd.common.core.web.domain.BaseEntity;
/**
* 参数配置表 sys_config
*
* @author mhd
*/
public class SysConfig extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 参数主键 */
@Excel(name = "参数主键", cellType = ColumnType.NUMERIC)
private Long configId;
/** 参数名称 */
@Excel(name = "参数名称")
private String configName;
/** 参数键名 */
@Excel(name = "参数键名")
private String configKey;
/** 参数键值 */
@Excel(name = "参数键值")
private String configValue;
/** 系统内置(Y是 N否) */
@Excel(name = "系统内置", readConverterExp = "Y=是,N=否")
private String configType;
public Long getConfigId()
{
return configId;
}
public void setConfigId(Long configId)
{
this.configId = configId;
}
@NotBlank(message = "参数名称不能为空")
@Size(min = 0, max = 100, message = "参数名称不能超过100个字符")
public String getConfigName()
{
return configName;
}
public void setConfigName(String configName)
{
this.configName = configName;
}
@NotBlank(message = "参数键名长度不能为空")
@Size(min = 0, max = 100, message = "参数键名长度不能超过100个字符")
public String getConfigKey()
{
return configKey;
}
public void setConfigKey(String configKey)
{
this.configKey = configKey;
}
@NotBlank(message = "参数键值不能为空")
@Size(min = 0, max = 500, message = "参数键值长度不能超过500个字符")
public String getConfigValue()
{
return configValue;
}
public void setConfigValue(String configValue)
{
this.configValue = configValue;
}
public String getConfigType()
{
return configType;
}
public void setConfigType(String configType)
{
this.configType = configType;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("configId", getConfigId())
.append("configName", getConfigName())
.append("configKey", getConfigKey())
.append("configValue", getConfigValue())
.append("configType", getConfigType())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}
@@ -0,0 +1,52 @@
package com.mhd.system.domain;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.mhd.common.core.annotation.Excel;
import com.mhd.common.core.web.domain.BaseEntity;
/**
* 三方接口配置信息对象 sys_depart_interface_info
*
* @author mhd
* @date 2022-07-27
*/
@Data
public class SysDepartInterfaceInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 三方信息ID */
private Long departInfoId;
/** 接口类型(短信、推送、支付宝等) */
@Excel(name = "接口类型", readConverterExp = "短信、推送、支付宝等")
private String interfaceType;
/** 接口参数 */
@Excel(name = "接口参数")
private String interfaceTypeKey;
/** 接口参数值 */
@Excel(name = "接口参数值")
private String interfaceTypeValue;
/** 接口类型名称 */
@Excel(name = "接口类型名称")
private String interfaceTypeName;
@ApiModelProperty(name = "接口类型描述")
private String interfaceTypeDescription;
@ApiModelProperty(name = "租户名称")
private String tenantsName;
/** 是否删除:0未删除 ,1已删除 */
private Integer delFlag;
/** 更新次数 */
@Excel(name = "更新次数")
private Long updateCount;
}
@@ -0,0 +1,152 @@
package com.mhd.system.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.mhd.common.core.annotation.Excel;
import com.mhd.common.core.web.domain.BaseEntity;
/**
* 设备管理 -- GPS管理对象 sys_equipment_gps
*
* @author mhd
* @date 2022-07-28
*/
public class SysEquipmentGps extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 设备名称 */
@Excel(name = "设备名称")
private String equipmentName;
/** 产品型号 */
@Excel(name = "产品型号")
private String productModel;
/** 产品详情 */
@Excel(name = "产品详情")
private String productTips;
/** 产品类型 */
@Excel(name = "产品类型")
private String productType;
/** 显示状态:0-正常,1-停用,默认0 */
@Excel(name = "显示状态:0-正常,1-停用,默认0")
private Integer statusFlag;
/** 删除状态:0-正常,1-已删除,默认0 */
private Integer delFlag;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createDatetime;
/** 修改时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date updateDatetime;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setEquipmentName(String equipmentName)
{
this.equipmentName = equipmentName;
}
public String getEquipmentName()
{
return equipmentName;
}
public void setProductModel(String productModel)
{
this.productModel = productModel;
}
public String getProductModel()
{
return productModel;
}
public void setProductTips(String productTips)
{
this.productTips = productTips;
}
public String getProductTips()
{
return productTips;
}
public void setProductType(String productType)
{
this.productType = productType;
}
public String getProductType()
{
return productType;
}
public void setStatusFlag(Integer statusFlag)
{
this.statusFlag = statusFlag;
}
public Integer getStatusFlag()
{
return statusFlag;
}
public void setDelFlag(Integer delFlag)
{
this.delFlag = delFlag;
}
public Integer getDelFlag()
{
return delFlag;
}
public void setCreateDatetime(Date createDatetime)
{
this.createDatetime = createDatetime;
}
public Date getCreateDatetime()
{
return createDatetime;
}
public void setUpdateDatetime(Date updateDatetime)
{
this.updateDatetime = updateDatetime;
}
public Date getUpdateDatetime()
{
return updateDatetime;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("equipmentName", getEquipmentName())
.append("productModel", getProductModel())
.append("productTips", getProductTips())
.append("productType", getProductType())
.append("statusFlag", getStatusFlag())
.append("delFlag", getDelFlag())
.append("createDatetime", getCreateDatetime())
.append("updateDatetime", getUpdateDatetime())
.toString();
}
}
@@ -0,0 +1,152 @@
package com.mhd.system.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.mhd.common.core.annotation.Excel;
import com.mhd.common.core.web.domain.BaseEntity;
/**
* 设备管理 -- 打印机管理对象 sys_equipment_printer
*
* @author mhd
* @date 2022-07-28
*/
public class SysEquipmentPrinter extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 打印机名称 */
@Excel(name = "打印机名称")
private String printerName;
/** 打印机型号 */
@Excel(name = "打印机型号")
private String printerType;
/** 打印机蓝牙端口 */
@Excel(name = "打印机蓝牙端口")
private String printerPid;
/** 企业名称 */
@Excel(name = "企业名称")
private String company;
/** 显示状态:0-正常,1-停用,默认0 */
@Excel(name = "显示状态:0-正常,1-停用,默认0")
private Integer statusFlag;
/** 删除状态:0-正常,1-删除,默认0 */
private Integer delFlag;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createDate;
/** 更新时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date updateDate;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setPrinterName(String printerName)
{
this.printerName = printerName;
}
public String getPrinterName()
{
return printerName;
}
public void setPrinterType(String printerType)
{
this.printerType = printerType;
}
public String getPrinterType()
{
return printerType;
}
public void setPrinterPid(String printerPid)
{
this.printerPid = printerPid;
}
public String getPrinterPid()
{
return printerPid;
}
public void setCompany(String company)
{
this.company = company;
}
public String getCompany()
{
return company;
}
public void setStatusFlag(Integer statusFlag)
{
this.statusFlag = statusFlag;
}
public Integer getStatusFlag()
{
return statusFlag;
}
public void setDelFlag(Integer delFlag)
{
this.delFlag = delFlag;
}
public Integer getDelFlag()
{
return delFlag;
}
public void setCreateDate(Date createDate)
{
this.createDate = createDate;
}
public Date getCreateDate()
{
return createDate;
}
public void setUpdateDate(Date updateDate)
{
this.updateDate = updateDate;
}
public Date getUpdateDate()
{
return updateDate;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("printerName", getPrinterName())
.append("printerType", getPrinterType())
.append("printerPid", getPrinterPid())
.append("company", getCompany())
.append("statusFlag", getStatusFlag())
.append("delFlag", getDelFlag())
.append("createDate", getCreateDate())
.append("updateDate", getUpdateDate())
.toString();
}
}
@@ -0,0 +1,122 @@
package com.mhd.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.mhd.common.core.annotation.Excel;
import com.mhd.common.core.web.domain.BaseEntity;
/**
* 设备管理 -- 打印模板对象 sys_equipment_template
*
* @author mhd
* @date 2022-07-28
*/
public class SysEquipmentTemplate extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 模板名称 */
@Excel(name = "模板名称")
private String templateName;
/** 模板内容 */
@Excel(name = "模板内容")
private String templateCont;
/** 模板描述 */
@Excel(name = "模板描述")
private String remarks;
/** 备注 */
@Excel(name = "备注")
private String des;
/** 显示状态:0-正常,1-停用,默认0 */
@Excel(name = "显示状态:0-正常,1-停用,默认0")
private Integer statusFlag;
/** 删除状态:0-正常,1-已删除,默认0 */
private Integer delFlag;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setTemplateName(String templateName)
{
this.templateName = templateName;
}
public String getTemplateName()
{
return templateName;
}
public void setTemplateCont(String templateCont)
{
this.templateCont = templateCont;
}
public String getTemplateCont()
{
return templateCont;
}
public void setRemarks(String remarks)
{
this.remarks = remarks;
}
public String getRemarks()
{
return remarks;
}
public void setDes(String des)
{
this.des = des;
}
public String getDes()
{
return des;
}
public void setStatusFlag(Integer statusFlag)
{
this.statusFlag = statusFlag;
}
public Integer getStatusFlag()
{
return statusFlag;
}
public void setDelFlag(Integer delFlag)
{
this.delFlag = delFlag;
}
public Integer getDelFlag()
{
return delFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("templateName", getTemplateName())
.append("templateCont", getTemplateCont())
.append("remarks", getRemarks())
.append("des", getDes())
.append("createTime", getCreateTime())
.append("updateTime", getUpdateTime())
.append("statusFlag", getStatusFlag())
.append("delFlag", getDelFlag())
.toString();
}
}
@@ -0,0 +1,275 @@
package com.mhd.system.domain;
import java.util.ArrayList;
import java.util.List;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.mhd.common.core.web.domain.BaseEntity;
/**
* 菜单权限表 sys_menu
*
* @author mhd
*/
public class SysMenu extends BaseEntity
{
private static final long serialVersionUID = 1L;
/**
* @Description 所属系统:0-公共模块,1-整车,2-城配,3-零担
* @Author Alex
* @Date 2022/7/21 11:19
*/
private Integer sysType;
/** 菜单ID */
private Long menuId;
/** 菜单名称 */
private String menuName;
/** 父菜单名称 */
private String parentName;
/** 父菜单ID */
private Long parentId;
/** 显示顺序 */
private Integer orderNum;
/** 路由地址 */
private String path;
/** 组件路径 */
private String component;
/** 路由参数 */
private String query;
/** 是否为外链(0是 1否) */
private String isFrame;
/** 是否缓存(0缓存 1不缓存) */
private String isCache;
/** 类型(M目录 C菜单 F按钮) */
private String menuType;
/** 显示状态(0显示 1隐藏) */
private String visible;
/** 菜单状态(0显示 1隐藏) */
private String status;
/** 权限字符串 */
private String perms;
/** 菜单图标 */
private String icon;
/** 子菜单 */
private List<SysMenu> children = new ArrayList<SysMenu>();
public Integer getSysType() {
return sysType;
}
public void setSysType(Integer sysType) {
this.sysType = sysType;
}
public Long getMenuId()
{
return menuId;
}
public void setMenuId(Long menuId)
{
this.menuId = menuId;
}
@NotBlank(message = "菜单名称不能为空")
@Size(min = 0, max = 50, message = "菜单名称长度不能超过50个字符")
public String getMenuName()
{
return menuName;
}
public void setMenuName(String menuName)
{
this.menuName = menuName;
}
public String getParentName()
{
return parentName;
}
public void setParentName(String parentName)
{
this.parentName = parentName;
}
public Long getParentId()
{
return parentId;
}
public void setParentId(Long parentId)
{
this.parentId = parentId;
}
@NotNull(message = "显示顺序不能为空")
public Integer getOrderNum()
{
return orderNum;
}
public void setOrderNum(Integer orderNum)
{
this.orderNum = orderNum;
}
@Size(min = 0, max = 200, message = "路由地址不能超过200个字符")
public String getPath()
{
return path;
}
public void setPath(String path)
{
this.path = path;
}
@Size(min = 0, max = 200, message = "组件路径不能超过255个字符")
public String getComponent()
{
return component;
}
public void setComponent(String component)
{
this.component = component;
}
public String getQuery()
{
return query;
}
public void setQuery(String query)
{
this.query = query;
}
public String getIsFrame()
{
return isFrame;
}
public void setIsFrame(String isFrame)
{
this.isFrame = isFrame;
}
public String getIsCache()
{
return isCache;
}
public void setIsCache(String isCache)
{
this.isCache = isCache;
}
@NotBlank(message = "菜单类型不能为空")
public String getMenuType()
{
return menuType;
}
public void setMenuType(String menuType)
{
this.menuType = menuType;
}
public String getVisible()
{
return visible;
}
public void setVisible(String visible)
{
this.visible = visible;
}
public String getStatus()
{
return status;
}
public void setStatus(String status)
{
this.status = status;
}
@Size(min = 0, max = 100, message = "权限标识长度不能超过100个字符")
public String getPerms()
{
return perms;
}
public void setPerms(String perms)
{
this.perms = perms;
}
public String getIcon()
{
return icon;
}
public void setIcon(String icon)
{
this.icon = icon;
}
public List<SysMenu> getChildren()
{
return children;
}
public void setChildren(List<SysMenu> children)
{
this.children = children;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("sysType", getSysType())
.append("menuId", getMenuId())
.append("menuName", getMenuName())
.append("parentId", getParentId())
.append("orderNum", getOrderNum())
.append("path", getPath())
.append("component", getComponent())
.append("isFrame", getIsFrame())
.append("IsCache", getIsCache())
.append("menuType", getMenuType())
.append("visible", getVisible())
.append("status ", getStatus())
.append("perms", getPerms())
.append("icon", getIcon())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}
@@ -0,0 +1,61 @@
package com.mhd.system.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.mhd.common.core.annotation.Excel;
import com.mhd.common.core.web.domain.BaseEntity;
import java.util.Date;
/**
* 消息中心-站内对象 sys_msg_center
*
* @author mhd
* @date 2022-07-27
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class SysMsgCenter extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 消息中心id */
private Long msgCenterId;
/** 标题 */
@Excel(name = "标题")
private String title;
/** 内容 */
@Excel(name = "内容")
private String content;
/** 创建人 */
private String createBy;
/** 创建时间 */
@JsonFormat(pattern = "YYYY-MM-dd")
private Date createTime;
/** 更新人 */
private String updateBy;
/** 更新时间 */
@JsonFormat(pattern = "YYYY-MM-dd")
private Date updateTime;
/** 状态 */
@Excel(name = "状态")
private String msgStatus;
/** 删除状态 */
private String delFlag;
/** 类型 */
private String msgType;
}
@@ -0,0 +1,53 @@
package com.mhd.system.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.mhd.common.core.annotation.Excel;
import com.mhd.common.core.web.domain.BaseEntity;
import java.util.Date;
/**
* 消息推送对象 sys_msg_push
*
* @author mhd
* @date 2022-07-27
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SysMsgPush extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 消息推送id */
private Long msgPushId;
/** 标题 */
@Excel(name = "标题")
private String title;
/** 内容 */
@Excel(name = "内容")
private String content;
/** 创建者 */
private String createBy;
/** 创建时间 */
@JsonFormat(pattern = "YYYY-MM-dd")
private Date createTime;
/** 删除状态 */
private String delFlag;
/** 更新人 */
private String updateBy;
/** 更新时间 */
@JsonFormat(pattern = "YYYY-MM-dd")
private Date updateTime;
}
@@ -0,0 +1,102 @@
package com.mhd.system.domain;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.mhd.common.core.web.domain.BaseEntity;
import com.mhd.common.core.xss.Xss;
/**
* 通知公告表 sys_notice
*
* @author mhd
*/
public class SysNotice extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 公告ID */
private Long noticeId;
/** 公告标题 */
private String noticeTitle;
/** 公告类型(1通知 2公告) */
private String noticeType;
/** 公告内容 */
private String noticeContent;
/** 公告状态(0正常 1关闭) */
private String status;
public Long getNoticeId()
{
return noticeId;
}
public void setNoticeId(Long noticeId)
{
this.noticeId = noticeId;
}
public void setNoticeTitle(String noticeTitle)
{
this.noticeTitle = noticeTitle;
}
@Xss(message = "公告标题不能包含脚本字符")
@NotBlank(message = "公告标题不能为空")
@Size(min = 0, max = 50, message = "公告标题不能超过50个字符")
public String getNoticeTitle()
{
return noticeTitle;
}
public void setNoticeType(String noticeType)
{
this.noticeType = noticeType;
}
public String getNoticeType()
{
return noticeType;
}
public void setNoticeContent(String noticeContent)
{
this.noticeContent = noticeContent;
}
public String getNoticeContent()
{
return noticeContent;
}
public void setStatus(String status)
{
this.status = status;
}
public String getStatus()
{
return status;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("noticeId", getNoticeId())
.append("noticeTitle", getNoticeTitle())
.append("noticeType", getNoticeType())
.append("noticeContent", getNoticeContent())
.append("status", getStatus())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}
@@ -0,0 +1,43 @@
package com.mhd.system.domain;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.mhd.common.core.annotation.Excel;
import com.mhd.common.core.web.domain.BaseEntity;
/**
* 公司系统平台对象 sys_plat_company
*
* @author mhd
* @date 2022-07-26
*/
@Data
public class SysPlatCompany extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 系统平台ID */
private Long sysPlatId;
/** 公司表ID */
@Excel(name = "公司表ID")
private Long companyId;
/** 产品表ID */
@Excel(name = "产品表ID")
private Long productId;
/** 删除状态:0-正常,1-已删除 */
private Integer delFlag;
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("sysPlatId", getSysPlatId())
.append("companyId", getCompanyId())
.append("productId", getProductId())
.append("delFlag", getDelFlag())
.toString();
}
}
@@ -0,0 +1,123 @@
package com.mhd.system.domain;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.mhd.common.core.annotation.Excel;
import com.mhd.common.core.annotation.Excel.ColumnType;
import com.mhd.common.core.web.domain.BaseEntity;
/**
* 岗位表 sys_post
*
* @author mhd
*/
public class SysPost extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 岗位序号 */
@Excel(name = "岗位序号", cellType = ColumnType.NUMERIC)
private Long postId;
/** 岗位编码 */
@Excel(name = "岗位编码")
private String postCode;
/** 岗位名称 */
@Excel(name = "岗位名称")
private String postName;
/** 岗位排序 */
@Excel(name = "岗位排序")
private String postSort;
/** 状态(0正常 1停用) */
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
private String status;
/** 用户是否存在此岗位标识 默认不存在 */
private boolean flag = false;
public Long getPostId()
{
return postId;
}
public void setPostId(Long postId)
{
this.postId = postId;
}
@NotBlank(message = "岗位编码不能为空")
@Size(min = 0, max = 64, message = "岗位编码长度不能超过64个字符")
public String getPostCode()
{
return postCode;
}
public void setPostCode(String postCode)
{
this.postCode = postCode;
}
@NotBlank(message = "岗位名称不能为空")
@Size(min = 0, max = 50, message = "岗位名称长度不能超过50个字符")
public String getPostName()
{
return postName;
}
public void setPostName(String postName)
{
this.postName = postName;
}
@NotBlank(message = "显示顺序不能为空")
public String getPostSort()
{
return postSort;
}
public void setPostSort(String postSort)
{
this.postSort = postSort;
}
public String getStatus()
{
return status;
}
public void setStatus(String status)
{
this.status = status;
}
public boolean isFlag()
{
return flag;
}
public void setFlag(boolean flag)
{
this.flag = flag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("postId", getPostId())
.append("postCode", getPostCode())
.append("postName", getPostName())
.append("postSort", getPostSort())
.append("status", getStatus())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}
@@ -0,0 +1,47 @@
package com.mhd.system.domain;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.mhd.common.core.annotation.Excel;
import com.mhd.common.core.web.domain.BaseEntity;
/**
* 系统产品对象 sys_product
*
* @author mhd
* @date 2022-07-21
*/
@Data
public class SysProduct extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 产品ID */
private Long productId;
/** 产品名称 */
@Excel(name = "产品名称&版本")
private String productName;
/** 所属系统id */
@Excel(name = "所属系统id")
private Integer productVersion;
/** 删除状态:0-正常,1-已删除 */
private Integer delFlag;
/** 菜单树选择项是否关联显示( 0:父子不互相关联显示 1:父子互相关联显示) */
private boolean menuCheckStrictly;
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("productId", getProductId())
.append("productName", getProductName())
.append("delFlag", getDelFlag())
.append("menuCheckStrictly", isMenuCheckStrictly())
.append("productVersion", getProductVersion())
.toString();
}
}
@@ -0,0 +1,62 @@
package com.mhd.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.mhd.common.core.web.domain.BaseEntity;
/**
* 【请填写功能名称】对象 sys_product_menu
*
* @author mhd
* @date 2022-07-21
*/
public class SysProductMenu extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 产品ID */
private Long productId;
/** 菜单ID */
private Long menuId;
/** 删除状态,0-正常,1-已删除 */
private Integer delFlag;
public void setProductId(Long productId)
{
this.productId = productId;
}
public Long getProductId()
{
return productId;
}
public void setMenuId(Long menuId)
{
this.menuId = menuId;
}
public Long getMenuId()
{
return menuId;
}
public void setDelFlag(Integer delFlag)
{
this.delFlag = delFlag;
}
public Integer getDelFlag()
{
return delFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("productId", getProductId())
.append("menuId", getMenuId())
.append("delFlag", getDelFlag())
.toString();
}
}
@@ -0,0 +1,46 @@
package com.mhd.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 角色和部门关联 sys_role_dept
*
* @author mhd
*/
public class SysRoleDept
{
/** 角色ID */
private Long roleId;
/** 部门ID */
private Long deptId;
public Long getRoleId()
{
return roleId;
}
public void setRoleId(Long roleId)
{
this.roleId = roleId;
}
public Long getDeptId()
{
return deptId;
}
public void setDeptId(Long deptId)
{
this.deptId = deptId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("roleId", getRoleId())
.append("deptId", getDeptId())
.toString();
}
}
@@ -0,0 +1,46 @@
package com.mhd.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 角色和菜单关联 sys_role_menu
*
* @author mhd
*/
public class SysRoleMenu
{
/** 角色ID */
private Long roleId;
/** 菜单ID */
private Long menuId;
public Long getRoleId()
{
return roleId;
}
public void setRoleId(Long roleId)
{
this.roleId = roleId;
}
public Long getMenuId()
{
return menuId;
}
public void setMenuId(Long menuId)
{
this.menuId = menuId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("roleId", getRoleId())
.append("menuId", getMenuId())
.toString();
}
}
@@ -0,0 +1,54 @@
package com.mhd.system.domain;
import java.math.BigDecimal;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.mhd.common.core.annotation.Excel;
import com.mhd.common.core.web.domain.BaseEntity;
/**
* 租户管理对象 sys_tenant_management
*
* @author mhd
* @date 2022-07-31
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SysTenantManagement extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 租户管理id */
private Long tenantId;
/** 对应产品id */
private Long productId;
/** 对应企业id */
private Long companyId;
/** 对应计费规则id */
private Long accountingId;
/** 收费金额 */
@Excel(name = "收费金额")
private BigDecimal chargeAmount;
/** 联系方式 */
@Excel(name = "联系方式")
private String tenantPhone;
/** 状态(0未使用 1使用中 2已停用) */
@Excel(name = "状态", readConverterExp = "0=未使用,1=使用中,2=已停用")
private String status;
/** 删除标志(0代表存在 1代表删除) */
private String delFlag;
/** 标准明细 */
private String accountingDetail;
}
@@ -0,0 +1,58 @@
package com.mhd.system.domain;
import lombok.Data;
/**
* 当前在线会话
*
* @author mhd
*/
@Data
public class SysUserOnline
{
/** 会话编号 */
private String tokenId;
/**
* 登录账号
*/
private String userAccount;
/** 用户名称 */
private String userName;
/**
* 用户角色
*/
private String userRole;
/** 登录IP地址 */
private String ipaddr;
/**
* 登录IP所属地区
*/
private String ipRegion;
// /** 登录地址 */
// private String loginLocation;
//
// /** 浏览器类型 */
// private String browser;
/**
* 终端类型 (1-Web端、2-APP端)
*/
private String os;
/**
* 最后访问时间
*/
private String lastAccessTime;
/**
* 初始登录时间
*/
private String initialLoginTime;
}
@@ -0,0 +1,46 @@
package com.mhd.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 用户和岗位关联 sys_user_post
*
* @author mhd
*/
public class SysUserPost
{
/** 用户ID */
private Long userId;
/** 岗位ID */
private Long postId;
public Long getUserId()
{
return userId;
}
public void setUserId(Long userId)
{
this.userId = userId;
}
public Long getPostId()
{
return postId;
}
public void setPostId(Long postId)
{
this.postId = postId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("userId", getUserId())
.append("postId", getPostId())
.toString();
}
}
@@ -0,0 +1,46 @@
package com.mhd.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 用户和角色关联 sys_user_role
*
* @author mhd
*/
public class SysUserRole
{
/** 用户ID */
private Long userId;
/** 角色ID */
private Long roleId;
public Long getUserId()
{
return userId;
}
public void setUserId(Long userId)
{
this.userId = userId;
}
public Long getRoleId()
{
return roleId;
}
public void setRoleId(Long roleId)
{
this.roleId = roleId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("userId", getUserId())
.append("roleId", getRoleId())
.toString();
}
}
@@ -0,0 +1,57 @@
package com.mhd.system.domain.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mhd.common.core.annotation.Excel;
import com.mhd.common.core.web.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
/**
* 计费规则对象 sys_accounting_rules
*
* @author mhd
* @date 2022-07-28
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class SysAccountingRulesDTO extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 计费规则id */
private Long accountingId;
/** 对应产品id */
private Long productId;
/** 名称 */
@Excel(name = "名称")
private String accountingName;
/** 单价 */
@Excel(name = "单价")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal unitPrice;
/** 单位 */
@Excel(name = "单位")
private String unit;
/** 金额 */
@Excel(name = "金额")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal money;
/** 类型 */
@Excel(name = "类型")
private String accountingType;
/** 删除标志(0代表存在 1代表删除) */
private String delFlag;
}
@@ -0,0 +1,57 @@
package com.mhd.system.domain.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mhd.common.core.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.List;
/**
* 系统访问记录表 sys_logininfor
*
* @author mhd
*/
@Data
public class SysLogininforDTO {
/**
* 用户账号
*/
private String userAccount;
/**
* 组织名称
*/
private String organizationName;
/**
* 访问开始时间
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private String beginTime;
/**
* 访问结束时间
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private String endTime;
/**
* 组织表ID
*/
private Long organizationId;
/**
* 一级组织表ID
*/
private Long topOrganizationId;
/**
* 端口
*/
private String port;
}
@@ -0,0 +1,71 @@
package com.mhd.system.domain.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mhd.common.core.annotation.Excel;
import com.mhd.common.core.web.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
/**
* 消息推送对象 sys_msg_push
*
* @author mhd
* @date 2022-07-27
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SysMsgPushDTO extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 消息推送id */
private Long msgPushId;
/** 标题 */
@Excel(name = "标题")
private String title;
/** 内容 */
@Excel(name = "内容")
private String content;
/** 创建者 */
private String createBy;
/** 创建时间 */
@JsonFormat(pattern = "YYYY-MM-dd")
private Date createTime;
/** 推送时间 */
@JsonFormat(pattern = "YYYY-MM-dd")
private Date pushTime;
/** 删除状态 */
private String delFlag;
/** 更新人 */
private String updateBy;
/** 更新时间 */
@JsonFormat(pattern = "YYYY-MM-dd")
private Date updateTime;
/* 创建时间搜索 */
@JsonFormat(pattern = "YYYY-MM-dd")
private Date startCreateTime;
@JsonFormat(pattern = "YYYY-MM-dd")
private Date endCreateTime;
/* 推送时间搜索 */
@JsonFormat(pattern = "YYYY-MM-dd")
private Date startPushTime;
@JsonFormat(pattern = "YYYY-MM-dd")
private Date endPushTime;
}
@@ -0,0 +1,74 @@
package com.mhd.system.domain.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mhd.common.core.annotation.Excel;
import com.mhd.common.core.annotation.Excel.ColumnType;
import com.mhd.common.core.web.domain.BaseEntity;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
* 操作日志记录表 oper_log
*
* @author mhd
*/
@Data
public class SysOperLogDTO {
/**
* 业务类型(0=查询,1=新增,2=修改,3=删除,4=授权,5=导出,6=导入,7=强退,8=生成代码,9=清空数据,10=其他)
*/
private Integer businessType;
/**
* 模块描述
*/
private String description;
/**
* 用户名称
*/
private String userName;
/**
* 用户账号
*/
private String userAccount;
/**
* 组织名称
*/
private String organizationName;
/**
* 访问开始时间
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private String beginTime;
/**
* 访问结束时间
*/
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private String endTime;
/**
* 组织表ID
*/
private Long organizationId;
/**
* 一级组织表ID
*/
private Long topOrganizationId;
/**
* 端口
*/
private String port;
}
@@ -0,0 +1,30 @@
package com.mhd.system.domain.dto;
import com.mhd.common.core.web.domain.BaseEntity;
import lombok.Data;
/**
* 公司系统平台对象 sys_plat_company
*
* @author mhd
* @date 2022-07-26
*/
@Data
public class SysPlatCompanyDTO extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 系统平台ID */
private Long sysPlatId;
/** 公司表ID */
private Long companyId;
/** 产品表ID */
private Long productId;
/** 公司名称 */
private String companyName;
/** 产品名称 */
private String productName;
}
@@ -0,0 +1,38 @@
package com.mhd.system.domain.dto;
import com.mhd.common.core.annotation.Excel;
import com.mhd.common.core.web.domain.BaseEntity;
import lombok.Data;
/**
* 系统产品对象 sys_product
*
* @author mhd
* @date 2022-07-21
*/
@Data
public class SysProductDTO extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 产品ID */
private Long productId;
/** 产品名称 */
@Excel(name = "产品名称")
private String productName;
/** 删除状态:0-正常,1-已删除 */
private Integer delFlag;
/** 所属系统id */
@Excel(name = "所属系统id")
private Integer productVersion;
/** 菜单组 */
private Long[] menuIds;
/** 菜单树选择项是否关联显示( 0:父子不互相关联显示 1:父子互相关联显示) */
private boolean menuCheckStrictly;
}
@@ -0,0 +1,62 @@
package com.mhd.system.domain.dto;
import com.mhd.common.core.annotation.Excel;
import com.mhd.common.core.web.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
/**
* 租户管理对象 sys_tenant_management
*
* @author mhd
* @date 2022-07-31
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SysTenantManagementDTO extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 租户管理id */
private Long tenantId;
/** 对应企业id */
private Long companyId;
@Excel(name = "企业名称")
private String companyName;
/** 对应产品id */
private Long productId;
@Excel(name = "产品名称")
private String productName;
/** 对应计费规则id */
private Long accountingId;
/** 收费金额 */
@Excel(name = "收费金额")
private BigDecimal chargeAmount;
/** 标准明细 */
@Excel(name = "标准明细")
private String accountingDetail;
/** 联系方式 */
@Excel(name = "联系方式")
private String tenantPhone;
/** 状态(0未使用 1使用中 2已停用) */
@Excel(name = "状态", readConverterExp = "0=使用中,1=已停用")
private String status;
/** 删除标志(0代表存在 1代表删除) */
private String delFlag;
}
@@ -0,0 +1,42 @@
package com.mhd.system.domain.dto;
import lombok.Data;
@Data
public class SysUserOnlineDTO {
/**
* 登录账号
*/
private String userAccount;
/**
* 用户名称
*/
private String userName;
/**
* 终端类型 (1-Web端、2-APP端)
*/
private String os;
/**
* 会话编号
*/
private String tokenId;
/**
* 操作类型(1-踢下线 2-禁用并踢下线)
*/
private String operationType;
/**
* 当前页
*/
private Integer pageNum;
/**
* 每页记录数
*/
private Integer pageSize;
}
@@ -0,0 +1,79 @@
package com.mhd.system.domain.vo;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.mhd.system.domain.SysCompany;
import java.io.Serializable;
import java.util.List;
import java.util.stream.Collectors;
public class CompanyTreeselect implements Serializable {
private static final long serialVersionUID = 1L;
/** 节点ID */
private Long id;
/** 节点名称 */
private String label;
/** 登录账号 */
private String userName;
/** 子节点 */
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<CompanyTreeselect> children;
public CompanyTreeselect()
{
}
public CompanyTreeselect(SysCompany company)
{
this.id = company.getCompanyId();
this.label = company.getCompanyName();
this.userName = company.getUserName();
this.children = company.getChildren().stream().map(CompanyTreeselect::new).collect(Collectors.toList());
}
public Long getId()
{
return id;
}
public void setId(Long id)
{
this.id = id;
}
public String getLabel()
{
return label;
}
public void setLabel(String label)
{
this.label = label;
}
public List<CompanyTreeselect> getChildren()
{
return children;
}
public void setChildren(List<CompanyTreeselect> children)
{
this.children = children;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
}
@@ -0,0 +1,106 @@
package com.mhd.system.domain.vo;
import com.mhd.common.core.utils.StringUtils;
/**
* 路由显示信息
*
* @author mhd
*/
public class MetaVo
{
/**
* 设置该路由在侧边栏和面包屑中展示的名字
*/
private String title;
/**
* 设置该路由的图标,对应路径src/assets/icons/svg
*/
private String icon;
/**
* 设置为true,则不会被 <keep-alive>缓存
*/
private boolean noCache;
/**
* 内链地址(http(s)://开头)
*/
private String link;
public MetaVo()
{
}
public MetaVo(String title, String icon)
{
this.title = title;
this.icon = icon;
}
public MetaVo(String title, String icon, boolean noCache)
{
this.title = title;
this.icon = icon;
this.noCache = noCache;
}
public MetaVo(String title, String icon, String link)
{
this.title = title;
this.icon = icon;
this.link = link;
}
public MetaVo(String title, String icon, boolean noCache, String link)
{
this.title = title;
this.icon = icon;
this.noCache = noCache;
if (StringUtils.ishttp(link))
{
this.link = link;
}
}
public boolean isNoCache()
{
return noCache;
}
public void setNoCache(boolean noCache)
{
this.noCache = noCache;
}
public String getTitle()
{
return title;
}
public void setTitle(String title)
{
this.title = title;
}
public String getIcon()
{
return icon;
}
public void setIcon(String icon)
{
this.icon = icon;
}
public String getLink()
{
return link;
}
public void setLink(String link)
{
this.link = link;
}
}
@@ -0,0 +1,148 @@
package com.mhd.system.domain.vo;
import com.fasterxml.jackson.annotation.JsonInclude;
import java.util.List;
/**
* 路由配置信息
*
* @author mhd
*/
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class RouterVo
{
/**
* 路由名字
*/
private String name;
/**
* 路由地址
*/
private String path;
/**
* 是否隐藏路由,当设置 true 的时候该路由不会再侧边栏出现
*/
private boolean hidden;
/**
* 重定向地址,当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
*/
private String redirect;
/**
* 组件地址
*/
private String component;
/**
* 路由参数:如 {"id": 1, "name": "ry"}
*/
private String query;
/**
* 当你一个路由下面的 children 声明的路由大于1个时,自动会变成嵌套的模式--如组件页面
*/
private Boolean alwaysShow;
/**
* 其他元素
*/
private MetaVo meta;
/**
* 子路由
*/
private List<RouterVo> children;
public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
}
public String getPath()
{
return path;
}
public void setPath(String path)
{
this.path = path;
}
public boolean getHidden()
{
return hidden;
}
public void setHidden(boolean hidden)
{
this.hidden = hidden;
}
public String getRedirect()
{
return redirect;
}
public void setRedirect(String redirect)
{
this.redirect = redirect;
}
public String getComponent()
{
return component;
}
public void setComponent(String component)
{
this.component = component;
}
public String getQuery()
{
return query;
}
public void setQuery(String query)
{
this.query = query;
}
public Boolean getAlwaysShow()
{
return alwaysShow;
}
public void setAlwaysShow(Boolean alwaysShow)
{
this.alwaysShow = alwaysShow;
}
public MetaVo getMeta()
{
return meta;
}
public void setMeta(MetaVo meta)
{
this.meta = meta;
}
public List<RouterVo> getChildren()
{
return children;
}
public void setChildren(List<RouterVo> children)
{
this.children = children;
}
}
@@ -0,0 +1,59 @@
package com.mhd.system.domain.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mhd.common.core.annotation.Excel;
import com.mhd.common.core.web.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
/**
* 计费规则对象 sys_accounting_rules
*
* @author mhd
* @date 2022-07-28
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class SysAccountingRulesVO extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 计费规则id */
private Long accountingId;
/** 对应产品id */
private Long productId;
/** 名称 */
@Excel(name = "名称")
private String accountingName;
/** 单价 */
@Excel(name = "单价")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal unitPrice;
/** 单位 */
@Excel(name = "单位")
private String unit;
/** 金额 */
@Excel(name = "金额")
@JsonFormat(shape = JsonFormat.Shape.STRING)
private BigDecimal money;
/** 产品名称 */
@Excel(name = "产品名称")
private String productName;
/** 删除标志(0代表存在 1代表删除) */
private String delFlag;
/** 标准明细 */
private String accountingDetail;
}
@@ -0,0 +1,22 @@
package com.mhd.system.domain.vo;
import lombok.Data;
@Data
public class SysBankDictInfo {
private static final long serialVersionUID = 1L;
private Long dictCode=0L;
/** 银行图标图片地址 */
private String bankImg ="";
/** 银行名称 */
private String bankName="";
/** 银行编码 */
private String bankCode="";
}
@@ -0,0 +1,53 @@
package com.mhd.system.domain.vo;
import com.mhd.system.api.domain.SysDictData;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@Data
public class SysDictDataVO {
@ApiModelProperty(value = "用户性别")
private List<SysDictData> sys_user_sex;
@ApiModelProperty(value = "菜单状态")
private List<SysDictData> sys_show_hide;
@ApiModelProperty(value = "系统开关")
private List<SysDictData> sys_normal_disable;
@ApiModelProperty(value = "任务分组")
private List<SysDictData> sys_job_group;
@ApiModelProperty(value = "系统是否")
private List<SysDictData> sys_yes_no;
@ApiModelProperty(value = "通知类型")
private List<SysDictData> sys_notice_type;
@ApiModelProperty(value = "通知状态")
private List<SysDictData> sys_notice_status;
@ApiModelProperty(value = "操作类型")
private List<SysDictData> sys_oper_type;
@ApiModelProperty(value = "系统状态")
private List<SysDictData> sys_common_status;
@ApiModelProperty(value = "所属系统")
private List<SysDictData> sys_type;
@ApiModelProperty(value = "角色类型")
private List<SysDictData> sys_role_type;
@ApiModelProperty(value = "协议类型")
private List<SysDictData> agreement_type;
@ApiModelProperty(value = "准驾车型")
private List<SysDictData> vehicle_class;
@ApiModelProperty(value = "从业资格证类别")
private List<SysDictData> qualification_certificate;
@ApiModelProperty(value = "车辆类型")
private List<SysDictData> vehicle_type;
@ApiModelProperty(value = "车辆能源类型")
private List<SysDictData> vehicle_energy_type;
@ApiModelProperty(value = "车牌颜色")
private List<SysDictData> vehicle_plate_color;
@ApiModelProperty(value = "车辆轴数")
private List<SysDictData> vehicle_axle;
@ApiModelProperty(value = "车辆长度")
private List<SysDictData> vehicle_length;
@ApiModelProperty(value = "车辆容积")
private List<SysDictData> vehicle_volume;
@ApiModelProperty(value = "挂车车辆类型")
private List<SysDictData> trailer_vehicle_type;
}
@@ -0,0 +1,32 @@
package com.mhd.system.domain.vo;
import com.mhd.common.core.web.domain.BaseEntity;
import lombok.Data;
/**
* 公司系统平台对象 sys_plat_company
*
* @author mhd
* @date 2022-07-26
*/
@Data
public class SysPlatCompanyVO extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 系统平台ID */
private Long sysPlatId;
/** 公司表ID */
private Long companyId;
/** 产品表ID */
private Long productId;
/** 公司名称 */
private String companyName;
/** 公司账号 */
private String companyPhone;
/** 产品名称 */
private String productName;
}
@@ -0,0 +1,47 @@
package com.mhd.system.domain.vo;
import com.mhd.common.core.annotation.Excel;
import com.mhd.common.core.web.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 系统产品对象 sys_product
*
* @author mhd
* @date 2022-07-21
*/
@Data
public class SysProductVO extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 产品ID */
private Long productId;
/** 产品名称 */
@Excel(name = "产品名称&版本")
private String productName;
/** 删除状态:0-正常,1-已删除 */
private Integer delFlag;
/** 菜单树选择项是否关联显示( 0:父子不互相关联显示 1:父子互相关联显示) */
private boolean menuCheckStrictly;
/** 所属系统id */
@Excel(name = "所属系统id")
private Integer productVersion;
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("productId", getProductId())
.append("productName", getProductName())
.append("delFlag", getDelFlag())
.append("menuCheckStrictly", isMenuCheckStrictly())
.append("productVersion", getProductVersion())
.toString();
}
}
@@ -0,0 +1,63 @@
package com.mhd.system.domain.vo;
import com.mhd.common.core.annotation.Excel;
import com.mhd.common.core.web.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
/**
* 租户管理对象 sys_tenant_management
*
* @author mhd
* @date 2022-07-31
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SysTenantManagementVO extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 租户管理id */
private Long tenantId;
/** 对应企业id */
private Long companyId;
@Excel(name = "企业名称")
private String companyName;
/** 对应产品id */
private Long productId;
@Excel(name = "产品名称")
private String productName;
/** 对应计费规则id */
private Long accountingId;
private String accountingName;
/** 收费金额 */
@Excel(name = "收费金额")
private BigDecimal chargeAmount;
/** 标准明细 */
@Excel(name = "标准明细")
private String accountingDetail;
/** 联系方式 */
@Excel(name = "联系方式")
private String tenantPhone;
/** 状态(0未使用 1使用中 2已停用) */
@Excel(name = "状态", readConverterExp = "0=使用中,1=已停用")
private String status;
/** 删除标志(0代表存在 1代表删除) */
private String delFlag;
}
@@ -0,0 +1,84 @@
package com.mhd.system.domain.vo;
import java.io.Serializable;
import java.util.List;
import java.util.stream.Collectors;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.mhd.system.api.domain.SysDept;
import com.mhd.system.domain.SysMenu;
import com.mhd.system.domain.SysProduct;
/**
* Treeselect树结构实体类
*
* @author mhd
*/
public class TreeSelect implements Serializable
{
private static final long serialVersionUID = 1L;
/** 节点ID */
private Long id;
/** 节点名称 */
private String label;
/** 子节点 */
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private List<TreeSelect> children;
public TreeSelect()
{
}
public TreeSelect(SysDept dept)
{
this.id = dept.getDeptId();
this.label = dept.getDeptName();
this.children = dept.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
}
public TreeSelect(SysMenu menu)
{
this.id = menu.getMenuId();
this.label = menu.getMenuName();
this.children = menu.getChildren().stream().map(TreeSelect::new).collect(Collectors.toList());
}
public TreeSelect(SysProduct product)
{
this.id = product.getProductId();
this.label = product.getProductName();
}
public Long getId()
{
return id;
}
public void setId(Long id)
{
this.id = id;
}
public String getLabel()
{
return label;
}
public void setLabel(String label)
{
this.label = label;
}
public List<TreeSelect> getChildren()
{
return children;
}
public void setChildren(List<TreeSelect> children)
{
this.children = children;
}
}
@@ -0,0 +1,64 @@
package com.mhd.system.mapper;
import java.util.List;
import com.mhd.system.domain.SysAccountingRules;
import com.mhd.system.domain.dto.SysAccountingRulesDTO;
import com.mhd.system.domain.vo.SysAccountingRulesVO;
/**
* 计费规则Mapper接口
*
* @author mhd
* @date 2022-07-28
*/
public interface SysAccountingRulesMapper
{
/**
* 查询计费规则
*
* @param accountingId 计费规则主键
* @return 计费规则
*/
public SysAccountingRulesVO selectSysAccountingRulesByAccountingId(Long accountingId);
/**
* 查询计费规则列表
*
* @param sysAccountingRulesDTO 计费规则
* @return 计费规则集合
*/
public List<SysAccountingRulesVO> selectSysAccountingRulesList(SysAccountingRulesDTO sysAccountingRulesDTO);
/**
* 新增计费规则
*
* @param sysAccountingRulesDTO 计费规则
* @return 结果
*/
public int insertSysAccountingRules(SysAccountingRulesDTO sysAccountingRulesDTO);
/**
* 修改计费规则
*
* @param sysAccountingRules 计费规则
* @return 结果
*/
public int updateSysAccountingRules(SysAccountingRules sysAccountingRules);
/**
* 删除计费规则
*
* @param accountingId 计费规则主键
* @return 结果
*/
public int deleteSysAccountingRulesByAccountingId(Long accountingId);
/**
* 批量删除计费规则
*
* @param accountingIds 需要删除的数据主键集合
* @return 结果
*/
public int deleteSysAccountingRulesByAccountingIds(Long[] accountingIds);
}
@@ -0,0 +1,62 @@
package com.mhd.system.mapper;
import java.util.List;
import com.mhd.system.domain.SysCompanyAgreement;
/**
* 门户管理 -- 用户协议Mapper接口
*
* @author mhd
* @date 2022-07-27
*/
public interface SysCompanyAgreementMapper
{
/**
* 查询门户管理 -- 用户协议
*
* @param id 门户管理 -- 用户协议主键
* @return 门户管理 -- 用户协议
*/
public SysCompanyAgreement selectSysCompanyAgreementById(Long id);
/**
* 查询门户管理 -- 用户协议列表
*
* @param sysCompanyAgreement 门户管理 -- 用户协议
* @return 门户管理 -- 用户协议集合
*/
public List<SysCompanyAgreement> selectSysCompanyAgreementList(SysCompanyAgreement sysCompanyAgreement);
/**
* 新增门户管理 -- 用户协议
*
* @param sysCompanyAgreement 门户管理 -- 用户协议
* @return 结果
*/
public int insertSysCompanyAgreement(SysCompanyAgreement sysCompanyAgreement);
/**
* 修改门户管理 -- 用户协议
*
* @param sysCompanyAgreement 门户管理 -- 用户协议
* @return 结果
*/
public int updateSysCompanyAgreement(SysCompanyAgreement sysCompanyAgreement);
/**
* 删除门户管理 -- 用户协议
*
* @param id 门户管理 -- 用户协议主键
* @return 结果
*/
public int deleteSysCompanyAgreementById(Long id);
/**
* 批量删除门户管理 -- 用户协议
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSysCompanyAgreementByIds(Long[] ids);
}
@@ -0,0 +1,62 @@
package com.mhd.system.mapper;
import java.util.List;
import com.mhd.system.domain.SysCompanyApp;
/**
* 门户管理--APP管理Mapper接口
*
* @author mhd
* @date 2022-07-27
*/
public interface SysCompanyAppMapper
{
/**
* 查询门户管理--APP管理
*
* @param id 门户管理--APP管理主键
* @return 门户管理--APP管理
*/
public SysCompanyApp selectSysCompanyAppById(Long id);
/**
* 查询门户管理--APP管理列表
*
* @param sysCompanyApp 门户管理--APP管理
* @return 门户管理--APP管理集合
*/
public List<SysCompanyApp> selectSysCompanyAppList(SysCompanyApp sysCompanyApp);
/**
* 新增门户管理--APP管理
*
* @param sysCompanyApp 门户管理--APP管理
* @return 结果
*/
public int insertSysCompanyApp(SysCompanyApp sysCompanyApp);
/**
* 修改门户管理--APP管理
*
* @param sysCompanyApp 门户管理--APP管理
* @return 结果
*/
public int updateSysCompanyApp(SysCompanyApp sysCompanyApp);
/**
* 删除门户管理--APP管理
*
* @param id 门户管理--APP管理主键
* @return 结果
*/
public int deleteSysCompanyAppById(Long id);
/**
* 批量删除门户管理--APP管理
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSysCompanyAppByIds(Long[] ids);
}
@@ -0,0 +1,62 @@
package com.mhd.system.mapper;
import java.util.List;
import com.mhd.system.domain.SysCompanyBasics;
/**
* 门户管理--基础信息Mapper接口
*
* @author mhd
* @date 2022-07-27
*/
public interface SysCompanyBasicsMapper
{
/**
* 查询门户管理--基础信息
*
* @param id 门户管理--基础信息主键
* @return 门户管理--基础信息
*/
public SysCompanyBasics selectSysCompanyBasicsById(Long id);
/**
* 查询门户管理--基础信息列表
*
* @param sysCompanyBasics 门户管理--基础信息
* @return 门户管理--基础信息集合
*/
public List<SysCompanyBasics> selectSysCompanyBasicsList(SysCompanyBasics sysCompanyBasics);
/**
* 新增门户管理--基础信息
*
* @param sysCompanyBasics 门户管理--基础信息
* @return 结果
*/
public int insertSysCompanyBasics(SysCompanyBasics sysCompanyBasics);
/**
* 修改门户管理--基础信息
*
* @param sysCompanyBasics 门户管理--基础信息
* @return 结果
*/
public int updateSysCompanyBasics(SysCompanyBasics sysCompanyBasics);
/**
* 删除门户管理--基础信息
*
* @param id 门户管理--基础信息主键
* @return 结果
*/
public int deleteSysCompanyBasicsById(Long id);
/**
* 批量删除门户管理--基础信息
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSysCompanyBasicsByIds(Long[] ids);
}
@@ -0,0 +1,79 @@
package com.mhd.system.mapper;
import java.util.List;
import com.mhd.system.domain.SysCompany;
/**
* 公司管理Mapper接口
*
* @author mhd
* @date 2022-07-22
*/
public interface SysCompanyMapper
{
/**
* 查询公司管理
*
* @param id 公司管理主键
* @return 公司管理
*/
public SysCompany selectSysCompanyById(Long id);
public SysCompany selectSysCompanyByUserId(Long userId);
/**
* 查询公司管理
*
* @param id 公司管理主键
* @return 公司管理
*/
public SysCompany selectSysCompanyByUserName(String userName);
/**
* 查询公司管理列表
*
* @param sysCompany 公司管理
* @return 公司管理集合
*/
public List<SysCompany> selectSysCompanyList(SysCompany sysCompany);
/**
* 新增公司管理
*
* @param sysCompany 公司管理
* @return 结果
*/
public int insertSysCompany(SysCompany sysCompany);
/**
* 修改公司管理
*
* @param sysCompany 公司管理
* @return 结果
*/
public int updateSysCompany(SysCompany sysCompany);
/**
* 删除公司管理
*
* @param id 公司管理主键
* @return 结果
*/
public int deleteSysCompanyById(Long id);
/**
* 批量删除公司管理
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSysCompanyByIds(Long[] ids);
/**
* 查询公司管理数据
*
* @param sysCompany 查询公司管理数据
* @return 查询公司管理数据
*/
public List<SysCompany> selectCompanyList(SysCompany sysCompany);
}
@@ -0,0 +1,66 @@
package com.mhd.system.mapper;
import java.util.List;
import com.mhd.system.domain.SysComplaintfeedback;
/**
* 意见投诉反馈Mapper接口
*
* @author mhd
* @date 2022-07-29
*/
public interface SysComplaintfeedbackMapper
{
/**
* 查询意见投诉反馈
*
* @param feedbackId 意见投诉反馈主键
* @return 意见投诉反馈
*/
public SysComplaintfeedback selectSysComplaintfeedbackByFeedbackId(Long[] feedbackId);
/**
* 查询意见投诉反馈列表
*
* @param sysComplaintfeedback 意见投诉反馈
* @return 意见投诉反馈集合
*/
public List<SysComplaintfeedback> selectSysComplaintfeedbackList(SysComplaintfeedback sysComplaintfeedback);
/**
* 新增意见投诉反馈
*
* @param sysComplaintfeedback 意见投诉反馈
* @return 结果
*/
public int insertSysComplaintfeedback(SysComplaintfeedback sysComplaintfeedback);
/**
* 修改意见投诉反馈
*
* @param sysComplaintfeedback 意见投诉反馈
* @return 结果
*/
public int updateSysComplaintfeedback(SysComplaintfeedback sysComplaintfeedback);
/**
* 删除意见投诉反馈
*
* @param feedbackId 意见投诉反馈主键
* @return 结果
*/
public int deleteSysComplaintfeedbackByFeedbackId(Long feedbackId);
/**
* 批量删除意见投诉反馈
*
* @param feedbackIds 需要删除的数据主键集合
* @return 结果
*/
public int deleteSysComplaintfeedbackByFeedbackIds(Long[] feedbackIds);
public int updateStatus(Long[] feedbackIds);
public int unReadSum(Long feedbackIds);
}
@@ -0,0 +1,69 @@
package com.mhd.system.mapper;
import java.util.List;
import com.mhd.system.domain.SysConfig;
/**
* 参数配置 数据层
*
* @author mhd
*/
public interface SysConfigMapper
{
/**
* 查询参数配置信息
*
* @param config 参数配置信息
* @return 参数配置信息
*/
public SysConfig selectConfig(SysConfig config);
/**
* 查询参数配置列表
*
* @param config 参数配置信息
* @return 参数配置集合
*/
public List<SysConfig> selectConfigList(SysConfig config);
/**
* 根据键名查询参数配置信息
*
* @param configKey 参数键名
* @return 参数配置信息
*/
public SysConfig checkConfigKeyUnique(String configKey);
/**
* 新增参数配置
*
* @param config 参数配置信息
* @return 结果
*/
public int insertConfig(SysConfig config);
/**
* 修改参数配置
*
* @param config 参数配置信息
* @return 结果
*/
public int updateConfig(SysConfig config);
/**
* 删除参数配置
*
* @param configId 参数ID
* @return 结果
*/
public int deleteConfigById(Long configId);
/**
* 批量删除参数信息
*
* @param configIds 需要删除的参数ID
* @return 结果
*/
public int deleteConfigByIds(Long[] configIds);
}
@@ -0,0 +1,62 @@
package com.mhd.system.mapper;
import java.util.List;
import com.mhd.system.domain.SysDepartInterfaceInfo;
/**
* 三方接口配置信息Mapper接口
*
* @author mhd
* @date 2022-07-27
*/
public interface SysDepartInterfaceInfoMapper
{
/**
* 查询三方接口配置信息
*
* @param departInfoId 三方接口配置信息主键
* @return 三方接口配置信息
*/
public SysDepartInterfaceInfo selectSysDepartInterfaceInfoByDepartInfoId(Long departInfoId);
/**
* 查询三方接口配置信息列表
*
* @param sysDepartInterfaceInfo 三方接口配置信息
* @return 三方接口配置信息集合
*/
public List<SysDepartInterfaceInfo> selectSysDepartInterfaceInfoList(SysDepartInterfaceInfo sysDepartInterfaceInfo);
/**
* 新增三方接口配置信息
*
* @param sysDepartInterfaceInfo 三方接口配置信息
* @return 结果
*/
public int insertSysDepartInterfaceInfo(SysDepartInterfaceInfo sysDepartInterfaceInfo);
/**
* 修改三方接口配置信息
*
* @param sysDepartInterfaceInfo 三方接口配置信息
* @return 结果
*/
public int updateSysDepartInterfaceInfo(SysDepartInterfaceInfo sysDepartInterfaceInfo);
/**
* 删除三方接口配置信息
*
* @param departInfoId 三方接口配置信息主键
* @return 结果
*/
public int deleteSysDepartInterfaceInfoByDepartInfoId(Long departInfoId);
/**
* 批量删除三方接口配置信息
*
* @param departInfoIds 需要删除的数据主键集合
* @return 结果
*/
public int deleteSysDepartInterfaceInfoByDepartInfoIds(Long[] departInfoIds);
}
@@ -0,0 +1,118 @@
package com.mhd.system.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.mhd.system.api.domain.SysDept;
/**
* 部门管理 数据层
*
* @author mhd
*/
public interface SysDeptMapper
{
/**
* 查询部门管理数据
*
* @param dept 部门信息
* @return 部门信息集合
*/
public List<SysDept> selectDeptList(SysDept dept);
/**
* 根据角色ID查询部门树信息
*
* @param roleId 角色ID
* @param deptCheckStrictly 部门树选择项是否关联显示
* @return 选中部门列表
*/
public List<Long> selectDeptListByRoleId(@Param("roleId") Long roleId, @Param("deptCheckStrictly") boolean deptCheckStrictly);
/**
* 根据部门ID查询信息
*
* @param deptId 部门ID
* @return 部门信息
*/
public SysDept selectDeptById(Long deptId);
/**
* 根据ID查询所有子部门
*
* @param deptId 部门ID
* @return 部门列表
*/
public List<SysDept> selectChildrenDeptById(Long deptId);
/**
* 根据ID查询所有子部门(正常状态)
*
* @param deptId 部门ID
* @return 子部门数
*/
public int selectNormalChildrenDeptById(Long deptId);
/**
* 是否存在子节点
*
* @param deptId 部门ID
* @return 结果
*/
public int hasChildByDeptId(Long deptId);
/**
* 查询部门是否存在用户
*
* @param deptId 部门ID
* @return 结果
*/
public int checkDeptExistUser(Long deptId);
/**
* 校验部门名称是否唯一
*
* @param deptName 部门名称
* @param parentId 父部门ID
* @return 结果
*/
public SysDept checkDeptNameUnique(@Param("deptName") String deptName, @Param("parentId") Long parentId);
/**
* 新增部门信息
*
* @param dept 部门信息
* @return 结果
*/
public int insertDept(SysDept dept);
/**
* 修改部门信息
*
* @param dept 部门信息
* @return 结果
*/
public int updateDept(SysDept dept);
/**
* 修改所在部门正常状态
*
* @param deptIds 部门ID组
*/
public void updateDeptStatusNormal(Long[] deptIds);
/**
* 修改子元素关系
*
* @param depts 子元素
* @return 结果
*/
public int updateDeptChildren(@Param("depts") List<SysDept> depts);
/**
* 删除部门管理信息
*
* @param deptId 部门ID
* @return 结果
*/
public int deleteDeptById(Long deptId);
}
@@ -0,0 +1,101 @@
package com.mhd.system.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mhd.basic.domain.sysAppVersionManage.entity.SysAppVersionManage;
import com.mhd.basic.infrastructure.util.annotation.DataPermissions;
import org.apache.ibatis.annotations.Param;
import com.mhd.system.api.domain.SysDictData;
/**
* 字典表 数据层
*
* @author mhd
*/
public interface SysDictDataMapper extends BaseMapper<SysDictData>
{
/**
* 根据条件分页查询字典数据
*
* @param dictData 字典数据信息
* @return 字典数据集合信息
*/
@DataPermissions(cacheName = "tenant")
public List<SysDictData> selectDictDataList(SysDictData dictData);
/**
* 根据字典类型查询字典数据
*
* @param dictData 字典数据信息
* @return 字典数据集合信息
*/
@DataPermissions(cacheName = "tenant")
public List<SysDictData> selectDictDataByType(SysDictData dictData);
/**
* 根据字典类型和字典键值查询字典数据信息
*
* @param dictType 字典类型
* @param dictValue 字典键值
* @return 字典标签
*/
public String selectDictLabel(@Param("dictType") String dictType, @Param("dictValue") String dictValue);
/**
* 根据字典数据ID查询信息
*
* @param dictCode 字典数据ID
* @return 字典数据
*/
public SysDictData selectDictDataById(Long dictCode);
/**
* 查询字典数据
*
* @param dictType 字典类型
* @return 字典数据
*/
public int countDictDataByType(String dictType);
/**
* 通过字典ID删除字典数据信息
*
* @param dictCode 字典数据ID
* @return 结果
*/
public int deleteDictDataById(Long dictCode);
/**
* 批量删除字典数据信息
*
* @param dictCodes 需要删除的字典数据ID
* @return 结果
*/
public int deleteDictDataByIds(Long[] dictCodes);
/**
* 新增字典数据信息
*
* @param dictData 字典数据信息
* @return 结果
*/
public int insertDictData(SysDictData dictData);
/**
* 修改字典数据信息
*
* @param dictData 字典数据信息
* @return 结果
*/
public int updateDictData(SysDictData dictData);
/**
* 同步修改字典类型
*
* @param oldDictType 旧字典类型
* @param newDictType 新旧字典类型
* @return 结果
*/
public int updateDictDataType(@Param("oldDictType") String oldDictType, @Param("newDictType") String newDictType);
}
@@ -0,0 +1,83 @@
package com.mhd.system.mapper;
import java.util.List;
import com.mhd.system.api.domain.SysDictType;
/**
* 字典表 数据层
*
* @author mhd
*/
public interface SysDictTypeMapper
{
/**
* 根据条件分页查询字典类型
*
* @param dictType 字典类型信息
* @return 字典类型集合信息
*/
public List<SysDictType> selectDictTypeList(SysDictType dictType);
/**
* 根据所有字典类型
*
* @return 字典类型集合信息
*/
public List<SysDictType> selectDictTypeAll();
/**
* 根据字典类型ID查询信息
*
* @param dictId 字典类型ID
* @return 字典类型
*/
public SysDictType selectDictTypeById(Long dictId);
/**
* 根据字典类型查询信息
*
* @param dictType 字典类型
* @return 字典类型
*/
public SysDictType selectDictTypeByType(String dictType);
/**
* 通过字典ID删除字典信息
*
* @param dictId 字典ID
* @return 结果
*/
public int deleteDictTypeById(Long dictId);
/**
* 批量删除字典类型信息
*
* @param dictIds 需要删除的字典ID
* @return 结果
*/
public int deleteDictTypeByIds(Long[] dictIds);
/**
* 新增字典类型信息
*
* @param dictType 字典类型信息
* @return 结果
*/
public int insertDictType(SysDictType dictType);
/**
* 修改字典类型信息
*
* @param dictType 字典类型信息
* @return 结果
*/
public int updateDictType(SysDictType dictType);
/**
* 校验字典类型称是否唯一
*
* @param dictType 字典类型
* @return 结果
*/
public SysDictType checkDictTypeUnique(String dictType);
}
@@ -0,0 +1,62 @@
package com.mhd.system.mapper;
import java.util.List;
import com.mhd.system.domain.SysEquipmentGps;
/**
* 设备管理 -- GPS管理Mapper接口
*
* @author mhd
* @date 2022-07-28
*/
public interface SysEquipmentGpsMapper
{
/**
* 查询设备管理 -- GPS管理
*
* @param id 设备管理 -- GPS管理主键
* @return 设备管理 -- GPS管理
*/
public SysEquipmentGps selectSysEquipmentGpsById(Long id);
/**
* 查询设备管理 -- GPS管理列表
*
* @param sysEquipmentGps 设备管理 -- GPS管理
* @return 设备管理 -- GPS管理集合
*/
public List<SysEquipmentGps> selectSysEquipmentGpsList(SysEquipmentGps sysEquipmentGps);
/**
* 新增设备管理 -- GPS管理
*
* @param sysEquipmentGps 设备管理 -- GPS管理
* @return 结果
*/
public int insertSysEquipmentGps(SysEquipmentGps sysEquipmentGps);
/**
* 修改设备管理 -- GPS管理
*
* @param sysEquipmentGps 设备管理 -- GPS管理
* @return 结果
*/
public int updateSysEquipmentGps(SysEquipmentGps sysEquipmentGps);
/**
* 删除设备管理 -- GPS管理
*
* @param id 设备管理 -- GPS管理主键
* @return 结果
*/
public int deleteSysEquipmentGpsById(Long id);
/**
* 批量删除设备管理 -- GPS管理
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSysEquipmentGpsByIds(Long[] ids);
}
@@ -0,0 +1,62 @@
package com.mhd.system.mapper;
import java.util.List;
import com.mhd.system.domain.SysEquipmentPrinter;
/**
* 设备管理 -- 打印机管理Mapper接口
*
* @author mhd
* @date 2022-07-28
*/
public interface SysEquipmentPrinterMapper
{
/**
* 查询设备管理 -- 打印机管理
*
* @param id 设备管理 -- 打印机管理主键
* @return 设备管理 -- 打印机管理
*/
public SysEquipmentPrinter selectSysEquipmentPrinterById(Long id);
/**
* 查询设备管理 -- 打印机管理列表
*
* @param sysEquipmentPrinter 设备管理 -- 打印机管理
* @return 设备管理 -- 打印机管理集合
*/
public List<SysEquipmentPrinter> selectSysEquipmentPrinterList(SysEquipmentPrinter sysEquipmentPrinter);
/**
* 新增设备管理 -- 打印机管理
*
* @param sysEquipmentPrinter 设备管理 -- 打印机管理
* @return 结果
*/
public int insertSysEquipmentPrinter(SysEquipmentPrinter sysEquipmentPrinter);
/**
* 修改设备管理 -- 打印机管理
*
* @param sysEquipmentPrinter 设备管理 -- 打印机管理
* @return 结果
*/
public int updateSysEquipmentPrinter(SysEquipmentPrinter sysEquipmentPrinter);
/**
* 删除设备管理 -- 打印机管理
*
* @param id 设备管理 -- 打印机管理主键
* @return 结果
*/
public int deleteSysEquipmentPrinterById(Long id);
/**
* 批量删除设备管理 -- 打印机管理
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSysEquipmentPrinterByIds(Long[] ids);
}
@@ -0,0 +1,62 @@
package com.mhd.system.mapper;
import java.util.List;
import com.mhd.system.domain.SysEquipmentTemplate;
/**
* 设备管理 -- 打印模板Mapper接口
*
* @author mhd
* @date 2022-07-28
*/
public interface SysEquipmentTemplateMapper
{
/**
* 查询设备管理 -- 打印模板
*
* @param id 设备管理 -- 打印模板主键
* @return 设备管理 -- 打印模板
*/
public SysEquipmentTemplate selectSysEquipmentTemplateById(Long id);
/**
* 查询设备管理 -- 打印模板列表
*
* @param sysEquipmentTemplate 设备管理 -- 打印模板
* @return 设备管理 -- 打印模板集合
*/
public List<SysEquipmentTemplate> selectSysEquipmentTemplateList(SysEquipmentTemplate sysEquipmentTemplate);
/**
* 新增设备管理 -- 打印模板
*
* @param sysEquipmentTemplate 设备管理 -- 打印模板
* @return 结果
*/
public int insertSysEquipmentTemplate(SysEquipmentTemplate sysEquipmentTemplate);
/**
* 修改设备管理 -- 打印模板
*
* @param sysEquipmentTemplate 设备管理 -- 打印模板
* @return 结果
*/
public int updateSysEquipmentTemplate(SysEquipmentTemplate sysEquipmentTemplate);
/**
* 删除设备管理 -- 打印模板
*
* @param id 设备管理 -- 打印模板主键
* @return 结果
*/
public int deleteSysEquipmentTemplateById(Long id);
/**
* 批量删除设备管理 -- 打印模板
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteSysEquipmentTemplateByIds(Long[] ids);
}
@@ -0,0 +1,31 @@
package com.mhd.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mhd.system.api.domain.SysLogininfor;
import com.mhd.system.api.domain.SysLogininforPo;
import com.mhd.system.domain.dto.SysLogininforDTO;
import java.util.List;
/**
* 系统访问日志情况信息 数据层
*
* @author mhd
*/
public interface SysLogininforMapper extends BaseMapper<SysLogininfor>
{
/**
* 清空系统登录日志
*
* @return 结果
*/
public int cleanLogininfor();
/**
* 查询系统登录日志集合
*
* @return
*/
List<SysLogininforPo> selectLogininforList(SysLogininforDTO sysLogininforDtor);
}
@@ -0,0 +1,123 @@
package com.mhd.system.mapper;
import java.util.List;
import com.mhd.system.domain.SysMenu;
import org.apache.ibatis.annotations.Param;
/**
* 菜单表 数据层
*
* @author mhd
*/
public interface SysMenuMapper
{
/**
* 查询系统菜单列表
*
* @param menu 菜单信息
* @return 菜单列表
*/
public List<SysMenu> selectMenuList(SysMenu menu);
/**
* 根据用户所有权限
*
* @return 权限列表
*/
public List<String> selectMenuPerms();
/**
* 根据用户查询系统菜单列表
*
* @param menu 菜单信息
* @return 菜单列表
*/
public List<SysMenu> selectMenuListByUserId(SysMenu menu);
/**
* 根据用户ID查询权限
*
* @param userId 用户ID
* @return 权限列表
*/
public List<String> selectMenuPermsByUserId(Long userId);
/**
* 根据用户ID查询菜单
*
* @return 菜单列表
*/
public List<SysMenu> selectMenuTreeAll();
/**
* 根据用户ID查询菜单
*
* @param userId 用户ID
* @return 菜单列表
*/
public List<SysMenu> selectMenuTreeByUserId(Long userId);
/**
* 根据角色ID查询菜单树信息
*
* @param roleId 角色ID
* @param menuCheckStrictly 菜单树选择项是否关联显示
* @return 选中菜单列表
*/
public List<Long> selectMenuListByRoleId(@Param("roleId") Long roleId, @Param("menuCheckStrictly") boolean menuCheckStrictly);
/**
* 根据系统ID查询菜单树信息
*/
public List<Long> selectMenuListByProductId(@Param("productId") Long productId, @Param("menuCheckStrictly") boolean menuCheckStrictly);
/**
* 根据菜单ID查询信息
*
* @param menuId 菜单ID
* @return 菜单信息
*/
public SysMenu selectMenuById(Long menuId);
/**
* 是否存在菜单子节点
*
* @param menuId 菜单ID
* @return 结果
*/
public int hasChildByMenuId(Long menuId);
/**
* 新增菜单信息
*
* @param menu 菜单信息
* @return 结果
*/
public int insertMenu(SysMenu menu);
/**
* 修改菜单信息
*
* @param menu 菜单信息
* @return 结果
*/
public int updateMenu(SysMenu menu);
/**
* 删除菜单管理信息
*
* @param menuId 菜单ID
* @return 结果
*/
public int deleteMenuById(Long menuId);
/**
* 校验菜单名称是否唯一
*
* @param menuName 菜单名称
* @param parentId 父菜单ID
* @return 结果
*/
public SysMenu checkMenuNameUnique(@Param("menuName") String menuName, @Param("parentId") Long parentId);
}
@@ -0,0 +1,62 @@
package com.mhd.system.mapper;
import java.util.List;
import com.mhd.system.domain.SysMsgCenter;
/**
* 消息中心-站内Mapper接口
*
* @author mhd
* @date 2022-07-27
*/
public interface SysMsgCenterMapper
{
/**
* 查询消息中心-站内
*
* @param msgCenterId 消息中心-站内主键
* @return 消息中心-站内
*/
public SysMsgCenter selectSysMsgCenterByMsgCenterId(Long msgCenterId);
/**
* 查询消息中心-站内列表
*
* @param sysMsgCenter 消息中心-站内
* @return 消息中心-站内集合
*/
public List<SysMsgCenter> selectSysMsgCenterList(SysMsgCenter sysMsgCenter);
/**
* 新增消息中心-站内
*
* @param sysMsgCenter 消息中心-站内
* @return 结果
*/
public int insertSysMsgCenter(SysMsgCenter sysMsgCenter);
/**
* 修改消息中心-站内
*
* @param sysMsgCenter 消息中心-站内
* @return 结果
*/
public int updateSysMsgCenter(SysMsgCenter sysMsgCenter);
/**
* 删除消息中心-站内
*
* @param msgCenterId 消息中心-站内主键
* @return 结果
*/
public int deleteSysMsgCenterByMsgCenterId(Long msgCenterId);
/**
* 批量删除消息中心-站内
*
* @param msgCenterIds 需要删除的数据主键集合
* @return 结果
*/
public int deleteSysMsgCenterByMsgCenterIds(Long[] msgCenterIds);
}
@@ -0,0 +1,64 @@
package com.mhd.system.mapper;
import java.util.List;
import com.mhd.system.domain.SysMsgPush;
import com.mhd.system.domain.dto.SysMsgPushDTO;
/**
* 消息推送Mapper接口
*
* @author mhd
* @date 2022-07-27
*/
public interface SysMsgPushMapper
{
/**
* 查询消息推送
*
* @param msgPushId 消息推送主键
* @return 消息推送
*/
public SysMsgPush selectSysMsgPushByMsgPushId(Long msgPushId);
/**
* 查询消息推送列表
*
* @param sysMsgPushDto 消息推送
* @return 消息推送集合
*/
//@Select("select * from sys_msg_push ")
public List<SysMsgPush> selectSysMsgPushList(SysMsgPushDTO sysMsgPushDto);
/**
* 新增消息推送
*
* @param sysMsgPush 消息推送
* @return 结果
*/
public int insertSysMsgPush(SysMsgPush sysMsgPush);
/**
* 修改消息推送
*
* @param sysMsgPush 消息推送
* @return 结果
*/
public int updateSysMsgPush(SysMsgPush sysMsgPush);
/**
* 删除消息推送
*
* @param msgId 消息推送主键
* @return 结果
*/
public int deleteSysMsgPushByMsgId(Long msgId);
/**
* 批量删除消息推送
*
* @param msgIds 需要删除的数据主键集合
* @return 结果
*/
public int deleteSysMsgPushByMsgIds(Long[] msgIds);
}
@@ -0,0 +1,61 @@
package com.mhd.system.mapper;
import java.util.List;
import com.mhd.system.domain.SysNotice;
/**
* 通知公告表 数据层
*
* @author mhd
*/
public interface SysNoticeMapper
{
/**
* 查询公告信息
*
* @param noticeId 公告ID
* @return 公告信息
*/
public SysNotice selectNoticeById(Long noticeId);
/**
* 查询公告列表
*
* @param notice 公告信息
* @return 公告集合
*/
public List<SysNotice> selectNoticeList(SysNotice notice);
/**
* 新增公告
*
* @param notice 公告信息
* @return 结果
*/
public int insertNotice(SysNotice notice);
/**
* 修改公告
*
* @param notice 公告信息
* @return 结果
*/
public int updateNotice(SysNotice notice);
/**
* 批量删除公告
*
* @param noticeId 公告ID
* @return 结果
*/
public int deleteNoticeById(Long noticeId);
/**
* 批量删除公告信息
*
* @param noticeIds 需要删除的公告ID
* @return 结果
*/
public int deleteNoticeByIds(Long[] noticeIds);
}
@@ -0,0 +1,28 @@
package com.mhd.system.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mhd.system.api.domain.SysOperLogPo;
import com.mhd.system.api.domain.SysOperLog;
import com.mhd.system.domain.dto.SysOperLogDTO;
/**
* 操作日志 数据层
*
* @author mhd
*/
public interface SysOperLogMapper extends BaseMapper<SysOperLog>
{
/**
* 查询系统操作日志集合
*
* @return 操作日志集合
*/
public List<SysOperLogPo> selectOperLogList(SysOperLogDTO sysOperLogDTO);
/**
* 清空操作日志
*/
public void cleanOperLog();
}
@@ -0,0 +1,64 @@
package com.mhd.system.mapper;
import java.util.List;
import com.mhd.system.domain.SysPlatCompany;
import com.mhd.system.domain.vo.SysPlatCompanyVO;
import com.mhd.system.domain.dto.SysPlatCompanyDTO;
/**
* 公司系统平台Mapper接口
*
* @author mhd
* @date 2022-07-26
*/
public interface SysPlatCompanyMapper
{
/**
* 查询公司系统平台
*
* @param sysPlatId 公司系统平台主键
* @return 公司系统平台
*/
public SysPlatCompany selectSysPlatCompanyBySysPlatId(Long sysPlatId);
/**
* 查询公司系统平台列表
*
* @param sysPlatCompany 公司系统平台
* @return 公司系统平台集合
*/
public List<SysPlatCompanyVO> selectSysPlatCompanyList(SysPlatCompanyDTO sysPlatCompanyDTO);
/**
* 新增公司系统平台
*
* @param sysPlatCompany 公司系统平台
* @return 结果
*/
public int insertSysPlatCompany(SysPlatCompany sysPlatCompany);
/**
* 修改公司系统平台
*
* @param sysPlatCompany 公司系统平台
* @return 结果
*/
public int updateSysPlatCompany(SysPlatCompany sysPlatCompany);
/**
* 删除公司系统平台
*
* @param sysPlatId 公司系统平台主键
* @return 结果
*/
public int deleteSysPlatCompanyBySysPlatId(Long sysPlatId);
/**
* 批量删除公司系统平台
*
* @param sysPlatIds 需要删除的数据主键集合
* @return 结果
*/
public int deleteSysPlatCompanyBySysPlatIds(Long[] sysPlatIds);
}
@@ -0,0 +1,100 @@
package com.mhd.system.mapper;
import java.util.List;
import com.mhd.system.domain.SysPost;
/**
* 岗位信息 数据层
*
* @author mhd
*/
public interface SysPostMapper
{
/**
* 查询岗位数据集合
*
* @param post 岗位信息
* @return 岗位数据集合
*/
public List<SysPost> selectPostList(SysPost post);
/**
* 查询所有岗位
*
* @return 岗位列表
*/
public List<SysPost> selectPostAll();
/**
* 通过岗位ID查询岗位信息
*
* @param postId 岗位ID
* @return 角色对象信息
*/
public SysPost selectPostById(Long postId);
/**
* 根据用户ID获取岗位选择框列表
*
* @param userId 用户ID
* @return 选中岗位ID列表
*/
public List<Long> selectPostListByUserId(Long userId);
/**
* 查询用户所属岗位组
*
* @param userName 用户名
* @return 结果
*/
public List<SysPost> selectPostsByUserName(String userName);
/**
* 删除岗位信息
*
* @param postId 岗位ID
* @return 结果
*/
public int deletePostById(Long postId);
/**
* 批量删除岗位信息
*
* @param postIds 需要删除的岗位ID
* @return 结果
*/
public int deletePostByIds(Long[] postIds);
/**
* 修改岗位信息
*
* @param post 岗位信息
* @return 结果
*/
public int updatePost(SysPost post);
/**
* 新增岗位信息
*
* @param post 岗位信息
* @return 结果
*/
public int insertPost(SysPost post);
/**
* 校验岗位名称
*
* @param postName 岗位名称
* @return 结果
*/
public SysPost checkPostNameUnique(String postName);
/**
* 校验岗位编码
*
* @param postCode 岗位编码
* @return 结果
*/
public SysPost checkPostCodeUnique(String postCode);
}
@@ -0,0 +1,76 @@
package com.mhd.system.mapper;
import java.util.List;
import com.mhd.system.domain.SysProduct;
import com.mhd.system.domain.dto.SysProductDTO;
import com.mhd.system.domain.vo.TreeSelect;
import org.apache.ibatis.annotations.Select;
/**
* 系统产品Mapper接口
*
* @author mhd
* @date 2022-07-21
*/
public interface SysProductMapper
{
/**
* 查询系统产品
*
* @param productId 系统产品主键
* @return 系统产品
*/
public SysProduct selectSysProductByProductId(Long productId);
/**
* 查询系统产品列表
*
* @param sysProduct 系统产品
* @return 系统产品集合
*/
public List<SysProduct> selectSysProductList(SysProduct sysProduct);
/**
* 新增系统产品
*
* @param sysProduct 系统产品
* @return 结果
*/
public int insertSysProduct(SysProduct sysProduct);
/**
* 修改系统产品
*
* @param sysProduct 系统产品
* @return 结果
*/
public int updateSysProduct(SysProduct sysProduct);
/**
* 删除系统产品
*
* @param productId 系统产品主键
* @return 结果
*/
public int deleteSysProductByProductId(Long productId);
/**
* 批量删除系统产品
*
* @param productIds 需要删除的数据主键集合
* @return 结果
*/
public int deleteSysProductByProductIds(Long[] productIds);
/**
* @Description 根据系统ID获取角色选择框列表
* @Author Alex
* @Date 2022/7/21 23:29
*/
public SysProduct selectProductById(Long productId);
public SysProduct selectProductByProductName(SysProductDTO sysProductDTO);
@Select("select product_id as id,product_name as label from sys_product a where a.del_flag = 0")
public List<TreeSelect> selectProductTreeList();
}
@@ -0,0 +1,68 @@
package com.mhd.system.mapper;
import java.util.List;
import com.mhd.system.domain.SysProductMenu;
/**
* 【请填写功能名称】Mapper接口
*
* @author mhd
* @date 2022-07-21
*/
public interface SysProductMenuMapper
{
/**
* 查询【请填写功能名称】
*
* @param productId 【请填写功能名称】主键
* @return 【请填写功能名称】
*/
public SysProductMenu selectSysProductMenuByProductId(Long productId);
/**
* 查询【请填写功能名称】列表
*
* @param sysProductMenu 【请填写功能名称】
* @return 【请填写功能名称】集合
*/
public List<SysProductMenu> selectSysProductMenuList(SysProductMenu sysProductMenu);
/**
* 新增【请填写功能名称】
*
* @param sysProductMenu 【请填写功能名称】
* @return 结果
*/
public int insertSysProductMenu(SysProductMenu sysProductMenu);
/**
* 修改【请填写功能名称】
*
* @param sysProductMenu 【请填写功能名称】
* @return 结果
*/
public int updateSysProductMenu(SysProductMenu sysProductMenu);
/**
* 删除【请填写功能名称】
*
* @param productId 【请填写功能名称】主键
* @return 结果
*/
public int deleteSysProductMenuByProductId(Long productId);
/**
* 批量删除【请填写功能名称】
*
* @param productIds 需要删除的数据主键集合
* @return 结果
*/
public int deleteSysProductMenuByProductIds(Long[] productIds);
/**
* 插入产品ID与菜单ID
*/
public int batchProductMenu(List<SysProductMenu> roleMenuList);
}
@@ -0,0 +1,45 @@
package com.mhd.system.mapper;
import java.util.List;
import com.mhd.system.domain.SysRoleDept;
/**
* 角色与部门关联表 数据层
*
* @author mhd
*/
public interface SysRoleDeptMapper
{
/**
* 通过角色ID删除角色和部门关联
*
* @param roleId 角色ID
* @return 结果
*/
public int deleteRoleDeptByRoleId(Long roleId);
/**
* 批量删除角色部门关联信息
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteRoleDept(Long[] ids);
/**
* 查询部门使用数量
*
* @param deptId 部门ID
* @return 结果
*/
public int selectCountRoleDeptByDeptId(Long deptId);
/**
* 批量新增角色部门信息
*
* @param roleDeptList 角色部门列表
* @return 结果
*/
public int batchRoleDept(List<SysRoleDept> roleDeptList);
}
@@ -0,0 +1,126 @@
package com.mhd.system.mapper;
import java.util.List;
import com.mhd.system.api.domain.SysRole;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
/**
* 角色表 数据层
*
* @author mhd
*/
public interface SysRoleMapper
{
/**
* 根据条件分页查询角色数据
*
* @param role 角色信息
* @return 角色数据集合信息
*/
public List<SysRole> selectRoleList(SysRole role);
/**
* 根据用户ID查询角色
*
* @param userId 用户ID
* @return 角色列表
*/
public List<SysRole> selectRolePermissionByUserId(Long userId);
/**
* 查询所有角色
*
* @return 角色列表
*/
public List<SysRole> selectRoleAll();
/**
* 根据用户ID获取角色选择框列表
*
* @param userId 用户ID
* @return 选中角色ID列表
*/
public List<Long> selectRoleListByUserId(Long userId);
/**
* 通过角色ID查询角色
*
* @param roleId 角色ID
* @return 角色对象信息
*/
public SysRole selectRoleById(Long roleId);
/**
* 通过角色key查询角色
*
* @param roleKey 角色key
* @return 角色对象信息
*/
public SysRole selectRoleByRoleKey(String roleKey);
/**
* 通过角色key查询角色
*
* @param roleKey 角色key
* @return 角色对象信息
*/
@Select("select * from sys_role where role_key=#{roleKey} and company_id=#{companyId} ")
public SysRole selectRoleByRoleKeyAndCompanyId(@Param("roleKey") String roleKey, @Param("companyId")Long companyId);
/**
* 根据用户ID查询角色
*
* @param userName 用户名
* @return 角色列表
*/
public List<SysRole> selectRolesByUserName(String userName);
/**
* 校验角色名称是否唯一
*
* @param roleName 角色名称
* @return 角色信息
*/
public SysRole checkRoleNameUnique(String roleName);
/**
* 校验角色权限是否唯一
*
* @param roleKey 角色权限
* @return 角色信息
*/
public SysRole checkRoleKeyUnique(String roleKey);
/**
* 修改角色信息
*
* @param role 角色信息
* @return 结果
*/
public int updateRole(SysRole role);
/**
* 新增角色信息
*
* @param role 角色信息
* @return 结果
*/
public int insertRole(SysRole role);
/**
* 通过角色ID删除角色
*
* @param roleId 角色ID
* @return 结果
*/
public int deleteRoleById(Long roleId);
/**
* 批量删除角色信息
*
* @param roleIds 需要删除的角色ID
* @return 结果
*/
public int deleteRoleByIds(Long[] roleIds);
}
@@ -0,0 +1,45 @@
package com.mhd.system.mapper;
import java.util.List;
import com.mhd.system.domain.SysRoleMenu;
/**
* 角色与菜单关联表 数据层
*
* @author mhd
*/
public interface SysRoleMenuMapper
{
/**
* 查询菜单使用数量
*
* @param menuId 菜单ID
* @return 结果
*/
public int checkMenuExistRole(Long menuId);
/**
* 通过角色ID删除角色和菜单关联
*
* @param roleId 角色ID
* @return 结果
*/
public int deleteRoleMenuByRoleId(Long roleId);
/**
* 批量删除角色菜单关联信息
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteRoleMenu(Long[] ids);
/**
* 批量新增角色菜单信息
*
* @param roleMenuList 角色菜单列表
* @return 结果
*/
public int batchRoleMenu(List<SysRoleMenu> roleMenuList);
}
@@ -0,0 +1,64 @@
package com.mhd.system.mapper;
import java.util.List;
import com.mhd.system.domain.SysTenantManagement;
import com.mhd.system.domain.dto.SysTenantManagementDTO;
import com.mhd.system.domain.vo.SysTenantManagementVO;
/**
* 租户管理Mapper接口
*
* @author mhd
* @date 2022-07-31
*/
public interface SysTenantManagementMapper
{
/**
* 查询租户管理
*
* @param tenantId 租户管理主键
* @return 租户管理
*/
public SysTenantManagementVO selectSysTenantManagementByTenantId(Long tenantId);
/**
* 查询租户管理列表
*
* @param sysTenantManagement 租户管理
* @return 租户管理集合
*/
public List<SysTenantManagementVO> selectSysTenantManagementList(SysTenantManagementDTO sysTenantManagement);
/**
* 新增租户管理
*
* @param sysTenantManagement 租户管理
* @return 结果
*/
public int insertSysTenantManagement(SysTenantManagement sysTenantManagement);
/**
* 修改租户管理
*
* @param sysTenantManagement 租户管理
* @return 结果
*/
public int updateSysTenantManagement(SysTenantManagement sysTenantManagement);
/**
* 删除租户管理
*
* @param tenantId 租户管理主键
* @return 结果
*/
public int deleteSysTenantManagementByTenantId(Long tenantId);
/**
* 批量删除租户管理
*
* @param tenantIds 需要删除的数据主键集合
* @return 结果
*/
public int deleteSysTenantManagementByTenantIds(Long[] tenantIds);
}

Some files were not shown because too many files have changed in this diff Show More