Merge branch 'master' of http://192.168.110.207:3000/by2025/SmartParks
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 5m46s
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 5m46s
# Conflicts: # ruoyi-modules/Sis/src/main/java/org/dromara/sis/domain/vo/SisDevicePointVo.java
This commit is contained in:
@@ -18,7 +18,7 @@ jobs:
|
||||
- name: cp
|
||||
run: copy ./ruoyi-modules/Property/target/Property.jar C:\devtool\server
|
||||
- name: kill
|
||||
run: cmd /c for /f "tokens=5" %a in ('netstat -ano ^| findstr ":10001" ^| findstr "LISTENING"') do @taskkill /F /PID %a >nul 2>nul
|
||||
run: Get-NetTCPConnection -LocalPort 10001 -State Listening -ErrorAction SilentlyContinue | ForEach-Object -Process { Stop-Process -Id $_.OwningProcess -Force -ErrorAction SilentlyContinue }
|
||||
- name: run
|
||||
run: java -jar C:\devtool\server\Property.jar
|
||||
|
||||
|
2
pom.xml
2
pom.xml
@@ -98,6 +98,8 @@
|
||||
<nacos.username>nacos</nacos.username>
|
||||
<nacos.password>nacos</nacos.password>
|
||||
<logstash.address>127.0.0.1:4560</logstash.address>
|
||||
|
||||
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
@@ -10,6 +10,7 @@
|
||||
|
||||
<artifactId>ruoyi-auth</artifactId>
|
||||
|
||||
|
||||
<description>
|
||||
ruoyi-auth 认证授权中心
|
||||
</description>
|
||||
|
@@ -0,0 +1,106 @@
|
||||
package org.dromara.property.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.property.domain.vo.PlantsPlanProductVo;
|
||||
import org.dromara.property.domain.bo.PlantsPlanProductBo;
|
||||
import org.dromara.property.service.IPlantsPlanProductService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 绿植租赁-租赁方案-绿植
|
||||
* 前端访问路由地址为:/property/planProduct
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/planProduct")
|
||||
public class PlantsPlanProductController extends BaseController {
|
||||
|
||||
private final IPlantsPlanProductService plantsPlanProductService;
|
||||
|
||||
/**
|
||||
* 查询绿植租赁-租赁方案-绿植列表
|
||||
*/
|
||||
@SaCheckPermission("property:planProduct:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<PlantsPlanProductVo> list(PlantsPlanProductBo bo, PageQuery pageQuery) {
|
||||
return plantsPlanProductService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出绿植租赁-租赁方案-绿植列表
|
||||
*/
|
||||
@SaCheckPermission("property:planProduct:export")
|
||||
@Log(title = "绿植租赁-租赁方案-绿植", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(PlantsPlanProductBo bo, HttpServletResponse response) {
|
||||
List<PlantsPlanProductVo> list = plantsPlanProductService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "绿植租赁-租赁方案-绿植", PlantsPlanProductVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取绿植租赁-租赁方案-绿植详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("property:planProduct:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<PlantsPlanProductVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return R.ok(plantsPlanProductService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增绿植租赁-租赁方案-绿植
|
||||
*/
|
||||
@SaCheckPermission("property:planProduct:add")
|
||||
@Log(title = "绿植租赁-租赁方案-绿植", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody PlantsPlanProductBo bo) {
|
||||
return toAjax(plantsPlanProductService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改绿植租赁-租赁方案-绿植
|
||||
*/
|
||||
@SaCheckPermission("property:planProduct:edit")
|
||||
@Log(title = "绿植租赁-租赁方案-绿植", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody PlantsPlanProductBo bo) {
|
||||
return toAjax(plantsPlanProductService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除绿植租赁-租赁方案-绿植
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("property:planProduct:remove")
|
||||
@Log(title = "绿植租赁-租赁方案-绿植", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable("ids") Long[] ids) {
|
||||
return toAjax(plantsPlanProductService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@@ -0,0 +1,106 @@
|
||||
package org.dromara.property.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.property.domain.vo.PlantsProductVo;
|
||||
import org.dromara.property.domain.bo.PlantsProductBo;
|
||||
import org.dromara.property.service.IPlantsProductService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 绿植租赁-绿植产品
|
||||
* 前端访问路由地址为:/property/property
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/plantsProduct")
|
||||
public class PlantsProductController extends BaseController {
|
||||
|
||||
private final IPlantsProductService plantsProductService;
|
||||
|
||||
/**
|
||||
* 查询绿植租赁-绿植产品列表
|
||||
*/
|
||||
@SaCheckPermission("property:plantsProduct:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<PlantsProductVo> list(PlantsProductBo bo, PageQuery pageQuery) {
|
||||
return plantsProductService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出绿植租赁-绿植产品列表
|
||||
*/
|
||||
@SaCheckPermission("property:plantsProduct:export")
|
||||
@Log(title = "绿植租赁-绿植产品", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(PlantsProductBo bo, HttpServletResponse response) {
|
||||
List<PlantsProductVo> list = plantsProductService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "绿植租赁-绿植产品", PlantsProductVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取绿植租赁-绿植产品详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("property:plantsProduct:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<PlantsProductVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return R.ok(plantsProductService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增绿植租赁-绿植产品
|
||||
*/
|
||||
@SaCheckPermission("property:plantsProduct:add")
|
||||
@Log(title = "绿植租赁-绿植产品", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody PlantsProductBo bo) {
|
||||
return toAjax(plantsProductService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改绿植租赁-绿植产品
|
||||
*/
|
||||
@SaCheckPermission("property:plantsProduct:edit")
|
||||
@Log(title = "绿植租赁-绿植产品", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody PlantsProductBo bo) {
|
||||
return toAjax(plantsProductService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除绿植租赁-绿植产品
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("property:plantsProduct:remove")
|
||||
@Log(title = "绿植租赁-绿植产品", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable("ids") Long[] ids) {
|
||||
return toAjax(plantsProductService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@@ -0,0 +1,106 @@
|
||||
package org.dromara.property.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.property.domain.vo.PlantsRentalPlanVo;
|
||||
import org.dromara.property.domain.bo.PlantsRentalPlanBo;
|
||||
import org.dromara.property.service.IPlantsRentalPlanService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 绿植租赁-租赁方案
|
||||
* 前端访问路由地址为:/property/rentalPlan
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/rentalPlan")
|
||||
public class PlantsRentalPlanController extends BaseController {
|
||||
|
||||
private final IPlantsRentalPlanService plantsRentalPlanService;
|
||||
|
||||
/**
|
||||
* 查询绿植租赁-租赁方案列表
|
||||
*/
|
||||
@SaCheckPermission("property:rentalPlan:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<PlantsRentalPlanVo> list(PlantsRentalPlanBo bo, PageQuery pageQuery) {
|
||||
return plantsRentalPlanService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出绿植租赁-租赁方案列表
|
||||
*/
|
||||
@SaCheckPermission("property:rentalPlan:export")
|
||||
@Log(title = "绿植租赁-租赁方案", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(PlantsRentalPlanBo bo, HttpServletResponse response) {
|
||||
List<PlantsRentalPlanVo> list = plantsRentalPlanService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "绿植租赁-租赁方案", PlantsRentalPlanVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取绿植租赁-租赁方案详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("property:rentalPlan:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<PlantsRentalPlanVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return R.ok(plantsRentalPlanService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增绿植租赁-租赁方案
|
||||
*/
|
||||
@SaCheckPermission("property:rentalPlan:add")
|
||||
@Log(title = "绿植租赁-租赁方案", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody PlantsRentalPlanBo bo) {
|
||||
return toAjax(plantsRentalPlanService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改绿植租赁-租赁方案
|
||||
*/
|
||||
@SaCheckPermission("property:rentalPlan:edit")
|
||||
@Log(title = "绿植租赁-租赁方案", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody PlantsRentalPlanBo bo) {
|
||||
return toAjax(plantsRentalPlanService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除绿植租赁-租赁方案
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("property:rentalPlan:remove")
|
||||
@Log(title = "绿植租赁-租赁方案", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable("ids") Long[] ids) {
|
||||
return toAjax(plantsRentalPlanService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@@ -0,0 +1,106 @@
|
||||
package org.dromara.property.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.property.domain.vo.TbAreaGroupVo;
|
||||
import org.dromara.property.domain.bo.TbAreaGroupBo;
|
||||
import org.dromara.property.service.ITbAreaGroupService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 区域组信息
|
||||
* 前端访问路由地址为:/property/areaGroup
|
||||
*
|
||||
* @author dy
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/areaGroup")
|
||||
public class TbAreaGroupController extends BaseController {
|
||||
|
||||
private final ITbAreaGroupService tbAreaGroupService;
|
||||
|
||||
/**
|
||||
* 查询区域组信息列表
|
||||
*/
|
||||
@SaCheckPermission("property:areaGroup:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TbAreaGroupVo> list(TbAreaGroupBo bo, PageQuery pageQuery) {
|
||||
return tbAreaGroupService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出区域组信息列表
|
||||
*/
|
||||
@SaCheckPermission("property:areaGroup:export")
|
||||
@Log(title = "区域组信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TbAreaGroupBo bo, HttpServletResponse response) {
|
||||
List<TbAreaGroupVo> list = tbAreaGroupService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "区域组信息", TbAreaGroupVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取区域组信息详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("property:areaGroup:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TbAreaGroupVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return R.ok(tbAreaGroupService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增区域组信息
|
||||
*/
|
||||
@SaCheckPermission("property:areaGroup:add")
|
||||
@Log(title = "区域组信息", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TbAreaGroupBo bo) {
|
||||
return toAjax(tbAreaGroupService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改区域组信息
|
||||
*/
|
||||
@SaCheckPermission("property:areaGroup:edit")
|
||||
@Log(title = "区域组信息", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TbAreaGroupBo bo) {
|
||||
return toAjax(tbAreaGroupService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除区域组信息
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("property:areaGroup:remove")
|
||||
@Log(title = "区域组信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable("ids") Long[] ids) {
|
||||
return toAjax(tbAreaGroupService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@@ -0,0 +1,106 @@
|
||||
package org.dromara.property.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.property.domain.vo.TbUserGroupVo;
|
||||
import org.dromara.property.domain.bo.TbUserGroupBo;
|
||||
import org.dromara.property.service.ITbUserGroupService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 人员组管理
|
||||
* 前端访问路由地址为:/property/userGroup
|
||||
*
|
||||
* @author dy
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/userGroup")
|
||||
public class TbUserGroupController extends BaseController {
|
||||
|
||||
private final ITbUserGroupService tbUserGroupService;
|
||||
|
||||
/**
|
||||
* 查询人员组管理列表
|
||||
*/
|
||||
@SaCheckPermission("property:userGroup:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TbUserGroupVo> list(TbUserGroupBo bo, PageQuery pageQuery) {
|
||||
return tbUserGroupService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出人员组管理列表
|
||||
*/
|
||||
@SaCheckPermission("property:userGroup:export")
|
||||
@Log(title = "人员组管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TbUserGroupBo bo, HttpServletResponse response) {
|
||||
List<TbUserGroupVo> list = tbUserGroupService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "人员组管理", TbUserGroupVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取人员组管理详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("property:userGroup:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TbUserGroupVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
return R.ok(tbUserGroupService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增人员组管理
|
||||
*/
|
||||
@SaCheckPermission("property:userGroup:add")
|
||||
@Log(title = "人员组管理", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TbUserGroupBo bo) {
|
||||
return toAjax(tbUserGroupService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改人员组管理
|
||||
*/
|
||||
@SaCheckPermission("property:userGroup:edit")
|
||||
@Log(title = "人员组管理", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TbUserGroupBo bo) {
|
||||
return toAjax(tbUserGroupService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除人员组管理
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("property:userGroup:remove")
|
||||
@Log(title = "人员组管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable("ids") Long[] ids) {
|
||||
return toAjax(tbUserGroupService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
@@ -0,0 +1,41 @@
|
||||
package org.dromara.property.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 绿植租赁-租赁方案-绿植对象 plants_plan_product
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("plants_plan_product")
|
||||
public class PlantsPlanProduct extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 租赁方案id
|
||||
*/
|
||||
private Long planId;
|
||||
|
||||
/**
|
||||
* 绿植产品id
|
||||
*/
|
||||
private Long productId;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,76 @@
|
||||
package org.dromara.property.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 绿植租赁-绿植产品对象 plants_product
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("plants_product")
|
||||
public class PlantsProduct extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
private String plantCode;
|
||||
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
private String plantName;
|
||||
|
||||
/**
|
||||
* 产品分类
|
||||
*/
|
||||
private Long plantType;
|
||||
|
||||
/**
|
||||
* 产品图片
|
||||
*/
|
||||
private String imgPath;
|
||||
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
private String specification;
|
||||
|
||||
/**
|
||||
* 租金
|
||||
*/
|
||||
private Long rent;
|
||||
|
||||
/**
|
||||
* 库存数量
|
||||
*/
|
||||
private Long inventory;
|
||||
|
||||
/**
|
||||
* 状态(0下架 1上架 )
|
||||
*/
|
||||
private Long state;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,61 @@
|
||||
package org.dromara.property.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 绿植租赁-租赁方案对象 plants_rental_plan
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("plants_rental_plan")
|
||||
public class PlantsRentalPlan extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 方案名称
|
||||
*/
|
||||
private String planName;
|
||||
|
||||
/**
|
||||
* 租赁周期
|
||||
*/
|
||||
private Long rentalPeriod;
|
||||
|
||||
/**
|
||||
* 适用场景
|
||||
*/
|
||||
private String scene;
|
||||
|
||||
/**
|
||||
* 价格
|
||||
*/
|
||||
private Long price;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Long state;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remarks;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,41 @@
|
||||
package org.dromara.property.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 区域组信息对象 tb_area_group
|
||||
*
|
||||
* @author dy
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("tb_area_group")
|
||||
public class TbAreaGroup extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 区域组ID
|
||||
*/
|
||||
private Long areaGroupId;
|
||||
|
||||
/**
|
||||
* 区域组名称
|
||||
*/
|
||||
private String areaGroupName;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,41 @@
|
||||
package org.dromara.property.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 人员组管理对象 tb_user_group
|
||||
*
|
||||
* @author dy
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("tb_user_group")
|
||||
public class TbUserGroup extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 人员组id
|
||||
*/
|
||||
private Long userGroupId;
|
||||
|
||||
/**
|
||||
* 人员组名称
|
||||
*/
|
||||
private String userGroupName;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,42 @@
|
||||
package org.dromara.property.domain.bo;
|
||||
|
||||
import org.dromara.property.domain.PlantsPlanProduct;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 绿植租赁-租赁方案-绿植业务对象 plants_plan_product
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = PlantsPlanProduct.class, reverseConvertGenerate = false)
|
||||
public class PlantsPlanProductBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@NotNull(message = "主键不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 租赁方案id
|
||||
*/
|
||||
@NotNull(message = "租赁方案id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long planId;
|
||||
|
||||
/**
|
||||
* 绿植产品id
|
||||
*/
|
||||
@NotNull(message = "绿植产品id不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long productId;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,82 @@
|
||||
package org.dromara.property.domain.bo;
|
||||
|
||||
import org.dromara.property.domain.PlantsProduct;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 绿植租赁-绿植产品业务对象 plants_product
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = PlantsProduct.class, reverseConvertGenerate = false)
|
||||
public class PlantsProductBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@NotNull(message = "主键不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
@NotBlank(message = "产品编号不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String plantCode;
|
||||
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
@NotBlank(message = "产品名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String plantName;
|
||||
|
||||
/**
|
||||
* 产品分类
|
||||
*/
|
||||
@NotNull(message = "产品分类不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long plantType;
|
||||
|
||||
/**
|
||||
* 产品图片
|
||||
*/
|
||||
private String imgPath;
|
||||
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
@NotBlank(message = "规格不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String specification;
|
||||
|
||||
/**
|
||||
* 租金
|
||||
*/
|
||||
@NotNull(message = "租金不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long rent;
|
||||
|
||||
/**
|
||||
* 库存数量
|
||||
*/
|
||||
@NotNull(message = "库存数量不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long inventory;
|
||||
|
||||
/**
|
||||
* 状态(0下架 1上架 )
|
||||
*/
|
||||
@NotNull(message = "状态(0下架 1上架 )不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long state;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,64 @@
|
||||
package org.dromara.property.domain.bo;
|
||||
|
||||
import org.dromara.property.domain.PlantsRentalPlan;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 绿植租赁-租赁方案业务对象 plants_rental_plan
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = PlantsRentalPlan.class, reverseConvertGenerate = false)
|
||||
public class PlantsRentalPlanBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@NotNull(message = "主键不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 方案名称
|
||||
*/
|
||||
@NotBlank(message = "方案名称不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String planName;
|
||||
|
||||
/**
|
||||
* 租赁周期
|
||||
*/
|
||||
@NotNull(message = "租赁周期不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long rentalPeriod;
|
||||
|
||||
/**
|
||||
* 适用场景
|
||||
*/
|
||||
@NotBlank(message = "适用场景不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private String scene;
|
||||
|
||||
/**
|
||||
* 价格
|
||||
*/
|
||||
private Long price;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@NotNull(message = "状态不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private Long state;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remarks;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,40 @@
|
||||
package org.dromara.property.domain.bo;
|
||||
|
||||
import org.dromara.property.domain.TbAreaGroup;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 区域组信息业务对象 tb_area_group
|
||||
*
|
||||
* @author dy
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = TbAreaGroup.class, reverseConvertGenerate = false)
|
||||
public class TbAreaGroupBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@NotNull(message = "id不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 区域组ID
|
||||
*/
|
||||
private Long areaGroupId;
|
||||
|
||||
/**
|
||||
* 区域组名称
|
||||
*/
|
||||
private String areaGroupName;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,40 @@
|
||||
package org.dromara.property.domain.bo;
|
||||
|
||||
import org.dromara.property.domain.TbUserGroup;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
/**
|
||||
* 人员组管理业务对象 tb_user_group
|
||||
*
|
||||
* @author dy
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@AutoMapper(target = TbUserGroup.class, reverseConvertGenerate = false)
|
||||
public class TbUserGroupBo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@NotNull(message = "id不能为空", groups = { EditGroup.class })
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 人员组id
|
||||
*/
|
||||
private Long userGroupId;
|
||||
|
||||
/**
|
||||
* 人员组名称
|
||||
*/
|
||||
private String userGroupName;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,56 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import org.dromara.property.domain.PlantsPlanProduct;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 绿植租赁-租赁方案-绿植视图对象 plants_plan_product
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = PlantsPlanProduct.class)
|
||||
public class PlantsPlanProductVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ExcelProperty(value = "主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 租赁方案id
|
||||
*/
|
||||
@ExcelProperty(value = "租赁方案id")
|
||||
private Long planId;
|
||||
|
||||
/**
|
||||
* 绿植产品id
|
||||
*/
|
||||
@ExcelProperty(value = "绿植产品id")
|
||||
private Long productId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,99 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import org.dromara.property.domain.PlantsProduct;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 绿植租赁-绿植产品视图对象 plants_product
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = PlantsProduct.class)
|
||||
public class PlantsProductVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ExcelProperty(value = "主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 产品编号
|
||||
*/
|
||||
@ExcelProperty(value = "产品编号")
|
||||
private String plantCode;
|
||||
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
@ExcelProperty(value = "产品名称")
|
||||
private String plantName;
|
||||
|
||||
/**
|
||||
* 产品分类
|
||||
*/
|
||||
@ExcelProperty(value = "产品分类")
|
||||
private Long plantType;
|
||||
|
||||
/**
|
||||
* 产品图片
|
||||
*/
|
||||
@ExcelProperty(value = "产品图片")
|
||||
private String imgPath;
|
||||
|
||||
/**
|
||||
* 规格
|
||||
*/
|
||||
@ExcelProperty(value = "规格")
|
||||
private String specification;
|
||||
|
||||
/**
|
||||
* 租金
|
||||
*/
|
||||
@ExcelProperty(value = "租金")
|
||||
private Long rent;
|
||||
|
||||
/**
|
||||
* 库存数量
|
||||
*/
|
||||
@ExcelProperty(value = "库存数量")
|
||||
private Long inventory;
|
||||
|
||||
/**
|
||||
* 状态(0下架 1上架 )
|
||||
*/
|
||||
@ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "product_management_status")
|
||||
private Long state;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,80 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import org.dromara.property.domain.PlantsRentalPlan;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 绿植租赁-租赁方案视图对象 plants_rental_plan
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = PlantsRentalPlan.class)
|
||||
public class PlantsRentalPlanVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ExcelProperty(value = "主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 方案名称
|
||||
*/
|
||||
@ExcelProperty(value = "方案名称")
|
||||
private String planName;
|
||||
|
||||
/**
|
||||
* 租赁周期
|
||||
*/
|
||||
@ExcelProperty(value = "租赁周期")
|
||||
private Long rentalPeriod;
|
||||
|
||||
/**
|
||||
* 适用场景
|
||||
*/
|
||||
@ExcelProperty(value = "适用场景")
|
||||
private String scene;
|
||||
|
||||
/**
|
||||
* 价格
|
||||
*/
|
||||
@ExcelProperty(value = "价格")
|
||||
private Long price;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
|
||||
@ExcelDictFormat(dictType = "wy_kg")
|
||||
private Long state;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ExcelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
@@ -0,0 +1,50 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import org.dromara.property.domain.TbAreaGroup;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 区域组信息视图对象 tb_area_group
|
||||
*
|
||||
* @author dy
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = TbAreaGroup.class)
|
||||
public class TbAreaGroupVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@ExcelProperty(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 区域组ID
|
||||
*/
|
||||
@ExcelProperty(value = "区域组ID")
|
||||
private Long areaGroupId;
|
||||
|
||||
/**
|
||||
* 区域组名称
|
||||
*/
|
||||
@ExcelProperty(value = "区域组名称")
|
||||
private String areaGroupName;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,50 @@
|
||||
package org.dromara.property.domain.vo;
|
||||
|
||||
import org.dromara.property.domain.TbUserGroup;
|
||||
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import cn.idev.excel.annotation.ExcelProperty;
|
||||
import org.dromara.common.excel.annotation.ExcelDictFormat;
|
||||
import org.dromara.common.excel.convert.ExcelDictConvert;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 人员组管理视图对象 tb_user_group
|
||||
*
|
||||
* @author dy
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = TbUserGroup.class)
|
||||
public class TbUserGroupVo implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@ExcelProperty(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 人员组id
|
||||
*/
|
||||
@ExcelProperty(value = "人员组id")
|
||||
private Long userGroupId;
|
||||
|
||||
/**
|
||||
* 人员组名称
|
||||
*/
|
||||
@ExcelProperty(value = " 人员组名称")
|
||||
private String userGroupName;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
package org.dromara.property.mapper;
|
||||
|
||||
import org.dromara.property.domain.PlantsPlanProduct;
|
||||
import org.dromara.property.domain.vo.PlantsPlanProductVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 绿植租赁-租赁方案-绿植Mapper接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
public interface PlantsPlanProductMapper extends BaseMapperPlus<PlantsPlanProduct, PlantsPlanProductVo> {
|
||||
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
package org.dromara.property.mapper;
|
||||
|
||||
import org.dromara.property.domain.PlantsProduct;
|
||||
import org.dromara.property.domain.vo.PlantsProductVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 绿植租赁-绿植产品Mapper接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
public interface PlantsProductMapper extends BaseMapperPlus<PlantsProduct, PlantsProductVo> {
|
||||
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
package org.dromara.property.mapper;
|
||||
|
||||
import org.dromara.property.domain.PlantsRentalPlan;
|
||||
import org.dromara.property.domain.vo.PlantsRentalPlanVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 绿植租赁-租赁方案Mapper接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
public interface PlantsRentalPlanMapper extends BaseMapperPlus<PlantsRentalPlan, PlantsRentalPlanVo> {
|
||||
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
package org.dromara.property.mapper;
|
||||
|
||||
import org.dromara.property.domain.TbAreaGroup;
|
||||
import org.dromara.property.domain.vo.TbAreaGroupVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 区域组信息Mapper接口
|
||||
*
|
||||
* @author dy
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
public interface TbAreaGroupMapper extends BaseMapperPlus<TbAreaGroup, TbAreaGroupVo> {
|
||||
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
package org.dromara.property.mapper;
|
||||
|
||||
import org.dromara.property.domain.TbUserGroup;
|
||||
import org.dromara.property.domain.vo.TbUserGroupVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
|
||||
/**
|
||||
* 人员组管理Mapper接口
|
||||
*
|
||||
* @author dy
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
public interface TbUserGroupMapper extends BaseMapperPlus<TbUserGroup, TbUserGroupVo> {
|
||||
|
||||
}
|
@@ -0,0 +1,69 @@
|
||||
package org.dromara.property.service;
|
||||
|
||||
import org.dromara.property.domain.PlantsPlanProduct;
|
||||
import org.dromara.property.domain.vo.PlantsPlanProductVo;
|
||||
import org.dromara.property.domain.bo.PlantsPlanProductBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 绿植租赁-租赁方案-绿植Service接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
public interface IPlantsPlanProductService {
|
||||
|
||||
/**
|
||||
* 查询绿植租赁-租赁方案-绿植
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 绿植租赁-租赁方案-绿植
|
||||
*/
|
||||
PlantsPlanProductVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询绿植租赁-租赁方案-绿植列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 绿植租赁-租赁方案-绿植分页列表
|
||||
*/
|
||||
TableDataInfo<PlantsPlanProductVo> queryPageList(PlantsPlanProductBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的绿植租赁-租赁方案-绿植列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 绿植租赁-租赁方案-绿植列表
|
||||
*/
|
||||
List<PlantsPlanProductVo> queryList(PlantsPlanProductBo bo);
|
||||
|
||||
/**
|
||||
* 新增绿植租赁-租赁方案-绿植
|
||||
*
|
||||
* @param bo 绿植租赁-租赁方案-绿植
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(PlantsPlanProductBo bo);
|
||||
|
||||
/**
|
||||
* 修改绿植租赁-租赁方案-绿植
|
||||
*
|
||||
* @param bo 绿植租赁-租赁方案-绿植
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(PlantsPlanProductBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除绿植租赁-租赁方案-绿植信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@@ -0,0 +1,69 @@
|
||||
package org.dromara.property.service;
|
||||
|
||||
import org.dromara.property.domain.PlantsProduct;
|
||||
import org.dromara.property.domain.vo.PlantsProductVo;
|
||||
import org.dromara.property.domain.bo.PlantsProductBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 绿植租赁-绿植产品Service接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
public interface IPlantsProductService {
|
||||
|
||||
/**
|
||||
* 查询绿植租赁-绿植产品
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 绿植租赁-绿植产品
|
||||
*/
|
||||
PlantsProductVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询绿植租赁-绿植产品列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 绿植租赁-绿植产品分页列表
|
||||
*/
|
||||
TableDataInfo<PlantsProductVo> queryPageList(PlantsProductBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的绿植租赁-绿植产品列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 绿植租赁-绿植产品列表
|
||||
*/
|
||||
List<PlantsProductVo> queryList(PlantsProductBo bo);
|
||||
|
||||
/**
|
||||
* 新增绿植租赁-绿植产品
|
||||
*
|
||||
* @param bo 绿植租赁-绿植产品
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(PlantsProductBo bo);
|
||||
|
||||
/**
|
||||
* 修改绿植租赁-绿植产品
|
||||
*
|
||||
* @param bo 绿植租赁-绿植产品
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(PlantsProductBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除绿植租赁-绿植产品信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@@ -0,0 +1,69 @@
|
||||
package org.dromara.property.service;
|
||||
|
||||
import org.dromara.property.domain.PlantsRentalPlan;
|
||||
import org.dromara.property.domain.vo.PlantsRentalPlanVo;
|
||||
import org.dromara.property.domain.bo.PlantsRentalPlanBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 绿植租赁-租赁方案Service接口
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
public interface IPlantsRentalPlanService {
|
||||
|
||||
/**
|
||||
* 查询绿植租赁-租赁方案
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 绿植租赁-租赁方案
|
||||
*/
|
||||
PlantsRentalPlanVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询绿植租赁-租赁方案列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 绿植租赁-租赁方案分页列表
|
||||
*/
|
||||
TableDataInfo<PlantsRentalPlanVo> queryPageList(PlantsRentalPlanBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的绿植租赁-租赁方案列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 绿植租赁-租赁方案列表
|
||||
*/
|
||||
List<PlantsRentalPlanVo> queryList(PlantsRentalPlanBo bo);
|
||||
|
||||
/**
|
||||
* 新增绿植租赁-租赁方案
|
||||
*
|
||||
* @param bo 绿植租赁-租赁方案
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(PlantsRentalPlanBo bo);
|
||||
|
||||
/**
|
||||
* 修改绿植租赁-租赁方案
|
||||
*
|
||||
* @param bo 绿植租赁-租赁方案
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(PlantsRentalPlanBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除绿植租赁-租赁方案信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@@ -0,0 +1,69 @@
|
||||
package org.dromara.property.service;
|
||||
|
||||
import org.dromara.property.domain.TbAreaGroup;
|
||||
import org.dromara.property.domain.vo.TbAreaGroupVo;
|
||||
import org.dromara.property.domain.bo.TbAreaGroupBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 区域组信息Service接口
|
||||
*
|
||||
* @author dy
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
public interface ITbAreaGroupService {
|
||||
|
||||
/**
|
||||
* 查询区域组信息
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 区域组信息
|
||||
*/
|
||||
TbAreaGroupVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询区域组信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 区域组信息分页列表
|
||||
*/
|
||||
TableDataInfo<TbAreaGroupVo> queryPageList(TbAreaGroupBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的区域组信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 区域组信息列表
|
||||
*/
|
||||
List<TbAreaGroupVo> queryList(TbAreaGroupBo bo);
|
||||
|
||||
/**
|
||||
* 新增区域组信息
|
||||
*
|
||||
* @param bo 区域组信息
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(TbAreaGroupBo bo);
|
||||
|
||||
/**
|
||||
* 修改区域组信息
|
||||
*
|
||||
* @param bo 区域组信息
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(TbAreaGroupBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除区域组信息信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@@ -0,0 +1,69 @@
|
||||
package org.dromara.property.service;
|
||||
|
||||
import org.dromara.property.domain.TbUserGroup;
|
||||
import org.dromara.property.domain.vo.TbUserGroupVo;
|
||||
import org.dromara.property.domain.bo.TbUserGroupBo;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 人员组管理Service接口
|
||||
*
|
||||
* @author dy
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
public interface ITbUserGroupService {
|
||||
|
||||
/**
|
||||
* 查询人员组管理
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 人员组管理
|
||||
*/
|
||||
TbUserGroupVo queryById(Long id);
|
||||
|
||||
/**
|
||||
* 分页查询人员组管理列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 人员组管理分页列表
|
||||
*/
|
||||
TableDataInfo<TbUserGroupVo> queryPageList(TbUserGroupBo bo, PageQuery pageQuery);
|
||||
|
||||
/**
|
||||
* 查询符合条件的人员组管理列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 人员组管理列表
|
||||
*/
|
||||
List<TbUserGroupVo> queryList(TbUserGroupBo bo);
|
||||
|
||||
/**
|
||||
* 新增人员组管理
|
||||
*
|
||||
* @param bo 人员组管理
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
Boolean insertByBo(TbUserGroupBo bo);
|
||||
|
||||
/**
|
||||
* 修改人员组管理
|
||||
*
|
||||
* @param bo 人员组管理
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
Boolean updateByBo(TbUserGroupBo bo);
|
||||
|
||||
/**
|
||||
* 校验并批量删除人员组管理信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
}
|
@@ -0,0 +1,133 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.property.domain.bo.PlantsPlanProductBo;
|
||||
import org.dromara.property.domain.vo.PlantsPlanProductVo;
|
||||
import org.dromara.property.domain.PlantsPlanProduct;
|
||||
import org.dromara.property.mapper.PlantsPlanProductMapper;
|
||||
import org.dromara.property.service.IPlantsPlanProductService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 绿植租赁-租赁方案-绿植Service业务层处理
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class PlantsPlanProductServiceImpl implements IPlantsPlanProductService {
|
||||
|
||||
private final PlantsPlanProductMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询绿植租赁-租赁方案-绿植
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 绿植租赁-租赁方案-绿植
|
||||
*/
|
||||
@Override
|
||||
public PlantsPlanProductVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询绿植租赁-租赁方案-绿植列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 绿植租赁-租赁方案-绿植分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<PlantsPlanProductVo> queryPageList(PlantsPlanProductBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<PlantsPlanProduct> lqw = buildQueryWrapper(bo);
|
||||
Page<PlantsPlanProductVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的绿植租赁-租赁方案-绿植列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 绿植租赁-租赁方案-绿植列表
|
||||
*/
|
||||
@Override
|
||||
public List<PlantsPlanProductVo> queryList(PlantsPlanProductBo bo) {
|
||||
LambdaQueryWrapper<PlantsPlanProduct> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<PlantsPlanProduct> buildQueryWrapper(PlantsPlanProductBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<PlantsPlanProduct> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(PlantsPlanProduct::getId);
|
||||
lqw.eq(bo.getPlanId() != null, PlantsPlanProduct::getPlanId, bo.getPlanId());
|
||||
lqw.eq(bo.getProductId() != null, PlantsPlanProduct::getProductId, bo.getProductId());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增绿植租赁-租赁方案-绿植
|
||||
*
|
||||
* @param bo 绿植租赁-租赁方案-绿植
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(PlantsPlanProductBo bo) {
|
||||
PlantsPlanProduct add = MapstructUtils.convert(bo, PlantsPlanProduct.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改绿植租赁-租赁方案-绿植
|
||||
*
|
||||
* @param bo 绿植租赁-租赁方案-绿植
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(PlantsPlanProductBo bo) {
|
||||
PlantsPlanProduct update = MapstructUtils.convert(bo, PlantsPlanProduct.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(PlantsPlanProduct entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除绿植租赁-租赁方案-绿植信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
@@ -0,0 +1,139 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.property.domain.bo.PlantsProductBo;
|
||||
import org.dromara.property.domain.vo.PlantsProductVo;
|
||||
import org.dromara.property.domain.PlantsProduct;
|
||||
import org.dromara.property.mapper.PlantsProductMapper;
|
||||
import org.dromara.property.service.IPlantsProductService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 绿植租赁-绿植产品Service业务层处理
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class PlantsProductServiceImpl implements IPlantsProductService {
|
||||
|
||||
private final PlantsProductMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询绿植租赁-绿植产品
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 绿植租赁-绿植产品
|
||||
*/
|
||||
@Override
|
||||
public PlantsProductVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询绿植租赁-绿植产品列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 绿植租赁-绿植产品分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<PlantsProductVo> queryPageList(PlantsProductBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<PlantsProduct> lqw = buildQueryWrapper(bo);
|
||||
Page<PlantsProductVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的绿植租赁-绿植产品列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 绿植租赁-绿植产品列表
|
||||
*/
|
||||
@Override
|
||||
public List<PlantsProductVo> queryList(PlantsProductBo bo) {
|
||||
LambdaQueryWrapper<PlantsProduct> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<PlantsProduct> buildQueryWrapper(PlantsProductBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<PlantsProduct> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(PlantsProduct::getId);
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getPlantCode()), PlantsProduct::getPlantCode, bo.getPlantCode());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getPlantName()), PlantsProduct::getPlantName, bo.getPlantName());
|
||||
lqw.eq(bo.getPlantType() != null, PlantsProduct::getPlantType, bo.getPlantType());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getImgPath()), PlantsProduct::getImgPath, bo.getImgPath());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getSpecification()), PlantsProduct::getSpecification, bo.getSpecification());
|
||||
lqw.eq(bo.getRent() != null, PlantsProduct::getRent, bo.getRent());
|
||||
lqw.eq(bo.getInventory() != null, PlantsProduct::getInventory, bo.getInventory());
|
||||
lqw.eq(bo.getState() != null, PlantsProduct::getState, bo.getState());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增绿植租赁-绿植产品
|
||||
*
|
||||
* @param bo 绿植租赁-绿植产品
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(PlantsProductBo bo) {
|
||||
PlantsProduct add = MapstructUtils.convert(bo, PlantsProduct.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改绿植租赁-绿植产品
|
||||
*
|
||||
* @param bo 绿植租赁-绿植产品
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(PlantsProductBo bo) {
|
||||
PlantsProduct update = MapstructUtils.convert(bo, PlantsProduct.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(PlantsProduct entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除绿植租赁-绿植产品信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
@@ -0,0 +1,137 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.property.domain.bo.PlantsRentalPlanBo;
|
||||
import org.dromara.property.domain.vo.PlantsRentalPlanVo;
|
||||
import org.dromara.property.domain.PlantsRentalPlan;
|
||||
import org.dromara.property.mapper.PlantsRentalPlanMapper;
|
||||
import org.dromara.property.service.IPlantsRentalPlanService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 绿植租赁-租赁方案Service业务层处理
|
||||
*
|
||||
* @author mocheng
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class PlantsRentalPlanServiceImpl implements IPlantsRentalPlanService {
|
||||
|
||||
private final PlantsRentalPlanMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询绿植租赁-租赁方案
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 绿植租赁-租赁方案
|
||||
*/
|
||||
@Override
|
||||
public PlantsRentalPlanVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询绿植租赁-租赁方案列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 绿植租赁-租赁方案分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<PlantsRentalPlanVo> queryPageList(PlantsRentalPlanBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<PlantsRentalPlan> lqw = buildQueryWrapper(bo);
|
||||
Page<PlantsRentalPlanVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的绿植租赁-租赁方案列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 绿植租赁-租赁方案列表
|
||||
*/
|
||||
@Override
|
||||
public List<PlantsRentalPlanVo> queryList(PlantsRentalPlanBo bo) {
|
||||
LambdaQueryWrapper<PlantsRentalPlan> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<PlantsRentalPlan> buildQueryWrapper(PlantsRentalPlanBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<PlantsRentalPlan> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(PlantsRentalPlan::getId);
|
||||
lqw.like(StringUtils.isNotBlank(bo.getPlanName()), PlantsRentalPlan::getPlanName, bo.getPlanName());
|
||||
lqw.eq(bo.getRentalPeriod() != null, PlantsRentalPlan::getRentalPeriod, bo.getRentalPeriod());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getScene()), PlantsRentalPlan::getScene, bo.getScene());
|
||||
lqw.eq(bo.getPrice() != null, PlantsRentalPlan::getPrice, bo.getPrice());
|
||||
lqw.eq(bo.getState() != null, PlantsRentalPlan::getState, bo.getState());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getRemarks()), PlantsRentalPlan::getRemarks, bo.getRemarks());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增绿植租赁-租赁方案
|
||||
*
|
||||
* @param bo 绿植租赁-租赁方案
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(PlantsRentalPlanBo bo) {
|
||||
PlantsRentalPlan add = MapstructUtils.convert(bo, PlantsRentalPlan.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改绿植租赁-租赁方案
|
||||
*
|
||||
* @param bo 绿植租赁-租赁方案
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(PlantsRentalPlanBo bo) {
|
||||
PlantsRentalPlan update = MapstructUtils.convert(bo, PlantsRentalPlan.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(PlantsRentalPlan entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除绿植租赁-租赁方案信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
@@ -0,0 +1,134 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.property.domain.bo.TbAreaGroupBo;
|
||||
import org.dromara.property.domain.vo.TbAreaGroupVo;
|
||||
import org.dromara.property.domain.TbAreaGroup;
|
||||
import org.dromara.property.mapper.TbAreaGroupMapper;
|
||||
import org.dromara.property.service.ITbAreaGroupService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 区域组信息Service业务层处理
|
||||
*
|
||||
* @author dy
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class TbAreaGroupServiceImpl implements ITbAreaGroupService {
|
||||
|
||||
private final TbAreaGroupMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询区域组信息
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 区域组信息
|
||||
*/
|
||||
@Override
|
||||
public TbAreaGroupVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询区域组信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 区域组信息分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<TbAreaGroupVo> queryPageList(TbAreaGroupBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<TbAreaGroup> lqw = buildQueryWrapper(bo);
|
||||
Page<TbAreaGroupVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的区域组信息列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 区域组信息列表
|
||||
*/
|
||||
@Override
|
||||
public List<TbAreaGroupVo> queryList(TbAreaGroupBo bo) {
|
||||
LambdaQueryWrapper<TbAreaGroup> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<TbAreaGroup> buildQueryWrapper(TbAreaGroupBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<TbAreaGroup> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(TbAreaGroup::getId);
|
||||
lqw.eq(bo.getAreaGroupId() != null, TbAreaGroup::getAreaGroupId, bo.getAreaGroupId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getAreaGroupName()), TbAreaGroup::getAreaGroupName, bo.getAreaGroupName());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增区域组信息
|
||||
*
|
||||
* @param bo 区域组信息
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(TbAreaGroupBo bo) {
|
||||
TbAreaGroup add = MapstructUtils.convert(bo, TbAreaGroup.class);
|
||||
validEntityBeforeSave(add);
|
||||
//todo: 新增区域组时需要新增区域信息
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改区域组信息
|
||||
*
|
||||
* @param bo 区域组信息
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(TbAreaGroupBo bo) {
|
||||
TbAreaGroup update = MapstructUtils.convert(bo, TbAreaGroup.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(TbAreaGroup entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除区域组信息信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
@@ -0,0 +1,133 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.dromara.property.domain.bo.TbUserGroupBo;
|
||||
import org.dromara.property.domain.vo.TbUserGroupVo;
|
||||
import org.dromara.property.domain.TbUserGroup;
|
||||
import org.dromara.property.mapper.TbUserGroupMapper;
|
||||
import org.dromara.property.service.ITbUserGroupService;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* 人员组管理Service业务层处理
|
||||
*
|
||||
* @author dy
|
||||
* @date 2025-06-25
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class TbUserGroupServiceImpl implements ITbUserGroupService {
|
||||
|
||||
private final TbUserGroupMapper baseMapper;
|
||||
|
||||
/**
|
||||
* 查询人员组管理
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 人员组管理
|
||||
*/
|
||||
@Override
|
||||
public TbUserGroupVo queryById(Long id){
|
||||
return baseMapper.selectVoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询人员组管理列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @param pageQuery 分页参数
|
||||
* @return 人员组管理分页列表
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<TbUserGroupVo> queryPageList(TbUserGroupBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<TbUserGroup> lqw = buildQueryWrapper(bo);
|
||||
Page<TbUserGroupVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合条件的人员组管理列表
|
||||
*
|
||||
* @param bo 查询条件
|
||||
* @return 人员组管理列表
|
||||
*/
|
||||
@Override
|
||||
public List<TbUserGroupVo> queryList(TbUserGroupBo bo) {
|
||||
LambdaQueryWrapper<TbUserGroup> lqw = buildQueryWrapper(bo);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
||||
private LambdaQueryWrapper<TbUserGroup> buildQueryWrapper(TbUserGroupBo bo) {
|
||||
Map<String, Object> params = bo.getParams();
|
||||
LambdaQueryWrapper<TbUserGroup> lqw = Wrappers.lambdaQuery();
|
||||
lqw.orderByAsc(TbUserGroup::getId);
|
||||
lqw.like(bo.getUserGroupId() != null, TbUserGroup::getUserGroupId, bo.getUserGroupId());
|
||||
lqw.like(StringUtils.isNotBlank(bo.getUserGroupName()), TbUserGroup::getUserGroupName, bo.getUserGroupName());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增人员组管理
|
||||
*
|
||||
* @param bo 人员组管理
|
||||
* @return 是否新增成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean insertByBo(TbUserGroupBo bo) {
|
||||
TbUserGroup add = MapstructUtils.convert(bo, TbUserGroup.class);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
bo.setId(add.getId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改人员组管理
|
||||
*
|
||||
* @param bo 人员组管理
|
||||
* @return 是否修改成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean updateByBo(TbUserGroupBo bo) {
|
||||
TbUserGroup update = MapstructUtils.convert(bo, TbUserGroup.class);
|
||||
validEntityBeforeSave(update);
|
||||
return baseMapper.updateById(update) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存前的数据校验
|
||||
*/
|
||||
private void validEntityBeforeSave(TbUserGroup entity){
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除人员组管理信息
|
||||
*
|
||||
* @param ids 待删除的主键集合
|
||||
* @param isValid 是否进行有效性校验
|
||||
* @return 是否删除成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||
if(isValid){
|
||||
//TODO 做一些业务上的校验,判断是否需要校验
|
||||
}
|
||||
return baseMapper.deleteByIds(ids) > 0;
|
||||
}
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.property.mapper.PlantsPlanProductMapper">
|
||||
|
||||
</mapper>
|
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.property.mapper.PlantsProductMapper">
|
||||
|
||||
</mapper>
|
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.property.mapper.PlantsRentalPlanMapper">
|
||||
|
||||
</mapper>
|
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.property.mapper.TbAreaGroupMapper">
|
||||
|
||||
</mapper>
|
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.property.mapper.TbUserGroupMapper">
|
||||
|
||||
</mapper>
|
@@ -1,64 +0,0 @@
|
||||
package org.dromara.sis.controller;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.sis.sdk.e8.AccessControlService;
|
||||
import org.dromara.sis.sdk.e8.domain.accesscontrol.req.RemoteOpenDoorReq;
|
||||
import org.dromara.sis.sdk.e8.domain.accesscontrol.res.AccessRecordFindRes;
|
||||
import org.dromara.sis.sdk.e8.domain.QueryDto;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @author lsm
|
||||
* @apiNote AccessControlController
|
||||
* @since 2025/6/24
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/e8accessControl")
|
||||
public class AccessControlController {
|
||||
|
||||
private final AccessControlService accessControlService;
|
||||
|
||||
/**
|
||||
* 远程开门
|
||||
*
|
||||
* @param req 传参
|
||||
* @return Boolean
|
||||
*/
|
||||
@PostMapping("/remoteOpenDoor")
|
||||
public R<Boolean> remoteOpenDoor(RemoteOpenDoorReq req) {
|
||||
log.info("E8远程开门 入参:{}", req);
|
||||
|
||||
Boolean flag = accessControlService.remoteOpenDoor(req);
|
||||
|
||||
if (flag) {
|
||||
return R.ok();
|
||||
} else {
|
||||
return R.fail("E8远程开门,调用失败!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取门禁记录列表
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return IPage<AccessRecordFindRes>
|
||||
*/
|
||||
@PostMapping("/getPageAccessRecordList")
|
||||
public R<TableDataInfo<AccessRecordFindRes>> getPageAccessRecordList(QueryDto dto) {
|
||||
log.info("E8获取门禁记录列表 入参:{}", dto);
|
||||
TableDataInfo<AccessRecordFindRes> page = accessControlService.getPageAccessRecordList(dto);
|
||||
if (page == null) {
|
||||
return R.fail("E8获取门禁记录列表,调用失败!");
|
||||
} else {
|
||||
return R.ok(page);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,108 @@
|
||||
package org.dromara.sis.controller.e8;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.sis.sdk.e8.AccessControlService;
|
||||
import org.dromara.sis.sdk.e8.domain.accessControl.req.CustomerAuthAddReq;
|
||||
import org.dromara.sis.sdk.e8.domain.accessControl.req.RemoteOpenDoorReq;
|
||||
import org.dromara.sis.sdk.e8.domain.accessControl.res.AccessRecordFindRes;
|
||||
import org.dromara.sis.sdk.e8.domain.QueryDto;
|
||||
import org.dromara.sis.sdk.e8.domain.accessControl.res.CustomerAuthFindRes;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @author lsm
|
||||
* @apiNote AccessControlController
|
||||
* @since 2025/6/24
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/e8AccessControl")
|
||||
public class AccessControlController {
|
||||
|
||||
private final AccessControlService accessControlService;
|
||||
|
||||
/**
|
||||
* 远程开门
|
||||
*
|
||||
* @param req 传参
|
||||
* @return Boolean
|
||||
*/
|
||||
@PostMapping("/remoteOpenDoor")
|
||||
public R<Boolean> remoteOpenDoor(@RequestBody RemoteOpenDoorReq req) {
|
||||
log.info("E8远程开门 入参:{}", req);
|
||||
|
||||
Boolean flag = accessControlService.remoteOpenDoor(req);
|
||||
|
||||
if (flag) {
|
||||
return R.ok();
|
||||
} else {
|
||||
return R.fail("E8远程开门,调用失败!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取门禁记录列表
|
||||
*
|
||||
* @param dto 查询参数
|
||||
* @return IPage<AccessRecordFindRes>
|
||||
* @apiNote 获取参数示例 {"maxResultCount":10,"pageIndex":1,"queryDto":{"isViewFullData":false}}
|
||||
*/
|
||||
@PostMapping("/getPageAccessRecordList")
|
||||
public R<TableDataInfo<AccessRecordFindRes>> getPageAccessRecordList(@RequestBody QueryDto dto) {
|
||||
log.info("E8获取门禁记录列表 入参:{}", dto);
|
||||
TableDataInfo<AccessRecordFindRes> page = accessControlService.getPageAccessRecordList(dto);
|
||||
if (page == null) {
|
||||
return R.fail("E8获取门禁记录列表,调用失败!");
|
||||
} else {
|
||||
return R.ok(page);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员授权
|
||||
*
|
||||
* @param req 传参
|
||||
* @return Boolean
|
||||
* @apiNote 参数示例 {"accessAuthModel":0,"authData":[{"floors":[],"gatewayType":1,"id":528705580163141,"type":0}],"authType":0,"elevatorAuthModel":1,"endTime":"2025-07-2511: 23: 39","personIds":[539696740646981],"scheduleId":1,"startTime":"2025-06-2511: 23: 39"}
|
||||
*/
|
||||
@PostMapping("/addCustomerAuth")
|
||||
public R<Boolean> addCustomerAuth(@RequestBody CustomerAuthAddReq req) {
|
||||
log.info("E8人员授权 入参:{}", req);
|
||||
|
||||
Boolean flag = accessControlService.addCustomerAuth(req);
|
||||
|
||||
if (flag) {
|
||||
return R.ok();
|
||||
} else {
|
||||
return R.fail("E8人员授权,调用失败!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取人员权限分页列表
|
||||
*
|
||||
* @param dto 获取参数
|
||||
* @return TableDataInfo<CustomerAuthFindRes>
|
||||
* @apiNote 获取参数示例 {"maxResultCount":10,"pageIndex":1,"queryDto":{"isViewFullData":false}}
|
||||
*/
|
||||
@PostMapping("getPageCustomerAuth")
|
||||
public R<TableDataInfo<CustomerAuthFindRes>> getPageCustomerAuth(@RequestBody QueryDto dto) {
|
||||
log.info("E8获取人员权限分页列表 入参:{}", dto);
|
||||
|
||||
TableDataInfo<CustomerAuthFindRes> page = accessControlService.getPageCustomerAuth(dto);
|
||||
|
||||
if (page == null) {
|
||||
return R.fail("E8获取人员权限分页列表,调用失败!");
|
||||
} else {
|
||||
return R.ok(page);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
package org.dromara.sis.controller;
|
||||
package org.dromara.sis.controller.e8;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -9,7 +9,6 @@ import org.dromara.sis.sdk.e8.domain.door.req.DoorDeviceAddReq;
|
||||
import org.dromara.sis.sdk.e8.domain.door.req.DoorDeviceUpdateReq;
|
||||
import org.dromara.sis.sdk.e8.domain.door.res.DoorDeviceAddRes;
|
||||
import org.dromara.sis.sdk.e8.domain.door.res.DoorDeviceFindRes;
|
||||
import org.dromara.sis.sdk.e8.domain.door.res.DoorDeviceUpdateRes;
|
||||
import org.dromara.sis.sdk.e8.domain.QueryDto;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -22,7 +21,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/e8doorDevice")
|
||||
@RequestMapping("/e8DoorDevice")
|
||||
public class DoorDeviceController {
|
||||
|
||||
private final DoorDeviceService doorDeviceService;
|
||||
@@ -70,15 +69,15 @@ public class DoorDeviceController {
|
||||
* @return Boolean
|
||||
*/
|
||||
@PostMapping("/updateDoorDevice")
|
||||
public R<DoorDeviceUpdateRes> updateDoorDevice(@RequestBody DoorDeviceUpdateReq updateReq) {
|
||||
public R<Boolean> updateDoorDevice(@RequestBody DoorDeviceUpdateReq updateReq) {
|
||||
log.info("E8接口门禁信息修改 入参={}", updateReq);
|
||||
|
||||
DoorDeviceUpdateRes doorDevice = doorDeviceService.updateDoorDevice(updateReq);
|
||||
Boolean flag = doorDeviceService.updateDoorDevice(updateReq);
|
||||
|
||||
if (doorDevice == null) {
|
||||
return R.fail("E8接口门禁信息修改,调用失败!");
|
||||
if (flag) {
|
||||
return R.ok();
|
||||
} else {
|
||||
return R.ok(doorDevice);
|
||||
return R.fail("E8接口门禁信息修改,调用失败!");
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,153 @@
|
||||
package org.dromara.sis.controller.e8;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.sis.sdk.e8.VoucherControlService;
|
||||
import org.dromara.sis.sdk.e8.domain.voucher.req.CancelVoucherReq;
|
||||
import org.dromara.sis.sdk.e8.domain.voucher.req.ChangeCardReq;
|
||||
import org.dromara.sis.sdk.e8.domain.voucher.req.IssueVoucherReq;
|
||||
import org.dromara.sis.sdk.e8.domain.voucher.req.OperateVoucherReq;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lsm
|
||||
* @apiNote VoucherControlController
|
||||
* @since 2025/6/25
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/e8VoucherControl")
|
||||
public class VoucherControlController {
|
||||
|
||||
private final VoucherControlService voucherControlService;
|
||||
|
||||
/**
|
||||
* 发行凭证
|
||||
*
|
||||
* @param req 入参
|
||||
* @return 是否成功
|
||||
*/
|
||||
@PostMapping("/issueVoucher")
|
||||
public R<Boolean> issueVoucher(@RequestBody IssueVoucherReq req) {
|
||||
log.info("E8发行凭证入参:{}", req);
|
||||
|
||||
Boolean flag = voucherControlService.issueVoucher(req);
|
||||
|
||||
if (flag) {
|
||||
return R.ok();
|
||||
} else {
|
||||
return R.fail("E8发行凭证,调用失败!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量发行凭证
|
||||
*
|
||||
* @param req 凭证数据
|
||||
* @return Boolean
|
||||
*/
|
||||
@PostMapping("/issueVoucherMany")
|
||||
public R<Boolean> issueVoucherMany(@RequestBody List<IssueVoucherReq> req) {
|
||||
log.info("E8批量发行凭证入参:{}", req);
|
||||
|
||||
Boolean flag = voucherControlService.issueVoucherMany(req);
|
||||
|
||||
if (flag) {
|
||||
return R.ok();
|
||||
} else {
|
||||
return R.fail("E8批量发行凭证,调用失败!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作凭证
|
||||
*
|
||||
* @param req 入参
|
||||
* @return Boolean
|
||||
*/
|
||||
@PostMapping("/operateVoucher")
|
||||
public R<Boolean> operateVoucher(@RequestBody OperateVoucherReq req) {
|
||||
log.info("E8操作凭证入参:{}", req);
|
||||
|
||||
Boolean flag = voucherControlService.operateVoucher(req);
|
||||
|
||||
if (flag) {
|
||||
return R.ok();
|
||||
} else {
|
||||
return R.fail("E8操作凭证,调用失败!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 换卡补卡
|
||||
*
|
||||
* @param req 入参
|
||||
* @return Boolean
|
||||
*/
|
||||
@PostMapping("/changeCard")
|
||||
public R<Boolean> changeCard(@RequestBody ChangeCardReq req) {
|
||||
log.info("E8换卡补卡入参:{}", req);
|
||||
|
||||
Boolean flag = voucherControlService.changeCard(req);
|
||||
|
||||
if (flag) {
|
||||
return R.ok();
|
||||
} else {
|
||||
return R.fail("E8换卡补卡,调用失败!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 注销人员凭证
|
||||
*
|
||||
* @param req 入参
|
||||
* @return Boolean
|
||||
*/
|
||||
@PostMapping("/cancelVoucher")
|
||||
public R<Boolean> cancelVoucher(@RequestBody CancelVoucherReq req) {
|
||||
log.info("E8注销人员凭证入参:{}", req);
|
||||
|
||||
Boolean flag = voucherControlService.cancelVoucher(req);
|
||||
|
||||
if (flag) {
|
||||
return R.ok();
|
||||
} else {
|
||||
return R.fail("E8注销人员凭证,调用失败!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传人脸
|
||||
*
|
||||
* @param file 入参
|
||||
* @return imageUrl 人脸图片地址
|
||||
*/
|
||||
@PostMapping("/uploadFace")
|
||||
public R<String> uploadFace(@RequestParam("file") MultipartFile file) {
|
||||
log.info("E8上传人脸入参:{}", file.getOriginalFilename());
|
||||
|
||||
// 获取文件字节数组
|
||||
byte[] imageByte;
|
||||
try {
|
||||
imageByte = file.getBytes();
|
||||
} catch (IOException e) {
|
||||
log.error("获取上传文件字节失败:{}", e.getMessage());
|
||||
return R.fail("E8上传人脸,获取文件字节失败!");
|
||||
}
|
||||
|
||||
String imageUrl = voucherControlService.uploadFace(imageByte);
|
||||
|
||||
if (imageUrl != null) {
|
||||
return R.ok(imageUrl);
|
||||
} else {
|
||||
return R.fail("E8上传人脸,调用失败!");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -1,9 +1,11 @@
|
||||
package org.dromara.sis.sdk.e8;
|
||||
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.sis.sdk.e8.domain.accesscontrol.req.RemoteOpenDoorReq;
|
||||
import org.dromara.sis.sdk.e8.domain.accesscontrol.res.AccessRecordFindRes;
|
||||
import org.dromara.sis.sdk.e8.domain.accessControl.req.CustomerAuthAddReq;
|
||||
import org.dromara.sis.sdk.e8.domain.accessControl.req.RemoteOpenDoorReq;
|
||||
import org.dromara.sis.sdk.e8.domain.accessControl.res.AccessRecordFindRes;
|
||||
import org.dromara.sis.sdk.e8.domain.QueryDto;
|
||||
import org.dromara.sis.sdk.e8.domain.accessControl.res.CustomerAuthFindRes;
|
||||
|
||||
/**
|
||||
* @author lsm
|
||||
@@ -29,19 +31,19 @@ public interface AccessControlService {
|
||||
*/
|
||||
TableDataInfo<AccessRecordFindRes> getPageAccessRecordList(QueryDto dto);
|
||||
|
||||
// /**
|
||||
// * 人员授权
|
||||
// *
|
||||
// * @param imageFile 传参
|
||||
// * @return Boolean
|
||||
// */
|
||||
// Boolean addCustomerAuth(Byte[] imageFile);
|
||||
/**
|
||||
* 人员授权
|
||||
*
|
||||
* @param req 传参
|
||||
* @return Boolean
|
||||
*/
|
||||
Boolean addCustomerAuth(CustomerAuthAddReq req);
|
||||
|
||||
// /**
|
||||
// * 获取人员权限分页列表
|
||||
// *
|
||||
// * @param dto 传参
|
||||
// * @return
|
||||
// */
|
||||
// IPage getPageAccessControl(QueryDto dto);
|
||||
/**
|
||||
* 获取人员权限分页列表
|
||||
*
|
||||
* @param dto 传参
|
||||
* @return TableDataInfo<CustomerAuthFindRes>
|
||||
*/
|
||||
TableDataInfo<CustomerAuthFindRes> getPageCustomerAuth(QueryDto dto);
|
||||
}
|
||||
|
@@ -5,7 +5,6 @@ import org.dromara.sis.sdk.e8.domain.door.req.DoorDeviceAddReq;
|
||||
import org.dromara.sis.sdk.e8.domain.door.req.DoorDeviceUpdateReq;
|
||||
import org.dromara.sis.sdk.e8.domain.door.res.DoorDeviceAddRes;
|
||||
import org.dromara.sis.sdk.e8.domain.door.res.DoorDeviceFindRes;
|
||||
import org.dromara.sis.sdk.e8.domain.door.res.DoorDeviceUpdateRes;
|
||||
import org.dromara.sis.sdk.e8.domain.QueryDto;
|
||||
|
||||
/**
|
||||
@@ -45,7 +44,7 @@ public interface DoorDeviceService {
|
||||
* @param updateReq 入参
|
||||
* @return DoorDeviceUpdateRes
|
||||
*/
|
||||
DoorDeviceUpdateRes updateDoorDevice(DoorDeviceUpdateReq updateReq);
|
||||
Boolean updateDoorDevice(DoorDeviceUpdateReq updateReq);
|
||||
|
||||
/**
|
||||
* 删除门禁信息
|
||||
|
@@ -1,5 +1,12 @@
|
||||
package org.dromara.sis.sdk.e8;
|
||||
|
||||
import org.dromara.sis.sdk.e8.domain.voucher.req.CancelVoucherReq;
|
||||
import org.dromara.sis.sdk.e8.domain.voucher.req.ChangeCardReq;
|
||||
import org.dromara.sis.sdk.e8.domain.voucher.req.IssueVoucherReq;
|
||||
import org.dromara.sis.sdk.e8.domain.voucher.req.OperateVoucherReq;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lsm
|
||||
* @apiNote VoucherControlService
|
||||
@@ -7,10 +14,51 @@ package org.dromara.sis.sdk.e8;
|
||||
*/
|
||||
public interface VoucherControlService {
|
||||
|
||||
/**
|
||||
* 发行凭证
|
||||
*
|
||||
* @param req 凭证数据
|
||||
* @return Boolean
|
||||
*/
|
||||
Boolean issueVoucher(IssueVoucherReq req);
|
||||
|
||||
/**
|
||||
* 批量发行凭证
|
||||
*
|
||||
* @param req 凭证数据
|
||||
* @return Boolean
|
||||
*/
|
||||
Boolean issueVoucherMany(List<IssueVoucherReq> req);
|
||||
|
||||
/**
|
||||
* 操作凭证
|
||||
*
|
||||
* @param req 入参
|
||||
* @return Boolean
|
||||
*/
|
||||
Boolean operateVoucher(OperateVoucherReq req);
|
||||
|
||||
/**
|
||||
* 换卡补卡
|
||||
*
|
||||
* @param req 入参
|
||||
* @return Boolean
|
||||
*/
|
||||
Boolean changeCard(ChangeCardReq req);
|
||||
|
||||
/**
|
||||
* 注销人员凭证
|
||||
*
|
||||
* @param req 入参
|
||||
* @return Boolean
|
||||
*/
|
||||
Boolean cancelVoucher(CancelVoucherReq req);
|
||||
|
||||
/**
|
||||
* 上传人脸
|
||||
*
|
||||
* @param queryDto 查询参数
|
||||
* @return 凭证控制列表
|
||||
* @param imageByte 入参
|
||||
* @return imageUrl 人脸图片地址
|
||||
*/
|
||||
String uploadFace(byte[] imageByte);
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
package org.dromara.sis.sdk.e8.domain.accesscontrol.req;
|
||||
package org.dromara.sis.sdk.e8.domain.accessControl.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
|
@@ -0,0 +1,112 @@
|
||||
package org.dromara.sis.sdk.e8.domain.accessControl.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lsm
|
||||
* @apiNote CustomerAuthAddReq
|
||||
* @since 2025/6/25
|
||||
*/
|
||||
@Data
|
||||
public class CustomerAuthAddReq {
|
||||
|
||||
/**
|
||||
* 门禁授权类型 0:人员
|
||||
*/
|
||||
private Integer authType;
|
||||
|
||||
/**
|
||||
* 时区ID
|
||||
*/
|
||||
private Long scheduleId;
|
||||
|
||||
/**
|
||||
* 人员ID集合
|
||||
*/
|
||||
private List<Long> personIds;
|
||||
|
||||
/**
|
||||
* 授权数据
|
||||
*/
|
||||
private List<AuthGroupData> authData;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private String startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private String endTime;
|
||||
|
||||
/**
|
||||
* 授权日期类型 0:默认 1:一月 2:半年 3:一年 4:三年 5:永久
|
||||
*/
|
||||
private Integer dateType;
|
||||
|
||||
@Data
|
||||
public static class AuthGroupData {
|
||||
|
||||
/**
|
||||
* 门/电梯ID
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 类型 0:门 1:电梯
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 出入口类型 0:未知 1:入口 2:出口
|
||||
*/
|
||||
private Integer gatewayType;
|
||||
|
||||
/**
|
||||
* 楼层
|
||||
*/
|
||||
private List<Floor> floors;
|
||||
}
|
||||
|
||||
@Data
|
||||
public static class Floor {
|
||||
|
||||
/**
|
||||
* 楼层权限标识
|
||||
*/
|
||||
private Long floorId;
|
||||
|
||||
/**
|
||||
* 楼层名称
|
||||
*/
|
||||
private String floorName;
|
||||
|
||||
/**
|
||||
* 是否前门可用
|
||||
*/
|
||||
private Boolean isFrontDoor;
|
||||
|
||||
/**
|
||||
* 是否后门可用
|
||||
*/
|
||||
private Boolean isBackDoor;
|
||||
|
||||
/**
|
||||
* 是否选择前门
|
||||
*/
|
||||
private Boolean isSelectFrontDoor;
|
||||
|
||||
/**
|
||||
* 是否选择后门
|
||||
*/
|
||||
private Boolean isSelectBackDoor;
|
||||
|
||||
/**
|
||||
* 是否公共门
|
||||
*/
|
||||
private Boolean isCommonFloor;
|
||||
}
|
||||
}
|
@@ -0,0 +1,52 @@
|
||||
package org.dromara.sis.sdk.e8.domain.accessControl.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author lsm
|
||||
* @apiNote CustomerAuthFindReq
|
||||
* @since 2025/6/25
|
||||
*/
|
||||
@Data
|
||||
public class CustomerAuthFindReq {
|
||||
|
||||
/**
|
||||
* 是否脱敏 true脱敏,敏感信息加***隐藏;false完整显示;
|
||||
*/
|
||||
private Boolean isViewFullData;
|
||||
|
||||
/**
|
||||
* 客户编号
|
||||
*/
|
||||
private String customerNo;
|
||||
|
||||
/**
|
||||
* 客户姓名
|
||||
*/
|
||||
private String customerName;
|
||||
|
||||
/**
|
||||
* 客户手机号码
|
||||
*/
|
||||
private String customerMobile;
|
||||
|
||||
/**
|
||||
* 组织ID
|
||||
*/
|
||||
private Long organId;
|
||||
|
||||
/**
|
||||
* 门/电梯ID
|
||||
*/
|
||||
private Long itemId;
|
||||
|
||||
/**
|
||||
* 授权开始时间
|
||||
*/
|
||||
private String authStartTime;
|
||||
|
||||
/**
|
||||
* 授权结束时间
|
||||
*/
|
||||
private String authEndTime;
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
package org.dromara.sis.sdk.e8.domain.accesscontrol.req;
|
||||
package org.dromara.sis.sdk.e8.domain.accessControl.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
package org.dromara.sis.sdk.e8.domain.accesscontrol.res;
|
||||
package org.dromara.sis.sdk.e8.domain.accessControl.res;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
|
@@ -0,0 +1,210 @@
|
||||
package org.dromara.sis.sdk.e8.domain.accessControl.res;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lsm
|
||||
* @apiNote CustomerAuthFindRes
|
||||
* @since 2025/6/25
|
||||
*/
|
||||
@Data
|
||||
public class CustomerAuthFindRes {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date creationTime;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String creatorId;
|
||||
|
||||
/**
|
||||
* 最后修改时间
|
||||
*/
|
||||
private Date lastModificationTime;
|
||||
|
||||
/**
|
||||
* 最后修改人
|
||||
*/
|
||||
private String lastModifierId;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private Boolean isDeleted;
|
||||
|
||||
/**
|
||||
* 删除人
|
||||
*/
|
||||
private String deleterId;
|
||||
|
||||
/**
|
||||
* 删除时间
|
||||
*/
|
||||
private Date deletionTime;
|
||||
|
||||
/**
|
||||
* 客户ID
|
||||
*/
|
||||
private Long personId;
|
||||
|
||||
/**
|
||||
* 主设备ID
|
||||
*/
|
||||
private Long mainDeviceId;
|
||||
|
||||
/**
|
||||
* 读头ID
|
||||
*/
|
||||
private Long readerId;
|
||||
|
||||
/**
|
||||
* 组织ID
|
||||
*/
|
||||
private Long organId;
|
||||
|
||||
/**
|
||||
* 组织名称
|
||||
*/
|
||||
private String orgName;
|
||||
|
||||
/**
|
||||
* 区域ID
|
||||
*/
|
||||
private Long areaId;
|
||||
|
||||
/**
|
||||
* 区域名称
|
||||
*/
|
||||
private String areaName;
|
||||
|
||||
/**
|
||||
* 客户姓名
|
||||
*/
|
||||
private String customerName;
|
||||
|
||||
/**
|
||||
* 客户编号
|
||||
*/
|
||||
private String customerNo;
|
||||
|
||||
/**
|
||||
* 客户手机号码
|
||||
*/
|
||||
private String mobile;
|
||||
|
||||
/**
|
||||
* 门/电梯名称
|
||||
*/
|
||||
private String itemName;
|
||||
|
||||
/**
|
||||
* 是否显示敏感信息 true隐藏 false显示
|
||||
*/
|
||||
private Boolean isViewFullData;
|
||||
|
||||
/**
|
||||
* 授权楼层字符串
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 授权开始时间
|
||||
*/
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* 授权结束时间
|
||||
*/
|
||||
private Date endTime;
|
||||
|
||||
/**
|
||||
* 设施类型 0:门禁 1:电梯
|
||||
*/
|
||||
private Integer facilityType;
|
||||
|
||||
/**
|
||||
* 时区ID
|
||||
*/
|
||||
private Long scheduleId;
|
||||
|
||||
/**
|
||||
* 时区名称
|
||||
*/
|
||||
private String scheduleName;
|
||||
|
||||
/**
|
||||
* 授权人
|
||||
*/
|
||||
private String authName;
|
||||
|
||||
/**
|
||||
* 授权时间段
|
||||
*/
|
||||
private String duration;
|
||||
|
||||
/**
|
||||
* 出入口类型 0:未知 1:入口 2:出口
|
||||
*/
|
||||
private Integer gatewayType;
|
||||
|
||||
/**
|
||||
* 出入口类型描述
|
||||
*/
|
||||
private String gatewayTypeDesc;
|
||||
|
||||
/**
|
||||
* 授权楼层
|
||||
*/
|
||||
private List<Floor> floors;
|
||||
|
||||
@Data
|
||||
public static class Floor {
|
||||
|
||||
/**
|
||||
* 楼层权限标识
|
||||
*/
|
||||
private Long floorId;
|
||||
|
||||
/**
|
||||
* 楼层名称
|
||||
*/
|
||||
private String floorName;
|
||||
|
||||
/**
|
||||
* 是否前门可用
|
||||
*/
|
||||
private Boolean isFrontDoor;
|
||||
|
||||
/**
|
||||
* 是否后门可用
|
||||
*/
|
||||
private Boolean isBackDoor;
|
||||
|
||||
/**
|
||||
* 是否选择前门
|
||||
*/
|
||||
private Boolean isSelectFrontDoor;
|
||||
|
||||
/**
|
||||
* 是否选择后门
|
||||
*/
|
||||
private Boolean isSelectBackDoor;
|
||||
|
||||
/**
|
||||
* 是否公共门
|
||||
*/
|
||||
private Boolean isCommonFloor;
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,16 @@
|
||||
package org.dromara.sis.sdk.e8.domain.voucher.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lsm
|
||||
* @apiNote CancelVoucherReq
|
||||
* @since 2025/6/25
|
||||
*/
|
||||
@Data
|
||||
public class CancelVoucherReq {
|
||||
|
||||
private List<Long> ids;
|
||||
}
|
@@ -0,0 +1,33 @@
|
||||
package org.dromara.sis.sdk.e8.domain.voucher.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author lsm
|
||||
* @apiNote ChangeCardReq
|
||||
* @since 2025/6/25
|
||||
*/
|
||||
@Data
|
||||
public class ChangeCardReq {
|
||||
|
||||
/**
|
||||
* 原凭证ID
|
||||
*/
|
||||
private Long origVoucherId;
|
||||
|
||||
/**
|
||||
* 物理卡号
|
||||
*/
|
||||
private String idno;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 人员ID
|
||||
*/
|
||||
private Long personID;
|
||||
|
||||
}
|
@@ -0,0 +1,69 @@
|
||||
package org.dromara.sis.sdk.e8.domain.voucher.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author lsm
|
||||
* @apiNote IssueVoucher
|
||||
* @since 2025/6/25
|
||||
*/
|
||||
@Data
|
||||
public class IssueVoucherReq {
|
||||
|
||||
/**
|
||||
* 物理卡号
|
||||
*/
|
||||
private String idno;
|
||||
|
||||
/**
|
||||
* 密码
|
||||
*/
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 凭证类型 10:MF1-A卡 11:MF1-B卡 12:MF1卡(ID) 20:个人密码 40:条码、纸票 50:指纹 60:身份证号码 70:人脸 80:虚拟卡 110:蓝牙卡 21:管理密码 22:胁迫密码
|
||||
*/
|
||||
private Integer voucherType;
|
||||
|
||||
/**
|
||||
* 客户ID
|
||||
*/
|
||||
private Long personID;
|
||||
|
||||
/**
|
||||
* 开始日期
|
||||
*/
|
||||
private String startTime;
|
||||
|
||||
/**
|
||||
* 结束日期
|
||||
*/
|
||||
private String endTime;
|
||||
|
||||
/**
|
||||
* 图片地址
|
||||
*/
|
||||
private String txtData;
|
||||
|
||||
/**
|
||||
* 指纹数据
|
||||
*/
|
||||
private String blobData;
|
||||
|
||||
/**
|
||||
* 指纹编号
|
||||
*/
|
||||
private String fingerNo;
|
||||
|
||||
/**
|
||||
* 卡类别 34:普通用户卡 35:胁迫卡 36:保安卡 40:临时卡 41:中级用户卡 48:高级用户卡 49:高级管理卡(注:41、48、49仅适用于分体式门禁)
|
||||
*/
|
||||
private Integer cardType;
|
||||
|
||||
/**
|
||||
* 凭证模式 0:ID卡模式 1:IC卡模式 3:CPU卡模式
|
||||
*/
|
||||
private Integer voucherMode;
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,29 @@
|
||||
package org.dromara.sis.sdk.e8.domain.voucher.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author lsm
|
||||
* @apiNote OperateVoucherReq
|
||||
* @since 2025/6/25
|
||||
*/
|
||||
@Data
|
||||
public class OperateVoucherReq {
|
||||
|
||||
/**
|
||||
* 凭证ID集合
|
||||
*/
|
||||
private List<Long> ids;
|
||||
|
||||
/**
|
||||
* 凭证操作类型 4:冻结 5:解冻 6:注销 7:挂失 8:解挂
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 原因 (必填)
|
||||
*/
|
||||
private String reason;
|
||||
}
|
@@ -3,19 +3,21 @@ package org.dromara.sis.sdk.e8.impl;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.lang.TypeReference;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.sis.sdk.e8.AccessControlService;
|
||||
import org.dromara.sis.sdk.e8.domain.accesscontrol.req.AccessRecordFindReq;
|
||||
import org.dromara.sis.sdk.e8.domain.accesscontrol.req.RemoteOpenDoorReq;
|
||||
import org.dromara.sis.sdk.e8.domain.accesscontrol.res.AccessRecordFindRes;
|
||||
import org.dromara.sis.sdk.e8.domain.accessControl.req.AccessRecordFindReq;
|
||||
import org.dromara.sis.sdk.e8.domain.accessControl.req.CustomerAuthAddReq;
|
||||
import org.dromara.sis.sdk.e8.domain.accessControl.req.CustomerAuthFindReq;
|
||||
import org.dromara.sis.sdk.e8.domain.accessControl.req.RemoteOpenDoorReq;
|
||||
import org.dromara.sis.sdk.e8.domain.accessControl.res.AccessRecordFindRes;
|
||||
import org.dromara.sis.sdk.e8.domain.ApiResp;
|
||||
import org.dromara.sis.sdk.e8.domain.QueryDto;
|
||||
import org.dromara.sis.sdk.e8.domain.accessControl.res.CustomerAuthFindRes;
|
||||
import org.dromara.sis.sdk.e8.utils.E8ApiUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -26,7 +28,7 @@ import java.util.Map;
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@DubboService
|
||||
@RequiredArgsConstructor
|
||||
public class AccessControlServiceImpl implements AccessControlService {
|
||||
|
||||
// 远程开门
|
||||
@@ -41,8 +43,8 @@ public class AccessControlServiceImpl implements AccessControlService {
|
||||
// 获取人员权限分页列表
|
||||
private static final String GET_PAGE_PERSON_AUTHORIZATION_PAGE_LIST = "/api/E8Door/man-person-device-finally/get-page-list";
|
||||
|
||||
@Resource
|
||||
private E8ApiUtil e8ApiUtil;
|
||||
|
||||
private final E8ApiUtil e8ApiUtil;
|
||||
|
||||
/**
|
||||
* 远程开门
|
||||
@@ -58,6 +60,8 @@ public class AccessControlServiceImpl implements AccessControlService {
|
||||
// 调用第三方API进行开门操作,传入处理后的参数和指定的API端点
|
||||
ApiResp apiResp = e8ApiUtil.doPost(params, REMOTE_OPEN_DOOR);
|
||||
|
||||
if (!apiResp.getSuccess()) log.error("调用E8远程开门失败,errorMsg:{}", apiResp);
|
||||
|
||||
// 返回API调用是否成功的结果
|
||||
return apiResp.getSuccess();
|
||||
}
|
||||
@@ -82,6 +86,7 @@ public class AccessControlServiceImpl implements AccessControlService {
|
||||
ApiResp apiResp = e8ApiUtil.doPost(params, GET_PAGE_ACCESS_RECORD_PAGE_LIST);
|
||||
// 如果API响应不成功,则返回null
|
||||
if (!apiResp.getSuccess()) {
|
||||
log.error("调用E8获取通行记录分页列表失败,errorMsg:{}", apiResp);
|
||||
return null;
|
||||
}
|
||||
// 将API响应的结果转换为JSON字符串,再转换为Map对象
|
||||
@@ -100,8 +105,58 @@ public class AccessControlServiceImpl implements AccessControlService {
|
||||
/**
|
||||
* 人员授权
|
||||
*
|
||||
* @param imageFile 传参
|
||||
* @param req 传参
|
||||
* @return Boolean
|
||||
*/
|
||||
@Override
|
||||
public Boolean addCustomerAuth(CustomerAuthAddReq req) {
|
||||
// 创建一个参数映射,用于存储API请求的参数
|
||||
Map<String, Object> params = BeanUtil.beanToMap(req);
|
||||
|
||||
// 调用API工具类的POST方法,传入参数和API路径,获取API响应对象
|
||||
ApiResp apiResp = e8ApiUtil.doPost(params, PERSON_AUTHORIZATION);
|
||||
|
||||
if (!apiResp.getSuccess()) log.error("调用E8人员授权失败,errorMsg:{}", apiResp);
|
||||
|
||||
// 返回API调用是否成功
|
||||
return apiResp.getSuccess();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取人员权限分页列表
|
||||
*
|
||||
* @param dto 传参
|
||||
* @return TableDataInfo<CustomerAuthFindRes>
|
||||
*/
|
||||
@Override
|
||||
public TableDataInfo<CustomerAuthFindRes> getPageCustomerAuth(QueryDto dto) {
|
||||
// 创建一个参数映射,用于存储API请求的参数
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
// 将分页索引和最大结果数放入参数映射中
|
||||
params.put("pageIndex", dto.getPageIndex());
|
||||
params.put("maxResultCount", dto.getMaxResultCount());
|
||||
// 将查询DTO转换为JSON字符串,再转换为Map对象,然后放入参数映射中
|
||||
params.put("queryDto", JSONUtil.toBean(JSONUtil.toJsonStr(dto.getQueryDto()), CustomerAuthFindReq.class));
|
||||
|
||||
// 调用API工具类的POST方法,传入参数和API路径,获取API响应对象
|
||||
ApiResp apiResp = e8ApiUtil.doPost(params, GET_PAGE_PERSON_AUTHORIZATION_PAGE_LIST);
|
||||
// 如果API响应不成功,则返回null
|
||||
if (!apiResp.getSuccess()) {
|
||||
log.error("调用E8获取人员权限分页列表失败,errorMsg:{}", apiResp);
|
||||
return null;
|
||||
}
|
||||
|
||||
// 将API响应的结果转换为JSON字符串,再转换为Map对象
|
||||
Map<String, Object> result = JSONUtil.toBean(JSONUtil.toJsonStr(apiResp.getResult()), new TypeReference<>() {
|
||||
}, false);
|
||||
// 创建一个分页对象,传入分页索引和最大结果数
|
||||
TableDataInfo<CustomerAuthFindRes> tableData = new TableDataInfo<>();
|
||||
// 从结果映射中获取总记录数,转换为长整型后设置到分页对象中
|
||||
tableData.setTotal(Long.parseLong(result.get("total").toString()));
|
||||
// 从结果映射中获取项目列表,转换为访问记录信息列表后设置到分页对象中
|
||||
tableData.setRows(JSONUtil.toList(JSONUtil.toJsonStr(result.get("item")), CustomerAuthFindRes.class));
|
||||
// 返回填充了数据的分页对象
|
||||
return tableData;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -5,8 +5,8 @@ import cn.hutool.core.lang.TypeReference;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.dromara.sis.sdk.e8.CustomerService;
|
||||
import org.dromara.sis.sdk.e8.domain.ApiResp;
|
||||
import org.dromara.sis.sdk.e8.domain.QueryDto;
|
||||
@@ -18,7 +18,6 @@ import org.dromara.sis.sdk.e8.domain.custom.res.CustomFindRes;
|
||||
import org.dromara.sis.sdk.e8.utils.E8ApiUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -29,7 +28,7 @@ import java.util.Map;
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@DubboService
|
||||
@RequiredArgsConstructor
|
||||
public class CustomerServiceImpl implements CustomerService {
|
||||
private final static String CUSTOMER_GET_PAGE_LIST = "/api/E8/customer/get-page-list";
|
||||
private final static String CUSTOMER_GET_FIRST_OR_DEFAULT = "/api/E8/customer/get-first-or-default";
|
||||
@@ -37,8 +36,8 @@ public class CustomerServiceImpl implements CustomerService {
|
||||
private final static String CUSTOMER_UPDATE = "/api/E8/customer/{id}/update";
|
||||
private final static String CUSTOMER_DELETE = "/api/E8/customer/{id}";
|
||||
|
||||
@Resource
|
||||
private E8ApiUtil e8ApiUtil;
|
||||
|
||||
private final E8ApiUtil e8ApiUtil;
|
||||
|
||||
/**
|
||||
* 查询单个人员信息
|
||||
@@ -56,7 +55,7 @@ public class CustomerServiceImpl implements CustomerService {
|
||||
|
||||
// 检查API调用是否成功
|
||||
if (!apiResp.getSuccess()) {
|
||||
log.info("E8查询人员信息失败 errorMsg:{}", apiResp);
|
||||
log.error("E8查询人员信息失败 errorMsg:{}", apiResp);
|
||||
// 如果API调用失败,返回null
|
||||
return null;
|
||||
}
|
||||
@@ -86,7 +85,7 @@ public class CustomerServiceImpl implements CustomerService {
|
||||
|
||||
|
||||
if (!apiResp.getSuccess()) {
|
||||
log.info("E8人员信息分页查询 errorMsg:{}", apiResp);
|
||||
log.error("E8人员信息分页查询 errorMsg:{}", apiResp);
|
||||
// 如果API响应不成功,返回null
|
||||
return null;
|
||||
}
|
||||
@@ -121,7 +120,7 @@ public class CustomerServiceImpl implements CustomerService {
|
||||
|
||||
// 检查API调用是否成功
|
||||
if (!apiResp.getSuccess()) {
|
||||
log.info("E8新增人员信息失败 errorMsg:{}", apiResp);
|
||||
log.error("E8新增人员信息失败 errorMsg:{}", apiResp);
|
||||
// 如果API调用失败,返回null
|
||||
return null;
|
||||
}
|
||||
@@ -147,6 +146,8 @@ public class CustomerServiceImpl implements CustomerService {
|
||||
// 调用API工具类发送POST请求,并获取API响应对象
|
||||
ApiResp apiResp = e8ApiUtil.doPost(params, api);
|
||||
|
||||
if (!apiResp.getSuccess()) log.error("E8人员信息修改失败 errorMsg:{}", apiResp);
|
||||
|
||||
// 返回API调用是否成功的标志
|
||||
return apiResp.getSuccess();
|
||||
}
|
||||
@@ -165,6 +166,8 @@ public class CustomerServiceImpl implements CustomerService {
|
||||
// 调用API工具类的 doGetOrDel 方法发送GET或DELETE请求,并获取响应结果
|
||||
ApiResp apiResp = e8ApiUtil.doGetOrDel(api, null, true);
|
||||
|
||||
if (!apiResp.getSuccess()) log.error("E8删除人员信息失败 errorMsg:{}", apiResp);
|
||||
|
||||
// 返回API请求是否成功的标志
|
||||
return apiResp.getSuccess();
|
||||
}
|
||||
|
@@ -3,8 +3,8 @@ package org.dromara.sis.sdk.e8.impl;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.lang.TypeReference;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.sis.sdk.e8.DoorDeviceService;
|
||||
import org.dromara.sis.sdk.e8.domain.ApiResp;
|
||||
@@ -13,12 +13,10 @@ import org.dromara.sis.sdk.e8.domain.door.req.DoorDeviceFindReq;
|
||||
import org.dromara.sis.sdk.e8.domain.door.req.DoorDeviceUpdateReq;
|
||||
import org.dromara.sis.sdk.e8.domain.door.res.DoorDeviceAddRes;
|
||||
import org.dromara.sis.sdk.e8.domain.door.res.DoorDeviceFindRes;
|
||||
import org.dromara.sis.sdk.e8.domain.door.res.DoorDeviceUpdateRes;
|
||||
import org.dromara.sis.sdk.e8.domain.QueryDto;
|
||||
import org.dromara.sis.sdk.e8.utils.E8ApiUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -29,7 +27,7 @@ import java.util.Map;
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@DubboService
|
||||
@RequiredArgsConstructor
|
||||
public class DoorDeviceServiceImpl implements DoorDeviceService {
|
||||
|
||||
private final static String DOOR_DEVICE_GET_PAGE_LIST = "/api/e8door/man-device-info/get-page-list";
|
||||
@@ -38,8 +36,8 @@ public class DoorDeviceServiceImpl implements DoorDeviceService {
|
||||
private final static String DOOR_DEVICE_UPDATE = "/api/E8Door/man-device-info/{id}/update";
|
||||
private final static String DOOR_DEVICE_DELETE = "/api/E8Door/man-device-info/{id}";
|
||||
|
||||
@Resource
|
||||
private E8ApiUtil e8ApiUtil;
|
||||
|
||||
private final E8ApiUtil e8ApiUtil;
|
||||
|
||||
/**
|
||||
* 查询门禁信息
|
||||
@@ -135,7 +133,7 @@ public class DoorDeviceServiceImpl implements DoorDeviceService {
|
||||
* @return DoorDeviceUpdateRes
|
||||
*/
|
||||
@Override
|
||||
public DoorDeviceUpdateRes updateDoorDevice(DoorDeviceUpdateReq updateReq) {
|
||||
public Boolean updateDoorDevice(DoorDeviceUpdateReq updateReq) {
|
||||
|
||||
// 构造门设备更新API的URL
|
||||
String api = DOOR_DEVICE_UPDATE.replace("{id}", updateReq.getId().toString());
|
||||
@@ -146,13 +144,9 @@ public class DoorDeviceServiceImpl implements DoorDeviceService {
|
||||
// 调用API进行门设备信息更新
|
||||
ApiResp apiResp = e8ApiUtil.doPost(params, api);
|
||||
|
||||
if (!apiResp.getSuccess()) {
|
||||
log.error("修改E8门禁信息,errorMsg:{}", apiResp);
|
||||
// 如果响应不成功,则返回null
|
||||
return null;
|
||||
}
|
||||
if (!apiResp.getSuccess()) log.error("修改E8门禁信息,errorMsg:{}", apiResp);
|
||||
|
||||
return JSONUtil.toBean(JSONUtil.toJsonStr(apiResp.getResult()), DoorDeviceUpdateRes.class);
|
||||
return apiResp.getSuccess();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -170,9 +164,7 @@ public class DoorDeviceServiceImpl implements DoorDeviceService {
|
||||
// 调用E8 API工具类进行HTTP DELETE请求,参数为构造的API路径和null(因为DELETE请求通常不需要请求体)
|
||||
ApiResp apiResp = e8ApiUtil.doGetOrDel(api, null, true);
|
||||
|
||||
if (!apiResp.getSuccess()) {
|
||||
log.error("删除E8门禁信息,errorMsg:{}", apiResp);
|
||||
}
|
||||
if (!apiResp.getSuccess()) log.error("删除E8门禁信息,errorMsg:{}", apiResp);
|
||||
|
||||
// 返回API响应的成功标志
|
||||
return apiResp.getSuccess();
|
||||
|
@@ -0,0 +1,151 @@
|
||||
package org.dromara.sis.sdk.e8.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.sis.sdk.e8.VoucherControlService;
|
||||
import org.dromara.sis.sdk.e8.domain.ApiResp;
|
||||
import org.dromara.sis.sdk.e8.domain.voucher.req.CancelVoucherReq;
|
||||
import org.dromara.sis.sdk.e8.domain.voucher.req.ChangeCardReq;
|
||||
import org.dromara.sis.sdk.e8.domain.voucher.req.IssueVoucherReq;
|
||||
import org.dromara.sis.sdk.e8.domain.voucher.req.OperateVoucherReq;
|
||||
import org.dromara.sis.sdk.e8.utils.E8ApiUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author lsm
|
||||
* @apiNote VoucherControlServiceImpl
|
||||
* @since 2025/6/25
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class VoucherControlServiceImpl implements VoucherControlService {
|
||||
|
||||
private static final String ISSUANCE_VOUCHER = "/api/E8/voucher/issue-voucher";
|
||||
private static final String ISSUANCE_VOUCHER_MANY = "/api/E8/voucher/issue-voucher-many";
|
||||
private static final String OPERATE_VOUCHER = "/api/E8/voucher/operate-many";
|
||||
private static final String CHANGE_CARD = "/api/E8/voucher/change-card";
|
||||
private static final String CANCEL_VOUCHER = "/api/E8/voucher/cancel-voucher";
|
||||
|
||||
private final E8ApiUtil e8ApiUtil;
|
||||
|
||||
/**
|
||||
* 发行凭证
|
||||
*
|
||||
* @param req 入参
|
||||
* @return 是否成功
|
||||
*/
|
||||
@Override
|
||||
public Boolean issueVoucher(IssueVoucherReq req) {
|
||||
// 封装入参
|
||||
Map<String, Object> params = BeanUtil.beanToMap(req);
|
||||
|
||||
// 调用API
|
||||
ApiResp apiResp = e8ApiUtil.doPost(params, ISSUANCE_VOUCHER);
|
||||
|
||||
if (!apiResp.getSuccess()) log.error("E8发行凭证失败,errorMsg:{}", apiResp);
|
||||
|
||||
return apiResp.getSuccess();
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量发行凭证
|
||||
*
|
||||
* @param req 凭证数据
|
||||
* @return Boolean
|
||||
*/
|
||||
public Boolean issueVoucherMany(List<IssueVoucherReq> req) {
|
||||
// 封装入参
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("many", true);
|
||||
params.put("list", req);
|
||||
|
||||
// 调用API
|
||||
ApiResp apiResp = e8ApiUtil.doPost(params, ISSUANCE_VOUCHER_MANY);
|
||||
|
||||
if (!apiResp.getSuccess()) log.error("E8批量发行凭证失败,errorMsg:{}", apiResp);
|
||||
|
||||
return apiResp.getSuccess();
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作凭证
|
||||
*
|
||||
* @param req 入参
|
||||
* @return Boolean
|
||||
*/
|
||||
@Override
|
||||
public Boolean operateVoucher(OperateVoucherReq req) {
|
||||
// 封装入参
|
||||
Map<String, Object> params = BeanUtil.beanToMap(req);
|
||||
|
||||
// 调用API
|
||||
ApiResp apiResp = e8ApiUtil.doPost(params, OPERATE_VOUCHER);
|
||||
|
||||
if (!apiResp.getSuccess()) log.error("E8操作凭证失败,errorMsg:{}", apiResp);
|
||||
|
||||
return apiResp.getSuccess();
|
||||
}
|
||||
|
||||
/**
|
||||
* 换卡补卡
|
||||
*
|
||||
* @param req 入参
|
||||
* @return Boolean
|
||||
*/
|
||||
@Override
|
||||
public Boolean changeCard(ChangeCardReq req) {
|
||||
// 封装入参
|
||||
Map<String, Object> params = BeanUtil.beanToMap(req);
|
||||
|
||||
// 调用API
|
||||
ApiResp apiResp = e8ApiUtil.doPost(params, CHANGE_CARD);
|
||||
|
||||
if (!apiResp.getSuccess()) log.error("E8换卡补卡失败,errorMsg:{}", apiResp);
|
||||
|
||||
return apiResp.getSuccess();
|
||||
}
|
||||
|
||||
/**
|
||||
* 注销人员凭证
|
||||
*
|
||||
* @param req 入参
|
||||
* @return Boolean
|
||||
*/
|
||||
@Override
|
||||
public Boolean cancelVoucher(CancelVoucherReq req) {
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("many", true);
|
||||
params.put("list", req.getIds());
|
||||
|
||||
ApiResp apiResp = e8ApiUtil.doPost(params, CANCEL_VOUCHER);
|
||||
|
||||
if (!apiResp.getSuccess()) log.error("E8注销人员凭证失败,errorMsg:{}", apiResp);
|
||||
|
||||
return apiResp.getSuccess();
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传人脸
|
||||
*
|
||||
* @param imageByte 入参
|
||||
* @return imageUrl 人脸图片地址
|
||||
*/
|
||||
@Override
|
||||
public String uploadFace(byte[] imageByte) {
|
||||
|
||||
ApiResp apiResp = e8ApiUtil.doFaceImgUpload(imageByte);
|
||||
|
||||
if (!apiResp.getSuccess()) {
|
||||
log.error("上传人脸图片失败,errorMsg:{}", apiResp);
|
||||
return null;
|
||||
}
|
||||
|
||||
return apiResp.getMessage();
|
||||
}
|
||||
}
|
@@ -1,5 +1,6 @@
|
||||
package org.dromara.sis.sdk.e8.utils;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.crypto.digest.DigestUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpResponse;
|
||||
@@ -10,10 +11,7 @@ import org.springframework.util.ObjectUtils;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Base64;
|
||||
import java.util.Date;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -38,13 +36,30 @@ public class E8ApiUtil {
|
||||
public ApiResp doPost(Map<String, Object> params, String api) {
|
||||
// 时间戳
|
||||
String timestamp = Long.toString(System.currentTimeMillis());
|
||||
|
||||
String sign;
|
||||
String jsonBody;
|
||||
// 判断是否执行批量接口
|
||||
if (params.get("many") != null) {
|
||||
Object list = params.get("list");
|
||||
List<Object> realParams = CollectionUtil.toList(list);
|
||||
|
||||
// sign签名
|
||||
String sign = getPostSign(params, api, timestamp);
|
||||
sign = getPostSign(null, api, timestamp);
|
||||
// 将params转换为JSON字符串
|
||||
jsonBody = JSONUtil.toJsonStr(realParams);
|
||||
|
||||
}else {
|
||||
// sign签名
|
||||
sign = getPostSign(params, api, timestamp);
|
||||
// 将params转换为JSON字符串
|
||||
jsonBody = JSONUtil.toJsonStr(params);
|
||||
}
|
||||
|
||||
// url
|
||||
String url = BASE_URL + api;
|
||||
|
||||
// 将params转换为JSON字符串
|
||||
String jsonBody = JSONUtil.toJsonStr(params);
|
||||
|
||||
// 对请求体进行Base64加密,指定UTF-8编码,避免乱码
|
||||
String base64Body = Base64.getEncoder().encodeToString(jsonBody.getBytes(StandardCharsets.UTF_8));
|
||||
|
||||
|
2
ruoyi-modules/dimp-wy-web/.gitattributes
vendored
Normal file
2
ruoyi-modules/dimp-wy-web/.gitattributes
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/mvnw text eol=lf
|
||||
*.cmd text eol=crlf
|
33
ruoyi-modules/dimp-wy-web/.gitignore
vendored
Normal file
33
ruoyi-modules/dimp-wy-web/.gitignore
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
HELP.md
|
||||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**/target/
|
||||
!**/src/test/**/target/
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
259
ruoyi-modules/dimp-wy-web/mvnw
vendored
Normal file
259
ruoyi-modules/dimp-wy-web/mvnw
vendored
Normal file
@@ -0,0 +1,259 @@
|
||||
#!/bin/sh
|
||||
# ----------------------------------------------------------------------------
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Apache Maven Wrapper startup batch script, version 3.3.2
|
||||
#
|
||||
# Optional ENV vars
|
||||
# -----------------
|
||||
# JAVA_HOME - location of a JDK home dir, required when download maven via java source
|
||||
# MVNW_REPOURL - repo url base for downloading maven distribution
|
||||
# MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven
|
||||
# MVNW_VERBOSE - true: enable verbose log; debug: trace the mvnw script; others: silence the output
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
set -euf
|
||||
[ "${MVNW_VERBOSE-}" != debug ] || set -x
|
||||
|
||||
# OS specific support.
|
||||
native_path() { printf %s\\n "$1"; }
|
||||
case "$(uname)" in
|
||||
CYGWIN* | MINGW*)
|
||||
[ -z "${JAVA_HOME-}" ] || JAVA_HOME="$(cygpath --unix "$JAVA_HOME")"
|
||||
native_path() { cygpath --path --windows "$1"; }
|
||||
;;
|
||||
esac
|
||||
|
||||
# set JAVACMD and JAVACCMD
|
||||
set_java_home() {
|
||||
# For Cygwin and MinGW, ensure paths are in Unix format before anything is touched
|
||||
if [ -n "${JAVA_HOME-}" ]; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ]; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
JAVACCMD="$JAVA_HOME/jre/sh/javac"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
JAVACCMD="$JAVA_HOME/bin/javac"
|
||||
|
||||
if [ ! -x "$JAVACMD" ] || [ ! -x "$JAVACCMD" ]; then
|
||||
echo "The JAVA_HOME environment variable is not defined correctly, so mvnw cannot run." >&2
|
||||
echo "JAVA_HOME is set to \"$JAVA_HOME\", but \"\$JAVA_HOME/bin/java\" or \"\$JAVA_HOME/bin/javac\" does not exist." >&2
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
else
|
||||
JAVACMD="$(
|
||||
'set' +e
|
||||
'unset' -f command 2>/dev/null
|
||||
'command' -v java
|
||||
)" || :
|
||||
JAVACCMD="$(
|
||||
'set' +e
|
||||
'unset' -f command 2>/dev/null
|
||||
'command' -v javac
|
||||
)" || :
|
||||
|
||||
if [ ! -x "${JAVACMD-}" ] || [ ! -x "${JAVACCMD-}" ]; then
|
||||
echo "The java/javac command does not exist in PATH nor is JAVA_HOME set, so mvnw cannot run." >&2
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# hash string like Java String::hashCode
|
||||
hash_string() {
|
||||
str="${1:-}" h=0
|
||||
while [ -n "$str" ]; do
|
||||
char="${str%"${str#?}"}"
|
||||
h=$(((h * 31 + $(LC_CTYPE=C printf %d "'$char")) % 4294967296))
|
||||
str="${str#?}"
|
||||
done
|
||||
printf %x\\n $h
|
||||
}
|
||||
|
||||
verbose() { :; }
|
||||
[ "${MVNW_VERBOSE-}" != true ] || verbose() { printf %s\\n "${1-}"; }
|
||||
|
||||
die() {
|
||||
printf %s\\n "$1" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
trim() {
|
||||
# MWRAPPER-139:
|
||||
# Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds.
|
||||
# Needed for removing poorly interpreted newline sequences when running in more
|
||||
# exotic environments such as mingw bash on Windows.
|
||||
printf "%s" "${1}" | tr -d '[:space:]'
|
||||
}
|
||||
|
||||
# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties
|
||||
while IFS="=" read -r key value; do
|
||||
case "${key-}" in
|
||||
distributionUrl) distributionUrl=$(trim "${value-}") ;;
|
||||
distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;;
|
||||
esac
|
||||
done <"${0%/*}/.mvn/wrapper/maven-wrapper.properties"
|
||||
[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in ${0%/*}/.mvn/wrapper/maven-wrapper.properties"
|
||||
|
||||
case "${distributionUrl##*/}" in
|
||||
maven-mvnd-*bin.*)
|
||||
MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/
|
||||
case "${PROCESSOR_ARCHITECTURE-}${PROCESSOR_ARCHITEW6432-}:$(uname -a)" in
|
||||
*AMD64:CYGWIN* | *AMD64:MINGW*) distributionPlatform=windows-amd64 ;;
|
||||
:Darwin*x86_64) distributionPlatform=darwin-amd64 ;;
|
||||
:Darwin*arm64) distributionPlatform=darwin-aarch64 ;;
|
||||
:Linux*x86_64*) distributionPlatform=linux-amd64 ;;
|
||||
*)
|
||||
echo "Cannot detect native platform for mvnd on $(uname)-$(uname -m), use pure java version" >&2
|
||||
distributionPlatform=linux-amd64
|
||||
;;
|
||||
esac
|
||||
distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip"
|
||||
;;
|
||||
maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;;
|
||||
*) MVN_CMD="mvn${0##*/mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;;
|
||||
esac
|
||||
|
||||
# apply MVNW_REPOURL and calculate MAVEN_HOME
|
||||
# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash>
|
||||
[ -z "${MVNW_REPOURL-}" ] || distributionUrl="$MVNW_REPOURL$_MVNW_REPO_PATTERN${distributionUrl#*"$_MVNW_REPO_PATTERN"}"
|
||||
distributionUrlName="${distributionUrl##*/}"
|
||||
distributionUrlNameMain="${distributionUrlName%.*}"
|
||||
distributionUrlNameMain="${distributionUrlNameMain%-bin}"
|
||||
MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}"
|
||||
MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")"
|
||||
|
||||
exec_maven() {
|
||||
unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || :
|
||||
exec "$MAVEN_HOME/bin/$MVN_CMD" "$@" || die "cannot exec $MAVEN_HOME/bin/$MVN_CMD"
|
||||
}
|
||||
|
||||
if [ -d "$MAVEN_HOME" ]; then
|
||||
verbose "found existing MAVEN_HOME at $MAVEN_HOME"
|
||||
exec_maven "$@"
|
||||
fi
|
||||
|
||||
case "${distributionUrl-}" in
|
||||
*?-bin.zip | *?maven-mvnd-?*-?*.zip) ;;
|
||||
*) die "distributionUrl is not valid, must match *-bin.zip or maven-mvnd-*.zip, but found '${distributionUrl-}'" ;;
|
||||
esac
|
||||
|
||||
# prepare tmp dir
|
||||
if TMP_DOWNLOAD_DIR="$(mktemp -d)" && [ -d "$TMP_DOWNLOAD_DIR" ]; then
|
||||
clean() { rm -rf -- "$TMP_DOWNLOAD_DIR"; }
|
||||
trap clean HUP INT TERM EXIT
|
||||
else
|
||||
die "cannot create temp dir"
|
||||
fi
|
||||
|
||||
mkdir -p -- "${MAVEN_HOME%/*}"
|
||||
|
||||
# Download and Install Apache Maven
|
||||
verbose "Couldn't find MAVEN_HOME, downloading and installing it ..."
|
||||
verbose "Downloading from: $distributionUrl"
|
||||
verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName"
|
||||
|
||||
# select .zip or .tar.gz
|
||||
if ! command -v unzip >/dev/null; then
|
||||
distributionUrl="${distributionUrl%.zip}.tar.gz"
|
||||
distributionUrlName="${distributionUrl##*/}"
|
||||
fi
|
||||
|
||||
# verbose opt
|
||||
__MVNW_QUIET_WGET=--quiet __MVNW_QUIET_CURL=--silent __MVNW_QUIET_UNZIP=-q __MVNW_QUIET_TAR=''
|
||||
[ "${MVNW_VERBOSE-}" != true ] || __MVNW_QUIET_WGET='' __MVNW_QUIET_CURL='' __MVNW_QUIET_UNZIP='' __MVNW_QUIET_TAR=v
|
||||
|
||||
# normalize http auth
|
||||
case "${MVNW_PASSWORD:+has-password}" in
|
||||
'') MVNW_USERNAME='' MVNW_PASSWORD='' ;;
|
||||
has-password) [ -n "${MVNW_USERNAME-}" ] || MVNW_USERNAME='' MVNW_PASSWORD='' ;;
|
||||
esac
|
||||
|
||||
if [ -z "${MVNW_USERNAME-}" ] && command -v wget >/dev/null; then
|
||||
verbose "Found wget ... using wget"
|
||||
wget ${__MVNW_QUIET_WGET:+"$__MVNW_QUIET_WGET"} "$distributionUrl" -O "$TMP_DOWNLOAD_DIR/$distributionUrlName" || die "wget: Failed to fetch $distributionUrl"
|
||||
elif [ -z "${MVNW_USERNAME-}" ] && command -v curl >/dev/null; then
|
||||
verbose "Found curl ... using curl"
|
||||
curl ${__MVNW_QUIET_CURL:+"$__MVNW_QUIET_CURL"} -f -L -o "$TMP_DOWNLOAD_DIR/$distributionUrlName" "$distributionUrl" || die "curl: Failed to fetch $distributionUrl"
|
||||
elif set_java_home; then
|
||||
verbose "Falling back to use Java to download"
|
||||
javaSource="$TMP_DOWNLOAD_DIR/Downloader.java"
|
||||
targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName"
|
||||
cat >"$javaSource" <<-END
|
||||
public class Downloader extends java.net.Authenticator
|
||||
{
|
||||
protected java.net.PasswordAuthentication getPasswordAuthentication()
|
||||
{
|
||||
return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() );
|
||||
}
|
||||
public static void main( String[] args ) throws Exception
|
||||
{
|
||||
setDefault( new Downloader() );
|
||||
java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() );
|
||||
}
|
||||
}
|
||||
END
|
||||
# For Cygwin/MinGW, switch paths to Windows format before running javac and java
|
||||
verbose " - Compiling Downloader.java ..."
|
||||
"$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java"
|
||||
verbose " - Running Downloader.java ..."
|
||||
"$(native_path "$JAVACMD")" -cp "$(native_path "$TMP_DOWNLOAD_DIR")" Downloader "$distributionUrl" "$(native_path "$targetZip")"
|
||||
fi
|
||||
|
||||
# If specified, validate the SHA-256 sum of the Maven distribution zip file
|
||||
if [ -n "${distributionSha256Sum-}" ]; then
|
||||
distributionSha256Result=false
|
||||
if [ "$MVN_CMD" = mvnd.sh ]; then
|
||||
echo "Checksum validation is not supported for maven-mvnd." >&2
|
||||
echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2
|
||||
exit 1
|
||||
elif command -v sha256sum >/dev/null; then
|
||||
if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c >/dev/null 2>&1; then
|
||||
distributionSha256Result=true
|
||||
fi
|
||||
elif command -v shasum >/dev/null; then
|
||||
if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | shasum -a 256 -c >/dev/null 2>&1; then
|
||||
distributionSha256Result=true
|
||||
fi
|
||||
else
|
||||
echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2
|
||||
echo "Please install either command, or disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2
|
||||
exit 1
|
||||
fi
|
||||
if [ $distributionSha256Result = false ]; then
|
||||
echo "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised." >&2
|
||||
echo "If you updated your Maven version, you need to update the specified distributionSha256Sum property." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# unzip and move
|
||||
if command -v unzip >/dev/null; then
|
||||
unzip ${__MVNW_QUIET_UNZIP:+"$__MVNW_QUIET_UNZIP"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -d "$TMP_DOWNLOAD_DIR" || die "failed to unzip"
|
||||
else
|
||||
tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar"
|
||||
fi
|
||||
printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/mvnw.url"
|
||||
mv -- "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME"
|
||||
|
||||
clean || :
|
||||
exec_maven "$@"
|
149
ruoyi-modules/dimp-wy-web/mvnw.cmd
vendored
Normal file
149
ruoyi-modules/dimp-wy-web/mvnw.cmd
vendored
Normal file
@@ -0,0 +1,149 @@
|
||||
<# : batch portion
|
||||
@REM ----------------------------------------------------------------------------
|
||||
@REM Licensed to the Apache Software Foundation (ASF) under one
|
||||
@REM or more contributor license agreements. See the NOTICE file
|
||||
@REM distributed with this work for additional information
|
||||
@REM regarding copyright ownership. The ASF licenses this file
|
||||
@REM to you under the Apache License, Version 2.0 (the
|
||||
@REM "License"); you may not use this file except in compliance
|
||||
@REM with the License. You may obtain a copy of the License at
|
||||
@REM
|
||||
@REM http://www.apache.org/licenses/LICENSE-2.0
|
||||
@REM
|
||||
@REM Unless required by applicable law or agreed to in writing,
|
||||
@REM software distributed under the License is distributed on an
|
||||
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
@REM KIND, either express or implied. See the License for the
|
||||
@REM specific language governing permissions and limitations
|
||||
@REM under the License.
|
||||
@REM ----------------------------------------------------------------------------
|
||||
|
||||
@REM ----------------------------------------------------------------------------
|
||||
@REM Apache Maven Wrapper startup batch script, version 3.3.2
|
||||
@REM
|
||||
@REM Optional ENV vars
|
||||
@REM MVNW_REPOURL - repo url base for downloading maven distribution
|
||||
@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven
|
||||
@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output
|
||||
@REM ----------------------------------------------------------------------------
|
||||
|
||||
@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0)
|
||||
@SET __MVNW_CMD__=
|
||||
@SET __MVNW_ERROR__=
|
||||
@SET __MVNW_PSMODULEP_SAVE=%PSModulePath%
|
||||
@SET PSModulePath=
|
||||
@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @(
|
||||
IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B)
|
||||
)
|
||||
@SET PSModulePath=%__MVNW_PSMODULEP_SAVE%
|
||||
@SET __MVNW_PSMODULEP_SAVE=
|
||||
@SET __MVNW_ARG0_NAME__=
|
||||
@SET MVNW_USERNAME=
|
||||
@SET MVNW_PASSWORD=
|
||||
@IF NOT "%__MVNW_CMD__%"=="" (%__MVNW_CMD__% %*)
|
||||
@echo Cannot start maven from wrapper >&2 && exit /b 1
|
||||
@GOTO :EOF
|
||||
: end batch / begin powershell #>
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
if ($env:MVNW_VERBOSE -eq "true") {
|
||||
$VerbosePreference = "Continue"
|
||||
}
|
||||
|
||||
# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties
|
||||
$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl
|
||||
if (!$distributionUrl) {
|
||||
Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties"
|
||||
}
|
||||
|
||||
switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) {
|
||||
"maven-mvnd-*" {
|
||||
$USE_MVND = $true
|
||||
$distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip"
|
||||
$MVN_CMD = "mvnd.cmd"
|
||||
break
|
||||
}
|
||||
default {
|
||||
$USE_MVND = $false
|
||||
$MVN_CMD = $script -replace '^mvnw','mvn'
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
# apply MVNW_REPOURL and calculate MAVEN_HOME
|
||||
# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash>
|
||||
if ($env:MVNW_REPOURL) {
|
||||
$MVNW_REPO_PATTERN = if ($USE_MVND) { "/org/apache/maven/" } else { "/maven/mvnd/" }
|
||||
$distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace '^.*'+$MVNW_REPO_PATTERN,'')"
|
||||
}
|
||||
$distributionUrlName = $distributionUrl -replace '^.*/',''
|
||||
$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$',''
|
||||
$MAVEN_HOME_PARENT = "$HOME/.m2/wrapper/dists/$distributionUrlNameMain"
|
||||
if ($env:MAVEN_USER_HOME) {
|
||||
$MAVEN_HOME_PARENT = "$env:MAVEN_USER_HOME/wrapper/dists/$distributionUrlNameMain"
|
||||
}
|
||||
$MAVEN_HOME_NAME = ([System.Security.Cryptography.MD5]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join ''
|
||||
$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME"
|
||||
|
||||
if (Test-Path -Path "$MAVEN_HOME" -PathType Container) {
|
||||
Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME"
|
||||
Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD"
|
||||
exit $?
|
||||
}
|
||||
|
||||
if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) {
|
||||
Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl"
|
||||
}
|
||||
|
||||
# prepare tmp dir
|
||||
$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile
|
||||
$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir"
|
||||
$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null
|
||||
trap {
|
||||
if ($TMP_DOWNLOAD_DIR.Exists) {
|
||||
try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null }
|
||||
catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" }
|
||||
}
|
||||
}
|
||||
|
||||
New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null
|
||||
|
||||
# Download and Install Apache Maven
|
||||
Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..."
|
||||
Write-Verbose "Downloading from: $distributionUrl"
|
||||
Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName"
|
||||
|
||||
$webclient = New-Object System.Net.WebClient
|
||||
if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) {
|
||||
$webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD)
|
||||
}
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null
|
||||
|
||||
# If specified, validate the SHA-256 sum of the Maven distribution zip file
|
||||
$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum
|
||||
if ($distributionSha256Sum) {
|
||||
if ($USE_MVND) {
|
||||
Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties."
|
||||
}
|
||||
Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash
|
||||
if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) {
|
||||
Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property."
|
||||
}
|
||||
}
|
||||
|
||||
# unzip and move
|
||||
Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null
|
||||
Rename-Item -Path "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" -NewName $MAVEN_HOME_NAME | Out-Null
|
||||
try {
|
||||
Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null
|
||||
} catch {
|
||||
if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) {
|
||||
Write-Error "fail to move MAVEN_HOME"
|
||||
}
|
||||
} finally {
|
||||
try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null }
|
||||
catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" }
|
||||
}
|
||||
|
||||
Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD"
|
214
ruoyi-modules/dimp-wy-web/pom.xml
Normal file
214
ruoyi-modules/dimp-wy-web/pom.xml
Normal file
@@ -0,0 +1,214 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>by.dimp</groupId>
|
||||
<artifactId>dimp-wy</artifactId>
|
||||
<version>1.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>dimp-wy-web</artifactId>
|
||||
<version>1.0</version>
|
||||
<name>dimp-modules-web</name>
|
||||
<description>dimp-modules-web</description>
|
||||
|
||||
<properties>
|
||||
<java.version>21</java.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.javen205</groupId>
|
||||
<artifactId>IJPay-WxPay</artifactId>
|
||||
<version>2.9.6</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- EasyExcel -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>easyexcel</artifactId>
|
||||
<version>2.1.6</version>
|
||||
</dependency>
|
||||
<!-- lombok 优雅编程 -->
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.10</version>
|
||||
</dependency>
|
||||
<!-- junit -->
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.12</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 时间格式 -->
|
||||
<dependency>
|
||||
<groupId>joda-time</groupId>
|
||||
<artifactId>joda-time</artifactId>
|
||||
<version>2.10.2</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos Config -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.dubbo</groupId>
|
||||
<artifactId>dubbo-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.dubbo</groupId>
|
||||
<artifactId>dubbo-nacos-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.lettuce</groupId>
|
||||
<artifactId>lettuce-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-redis</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- mp分页 -->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-jsqlparser</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid-spring-boot-3-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>by.dimp</groupId>
|
||||
<artifactId>dimp-api-file</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>by.dimp</groupId>
|
||||
<artifactId>dimp-common-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.dev33</groupId>
|
||||
<artifactId>sa-token-spring-boot3-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>cn.dev33</groupId>
|
||||
<artifactId>sa-token-redis-template</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Sa-Token 整合 Fastjson2 -->
|
||||
<dependency>
|
||||
<groupId>cn.dev33</groupId>
|
||||
<artifactId>sa-token-fastjson2</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-validation</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- hutool工具类 -->
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>5.8.37</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.1</version>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
<annotationProcessorPaths>
|
||||
<path>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct-processor</artifactId>
|
||||
<version>${mapstruct.version}</version>
|
||||
</path>
|
||||
<path>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>${lombok.version}</version>
|
||||
</path>
|
||||
<path>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok-mapstruct-binding</artifactId>
|
||||
<version>0.2.0</version>
|
||||
</path>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@@ -0,0 +1,19 @@
|
||||
package by.dimp.web;
|
||||
|
||||
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cache.annotation.EnableCaching;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
|
||||
@SpringBootApplication
|
||||
@EnableDubbo
|
||||
@EnableDiscoveryClient
|
||||
@EnableCaching
|
||||
public class DimpModulesWebApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(DimpModulesWebApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,26 @@
|
||||
package by.dimp.web.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
@Configuration
|
||||
public class CorsConfig {
|
||||
|
||||
@Bean
|
||||
public WebMvcConfigurer corsConfigurer() {
|
||||
return new WebMvcConfigurer() {
|
||||
@Override
|
||||
public void addCorsMappings(CorsRegistry registry) {
|
||||
registry.addMapping("/**") // 所有路径
|
||||
.allowedOrigins("*") // 允许所有源
|
||||
.allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS") // 允许的方法
|
||||
.allowedHeaders("*") // 允许所有头
|
||||
.allowCredentials(false) // 是否允许凭证
|
||||
.maxAge(3600); // 预检请求缓存时间
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,61 @@
|
||||
package by.dimp.web.config;
|
||||
|
||||
import by.dimp.common.core.domain.ErrorType;
|
||||
import by.dimp.common.core.domain.Result;
|
||||
import by.dimp.common.core.exception.BizException;
|
||||
import by.dimp.common.core.exception.ObjectExistException;
|
||||
import by.dimp.common.core.exception.UserNotLoginException;
|
||||
import cn.dev33.satoken.exception.NotLoginException;
|
||||
import org.springframework.web.bind.MethodArgumentNotValidException;
|
||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestControllerAdvice
|
||||
public class GlobalExceptionHandler {
|
||||
|
||||
/**
|
||||
* 未登录或者授权失效
|
||||
*/
|
||||
@ExceptionHandler({UserNotLoginException.class, NotLoginException.class})
|
||||
public Result<?> handleLoginException(Exception ex) {
|
||||
return Result.fail(ErrorType.AUTH_TOKEN_NOT_EXISTS);
|
||||
}
|
||||
|
||||
/**
|
||||
* 对象已存在异常
|
||||
*/
|
||||
@ExceptionHandler(ObjectExistException.class)
|
||||
public Result<?> handleException(ObjectExistException ex) {
|
||||
return Result.fail(ErrorType.OBJECT_EXISTS, ex.getMessage());
|
||||
}
|
||||
|
||||
@ExceptionHandler(MethodArgumentNotValidException.class)
|
||||
public Result<List<String>> handleValidationException(MethodArgumentNotValidException ex) {
|
||||
List<String> errors = ex.getBindingResult()
|
||||
.getFieldErrors()
|
||||
.stream()
|
||||
.map(error -> error.getField() + ": " + error.getDefaultMessage())
|
||||
.toList();
|
||||
|
||||
return Result.fail(ErrorType.PARAM_NOT_VALID, errors);
|
||||
}
|
||||
|
||||
/**
|
||||
* 系统业务异常
|
||||
*/
|
||||
@ExceptionHandler(BizException.class)
|
||||
public Result<?> handleException(BizException ex) {
|
||||
return Result.fail(ErrorType.SYSTEM_ERROR, ex.getMessage());
|
||||
}
|
||||
|
||||
/**
|
||||
* 最后兜底的异常
|
||||
*/
|
||||
@ExceptionHandler(Exception.class)
|
||||
public Result<?> handleException(Exception ex) {
|
||||
return Result.fail(ErrorType.SYSTEM_ERROR, ex.getMessage());
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,40 @@
|
||||
package by.dimp.web.config;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.DbType;
|
||||
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
|
||||
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
|
||||
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
||||
import org.apache.ibatis.reflection.MetaObject;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Configuration
|
||||
@MapperScan("by.dimp.web.mapper")
|
||||
public class MyBatisPlusConfig implements MetaObjectHandler {
|
||||
|
||||
@Override
|
||||
public void insertFill(MetaObject metaObject) {
|
||||
this.strictInsertFill(metaObject, "createTime", LocalDateTime.class, LocalDateTime.now());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateFill(MetaObject metaObject) {
|
||||
this.strictUpdateFill(metaObject, "updateTime", LocalDateTime.class, LocalDateTime.now());
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加分页插件
|
||||
*/
|
||||
@Bean
|
||||
public MybatisPlusInterceptor mybatisPlusInterceptor() {
|
||||
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
||||
// 如果配置多个插件, 切记分页最后添加
|
||||
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
|
||||
// 如果有多数据源可以不配具体类型, 否则都建议配上具体的 DbType
|
||||
return interceptor;
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
package by.dimp.web.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
@Configuration
|
||||
public class RestTemplateConfig {
|
||||
|
||||
@Bean
|
||||
public RestTemplate restTemplate() {
|
||||
return new RestTemplate();
|
||||
}
|
||||
}
|
@@ -0,0 +1,19 @@
|
||||
package by.dimp.web.config;
|
||||
|
||||
import cn.dev33.satoken.interceptor.SaInterceptor;
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
@Configuration
|
||||
public class SaTokenConfigure implements WebMvcConfigurer {
|
||||
|
||||
@Override
|
||||
public void addInterceptors(InterceptorRegistry registry) {
|
||||
// 注册 Sa-Token 拦截器,校验规则为 StpUtil.checkLogin() 登录校验。
|
||||
registry.addInterceptor(new SaInterceptor(handle -> StpUtil.checkLogin()))
|
||||
.addPathPatterns("/**");
|
||||
// .excludePathPatterns("/user/doLogin");
|
||||
}
|
||||
}
|
@@ -0,0 +1,35 @@
|
||||
package by.dimp.web.config;
|
||||
|
||||
import org.springframework.boot.web.embedded.tomcat.TomcatProtocolHandlerCustomizer;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.task.AsyncTaskExecutor;
|
||||
import org.springframework.core.task.support.TaskExecutorAdapter;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.ThreadFactory;
|
||||
import static java.util.concurrent.Executors.newThreadPerTaskExecutor;
|
||||
|
||||
@Configuration
|
||||
public class ThreadPoolConfig {
|
||||
|
||||
/**
|
||||
* 使用@Async的时候可以用虚拟现成执行
|
||||
*/
|
||||
@Bean
|
||||
public AsyncTaskExecutor asyncTaskExecutor(){
|
||||
ThreadFactory factory = Thread.ofVirtual().name("async-", 1).factory();
|
||||
ExecutorService executorService = newThreadPerTaskExecutor(factory);
|
||||
return new TaskExecutorAdapter(executorService);
|
||||
}
|
||||
|
||||
/**
|
||||
* tomcat处理请求的时候用虚拟线程处理
|
||||
*/
|
||||
@Bean
|
||||
public TomcatProtocolHandlerCustomizer<?> protocolHandlerVirtualThreadExecutorCustomizer() {
|
||||
ThreadFactory factory = Thread.ofVirtual().name("http-", 1).factory();
|
||||
ExecutorService executorService = newThreadPerTaskExecutor(factory);
|
||||
return protocolHandler -> protocolHandler.setExecutor(executorService);
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,128 @@
|
||||
package by.dimp.web.controller.E8.base;
|
||||
|
||||
import by.dimp.common.core.domain.ErrorType;
|
||||
import by.dimp.common.core.domain.Result;
|
||||
import by.dimp.web.model.entity.E8.AreaInfo;
|
||||
import by.dimp.web.service.E8Service.base.AreaService;
|
||||
import by.dimp.web.model.domain.E8.general.QueryDto;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @author zcxlsm
|
||||
* @title: AreaController
|
||||
* @date 2025/5/9 17:42
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/e8/areaService")
|
||||
public class AreaController {
|
||||
|
||||
@Resource
|
||||
private AreaService areaService;
|
||||
|
||||
// 所有接口入参暂定QueryDto 后续根据业务调整
|
||||
|
||||
/**
|
||||
* 查询区域信息
|
||||
*
|
||||
* @param dto 传参
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/getAreaInfo")
|
||||
public Result getAreaInfo(QueryDto dto) {
|
||||
log.info("E8接口 查询区域信息 入参={}", dto.getQueryDto());
|
||||
if (ObjectUtils.isEmpty(dto)) {
|
||||
return Result.fail(ErrorType.PARAMM_NULL);
|
||||
}
|
||||
|
||||
AreaInfo areaInfo = areaService.getAreaInfo(dto);
|
||||
|
||||
if (areaInfo == null) {
|
||||
return Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION);
|
||||
} else {
|
||||
return Result.success(areaInfo);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取区域列表
|
||||
*
|
||||
* @param dto 传参
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/getAreaList")
|
||||
public Result getAreaList(QueryDto dto) {
|
||||
log.info("E8接口 获取区域列表 入参={}", dto.getQueryDto());
|
||||
if (ObjectUtils.isEmpty(dto)) {
|
||||
return Result.fail(ErrorType.PARAMM_NULL);
|
||||
}
|
||||
|
||||
IPage<AreaInfo> page = areaService.getAreaList(dto);
|
||||
|
||||
if (page == null) {
|
||||
return Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION);
|
||||
} else {
|
||||
return Result.success(page);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增区域
|
||||
*
|
||||
* @param dto 传参
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/addArea")
|
||||
public Result addArea(QueryDto dto) {
|
||||
log.info("E8接口 新增区域 入参={}", dto.getQueryDto());
|
||||
if (ObjectUtils.isEmpty(dto)) {
|
||||
return Result.fail(ErrorType.PARAMM_NULL);
|
||||
}
|
||||
|
||||
Boolean flag = areaService.addArea(dto);
|
||||
|
||||
return flag ? Result.success(true) : Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改区域
|
||||
*
|
||||
* @param dto 传参
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/updateArea")
|
||||
public Result updateArea(QueryDto dto) {
|
||||
log.info("E8接口 修改区域 入参={}", dto.getQueryDto());
|
||||
if (ObjectUtils.isEmpty(dto)) {
|
||||
return Result.fail(ErrorType.PARAMM_NULL);
|
||||
}
|
||||
|
||||
Boolean flag = areaService.updateArea(dto);
|
||||
|
||||
return flag ? Result.success(true) : Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除区域
|
||||
*
|
||||
* @param dto 传参
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/deleteArea")
|
||||
public Result deleteArea(QueryDto dto) {
|
||||
log.info("E8接口 删除区域 入参={}", dto.getQueryDto());
|
||||
if (ObjectUtils.isEmpty(dto)) {
|
||||
return Result.fail(ErrorType.PARAMM_NULL);
|
||||
}
|
||||
|
||||
Boolean flag = areaService.deleteArea(dto);
|
||||
|
||||
return flag ? Result.success(true) : Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION);
|
||||
}
|
||||
}
|
@@ -0,0 +1,111 @@
|
||||
package by.dimp.web.controller.E8.base;
|
||||
|
||||
import by.dimp.common.core.domain.ErrorType;
|
||||
import by.dimp.common.core.domain.Result;
|
||||
import by.dimp.web.model.entity.E8.AuthGroupInfo;
|
||||
import by.dimp.web.service.E8Service.base.AuthGroupService;
|
||||
import by.dimp.web.model.domain.E8.general.QueryDto;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @author zcxlsm
|
||||
* @title: AuthGroupController
|
||||
* @date 2025/5/10 17:04
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/e8/authGroupService")
|
||||
public class AuthGroupController {
|
||||
|
||||
@Resource
|
||||
private AuthGroupService authGroupService;
|
||||
|
||||
// 所有接口入参暂定QueryDto 后续根据业务调整
|
||||
|
||||
/**
|
||||
* 权限组分页查询
|
||||
*
|
||||
* @param dto
|
||||
* @return ApiResp
|
||||
* @implNote 通过接口查询权限组列表信息,支持按权限组名称查询门禁权限和梯控权限
|
||||
*/
|
||||
@PostMapping("/getPageList")
|
||||
public Result getPageList(QueryDto dto) {
|
||||
log.info("E8接口 权限组分页查询 入参={}", dto);
|
||||
if (ObjectUtils.isEmpty(dto)){
|
||||
return Result.fail(ErrorType.PARAMM_NULL);
|
||||
}
|
||||
|
||||
IPage<AuthGroupInfo> pageInfo = authGroupService.getPageList(dto);
|
||||
|
||||
if (pageInfo == null){
|
||||
return Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION);
|
||||
}else {
|
||||
return Result.success(pageInfo);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加权限组
|
||||
*
|
||||
* @param dto
|
||||
* @return ApiResp
|
||||
* @implNote 通过接口新增权限组(门+电梯权限),仅支持单个新增
|
||||
*/
|
||||
@PostMapping("/addAuthGroup")
|
||||
public Result addAuthGroup(QueryDto dto) {
|
||||
log.info("E8接口 添加权限组 入参={}", dto);
|
||||
if (ObjectUtils.isEmpty(dto)){
|
||||
return Result.fail(ErrorType.PARAMM_NULL);
|
||||
}
|
||||
|
||||
Boolean flag = authGroupService.addAuthGroup(dto);
|
||||
|
||||
return flag ? Result.success(true) : Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改权限组
|
||||
*
|
||||
* @param dto
|
||||
* @return ApiResp
|
||||
* @implNote 通过接口修改权限组的门/电梯权限
|
||||
*/
|
||||
@PostMapping("/updateAuthGroup")
|
||||
public Result updateAuthGroup(QueryDto dto) {
|
||||
log.info("E8接口 修改权限组 入参={}", dto);
|
||||
if (ObjectUtils.isEmpty(dto)){
|
||||
return Result.fail(ErrorType.PARAMM_NULL);
|
||||
}
|
||||
|
||||
Boolean flag = authGroupService.updateAuthGroup(dto);
|
||||
|
||||
return flag ? Result.success(true) : Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据主键ID删除权限组
|
||||
*
|
||||
* @param dto
|
||||
* @return ApiResp
|
||||
* @implNote 通过接口删除权限组信息
|
||||
*/
|
||||
@PostMapping("/deleteAuthGroup")
|
||||
public Result deleteAuthGroup(QueryDto dto) {
|
||||
log.info("E8接口 根据主键ID删除权限组 入参={}", dto);
|
||||
if (ObjectUtils.isEmpty(dto)){
|
||||
return Result.fail(ErrorType.PARAMM_NULL);
|
||||
}
|
||||
|
||||
Boolean flag = authGroupService.deleteAuthGroup(dto);
|
||||
|
||||
return flag ? Result.success(true) : Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION);
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,130 @@
|
||||
package by.dimp.web.controller.E8.base;
|
||||
|
||||
import by.dimp.common.core.domain.ErrorType;
|
||||
import by.dimp.common.core.domain.Result;
|
||||
import by.dimp.web.model.entity.E8.CustomerInfo;
|
||||
import by.dimp.web.service.E8Service.base.CustomerService;
|
||||
import by.dimp.web.model.domain.E8.general.QueryDto;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
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;
|
||||
|
||||
|
||||
/**
|
||||
* @author zcxlsm
|
||||
* @title: CustomerController
|
||||
* @date 2025/5/9 15:49
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/e8/customerService")
|
||||
public class CustomerController {
|
||||
|
||||
@Resource
|
||||
private CustomerService customerService;
|
||||
|
||||
// 所有接口入参暂定QueryDto 后续根据业务调整
|
||||
|
||||
/**
|
||||
* 查询单个人员信息
|
||||
*
|
||||
* @param dto 传参
|
||||
* @return ApiResp
|
||||
*/
|
||||
@PostMapping("/selectCustomer")
|
||||
public Result<CustomerInfo> selectCustomer(@RequestBody QueryDto dto) {
|
||||
log.info("E8接口,查询单个人员信息,入参={}", dto.getQueryDto());
|
||||
if (ObjectUtils.isEmpty(dto)) {
|
||||
return Result.fail(ErrorType.PARAMM_NULL);
|
||||
}
|
||||
|
||||
CustomerInfo customerInfo = customerService.selectCustomer(dto);
|
||||
|
||||
if (customerInfo == null) {
|
||||
return Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION);
|
||||
} else {
|
||||
return Result.success(customerInfo);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员信息分页查询
|
||||
*
|
||||
* @param dto 传参
|
||||
* @return ApiResp
|
||||
*/
|
||||
@PostMapping("/selectCustomerList")
|
||||
public Result<IPage<CustomerInfo>> selectCustomerList(@RequestBody QueryDto dto) {
|
||||
log.info("E8接口,人员信息分页查询,入参={}", dto.getQueryDto());
|
||||
if (ObjectUtils.isEmpty(dto)) {
|
||||
return Result.fail(ErrorType.PARAMM_NULL);
|
||||
}
|
||||
|
||||
IPage<CustomerInfo> page = customerService.selectCustomerList(dto);
|
||||
|
||||
if (page == null) {
|
||||
return Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION);
|
||||
} else {
|
||||
return Result.success(page);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增人员信息
|
||||
*
|
||||
* @param dto 传参
|
||||
* @return ApiResp
|
||||
*/
|
||||
@PostMapping("/addCustomer")
|
||||
public Result<Boolean> addCustomer(@RequestBody QueryDto dto) {
|
||||
log.info("E8接口,新增人员信息,入参={}", dto.getQueryDto());
|
||||
if (ObjectUtils.isEmpty(dto)) {
|
||||
return Result.fail(ErrorType.PARAMM_NULL);
|
||||
}
|
||||
|
||||
Boolean flag = customerService.addCustomer(dto);
|
||||
|
||||
return flag ? Result.success(true) : Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION);
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员信息修改
|
||||
*
|
||||
* @param dto 传参
|
||||
* @return ApiResp
|
||||
*/
|
||||
@PostMapping("/updateCustomer")
|
||||
public Result<Boolean> updateCustomer(@RequestBody QueryDto dto) {
|
||||
log.info("E8接口,人员信息修改,入参={}", dto.getQueryDto());
|
||||
if (ObjectUtils.isEmpty(dto)) {
|
||||
return Result.fail(ErrorType.PARAMM_NULL);
|
||||
}
|
||||
|
||||
Boolean flag = customerService.updateCustomer(dto);
|
||||
|
||||
return flag ? Result.success(true) : Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除人员信息
|
||||
*
|
||||
* @param dto 传参
|
||||
* @return ApiResp
|
||||
*/
|
||||
@PostMapping("/deleteCustomer")
|
||||
public Result<Boolean> deleteCustomer(@RequestBody QueryDto dto) {
|
||||
log.info("E8接口,删除人员信息,入参={}", dto.getQueryDto());
|
||||
if (ObjectUtils.isEmpty(dto)) {
|
||||
return Result.fail(ErrorType.PARAMM_NULL);
|
||||
}
|
||||
|
||||
Boolean flag = customerService.deleteCustomer(dto);
|
||||
|
||||
return flag ? Result.success(true) : Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION);
|
||||
}
|
||||
}
|
@@ -0,0 +1,132 @@
|
||||
package by.dimp.web.controller.E8.base;
|
||||
|
||||
import by.dimp.common.core.domain.ErrorType;
|
||||
import by.dimp.common.core.domain.Result;
|
||||
import by.dimp.web.model.entity.E8.DoorDeviceInfo;
|
||||
import by.dimp.web.service.E8Service.base.DoorDeviceService;
|
||||
import by.dimp.web.model.domain.E8.general.QueryDto;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @author zcxlsm
|
||||
* @title: DoorDeviceController
|
||||
* @date 2025/5/10 17:13
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/e8/doorDeviceService")
|
||||
public class DoorDeviceController {
|
||||
|
||||
@Resource
|
||||
private DoorDeviceService doorDeviceService;
|
||||
|
||||
// 所有接口入参暂定QueryDto 后续根据业务调整
|
||||
|
||||
/**
|
||||
* 查询门禁信息
|
||||
*
|
||||
* @param dto 入参
|
||||
* @return Result
|
||||
*/
|
||||
@PostMapping("/selectDoorDevice")
|
||||
public Result selectDoorDevice(@RequestBody QueryDto dto) {
|
||||
log.info("E8接口 查询门禁信息 入参={}", dto);
|
||||
if (ObjectUtils.isEmpty(dto)) {
|
||||
return Result.fail(ErrorType.PARAMM_NULL);
|
||||
}
|
||||
|
||||
DoorDeviceInfo doorDeviceInfo = doorDeviceService.selectDoorDevice(dto);
|
||||
|
||||
if (doorDeviceInfo == null) {
|
||||
return Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION);
|
||||
} else {
|
||||
return Result.success(doorDeviceInfo);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 门禁信息分页查询
|
||||
*
|
||||
* @param dto 入参
|
||||
* @return Result
|
||||
*/
|
||||
@PostMapping("/selectDoorDeviceList")
|
||||
public Result selectDoorDeviceList(@RequestBody QueryDto dto) {
|
||||
log.info("E8接口 门禁信息分页查询 入参={}", dto);
|
||||
if (ObjectUtils.isEmpty(dto)) {
|
||||
return Result.fail(ErrorType.PARAMM_NULL);
|
||||
}
|
||||
|
||||
IPage<DoorDeviceInfo> doorDeviceInfoIPage = doorDeviceService.selectDoorDeviceList(dto);
|
||||
|
||||
if (doorDeviceInfoIPage == null) {
|
||||
return Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION);
|
||||
} else {
|
||||
return Result.success(doorDeviceInfoIPage);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增门禁信息
|
||||
*
|
||||
* @param dto 入参
|
||||
* @return Boolean
|
||||
*/
|
||||
@PostMapping("/addDoorDevice")
|
||||
public Result addDoorDevice(@RequestBody QueryDto dto) {
|
||||
log.info("E8接口 新增门禁信息 入参={}", dto);
|
||||
if (ObjectUtils.isEmpty(dto)) {
|
||||
return Result.fail(ErrorType.PARAMM_NULL);
|
||||
}
|
||||
|
||||
Boolean flag = doorDeviceService.addDoorDevice(dto);
|
||||
|
||||
return flag ? Result.success(true) : Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION);
|
||||
}
|
||||
|
||||
/**
|
||||
* 门禁信息修改
|
||||
*
|
||||
* @param dto 入参
|
||||
* @return Boolean
|
||||
*/
|
||||
@PostMapping("/updateDoorDevice")
|
||||
public Result updateDoorDevice(@RequestBody QueryDto dto) {
|
||||
log.info("E8接口 门禁信息修改 入参={}", dto);
|
||||
if (ObjectUtils.isEmpty(dto)) {
|
||||
return Result.fail(ErrorType.PARAMM_NULL);
|
||||
}
|
||||
|
||||
Boolean flag = doorDeviceService.updateDoorDevice(dto);
|
||||
|
||||
return flag ? Result.success(true) : Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除门禁信息
|
||||
*
|
||||
* @param dto 入参
|
||||
* @return Boolean
|
||||
*/
|
||||
@PostMapping("/deleteDoorDevice")
|
||||
public Result deleteDoorDevice(@RequestBody QueryDto dto) {
|
||||
log.info("E8接口 删除门禁信息 入参={}", dto);
|
||||
if (ObjectUtils.isEmpty(dto)) {
|
||||
return Result.fail(ErrorType.PARAMM_NULL);
|
||||
}
|
||||
|
||||
Boolean flag = doorDeviceService.deleteDoorDevice(dto);
|
||||
|
||||
return flag ? Result.success(true) : Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION);
|
||||
}
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,126 @@
|
||||
package by.dimp.web.controller.E8.base;
|
||||
|
||||
import by.dimp.common.core.domain.ErrorType;
|
||||
import by.dimp.common.core.domain.Result;
|
||||
import by.dimp.web.model.entity.E8.LiftInfo;
|
||||
import by.dimp.web.service.E8Service.base.LiftService;
|
||||
import by.dimp.web.model.domain.E8.general.QueryDto;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @author zcxlsm
|
||||
* @title: LiftController
|
||||
* @date 2025/5/10 17:56
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/e8/liftService")
|
||||
public class LiftController {
|
||||
|
||||
@Resource
|
||||
private LiftService liftService;
|
||||
|
||||
// 所有接口入参暂定QueryDto 后续根据业务调整
|
||||
|
||||
/**
|
||||
* 电梯信息分页查询
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/getPageList")
|
||||
public Result getPageList(QueryDto dto) {
|
||||
log.info("E8接口 电梯信息分页查询 入参={}", dto);
|
||||
if (ObjectUtils.isEmpty(dto)) {
|
||||
return Result.fail(ErrorType.PARAMM_NULL);
|
||||
}
|
||||
|
||||
IPage<LiftInfo> page = liftService.getPageList(dto);
|
||||
if (page == null) {
|
||||
return Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION);
|
||||
} else {
|
||||
return Result.success(page);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询电梯楼层
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/getLiftFloor")
|
||||
public Result getLiftFloor(QueryDto dto) {
|
||||
log.info("E8接口 查询电梯楼层 入参={}", dto);
|
||||
if (ObjectUtils.isEmpty(dto)) {
|
||||
return Result.fail(ErrorType.PARAMM_NULL);
|
||||
}
|
||||
|
||||
LiftInfo liftInfo = liftService.getLiftFloor(dto);
|
||||
if (liftInfo == null) {
|
||||
return Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION);
|
||||
} else {
|
||||
return Result.success(liftInfo);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加电梯
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/addLift")
|
||||
public Result addLift(QueryDto dto) {
|
||||
log.info("E8接口 添加电梯 入参={}", dto);
|
||||
if (ObjectUtils.isEmpty(dto)) {
|
||||
return Result.fail(ErrorType.PARAMM_NULL);
|
||||
}
|
||||
|
||||
Boolean flag = liftService.addLift(dto);
|
||||
|
||||
return flag ? Result.success(true) : Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改电梯信息
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/updateLift")
|
||||
public Result updateLift(QueryDto dto) {
|
||||
log.info("E8接口 修改电梯信息 入参={}", dto);
|
||||
if (ObjectUtils.isEmpty(dto)) {
|
||||
return Result.fail(ErrorType.PARAMM_NULL);
|
||||
}
|
||||
|
||||
Boolean flag = liftService.updateLift(dto);
|
||||
|
||||
return flag ? Result.success(true) : Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除电梯信息
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/deleteLift")
|
||||
public Result deleteLift(QueryDto dto) {
|
||||
log.info("E8接口 删除电梯信息 入参={}", dto);
|
||||
if (ObjectUtils.isEmpty(dto)) {
|
||||
return Result.fail(ErrorType.PARAMM_NULL);
|
||||
}
|
||||
|
||||
Boolean flag = liftService.deleteLift(dto);
|
||||
|
||||
return flag ? Result.success(true) : Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION);
|
||||
}
|
||||
}
|
@@ -0,0 +1,88 @@
|
||||
package by.dimp.web.controller.E8.service;
|
||||
|
||||
import by.dimp.common.core.domain.ErrorType;
|
||||
import by.dimp.common.core.domain.Result;
|
||||
import by.dimp.web.model.entity.E8.AccessRecordInfo;
|
||||
import by.dimp.web.model.domain.E8.general.QueryDto;
|
||||
import by.dimp.web.service.E8Service.service.EntranceGuardService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
/**
|
||||
* @author zcxlsm
|
||||
* @title: EntranceGuardController
|
||||
* @date 2025/5/11 20:35
|
||||
*/
|
||||
@Slf4j
|
||||
@Resource
|
||||
@RequestMapping("/e8/entranceGuard")
|
||||
public class EntranceGuardController {
|
||||
|
||||
@Resource
|
||||
private EntranceGuardService entranceGuardService;
|
||||
|
||||
// 所有接口入参暂定QueryDto 后续根据业务调整
|
||||
|
||||
/**
|
||||
* 远程开门
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/remoteOpenDoor")
|
||||
public Result remoteOpenDoor(QueryDto dto) {
|
||||
log.info("E8接口 远程开门 入参={}", dto);
|
||||
if (ObjectUtils.isEmpty(dto)) {
|
||||
return Result.fail(ErrorType.PARAMM_NULL);
|
||||
}
|
||||
|
||||
Boolean flag = entranceGuardService.remoteOpenDoor(dto);
|
||||
|
||||
return flag ? Result.success(true) : Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取通行记录分页列表
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/getPageAccessRecordList")
|
||||
public Result getPageAccessRecordList(QueryDto dto) {
|
||||
log.info("E8接口 获取通行记录分页列表 入参={}", dto);
|
||||
if (ObjectUtils.isEmpty(dto)) {
|
||||
return Result.fail(ErrorType.PARAMM_NULL);
|
||||
}
|
||||
|
||||
IPage<AccessRecordInfo> page = entranceGuardService.getPageAccessRecordList(dto);
|
||||
|
||||
if (page == null) {
|
||||
return Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION);
|
||||
} else {
|
||||
return Result.success(page);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员授权
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/addAccessControl")
|
||||
public Result addAccessControl(QueryDto dto) {
|
||||
log.info("E8接口 人员授权 入参={}", dto);
|
||||
if (ObjectUtils.isEmpty(dto)) {
|
||||
return Result.fail(ErrorType.PARAMM_NULL);
|
||||
}
|
||||
|
||||
Boolean flag = entranceGuardService.addAccessControl(dto);
|
||||
|
||||
return flag ? Result.success(true) : Result.fail(ErrorType.CALL_THIRD_SERVICE_EXCEPTION);
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,42 @@
|
||||
package by.dimp.web.controller.admin;
|
||||
|
||||
import by.dimp.common.core.domain.Result;
|
||||
import by.dimp.web.model.domain.attendanceStatistics.req.AttendanceStatisticsQueryReq;
|
||||
import by.dimp.web.model.domain.attendanceStatistics.res.AttendanceStatisticsRes;
|
||||
import by.dimp.web.service.admin.ITbAttendanceStatisticsService;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/report")
|
||||
@Slf4j
|
||||
public class TbAttendanceStatisticsController {
|
||||
|
||||
|
||||
@Resource
|
||||
private ITbAttendanceStatisticsService attendanceStatisticsService;
|
||||
|
||||
/**
|
||||
* 分页查询考勤统计数据
|
||||
*/
|
||||
|
||||
@GetMapping("/pageQuery")
|
||||
public Result<AttendanceStatisticsRes> list(@RequestBody AttendanceStatisticsQueryReq query) {
|
||||
log.info("分页查询考勤统计数据,入参:{}", query);
|
||||
AttendanceStatisticsRes res = attendanceStatisticsService.pageQuery(query);
|
||||
return Result.success(res);
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据分析与统计报表的导出功能
|
||||
*/
|
||||
@GetMapping("/export")
|
||||
public Result<Boolean> export() {
|
||||
int result = attendanceStatisticsService.export();
|
||||
return Result.success(result > 0);
|
||||
}
|
||||
}
|
@@ -0,0 +1,79 @@
|
||||
package by.dimp.web.controller.admin;
|
||||
|
||||
import by.dimp.common.core.base.BaseController;
|
||||
import by.dimp.common.core.domain.Result;
|
||||
import by.dimp.common.core.domain.UserInfo;
|
||||
import by.dimp.web.model.domain.ceremonialServe.req.CeremonialServePageQueryReq;
|
||||
import by.dimp.web.model.domain.ceremonialServe.req.CeremonialServeReq;
|
||||
import by.dimp.web.model.domain.ceremonialServe.res.CeremonialServeRes;
|
||||
import by.dimp.web.service.admin.ITbCeremonialServeService;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 会议礼仪服务预订
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/ceremonialService")
|
||||
@Slf4j
|
||||
public class TbCeremonialServeController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private ITbCeremonialServeService ceremonialService;
|
||||
|
||||
/**
|
||||
* 分页查询礼仪服务的预订信息
|
||||
* @param pageQueryReq
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/pageQuery")
|
||||
public Result<IPage<CeremonialServeRes>> getInformation(CeremonialServePageQueryReq pageQueryReq) {
|
||||
log.info("查询礼仪服务基本信息,传入的查询条件为:{}", JSONObject.toJSONString(pageQueryReq));
|
||||
IPage<CeremonialServeRes> page = ceremonialService.pageQuery(pageQueryReq);
|
||||
return Result.success(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增礼仪服务的预订
|
||||
* @param ceremonialServeReq
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/addCeremonialServe")
|
||||
public Result<Boolean> addCeremonialServe(@RequestBody CeremonialServeReq ceremonialServeReq) {
|
||||
log.debug("新增礼仪服务的预订,入参{}", JSONObject.toJSONString(ceremonialService));
|
||||
UserInfo userInfo = getUserInfo();
|
||||
ceremonialServeReq.setCreateById(userInfo.getId());
|
||||
ceremonialServeReq.setCreateBy(userInfo.getUserName());
|
||||
ceremonialServeReq.setCreateTime(LocalDateTime.now());
|
||||
int result = ceremonialService.addCeremonialServe(ceremonialServeReq);
|
||||
return Result.success(result > 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id删除礼仪服务的预订
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping("/deleteCeremonialServe/{id}")
|
||||
public Result<Boolean> deleteCeremonialServe(@PathVariable Integer id) {
|
||||
log.debug("删除礼仪服务的预订,入参{}", id);
|
||||
int result = ceremonialService.deleteCeremonialServe(id);
|
||||
return Result.success(result > 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 服务确定
|
||||
*/
|
||||
@PostMapping("/confirm")
|
||||
public Result<Boolean> confirm(@RequestBody CeremonialServeReq ceremonialServeReq){
|
||||
log.debug("服务确定,入参{}",ceremonialServeReq);
|
||||
int result = ceremonialService.confirm(ceremonialServeReq);
|
||||
return Result.success(result > 0);
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,104 @@
|
||||
package by.dimp.web.controller.admin;
|
||||
|
||||
import by.dimp.common.core.base.BaseController;
|
||||
import by.dimp.common.core.domain.Result;
|
||||
import by.dimp.common.core.domain.UserInfo;
|
||||
import by.dimp.web.model.domain.cleaningIndicators.req.SaveAndModifyCleaningIndicators;
|
||||
import by.dimp.web.model.domain.cleaningIndicators.req.QueryCleaningIndicatorsReq;
|
||||
import by.dimp.web.model.domain.cleaningIndicators.resp.TbCleaningIndicatorsResp;
|
||||
import by.dimp.web.service.admin.ITbCleaningIndicatorsService;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author lxj
|
||||
* @since 2025-04-28
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/tbCleaningIndicators")
|
||||
@Slf4j
|
||||
public class TbCleaningIndicatorsController extends BaseController {
|
||||
@Resource
|
||||
private ITbCleaningIndicatorsService iTbCleaningIndicatorsService;
|
||||
|
||||
/**
|
||||
* 新增保洁质量
|
||||
*
|
||||
* @param req 新增保洁质量对象
|
||||
* @return 添加成功返回true
|
||||
*/
|
||||
@PostMapping("/addCleaningIndicators")
|
||||
public Result<Boolean> addCleaningIndicators(@RequestBody SaveAndModifyCleaningIndicators req) {
|
||||
log.info("新增保洁标准,入参={}", JSONObject.toJSONString(req));
|
||||
UserInfo userInfo = getUserInfo();
|
||||
req.setCreateEmpId(userInfo.getId() + "");
|
||||
req.setCreateEmpName(userInfo.getUserName());
|
||||
Boolean result = iTbCleaningIndicatorsService.addCleaningIndicators(req);
|
||||
return Result.success(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保洁质量信息
|
||||
*
|
||||
* @param req 保洁质量参数
|
||||
* @return 更新成功返回true
|
||||
*/
|
||||
@PostMapping("/modifyCleaningIndicators")
|
||||
public Result<Boolean> modifyCleaningIndicators(@RequestBody SaveAndModifyCleaningIndicators req) {
|
||||
log.info("修改保洁标准,入参={}", JSONObject.toJSONString(req));
|
||||
UserInfo userInfo = getUserInfo();
|
||||
req.setModifyEmpId(userInfo.getId() + "");
|
||||
req.setModifyEmpName(userInfo.getUserName());
|
||||
Boolean result = iTbCleaningIndicatorsService.modifyCleaningIndicators(req);
|
||||
return Result.success(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除保洁质量
|
||||
*
|
||||
* @param req 保洁质量参数
|
||||
* @return 删除成功返回true
|
||||
*/
|
||||
@PostMapping("/deleteCleaningIndicators")
|
||||
public Result<Boolean> deleteCleaningIndicators(@RequestBody SaveAndModifyCleaningIndicators req) {
|
||||
log.info("删除保洁标准,入参={}", JSONObject.toJSONString(req));
|
||||
UserInfo userInfo = getUserInfo();
|
||||
req.setModifyEmpId(userInfo.getId() + "");
|
||||
req.setModifyEmpName(userInfo.getUserName());
|
||||
Boolean result = iTbCleaningIndicatorsService.deleteCleaningIndicators(req.getId());
|
||||
return Result.success(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询保洁质量
|
||||
*
|
||||
* @param req 查询参数
|
||||
* @return 返回保洁质量列表
|
||||
*/
|
||||
@PostMapping("/queryCleaningIndicators")
|
||||
public Result<IPage<TbCleaningIndicatorsResp>> queryCleaningIndicators(@RequestBody QueryCleaningIndicatorsReq req) {
|
||||
log.info("查询用户,入参={}", JSONObject.toJSONString(req));
|
||||
IPage<TbCleaningIndicatorsResp> result = iTbCleaningIndicatorsService.queryCleaningIndicatorsOpForPage(req);
|
||||
return Result.success(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询保洁质量
|
||||
*
|
||||
* @param req 保洁质量请求参数
|
||||
* @return 返回保洁质量信息
|
||||
*/
|
||||
@PostMapping("/queryCleaningIndicatorsById")
|
||||
public Result<TbCleaningIndicatorsResp> queryCleaningQIndicatorsById(@RequestBody QueryCleaningIndicatorsReq req) {
|
||||
log.info("根据id查询保洁标准,入参={}", req);
|
||||
TbCleaningIndicatorsResp result = iTbCleaningIndicatorsService.queryCleaningIndicatorsById(req.getId());
|
||||
return Result.success(result);
|
||||
}
|
||||
}
|
@@ -0,0 +1,103 @@
|
||||
package by.dimp.web.controller.admin;
|
||||
|
||||
import by.dimp.common.core.base.BaseController;
|
||||
import by.dimp.common.core.domain.Result;
|
||||
import by.dimp.common.core.domain.UserInfo;
|
||||
import by.dimp.web.model.entity.TbConference;
|
||||
import by.dimp.web.model.domain.conference.req.ConferencePageQueryReq;
|
||||
import by.dimp.web.model.domain.conference.req.ConferenceReq;
|
||||
import by.dimp.web.model.domain.conference.resp.ConferenceRes;
|
||||
import by.dimp.web.service.admin.ITbConferenceService;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/conference/basicInformation")
|
||||
@Slf4j
|
||||
|
||||
/**
|
||||
* 会议室基本信息
|
||||
*/
|
||||
public class TbConferenceController extends BaseController {
|
||||
@Autowired
|
||||
private ITbConferenceService conferenceService;
|
||||
|
||||
/**
|
||||
* 分页查询会议室基本信息
|
||||
*
|
||||
* @param queryDTO
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/pageQuery")
|
||||
public Result<IPage<ConferenceRes>> getInformation(ConferencePageQueryReq queryDTO) {
|
||||
log.info("查询会议室基本信息,传入的查询条件为:{}", JSONObject.toJSONString(queryDTO));
|
||||
IPage<ConferenceRes> page = conferenceService.pageQuery(queryDTO);
|
||||
return Result.success(page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增会议室基本信息
|
||||
*
|
||||
* @param conferenceReq
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/addConference")
|
||||
public Result<Boolean> addInformation(@RequestBody ConferenceReq conferenceReq) {
|
||||
log.debug("新增会议室基本信息,传入的会议室信息为:{}", JSONObject.toJSONString(conferenceReq));
|
||||
UserInfo userInfo = getUserInfo();
|
||||
conferenceReq.setCreateBy(userInfo.getUserName());
|
||||
conferenceReq.setCreateById(userInfo.getId());
|
||||
int result = conferenceService.addInformation(conferenceReq);
|
||||
return Result.success(result > 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID回显会议室基本信息
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getById/{id}")
|
||||
public Result<TbConference> getInformation(@PathVariable(value = "id") Integer id) {
|
||||
log.debug("根据ID回显数据,传入的ID为:{}", JSONObject.toJSONString(id));
|
||||
TbConference conference = conferenceService.getInformation(id);
|
||||
return Result.success(conference);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID修改会议室基本信息
|
||||
*
|
||||
* @param conferenceReq
|
||||
* @return
|
||||
*/
|
||||
@PutMapping("/updateById")
|
||||
public Result<Boolean> updateInformation(@RequestBody ConferenceReq conferenceReq) {
|
||||
UserInfo userInfo = getUserInfo();
|
||||
conferenceReq.setUpdateById(userInfo.getId());
|
||||
conferenceReq.setUpdateBy(userInfo.getUserName());
|
||||
conferenceReq.setUpdateTime(LocalDateTime.now());
|
||||
log.debug("修改会议室基本信息,传入的会议室信息为:{}", JSONObject.toJSONString(conferenceReq));
|
||||
int result = conferenceService.updateInformation(conferenceReq);
|
||||
return Result.success(result > 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除会议室基本信息
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping("/deleteById/{id}")
|
||||
public Result<Boolean> deleteInformation(@PathVariable(value = "id") Integer id) {
|
||||
log.debug("删除会议室的基本信息,传入的ID为:{}", JSONObject.toJSONString(id));
|
||||
Boolean result = conferenceService.deleteInformation(id);
|
||||
//todo 接口不能正确的响应,需要修改
|
||||
return Result.success(result);
|
||||
}
|
||||
}
|
@@ -0,0 +1,8 @@
|
||||
package by.dimp.web.controller.admin;
|
||||
|
||||
/**
|
||||
* 参会人员出入管理
|
||||
*
|
||||
*/
|
||||
public class TbPersonnelAccessController {
|
||||
}
|
@@ -0,0 +1,21 @@
|
||||
package by.dimp.web.controller.admin;
|
||||
|
||||
import by.dimp.common.core.domain.Result;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/report")
|
||||
@Slf4j
|
||||
public class TbReportController {
|
||||
|
||||
/**
|
||||
* 数据分析与统计报表的读取接口
|
||||
*/
|
||||
@GetMapping("/read")
|
||||
public Result read() {
|
||||
return null;
|
||||
}
|
||||
}
|
@@ -0,0 +1,137 @@
|
||||
package by.dimp.web.controller.admin;
|
||||
|
||||
import by.dimp.common.core.domain.Result;
|
||||
import by.dimp.common.core.domain.UserInfo;
|
||||
import by.dimp.web.model.domain.roomBooking.req.RoomBookingPageQueryReq;
|
||||
import by.dimp.web.model.domain.roomBooking.req.RoomBookingReq;
|
||||
import by.dimp.web.model.domain.roomBooking.resp.RoomBookingRes;
|
||||
import by.dimp.web.service.admin.ITbRoomBookingService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import by.dimp.common.core.base.BaseController;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/roomBooking")
|
||||
@Slf4j
|
||||
/**
|
||||
* 会议室预订
|
||||
*/
|
||||
public class TbRoomBookingController extends BaseController{
|
||||
@Autowired
|
||||
private ITbRoomBookingService roomBookingService;
|
||||
|
||||
/**
|
||||
* 未审核状态为0
|
||||
*/
|
||||
private static final Integer NOTREVIEWD = 0;
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询预订记录
|
||||
*
|
||||
* @param pageQueryReq
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/queryForPage")
|
||||
public Result<IPage<RoomBookingRes>> queryForPage(RoomBookingPageQueryReq pageQueryReq) {
|
||||
log.info("查询会议室预订记录,入参:{}", pageQueryReq);
|
||||
IPage<RoomBookingRes> page = roomBookingService.queryForPage(pageQueryReq);
|
||||
return Result.success(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增预订记录
|
||||
*
|
||||
* @param roomBookingReq
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/addCeremonial")
|
||||
public Result<Boolean> addCeremonial(@RequestBody RoomBookingReq roomBookingReq) {
|
||||
log.info("新增会议室预订记录,入参:{}", roomBookingReq);
|
||||
UserInfo userInfo = getUserInfo();
|
||||
//会议室创建人id
|
||||
roomBookingReq.setCreateById(userInfo.getId());
|
||||
roomBookingReq.setCreateBy(userInfo.getUserName());
|
||||
roomBookingReq.setCreateTime(LocalDateTime.now());
|
||||
//默认审核状态为未审核0
|
||||
roomBookingReq.setReviewStatus(NOTREVIEWD);
|
||||
|
||||
|
||||
|
||||
int result = roomBookingService.addCeremonial(roomBookingReq);
|
||||
return Result.success(result > 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核会议室预订
|
||||
*/
|
||||
@PostMapping("/reviewCeremonial")
|
||||
public Result<Boolean> reviewCeremonial(@RequestBody RoomBookingReq roomBookingReq) {
|
||||
log.info("审核会议室预订记录,入参:{}", roomBookingReq);
|
||||
UserInfo userInfo = getUserInfo();
|
||||
//审核人id
|
||||
roomBookingReq.setApprover(userInfo.getUserName());
|
||||
roomBookingReq.setApproverTime(LocalDateTime.now());
|
||||
roomBookingReq.setCreateById(userInfo.getId());
|
||||
roomBookingReq.setCreateBy(userInfo.getUserName());
|
||||
roomBookingReq.setCreateTime(LocalDateTime.now());
|
||||
int result = roomBookingService.reviewCeremonial(roomBookingReq);
|
||||
return Result.success(result > 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询会议室预订记录详情
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/queryById/{id}")
|
||||
public Result<RoomBookingRes> queryById(@PathVariable Integer id) {
|
||||
log.info("查询会议室预订记录详情,入参:{}", id);
|
||||
RoomBookingRes roomBookingRes = roomBookingService.queryById(id);
|
||||
return Result.success(roomBookingRes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除会议室预订记录
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/deleteCeremonial/{id}")
|
||||
public Result<Boolean> deleteCeremonial(@PathVariable Integer id) {
|
||||
log.info("删除会议室预订记录,入参:{}", id);
|
||||
Boolean result = roomBookingService.deleteById(id);
|
||||
return Result.success(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改会议室预订记录
|
||||
*/
|
||||
@PutMapping("/updateCeremonialById")
|
||||
public Result<Boolean> updateCeremonialById(@RequestBody RoomBookingReq roomBookingReq) {
|
||||
log.info("修改会议室预订记录,入参:{}", roomBookingReq);
|
||||
UserInfo userInfo = getUserInfo();
|
||||
roomBookingReq.setUpdateById(userInfo.getId());
|
||||
roomBookingReq.setUpdateBy(userInfo.getUserName());
|
||||
roomBookingReq.setUpdateTime(LocalDateTime.now());
|
||||
int result = roomBookingService.updateCeremonialById(roomBookingReq);
|
||||
return Result.success(result > 0);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增会议预定结束后的评价
|
||||
*/
|
||||
@PostMapping("/addComment")
|
||||
public Result<Boolean> addComment(@RequestBody RoomBookingReq roomBookingReq) {
|
||||
log.debug("新增会议室预订后的评价{}", roomBookingReq);
|
||||
int result = roomBookingService.addComment(roomBookingReq);
|
||||
return Result.success(result > 0);
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,54 @@
|
||||
package by.dimp.web.controller.admin;
|
||||
|
||||
import by.dimp.common.core.base.BaseController;
|
||||
import by.dimp.common.core.domain.Result;
|
||||
import by.dimp.common.core.domain.UserInfo;
|
||||
import by.dimp.web.model.domain.serviceClassification.req.ServiceClassificationReq;
|
||||
import by.dimp.web.model.domain.serviceClassification.req.TbServiceClassificationPageQuery;
|
||||
import by.dimp.web.model.entity.TbServiceClassification;
|
||||
import by.dimp.web.service.admin.ITbServiceClassificationService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/serviceClassification")
|
||||
@Slf4j
|
||||
/**
|
||||
* 服务分类管理
|
||||
*/
|
||||
public class TbServiceClassificationController extends BaseController {
|
||||
@Autowired
|
||||
private ITbServiceClassificationService tbServiceClassificationService;
|
||||
|
||||
/**
|
||||
* 分页查询所有分类
|
||||
* @param pageQuery
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/queryForPage")
|
||||
public Result<IPage<TbServiceClassification>> queryForPage(TbServiceClassificationPageQuery pageQuery) {
|
||||
log.info("查询服务分类分页数据,入参: {}", pageQuery);
|
||||
IPage<TbServiceClassification> page = tbServiceClassificationService.queryForPage(pageQuery);
|
||||
return Result.success(page);
|
||||
}
|
||||
|
||||
@PostMapping("/addServiceClassification")
|
||||
public Result<Boolean> addServiceClassification(@RequestBody ServiceClassificationReq serviceClassificationReq) {
|
||||
log.info("新增服务分类,入参: {}", serviceClassificationReq);
|
||||
UserInfo userInfo = getUserInfo();
|
||||
|
||||
serviceClassificationReq.setCreateById(userInfo.getId());
|
||||
serviceClassificationReq.setCreateBy(userInfo.getUserName());
|
||||
serviceClassificationReq.setCreateTime(LocalDateTime.now());
|
||||
|
||||
|
||||
int result = tbServiceClassificationService.addServiceClassification(serviceClassificationReq);
|
||||
return Result.success(result > 0);
|
||||
}
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,99 @@
|
||||
package by.dimp.web.controller.admin;
|
||||
|
||||
import by.dimp.common.core.base.BaseController;
|
||||
import by.dimp.common.core.domain.Result;
|
||||
import by.dimp.common.core.domain.UserInfo;
|
||||
import by.dimp.web.model.domain.visitorManagement.req.VisitorManagementReq;
|
||||
import by.dimp.web.model.domain.visitorManagement.req.VistorManagementPageQuery;
|
||||
import by.dimp.web.model.entity.TbVisitorManagement;
|
||||
import by.dimp.web.service.admin.ITbVisitorInvitationsService;
|
||||
import by.dimp.web.service.admin.impl.TbVisitorInvitationsServiceImpl;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 访客邀约管理
|
||||
*/
|
||||
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/admin/roomBooking")
|
||||
@Slf4j
|
||||
public class TbVisitorInvitationsController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private ITbVisitorInvitationsService tbVisitorManagementService;
|
||||
|
||||
/**
|
||||
* 分页查询访客管理列表
|
||||
* @param pageQuery
|
||||
* @return
|
||||
* Visitor
|
||||
*/
|
||||
@GetMapping("/queryForInviting")
|
||||
public Result<IPage<TbVisitorManagement>> queryForPage(VistorManagementPageQuery pageQuery) {
|
||||
log.info("查询访客邀约列表,入参: {}", pageQuery);
|
||||
IPage<TbVisitorManagement> page = tbVisitorManagementService.queryForPage(pageQuery);
|
||||
return Result.success(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询待审核访客列表
|
||||
* @param pageQuery
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/queryForWaiting")
|
||||
public Result<IPage<TbVisitorManagement>> queryForWaitingPage(VistorManagementPageQuery pageQuery) {
|
||||
log.info("查询访客管理列表,入参: {}", pageQuery);
|
||||
IPage<TbVisitorManagement> page = tbVisitorManagementService.queryForWaitingPage(pageQuery);
|
||||
return Result.success(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增邀约访客
|
||||
* @param visitorManagementReq
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/addVisitor")
|
||||
public Result<Boolean> addVisitor(@RequestBody VisitorManagementReq visitorManagementReq) {
|
||||
log.info("新增访客,入参: {}", visitorManagementReq);
|
||||
UserInfo userInfo = getUserInfo();
|
||||
visitorManagementReq.setCreateTime(LocalDateTime.now());
|
||||
visitorManagementReq.setCreateById(userInfo.getId());
|
||||
visitorManagementReq.setCreateBy(userInfo.getUserName());
|
||||
int result = tbVisitorManagementService.addVisitor(visitorManagementReq);
|
||||
return Result.success(result > 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看访客邀约详情
|
||||
*/
|
||||
@GetMapping("/{id}")
|
||||
public Result<TbVisitorManagement> getVisitor(@PathVariable("id") Integer id) {
|
||||
log.info("查看访客详情,入参: {}", id);
|
||||
TbVisitorManagement visitor = tbVisitorManagementService.getVisitorById(id);
|
||||
return Result.success(visitor);
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核邀约访客
|
||||
* @param visitorManagementReq
|
||||
* @return
|
||||
*/
|
||||
@PutMapping("/auditVisitor")
|
||||
public Result<Boolean> auditVisitor(@RequestBody VisitorManagementReq visitorManagementReq) {
|
||||
log.info("审核访客,入参: {}", visitorManagementReq);
|
||||
UserInfo userInfo = getUserInfo();
|
||||
visitorManagementReq.setUpdateTime(LocalDateTime.now());
|
||||
visitorManagementReq.setUpdateById(userInfo.getId());
|
||||
visitorManagementReq.setUpdateBy(userInfo.getUserName());
|
||||
int result = tbVisitorManagementService.auditVisitor(visitorManagementReq);
|
||||
return Result.success(result > 0);
|
||||
}
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,32 @@
|
||||
package by.dimp.web.controller.admin;
|
||||
|
||||
|
||||
import by.dimp.web.service.uniview.model.AlarmReportData;
|
||||
import by.dimp.web.service.uniview.model.UniViewResult;
|
||||
import by.dimp.web.service.uniview.service.VideoAlarmService;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
public class VideoAlarmController {
|
||||
|
||||
@Autowired
|
||||
private VideoAlarmService videoAlarmService;
|
||||
|
||||
@PostMapping("/custom/router")
|
||||
public UniViewResult<?> alarm(@RequestBody String data) {
|
||||
// log.info("收到宇视告警数据:{}", data);
|
||||
AlarmReportData alarmReportData = JSONObject.parseObject(data, AlarmReportData.class);
|
||||
videoAlarmService.handleAlarmData(alarmReportData);
|
||||
return UniViewResult.success(null);
|
||||
}
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,269 @@
|
||||
//package by.dimp.web.controller;
|
||||
//
|
||||
///**
|
||||
// * @Author: Scoot
|
||||
// * @Date: 2023/3/16 15:52
|
||||
// * @Description: 微信支付控制器
|
||||
// */
|
||||
//
|
||||
//import cn.hutool.core.date.DatePattern;
|
||||
//import cn.hutool.core.date.DateUtil;
|
||||
//import cn.hutool.core.io.file.FileWriter;
|
||||
//import cn.hutool.core.util.StrUtil;
|
||||
//import cn.hutool.http.ContentType;
|
||||
//import cn.hutool.http.HttpStatus;
|
||||
//import cn.hutool.json.JSONArray;
|
||||
//import cn.hutool.json.JSONObject;
|
||||
//import cn.hutool.json.JSONUtil;
|
||||
//import com.ijpay.core.IJPayHttpResponse;
|
||||
//import com.ijpay.core.enums.RequestMethodEnum;
|
||||
//import com.ijpay.core.kit.AesUtil;
|
||||
//import com.ijpay.core.kit.HttpKit;
|
||||
//import com.ijpay.core.kit.PayKit;
|
||||
//import com.ijpay.core.kit.WxPayKit;
|
||||
//import com.ijpay.core.utils.DateTimeZoneUtil;
|
||||
//import com.ijpay.wxpay.WxPayApi;
|
||||
//import com.ijpay.wxpay.enums.WxDomainEnum;
|
||||
//import com.ijpay.wxpay.enums.v3.BasePayApiEnum;
|
||||
//import com.ijpay.wxpay.enums.v3.OtherApiEnum;
|
||||
//import com.ijpay.wxpay.model.v3.Amount;
|
||||
//import com.ijpay.wxpay.model.v3.Payer;
|
||||
//import com.ijpay.wxpay.model.v3.UnifiedOrderModel;
|
||||
//import jakarta.servlet.http.HttpServletRequest;
|
||||
//import jakarta.servlet.http.HttpServletResponse;
|
||||
//import lombok.extern.slf4j.Slf4j;
|
||||
//import org.springframework.beans.factory.annotation.Value;
|
||||
//import org.springframework.context.annotation.Scope;
|
||||
//import org.springframework.web.bind.annotation.RequestMapping;
|
||||
//import org.springframework.web.bind.annotation.RequestParam;
|
||||
//import org.springframework.web.bind.annotation.ResponseBody;
|
||||
//import org.springframework.web.bind.annotation.RestController;
|
||||
//
|
||||
//import java.io.ByteArrayInputStream;
|
||||
//import java.nio.charset.StandardCharsets;
|
||||
//import java.security.cert.X509Certificate;
|
||||
//import java.util.HashMap;
|
||||
//import java.util.Map;
|
||||
//
|
||||
//@Slf4j
|
||||
//@RestController
|
||||
//@RequestMapping("/api/wx/pay/v1")
|
||||
//@Scope("prototype")
|
||||
//
|
||||
//public class WxPayApiContoller {
|
||||
// /**微信小程序appid**/
|
||||
// @Value("${wechat.ma.appId}")
|
||||
// String appid;
|
||||
//
|
||||
// /**微信小程序secretId**/
|
||||
// @Value("${wechat.ma.secret}")
|
||||
// String secret;
|
||||
//
|
||||
// /**商户号**/
|
||||
// @Value("${wechat.ma.mchid}")
|
||||
// String mchid;
|
||||
//
|
||||
// /**商户密钥**/
|
||||
// @Value("${wechat.ma.mchKey}")
|
||||
// String mchKey;
|
||||
//
|
||||
// /**回调地址**/
|
||||
// @Value("${wechat.ma.notifyUrl}")
|
||||
// String notifyUrl;
|
||||
//
|
||||
// /**证书地址**/
|
||||
// @Value("${wechat.ma.certPath}")
|
||||
// String certPath;
|
||||
// /**证书密钥地址**/
|
||||
// @Value("${wechat.ma.certKeyPath}")
|
||||
// String certKeyPath;
|
||||
// /**微信平台证书**/
|
||||
// @Value("${wechat.ma.platFormPath}")
|
||||
// String platFormPath;
|
||||
//
|
||||
// /**
|
||||
// * 微信支付
|
||||
// * @param openId 用户openId
|
||||
// * @return
|
||||
// */
|
||||
// @RequestMapping("/jsApiPay")
|
||||
// @ResponseBody
|
||||
// public JsonResult jsApiPay(@RequestParam(value = "openId", required = false, defaultValue = "o-_-itxuXeGW3O1cxJ7FXNmq8Wf8") String openId) {
|
||||
// try {
|
||||
// String timeExpire = DateTimeZoneUtil.dateToTimeZone(System.currentTimeMillis() + 1000 * 60 * 3);
|
||||
// UnifiedOrderModel unifiedOrderModel = new UnifiedOrderModel()
|
||||
// // APPID
|
||||
// .setAppid(appid)
|
||||
// // 商户号
|
||||
// .setMchid(mchid)
|
||||
// .setDescription("IJPay 让支付触手可及")
|
||||
// .setOut_trade_no(PayKit.generateStr())
|
||||
// .setTime_expire(timeExpire)
|
||||
// .setAttach("微信系开发脚手架 https://gitee.com/javen205/TNWX")
|
||||
// .setNotify_url(notifyUrl)
|
||||
// .setAmount(new Amount().setTotal(1))
|
||||
// .setPayer(new Payer().setOpenid(openId));
|
||||
//
|
||||
// log.info("统一下单参数 {}", JSONUtil.toJsonStr(unifiedOrderModel));
|
||||
// IJPayHttpResponse response = WxPayApi.v3(
|
||||
// RequestMethodEnum.POST,
|
||||
// WxDomainEnum.CHINA.toString(),
|
||||
// BasePayApiEnum.JS_API_PAY.toString(),
|
||||
// mchid,
|
||||
// getSerialNumber(),
|
||||
// null,
|
||||
// certKeyPath,
|
||||
// JSONUtil.toJsonStr(unifiedOrderModel)
|
||||
// );
|
||||
// log.info("统一下单响应 {}", response);
|
||||
// // 根据证书序列号查询对应的证书来验证签名结果
|
||||
// boolean verifySignature = WxPayKit.verifySignature(response, platFormPath);
|
||||
// log.info("verifySignature: {}", verifySignature);
|
||||
// if (response.getStatus() == HttpStatus.HTTP_OK && verifySignature) {
|
||||
// String body = response.getBody();
|
||||
// JSONObject jsonObject = JSONUtil.parseObj(body);
|
||||
// String prepayId = jsonObject.getStr("prepay_id");
|
||||
// Map<String, String> map = WxPayKit.jsApiCreateSign(appid, prepayId, certKeyPath);
|
||||
// log.info("唤起支付参数:{}", map);
|
||||
// return JsonResult.success("获取成功",JSONUtil.toJsonStr(map));
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// return JsonResult.error("唤起失败");
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 微信支付回调
|
||||
// * @param request
|
||||
// * @param response
|
||||
// */
|
||||
// @RequestMapping(value = "/payNotify", method = {org.springframework.web.bind.annotation.RequestMethod.POST, org.springframework.web.bind.annotation.RequestMethod.GET})
|
||||
// public void payNotify(HttpServletRequest request, HttpServletResponse response) {
|
||||
// Map<String, String> map = new HashMap<>(12);
|
||||
// try {
|
||||
// String timestamp = request.getHeader("Wechatpay-Timestamp");
|
||||
// String nonce = request.getHeader("Wechatpay-Nonce");
|
||||
// String serialNo = request.getHeader("Wechatpay-Serial");
|
||||
// String signature = request.getHeader("Wechatpay-Signature");
|
||||
//
|
||||
// log.info("timestamp:{} nonce:{} serialNo:{} signature:{}", timestamp, nonce, serialNo, signature);
|
||||
// String result = HttpKit.readData(request);
|
||||
// log.info("支付通知密文 {}", result);
|
||||
//
|
||||
// // 需要通过证书序列号查找对应的证书,verifyNotify 中有验证证书的序列号
|
||||
// String plainText = WxPayKit.verifyNotify(serialNo, result, signature, nonce, timestamp,
|
||||
// mchKey, platFormPath);
|
||||
//
|
||||
// log.info("支付通知明文 {}", plainText);
|
||||
//
|
||||
// if (StrUtil.isNotEmpty(plainText)) {
|
||||
// response.setStatus(200);
|
||||
// map.put("code", "SUCCESS");
|
||||
// map.put("message", "SUCCESS");
|
||||
// } else {
|
||||
// response.setStatus(500);
|
||||
// map.put("code", "ERROR");
|
||||
// map.put("message", "签名错误");
|
||||
// }
|
||||
// response.setHeader("Content-type", ContentType.JSON.toString());
|
||||
// response.getOutputStream().write(JSONUtil.toJsonStr(map).getBytes(StandardCharsets.UTF_8));
|
||||
// response.flushBuffer();
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
// private String getSerialNumber() {
|
||||
// // 获取证书序列号
|
||||
// X509Certificate certificate = PayKit.getCertificate(certPath);
|
||||
// if (null != certificate) {
|
||||
// String serialNo = certificate.getSerialNumber().toString(16).toUpperCase();
|
||||
// // 提前两天检查证书是否有效
|
||||
// boolean isValid = PayKit.checkCertificateIsValid(certificate, mchid, -2);
|
||||
// log.info("证书是否可用 {} 证书有效期为 {}", isValid, DateUtil.format(certificate.getNotAfter(), DatePattern.NORM_DATETIME_PATTERN));
|
||||
// System.out.println("serialNo:" + serialNo);
|
||||
// return serialNo;
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
// @RequestMapping("/get")
|
||||
// @ResponseBody
|
||||
// public String v3Get() {
|
||||
// // 获取平台证书列表
|
||||
// try {
|
||||
// IJPayHttpResponse response = WxPayApi.v3(
|
||||
// RequestMethodEnum.GET,
|
||||
// WxDomainEnum.CHINA.toString(),
|
||||
// OtherApiEnum.GET_CERTIFICATES.toString(),
|
||||
// mchid,
|
||||
// getSerialNumber(),
|
||||
// null,
|
||||
// certKeyPath,
|
||||
// ""
|
||||
// );
|
||||
// String serialNumber = response.getHeader("Wechatpay-Serial");
|
||||
// String body = response.getBody();
|
||||
// int status = response.getStatus();
|
||||
// log.info("serialNumber: {}", serialNumber);
|
||||
// log.info("status: {}", status);
|
||||
// log.info("body: {}", body);
|
||||
// int isOk = 200;
|
||||
// if (status == isOk) {
|
||||
// JSONObject jsonObject = JSONUtil.parseObj(body);
|
||||
// JSONArray dataArray = jsonObject.getJSONArray("data");
|
||||
// // 默认认为只有一个平台证书
|
||||
// JSONObject encryptObject = dataArray.getJSONObject(0);
|
||||
// JSONObject encryptCertificate = encryptObject.getJSONObject("encrypt_certificate");
|
||||
// String associatedData = encryptCertificate.getStr("associated_data");
|
||||
// String cipherText = encryptCertificate.getStr("ciphertext");
|
||||
// String nonce = encryptCertificate.getStr("nonce");
|
||||
// String serialNo = encryptObject.getStr("serial_no");
|
||||
// final String platSerialNo = savePlatformCert(associatedData, nonce, cipherText, platFormPath);
|
||||
// log.info("平台证书序列号: {} serialNo: {}", platSerialNo, serialNo);
|
||||
// }
|
||||
// // 根据证书序列号查询对应的证书来验证签名结果
|
||||
// boolean verifySignature = WxPayKit.verifySignature(response, platFormPath);
|
||||
// System.out.println("verifySignature:" + verifySignature);
|
||||
// return body;
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// return null;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 保存平台证书
|
||||
// * @param associatedData associated_data
|
||||
// * @param nonce nonce
|
||||
// * @param cipherText cipherText
|
||||
// * @param certPath 证书保存路径
|
||||
// * @return
|
||||
// */
|
||||
// private String savePlatformCert(String associatedData, String nonce, String cipherText, String certPath) {
|
||||
// try {
|
||||
// AesUtil aesUtil = new AesUtil(mchKey.getBytes(StandardCharsets.UTF_8));
|
||||
// // 平台证书密文解密
|
||||
// // encrypt_certificate 中的 associated_data nonce ciphertext
|
||||
// String publicKey = aesUtil.decryptToString(
|
||||
// associatedData.getBytes(StandardCharsets.UTF_8),
|
||||
// nonce.getBytes(StandardCharsets.UTF_8),
|
||||
// cipherText
|
||||
// );
|
||||
// // 保存证书
|
||||
// cn.hutool.core.io.file.FileWriter writer = new FileWriter(certPath);
|
||||
// writer.write(publicKey);
|
||||
// // 获取平台证书序列号
|
||||
// X509Certificate certificate = PayKit.getCertificate(new ByteArrayInputStream(publicKey.getBytes()));
|
||||
// return certificate.getSerialNumber().toString(16).toUpperCase();
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// return e.getMessage();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//}
|
@@ -0,0 +1,100 @@
|
||||
package by.dimp.web.controller.user;
|
||||
|
||||
import by.dimp.common.core.base.BaseController;
|
||||
import by.dimp.common.core.domain.Result;
|
||||
import by.dimp.common.core.domain.UserInfo;
|
||||
import by.dimp.web.model.domain.visitorManagement.req.VisitorManagementReq;
|
||||
import by.dimp.web.model.domain.visitorManagement.req.VistorManagementPageQuery;
|
||||
import by.dimp.web.model.entity.TbVisitorManagement;
|
||||
import by.dimp.web.service.admin.ITbVisitorInvitationsService;
|
||||
import by.dimp.web.service.user.ITbUserVisitorInvitationsService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import jakarta.annotation.Resource;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 访客邀约管理
|
||||
*/
|
||||
|
||||
|
||||
//todo 访客需要租客的完善,查询我的访客时,根据公司下的用户id查询,需要根据租客的id查询,而不是用户的id,根据用户名和手机号进行匹配
|
||||
@RestController
|
||||
@RequestMapping("/roomBooking")
|
||||
@Slf4j
|
||||
public class TbUserVisitorInvitationsController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private ITbUserVisitorInvitationsService tbUserVisitorManagementService;
|
||||
|
||||
/**
|
||||
* 分页查询用户访客管理列表
|
||||
* @param pageQuery
|
||||
* @return
|
||||
* Visitor
|
||||
*/
|
||||
@GetMapping
|
||||
public Result<IPage<TbVisitorManagement>> queryForPage(VistorManagementPageQuery pageQuery) {
|
||||
log.info("查询访客管理列表,入参: {}", pageQuery);
|
||||
IPage<TbVisitorManagement> page = tbUserVisitorManagementService.queryForPage(pageQuery);
|
||||
return Result.success(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询待审核访客列表
|
||||
* @param pageQuery
|
||||
* @return
|
||||
*/
|
||||
@GetMapping
|
||||
public Result<IPage<TbVisitorManagement>> queryForWaitingPage(VistorManagementPageQuery pageQuery) {
|
||||
log.info("查询访客管理列表,入参: {}", pageQuery);
|
||||
IPage<TbVisitorManagement> page = tbUserVisitorManagementService.queryForWaitingPage(pageQuery);
|
||||
return Result.success(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增访客
|
||||
* @param visitorManagementReq
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/addVisitor")
|
||||
public Result<Boolean> addVisitor(@RequestBody VisitorManagementReq visitorManagementReq) {
|
||||
log.info("新增访客,入参: {}", visitorManagementReq);
|
||||
UserInfo userInfo = getUserInfo();
|
||||
visitorManagementReq.setCreateTime(LocalDateTime.now());
|
||||
visitorManagementReq.setCreateById(userInfo.getId());
|
||||
visitorManagementReq.setCreateBy(userInfo.getUserName());
|
||||
int result = tbUserVisitorManagementService.addVisitor(visitorManagementReq);
|
||||
return Result.success(result > 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看访客邀约详情
|
||||
*/
|
||||
@GetMapping("/{id}")
|
||||
public Result<TbVisitorManagement> getVisitor(@PathVariable("id") Integer id) {
|
||||
log.info("查看访客详情,入参: {}", id);
|
||||
TbVisitorManagement visitor = tbUserVisitorManagementService.getVisitorById(id);
|
||||
return Result.success(visitor);
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核访客
|
||||
* @param visitorManagementReq
|
||||
* @return
|
||||
*/
|
||||
@PutMapping("/auditVisitor")
|
||||
public Result<Boolean> auditVisitor(@RequestBody VisitorManagementReq visitorManagementReq) {
|
||||
log.info("审核访客,入参: {}", visitorManagementReq);
|
||||
UserInfo userInfo = getUserInfo();
|
||||
visitorManagementReq.setUpdateTime(LocalDateTime.now());
|
||||
visitorManagementReq.setUpdateById(userInfo.getId());
|
||||
visitorManagementReq.setUpdateBy(userInfo.getUserName());
|
||||
int result = tbUserVisitorManagementService.auditVisitor(visitorManagementReq);
|
||||
return Result.success(result > 0);
|
||||
}
|
||||
|
||||
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
package by.dimp.web.covert;
|
||||
|
||||
import by.dimp.web.model.domain.ceremonialServe.req.CeremonialServeReq;
|
||||
import by.dimp.web.model.domain.ceremonialServe.res.CeremonialServeRes;
|
||||
import by.dimp.web.model.domain.roomBooking.resp.RoomBookingRes;
|
||||
import by.dimp.web.model.entity.TbCeremonialServe;
|
||||
import by.dimp.web.model.entity.TbRoomBooking;
|
||||
import org.mapstruct.Mapper;
|
||||
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface TbCeremonialServeCovert {
|
||||
CeremonialServeRes entityToResp(TbCeremonialServe tbCeremonialServe);
|
||||
|
||||
TbCeremonialServe reqToResp(CeremonialServeReq ceremonialServeReq);
|
||||
|
||||
TbCeremonialServe reqToEntity(CeremonialServeReq ceremonialServeReq);
|
||||
}
|
@@ -0,0 +1,18 @@
|
||||
package by.dimp.web.covert;
|
||||
|
||||
import by.dimp.web.model.domain.cleaningIndicators.req.SaveAndModifyCleaningIndicators;
|
||||
import by.dimp.web.model.domain.cleaningIndicators.resp.TbCleaningIndicatorsResp;
|
||||
import by.dimp.web.model.entity.TbCleaningIndicators;
|
||||
import org.mapstruct.Mapper;
|
||||
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface TbCleaningQualityConvert {
|
||||
TbCleaningIndicators reqToEntity(SaveAndModifyCleaningIndicators req);
|
||||
|
||||
TbCleaningIndicatorsResp entityToResp(TbCleaningIndicators ls);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -0,0 +1,14 @@
|
||||
package by.dimp.web.covert;
|
||||
|
||||
import by.dimp.web.model.domain.conference.req.ConferenceReq;
|
||||
import by.dimp.web.model.entity.TbConference;
|
||||
import by.dimp.web.model.domain.conference.resp.ConferenceRes;
|
||||
import org.mapstruct.Mapper;
|
||||
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface TbConferenceCovert {
|
||||
ConferenceRes entityToResp(TbConference tbConference);
|
||||
|
||||
TbConference reqToEntity(ConferenceReq conferenceReq);
|
||||
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
package by.dimp.web.covert;
|
||||
|
||||
import by.dimp.web.model.entity.TbRoomBooking;
|
||||
import by.dimp.web.model.domain.roomBooking.req.RoomBookingReq;
|
||||
import by.dimp.web.model.domain.roomBooking.resp.RoomBookingRes;
|
||||
import org.mapstruct.Mapper;
|
||||
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface TbRoomBookingConvert {
|
||||
RoomBookingRes entityToResp(TbRoomBooking tbRoomBooking);
|
||||
|
||||
TbRoomBooking respToEntity(RoomBookingReq roomBookingReq);
|
||||
|
||||
TbRoomBooking reqToEntity(RoomBookingReq roomBookingReq);
|
||||
}
|
@@ -0,0 +1,13 @@
|
||||
package by.dimp.web.covert;
|
||||
|
||||
import by.dimp.web.model.domain.serviceClassification.req.ServiceClassificationReq;
|
||||
import by.dimp.web.model.domain.serviceClassification.resp.TbServiceClassificationRes;
|
||||
import by.dimp.web.model.entity.TbServiceClassification;
|
||||
import org.mapstruct.Mapper;
|
||||
|
||||
@Mapper(componentModel = "spring")
|
||||
public interface TbServiceClassificationConvert {
|
||||
TbServiceClassificationRes entityToResp(TbServiceClassification entity);
|
||||
TbServiceClassification reqToEntity (ServiceClassificationReq req);
|
||||
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user