| @@ -0,0 +1,165 @@ | |||
| package com.xueyi.system.staff.controller; | |||
| import com.xueyi.common.core.utils.core.ObjectUtil; | |||
| import com.xueyi.common.core.utils.core.StrUtil; | |||
| import com.xueyi.common.core.utils.file.FileTypeUtil; | |||
| import com.xueyi.common.core.utils.file.MimeTypeUtil; | |||
| import com.xueyi.common.core.web.result.AjaxResult; | |||
| import com.xueyi.common.core.web.result.R; | |||
| import com.xueyi.common.core.web.validate.V_A; | |||
| import com.xueyi.common.core.web.validate.V_E; | |||
| import com.xueyi.common.log.annotation.Log; | |||
| import com.xueyi.common.log.enums.BusinessType; | |||
| import com.xueyi.common.security.annotation.Logical; | |||
| import com.xueyi.common.security.annotation.RequiresPermissions; | |||
| import com.xueyi.common.security.utils.SecurityUtils; | |||
| import com.xueyi.common.web.entity.controller.BaseController; | |||
| import com.xueyi.file.api.domain.SysFile; | |||
| import com.xueyi.file.api.feign.RemoteFileService; | |||
| import com.xueyi.system.api.model.LoginUser; | |||
| import com.xueyi.system.staff.domain.dto.DmStaffDto; | |||
| import com.xueyi.system.staff.domain.po.DmStaffPo; | |||
| import com.xueyi.system.staff.domain.query.DmStaffQuery; | |||
| import com.xueyi.system.staff.service.IDmStaffService; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.validation.annotation.Validated; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import org.springframework.web.multipart.MultipartFile; | |||
| import java.io.Serializable; | |||
| import java.util.Arrays; | |||
| import java.util.List; | |||
| /** | |||
| * 人员管理 业务处理 | |||
| * | |||
| * @author xueyi | |||
| */ | |||
| @RestController | |||
| @RequestMapping("/staff") | |||
| public class DmStaffController extends BaseController<DmStaffQuery, DmStaffDto, IDmStaffService> { | |||
| @Autowired | |||
| IDmStaffService dmStaffService; | |||
| @Autowired | |||
| private RemoteFileService remoteFileService; | |||
| /** 定义节点名称 */ | |||
| @Override | |||
| protected String getNodeName() { | |||
| return "人员" ; | |||
| } | |||
| /** | |||
| * 查询人员列表 | |||
| */ | |||
| @Override | |||
| @GetMapping("/list") | |||
| @RequiresPermissions(Auth.DM_STAFF_LIST) | |||
| public AjaxResult list(DmStaffQuery dmStaff) { | |||
| List<DmStaffPo> list = dmStaffService.selectStaffList(dmStaff); | |||
| //return AjaxResult.success(list); | |||
| return super.list(dmStaff); | |||
| } | |||
| /** | |||
| * 查询人员详细 | |||
| */ | |||
| @Override | |||
| @GetMapping(value = "/{id}") | |||
| @RequiresPermissions(Auth.DM_STAFF_SINGLE) | |||
| public AjaxResult getInfo(@PathVariable Serializable id) { | |||
| return super.getInfo(id); | |||
| } | |||
| /** | |||
| * 人员新增 | |||
| */ | |||
| @Override | |||
| @PostMapping | |||
| @RequiresPermissions(Auth.DM_STAFF_ADD) | |||
| @Log(title = "人员管理", businessType = BusinessType.INSERT) | |||
| public AjaxResult add(@Validated({V_A.class}) @RequestBody DmStaffDto dmStaff) { | |||
| return super.add(dmStaff); | |||
| } | |||
| /** | |||
| * 人员修改 | |||
| */ | |||
| @Override | |||
| @PutMapping | |||
| @RequiresPermissions(Auth.DM_STAFF_EDIT) | |||
| @Log(title = "人员管理", businessType = BusinessType.UPDATE) | |||
| public AjaxResult edit(@Validated({V_E.class}) @RequestBody DmStaffDto dmStaff) { | |||
| return super.edit(dmStaff); | |||
| } | |||
| /** | |||
| * 人员修改状态 | |||
| */ | |||
| @Override | |||
| @PutMapping("/status") | |||
| @RequiresPermissions(value = {Auth.DM_STAFF_EDIT, Auth.DM_STAFF_ES}, logical = Logical.OR) | |||
| @Log(title = "人员管理", businessType = BusinessType.UPDATE_STATUS) | |||
| public AjaxResult editStatus(@RequestBody DmStaffDto dmStaff) { | |||
| return super.editStatus(dmStaff); | |||
| } | |||
| /** | |||
| * 人员批量删除 | |||
| */ | |||
| @Override | |||
| @DeleteMapping("/batch/{idList}") | |||
| @RequiresPermissions(Auth.DM_STAFF_DEL) | |||
| @Log(title = "人员管理", businessType = BusinessType.DELETE) | |||
| public AjaxResult batchRemove(@PathVariable List<Long> idList) { | |||
| return super.batchRemove(idList); | |||
| } | |||
| /** | |||
| * 获取人员选择框列表 | |||
| */ | |||
| @Override | |||
| @GetMapping("/option") | |||
| public AjaxResult option() { | |||
| return super.option(); | |||
| } | |||
| interface Auth { | |||
| /** 系统 - 人员管理 - 列表 */ | |||
| String DM_STAFF_LIST = "staff:staff:list"; | |||
| /** 系统 - 人员管理 - 详情 */ | |||
| String DM_STAFF_SINGLE = "staff:staff:single"; | |||
| /** 系统 - 人员管理 - 新增 */ | |||
| String DM_STAFF_ADD = "staff:staff:add"; | |||
| /** 系统 - 人员管理 - 修改 */ | |||
| String DM_STAFF_EDIT = "staff:staff:edit"; | |||
| /** 系统 - 人员管理 - 修改状态 */ | |||
| String DM_STAFF_ES = "staff:staff:es"; | |||
| /** 系统 - 人员管理 - 删除 */ | |||
| String DM_STAFF_DEL = "staff:staff:delete"; | |||
| } | |||
| /** | |||
| * 头像上传 | |||
| */ | |||
| @PostMapping("/upload") | |||
| @Log(title = "人员管理 - 上传头像", businessType = BusinessType.UPDATE) | |||
| public AjaxResult upload(@RequestParam("file") MultipartFile file) { | |||
| if (!file.isEmpty()) { | |||
| String extension = FileTypeUtil.getExtension(file); | |||
| if (!StrUtil.equalsAnyIgnoreCase(extension, MimeTypeUtil.IMAGE_EXTENSION)) { | |||
| return error("文件格式不正确,请上传" + Arrays.toString(MimeTypeUtil.IMAGE_EXTENSION) + "格式"); | |||
| } | |||
| R<SysFile> fileResult = remoteFileService.upload(file); | |||
| if (ObjectUtil.isNull(fileResult) || ObjectUtil.isNull(fileResult.getData())) | |||
| return error("文件服务异常,请联系管理员!"); | |||
| String url = fileResult.getData().getUrl(); | |||
| // 预留人脸识别与图像质量监测接口,如果监测异常返回错误 | |||
| AjaxResult ajax = success(); | |||
| ajax.put(AjaxResult.URL_TAG, url); | |||
| return ajax; | |||
| } | |||
| return error("上传图片异常,请联系管理员!"); | |||
| } | |||
| } | |||
| @@ -0,0 +1,108 @@ | |||
| package com.xueyi.system.visitor.controller; | |||
| import com.xueyi.common.core.web.result.AjaxResult; | |||
| import com.xueyi.common.core.web.validate.V_A; | |||
| import com.xueyi.common.core.web.validate.V_E; | |||
| import com.xueyi.common.log.annotation.Log; | |||
| import com.xueyi.common.log.enums.BusinessType; | |||
| import com.xueyi.common.security.annotation.RequiresPermissions; | |||
| import com.xueyi.common.web.entity.controller.BaseController; | |||
| import com.xueyi.system.visitor.domain.dto.DmVisitorsDto; | |||
| import com.xueyi.system.visitor.domain.query.DmVisitorsQuery; | |||
| import com.xueyi.system.visitor.service.IDmVisitorsService; | |||
| import org.springframework.validation.annotation.Validated; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import java.io.Serializable; | |||
| import java.util.List; | |||
| /** | |||
| * 访客管理 业务处理 | |||
| * | |||
| * @author xueyi | |||
| */ | |||
| @RestController | |||
| @RequestMapping("/visitors") | |||
| public class DmVisitorsController extends BaseController<DmVisitorsQuery, DmVisitorsDto, IDmVisitorsService> { | |||
| /** 定义节点名称 */ | |||
| @Override | |||
| protected String getNodeName() { | |||
| return "访客" ; | |||
| } | |||
| /** | |||
| * 查询访客列表 | |||
| */ | |||
| @Override | |||
| @GetMapping("/list") | |||
| @RequiresPermissions(Auth.DM_VISITORS_LIST) | |||
| public AjaxResult list(DmVisitorsQuery dmVisitors) { | |||
| return super.list(dmVisitors); | |||
| } | |||
| /** | |||
| * 查询访客详细 | |||
| */ | |||
| @Override | |||
| @GetMapping(value = "/{id}") | |||
| @RequiresPermissions(Auth.DM_VISITORS_SINGLE) | |||
| public AjaxResult getInfo(@PathVariable Serializable id) { | |||
| return super.getInfo(id); | |||
| } | |||
| /** | |||
| * 访客新增 | |||
| */ | |||
| @Override | |||
| @PostMapping | |||
| @RequiresPermissions(Auth.DM_VISITORS_ADD) | |||
| @Log(title = "访客管理", businessType = BusinessType.INSERT) | |||
| public AjaxResult add(@Validated({V_A.class}) @RequestBody DmVisitorsDto dmVisitors) { | |||
| return super.add(dmVisitors); | |||
| } | |||
| /** | |||
| * 访客修改 | |||
| */ | |||
| @Override | |||
| @PutMapping | |||
| @RequiresPermissions(Auth.DM_VISITORS_EDIT) | |||
| @Log(title = "访客管理", businessType = BusinessType.UPDATE) | |||
| public AjaxResult edit(@Validated({V_E.class}) @RequestBody DmVisitorsDto dmVisitors) { | |||
| return super.edit(dmVisitors); | |||
| } | |||
| /** | |||
| * 访客批量删除 | |||
| */ | |||
| @Override | |||
| @DeleteMapping("/batch/{idList}") | |||
| @RequiresPermissions(Auth.DM_VISITORS_DEL) | |||
| @Log(title = "访客管理", businessType = BusinessType.DELETE) | |||
| public AjaxResult batchRemove(@PathVariable List<Long> idList) { | |||
| return super.batchRemove(idList); | |||
| } | |||
| /** | |||
| * 获取访客选择框列表 | |||
| */ | |||
| @Override | |||
| @GetMapping("/option") | |||
| public AjaxResult option() { | |||
| return super.option(); | |||
| } | |||
| interface Auth { | |||
| /** 系统 - 访客管理 - 列表 */ | |||
| String DM_VISITORS_LIST = "visitor:visitors:list"; | |||
| /** 系统 - 访客管理 - 详情 */ | |||
| String DM_VISITORS_SINGLE = "visitor:visitors:single"; | |||
| /** 系统 - 访客管理 - 新增 */ | |||
| String DM_VISITORS_ADD = "visitor:visitors:add"; | |||
| /** 系统 - 访客管理 - 修改 */ | |||
| String DM_VISITORS_EDIT = "visitor:visitors:edit"; | |||
| /** 系统 - 访客管理 - 删除 */ | |||
| String DM_VISITORS_DEL = "visitor:visitors:delete"; | |||
| } | |||
| } | |||
| @@ -0,0 +1,21 @@ | |||
| package com.xueyi.system.staff.domain.dto; | |||
| import com.xueyi.system.staff.domain.po.DmStaffPo; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import java.io.Serial; | |||
| /** | |||
| * 人员 数据传输对象 | |||
| * | |||
| * @author xueyi | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| public class DmStaffDto extends DmStaffPo { | |||
| @Serial | |||
| private static final long serialVersionUID = 1L; | |||
| } | |||
| @@ -0,0 +1,21 @@ | |||
| package com.xueyi.system.visitor.domain.dto; | |||
| import com.xueyi.system.visitor.domain.po.DmVisitorsPo; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import java.io.Serial; | |||
| /** | |||
| * 访客 数据传输对象 | |||
| * | |||
| * @author xueyi | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| public class DmVisitorsDto extends DmVisitorsPo { | |||
| @Serial | |||
| private static final long serialVersionUID = 1L; | |||
| } | |||
| @@ -0,0 +1,17 @@ | |||
| package com.xueyi.system.staff.domain.model; | |||
| import com.xueyi.common.core.web.entity.model.BaseConverter; | |||
| import com.xueyi.system.staff.domain.dto.DmStaffDto; | |||
| import com.xueyi.system.staff.domain.po.DmStaffPo; | |||
| import com.xueyi.system.staff.domain.query.DmStaffQuery; | |||
| import org.mapstruct.Mapper; | |||
| import org.mapstruct.MappingConstants; | |||
| /** | |||
| * 人员 对象映射器 | |||
| * | |||
| * @author xueyi | |||
| */ | |||
| @Mapper(componentModel = MappingConstants.ComponentModel.SPRING) | |||
| public interface DmStaffConverter extends BaseConverter<DmStaffQuery, DmStaffDto, DmStaffPo> { | |||
| } | |||
| @@ -0,0 +1,17 @@ | |||
| package com.xueyi.system.visitor.domain.model; | |||
| import com.xueyi.common.core.web.entity.model.BaseConverter; | |||
| import com.xueyi.system.visitor.domain.dto.DmVisitorsDto; | |||
| import com.xueyi.system.visitor.domain.po.DmVisitorsPo; | |||
| import com.xueyi.system.visitor.domain.query.DmVisitorsQuery; | |||
| import org.mapstruct.Mapper; | |||
| import org.mapstruct.MappingConstants; | |||
| /** | |||
| * 访客 对象映射器 | |||
| * | |||
| * @author xueyi | |||
| */ | |||
| @Mapper(componentModel = MappingConstants.ComponentModel.SPRING) | |||
| public interface DmVisitorsConverter extends BaseConverter<DmVisitorsQuery, DmVisitorsDto, DmVisitorsPo> { | |||
| } | |||
| @@ -0,0 +1,81 @@ | |||
| package com.xueyi.system.staff.domain.po; | |||
| import java.util.Date; | |||
| import com.fasterxml.jackson.annotation.JsonFormat; | |||
| import com.xueyi.common.core.web.tenant.base.TBaseEntity; | |||
| import com.xueyi.system.staff.domain.dto.DmStaffDto; | |||
| import com.xueyi.common.core.annotation.Excel; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import java.io.Serial; | |||
| import static com.xueyi.common.core.constant.basic.EntityConstants.NAME; | |||
| /** | |||
| * 人员 持久化对象 | |||
| * | |||
| * @author xueyi | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @TableName(value = "dm_staff", excludeProperty = { NAME }) | |||
| public class DmStaffPo extends TBaseEntity { | |||
| @Serial | |||
| private static final long serialVersionUID = 1L; | |||
| /** 用户编码 */ | |||
| @Excel(name = "用户编码") | |||
| protected String code; | |||
| /** 用户账号 */ | |||
| @Excel(name = "用户账号") | |||
| protected String userName; | |||
| /** 用户昵称 */ | |||
| @Excel(name = "用户昵称") | |||
| protected String nickName; | |||
| /** 用户类型(00超管用户 01普通用户) */ | |||
| @Excel(name = "用户类型", readConverterExp = "0=0超管用户,0=1普通用户") | |||
| protected String userType; | |||
| /** 手机号码 */ | |||
| @Excel(name = "手机号码") | |||
| protected String phone; | |||
| /** 用户邮箱 */ | |||
| @Excel(name = "用户邮箱") | |||
| protected String email; | |||
| /** 用户性别(0男 1女 2保密) */ | |||
| @Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=保密") | |||
| protected String sex; | |||
| /** 头像地址 */ | |||
| @Excel(name = "头像地址") | |||
| protected String avatar; | |||
| /** 个人简介 */ | |||
| @Excel(name = "个人简介") | |||
| protected String profile; | |||
| /** 密码 */ | |||
| @Excel(name = "密码") | |||
| protected String password; | |||
| /** 最后登录IP */ | |||
| @Excel(name = "最后登录IP") | |||
| protected String loginIp; | |||
| /** 最后登录时间 */ | |||
| @Excel(name = "最后登录时间") | |||
| protected Date loginDate; | |||
| /** 备注 */ | |||
| @Excel(name = "备注") | |||
| protected String remark; | |||
| } | |||
| @@ -0,0 +1,53 @@ | |||
| package com.xueyi.system.visitor.domain.po; | |||
| import com.xueyi.common.core.web.tenant.base.TBaseEntity; | |||
| import com.xueyi.system.visitor.domain.dto.DmVisitorsDto; | |||
| import com.xueyi.common.core.annotation.Excel; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import java.io.Serial; | |||
| import static com.xueyi.common.core.constant.basic.EntityConstants.STATUS; | |||
| import static com.xueyi.common.core.constant.basic.EntityConstants.SORT; | |||
| import static com.xueyi.common.core.constant.basic.EntityConstants.REMARK; | |||
| /** | |||
| * 访客 持久化对象 | |||
| * | |||
| * @author xueyi | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| @TableName(value = "dm_visitors", excludeProperty = { STATUS, SORT, REMARK }) | |||
| public class DmVisitorsPo extends TBaseEntity { | |||
| @Serial | |||
| private static final long serialVersionUID = 1L; | |||
| /** 会议室ID */ | |||
| @Excel(name = "会议室ID") | |||
| protected Long roomId; | |||
| /** 访客电话 */ | |||
| @Excel(name = "访客电话") | |||
| protected String phone; | |||
| /** 1:男;2:女 */ | |||
| @Excel(name = "1:男;2:女") | |||
| protected Integer gender; | |||
| /** 年龄 */ | |||
| @Excel(name = "年龄") | |||
| protected Integer age; | |||
| /** 访客公司 */ | |||
| @Excel(name = "访客公司") | |||
| protected String visitorCompany; | |||
| /** 所属组织ID */ | |||
| @Excel(name = "所属组织ID") | |||
| protected Long deptId; | |||
| } | |||
| @@ -0,0 +1,20 @@ | |||
| package com.xueyi.system.staff.domain.query; | |||
| import com.xueyi.system.staff.domain.po.DmStaffPo; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import java.io.Serial; | |||
| /** | |||
| * 人员 数据查询对象 | |||
| * | |||
| * @author xueyi | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| public class DmStaffQuery extends DmStaffPo { | |||
| @Serial | |||
| private static final long serialVersionUID = 1L; | |||
| } | |||
| @@ -0,0 +1,20 @@ | |||
| package com.xueyi.system.visitor.domain.query; | |||
| import com.xueyi.system.visitor.domain.po.DmVisitorsPo; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import java.io.Serial; | |||
| /** | |||
| * 访客 数据查询对象 | |||
| * | |||
| * @author xueyi | |||
| */ | |||
| @Data | |||
| @EqualsAndHashCode(callSuper = true) | |||
| public class DmVisitorsQuery extends DmVisitorsPo { | |||
| @Serial | |||
| private static final long serialVersionUID = 1L; | |||
| } | |||
| @@ -0,0 +1,13 @@ | |||
| package com.xueyi.system.staff.manager; | |||
| import com.xueyi.system.staff.domain.dto.DmStaffDto; | |||
| import com.xueyi.system.staff.domain.query.DmStaffQuery; | |||
| import com.xueyi.common.web.entity.manager.IBaseManager; | |||
| /** | |||
| * 人员管理 数据封装层 | |||
| * | |||
| * @author xueyi | |||
| */ | |||
| public interface IDmStaffManager extends IBaseManager<DmStaffQuery, DmStaffDto> { | |||
| } | |||
| @@ -0,0 +1,13 @@ | |||
| package com.xueyi.system.visitor.manager; | |||
| import com.xueyi.system.visitor.domain.dto.DmVisitorsDto; | |||
| import com.xueyi.system.visitor.domain.query.DmVisitorsQuery; | |||
| import com.xueyi.common.web.entity.manager.IBaseManager; | |||
| /** | |||
| * 访客管理 数据封装层 | |||
| * | |||
| * @author xueyi | |||
| */ | |||
| public interface IDmVisitorsManager extends IBaseManager<DmVisitorsQuery, DmVisitorsDto> { | |||
| } | |||
| @@ -0,0 +1,19 @@ | |||
| package com.xueyi.system.staff.manager.impl; | |||
| import com.xueyi.system.staff.domain.po.DmStaffPo; | |||
| import com.xueyi.system.staff.domain.dto.DmStaffDto; | |||
| import com.xueyi.system.staff.domain.query.DmStaffQuery; | |||
| import com.xueyi.system.staff.domain.model.DmStaffConverter; | |||
| import com.xueyi.system.staff.mapper.DmStaffMapper; | |||
| import com.xueyi.common.web.entity.manager.impl.BaseManagerImpl; | |||
| import com.xueyi.system.staff.manager.IDmStaffManager; | |||
| import org.springframework.stereotype.Component; | |||
| /** | |||
| * 人员管理 数据封装层处理 | |||
| * | |||
| * @author xueyi | |||
| */ | |||
| @Component | |||
| public class DmStaffManager extends BaseManagerImpl<DmStaffQuery, DmStaffDto, DmStaffPo, DmStaffMapper, DmStaffConverter> implements IDmStaffManager { | |||
| } | |||
| @@ -0,0 +1,19 @@ | |||
| package com.xueyi.system.visitor.manager.impl; | |||
| import com.xueyi.system.visitor.domain.po.DmVisitorsPo; | |||
| import com.xueyi.system.visitor.domain.dto.DmVisitorsDto; | |||
| import com.xueyi.system.visitor.domain.query.DmVisitorsQuery; | |||
| import com.xueyi.system.visitor.domain.model.DmVisitorsConverter; | |||
| import com.xueyi.system.visitor.mapper.DmVisitorsMapper; | |||
| import com.xueyi.common.web.entity.manager.impl.BaseBaseManagerImpl; | |||
| import com.xueyi.system.visitor.manager.IDmVisitorsManager; | |||
| import org.springframework.stereotype.Component; | |||
| /** | |||
| * 访客管理 数据封装层处理 | |||
| * | |||
| * @author xueyi | |||
| */ | |||
| @Component | |||
| public class DmVisitorsManager extends BaseManagerImpl<DmVisitorsQuery, DmVisitorsDto, DmVisitorsPo, DmVisitorsMapper, DmVisitorsConverter> implements IDmVisitorsManager { | |||
| } | |||
| @@ -0,0 +1,20 @@ | |||
| package com.xueyi.system.staff.mapper; | |||
| import com.xueyi.common.datasource.annotation.Master; | |||
| import com.xueyi.system.staff.domain.query.DmStaffQuery; | |||
| import com.xueyi.system.staff.domain.dto.DmStaffDto; | |||
| import com.xueyi.system.staff.domain.po.DmStaffPo; | |||
| import com.xueyi.common.web.entity.mapper.BaseMapper; | |||
| import com.xueyi.common.datasource.annotation.Isolate; | |||
| import java.util.List; | |||
| /** | |||
| * 人员管理 数据层 | |||
| * | |||
| * @author xueyi | |||
| */ | |||
| @Master | |||
| public interface DmStaffMapper extends BaseMapper<DmStaffQuery, DmStaffDto, DmStaffPo> { | |||
| public List<DmStaffPo> selectStaffList(DmStaffPo staff); | |||
| } | |||
| @@ -0,0 +1,16 @@ | |||
| package com.xueyi.system.visitor.mapper; | |||
| import com.xueyi.system.visitor.domain.query.DmVisitorsQuery; | |||
| import com.xueyi.system.visitor.domain.dto.DmVisitorsDto; | |||
| import com.xueyi.system.visitor.domain.po.DmVisitorsPo; | |||
| import com.xueyi.common.web.entity.mapper.BaseMapper; | |||
| import com.xueyi.common.datasource.annotation.Isolate; | |||
| /** | |||
| * 访客管理 数据层 | |||
| * | |||
| * @author xueyi | |||
| */ | |||
| @Isolate | |||
| public interface DmVisitorsMapper extends BaseMapper<DmVisitorsQuery, DmVisitorsDto, DmVisitorsPo> { | |||
| } | |||
| @@ -0,0 +1,17 @@ | |||
| package com.xueyi.system.staff.service; | |||
| import com.xueyi.system.staff.domain.po.DmStaffPo; | |||
| import com.xueyi.system.staff.domain.query.DmStaffQuery; | |||
| import com.xueyi.system.staff.domain.dto.DmStaffDto; | |||
| import com.xueyi.common.web.entity.service.IBaseService; | |||
| import java.util.List; | |||
| /** | |||
| * 人员管理 服务层 | |||
| * | |||
| * @author xueyi | |||
| */ | |||
| public interface IDmStaffService extends IBaseService<DmStaffQuery, DmStaffDto> { | |||
| public List<DmStaffPo> selectStaffList(DmStaffPo staff); | |||
| } | |||
| @@ -0,0 +1,13 @@ | |||
| package com.xueyi.system.visitor.service; | |||
| import com.xueyi.system.visitor.domain.query.DmVisitorsQuery; | |||
| import com.xueyi.system.visitor.domain.dto.DmVisitorsDto; | |||
| import com.xueyi.common.web.entity.service.IBaseService; | |||
| /** | |||
| * 访客管理 服务层 | |||
| * | |||
| * @author xueyi | |||
| */ | |||
| public interface IDmVisitorsService extends IBaseService<DmVisitorsQuery, DmVisitorsDto> { | |||
| } | |||
| @@ -0,0 +1,48 @@ | |||
| package com.xueyi.system.staff.service.impl; | |||
| import com.baomidou.mybatisplus.core.conditions.AbstractWrapper; | |||
| import com.baomidou.mybatisplus.core.conditions.Wrapper; | |||
| import com.xueyi.common.web.annotation.TenantIgnore; | |||
| import com.xueyi.system.staff.domain.dto.DmStaffDto; | |||
| import com.xueyi.system.staff.domain.po.DmStaffPo; | |||
| import com.xueyi.system.staff.domain.query.DmStaffQuery; | |||
| import com.xueyi.system.staff.manager.IDmStaffManager; | |||
| import com.xueyi.system.staff.mapper.DmStaffMapper; | |||
| import com.xueyi.system.staff.service.IDmStaffService; | |||
| import com.xueyi.common.web.entity.service.impl.BaseServiceImpl; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.stereotype.Service; | |||
| import java.util.List; | |||
| /** | |||
| * 人员管理 服务层处理 | |||
| * | |||
| * @author xueyi | |||
| */ | |||
| @Service | |||
| public class DmStaffServiceImpl extends BaseServiceImpl<DmStaffQuery, DmStaffDto, IDmStaffManager> implements IDmStaffService { | |||
| @Autowired | |||
| DmStaffMapper staffMapper; | |||
| /** | |||
| * 查询人员对象列表 | 数据权限 | |||
| * | |||
| * @param dmStaff 人员对象 | |||
| * @return 人员对象集合 | |||
| */ | |||
| @Override | |||
| //@DataScope(userAlias = "createBy", mapperScope = {"DmStaffMapper"}) | |||
| public List<DmStaffDto> selectListScope(DmStaffQuery dmStaff) { | |||
| return baseManager.selectList(dmStaff); | |||
| } | |||
| @Override | |||
| @TenantIgnore(tenantLine = true) | |||
| public List<DmStaffPo> selectStaffList(DmStaffPo staff) { | |||
| List<DmStaffPo> result = staffMapper.selectStaffList(staff); | |||
| List<DmStaffPo> po = staffMapper.selectList(null); | |||
| return result; | |||
| } | |||
| } | |||
| @@ -0,0 +1,32 @@ | |||
| package com.xueyi.system.visitor.service.impl; | |||
| import com.xueyi.system.visitor.domain.dto.DmVisitorsDto; | |||
| import com.xueyi.system.visitor.domain.query.DmVisitorsQuery; | |||
| import com.xueyi.system.visitor.service.IDmVisitorsService; | |||
| import com.xueyi.system.visitor.manager.IDmVisitorsManager; | |||
| import com.xueyi.common.web.entity.service.impl.BaseServiceImpl; | |||
| import org.springframework.stereotype.Service; | |||
| import java.util.List; | |||
| /** | |||
| * 访客管理 服务层处理 | |||
| * | |||
| * @author xueyi | |||
| */ | |||
| @Service | |||
| public class DmVisitorsServiceImpl extends BaseServiceImpl<DmVisitorsQuery, DmVisitorsDto, IDmVisitorsManager> implements IDmVisitorsService { | |||
| /** | |||
| * 查询访客对象列表 | 数据权限 | |||
| * | |||
| * @param dmVisitors 访客对象 | |||
| * @return 访客对象集合 | |||
| */ | |||
| @Override | |||
| //@DataScope(userAlias = "createBy", mapperScope = {"DmVisitorsMapper"}) | |||
| public List<DmVisitorsDto> selectListScope(DmVisitorsQuery dmVisitors) { | |||
| return baseManager.selectList(dmVisitors); | |||
| } | |||
| } | |||
| @@ -0,0 +1,14 @@ | |||
| <?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="com.xueyi.system.staff.mapper.DmStaffMapper"> | |||
| <resultMap type="DmStaffPo" id="DmStaffResult"> | |||
| <result property="userName" column="user_name" /> | |||
| </resultMap> | |||
| <select id="selectStaffList" parameterType="DmStaffPo" resultMap="DmStaffResult"> | |||
| select * from dm_staff u | |||
| </select> | |||
| </mapper> | |||
| @@ -0,0 +1,14 @@ | |||
| <?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="com.xueyi.system.staff.mapper.DmVisitorMapper"> | |||
| <resultMap type="DmVisitorPo" id="DmVisitorResult"> | |||
| <result property="userName" column="user_name" /> | |||
| </resultMap> | |||
| <select id="selectStaffList" parameterType="DmVisitorPo" resultMap="DmVisitorResult"> | |||
| select * from dm_staff u | |||
| </select> | |||
| </mapper> | |||