diff --git a/dongjian-dashboard-back-common/src/main/resources/config/language/msg/msg_jp.yml b/dongjian-dashboard-back-common/src/main/resources/config/language/msg/msg_jp.yml index cb83073..b1969a5 100644 --- a/dongjian-dashboard-back-common/src/main/resources/config/language/msg/msg_jp.yml +++ b/dongjian-dashboard-back-common/src/main/resources/config/language/msg/msg_jp.yml @@ -135,10 +135,10 @@ msgjp: delDeviceForGroup: パネル選択 editBuildingField: 建物の属性を編集 setLngLat: 天気の経度と緯度を設定 - addLevel: レベルを追加 - editLevel: レベルを編集 - deleteLevel: レベルを削除 - queryLevel: レベル一覧を取得 + addLevel: 支店管理 + editLevel: 支店管理 + deleteLevel: 支店管理 + queryLevel: 支店管理 addNotificationCategory: お知らせカテゴリ管理 editNotificationCategory: お知らせカテゴリ管理 delNotificationCategory: お知らせカテゴリ管理 diff --git a/dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/BuildingController.java b/dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/BuildingController.java index 8077b1b..2c6f98a 100644 --- a/dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/BuildingController.java +++ b/dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/BuildingController.java @@ -47,7 +47,6 @@ public class BuildingController { private BuildingService buildingService; - @Hidden @Operation(summary = "Get a page of building list") @RequestMapping(value = "/getListPage", method = RequestMethod.GET) public PageResponse> getListPage( diff --git a/dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/LevelController.java b/dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/LevelController.java index b3096a2..7e6c98c 100644 --- a/dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/LevelController.java +++ b/dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/LevelController.java @@ -28,7 +28,6 @@ import org.springframework.web.bind.annotation.*; * 物件级别管理Controller * 实现物件级别的增删改查功能 */ -@Hidden @RestController @AccessRequired @RequestMapping("/level") diff --git a/dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/LevelRoleController.java b/dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/LevelRoleController.java new file mode 100644 index 0000000..54fc756 --- /dev/null +++ b/dongjian-dashboard-back-controller/src/main/java/com/dongjian/dashboard/back/controller/LevelRoleController.java @@ -0,0 +1,203 @@ +package com.dongjian.dashboard.back.controller; + +import com.dongjian.dashboard.back.vo.TreeMenusDTO; +import com.dongjian.dashboard.back.common.exception.BusinessException; +import com.dongjian.dashboard.back.common.response.PageInfo; +import com.dongjian.dashboard.back.common.response.PageResponse; +import com.dongjian.dashboard.back.common.response.ResponseCode; +import com.dongjian.dashboard.back.common.response.SimpleDataResponse; +import com.dongjian.dashboard.back.configurator.interceptor.AccessRequired; +import com.dongjian.dashboard.back.dto.BaseSearchParams; +import com.dongjian.dashboard.back.dto.levelrole.*; +import com.dongjian.dashboard.back.service.LevelRoleService; +import com.dongjian.dashboard.back.vo.levelrole.LevelRolePageDTO; +import com.dongjian.dashboard.back.vo.levelrole.UserBindLevelRoleVO; +import com.dongjian.dashboard.back.vo.levelrole.UserBoundRolePageDTO; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 物件级别管理Controller + * 实现物件级别的增删改查功能 + */ +@RestController +@AccessRequired +@RequestMapping("/levelRole") +@Tag(name = "物件角色管理的相关接口", description = "物件角色管理的相关接口") +@SuppressWarnings("unchecked") +public class LevelRoleController { + + private static Logger logger = LoggerFactory.getLogger(LevelRoleController.class); + + @Autowired + private LevelRoleService levelRoleService; + + @Operation(summary = "添加级别角色") + @RequestMapping(value = "/add", method = RequestMethod.POST) + public SimpleDataResponse add( + @RequestBody OptLevelRoleParam optLevelRoleParam, + @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required = true) String LoginName, + @Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required = true) String AccessToken, + @Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long UserId, + @Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long CompanyId, + @Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required = true) Integer LanguageType) { + return levelRoleService.add(optLevelRoleParam, CompanyId, UserId, LanguageType); + } + + @Operation(summary = "编辑级别角色") + @RequestMapping(value = "/edit", method = RequestMethod.POST) + public SimpleDataResponse edit( + @RequestBody OptLevelRoleParam optLevelRoleParam, + @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required = true) String LoginName, + @Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required = true) String AccessToken, + @Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long UserId, + @Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long CompanyId, + @Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required = true) Integer LanguageType) { + return levelRoleService.edit(optLevelRoleParam, CompanyId, UserId, LanguageType); + } + + @Operation(summary = "删除级别角色") + @RequestMapping(value = "/batchDelete", method = RequestMethod.POST) + public SimpleDataResponse batchDelete( + @RequestBody DeleteLevelRoleParam deleteLevelRoleParam, + @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required = true) String LoginName, + @Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required = true) String AccessToken, + @Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long UserId, + @Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long CompanyId, + @Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required = true) Integer LanguageType) { + return levelRoleService.batchDelete(deleteLevelRoleParam, CompanyId, UserId, LanguageType); + } + + @Operation(summary = "获取级别角色列表") + @RequestMapping(value = "/getListPage", method = RequestMethod.GET) + public PageResponse> getListPage( + @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required = true) String LoginName, + @Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required = true) String AccessToken, + @Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long UserId, + @Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required = false) Long CompanyId, + @Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required = true) Integer LanguageType, + PageLevelRoleSearchParam pageLevelRoleSearchParam + ) throws BusinessException { + + pageLevelRoleSearchParam.setUserId(UserId); + PageResponse> pageResponse = new PageResponse<>(); + try { + pageResponse.setData(levelRoleService.getListPage(pageLevelRoleSearchParam, CompanyId, UserId, LanguageType)); + pageResponse.setCode(ResponseCode.SUCCESS); + pageResponse.setMsg("success"); + } catch (Exception e) { + logger.error("查询物件级别角色列表报错", e); + pageResponse.setCode(ResponseCode.SERVER_ERROR); + pageResponse.setMsg("service error"); + } + return pageResponse; + } + + @Operation(summary = "获取可以绑定层级角色的用户列表") + @RequestMapping(value = "/getCanBeBoundUserPage",method = RequestMethod.GET) + public PageResponse> getCanBeBoundUserPage( + BaseSearchParams baseSearchParams, + @Parameter(name="LoginName",description ="登录名",required=true,schema = @Schema(defaultValue = "admin")) @RequestHeader(required=true) String LoginName, + @Parameter(name="AccessToken",description ="鉴权token",required=true) @RequestHeader(required=true) String AccessToken, + @Parameter(name="UserId",description ="用户ID",required=true,schema = @Schema(defaultValue = "1")) @RequestHeader(required=true) Long UserId, + @Parameter(name="CompanyId",description ="用户所属企业ID",required=false,schema = @Schema(defaultValue = "1")) @RequestHeader(required=false) Long CompanyId, + @Parameter(name="LanguageType",description ="语言类型 0:中文 1:英文 2:日文",required=true,schema = @Schema(defaultValue = "2")) @RequestHeader(required=true) Integer LanguageType, + @Parameter(name="UTCOffset",description ="格林威治时间与本地时间的差值,单位是分钟,比如东八区是 -480",required=true,schema = @Schema(defaultValue = "-480")) @RequestHeader(required=true) Integer UTCOffset + ) throws BusinessException { + + baseSearchParams.setUserId(UserId); + PageResponse> pageResponse = new PageResponse<>(); + try { + pageResponse.setData(levelRoleService.getCanBeBoundUserPage(baseSearchParams, CompanyId, UserId, LanguageType, UTCOffset)); + pageResponse.setCode(ResponseCode.SUCCESS); + pageResponse.setMsg("success"); + } catch (Exception e) { + logger.error("获取用户绑定的级别角色报错", e); + pageResponse.setCode(ResponseCode.SERVER_ERROR); + pageResponse.setMsg("service error"); + } + return pageResponse; + } + + @Operation(summary = "用户增加绑定层级角色") + @RequestMapping(value = "/bound/bindUser", method = RequestMethod.POST) + public SimpleDataResponse bindUser( + @RequestBody BindUserParam bindUserParam, + @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required = true) String LoginName, + @Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required = true) String AccessToken, + @Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long UserId, + @Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long CompanyId, + @Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required = true) Integer LanguageType) { + return levelRoleService.bindUser(bindUserParam, CompanyId, UserId, LanguageType); + } + + @Operation(summary = "解绑用户已有的层级角色关系") + @RequestMapping(value = "/bound/unbindUser", method = RequestMethod.POST) + public SimpleDataResponse unbindUser( + @RequestBody UnbindUserParam unbindUserParam, + @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required = true) String LoginName, + @Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required = true) String AccessToken, + @Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long UserId, + @Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long CompanyId, + @Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required = true) Integer LanguageType) { + return levelRoleService.unbindUser(unbindUserParam, CompanyId, UserId, LanguageType); + } + + @Operation(summary = "获取用户已绑定的级别角色列表") + @RequestMapping(value = "/bound/getAlreadyBoundUserPage", method = RequestMethod.GET) + public PageResponse> getAlreadyBoundUserPage( + @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required = true) String LoginName, + @Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required = true) String AccessToken, + @Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long UserId, + @Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required = false) Long CompanyId, + @Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required = true) Integer LanguageType, + PageBoundRoleSearchParam pageBoundRoleSearchParam + ) throws BusinessException { + + pageBoundRoleSearchParam.setUserId(UserId); + PageResponse> pageResponse = new PageResponse<>(); + try { + pageResponse.setData(levelRoleService.getAlreadyBoundUserPage(pageBoundRoleSearchParam, CompanyId, UserId, LanguageType)); + pageResponse.setCode(ResponseCode.SUCCESS); + pageResponse.setMsg("success"); + } catch (Exception e) { + logger.error("获取用户绑定的级别角色报错", e); + pageResponse.setCode(ResponseCode.SERVER_ERROR); + pageResponse.setMsg("service error"); + } + return pageResponse; + } + + @Operation(summary = "根据角色ID获取对应层级ID") + @GetMapping("/bound/getBoundLevelByRole/{roleId}") + public SimpleDataResponse> getBoundLevelByRole( + @PathVariable Long roleId, + @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required = true) String LoginName, + @Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required = true) String AccessToken, + @Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long UserId, + @Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required = false) Long CompanyId, + @Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required = true) Integer LanguageType + ){ + return levelRoleService.getBoundLevelByRole(roleId, CompanyId, UserId, LanguageType); + } + + @Operation(summary = "获取当前登录用户绑定的层级树结构", description = "用于管理设置勾选层级ID") + @GetMapping("/bound/getBoundLevel") + public SimpleDataResponse> getBoundLevel( + @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required = true) String LoginName, + @Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required = true) String AccessToken, + @Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long UserId, + @Parameter(name = "CompanyId", description = "ID of the company to which the user belongs", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required = false) Long CompanyId, + @Parameter(name = "LanguageType", description = "Language type (0: Chinese, 1: English, 2: Japanese)", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required = true) Integer LanguageType + ){ + return levelRoleService.getBoundLevel(CompanyId, UserId, LanguageType); + } +} \ No newline at end of file diff --git a/dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/auto/DashboardLevelRoleMapper.java b/dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/auto/DashboardLevelRoleMapper.java new file mode 100644 index 0000000..283e458 --- /dev/null +++ b/dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/auto/DashboardLevelRoleMapper.java @@ -0,0 +1,96 @@ +package com.dongjian.dashboard.back.dao.auto; + +import com.dongjian.dashboard.back.model.DashboardLevelRole; +import com.dongjian.dashboard.back.model.DashboardLevelRoleExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface DashboardLevelRoleMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role + * + * @mbg.generated + */ + long countByExample(DashboardLevelRoleExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role + * + * @mbg.generated + */ + int deleteByExample(DashboardLevelRoleExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role + * + * @mbg.generated + */ + int deleteByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role + * + * @mbg.generated + */ + int insert(DashboardLevelRole record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role + * + * @mbg.generated + */ + int insertSelective(DashboardLevelRole record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role + * + * @mbg.generated + */ + List selectByExample(DashboardLevelRoleExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role + * + * @mbg.generated + */ + DashboardLevelRole selectByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role + * + * @mbg.generated + */ + int updateByExampleSelective(@Param("record") DashboardLevelRole record, @Param("example") DashboardLevelRoleExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role + * + * @mbg.generated + */ + int updateByExample(@Param("record") DashboardLevelRole record, @Param("example") DashboardLevelRoleExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role + * + * @mbg.generated + */ + int updateByPrimaryKeySelective(DashboardLevelRole record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role + * + * @mbg.generated + */ + int updateByPrimaryKey(DashboardLevelRole record); +} \ No newline at end of file diff --git a/dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/auto/DashboardLevelRoleObjectMapper.java b/dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/auto/DashboardLevelRoleObjectMapper.java new file mode 100644 index 0000000..61492b1 --- /dev/null +++ b/dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/auto/DashboardLevelRoleObjectMapper.java @@ -0,0 +1,64 @@ +package com.dongjian.dashboard.back.dao.auto; + +import com.dongjian.dashboard.back.model.DashboardLevelRoleObject; +import com.dongjian.dashboard.back.model.DashboardLevelRoleObjectExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface DashboardLevelRoleObjectMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_object + * + * @mbg.generated + */ + long countByExample(DashboardLevelRoleObjectExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_object + * + * @mbg.generated + */ + int deleteByExample(DashboardLevelRoleObjectExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_object + * + * @mbg.generated + */ + int insert(DashboardLevelRoleObject record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_object + * + * @mbg.generated + */ + int insertSelective(DashboardLevelRoleObject record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_object + * + * @mbg.generated + */ + List selectByExample(DashboardLevelRoleObjectExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_object + * + * @mbg.generated + */ + int updateByExampleSelective(@Param("record") DashboardLevelRoleObject record, @Param("example") DashboardLevelRoleObjectExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_object + * + * @mbg.generated + */ + int updateByExample(@Param("record") DashboardLevelRoleObject record, @Param("example") DashboardLevelRoleObjectExample example); +} \ No newline at end of file diff --git a/dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/auto/DashboardLevelRoleUserMapper.java b/dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/auto/DashboardLevelRoleUserMapper.java new file mode 100644 index 0000000..2db2a41 --- /dev/null +++ b/dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/auto/DashboardLevelRoleUserMapper.java @@ -0,0 +1,96 @@ +package com.dongjian.dashboard.back.dao.auto; + +import com.dongjian.dashboard.back.model.DashboardLevelRoleUser; +import com.dongjian.dashboard.back.model.DashboardLevelRoleUserExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface DashboardLevelRoleUserMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_user + * + * @mbg.generated + */ + long countByExample(DashboardLevelRoleUserExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_user + * + * @mbg.generated + */ + int deleteByExample(DashboardLevelRoleUserExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_user + * + * @mbg.generated + */ + int deleteByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_user + * + * @mbg.generated + */ + int insert(DashboardLevelRoleUser record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_user + * + * @mbg.generated + */ + int insertSelective(DashboardLevelRoleUser record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_user + * + * @mbg.generated + */ + List selectByExample(DashboardLevelRoleUserExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_user + * + * @mbg.generated + */ + DashboardLevelRoleUser selectByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_user + * + * @mbg.generated + */ + int updateByExampleSelective(@Param("record") DashboardLevelRoleUser record, @Param("example") DashboardLevelRoleUserExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_user + * + * @mbg.generated + */ + int updateByExample(@Param("record") DashboardLevelRoleUser record, @Param("example") DashboardLevelRoleUserExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_user + * + * @mbg.generated + */ + int updateByPrimaryKeySelective(DashboardLevelRoleUser record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_user + * + * @mbg.generated + */ + int updateByPrimaryKey(DashboardLevelRoleUser record); +} \ No newline at end of file diff --git a/dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/BasicBuildingMapperExt.java b/dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/BasicBuildingMapperExt.java index b5d8be5..29efef7 100644 --- a/dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/BasicBuildingMapperExt.java +++ b/dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/BasicBuildingMapperExt.java @@ -14,4 +14,6 @@ public interface BasicBuildingMapperExt extends BasicBuildingMapper { List getListPage(BuildingSearchParams pageSearchParam); List getBuildingIdListByCompanyId(@Param("companyIdList") List companyIdList); + + List getBuildingListBySiteId(@Param("siteId") Long siteId); } diff --git a/dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/LevelMapperExt.java b/dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/LevelMapperExt.java index daad636..7bfe6c1 100644 --- a/dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/LevelMapperExt.java +++ b/dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/LevelMapperExt.java @@ -40,4 +40,5 @@ public interface LevelMapperExt { List selectBuildingFullPath(Map buildingMap); + void deleteSiteBuildingRelation(Map delParamMap); } \ No newline at end of file diff --git a/dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/LevelRoleMapperExt.java b/dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/LevelRoleMapperExt.java new file mode 100644 index 0000000..2f5a68a --- /dev/null +++ b/dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/LevelRoleMapperExt.java @@ -0,0 +1,43 @@ +package com.dongjian.dashboard.back.dao.ex; + +import com.dongjian.dashboard.back.dao.auto.DashboardLevelRoleMapper; +import com.dongjian.dashboard.back.dto.BaseSearchParams; +import com.dongjian.dashboard.back.dto.levelrole.OptLevelRoleParam; +import com.dongjian.dashboard.back.dto.levelrole.PageBoundRoleSearchParam; +import com.dongjian.dashboard.back.dto.levelrole.PageLevelRoleSearchParam; +import com.dongjian.dashboard.back.vo.levelrole.LevelRolePageDTO; +import com.dongjian.dashboard.back.vo.levelrole.RefKey; +import com.dongjian.dashboard.back.vo.levelrole.UserBindLevelRoleVO; +import com.dongjian.dashboard.back.vo.levelrole.UserBoundRolePageDTO; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; +import java.util.Map; + +@Mapper +public interface LevelRoleMapperExt extends DashboardLevelRoleMapper { + + long checkExist(OptLevelRoleParam param); + + List getListPage(PageLevelRoleSearchParam pageSearchParam); + + List selectAllBranches(Map levelMap); + + List selectAllStores(Map levelMap); + + List selectAllAreas(Map levelMap); + + List selectAllSites(Map levelMap); + + List selectAllBuildings(Map levelMap); + + List selectUserRefs(Map param); + + List getBoundLevelByRole(Long roleId); + + List getAlreadyBoundUserPage(PageBoundRoleSearchParam pageSearchParam); + + List getCanBeBoundUserPage(BaseSearchParams pageSearchParam); + + Integer checkLevelManager(Long userId); +} \ No newline at end of file diff --git a/dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/LevelRoleObjectMapperExt.java b/dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/LevelRoleObjectMapperExt.java new file mode 100644 index 0000000..2aa24f5 --- /dev/null +++ b/dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/LevelRoleObjectMapperExt.java @@ -0,0 +1,9 @@ +package com.dongjian.dashboard.back.dao.ex; + +import com.dongjian.dashboard.back.dao.auto.DashboardLevelRoleObjectMapper; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface LevelRoleObjectMapperExt extends DashboardLevelRoleObjectMapper { + +} \ No newline at end of file diff --git a/dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/LevelRoleUserMapperExt.java b/dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/LevelRoleUserMapperExt.java new file mode 100644 index 0000000..51f95a1 --- /dev/null +++ b/dongjian-dashboard-back-dao/src/main/java/com/dongjian/dashboard/back/dao/ex/LevelRoleUserMapperExt.java @@ -0,0 +1,9 @@ +package com.dongjian.dashboard.back.dao.ex; + +import com.dongjian.dashboard.back.dao.auto.DashboardLevelRoleUserMapper; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface LevelRoleUserMapperExt extends DashboardLevelRoleUserMapper { + +} \ No newline at end of file diff --git a/dongjian-dashboard-back-dao/src/main/resources/mappers/auto/DashboardLevelRoleMapper.xml b/dongjian-dashboard-back-dao/src/main/resources/mappers/auto/DashboardLevelRoleMapper.xml new file mode 100644 index 0000000..66db290 --- /dev/null +++ b/dongjian-dashboard-back-dao/src/main/resources/mappers/auto/DashboardLevelRoleMapper.xml @@ -0,0 +1,334 @@ + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + id, company_id, `name`, remark, flag, created_by, created_at, updated_at, updated_by + + + + + + delete from dashboard_level_role + where id = #{id,jdbcType=BIGINT} + + + + delete from dashboard_level_role + + + + + + + + SELECT LAST_INSERT_ID() + + insert into dashboard_level_role (company_id, `name`, remark, + flag, created_by, created_at, + updated_at, updated_by) + values (#{companyId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, + #{flag,jdbcType=INTEGER}, #{createdBy,jdbcType=BIGINT}, #{createdAt,jdbcType=BIGINT}, + #{updatedAt,jdbcType=BIGINT}, #{updatedBy,jdbcType=BIGINT}) + + + + + SELECT LAST_INSERT_ID() + + insert into dashboard_level_role + + + company_id, + + + `name`, + + + remark, + + + flag, + + + created_by, + + + created_at, + + + updated_at, + + + updated_by, + + + + + #{companyId,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{remark,jdbcType=VARCHAR}, + + + #{flag,jdbcType=INTEGER}, + + + #{createdBy,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=BIGINT}, + + + #{updatedAt,jdbcType=BIGINT}, + + + #{updatedBy,jdbcType=BIGINT}, + + + + + + + update dashboard_level_role + + + id = #{record.id,jdbcType=BIGINT}, + + + company_id = #{record.companyId,jdbcType=BIGINT}, + + + `name` = #{record.name,jdbcType=VARCHAR}, + + + remark = #{record.remark,jdbcType=VARCHAR}, + + + flag = #{record.flag,jdbcType=INTEGER}, + + + created_by = #{record.createdBy,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=BIGINT}, + + + updated_at = #{record.updatedAt,jdbcType=BIGINT}, + + + updated_by = #{record.updatedBy,jdbcType=BIGINT}, + + + + + + + + + update dashboard_level_role + set id = #{record.id,jdbcType=BIGINT}, + company_id = #{record.companyId,jdbcType=BIGINT}, + `name` = #{record.name,jdbcType=VARCHAR}, + remark = #{record.remark,jdbcType=VARCHAR}, + flag = #{record.flag,jdbcType=INTEGER}, + created_by = #{record.createdBy,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=BIGINT}, + updated_at = #{record.updatedAt,jdbcType=BIGINT}, + updated_by = #{record.updatedBy,jdbcType=BIGINT} + + + + + + + update dashboard_level_role + + + company_id = #{companyId,jdbcType=BIGINT}, + + + `name` = #{name,jdbcType=VARCHAR}, + + + remark = #{remark,jdbcType=VARCHAR}, + + + flag = #{flag,jdbcType=INTEGER}, + + + created_by = #{createdBy,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=BIGINT}, + + + updated_at = #{updatedAt,jdbcType=BIGINT}, + + + updated_by = #{updatedBy,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=BIGINT} + + + + update dashboard_level_role + set company_id = #{companyId,jdbcType=BIGINT}, + `name` = #{name,jdbcType=VARCHAR}, + remark = #{remark,jdbcType=VARCHAR}, + flag = #{flag,jdbcType=INTEGER}, + created_by = #{createdBy,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT}, + updated_by = #{updatedBy,jdbcType=BIGINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/dongjian-dashboard-back-dao/src/main/resources/mappers/auto/DashboardLevelRoleObjectMapper.xml b/dongjian-dashboard-back-dao/src/main/resources/mappers/auto/DashboardLevelRoleObjectMapper.xml new file mode 100644 index 0000000..971bd5a --- /dev/null +++ b/dongjian-dashboard-back-dao/src/main/resources/mappers/auto/DashboardLevelRoleObjectMapper.xml @@ -0,0 +1,244 @@ + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + level_role_id, ref_type, ref_id, created_by, created_at, updated_at, updated_by + + + + + delete from dashboard_level_role_object + + + + + + + insert into dashboard_level_role_object (level_role_id, ref_type, ref_id, + created_by, created_at, updated_at, + updated_by) + values (#{levelRoleId,jdbcType=BIGINT}, #{refType,jdbcType=CHAR}, #{refId,jdbcType=BIGINT}, + #{createdBy,jdbcType=BIGINT}, #{createdAt,jdbcType=BIGINT}, #{updatedAt,jdbcType=BIGINT}, + #{updatedBy,jdbcType=BIGINT}) + + + + insert into dashboard_level_role_object + + + level_role_id, + + + ref_type, + + + ref_id, + + + created_by, + + + created_at, + + + updated_at, + + + updated_by, + + + + + #{levelRoleId,jdbcType=BIGINT}, + + + #{refType,jdbcType=CHAR}, + + + #{refId,jdbcType=BIGINT}, + + + #{createdBy,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=BIGINT}, + + + #{updatedAt,jdbcType=BIGINT}, + + + #{updatedBy,jdbcType=BIGINT}, + + + + + + + update dashboard_level_role_object + + + level_role_id = #{record.levelRoleId,jdbcType=BIGINT}, + + + ref_type = #{record.refType,jdbcType=CHAR}, + + + ref_id = #{record.refId,jdbcType=BIGINT}, + + + created_by = #{record.createdBy,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=BIGINT}, + + + updated_at = #{record.updatedAt,jdbcType=BIGINT}, + + + updated_by = #{record.updatedBy,jdbcType=BIGINT}, + + + + + + + + + update dashboard_level_role_object + set level_role_id = #{record.levelRoleId,jdbcType=BIGINT}, + ref_type = #{record.refType,jdbcType=CHAR}, + ref_id = #{record.refId,jdbcType=BIGINT}, + created_by = #{record.createdBy,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=BIGINT}, + updated_at = #{record.updatedAt,jdbcType=BIGINT}, + updated_by = #{record.updatedBy,jdbcType=BIGINT} + + + + + \ No newline at end of file diff --git a/dongjian-dashboard-back-dao/src/main/resources/mappers/auto/DashboardLevelRoleUserMapper.xml b/dongjian-dashboard-back-dao/src/main/resources/mappers/auto/DashboardLevelRoleUserMapper.xml new file mode 100644 index 0000000..dd90224 --- /dev/null +++ b/dongjian-dashboard-back-dao/src/main/resources/mappers/auto/DashboardLevelRoleUserMapper.xml @@ -0,0 +1,319 @@ + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + id, user_id, level_role_id, ref_type, created_by, created_at, updated_at, updated_by + + + + + + delete from dashboard_level_role_user + where id = #{id,jdbcType=BIGINT} + + + + delete from dashboard_level_role_user + + + + + + + insert into dashboard_level_role_user (id, user_id, level_role_id, + ref_type, created_by, created_at, + updated_at, updated_by) + values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{levelRoleId,jdbcType=BIGINT}, + #{refType,jdbcType=INTEGER}, #{createdBy,jdbcType=BIGINT}, #{createdAt,jdbcType=BIGINT}, + #{updatedAt,jdbcType=BIGINT}, #{updatedBy,jdbcType=BIGINT}) + + + + insert into dashboard_level_role_user + + + id, + + + user_id, + + + level_role_id, + + + ref_type, + + + created_by, + + + created_at, + + + updated_at, + + + updated_by, + + + + + #{id,jdbcType=BIGINT}, + + + #{userId,jdbcType=BIGINT}, + + + #{levelRoleId,jdbcType=BIGINT}, + + + #{refType,jdbcType=INTEGER}, + + + #{createdBy,jdbcType=BIGINT}, + + + #{createdAt,jdbcType=BIGINT}, + + + #{updatedAt,jdbcType=BIGINT}, + + + #{updatedBy,jdbcType=BIGINT}, + + + + + + + update dashboard_level_role_user + + + id = #{record.id,jdbcType=BIGINT}, + + + user_id = #{record.userId,jdbcType=BIGINT}, + + + level_role_id = #{record.levelRoleId,jdbcType=BIGINT}, + + + ref_type = #{record.refType,jdbcType=INTEGER}, + + + created_by = #{record.createdBy,jdbcType=BIGINT}, + + + created_at = #{record.createdAt,jdbcType=BIGINT}, + + + updated_at = #{record.updatedAt,jdbcType=BIGINT}, + + + updated_by = #{record.updatedBy,jdbcType=BIGINT}, + + + + + + + + + update dashboard_level_role_user + set id = #{record.id,jdbcType=BIGINT}, + user_id = #{record.userId,jdbcType=BIGINT}, + level_role_id = #{record.levelRoleId,jdbcType=BIGINT}, + ref_type = #{record.refType,jdbcType=INTEGER}, + created_by = #{record.createdBy,jdbcType=BIGINT}, + created_at = #{record.createdAt,jdbcType=BIGINT}, + updated_at = #{record.updatedAt,jdbcType=BIGINT}, + updated_by = #{record.updatedBy,jdbcType=BIGINT} + + + + + + + update dashboard_level_role_user + + + user_id = #{userId,jdbcType=BIGINT}, + + + level_role_id = #{levelRoleId,jdbcType=BIGINT}, + + + ref_type = #{refType,jdbcType=INTEGER}, + + + created_by = #{createdBy,jdbcType=BIGINT}, + + + created_at = #{createdAt,jdbcType=BIGINT}, + + + updated_at = #{updatedAt,jdbcType=BIGINT}, + + + updated_by = #{updatedBy,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=BIGINT} + + + + update dashboard_level_role_user + set user_id = #{userId,jdbcType=BIGINT}, + level_role_id = #{levelRoleId,jdbcType=BIGINT}, + ref_type = #{refType,jdbcType=INTEGER}, + created_by = #{createdBy,jdbcType=BIGINT}, + created_at = #{createdAt,jdbcType=BIGINT}, + updated_at = #{updatedAt,jdbcType=BIGINT}, + updated_by = #{updatedBy,jdbcType=BIGINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/dongjian-dashboard-back-dao/src/main/resources/mappers/ex/BasicBuildingMapperExt.xml b/dongjian-dashboard-back-dao/src/main/resources/mappers/ex/BasicBuildingMapperExt.xml index ac7ab30..ef7ee77 100644 --- a/dongjian-dashboard-back-dao/src/main/resources/mappers/ex/BasicBuildingMapperExt.xml +++ b/dongjian-dashboard-back-dao/src/main/resources/mappers/ex/BasicBuildingMapperExt.xml @@ -45,6 +45,18 @@ ORDER BY building_id + + + \ No newline at end of file diff --git a/dongjian-dashboard-back-dao/src/main/resources/mappers/ex/LevelMapperExt.xml b/dongjian-dashboard-back-dao/src/main/resources/mappers/ex/LevelMapperExt.xml index cb1d397..9bbc136 100644 --- a/dongjian-dashboard-back-dao/src/main/resources/mappers/ex/LevelMapperExt.xml +++ b/dongjian-dashboard-back-dao/src/main/resources/mappers/ex/LevelMapperExt.xml @@ -1,7 +1,7 @@ - + @@ -19,7 +19,7 @@ dashboard_level_area - + + + delete from dashboard_level_relation_site_building WHERE site_id = #{siteId} + + \ No newline at end of file diff --git a/dongjian-dashboard-back-dao/src/main/resources/mappers/ex/LevelRoleMapperExt.xml b/dongjian-dashboard-back-dao/src/main/resources/mappers/ex/LevelRoleMapperExt.xml new file mode 100644 index 0000000..f5f4ab8 --- /dev/null +++ b/dongjian-dashboard-back-dao/src/main/resources/mappers/ex/LevelRoleMapperExt.xml @@ -0,0 +1,213 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dongjian-dashboard-back-dao/src/main/resources/mybatis-generator/generatorConfig.xml b/dongjian-dashboard-back-dao/src/main/resources/mybatis-generator/generatorConfig.xml index 96e2c69..f4885b0 100644 --- a/dongjian-dashboard-back-dao/src/main/resources/mybatis-generator/generatorConfig.xml +++ b/dongjian-dashboard-back-dao/src/main/resources/mybatis-generator/generatorConfig.xml @@ -164,5 +164,18 @@ + + + +
+ + + +
+ + + +
+ \ No newline at end of file diff --git a/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/level/OptLevelParam.java b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/level/OptLevelParam.java index 79e5cae..d9dba3a 100644 --- a/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/level/OptLevelParam.java +++ b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/level/OptLevelParam.java @@ -44,6 +44,9 @@ public class OptLevelParam { @Schema(description = "备注",example = "2") private String remark; + @Schema(description = "楼宇ID, levelType=4时才需要传",example = "[]", required = true) + private List buildingIdList; + @Schema(description = "所属企业ID",example = "2", hidden = true) private Long companyId; diff --git a/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/levelrole/BindUserParam.java b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/levelrole/BindUserParam.java new file mode 100644 index 0000000..3598c6b --- /dev/null +++ b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/levelrole/BindUserParam.java @@ -0,0 +1,19 @@ +package com.dongjian.dashboard.back.dto.levelrole; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Getter; +import lombok.Setter; + +import java.util.List; + +@Setter +@Getter +public class BindUserParam { + + @Schema(description = "用户id",example = "3", required = true) + private Long userId; + + @Schema(description = "层级角色ID",example = "[]", required = true) + private List levelRoleId; + +} \ No newline at end of file diff --git a/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/levelrole/DeleteLevelRoleParam.java b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/levelrole/DeleteLevelRoleParam.java new file mode 100644 index 0000000..0ad80ac --- /dev/null +++ b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/levelrole/DeleteLevelRoleParam.java @@ -0,0 +1,13 @@ +package com.dongjian.dashboard.back.dto.levelrole; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Getter; +import lombok.Setter; + +@Setter +@Getter +public class DeleteLevelRoleParam { + + @Schema(description = "Id,多个使用逗号连接",example = "3,5", required = true) + private String ids; +} \ No newline at end of file diff --git a/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/levelrole/OptLevelRoleParam.java b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/levelrole/OptLevelRoleParam.java new file mode 100644 index 0000000..bd39308 --- /dev/null +++ b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/levelrole/OptLevelRoleParam.java @@ -0,0 +1,31 @@ +package com.dongjian.dashboard.back.dto.levelrole; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Getter; +import lombok.Setter; + +import java.util.List; + +@Setter +@Getter +public class OptLevelRoleParam { + + /** + * 主键ID(编辑时必填) + */ + @Schema(description = "物件级别id,新增时不需要)",example = "2", required = true) + private Long id; + + @Schema(description = "名称)",example = "2", required = true) + private String levelRoleName; + + @Schema(description = "备注",example = "2") + private String remark; + + @Schema(description = "绑定的层级信息,数组格式,[BRANCH-1,STORE-2,AREA-3]",example = "[]") + private List levelList; + + @Schema(description = "所属企业ID",example = "2", hidden = true) + private Long companyId; + +} \ No newline at end of file diff --git a/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/levelrole/PageBoundRoleSearchParam.java b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/levelrole/PageBoundRoleSearchParam.java new file mode 100644 index 0000000..3b2d5f3 --- /dev/null +++ b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/levelrole/PageBoundRoleSearchParam.java @@ -0,0 +1,14 @@ +package com.dongjian.dashboard.back.dto.levelrole; + +import com.dongjian.dashboard.back.dto.BaseSearchParams; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Getter; +import lombok.Setter; + +@Setter +@Getter +public class PageBoundRoleSearchParam extends BaseSearchParams { + + @Schema(description = "需要查询的用户") + private Long targetUserId; +} \ No newline at end of file diff --git a/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/levelrole/PageLevelRoleSearchParam.java b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/levelrole/PageLevelRoleSearchParam.java new file mode 100644 index 0000000..7b6b6e9 --- /dev/null +++ b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/levelrole/PageLevelRoleSearchParam.java @@ -0,0 +1,22 @@ +package com.dongjian.dashboard.back.dto.levelrole; + +import com.dongjian.dashboard.back.dto.BaseSearchParams; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Getter; +import lombok.Setter; + +import java.util.List; + +@Setter +@Getter +public class PageLevelRoleSearchParam extends BaseSearchParams { + + @Schema(description = "id") + private String ids; + + @Schema(description = "id", hidden = true) + private List idList; + + @Schema(description = "名称",example = "jyk2") + private String levelRoleName; +} \ No newline at end of file diff --git a/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/levelrole/UnbindUserParam.java b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/levelrole/UnbindUserParam.java new file mode 100644 index 0000000..9076ffc --- /dev/null +++ b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/dto/levelrole/UnbindUserParam.java @@ -0,0 +1,16 @@ +package com.dongjian.dashboard.back.dto.levelrole; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Getter; +import lombok.Setter; + +import java.util.List; + +@Setter +@Getter +public class UnbindUserParam { + + @Schema(description = "绑定关系id,数组格式,可以传多个",example = "[3]", required = true) + private List relationIdList; + +} \ No newline at end of file diff --git a/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/easyexcel/ExportDeviceTrendLogDataDTO.java b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/easyexcel/ExportDeviceTrendLogDataDTO.java index 04dd747..bdbf213 100644 --- a/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/easyexcel/ExportDeviceTrendLogDataDTO.java +++ b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/easyexcel/ExportDeviceTrendLogDataDTO.java @@ -30,7 +30,7 @@ public class ExportDeviceTrendLogDataDTO { @ExcelProperty({"设备状态", "Device Status", "ステータスフラグ"}) private String status111; - @ExcelProperty({"积算值", "Accumulated Value", "積算値"}) + @ExcelProperty({"积算值", "Accumulated Value", "計量・計測・運転値"}) private String cumulativeValue; // @ExcelProperty({"前日比(%)", "Previous Day Ratio(%)", "前日比(%)"}) diff --git a/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DashboardLevelRole.java b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DashboardLevelRole.java new file mode 100644 index 0000000..86cdc36 --- /dev/null +++ b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DashboardLevelRole.java @@ -0,0 +1,336 @@ +package com.dongjian.dashboard.back.model; + +import java.io.Serializable; + +public class DashboardLevelRole implements Serializable { + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column dashboard_level_role.id + * + * @mbg.generated + */ + private Long id; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column dashboard_level_role.company_id + * + * @mbg.generated + */ + private Long companyId; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column dashboard_level_role.name + * + * @mbg.generated + */ + private String name; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column dashboard_level_role.remark + * + * @mbg.generated + */ + private String remark; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column dashboard_level_role.flag + * + * @mbg.generated + */ + private Integer flag; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column dashboard_level_role.created_by + * + * @mbg.generated + */ + private Long createdBy; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column dashboard_level_role.created_at + * + * @mbg.generated + */ + private Long createdAt; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column dashboard_level_role.updated_at + * + * @mbg.generated + */ + private Long updatedAt; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column dashboard_level_role.updated_by + * + * @mbg.generated + */ + private Long updatedBy; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table dashboard_level_role + * + * @mbg.generated + */ + private static final long serialVersionUID = 1L; + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column dashboard_level_role.id + * + * @return the value of dashboard_level_role.id + * + * @mbg.generated + */ + public Long getId() { + return id; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column dashboard_level_role.id + * + * @param id the value for dashboard_level_role.id + * + * @mbg.generated + */ + public void setId(Long id) { + this.id = id; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column dashboard_level_role.company_id + * + * @return the value of dashboard_level_role.company_id + * + * @mbg.generated + */ + public Long getCompanyId() { + return companyId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column dashboard_level_role.company_id + * + * @param companyId the value for dashboard_level_role.company_id + * + * @mbg.generated + */ + public void setCompanyId(Long companyId) { + this.companyId = companyId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column dashboard_level_role.name + * + * @return the value of dashboard_level_role.name + * + * @mbg.generated + */ + public String getName() { + return name; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column dashboard_level_role.name + * + * @param name the value for dashboard_level_role.name + * + * @mbg.generated + */ + public void setName(String name) { + this.name = name == null ? null : name.trim(); + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column dashboard_level_role.remark + * + * @return the value of dashboard_level_role.remark + * + * @mbg.generated + */ + public String getRemark() { + return remark; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column dashboard_level_role.remark + * + * @param remark the value for dashboard_level_role.remark + * + * @mbg.generated + */ + public void setRemark(String remark) { + this.remark = remark == null ? null : remark.trim(); + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column dashboard_level_role.flag + * + * @return the value of dashboard_level_role.flag + * + * @mbg.generated + */ + public Integer getFlag() { + return flag; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column dashboard_level_role.flag + * + * @param flag the value for dashboard_level_role.flag + * + * @mbg.generated + */ + public void setFlag(Integer flag) { + this.flag = flag; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column dashboard_level_role.created_by + * + * @return the value of dashboard_level_role.created_by + * + * @mbg.generated + */ + public Long getCreatedBy() { + return createdBy; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column dashboard_level_role.created_by + * + * @param createdBy the value for dashboard_level_role.created_by + * + * @mbg.generated + */ + public void setCreatedBy(Long createdBy) { + this.createdBy = createdBy; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column dashboard_level_role.created_at + * + * @return the value of dashboard_level_role.created_at + * + * @mbg.generated + */ + public Long getCreatedAt() { + return createdAt; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column dashboard_level_role.created_at + * + * @param createdAt the value for dashboard_level_role.created_at + * + * @mbg.generated + */ + public void setCreatedAt(Long createdAt) { + this.createdAt = createdAt; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column dashboard_level_role.updated_at + * + * @return the value of dashboard_level_role.updated_at + * + * @mbg.generated + */ + public Long getUpdatedAt() { + return updatedAt; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column dashboard_level_role.updated_at + * + * @param updatedAt the value for dashboard_level_role.updated_at + * + * @mbg.generated + */ + public void setUpdatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column dashboard_level_role.updated_by + * + * @return the value of dashboard_level_role.updated_by + * + * @mbg.generated + */ + public Long getUpdatedBy() { + return updatedBy; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column dashboard_level_role.updated_by + * + * @param updatedBy the value for dashboard_level_role.updated_by + * + * @mbg.generated + */ + public void setUpdatedBy(Long updatedBy) { + this.updatedBy = updatedBy; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role + * + * @mbg.generated + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", companyId=").append(companyId); + sb.append(", name=").append(name); + sb.append(", remark=").append(remark); + sb.append(", flag=").append(flag); + sb.append(", createdBy=").append(createdBy); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", updatedBy=").append(updatedBy); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DashboardLevelRoleExample.java b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DashboardLevelRoleExample.java new file mode 100644 index 0000000..cd722ab --- /dev/null +++ b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DashboardLevelRoleExample.java @@ -0,0 +1,862 @@ +package com.dongjian.dashboard.back.model; + +import java.util.ArrayList; +import java.util.List; + +public class DashboardLevelRoleExample { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table dashboard_level_role + * + * @mbg.generated + */ + protected String orderByClause; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table dashboard_level_role + * + * @mbg.generated + */ + protected boolean distinct; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table dashboard_level_role + * + * @mbg.generated + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role + * + * @mbg.generated + */ + public DashboardLevelRoleExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role + * + * @mbg.generated + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role + * + * @mbg.generated + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role + * + * @mbg.generated + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role + * + * @mbg.generated + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role + * + * @mbg.generated + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role + * + * @mbg.generated + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role + * + * @mbg.generated + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role + * + * @mbg.generated + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role + * + * @mbg.generated + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role + * + * @mbg.generated + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table dashboard_level_role + * + * @mbg.generated + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNull() { + addCriterion("company_id is null"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNotNull() { + addCriterion("company_id is not null"); + return (Criteria) this; + } + + public Criteria andCompanyIdEqualTo(Long value) { + addCriterion("company_id =", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotEqualTo(Long value) { + addCriterion("company_id <>", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThan(Long value) { + addCriterion("company_id >", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThanOrEqualTo(Long value) { + addCriterion("company_id >=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThan(Long value) { + addCriterion("company_id <", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThanOrEqualTo(Long value) { + addCriterion("company_id <=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdIn(List values) { + addCriterion("company_id in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotIn(List values) { + addCriterion("company_id not in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdBetween(Long value1, Long value2) { + addCriterion("company_id between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotBetween(Long value1, Long value2) { + addCriterion("company_id not between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andRemarkIsNull() { + addCriterion("remark is null"); + return (Criteria) this; + } + + public Criteria andRemarkIsNotNull() { + addCriterion("remark is not null"); + return (Criteria) this; + } + + public Criteria andRemarkEqualTo(String value) { + addCriterion("remark =", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotEqualTo(String value) { + addCriterion("remark <>", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThan(String value) { + addCriterion("remark >", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkGreaterThanOrEqualTo(String value) { + addCriterion("remark >=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThan(String value) { + addCriterion("remark <", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLessThanOrEqualTo(String value) { + addCriterion("remark <=", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkLike(String value) { + addCriterion("remark like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotLike(String value) { + addCriterion("remark not like", value, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkIn(List values) { + addCriterion("remark in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotIn(List values) { + addCriterion("remark not in", values, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkBetween(String value1, String value2) { + addCriterion("remark between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andRemarkNotBetween(String value1, String value2) { + addCriterion("remark not between", value1, value2, "remark"); + return (Criteria) this; + } + + public Criteria andFlagIsNull() { + addCriterion("flag is null"); + return (Criteria) this; + } + + public Criteria andFlagIsNotNull() { + addCriterion("flag is not null"); + return (Criteria) this; + } + + public Criteria andFlagEqualTo(Integer value) { + addCriterion("flag =", value, "flag"); + return (Criteria) this; + } + + public Criteria andFlagNotEqualTo(Integer value) { + addCriterion("flag <>", value, "flag"); + return (Criteria) this; + } + + public Criteria andFlagGreaterThan(Integer value) { + addCriterion("flag >", value, "flag"); + return (Criteria) this; + } + + public Criteria andFlagGreaterThanOrEqualTo(Integer value) { + addCriterion("flag >=", value, "flag"); + return (Criteria) this; + } + + public Criteria andFlagLessThan(Integer value) { + addCriterion("flag <", value, "flag"); + return (Criteria) this; + } + + public Criteria andFlagLessThanOrEqualTo(Integer value) { + addCriterion("flag <=", value, "flag"); + return (Criteria) this; + } + + public Criteria andFlagIn(List values) { + addCriterion("flag in", values, "flag"); + return (Criteria) this; + } + + public Criteria andFlagNotIn(List values) { + addCriterion("flag not in", values, "flag"); + return (Criteria) this; + } + + public Criteria andFlagBetween(Integer value1, Integer value2) { + addCriterion("flag between", value1, value2, "flag"); + return (Criteria) this; + } + + public Criteria andFlagNotBetween(Integer value1, Integer value2) { + addCriterion("flag not between", value1, value2, "flag"); + return (Criteria) this; + } + + public Criteria andCreatedByIsNull() { + addCriterion("created_by is null"); + return (Criteria) this; + } + + public Criteria andCreatedByIsNotNull() { + addCriterion("created_by is not null"); + return (Criteria) this; + } + + public Criteria andCreatedByEqualTo(Long value) { + addCriterion("created_by =", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByNotEqualTo(Long value) { + addCriterion("created_by <>", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByGreaterThan(Long value) { + addCriterion("created_by >", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByGreaterThanOrEqualTo(Long value) { + addCriterion("created_by >=", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByLessThan(Long value) { + addCriterion("created_by <", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByLessThanOrEqualTo(Long value) { + addCriterion("created_by <=", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByIn(List values) { + addCriterion("created_by in", values, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByNotIn(List values) { + addCriterion("created_by not in", values, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByBetween(Long value1, Long value2) { + addCriterion("created_by between", value1, value2, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByNotBetween(Long value1, Long value2) { + addCriterion("created_by not between", value1, value2, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Long value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Long value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Long value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Long value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Long value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Long value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Long value1, Long value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Long value1, Long value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Long value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Long value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Long value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Long value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Long value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Long value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Long value1, Long value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Long value1, Long value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedByIsNull() { + addCriterion("updated_by is null"); + return (Criteria) this; + } + + public Criteria andUpdatedByIsNotNull() { + addCriterion("updated_by is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedByEqualTo(Long value) { + addCriterion("updated_by =", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByNotEqualTo(Long value) { + addCriterion("updated_by <>", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByGreaterThan(Long value) { + addCriterion("updated_by >", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByGreaterThanOrEqualTo(Long value) { + addCriterion("updated_by >=", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByLessThan(Long value) { + addCriterion("updated_by <", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByLessThanOrEqualTo(Long value) { + addCriterion("updated_by <=", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByIn(List values) { + addCriterion("updated_by in", values, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByNotIn(List values) { + addCriterion("updated_by not in", values, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByBetween(Long value1, Long value2) { + addCriterion("updated_by between", value1, value2, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByNotBetween(Long value1, Long value2) { + addCriterion("updated_by not between", value1, value2, "updatedBy"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table dashboard_level_role + * + * @mbg.generated do_not_delete_during_merge + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table dashboard_level_role + * + * @mbg.generated + */ + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DashboardLevelRoleObject.java b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DashboardLevelRoleObject.java new file mode 100644 index 0000000..8fc4ef2 --- /dev/null +++ b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DashboardLevelRoleObject.java @@ -0,0 +1,268 @@ +package com.dongjian.dashboard.back.model; + +import java.io.Serializable; + +public class DashboardLevelRoleObject implements Serializable { + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column dashboard_level_role_object.level_role_id + * + * @mbg.generated + */ + private Long levelRoleId; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column dashboard_level_role_object.ref_type + * + * @mbg.generated + */ + private String refType; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column dashboard_level_role_object.ref_id + * + * @mbg.generated + */ + private Long refId; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column dashboard_level_role_object.created_by + * + * @mbg.generated + */ + private Long createdBy; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column dashboard_level_role_object.created_at + * + * @mbg.generated + */ + private Long createdAt; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column dashboard_level_role_object.updated_at + * + * @mbg.generated + */ + private Long updatedAt; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column dashboard_level_role_object.updated_by + * + * @mbg.generated + */ + private Long updatedBy; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table dashboard_level_role_object + * + * @mbg.generated + */ + private static final long serialVersionUID = 1L; + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column dashboard_level_role_object.level_role_id + * + * @return the value of dashboard_level_role_object.level_role_id + * + * @mbg.generated + */ + public Long getLevelRoleId() { + return levelRoleId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column dashboard_level_role_object.level_role_id + * + * @param levelRoleId the value for dashboard_level_role_object.level_role_id + * + * @mbg.generated + */ + public void setLevelRoleId(Long levelRoleId) { + this.levelRoleId = levelRoleId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column dashboard_level_role_object.ref_type + * + * @return the value of dashboard_level_role_object.ref_type + * + * @mbg.generated + */ + public String getRefType() { + return refType; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column dashboard_level_role_object.ref_type + * + * @param refType the value for dashboard_level_role_object.ref_type + * + * @mbg.generated + */ + public void setRefType(String refType) { + this.refType = refType == null ? null : refType.trim(); + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column dashboard_level_role_object.ref_id + * + * @return the value of dashboard_level_role_object.ref_id + * + * @mbg.generated + */ + public Long getRefId() { + return refId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column dashboard_level_role_object.ref_id + * + * @param refId the value for dashboard_level_role_object.ref_id + * + * @mbg.generated + */ + public void setRefId(Long refId) { + this.refId = refId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column dashboard_level_role_object.created_by + * + * @return the value of dashboard_level_role_object.created_by + * + * @mbg.generated + */ + public Long getCreatedBy() { + return createdBy; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column dashboard_level_role_object.created_by + * + * @param createdBy the value for dashboard_level_role_object.created_by + * + * @mbg.generated + */ + public void setCreatedBy(Long createdBy) { + this.createdBy = createdBy; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column dashboard_level_role_object.created_at + * + * @return the value of dashboard_level_role_object.created_at + * + * @mbg.generated + */ + public Long getCreatedAt() { + return createdAt; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column dashboard_level_role_object.created_at + * + * @param createdAt the value for dashboard_level_role_object.created_at + * + * @mbg.generated + */ + public void setCreatedAt(Long createdAt) { + this.createdAt = createdAt; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column dashboard_level_role_object.updated_at + * + * @return the value of dashboard_level_role_object.updated_at + * + * @mbg.generated + */ + public Long getUpdatedAt() { + return updatedAt; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column dashboard_level_role_object.updated_at + * + * @param updatedAt the value for dashboard_level_role_object.updated_at + * + * @mbg.generated + */ + public void setUpdatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column dashboard_level_role_object.updated_by + * + * @return the value of dashboard_level_role_object.updated_by + * + * @mbg.generated + */ + public Long getUpdatedBy() { + return updatedBy; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column dashboard_level_role_object.updated_by + * + * @param updatedBy the value for dashboard_level_role_object.updated_by + * + * @mbg.generated + */ + public void setUpdatedBy(Long updatedBy) { + this.updatedBy = updatedBy; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_object + * + * @mbg.generated + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", levelRoleId=").append(levelRoleId); + sb.append(", refType=").append(refType); + sb.append(", refId=").append(refId); + sb.append(", createdBy=").append(createdBy); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", updatedBy=").append(updatedBy); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DashboardLevelRoleObjectExample.java b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DashboardLevelRoleObjectExample.java new file mode 100644 index 0000000..9695247 --- /dev/null +++ b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DashboardLevelRoleObjectExample.java @@ -0,0 +1,732 @@ +package com.dongjian.dashboard.back.model; + +import java.util.ArrayList; +import java.util.List; + +public class DashboardLevelRoleObjectExample { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table dashboard_level_role_object + * + * @mbg.generated + */ + protected String orderByClause; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table dashboard_level_role_object + * + * @mbg.generated + */ + protected boolean distinct; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table dashboard_level_role_object + * + * @mbg.generated + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_object + * + * @mbg.generated + */ + public DashboardLevelRoleObjectExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_object + * + * @mbg.generated + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_object + * + * @mbg.generated + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_object + * + * @mbg.generated + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_object + * + * @mbg.generated + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_object + * + * @mbg.generated + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_object + * + * @mbg.generated + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_object + * + * @mbg.generated + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_object + * + * @mbg.generated + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_object + * + * @mbg.generated + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_object + * + * @mbg.generated + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table dashboard_level_role_object + * + * @mbg.generated + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andLevelRoleIdIsNull() { + addCriterion("level_role_id is null"); + return (Criteria) this; + } + + public Criteria andLevelRoleIdIsNotNull() { + addCriterion("level_role_id is not null"); + return (Criteria) this; + } + + public Criteria andLevelRoleIdEqualTo(Long value) { + addCriterion("level_role_id =", value, "levelRoleId"); + return (Criteria) this; + } + + public Criteria andLevelRoleIdNotEqualTo(Long value) { + addCriterion("level_role_id <>", value, "levelRoleId"); + return (Criteria) this; + } + + public Criteria andLevelRoleIdGreaterThan(Long value) { + addCriterion("level_role_id >", value, "levelRoleId"); + return (Criteria) this; + } + + public Criteria andLevelRoleIdGreaterThanOrEqualTo(Long value) { + addCriterion("level_role_id >=", value, "levelRoleId"); + return (Criteria) this; + } + + public Criteria andLevelRoleIdLessThan(Long value) { + addCriterion("level_role_id <", value, "levelRoleId"); + return (Criteria) this; + } + + public Criteria andLevelRoleIdLessThanOrEqualTo(Long value) { + addCriterion("level_role_id <=", value, "levelRoleId"); + return (Criteria) this; + } + + public Criteria andLevelRoleIdIn(List values) { + addCriterion("level_role_id in", values, "levelRoleId"); + return (Criteria) this; + } + + public Criteria andLevelRoleIdNotIn(List values) { + addCriterion("level_role_id not in", values, "levelRoleId"); + return (Criteria) this; + } + + public Criteria andLevelRoleIdBetween(Long value1, Long value2) { + addCriterion("level_role_id between", value1, value2, "levelRoleId"); + return (Criteria) this; + } + + public Criteria andLevelRoleIdNotBetween(Long value1, Long value2) { + addCriterion("level_role_id not between", value1, value2, "levelRoleId"); + return (Criteria) this; + } + + public Criteria andRefTypeIsNull() { + addCriterion("ref_type is null"); + return (Criteria) this; + } + + public Criteria andRefTypeIsNotNull() { + addCriterion("ref_type is not null"); + return (Criteria) this; + } + + public Criteria andRefTypeEqualTo(String value) { + addCriterion("ref_type =", value, "refType"); + return (Criteria) this; + } + + public Criteria andRefTypeNotEqualTo(String value) { + addCriterion("ref_type <>", value, "refType"); + return (Criteria) this; + } + + public Criteria andRefTypeGreaterThan(String value) { + addCriterion("ref_type >", value, "refType"); + return (Criteria) this; + } + + public Criteria andRefTypeGreaterThanOrEqualTo(String value) { + addCriterion("ref_type >=", value, "refType"); + return (Criteria) this; + } + + public Criteria andRefTypeLessThan(String value) { + addCriterion("ref_type <", value, "refType"); + return (Criteria) this; + } + + public Criteria andRefTypeLessThanOrEqualTo(String value) { + addCriterion("ref_type <=", value, "refType"); + return (Criteria) this; + } + + public Criteria andRefTypeLike(String value) { + addCriterion("ref_type like", value, "refType"); + return (Criteria) this; + } + + public Criteria andRefTypeNotLike(String value) { + addCriterion("ref_type not like", value, "refType"); + return (Criteria) this; + } + + public Criteria andRefTypeIn(List values) { + addCriterion("ref_type in", values, "refType"); + return (Criteria) this; + } + + public Criteria andRefTypeNotIn(List values) { + addCriterion("ref_type not in", values, "refType"); + return (Criteria) this; + } + + public Criteria andRefTypeBetween(String value1, String value2) { + addCriterion("ref_type between", value1, value2, "refType"); + return (Criteria) this; + } + + public Criteria andRefTypeNotBetween(String value1, String value2) { + addCriterion("ref_type not between", value1, value2, "refType"); + return (Criteria) this; + } + + public Criteria andRefIdIsNull() { + addCriterion("ref_id is null"); + return (Criteria) this; + } + + public Criteria andRefIdIsNotNull() { + addCriterion("ref_id is not null"); + return (Criteria) this; + } + + public Criteria andRefIdEqualTo(Long value) { + addCriterion("ref_id =", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdNotEqualTo(Long value) { + addCriterion("ref_id <>", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdGreaterThan(Long value) { + addCriterion("ref_id >", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdGreaterThanOrEqualTo(Long value) { + addCriterion("ref_id >=", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdLessThan(Long value) { + addCriterion("ref_id <", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdLessThanOrEqualTo(Long value) { + addCriterion("ref_id <=", value, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdIn(List values) { + addCriterion("ref_id in", values, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdNotIn(List values) { + addCriterion("ref_id not in", values, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdBetween(Long value1, Long value2) { + addCriterion("ref_id between", value1, value2, "refId"); + return (Criteria) this; + } + + public Criteria andRefIdNotBetween(Long value1, Long value2) { + addCriterion("ref_id not between", value1, value2, "refId"); + return (Criteria) this; + } + + public Criteria andCreatedByIsNull() { + addCriterion("created_by is null"); + return (Criteria) this; + } + + public Criteria andCreatedByIsNotNull() { + addCriterion("created_by is not null"); + return (Criteria) this; + } + + public Criteria andCreatedByEqualTo(Long value) { + addCriterion("created_by =", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByNotEqualTo(Long value) { + addCriterion("created_by <>", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByGreaterThan(Long value) { + addCriterion("created_by >", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByGreaterThanOrEqualTo(Long value) { + addCriterion("created_by >=", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByLessThan(Long value) { + addCriterion("created_by <", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByLessThanOrEqualTo(Long value) { + addCriterion("created_by <=", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByIn(List values) { + addCriterion("created_by in", values, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByNotIn(List values) { + addCriterion("created_by not in", values, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByBetween(Long value1, Long value2) { + addCriterion("created_by between", value1, value2, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByNotBetween(Long value1, Long value2) { + addCriterion("created_by not between", value1, value2, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Long value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Long value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Long value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Long value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Long value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Long value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Long value1, Long value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Long value1, Long value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Long value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Long value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Long value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Long value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Long value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Long value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Long value1, Long value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Long value1, Long value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedByIsNull() { + addCriterion("updated_by is null"); + return (Criteria) this; + } + + public Criteria andUpdatedByIsNotNull() { + addCriterion("updated_by is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedByEqualTo(Long value) { + addCriterion("updated_by =", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByNotEqualTo(Long value) { + addCriterion("updated_by <>", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByGreaterThan(Long value) { + addCriterion("updated_by >", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByGreaterThanOrEqualTo(Long value) { + addCriterion("updated_by >=", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByLessThan(Long value) { + addCriterion("updated_by <", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByLessThanOrEqualTo(Long value) { + addCriterion("updated_by <=", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByIn(List values) { + addCriterion("updated_by in", values, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByNotIn(List values) { + addCriterion("updated_by not in", values, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByBetween(Long value1, Long value2) { + addCriterion("updated_by between", value1, value2, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByNotBetween(Long value1, Long value2) { + addCriterion("updated_by not between", value1, value2, "updatedBy"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table dashboard_level_role_object + * + * @mbg.generated do_not_delete_during_merge + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table dashboard_level_role_object + * + * @mbg.generated + */ + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DashboardLevelRoleUser.java b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DashboardLevelRoleUser.java new file mode 100644 index 0000000..54b0ad7 --- /dev/null +++ b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DashboardLevelRoleUser.java @@ -0,0 +1,302 @@ +package com.dongjian.dashboard.back.model; + +import java.io.Serializable; + +public class DashboardLevelRoleUser implements Serializable { + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column dashboard_level_role_user.id + * + * @mbg.generated + */ + private Long id; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column dashboard_level_role_user.user_id + * + * @mbg.generated + */ + private Long userId; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column dashboard_level_role_user.level_role_id + * + * @mbg.generated + */ + private Long levelRoleId; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column dashboard_level_role_user.ref_type + * + * @mbg.generated + */ + private Integer refType; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column dashboard_level_role_user.created_by + * + * @mbg.generated + */ + private Long createdBy; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column dashboard_level_role_user.created_at + * + * @mbg.generated + */ + private Long createdAt; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column dashboard_level_role_user.updated_at + * + * @mbg.generated + */ + private Long updatedAt; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column dashboard_level_role_user.updated_by + * + * @mbg.generated + */ + private Long updatedBy; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table dashboard_level_role_user + * + * @mbg.generated + */ + private static final long serialVersionUID = 1L; + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column dashboard_level_role_user.id + * + * @return the value of dashboard_level_role_user.id + * + * @mbg.generated + */ + public Long getId() { + return id; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column dashboard_level_role_user.id + * + * @param id the value for dashboard_level_role_user.id + * + * @mbg.generated + */ + public void setId(Long id) { + this.id = id; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column dashboard_level_role_user.user_id + * + * @return the value of dashboard_level_role_user.user_id + * + * @mbg.generated + */ + public Long getUserId() { + return userId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column dashboard_level_role_user.user_id + * + * @param userId the value for dashboard_level_role_user.user_id + * + * @mbg.generated + */ + public void setUserId(Long userId) { + this.userId = userId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column dashboard_level_role_user.level_role_id + * + * @return the value of dashboard_level_role_user.level_role_id + * + * @mbg.generated + */ + public Long getLevelRoleId() { + return levelRoleId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column dashboard_level_role_user.level_role_id + * + * @param levelRoleId the value for dashboard_level_role_user.level_role_id + * + * @mbg.generated + */ + public void setLevelRoleId(Long levelRoleId) { + this.levelRoleId = levelRoleId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column dashboard_level_role_user.ref_type + * + * @return the value of dashboard_level_role_user.ref_type + * + * @mbg.generated + */ + public Integer getRefType() { + return refType; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column dashboard_level_role_user.ref_type + * + * @param refType the value for dashboard_level_role_user.ref_type + * + * @mbg.generated + */ + public void setRefType(Integer refType) { + this.refType = refType; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column dashboard_level_role_user.created_by + * + * @return the value of dashboard_level_role_user.created_by + * + * @mbg.generated + */ + public Long getCreatedBy() { + return createdBy; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column dashboard_level_role_user.created_by + * + * @param createdBy the value for dashboard_level_role_user.created_by + * + * @mbg.generated + */ + public void setCreatedBy(Long createdBy) { + this.createdBy = createdBy; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column dashboard_level_role_user.created_at + * + * @return the value of dashboard_level_role_user.created_at + * + * @mbg.generated + */ + public Long getCreatedAt() { + return createdAt; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column dashboard_level_role_user.created_at + * + * @param createdAt the value for dashboard_level_role_user.created_at + * + * @mbg.generated + */ + public void setCreatedAt(Long createdAt) { + this.createdAt = createdAt; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column dashboard_level_role_user.updated_at + * + * @return the value of dashboard_level_role_user.updated_at + * + * @mbg.generated + */ + public Long getUpdatedAt() { + return updatedAt; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column dashboard_level_role_user.updated_at + * + * @param updatedAt the value for dashboard_level_role_user.updated_at + * + * @mbg.generated + */ + public void setUpdatedAt(Long updatedAt) { + this.updatedAt = updatedAt; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column dashboard_level_role_user.updated_by + * + * @return the value of dashboard_level_role_user.updated_by + * + * @mbg.generated + */ + public Long getUpdatedBy() { + return updatedBy; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column dashboard_level_role_user.updated_by + * + * @param updatedBy the value for dashboard_level_role_user.updated_by + * + * @mbg.generated + */ + public void setUpdatedBy(Long updatedBy) { + this.updatedBy = updatedBy; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_user + * + * @mbg.generated + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", userId=").append(userId); + sb.append(", levelRoleId=").append(levelRoleId); + sb.append(", refType=").append(refType); + sb.append(", createdBy=").append(createdBy); + sb.append(", createdAt=").append(createdAt); + sb.append(", updatedAt=").append(updatedAt); + sb.append(", updatedBy=").append(updatedBy); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DashboardLevelRoleUserExample.java b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DashboardLevelRoleUserExample.java new file mode 100644 index 0000000..a5e49fb --- /dev/null +++ b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/model/DashboardLevelRoleUserExample.java @@ -0,0 +1,782 @@ +package com.dongjian.dashboard.back.model; + +import java.util.ArrayList; +import java.util.List; + +public class DashboardLevelRoleUserExample { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table dashboard_level_role_user + * + * @mbg.generated + */ + protected String orderByClause; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table dashboard_level_role_user + * + * @mbg.generated + */ + protected boolean distinct; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table dashboard_level_role_user + * + * @mbg.generated + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_user + * + * @mbg.generated + */ + public DashboardLevelRoleUserExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_user + * + * @mbg.generated + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_user + * + * @mbg.generated + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_user + * + * @mbg.generated + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_user + * + * @mbg.generated + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_user + * + * @mbg.generated + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_user + * + * @mbg.generated + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_user + * + * @mbg.generated + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_user + * + * @mbg.generated + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_user + * + * @mbg.generated + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table dashboard_level_role_user + * + * @mbg.generated + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table dashboard_level_role_user + * + * @mbg.generated + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andLevelRoleIdIsNull() { + addCriterion("level_role_id is null"); + return (Criteria) this; + } + + public Criteria andLevelRoleIdIsNotNull() { + addCriterion("level_role_id is not null"); + return (Criteria) this; + } + + public Criteria andLevelRoleIdEqualTo(Long value) { + addCriterion("level_role_id =", value, "levelRoleId"); + return (Criteria) this; + } + + public Criteria andLevelRoleIdNotEqualTo(Long value) { + addCriterion("level_role_id <>", value, "levelRoleId"); + return (Criteria) this; + } + + public Criteria andLevelRoleIdGreaterThan(Long value) { + addCriterion("level_role_id >", value, "levelRoleId"); + return (Criteria) this; + } + + public Criteria andLevelRoleIdGreaterThanOrEqualTo(Long value) { + addCriterion("level_role_id >=", value, "levelRoleId"); + return (Criteria) this; + } + + public Criteria andLevelRoleIdLessThan(Long value) { + addCriterion("level_role_id <", value, "levelRoleId"); + return (Criteria) this; + } + + public Criteria andLevelRoleIdLessThanOrEqualTo(Long value) { + addCriterion("level_role_id <=", value, "levelRoleId"); + return (Criteria) this; + } + + public Criteria andLevelRoleIdIn(List values) { + addCriterion("level_role_id in", values, "levelRoleId"); + return (Criteria) this; + } + + public Criteria andLevelRoleIdNotIn(List values) { + addCriterion("level_role_id not in", values, "levelRoleId"); + return (Criteria) this; + } + + public Criteria andLevelRoleIdBetween(Long value1, Long value2) { + addCriterion("level_role_id between", value1, value2, "levelRoleId"); + return (Criteria) this; + } + + public Criteria andLevelRoleIdNotBetween(Long value1, Long value2) { + addCriterion("level_role_id not between", value1, value2, "levelRoleId"); + return (Criteria) this; + } + + public Criteria andRefTypeIsNull() { + addCriterion("ref_type is null"); + return (Criteria) this; + } + + public Criteria andRefTypeIsNotNull() { + addCriterion("ref_type is not null"); + return (Criteria) this; + } + + public Criteria andRefTypeEqualTo(Integer value) { + addCriterion("ref_type =", value, "refType"); + return (Criteria) this; + } + + public Criteria andRefTypeNotEqualTo(Integer value) { + addCriterion("ref_type <>", value, "refType"); + return (Criteria) this; + } + + public Criteria andRefTypeGreaterThan(Integer value) { + addCriterion("ref_type >", value, "refType"); + return (Criteria) this; + } + + public Criteria andRefTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("ref_type >=", value, "refType"); + return (Criteria) this; + } + + public Criteria andRefTypeLessThan(Integer value) { + addCriterion("ref_type <", value, "refType"); + return (Criteria) this; + } + + public Criteria andRefTypeLessThanOrEqualTo(Integer value) { + addCriterion("ref_type <=", value, "refType"); + return (Criteria) this; + } + + public Criteria andRefTypeIn(List values) { + addCriterion("ref_type in", values, "refType"); + return (Criteria) this; + } + + public Criteria andRefTypeNotIn(List values) { + addCriterion("ref_type not in", values, "refType"); + return (Criteria) this; + } + + public Criteria andRefTypeBetween(Integer value1, Integer value2) { + addCriterion("ref_type between", value1, value2, "refType"); + return (Criteria) this; + } + + public Criteria andRefTypeNotBetween(Integer value1, Integer value2) { + addCriterion("ref_type not between", value1, value2, "refType"); + return (Criteria) this; + } + + public Criteria andCreatedByIsNull() { + addCriterion("created_by is null"); + return (Criteria) this; + } + + public Criteria andCreatedByIsNotNull() { + addCriterion("created_by is not null"); + return (Criteria) this; + } + + public Criteria andCreatedByEqualTo(Long value) { + addCriterion("created_by =", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByNotEqualTo(Long value) { + addCriterion("created_by <>", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByGreaterThan(Long value) { + addCriterion("created_by >", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByGreaterThanOrEqualTo(Long value) { + addCriterion("created_by >=", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByLessThan(Long value) { + addCriterion("created_by <", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByLessThanOrEqualTo(Long value) { + addCriterion("created_by <=", value, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByIn(List values) { + addCriterion("created_by in", values, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByNotIn(List values) { + addCriterion("created_by not in", values, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByBetween(Long value1, Long value2) { + addCriterion("created_by between", value1, value2, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedByNotBetween(Long value1, Long value2) { + addCriterion("created_by not between", value1, value2, "createdBy"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNull() { + addCriterion("created_at is null"); + return (Criteria) this; + } + + public Criteria andCreatedAtIsNotNull() { + addCriterion("created_at is not null"); + return (Criteria) this; + } + + public Criteria andCreatedAtEqualTo(Long value) { + addCriterion("created_at =", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotEqualTo(Long value) { + addCriterion("created_at <>", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThan(Long value) { + addCriterion("created_at >", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtGreaterThanOrEqualTo(Long value) { + addCriterion("created_at >=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThan(Long value) { + addCriterion("created_at <", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtLessThanOrEqualTo(Long value) { + addCriterion("created_at <=", value, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtIn(List values) { + addCriterion("created_at in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotIn(List values) { + addCriterion("created_at not in", values, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtBetween(Long value1, Long value2) { + addCriterion("created_at between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andCreatedAtNotBetween(Long value1, Long value2) { + addCriterion("created_at not between", value1, value2, "createdAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNull() { + addCriterion("updated_at is null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIsNotNull() { + addCriterion("updated_at is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedAtEqualTo(Long value) { + addCriterion("updated_at =", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotEqualTo(Long value) { + addCriterion("updated_at <>", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThan(Long value) { + addCriterion("updated_at >", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtGreaterThanOrEqualTo(Long value) { + addCriterion("updated_at >=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThan(Long value) { + addCriterion("updated_at <", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtLessThanOrEqualTo(Long value) { + addCriterion("updated_at <=", value, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtIn(List values) { + addCriterion("updated_at in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotIn(List values) { + addCriterion("updated_at not in", values, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtBetween(Long value1, Long value2) { + addCriterion("updated_at between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedAtNotBetween(Long value1, Long value2) { + addCriterion("updated_at not between", value1, value2, "updatedAt"); + return (Criteria) this; + } + + public Criteria andUpdatedByIsNull() { + addCriterion("updated_by is null"); + return (Criteria) this; + } + + public Criteria andUpdatedByIsNotNull() { + addCriterion("updated_by is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedByEqualTo(Long value) { + addCriterion("updated_by =", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByNotEqualTo(Long value) { + addCriterion("updated_by <>", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByGreaterThan(Long value) { + addCriterion("updated_by >", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByGreaterThanOrEqualTo(Long value) { + addCriterion("updated_by >=", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByLessThan(Long value) { + addCriterion("updated_by <", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByLessThanOrEqualTo(Long value) { + addCriterion("updated_by <=", value, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByIn(List values) { + addCriterion("updated_by in", values, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByNotIn(List values) { + addCriterion("updated_by not in", values, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByBetween(Long value1, Long value2) { + addCriterion("updated_by between", value1, value2, "updatedBy"); + return (Criteria) this; + } + + public Criteria andUpdatedByNotBetween(Long value1, Long value2) { + addCriterion("updated_by not between", value1, value2, "updatedBy"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table dashboard_level_role_user + * + * @mbg.generated do_not_delete_during_merge + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table dashboard_level_role_user + * + * @mbg.generated + */ + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/vo/level/LevelPageDTO.java b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/vo/level/LevelPageDTO.java index f627f47..335132f 100644 --- a/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/vo/level/LevelPageDTO.java +++ b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/vo/level/LevelPageDTO.java @@ -4,6 +4,8 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.Getter; import lombok.Setter; +import java.util.List; + /** * 物件级别分页查询DTO类 * 用于返回物件级别分页查询结果 @@ -52,4 +54,10 @@ public class LevelPageDTO { @Schema(description = "创建时间,毫秒级时间戳",example = "2") private Long createdAt; + @Schema(description = "楼宇ID, levelType=4时才有",example = "[]", required = true) + private List buildingIdList; + + @Schema(description = "楼宇ID, levelType=4时才有",example = "[]", required = true) + private List buildingNameList; + } \ No newline at end of file diff --git a/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/vo/levelrole/LevelRolePageDTO.java b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/vo/levelrole/LevelRolePageDTO.java new file mode 100644 index 0000000..de95cc2 --- /dev/null +++ b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/vo/levelrole/LevelRolePageDTO.java @@ -0,0 +1,26 @@ +package com.dongjian.dashboard.back.vo.levelrole; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Getter; +import lombok.Setter; + +@Setter +@Getter +public class LevelRolePageDTO { + + /** + * 主键ID(编辑时必填) + */ + @Schema(description = "层级角色id,新增时不需要)",example = "2", required = true) + private Long id; + + @Schema(description = "名称)",example = "2", required = true) + private String levelRoleName; + + @Schema(description = "备注",example = "2") + private String remark; + + @Schema(description = "创建时间,毫秒级时间戳",example = "2") + private Long createdAt; + +} \ No newline at end of file diff --git a/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/vo/levelrole/RefKey.java b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/vo/levelrole/RefKey.java new file mode 100644 index 0000000..c486ed5 --- /dev/null +++ b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/vo/levelrole/RefKey.java @@ -0,0 +1,11 @@ +package com.dongjian.dashboard.back.vo.levelrole; + +import lombok.Data; + +@Data +public class RefKey { + private String type; // BRANCH / STORE / AREA / SITE / BUILDING + private String name; + private Long id; + private Long parentId; +} diff --git a/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/vo/levelrole/UserBindLevelRoleVO.java b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/vo/levelrole/UserBindLevelRoleVO.java new file mode 100644 index 0000000..b9fa0bb --- /dev/null +++ b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/vo/levelrole/UserBindLevelRoleVO.java @@ -0,0 +1,25 @@ +package com.dongjian.dashboard.back.vo.levelrole; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +/** +* @author Mr.Jiang +* @time 2022年7月21日 下午8:50:31 +*/ +@Data +public class UserBindLevelRoleVO { + + @Schema(description ="用户ID",example = "111", required = false) + private Long userId; + + @Schema(description ="用户名",example = "管理员", required = true) + private String username; + + @Schema(description ="用户邮箱",example = "1057897@qq.com", required = true) + private String email; + + @Schema(description ="手机号码,这里要加上国际区号,比如日本是+81,传给后台的就是+81-08041165856,中国是+86,传给后台的就是+86-18841165856",example = "+81-08041165856", required = false) + private String mobileNumber; + +} diff --git a/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/vo/levelrole/UserBoundRolePageDTO.java b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/vo/levelrole/UserBoundRolePageDTO.java new file mode 100644 index 0000000..01451d8 --- /dev/null +++ b/dongjian-dashboard-back-model/src/main/java/com/dongjian/dashboard/back/vo/levelrole/UserBoundRolePageDTO.java @@ -0,0 +1,26 @@ +package com.dongjian.dashboard.back.vo.levelrole; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Getter; +import lombok.Setter; + +@Setter +@Getter +public class UserBoundRolePageDTO extends LevelRolePageDTO{ + + @Schema(description = "绑定关系id",example = "3", required = true) + private Long relationId; + + @Schema(description = "用户id",example = "2", required = true) + private Long userId; + + @Schema(description = "用户邮箱",example = "1057897@qq.com", required = true) + private String email; + + @Schema(description = "登录名",example = "1057897@qq.com", required = true) + private String loginName; + + @Schema(description ="手机号码,这里要加上国际区号,比如日本是+81,传给后台的就是+81-08041165856,中国是+86,传给后台的就是+86-18841165856",example = "+81-08041165856", required = false) + private String mobileNumber; + +} \ No newline at end of file diff --git a/dongjian-dashboard-back-service/src/main/java/com/dongjian/dashboard/back/service/LevelRoleService.java b/dongjian-dashboard-back-service/src/main/java/com/dongjian/dashboard/back/service/LevelRoleService.java new file mode 100644 index 0000000..d9d2ffb --- /dev/null +++ b/dongjian-dashboard-back-service/src/main/java/com/dongjian/dashboard/back/service/LevelRoleService.java @@ -0,0 +1,35 @@ +package com.dongjian.dashboard.back.service; + +import com.dongjian.dashboard.back.vo.TreeMenusDTO; +import com.dongjian.dashboard.back.common.response.PageInfo; +import com.dongjian.dashboard.back.common.response.SimpleDataResponse; +import com.dongjian.dashboard.back.dto.BaseSearchParams; +import com.dongjian.dashboard.back.dto.levelrole.*; +import com.dongjian.dashboard.back.vo.levelrole.LevelRolePageDTO; +import com.dongjian.dashboard.back.vo.levelrole.UserBindLevelRoleVO; +import com.dongjian.dashboard.back.vo.levelrole.UserBoundRolePageDTO; + +import java.util.List; + +public interface LevelRoleService { + + SimpleDataResponse add(OptLevelRoleParam optLevelRoleParam, Long companyId, Long userId, Integer languageType); + + SimpleDataResponse edit(OptLevelRoleParam optLevelRoleParam, Long companyId, Long userId, Integer languageType); + + SimpleDataResponse batchDelete(DeleteLevelRoleParam deleteLevelRoleParam, Long companyId, Long userId, Integer languageType); + + PageInfo getListPage(PageLevelRoleSearchParam pageLevelRoleSearchParam, Long companyId, Long userId, Integer languageType); + + SimpleDataResponse> getBoundLevel(Long companyId, Long userId, Integer languageType); + + SimpleDataResponse> getBoundLevelByRole(Long roleId, Long companyId, Long userId, Integer languageType); + + SimpleDataResponse bindUser(BindUserParam bindUserParam, Long companyId, Long userId, Integer languageType); + + SimpleDataResponse unbindUser(UnbindUserParam unbindUserParam, Long companyId, Long userId, Integer languageType); + + PageInfo getAlreadyBoundUserPage(PageBoundRoleSearchParam pageBoundRoleSearchParam, Long companyId, Long userId, Integer languageType); + + PageInfo getCanBeBoundUserPage(BaseSearchParams baseSearchParams, Long companyId, Long userId, Integer languageType, Integer utcOffset); +} \ No newline at end of file diff --git a/dongjian-dashboard-back-service/src/main/java/com/dongjian/dashboard/back/service/impl/BuildingServiceImpl.java b/dongjian-dashboard-back-service/src/main/java/com/dongjian/dashboard/back/service/impl/BuildingServiceImpl.java index c5f0d85..3991340 100644 --- a/dongjian-dashboard-back-service/src/main/java/com/dongjian/dashboard/back/service/impl/BuildingServiceImpl.java +++ b/dongjian-dashboard-back-service/src/main/java/com/dongjian/dashboard/back/service/impl/BuildingServiceImpl.java @@ -54,7 +54,7 @@ public class BuildingServiceImpl implements BuildingService { pageSearchParam.setBuildingIdList(CommonUtil.commaStr2LongList(pageSearchParam.getBuildingIds())); } -// pageSearchParam.setBindBuildingIdList(commonOpt.getBindBuildingIdList(userId)); + pageSearchParam.setBindBuildingIdList(commonOpt.getBindBuildingIdList(userId, List.of(companyId))); PageHelper.startPage(pageSearchParam.getPageNum() == null ? 1 : pageSearchParam.getPageNum(), pageSearchParam.getPageSize() == null ? 20 : pageSearchParam.getPageSize()); List resultList = basicBuildingMapperExt.getListPage(pageSearchParam); diff --git a/dongjian-dashboard-back-service/src/main/java/com/dongjian/dashboard/back/service/impl/LevelRoleServiceImpl.java b/dongjian-dashboard-back-service/src/main/java/com/dongjian/dashboard/back/service/impl/LevelRoleServiceImpl.java new file mode 100644 index 0000000..428774b --- /dev/null +++ b/dongjian-dashboard-back-service/src/main/java/com/dongjian/dashboard/back/service/impl/LevelRoleServiceImpl.java @@ -0,0 +1,489 @@ +package com.dongjian.dashboard.back.service.impl; + +import com.github.pagehelper.PageHelper; +import com.dongjian.dashboard.back.vo.TreeMenusDTO; +import com.dongjian.dashboard.back.common.language.msg.MsgLanguageChange; +import com.dongjian.dashboard.back.common.response.PageInfo; +import com.dongjian.dashboard.back.common.response.ResponseCode; +import com.dongjian.dashboard.back.common.response.SimpleDataResponse; +import com.dongjian.dashboard.back.dao.ex.LevelRoleMapperExt; +import com.dongjian.dashboard.back.dao.ex.LevelRoleObjectMapperExt; +import com.dongjian.dashboard.back.dao.ex.LevelRoleUserMapperExt; +import com.dongjian.dashboard.back.dto.BaseSearchParams; +import com.dongjian.dashboard.back.dto.levelrole.*; +import com.dongjian.dashboard.back.model.*; +import com.dongjian.dashboard.back.service.LevelRoleService; +import com.dongjian.dashboard.back.service.common.CommonOpt; +import com.dongjian.dashboard.back.vo.levelrole.LevelRolePageDTO; +import com.dongjian.dashboard.back.vo.levelrole.RefKey; +import com.dongjian.dashboard.back.vo.levelrole.UserBindLevelRoleVO; +import com.dongjian.dashboard.back.vo.levelrole.UserBoundRolePageDTO; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.transaction.interceptor.TransactionAspectSupport; + +import java.util.*; +import java.util.stream.Collectors; + +/** + * 物件级别Service实现类 + * 实现物件级别的业务逻辑 + */ +@Service +public class LevelRoleServiceImpl implements LevelRoleService { + + private static Logger logger = LoggerFactory.getLogger(LevelRoleServiceImpl.class); + + + @Autowired + private CommonOpt commonOpt; + @Autowired + private MsgLanguageChange msgLanguageChange; + + @Autowired + private LevelRoleMapperExt levelRoleMapperExt; + @Autowired + private LevelRoleObjectMapperExt levelRoleObjectMapperExt; + @Autowired + private LevelRoleUserMapperExt levelRoleUserMapperExt; + + + @Override + @Transactional + public SimpleDataResponse add(OptLevelRoleParam param, Long companyId, Long userId, Integer languageType) { + try { + param.setCompanyId(companyId); + param.setId(null); + //校验参数 + SimpleDataResponse checkResult = checkParam(param, languageType); + if (200 != checkResult.getCode()) { + return checkResult; + } + //重复校验 + if (checkExist(param) > 0) { + return new SimpleDataResponse(ResponseCode.MSG_ERROR, msgLanguageChange.getParameterMapByCode(languageType, "levelRoleNameExist")); + } + + long currentUnix = System.currentTimeMillis(); + DashboardLevelRole dashboardLevelRole = new DashboardLevelRole(); + BeanUtils.copyProperties(param, dashboardLevelRole); + dashboardLevelRole.setName(param.getLevelRoleName()); + dashboardLevelRole.setCreatedBy(userId); + dashboardLevelRole.setCreatedAt(currentUnix); + dashboardLevelRole.setCompanyId(companyId); + levelRoleMapperExt.insertSelective(dashboardLevelRole); + + //插入关联 + insertRoleObjectRelation(param, dashboardLevelRole, 1); + + return SimpleDataResponse.success(); + } catch (Exception e) { + logger.error("添加层级角色报错", e); + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + return new SimpleDataResponse(ResponseCode.SERVER_ERROR, e.getMessage()); + } + } + + private void insertRoleObjectRelation(OptLevelRoleParam param, DashboardLevelRole dashboardLevelRole, int optType) { + if (2 == optType){ + DashboardLevelRoleObjectExample dashboardLevelRoleObjectExample = new DashboardLevelRoleObjectExample(); + dashboardLevelRoleObjectExample.createCriteria().andLevelRoleIdEqualTo(dashboardLevelRole.getId()); + levelRoleObjectMapperExt.deleteByExample(dashboardLevelRoleObjectExample); + } + if (CollectionUtils.isNotEmpty(param.getLevelList())){ + for (String levelInfo : param.getLevelList()){ + String[] parts = levelInfo.split("-");//levelInfo的值为BRANCH-1,STORE-2,AREA-3 + DashboardLevelRoleObject dashboardLevelRoleObject = new DashboardLevelRoleObject(); + dashboardLevelRoleObject.setLevelRoleId(dashboardLevelRole.getId()); + dashboardLevelRoleObject.setRefType(parts[0]); + dashboardLevelRoleObject.setRefId(Long.valueOf(parts[1])); + if (1 == optType) { + dashboardLevelRoleObject.setCreatedAt(dashboardLevelRole.getCreatedAt()); + dashboardLevelRoleObject.setCreatedBy(dashboardLevelRole.getCreatedBy()); + } else if (2 == optType) { + dashboardLevelRoleObject.setCreatedAt(dashboardLevelRole.getUpdatedAt()); + dashboardLevelRoleObject.setCreatedBy(dashboardLevelRole.getUpdatedBy()); + } + levelRoleObjectMapperExt.insertSelective(dashboardLevelRoleObject); + } + } + } + + private long checkExist(OptLevelRoleParam param) { + return levelRoleMapperExt.checkExist(param); + } + + private SimpleDataResponse checkParam(OptLevelRoleParam param, Integer languageType) { + if(StringUtils.isBlank(param.getLevelRoleName()) || param.getLevelRoleName().length() > 100){ + return new SimpleDataResponse(ResponseCode.MSG_ERROR, "Parameter [levelRoleName] error"); + } + if(StringUtils.isNotBlank(param.getRemark()) && param.getRemark().length() > 255){ + return new SimpleDataResponse(ResponseCode.MSG_ERROR, "Parameter [remark] error"); + } + return SimpleDataResponse.success(); + } + + @Override + public SimpleDataResponse edit(OptLevelRoleParam param, Long companyId, Long userId, Integer languageType) { + try { + param.setCompanyId(companyId); + //校验参数 + SimpleDataResponse checkResult = checkParam(param, languageType); + if (200 != checkResult.getCode()) { + return checkResult; + } + //重复校验 + if (checkExist(param) > 0) { + return new SimpleDataResponse(ResponseCode.MSG_ERROR, msgLanguageChange.getParameterMapByCode(languageType, "levelRoleNameExist")); + } + + long currentUnix = System.currentTimeMillis(); + DashboardLevelRole dashboardLevelRole = new DashboardLevelRole(); + BeanUtils.copyProperties(param, dashboardLevelRole); + dashboardLevelRole.setName(param.getLevelRoleName()); + dashboardLevelRole.setUpdatedBy(userId); + dashboardLevelRole.setUpdatedAt(currentUnix); + if (StringUtils.isBlank(param.getRemark())){ + dashboardLevelRole.setRemark(""); + } + levelRoleMapperExt.updateByPrimaryKeySelective(dashboardLevelRole); + + //插入关联 + insertRoleObjectRelation(param, dashboardLevelRole, 2); + + return SimpleDataResponse.success(); + } catch (Exception e) { + logger.error("编辑层级角色报错", e); + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + return new SimpleDataResponse(ResponseCode.SERVER_ERROR, e.getMessage()); + } + } + + @Override + @Transactional + public SimpleDataResponse batchDelete(DeleteLevelRoleParam deleteLevelRoleParam, Long companyId, Long userId, Integer languageType) { + try { + List idList = Arrays.asList(deleteLevelRoleParam.getIds().split(",")).stream().map(s -> Long.parseLong(s.trim())).collect(Collectors.toList()); + + // 检查是否有绑定 + DashboardLevelRoleUserExample dashboardLevelRoleUserExample = new DashboardLevelRoleUserExample(); + dashboardLevelRoleUserExample.createCriteria().andLevelRoleIdIn(idList); + if (levelRoleUserMapperExt.countByExample(dashboardLevelRoleUserExample) > 0) { + return new SimpleDataResponse(ResponseCode.MSG_ERROR, msgLanguageChange.getParameterMapByCode(languageType, "roleHasBinded")); + } + + //基础表 + DashboardLevelRoleExample deleteLevelRoleExample = new DashboardLevelRoleExample(); + deleteLevelRoleExample.createCriteria().andIdIn(idList); + DashboardLevelRole dashboardLevelRole = new DashboardLevelRole(); + dashboardLevelRole.setFlag(1); + levelRoleMapperExt.updateByExampleSelective(dashboardLevelRole, deleteLevelRoleExample); + + //角色和层级关联表 + DashboardLevelRoleObjectExample deleteRoleObjectExample = new DashboardLevelRoleObjectExample(); + deleteRoleObjectExample.createCriteria().andLevelRoleIdIn(idList); + levelRoleObjectMapperExt.deleteByExample(deleteRoleObjectExample); + + //角色和用户关联表 + DashboardLevelRoleUserExample deleteRoleUserExample = new DashboardLevelRoleUserExample(); + deleteRoleUserExample.createCriteria().andLevelRoleIdIn(idList); + levelRoleUserMapperExt.deleteByExample(deleteRoleUserExample); + + return SimpleDataResponse.success(); + } catch (Exception e) { + logger.error("删除层级角色报错", e); + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + return new SimpleDataResponse(ResponseCode.SERVER_ERROR, e.getMessage()); + } + } + + @Override + public PageInfo getListPage(PageLevelRoleSearchParam pageSearchParam, Long companyId, Long userId, Integer languageType) { + //list防${}注入 + if (StringUtils.isBlank(pageSearchParam.getCompanyIds())) { + pageSearchParam.setCompanyIdList(Collections.singletonList(companyId)); + } else { + pageSearchParam.setCompanyIdList(commonOpt.filterCompanyIds(companyId, pageSearchParam.getCompanyIds())); + } + if (StringUtils.isNotBlank(pageSearchParam.getIds())) { + pageSearchParam.setIdList(Arrays.asList(pageSearchParam.getIds().split(",")).stream().map(s -> Long.parseLong(s.trim())).collect(Collectors.toList())); + } + + PageHelper.startPage(pageSearchParam.getPageNum() == null ? 1 : pageSearchParam.getPageNum(), pageSearchParam.getPageSize() == null ? 20 : pageSearchParam.getPageSize()); + List resultList = levelRoleMapperExt.getListPage(pageSearchParam); + + return new PageInfo<>(resultList); + } + + @Override + @Transactional + public SimpleDataResponse bindUser(BindUserParam bindUserParam, Long companyId, Long userId, Integer languageType) { + try { + SimpleDataResponse checkResult = checkBindParam(bindUserParam, languageType); + if (200 != checkResult.getCode()) { + return checkResult; + } + + long currentUnix = System.currentTimeMillis(); + for (Long levelRoleId : bindUserParam.getLevelRoleId()){ + //数据库存在就不用管了 + DashboardLevelRoleUserExample countRoleUserExample = new DashboardLevelRoleUserExample(); + countRoleUserExample.createCriteria() + .andLevelRoleIdEqualTo(levelRoleId) +// .andRefTypeEqualTo(bindUserParam.getRefType()) + .andUserIdEqualTo(bindUserParam.getUserId()); + if (levelRoleUserMapperExt.countByExample(countRoleUserExample) > 0){ + continue; + } + //不存在则插入 + DashboardLevelRoleUser dashboardLevelRoleUser = new DashboardLevelRoleUser(); + dashboardLevelRoleUser.setUserId(bindUserParam.getUserId()); + dashboardLevelRoleUser.setLevelRoleId(levelRoleId); + dashboardLevelRoleUser.setCreatedAt(currentUnix); + dashboardLevelRoleUser.setCreatedBy(userId); + levelRoleUserMapperExt.insertSelective(dashboardLevelRoleUser); + } + + return SimpleDataResponse.success(); + } catch (Exception e) { + logger.error("用户绑定层级角色报错", e); + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + return new SimpleDataResponse(ResponseCode.SERVER_ERROR, e.getMessage()); + } + } + + private SimpleDataResponse checkBindParam(BindUserParam bindUserParam, Integer languageType) { + if (null == bindUserParam.getUserId()) { + return new SimpleDataResponse(ResponseCode.MSG_ERROR, "userId required"); + } + if (CollectionUtils.isEmpty(bindUserParam.getLevelRoleId())) { + return new SimpleDataResponse(ResponseCode.MSG_ERROR, "levelRoleId required"); + } + return SimpleDataResponse.success(); + } + + @Override + @Transactional + public SimpleDataResponse unbindUser(UnbindUserParam unbindUserParam, Long companyId, Long userId, Integer languageType) { + try { + DashboardLevelRoleUserExample deleteRoleUserExample = new DashboardLevelRoleUserExample(); + deleteRoleUserExample.createCriteria().andIdIn(unbindUserParam.getRelationIdList()); + levelRoleUserMapperExt.deleteByExample(deleteRoleUserExample); + + return SimpleDataResponse.success(); + } catch (Exception e) { + logger.error("用户解绑层级角色报错", e); + TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); + return new SimpleDataResponse(ResponseCode.SERVER_ERROR, e.getMessage()); + } + } + + @Override + public PageInfo getCanBeBoundUserPage(BaseSearchParams pageSearchParam, Long companyId, + Long userId, Integer languageType, Integer utcOffset) { + //list防${}注入 + if (StringUtils.isBlank(pageSearchParam.getCompanyIds())) { + pageSearchParam.setCompanyIdList(Collections.singletonList(companyId)); + } else { + pageSearchParam.setCompanyIdList(commonOpt.filterCompanyIds(companyId, pageSearchParam.getCompanyIds())); + } + + PageHelper.startPage(pageSearchParam.getPageNum() == null ? 1 : pageSearchParam.getPageNum(), pageSearchParam.getPageSize() == null ? 20 : pageSearchParam.getPageSize()); + List resultList = levelRoleMapperExt.getCanBeBoundUserPage(pageSearchParam); + + return new PageInfo<>(resultList); + } + + @Override + public PageInfo getAlreadyBoundUserPage(PageBoundRoleSearchParam pageSearchParam, Long companyId, Long userId, Integer languageType) { + //list防${}注入 + if (StringUtils.isBlank(pageSearchParam.getCompanyIds())) { + pageSearchParam.setCompanyIdList(Collections.singletonList(companyId)); + } else { + pageSearchParam.setCompanyIdList(commonOpt.filterCompanyIds(companyId, pageSearchParam.getCompanyIds())); + } + + PageHelper.startPage(pageSearchParam.getPageNum() == null ? 1 : pageSearchParam.getPageNum(), pageSearchParam.getPageSize() == null ? 20 : pageSearchParam.getPageSize()); + List resultList = levelRoleMapperExt.getAlreadyBoundUserPage(pageSearchParam); + + return new PageInfo<>(resultList); + } + + @Override + public SimpleDataResponse> getBoundLevelByRole(Long roleId, Long companyId, Long userId, Integer languageType) { + try { + return SimpleDataResponse.success(levelRoleMapperExt.getBoundLevelByRole(roleId)); + } catch (Exception e) { + logger.error("获取层级角色菜单出错", e); + return new SimpleDataResponse(ResponseCode.SERVER_ERROR, e.getMessage()); + } + } + + @Override + public SimpleDataResponse> getBoundLevel(Long companyId, Long userId, Integer languageType) { + + // 查询全量层级 + Map levelMap = new HashMap<>(); + levelMap.put("companyId", companyId); + List branches = levelRoleMapperExt.selectAllBranches(levelMap); + List stores = levelRoleMapperExt.selectAllStores(levelMap); + List areas = levelRoleMapperExt.selectAllAreas(levelMap); + List sites = levelRoleMapperExt.selectAllSites(levelMap); + List buildings = levelRoleMapperExt.selectAllBuildings(levelMap); + + // 用户绑定、管理的节点 + List userRefs = new ArrayList<>(); + if (levelRoleMapperExt.checkLevelManager(userId) > 0){ + userRefs.addAll(branches); + userRefs.addAll(stores); + userRefs.addAll(areas); + userRefs.addAll(sites); + userRefs.addAll(buildings); + } else { + Map paramMap = new HashMap<>(); + paramMap.put("userId", userId); + userRefs = levelRoleMapperExt.selectUserRefs(paramMap); + // 名称填充 + fillNames(userRefs, branches, stores, areas, sites, buildings); + } + + // 构建 parentId → List 的多值 Map + Map> storeMap = groupByParent(stores); + Map> areaMap = groupByParent(areas); + Map> siteMap = groupByParent(sites); + Map> buildingMap = groupByParent(buildings); + + // 用于去重,避免重复根节点 + Set visitedKeys = new HashSet<>(); + + // 组装树结构 + List result = new ArrayList<>(); + + for (RefKey ref : userRefs) { + // 每个用户绑定的节点都是一棵独立的根 + TreeMenusDTO root = new TreeMenusDTO(); + String rootKey = ref.getType() + "-" + ref.getId(); + + if (visitedKeys.contains(rootKey)) continue; // 已存在跳过 + visitedKeys.add(rootKey); + + root.setKey(rootKey); + root.setLabel(ref.getName()); + root.setParentKey(null); + + // 构建该节点下的子树 + root.setChildren(buildTree( + ref.getType(), ref.getId(), rootKey, + storeMap, areaMap, siteMap, buildingMap, visitedKeys + )); + result.add(root); + } + + return SimpleDataResponse.success(result); + } + + private Map toNameMap(List list) { + return list.stream().collect(Collectors.toMap( + RefKey::getId, + RefKey::getName, + (a, b) -> a + )); + } + + private void fillNames(List userRefs, + List branches, + List stores, + List areas, + List sites, + List buildings) { + + Map branchName = toNameMap(branches); + Map storeName = toNameMap(stores); + Map areaName = toNameMap(areas); + Map siteName = toNameMap(sites); + Map buildingName = toNameMap(buildings); + + userRefs.removeIf(r -> { + String name = switch (r.getType()) { + case "BRANCH" -> branchName.get(r.getId()); + case "STORE" -> storeName.get(r.getId()); + case "AREA" -> areaName.get(r.getId()); + case "SITE" -> siteName.get(r.getId()); + case "BUILDING" -> buildingName.get(r.getId()); + default -> null; + }; + + // 兜底处理 + // branchName、storeName、areaName、siteName、buildingName里面不存在的,说明flag=1或者不存在了,userRefs里面需要删除掉 + if (name == null) { + return true; + } + + // 存在的就赋值 + r.setName(name); + + return false; + }); + } + + private Map> groupByParent(List items) { + return items.stream() + .filter(r -> r.getParentId() != null) + .collect(Collectors.groupingBy( + RefKey::getParentId + )); + } + + private List buildTree(String type, + Long parentId, + String parentKey, + Map> storeMap, + Map> areaMap, + Map> siteMap, + Map> buildingMap, + Set visitedKeys) { + + Map> childMap = switch (type) { + case "BRANCH" -> storeMap; + case "STORE" -> areaMap; + case "AREA" -> siteMap; + case "SITE" -> buildingMap; + default -> null; + }; + if (childMap == null) return Collections.emptyList(); + + // 直接取 parentId 的子节点 + List children = childMap.get(parentId); + if (children == null) return Collections.emptyList(); + + List list = new ArrayList<>(); + + for (RefKey c : children) { + String key = c.getType() + "-" + c.getId(); + + if (visitedKeys.contains(key)) continue; // 已存在跳过 + visitedKeys.add(key); + + TreeMenusDTO node = new TreeMenusDTO(); + node.setKey(key); + node.setParentKey(parentKey); + node.setLabel(c.getName()); + + node.setChildren(buildTree( + c.getType(), c.getId(), key, + storeMap, areaMap, siteMap, buildingMap, visitedKeys + )); + + list.add(node); + } + + return list; + } + +} \ No newline at end of file diff --git a/dongjian-dashboard-back-service/src/main/java/com/dongjian/dashboard/back/service/impl/LevelServiceImpl.java b/dongjian-dashboard-back-service/src/main/java/com/dongjian/dashboard/back/service/impl/LevelServiceImpl.java index 6c5a149..042d40a 100644 --- a/dongjian-dashboard-back-service/src/main/java/com/dongjian/dashboard/back/service/impl/LevelServiceImpl.java +++ b/dongjian-dashboard-back-service/src/main/java/com/dongjian/dashboard/back/service/impl/LevelServiceImpl.java @@ -4,10 +4,12 @@ import com.dongjian.dashboard.back.common.language.msg.MsgLanguageChange; import com.dongjian.dashboard.back.common.response.PageInfo; import com.dongjian.dashboard.back.common.response.ResponseCode; import com.dongjian.dashboard.back.common.response.SimpleDataResponse; +import com.dongjian.dashboard.back.dao.ex.BasicBuildingMapperExt; import com.dongjian.dashboard.back.dao.ex.LevelMapperExt; import com.dongjian.dashboard.back.dto.level.*; import com.dongjian.dashboard.back.service.LevelService; import com.dongjian.dashboard.back.service.common.CommonOpt; +import com.dongjian.dashboard.back.vo.building.BuildingPageVO; import com.dongjian.dashboard.back.vo.level.LevelPageDTO; import com.github.pagehelper.PageHelper; import org.apache.commons.collections.CollectionUtils; @@ -20,9 +22,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.interceptor.TransactionAspectSupport; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; +import java.util.*; import java.util.stream.Collectors; /** @@ -42,6 +42,8 @@ public class LevelServiceImpl implements LevelService { @Autowired private LevelMapperExt levelMapperExt; + @Autowired + private BasicBuildingMapperExt basicBuildingMapperExt; @Override @@ -76,6 +78,10 @@ public class LevelServiceImpl implements LevelService { if (1 != param.getLevelType()) { //插入关联 insertLevelRelation(param, levelEntity, 1); + //单独插入楼宇和site关系 + if (4 == param.getLevelType()) { + insertSiteBuildingRelation(param, levelEntity, 1); + } } return SimpleDataResponse.success(); @@ -86,6 +92,35 @@ public class LevelServiceImpl implements LevelService { } } + private void insertSiteBuildingRelation(OptLevelParam param, LevelEntity levelEntity, int optType) { + if (2 == optType){ + Map delParamMap = new HashMap<>(); + delParamMap.put("siteId", levelEntity.getId()); + levelMapperExt.deleteSiteBuildingRelation(delParamMap); + } + if (CollectionUtils.isNotEmpty(param.getBuildingIdList())) { + for (Long buildingId : param.getBuildingIdList()){ + LevelRelationEntity levelRelationEntity =new LevelRelationEntity(); + + levelRelationEntity.setParentField("site_id"); + levelRelationEntity.setChildField("building_id"); + levelRelationEntity.setTableName("dashboard_level_relation_site_building"); + + levelRelationEntity.setParentId(levelEntity.getId()); + levelRelationEntity.setChildId(buildingId); + if (1 == optType){ + levelRelationEntity.setCreatedBy(levelEntity.getCreatedBy()); + levelRelationEntity.setCreatedAt(levelEntity.getCreatedAt()); + } else if (2 == optType){ + levelRelationEntity.setCreatedBy(levelEntity.getUpdatedBy()); + levelRelationEntity.setCreatedAt(levelEntity.getUpdatedAt()); + } + + levelMapperExt.saveLevelRelation(levelRelationEntity); + } + } + } + private void insertLevelRelation(OptLevelParam param, LevelEntity levelEntity, int optType) { for (Long parentId : param.getParentIdList()){ LevelRelationEntity levelRelationEntity =new LevelRelationEntity(); @@ -189,6 +224,10 @@ public class LevelServiceImpl implements LevelService { levelMapperExt.deleteLevelRelation(deleteLevelRelationEntity); //插入关联 insertLevelRelation(param, levelEntity, 2); + //单独插入楼宇和site关系 + if (4 == param.getLevelType()) { + insertSiteBuildingRelation(param, levelEntity, 2); + } } return SimpleDataResponse.success(); @@ -268,7 +307,7 @@ public class LevelServiceImpl implements LevelService { return new SimpleDataResponse(ResponseCode.SERVER_ERROR, e.getMessage()); } } - + @Override public PageInfo getListPage(PageLevelSearchParam pageSearchParam, Long companyId, Long userId, Integer languageType) { Integer levelType = pageSearchParam.getLevelType(); @@ -291,6 +330,21 @@ public class LevelServiceImpl implements LevelService { PageHelper.startPage(pageSearchParam.getPageNum() == null ? 1 : pageSearchParam.getPageNum(), pageSearchParam.getPageSize() == null ? 20 : pageSearchParam.getPageSize()); List resultList = levelMapperExt.getListPage(pageSearchParam); + if (4 == levelType && CollectionUtils.isNotEmpty(resultList)){ + for (LevelPageDTO levelPageDTO : resultList) { + List buildingList = basicBuildingMapperExt.getBuildingListBySiteId(levelPageDTO.getId()); + if (CollectionUtils.isNotEmpty(buildingList)) { + List idList = new ArrayList<>(buildingList.size()); + List nameList = new ArrayList<>(buildingList.size()); + for (BuildingPageVO vo : buildingList) { + idList.add(vo.getBuildingId()); + nameList.add(vo.getBuildingName()); + } + levelPageDTO.setBuildingIdList(idList); + levelPageDTO.setBuildingNameList(nameList); + } + } + } return new PageInfo<>(resultList); }