From fb02cc272c482c69ab452d1089bd35d149a57bde Mon Sep 17 00:00:00 2001 From: ludc Date: 星期四, 11 七月 2024 09:45:24 +0800 Subject: [PATCH] 部门关联上传接口,接口联调修改,密码策略增加修改删除查看接口上传(待联调) --- Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/OrgDeptQueryServiceImpl.java | 67 +- Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmPwdStrategyQueryServiceImpl.java | 277 +++++++++++++ Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/SmPwdStrategyQueryServiceI.java | 25 + Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/model/dto/SmPasswordStrategyDTO.java | 282 ++++++++++++++ Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/controller/OrgDepartmentQueryController.java | 40 + Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/SmUserQueryServiceI.java | 2 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/enumpck/CombinationEnum.java | 126 ++++++ Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/model/SmPasswordStrategyForPlatform1.java | 79 ++- Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmUserQueryServiceImpl.java | 2 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmRoleQueryServiceImpl.java | 16 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/controller/SmPwdStrategyQueryController.java | 86 +++ Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/OrgDeptQueryServiceI.java | 2 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/controller/SmRoleQueryController.java | 56 +- Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/controller/SmUserQueryController.java | 81 ++-- Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/model/SmPasswordStrategyDO.java | 2 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/SmRoleQueryServiceI.java | 2 Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/pagemodel/SmPasswordStrategyVO.java | 37 + 17 files changed, 991 insertions(+), 191 deletions(-) diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/OrgDeptQueryServiceI.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/OrgDeptQueryServiceI.java index 605caf1..bc79121 100644 --- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/OrgDeptQueryServiceI.java +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/OrgDeptQueryServiceI.java @@ -178,6 +178,6 @@ * @return * @throws VciBaseException */ - BaseResult importDept(File file) throws VciBaseException; + BaseResult importDept(File file) throws Exception; } diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/SmPwdStrategyQueryServiceI.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/SmPwdStrategyQueryServiceI.java index 8791b93..fcb902c 100644 --- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/SmPwdStrategyQueryServiceI.java +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/SmPwdStrategyQueryServiceI.java @@ -1,9 +1,9 @@ package com.vci.frameworkcore.compatibility; import com.vci.corba.common.PLException; +import com.vci.frameworkcore.model.dto.SmPasswordStrategyDTO; import com.vci.frameworkcore.pagemodel.SmPasswordStrategyVO; import com.vci.starter.web.exception.VciBaseException; -import com.vci.starter.web.pagemodel.BaseQueryObject; import com.vci.starter.web.pagemodel.DataGrid; import com.vci.starter.web.pagemodel.PageHelper; @@ -49,6 +49,27 @@ boolean saveUserPasswordStrateg(String[] userIds, String passwordStrategId) throws PLException; /** + * 鏂板瀵嗙爜绛栫暐 + * @param spsDto + * @return + */ + boolean addPasswordStrateg(SmPasswordStrategyDTO spsDto) throws PLException; + + /** + * 淇敼瀵嗙爜绛栫暐 + * @param spsDto + * @return + */ + boolean updatePasswordStrateg(SmPasswordStrategyDTO spsDto) throws PLException; + + /** + * 鍒犻櫎瀵嗙爜绛栫暐 + * @param pwdIds + * @return + */ + boolean delPasswordStrateg(String[] pwdIds) throws PLException; + + /** * 鏍规嵁涓婚敭鏌ヨ瀵嗙爜绛栫暐map瀵硅薄 * @param oidList * @return key涓哄瘑鐮佺瓥鐣ヤ富閿� value涓哄瘑鐮佺瓥鐣� @@ -71,7 +92,7 @@ SmPasswordStrategyVO getPasswordStrategyVOByUserOid(String userOid) throws PLException; /** - * 鏍规嵁鍗曟潯鐢ㄦ埛涓婚敭锛岃幏鍙栫敤鎴风殑瀵嗙爜瀹夊叏绛栫暐 + * 鏍规嵁澶氭潯鐢ㄦ埛涓婚敭锛岃幏鍙栫敤鎴风殑瀵嗙爜瀹夊叏绛栫暐 * @param userOids * @return * @throws PLException diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/SmRoleQueryServiceI.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/SmRoleQueryServiceI.java index bf6993e..7f76fbc 100644 --- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/SmRoleQueryServiceI.java +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/SmRoleQueryServiceI.java @@ -179,7 +179,7 @@ * @return * @throws VciBaseException */ - BaseResult importRole(File file) throws VciBaseException; + BaseResult importRole(File file) throws Exception; /** * 鎴愬憳绠$悊鍒嗛厤瑙掕壊璋冪敤锛屼繚瀛樼敤鎴疯鑹插叧鑱斿叧绯� diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/SmUserQueryServiceI.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/SmUserQueryServiceI.java index cd8c35f..865899f 100644 --- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/SmUserQueryServiceI.java +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/SmUserQueryServiceI.java @@ -255,6 +255,6 @@ * @return * @throws VciBaseException */ - BaseResult importUser(File file) throws VciBaseException; + BaseResult importUser(File file) throws Exception; } diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/OrgDeptQueryServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/OrgDeptQueryServiceImpl.java index 35748de..c45b79e 100644 --- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/OrgDeptQueryServiceImpl.java +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/OrgDeptQueryServiceImpl.java @@ -645,12 +645,12 @@ orgDepartmentDTO.getOid(),"鐢ㄦ埛涓婚敭", orgDepartmentDTO.getId(),"鐢ㄦ埛鍚�" ); - //鎸塷id鏌ヨ鏁版嵁搴撲腑宸插瓨鍦ㄧ殑 + //鎸塷id鏌ヨ鏁版嵁搴撲腑宸插瓨鍦ㄧ殑锛岀‘淇濅慨鏀圭殑閮ㄩ棬瀛樺湪 OrgDepartmentVO dbDepartmentVO = getDeptByDeptOid(orgDepartmentDTO.getOid()); if(Func.isEmpty(dbDepartmentVO)){ throw new VciBaseException("淇敼鐨勯儴闂ㄤ笉瀛樺湪锛�"); } - //閮ㄩ棬鍚嶅拰缂栧彿鍒ら噸 + //閮ㄩ棬鍚嶅拰缂栧彿鍒ら噸锛岄伩鍏嶆柊瀹堕儴闂ㄩ噸澶� Map<String, String> conditionMap = new HashMap<>(); conditionMap.put("plname",QueryOptionConstant.OR + orgDepartmentDTO.getName()); if(Func.isNotBlank(orgDepartmentDTO.getId())){ @@ -712,7 +712,7 @@ @Override public boolean deleteDept(String[] ids) throws PLException { VciBaseUtil.alertNotNull(ids,"瑕佸垹闄ょ殑閮ㄩ棬涓婚敭"); - //鍏峰杩炲甫鍒犻櫎鐨勫姛鑳斤紝濡傝鑹茶彍鍗曟巿鏉冭〃閲岄潰鐨勬巿鏉冧俊鎭� + //TODO: 搴旇鏄笉鍏峰杩炲甫鍒犻櫎鐨勫姛鑳斤紝绛栫暐鍒犻櫎鍚庣敤鎴峰叧鑱旂殑鏃犵敤閮ㄩ棬杩樺湪,鑰冭檻鍚庢湡鏄惁闇�瑕佸仛锛屾暟鎹噺涓嶅ぇ鍙互涓嶅仛杩炲甫鍒犻櫎 return platformClientUtil.getFrameworkService().deleteDepartment( ids, new UserEntityInfo("developer"/*WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getUserId()*/, null) @@ -743,7 +743,7 @@ List<String> columns = new ArrayList<>(Arrays.asList("ID", "鍚嶇О", "缂栧彿", "浠e彿", "涓撲笟", "鐖禝D锛堥儴闂ㄥ敮涓�鏍囪瘑ID锛�", "鎻忚堪")); //璁剧疆蹇呭~鍒� ColumnNameisRed.clear(); - ColumnNameisRed.add(0); + //ColumnNameisRed.add(0); ColumnNameisRed.add(1); //鍐檈xcel String excelPath = LocalFileUtil.getDefaultTempFolder() + File.separator + downloadFileName + ".xls"; @@ -776,7 +776,7 @@ * @throws VciBaseException */ @Override - public BaseResult importDept(File file) throws VciBaseException { + public BaseResult importDept(File file) throws Exception { VciBaseUtil.alertNotNull(file,"excel鏂囦欢"); if(!file.exists()){ throw new VciBaseException("瀵煎叆鐨別xcel鏂囦欢涓嶅瓨鍦�,{0}",new String[]{file.getPath()}); @@ -813,22 +813,21 @@ Map<String, String> oidMap = new HashMap<>(); poList.stream().forEach(po->{ String parentId = Func.isBlank(po.getParentId()) ? "":po.getParentId(); - //琛ㄦ牸鍐呭垽閲� - //閮ㄩ棬鍚嶇О鍒ょ┖ + //閮ㄩ棬鍚嶇О鍒ょ┖锛岄�氬父閫氳繃po涓殑娉ㄨВ灏卞彲瀹炵幇 if(Func.isEmpty(po.getName())){ throw new VciBaseException("绗��"+po.getRowIndex()+"銆戣锛宒epterror,Reason:Name cannot be empty"); - }else if(repeatNameMap.getOrDefault(po.getName(), "").equals(parentId)/*excel涓悓涓�閮ㄩ棬涓婲ame鐩哥瓑*/){ + }else if(parentId.equals(repeatNameMap.getOrDefault(po.getName(), null))/*excel涓悓涓�閮ㄩ棬涓婲ame鐩哥瓑*/){ //鍚屼竴閮ㄩ棬涓嬪悕绉板垽閲� throw new VciBaseException("绗��"+po.getRowIndex()+"銆戣锛宒eptnameerror,Reason: Names under the same department cannot be duplicated"); }else if(Func.isNotEmpty(po.getId()) && repeatIdList.equals(po.getId())){ throw new VciBaseException("绗��"+po.getRowIndex()+"銆戣锛宒eptiderror,Reason: The primary key cannot be duplicated"); - }else if(Func.isNotEmpty(po.getNum()) && repeatNumMap.getOrDefault(po.getNum(),"").equals(parentId)/*excel涓悓涓�閮ㄩ棬涓嬬紪鍙峰瓨鍦� */){ + }else if(Func.isNotEmpty(po.getNum()) && parentId.equals(repeatNumMap.getOrDefault(po.getNum(),null))/*excel涓悓涓�閮ㄩ棬涓嬬紪鍙峰瓨鍦� */){ throw new VciBaseException("绗��"+po.getRowIndex()+"銆戣锛宒eptnumerror,Reason: The number cannot be duplicated"); }else{ //2.2銆佹煡璇㈡暟鎹簱涓殑鏁版嵁锛堟煡閲岻D鍜孨UM锛夛紝姣旇緝楹荤儲闇�瑕佹牴鎹甈arentID鏌ヨ锛堟墍鏈夊彧鑳藉崟鏉℃煡璇㈣繘琛屽垽閲嶏級 //缁勮鏌ラ噸鏉′欢:鍚屼竴閮ㄩ棬涓�(parentId鐩哥瓑)锛宯ame鎴栬�卬um鐩哥瓑 HashMap<String, String> conditionMap = new HashMap<>(); - conditionMap.put("plname",po.getName()); + conditionMap.put("plname",QueryOptionConstant.OR + po.getName()); conditionMap.put("plnum",QueryOptionConstant.OR + po.getNum()); String pId = Func.isBlank(po.getParentId()) ? null:po.getParentId(); List<OrgDepartmentVO> repeatOrgDept = this.getDeptByDeptPOidAndCondition(pId, conditionMap); @@ -847,6 +846,8 @@ BeanUtil.convert(po,dto); dto.setOid(po.getId()); dto.setId(po.getNum()); + dto.setDescription(po.getDesc()); + dto.setSpecialties(po.getSpecialties()); dto.setPkFatherDepartment(po.getParentId()); dto.setCreateTime(new Date()); dto.setCreator(loginUserId); @@ -854,7 +855,7 @@ dto.setStatus((short) 0); //2.2銆佽繃绋嬩腑澶勭悊涓婚敭杞崲闂鏈�濂芥槸涓�鏉′竴鏉$殑澶勭悊ID鏄惁瀛樺湪杩樻湁ParentID鏄惁瀛樺湪鐨勯棶棰� //鍏堝垽鏂槸宸插瓨鍦ㄧ殑閮ㄩ棬ID锛岃繕鏄笉瀛樺湪鐨勯儴闂↖D锛屽凡瀛樺湪绯荤粺涓殑ID灏辨槸涓篋ept:寮�澶寸殑 - String pId = dto.getPkFatherDepartment(); + String pId = Func.isBlank(dto.getPkFatherDepartment()) ? "":dto.getPkFatherDepartment(); //鏄凡瀛樺湪绯荤粺涓殑閮ㄩ棬id if(pId.contains("Dept:")){ //瑙f瀽鍑虹湡瀹炵殑oid @@ -863,33 +864,41 @@ if(Func.isBlank(deParentId) || Func.isEmpty(this.getDeptByDeptOid(deParentId))){ throw new VciBaseException("绗��"+ po.getRowIndex() +"銆戣锛宒eptparentiderror,Reason:Parent ID resolution error or does not exist in the system"); } - //鏇挎崲鎺変复鏃朵娇鐢ㄧ殑閮ㄩ棬鍞竴鏍囪瘑 - dto.setPkOrganizationName(deParentId); + //鏇挎崲鎺変复鏃朵娇鐢ㄧ殑閮ㄩ棬鍞竴鏍囪瘑锛屼絾鏄负浜嗘柟渚垮悗缁垽鏂紝杩樻槸闇�瑕佸姞涓奃ept:鏍囪瘑 + dto.setPkFatherDepartment("Dept:"+deParentId); } //鐢ㄦ埛鎵嬭緭浜嗛儴闂╫id锛屼絾鏄伩鍏峯id涓嶈鑼冮渶瑕侊紝鐢ㄨ鑼僶id杩涜鏇挎崲锛屽鏋滄病杈撳叆淇濆瓨鏃朵細鑷姩鐢熸垚oid - if(Func.isNotBlank(dto.getOid())){ - String pkOid = VciBaseUtil.getPk(); + String excelOid = dto.getOid(); + if(Func.isNotBlank(excelOid)){ + String pkOid = VciBaseUtil.getPk().toUpperCase(Locale.ROOT); dto.setOid(pkOid); //oid鏄犲皠鍏崇郴锛屽悗缁敤鏉ユ洿鏂皃arentId - oidMap.put(dto.getOid(),pkOid); + oidMap.put(excelOid,pkOid); } DeptInfo deptInfo = this.changeOrgDeptDTOToDeptInfo(dto); deptInfoList.add(deptInfo); }); - //3銆佸鐞唅d鍜宲arentId鐨勬槧灏勫叧绯�:灏嗙敤鎴锋墜杈撶殑鐖禝D杞崲鎴愬疄闄呭瓨鍌ㄧ殑ID - List<DeptInfo> lastDeptInfoList = deptInfoList.stream().map(info -> { - //parentId涓嶄负绌哄苟涓旀病鏈塂ept:鐩稿叧鐨勫瓧绗︿覆,璇存槑鏄敤鎴锋墜杈撶殑ParentId(瀵煎叆鐨勬暟鎹氨鏄竴涓爲缁撴瀯) - if (Func.isNotBlank(info.parentId) || info.parentId.contains("Dept:")) { - //杞崲ParentId涓哄疄闄呰瀛樺偍鐨勯儴闂↖D - info.parentId = oidMap.get(info.parentId); + //3銆佸鐞唅d鍜宲arentId鐨勬槧灏勫叧绯�:灏嗙敤鎴锋墜杈撶殑鐖禝D杞崲鎴愬疄闄呭瓨鍌ㄧ殑ID骞朵繚瀛樿繘搴� + deptInfoList.stream().forEach(info -> { + //3.1銆佸鏈�缁堝鐞嗗ソ鐨勯儴闂ㄦ暟鎹繚瀛� + try { + //parentId涓嶄负绌哄苟涓旀病鏈塂ept:鐩稿叧鐨勫瓧绗︿覆,璇存槑鏄敤鎴锋墜杈撶殑ParentId(瀵煎叆鐨勬暟鎹氨鏄竴涓爲缁撴瀯) + if (Func.isNotBlank(info.parentId) && !info.parentId.contains("Dept:")) { + //杞崲ParentId涓哄疄闄呰瀛樺偍鐨勯儴闂↖D + info.parentId = oidMap.get(info.parentId); + }else if(info.parentId.contains("Dept:")){ + //绯荤粺涓凡瀛樺湪鐨勭埗閮ㄩ棬OID锛岄渶瑕佺Щ闄ゆ帀Dept:鏍囪瘑 + info.parentId = info.parentId.replace("Dept:",""); + } + platformClientUtil.getFrameworkService().saveDepartment( + info, + userEntityInfo + ); + } catch (PLException e) { + e.printStackTrace(); + throw new VciBaseException("淇濆瓨鏃跺嚭鐜伴敊璇紒锛屽師鍥狅細"+VciBaseUtil.getExceptionMessage(e)); } - return info; - }).collect(Collectors.toList()); - //4銆佸鏈�缁堝鐞嗗ソ鐨勯儴闂ㄦ暟鎹繚瀛橈紝瀹炵幇鏈�缁堢粺涓�淇濆瓨锛岄伩鍏嶄簡涓�閮ㄥ垎鏁版嵁杩涗簡涓�閮ㄥ垎鏁版嵁鍥犱负鏍¢獙娌¤繃娌¤繘搴撶殑闂 - platformClientUtil.getFrameworkService().batchSaveDepart( - lastDeptInfoList.toArray(new DeptInfo[lastDeptInfoList.size()]), - userEntityInfo - ); + }); }catch (Exception e){ if(logger.isErrorEnabled()){ logger.error("璇诲彇excel鍐呭鏃舵垨淇濆瓨鐢ㄦ埛淇℃伅鏃跺嚭鐜颁簡閿欒锛屽叿浣撳師鍥狅細",e.getMessage()); diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmPwdStrategyQueryServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmPwdStrategyQueryServiceImpl.java index 36e1db7..57b148a 100644 --- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmPwdStrategyQueryServiceImpl.java +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmPwdStrategyQueryServiceImpl.java @@ -6,15 +6,14 @@ import com.vci.corba.omd.data.BusinessObject; import com.vci.frameworkcore.compatibility.SmPwdStrategyQueryServiceI; import com.vci.frameworkcore.compatibility.SmUserQueryServiceI; -import com.vci.frameworkcore.constant.FrameWorkBtmTypeConstant; -import com.vci.frameworkcore.enumpck.RoleClassifyEnum; -import com.vci.frameworkcore.enumpck.RoleControlAreaEnum; +import com.vci.frameworkcore.model.OrgDeptForPlatform1; +import com.vci.frameworkcore.model.dto.SmPasswordStrategyDTO; +import com.vci.frameworkcore.enumpck.CombinationEnum; import com.vci.frameworkcore.model.SmPasswordStrategyDO; import com.vci.frameworkcore.model.SmPasswordStrategyForPlatform1; -import com.vci.frameworkcore.model.SmRoleForPlatform1; import com.vci.frameworkcore.pagemodel.SmPasswordStrategyVO; -import com.vci.frameworkcore.pagemodel.SmRoleVO; import com.vci.omd.utils.ObjectTool; +import com.vci.starter.web.constant.QueryOptionConstant; import com.vci.starter.web.exception.VciBaseException; import com.vci.starter.web.pagemodel.DataGrid; import com.vci.starter.web.pagemodel.PageHelper; @@ -27,6 +26,8 @@ import com.vci.web.util.PlatformClientUtil; import com.vci.web.util.WebUtil; import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; @@ -62,6 +63,11 @@ private PlatformClientUtil platformClientUtil; /** + * 鏃ュ織 + */ + private Logger logger = LoggerFactory.getLogger(getClass()); + + /** * 鑾峰彇榛樿瀵嗙爜绛栫暐 * @return */ @@ -92,10 +98,8 @@ pageHelper = new PageHelper(-1); } pageHelper.addDefaultAsc("pname"); - VciQueryWrapperForDO queryWrapper = new VciQueryWrapperForDO(conditionMap, SmPasswordStrategyDO.class,pageHelper); - //queryWrapper.eq("pltype","2"); - platformClientUtil.getFrameworkService().fetchAllPasswordStrategy(); - //platformClientUtil.getFrameworkService().fetchpassword(); + VciQueryWrapperForDO queryWrapper = new VciQueryWrapperForDO(conditionMap, SmPasswordStrategyForPlatform1.class,pageHelper); + //platformClientUtil.getFrameworkService().fetchAllPasswordStrategy(); List<SmPasswordStrategyForPlatform1> smPasswordStrategyForPlatform1s = boService.selectByQueryWrapper(queryWrapper, SmPasswordStrategyForPlatform1.class); DataGrid<SmPasswordStrategyVO> dataGrid = new DataGrid<>(); if(!CollectionUtils.isEmpty(smPasswordStrategyForPlatform1s)){ @@ -134,11 +138,18 @@ * @param smPasswordStrategyForPlatform1s 鍘熷钩鍙扮殑瀵嗙爜绛栫暐 * @return */ - private List<SmPasswordStrategyVO> pltPwdStrategy2SmPwdStrategyVOs(List<SmPasswordStrategyForPlatform1> smPasswordStrategyForPlatform1s){ + private List<SmPasswordStrategyVO> pltPwdStrategy2SmPwdStrategyVOs(List<SmPasswordStrategyForPlatform1> smPasswordStrategyForPlatform1s) throws PLException{ List<SmPasswordStrategyVO> smPasswordStrategyVOList = new ArrayList<>(); if(!CollectionUtils.isEmpty(smPasswordStrategyForPlatform1s)){ smPasswordStrategyForPlatform1s.stream().forEach(s -> { - smPasswordStrategyVOList.add(pltPwdStrategy2SmPwdStrategyVO(s)); + try { + smPasswordStrategyVOList.add(pltPwdStrategy2SmPwdStrategyVO(s)); + } catch (PLException e) { + e.printStackTrace(); + String exceptionMessage = "Platform1瀵硅薄杞琕O瀵硅薄鏃跺嚭鐜伴敊璇紝鍘熷洜锛�"+VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + throw new VciBaseException(exceptionMessage); + } }); } return smPasswordStrategyVOList; @@ -149,27 +160,79 @@ * @param strategyForPlatform1 鍘熷钩鍙扮殑瀵嗙爜绛栫暐 * @return 鏂扮殑瀵嗙爜绛栫暐瀵硅薄 */ - private SmPasswordStrategyVO pltPwdStrategy2SmPwdStrategyVO(SmPasswordStrategyForPlatform1 strategyForPlatform1){ + private SmPasswordStrategyVO pltPwdStrategy2SmPwdStrategyVO(SmPasswordStrategyForPlatform1 strategyForPlatform1) throws PLException { SmPasswordStrategyVO strategyVO = new SmPasswordStrategyVO(); strategyVO.setOid(strategyForPlatform1.getPluid()); strategyVO.setId(""); strategyVO.setName(strategyForPlatform1.getPname()); strategyVO.setMaxLength(strategyForPlatform1.getPlmaxlength()); strategyVO.setMinLength(strategyForPlatform1.getPlength()); - strategyVO.setValidDay(strategyForPlatform1.getPremindday()); + strategyVO.setValidDay(strategyForPlatform1.getPoverdueday()); strategyVO.setRemindDay(strategyForPlatform1.getPremindday()); strategyVO.setRetryTime(strategyForPlatform1.getPretrytime()); strategyVO.setLockTime(strategyForPlatform1.getPlocktime()); strategyVO.setDefaultFlag(strategyForPlatform1.getPlisdefault() == 1); strategyVO.setDescription(strategyForPlatform1.getPldesc()); - strategyVO.setCreateTime(strategyForPlatform1.getPlcreatetime()); + strategyVO.setCreateTime(new Date(strategyForPlatform1.getPlcreatetime())); strategyVO.setCreator(strategyForPlatform1.getPlcreateuser()); - strategyVO.setLastModifyTime(strategyForPlatform1.getPlupdatetime()); + strategyVO.setLastModifyTime(new Date(strategyForPlatform1.getPlupdatetime())); strategyVO.setLastModifier(strategyForPlatform1.getPlupdateuser()); - strategyVO.getRequireCharType(strategyForPlatform1.getPcharspecies()); strategyVO.setLicensors(strategyForPlatform1.getPllicensors()); strategyVO.setRequireCharCount(strategyForPlatform1.getPlrequiredtype()); + //澶勭悊瀵嗙爜绛栫暐鐨勭粍鍚堟柟寮� + Integer plchartypes = strategyForPlatform1.getPlchartypes(); + if(Func.isNotEmpty(plchartypes)){ + String combinations = plchartypes2Combinations(plchartypes); + strategyVO.setRequireCharType(combinations); + strategyVO.setRequireCharTypeText(CombinationEnum.getCombinationText(combinations)); + } return strategyVO; + } + + /** + * plchartypes杞崲涓篊ombinations锛堣嫳鏂囷級 + * @param plchartypes + * @return 杩涘埗鏁拌浆鎹负缁勫悎鏂瑰紡鐨勫洜涓烘灇涓惧涓箣闂寸敤閮藉ソ闂撮殧 + */ + private String plchartypes2Combinations(Integer plchartypes){ + StringBuilder sb = new StringBuilder(); + if ((plchartypes & 0x01) == 0x01) + sb.append("number,"); + if ((plchartypes & 0x02) == 0x02) + sb.append("lower,"); + if ((plchartypes & 0x04) == 0x04) + sb.append("upper,"); + if ((plchartypes & 0x08) == 0x08) + sb.append("symbol,"); + return sb.deleteCharAt(sb.length() - 1).toString(); + } + + /** + * plchartypes杞崲涓篊ombinations锛堣嫳鏂囷級 + * @param combinations + * @return 缁勫悎鏂瑰紡杞崲涓哄疄闄呰瀛樺偍鐨勬暣褰㈡暟 + */ + private short combinations2Plchartypes(String combinations) { + short plchartypes = 0; + String[] combinationsArray = combinations.split(","); + for (String type : combinationsArray) { + switch (type) { + case "number": + plchartypes |= 0x01; + break; + case "lower": + plchartypes |= 0x02; + break; + case "upper": + plchartypes |= 0x04; + break; + case "symbol": + plchartypes |= 0x08; + break; + } + } + + return plchartypes; } /** @@ -181,7 +244,6 @@ @Override public boolean saveUserPasswordStrateg(String[] userIds, String passwordStrategId) throws PLException { VciBaseUtil.alertNotNull(userIds,"鐢ㄦ埛涓婚敭",passwordStrategId,"瀵嗙爜瀹夊叏绛栫暐涓婚敭"); - //TODO锛氳繖閲屾病鏈夊仛鏌ラ噸澶勭悊锛屾槑澶╄寰楅獙璇佷竴涓嬭繖鍎挎槸涓嶆槸浼氳嚜鍔ㄥ仛saveOrUpdate鐨勫鐞� return platformClientUtil.getFrameworkService().saveUserPasswordStrateg( userIds, passwordStrategId, @@ -190,6 +252,187 @@ } /** + * 瀵嗙爜绛栫暐鏍¢獙锛氭槸鍚﹀悎瑙勬牎楠� + * @param strategy + */ + private void checkPwdStrategy(SmPasswordStrategyDTO strategy){ + if(strategy.getRequireCharCount() > strategy.getCombinations().split(",").length){ + throw new VciBaseException("蹇呭~绉嶇被涓嶈兘澶т簬鎵�閫夋嫨鐨勫瘑鐮佺粍鍚堟柟寮忕殑涓暟!"); + } + if(strategy.getMaxLength() < strategy.getMinLength()){ + throw new VciBaseException("瀵嗙爜鏈�澶ч暱搴︿笉鑳藉皬浜庢渶灏忛暱搴�!"); + } + if(Func.isNotEmpty(strategy.getRequireCharCount()) && + (strategy.getMinLength() < strategy.getRequireCharCount() || + strategy.getMaxLength() < strategy.getRequireCharCount()) + ){ + throw new VciBaseException("瀵嗙爜鏈�灏忛暱搴︿笉鑳藉皬浜庡繀濉绫荤殑鍊�!"); + } + if(strategy.getValidDay() <= strategy.getRemindDay()){ + throw new VciBaseException("杩囨湡鏃堕棿涓嶈兘灏忎簬鎻愰啋鏃堕棿!"); + } + //鍒ゆ柇鍓嶇鏄惁鏈彁浜わ紝鏄惁榛樿瀛楁 + if(Func.isEmpty(strategy.getDefaultFlag())){ + strategy.setDefaultFlag(0); + } + } + + /** + * dto瀵硅薄杞崲涓篿nfo瀵硅薄 + * @param dto + * @return + */ + private PasswordStrategyInfo changePasswordStrategyDTO2Info(SmPasswordStrategyDTO dto){ + PasswordStrategyInfo info = new PasswordStrategyInfo(); + info.id = dto.getOid() == null ? "" : dto.getOid(); + info.name = dto.getName(); + info.passwordLen = dto.getMinLength(); + info.passwordMaxLen = dto.getMaxLength(); + info.charTypes = dto.getRequireCharType(); + info.requiredType = dto.getRequireCharCount(); + //閫炬湡鏃�=鏈夋晥澶╂暟 + info.overdueDay = dto.getValidDay(); + info.remideDay = dto.getRemindDay(); + info.retryTime = dto.getRetryTime(); + info.lockTime = dto.getLockTime(); + if(dto.getDefaultFlag().equals("1") || dto.getDefaultFlag().equals("true")){ + info.isDefault = true; + }else { + info.isDefault = false; + } + info.desc = dto.getDescription() == null ? "" : dto.getDescription(); + info.createTime = dto.getCreateTime() == null ? System.currentTimeMillis() : dto.getCreateTime().getTime(); + info.createUser = dto.getCreator() == null ? "" : dto.getCreator(); + info.updateTime = System.currentTimeMillis(); + info.updateUser = dto.getLastModifier() == null ? "" : dto.getLastModifier(); + return info; + } + + /** + * 鏍规嵁map鏉′欢鏌ヨ瀵嗙爜绛栫暐 + * @param conditionMap + * @return + */ + private List<SmPasswordStrategyVO> getPwdStrategyByCondition(Map<String,String> conditionMap) throws PLException { + if(Func.isEmpty(conditionMap)){ + conditionMap = new HashMap(); + } + VciQueryWrapperForDO queryWrapper = new VciQueryWrapperForDO(conditionMap, SmPasswordStrategyForPlatform1.class); + List<SmPasswordStrategyForPlatform1> roleForPlatform1s = boService.selectByQueryWrapper(queryWrapper, SmPasswordStrategyForPlatform1.class); + if(Func.isEmpty(roleForPlatform1s)){ + return null; + } + return pltPwdStrategy2SmPwdStrategyVOs(roleForPlatform1s); + } + + /** + * 鏂板瀵嗙爜绛栫暐 + * @param spsDto + * @return + */ + @Override + public boolean addPasswordStrateg(SmPasswordStrategyDTO spsDto) throws PLException { + VciBaseUtil.alertNotNull( + spsDto,"鏂板鐨勫瘑鐮佺瓥鐣ュ璞�", + spsDto.getName(),"绛栫暐鍚嶇О", + spsDto.getMinLength(),"瀵嗙爜鏈�灏忛暱搴�", + spsDto.getMaxLength(),"瀵嗙爜鏈�澶ч暱搴�", + spsDto.getCombinations(),"缁勫悎鏂瑰紡绉嶇被", + spsDto.getRequireCharCount(),"蹇呭~绉嶇被", + spsDto.getValidDay(),"杩囨湡鏃堕棿", + spsDto.getRemindDay(),"鎻愰啋鏃堕棿", + spsDto.getRetryTime(),"閲嶈瘯娆℃暟", + spsDto.getLockTime(),"閿佸畾鏃堕棿" + ); + //瀵嗙爜绛栫暐鍚堣鏍¢獙锛屼笉鍚堣浼氭姏鍑洪敊璇� + this.checkPwdStrategy(spsDto); + //鏍规嵁绛栫暐鍚嶇О鏌ラ噸 + Map<String, String> conditionMap = new HashMap<>(); + conditionMap.put("pname",spsDto.getName()); + List<SmPasswordStrategyVO> dbVoList = this.getPwdStrategyByCondition(conditionMap); + if(Func.isNotEmpty(dbVoList)){ + throw new VciBaseException("绛栫暐鍚嶇О宸茬粡瀛樺湪锛岃杩涜淇敼!"); + } + //鑾峰彇褰撳墠鐢ㄦ埛璐﹀彿淇℃伅锛氬钩鍙颁繚瀛樻柟娉曚腑浼氬皢userEntityInfo涓殑鐢ㄦ埛淇℃伅鐢ㄤ綔褰撳墠绛栫暐鐨勫垱寤轰汉鍜屼慨鏀逛汉 + String userId = WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getUserId(); + UserEntityInfo userEntityInfo = new UserEntityInfo(userId,null); + //缁勫悎鏂瑰紡杞崲涓哄瓨鍌ㄥ�� + spsDto.setRequireCharType(combinations2Plchartypes(spsDto.getCombinations())); + spsDto.setOid(VciBaseUtil.getPk().toUpperCase(Locale.ROOT)); + spsDto.setCreator(userId); + spsDto.setLastModifier(userId); + //杞崲涓哄瓨鍌ㄧ敤瀵硅薄 + PasswordStrategyInfo passwordStrategyInfo = changePasswordStrategyDTO2Info(spsDto); + //褰撹缃负榛樿绛栫暐鏃讹紝骞冲彴淇濆瓨鏂规硶浼氳嚜鍔ㄥ鐞嗘帀宸插瓨鍦ㄧ殑榛樿绛栫暐锛屼互淇濊瘉鍙湁涓�鏉¢粯璁ょ瓥鐣� + return platformClientUtil.getFrameworkService().savePasswordStrategy(passwordStrategyInfo, userEntityInfo); + } + + /** + * 淇敼瀵嗙爜绛栫暐 + * @param spsDto + * @return + */ + @Override + public boolean updatePasswordStrateg(SmPasswordStrategyDTO spsDto) throws PLException { + VciBaseUtil.alertNotNull( + spsDto,"鏂板鐨勫瘑鐮佺瓥鐣ュ璞�", + spsDto.getOid(),"绛栫暐涓婚敭", + spsDto.getName(),"绛栫暐鍚嶇О", + spsDto.getMinLength(),"瀵嗙爜鏈�灏忛暱搴�", + spsDto.getMaxLength(),"瀵嗙爜鏈�澶ч暱搴�", + spsDto.getCombinations(),"缁勫悎鏂瑰紡绉嶇被", + spsDto.getRequireCharCount(),"蹇呭~绉嶇被", + spsDto.getValidDay(),"杩囨湡鏃堕棿", + spsDto.getRemindDay(),"鎻愰啋鏃堕棿", + spsDto.getRetryTime(),"閲嶈瘯娆℃暟", + spsDto.getLockTime(),"閿佸畾鏃堕棿" + ); + //瀵嗙爜绛栫暐鍚堣鏍¢獙锛屼笉鍚堣浼氭姏鍑洪敊璇� + this.checkPwdStrategy(spsDto); + //鏌ヨ淇敼鐨勭瓥鐣ユ槸鍚﹀瓨鍦� + Map<String, String> conditionMap = new HashMap<>(); + conditionMap.put("pluid",spsDto.getOid()); + List<SmPasswordStrategyVO> dbVoList = this.getPwdStrategyByCondition(conditionMap); + if(Func.isEmpty(dbVoList)){ + throw new VciBaseException("褰撳墠淇敼鐨勫瘑鐮佺瓥鐣ュ湪绯荤粺涓笉瀛樺湪锛岃鍒锋柊鍚庨噸璇�!"); + } + //鑾峰彇褰撳墠鐢ㄦ埛璐﹀彿淇℃伅 + String userId = WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getUserId(); + UserEntityInfo userEntityInfo = new UserEntityInfo(userId,null); + //鏍规嵁绛栫暐鍚嶇О鏌ラ噸 + conditionMap.clear(); + conditionMap.put("pname",spsDto.getName()); + conditionMap.put("pluid", QueryOptionConstant.NOTEQUAL + spsDto.getOid()); + List<SmPasswordStrategyVO> repeatVoList = this.getPwdStrategyByCondition(conditionMap); + if(Func.isNotEmpty(repeatVoList)){ + throw new VciBaseException("绛栫暐鍚嶇О宸茬粡瀛樺湪锛岃杩涜淇敼!"); + } + SmPasswordStrategyVO smPasswordStrategyVO = dbVoList.get(0); + spsDto.setCreateTime(smPasswordStrategyVO.getCreateTime()); + spsDto.setCreator(smPasswordStrategyVO.getCreator()); + spsDto.setLastModifier(userId); + //缁勫悎鏂瑰紡杞崲涓哄瓨鍌ㄥ�� + spsDto.setRequireCharType(combinations2Plchartypes(spsDto.getCombinations())); + PasswordStrategyInfo passwordStrategyInfo = changePasswordStrategyDTO2Info(spsDto); + return platformClientUtil.getFrameworkService().editPasswordStrategy(passwordStrategyInfo,userEntityInfo); + } + + /** + * 鍒犻櫎瀵嗙爜绛栫暐 + * @param pwdIds + * @return + */ + @Override + public boolean delPasswordStrateg(String[] pwdIds) throws PLException { + VciBaseUtil.alertNotNull(pwdIds,"瑕佸垹闄ょ殑瀵嗙爜绛栫暐涓婚敭"); + //TODO: 搴旇鏄笉鍏峰杩炲甫鍒犻櫎鐨勫姛鑳斤紝绛栫暐鍒犻櫎鍚庣敤鎴峰叧鑱旂殑鏃犵敤绛栫暐淇℃伅杩樺湪,鑰冭檻鍚庢湡鏄惁闇�瑕佸仛锛屾暟鎹噺涓嶅ぇ鍙互涓嶅仛杩炲甫鍒犻櫎 + return platformClientUtil.getFrameworkService().deletePasswordStrategy( + pwdIds, + new UserEntityInfo("developer"/*WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getUserId()*/, null) + ); + } + + /** * 鏍规嵁涓婚敭鏌ヨ瀵嗙爜绛栫暐map瀵硅薄 * @param oidList * @return key涓哄瘑鐮佺瓥鐣ヤ富閿� value涓哄瘑鐮佺瓥鐣� diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmRoleQueryServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmRoleQueryServiceImpl.java index 4374a0a..be2eb81 100644 --- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmRoleQueryServiceImpl.java +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmRoleQueryServiceImpl.java @@ -646,16 +646,22 @@ VciBaseUtil.alertNotNull( smRoleDTO,"娣诲姞鐨勮鑹插璞�", smRoleDTO.getName(),"瑙掕壊鍚�"); - //鏌ヨ鏁版嵁搴撲腑鐨勶紝鏍规嵁瑙掕壊鍚嶆煡 + //鏍规嵁瑙掕壊涓婚敭鏌ヨ锛岀‘淇濅慨鏀圭殑瑙掕壊瀛樺湪 Map<String, String> conditionMap = new HashMap<>(); - conditionMap.put("plname",smRoleDTO.getName()); + conditionMap.put("pluid",smRoleDTO.getOid()); SmRoleVO dbSmRoleVO = getRoleByConditionMap(conditionMap); //鏍规嵁涓婚敭娌℃煡璇㈠埌浜嗙敤鎴� if(Func.isEmpty(dbSmRoleVO) || Func.isBlank(dbSmRoleVO.getOid())){ throw new PLException("500", new String[] { "褰撳墠淇敼鐨勮鑹蹭笉瀛樺湪!"}); } - //瑙掕壊鍚嶇浉绛夛紝浣嗘槸涓婚敭涓嶇浉绛夛紝璇存槑淇敼涓虹殑瑙掕壊鍚嶅凡瀛樺湪锛屼笉鑳介噸澶� - if(dbSmRoleVO.getName().equals(smRoleDTO.getName()) && !dbSmRoleVO.getOid().equals(smRoleDTO.getOid())){ + //鏌ヨ鏁版嵁搴撲腑鐨勶紝鏍规嵁瑙掕壊鍚嶆煡閲� + conditionMap.clear(); + conditionMap.put("plname",smRoleDTO.getName()); + //鎺掗櫎鎺夊綋鍓嶄慨鏀圭殑鐢ㄦ埛 + conditionMap.put("pluid",QueryOptionConstant.NOTEQUAL + smRoleDTO.getName()); + SmRoleVO reapeatSmRoleVO = getRoleByConditionMap(conditionMap); + //璇存槑淇敼涓虹殑瑙掕壊鍚嶅凡瀛樺湪锛屼笉鑳介噸澶� + if(Func.isNotEmpty(reapeatSmRoleVO) && smRoleDTO.getName().equals(reapeatSmRoleVO)){ throw new PLException("500", new String[] { "璇ヨ鑹插悕绉板凡缁忓瓨鍦�,璇蜂慨鏀�!"}); } SmRoleDTO smRoleDTO1 = new SmRoleDTO(); @@ -692,7 +698,7 @@ * @throws VciBaseException */ @Override - public BaseResult importRole(File file) throws VciBaseException { + public BaseResult importRole(File file) throws Exception { VciBaseUtil.alertNotNull(file,"excel鏂囦欢"); if(!file.exists()){ throw new VciBaseException("瀵煎叆鐨別xcel鏂囦欢涓嶅瓨鍦�,{0}",new String[]{file.getPath()}); diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmUserQueryServiceImpl.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmUserQueryServiceImpl.java index dbea2f7..0c8ae50 100644 --- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmUserQueryServiceImpl.java +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/compatibility/impl/SmUserQueryServiceImpl.java @@ -1333,7 +1333,7 @@ * @throws VciBaseException */ @Override - public BaseResult importUser(File file) throws VciBaseException { + public BaseResult importUser(File file) throws Exception { VciBaseUtil.alertNotNull(file,"excel鏂囦欢"); if(!file.exists()){ throw new VciBaseException("瀵煎叆鐨別xcel鏂囦欢涓嶅瓨鍦�,{0}",new String[]{file.getPath()}); diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/controller/OrgDepartmentQueryController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/controller/OrgDepartmentQueryController.java index a83aa20..2b11de4 100644 --- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/controller/OrgDepartmentQueryController.java +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/controller/OrgDepartmentQueryController.java @@ -18,6 +18,8 @@ import com.vci.web.util.PlatformClientUtil; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; @@ -38,7 +40,6 @@ */ @RestController @RequestMapping("/departmentQueryController") -@Slf4j public class OrgDepartmentQueryController { /** @@ -46,6 +47,11 @@ */ @Autowired private OrgDeptQueryServiceI deptQueryService; + + /** + * 鏃ュ織 + */ + private Logger logger = LoggerFactory.getLogger(getClass()); /** * 閮ㄩ棬鐨勬爲褰㈠弬鐓э紝閮ㄩ棬绠$悊涔熺敤鐨勮繖涓煡璇㈡帴鍙� @@ -60,9 +66,9 @@ return BaseResult.tree(deptTreeList); }catch (Exception e) { e.printStackTrace(); - String exceptionMessage = VciBaseUtil.getExceptionMessage(e); - log.error("閮ㄩ棬鏍戞煡璇㈡椂鍑虹幇閿欒锛屽師鍥狅細" + exceptionMessage); - return BaseResult.fail("閮ㄩ棬鏍戞煡璇㈡椂鍑虹幇閿欒锛屽師鍥狅細" + e.getMessage()); + String exceptionMessage = "閮ㄩ棬鏍戞煡璇㈡椂鍑虹幇閿欒锛屽師鍥狅細" + VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + return BaseResult.fail(e.getMessage()); } } @@ -93,9 +99,9 @@ return deptQueryService.saveUsersDept(userOids,deptId) ? BaseResult.success("閮ㄩ棬鍒嗛厤鎴愬姛锛�"):BaseResult.fail("閮ㄩ棬鍒嗛厤澶辫触锛�"); }catch (Exception e){ e.printStackTrace(); - String exceptionMessage = VciBaseUtil.getExceptionMessage(e); - log.error("鍏宠仈鐨勯儴闂ㄦ椂鍑虹幇閿欒锛屽師鍥狅細" + exceptionMessage); - return BaseResult.fail("鍏宠仈鐨勯儴闂ㄦ椂鍑虹幇閿欒锛屽師鍥狅細" + exceptionMessage); + String exceptionMessage = "鍏宠仈鐨勯儴闂ㄦ椂鍑虹幇閿欒锛屽師鍥狅細" + VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + return BaseResult.fail(exceptionMessage); } } @@ -110,9 +116,9 @@ return deptQueryService.addDept(orgDepartmentDTO) ? BaseResult.success("閮ㄩ棬娣诲姞鎴愬姛锛�"):BaseResult.fail("閮ㄩ棬娣诲姞澶辫触锛�"); }catch (Exception e){ e.printStackTrace(); - String exceptionMessage = VciBaseUtil.getExceptionMessage(e); - log.error("娣诲姞閮ㄩ棬鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + exceptionMessage); - return BaseResult.fail("娣诲姞閮ㄩ棬鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + exceptionMessage); + String exceptionMessage = "娣诲姞閮ㄩ棬鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + return BaseResult.fail(exceptionMessage); } } @@ -127,9 +133,9 @@ return deptQueryService.updateDept(orgDepartmentDTO) ? BaseResult.success("閮ㄩ棬淇敼鎴愬姛锛�"):BaseResult.fail("閮ㄩ棬淇敼澶辫触锛�"); }catch (Exception e){ e.printStackTrace(); - String exceptionMessage = VciBaseUtil.getExceptionMessage(e); - log.error("淇敼閮ㄩ棬鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + exceptionMessage); - return BaseResult.fail("淇敼閮ㄩ棬鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + exceptionMessage); + String exceptionMessage = "淇敼閮ㄩ棬鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + return BaseResult.fail(exceptionMessage); } } @@ -144,9 +150,9 @@ return deptQueryService.deleteDept(ids) ? BaseResult.success("鍒犻櫎閮ㄩ棬鎴愬姛锛�"):BaseResult.fail("鍒犻櫎閮ㄩ棬澶辫触锛�"); }catch (Exception e){ e.printStackTrace(); - String exceptionMessage = VciBaseUtil.getExceptionMessage(e); - log.error("娣诲姞閮ㄩ棬鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + exceptionMessage); - return BaseResult.fail("娣诲姞閮ㄩ棬鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + exceptionMessage); + String exceptionMessage = "娣诲姞閮ㄩ棬鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + return BaseResult.fail(exceptionMessage); } } @@ -156,7 +162,6 @@ * @param response */ @RequestMapping(value = "/downloadImportTemplate",method = RequestMethod.GET) - @VciUnCheckRight public void downloadImportTemplate(String downloadFileName, HttpServletResponse response){ try { String excelPath = deptQueryService.downloadImportTemplate(downloadFileName); @@ -178,7 +183,6 @@ * @return */ @RequestMapping(value = "/importDept",method = RequestMethod.POST) - @VciUnCheckRight public BaseResult importUser(MultipartFile file){ String excelFileName = LocalFileUtil.getDefaultTempFolder() + File.separator + LocalFileUtil.getFileNameForIE(file.getOriginalFilename()); File file1 = new File(excelFileName); diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/controller/SmPwdStrategyQueryController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/controller/SmPwdStrategyQueryController.java index 99f46f6..afd0d76 100644 --- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/controller/SmPwdStrategyQueryController.java +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/controller/SmPwdStrategyQueryController.java @@ -1,16 +1,17 @@ package com.vci.frameworkcore.controller; import com.vci.frameworkcore.compatibility.SmPwdStrategyQueryServiceI; +import com.vci.frameworkcore.model.dto.SmPasswordStrategyDTO; import com.vci.frameworkcore.pagemodel.SmPasswordStrategyVO; -import com.vci.frameworkcore.pagemodel.SmUserVO; import com.vci.starter.web.annotation.controller.VciUnCheckRight; import com.vci.starter.web.exception.VciBaseException; import com.vci.starter.web.pagemodel.BaseQueryObject; import com.vci.starter.web.pagemodel.BaseResult; import com.vci.starter.web.pagemodel.DataGrid; import com.vci.starter.web.util.VciBaseUtil; -import com.vci.web.util.Func; -import lombok.extern.slf4j.Slf4j; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; @@ -25,7 +26,6 @@ */ @RestController @RequestMapping("/passwordStrategyQueryController") -@Slf4j public class SmPwdStrategyQueryController { /** @@ -33,6 +33,11 @@ */ @Resource private SmPwdStrategyQueryServiceI pwdStrategyQueryService; + + /** + * 鏃ュ織 + */ + private Logger logger = LoggerFactory.getLogger(getClass()); /** * 瀵嗙爜瀹夊叏绛栫暐鐨勫垪琛ㄥ弬鐓ф煡璇� @@ -48,9 +53,9 @@ return BaseResult.dataGrid(pwdStrategyVODataGrid); }catch (Exception e) { e.printStackTrace(); - String exceptionMessage = VciBaseUtil.getExceptionMessage(e); - log.error("瀵嗙爜瀹夊叏绛栫暐鍒楄〃鏌ヨ鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + exceptionMessage); - return BaseResult.fail("瀵嗙爜瀹夊叏绛栫暐鍒楄〃鏌ヨ鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + e.getMessage()); + String exceptionMessage = "瀵嗙爜瀹夊叏绛栫暐鍒楄〃鏌ヨ鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + return BaseResult.fail(e.getMessage()); } } @@ -68,9 +73,9 @@ return BaseResult.dataList(pwdStrategyVODataGrid); }catch (Exception e) { e.printStackTrace(); - String exceptionMessage = VciBaseUtil.getExceptionMessage(e); - log.error("瀵嗙爜瀹夊叏绛栫暐涓嬫媺鍒楄〃鏌ヨ鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + exceptionMessage); - return BaseResult.fail("瀵嗙爜瀹夊叏绛栫暐涓嬫媺鍒楄〃鏌ヨ鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + e.getMessage()); + String exceptionMessage = "瀵嗙爜瀹夊叏绛栫暐涓嬫媺鍒楄〃鏌ヨ鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + return BaseResult.fail(e.getMessage()); } } @@ -87,9 +92,64 @@ ? BaseResult.success("涓虹敤鎴疯缃瘑鐮佸畨鍏ㄧ瓥鐣ユ垚鍔燂紒"):BaseResult.fail("涓虹敤鎴疯缃瘑鐮佸畨鍏ㄧ瓥鐣ュけ璐ワ紒"); }catch (Exception e){ e.printStackTrace(); - String exceptionMessage = VciBaseUtil.getExceptionMessage(e); - log.error("涓虹敤鎴疯缃瘑鐮佸畨鍏ㄧ瓥鐣ユ椂鍑虹幇閿欒锛屽師鍥狅細" + exceptionMessage); - return BaseResult.fail("涓虹敤鎴疯缃瘑鐮佸畨鍏ㄧ瓥鐣ユ椂鍑虹幇閿欒锛屽師鍥狅細" + exceptionMessage); + String exceptionMessage = "涓虹敤鎴疯缃瘑鐮佸畨鍏ㄧ瓥鐣ユ椂鍑虹幇閿欒锛屽師鍥狅細" + VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + return BaseResult.fail(exceptionMessage); + } + } + + /** + * 鏂板瀵嗙爜绛栫暐 + * @param smPasswordStrategyDTO + * @return + */ + @RequestMapping(value = "/addPasswordStrateg",method = RequestMethod.POST) + public BaseResult addPasswordStrateg(@RequestBody SmPasswordStrategyDTO smPasswordStrategyDTO){ + try { + return pwdStrategyQueryService.addPasswordStrateg(smPasswordStrategyDTO) + ? BaseResult.success("鏂板瀵嗙爜瀹夊叏绛栫暐鎴愬姛锛�"):BaseResult.fail("鏂板瀵嗙爜瀹夊叏绛栫暐澶辫触锛�"); + }catch (Exception e){ + e.printStackTrace(); + String exceptionMessage = "鏂板瀵嗙爜瀹夊叏绛栫暐鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + return BaseResult.fail(exceptionMessage); + } + } + + /** + * 淇敼瀵嗙爜绛栫暐 + * @param smPasswordStrategyDTO + * @return + */ + @RequestMapping(value = "/updatePasswordStrateg",method = RequestMethod.PUT) + public BaseResult updatePasswordStrateg(@RequestBody SmPasswordStrategyDTO smPasswordStrategyDTO){ + try { + return pwdStrategyQueryService.updatePasswordStrateg(smPasswordStrategyDTO) + ? BaseResult.success("淇敼瀵嗙爜瀹夊叏绛栫暐鎴愬姛锛�"):BaseResult.fail("淇敼瀵嗙爜瀹夊叏绛栫暐澶辫触锛�"); + }catch (Exception e){ + e.printStackTrace(); + String exceptionMessage = "淇敼瀵嗙爜瀹夊叏绛栫暐鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" +VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + return BaseResult.fail(exceptionMessage); + } + } + + /** + * 鍒犻櫎瀵嗙爜绛栫暐 + * @param pwdIds + * @return + */ + @RequestMapping(value = "/delPasswordStrateg",method = RequestMethod.DELETE) + @VciUnCheckRight + public BaseResult delPasswordStrateg(String[] pwdIds){ + try { + return pwdStrategyQueryService.delPasswordStrateg(pwdIds) + ? BaseResult.success("鍒犻櫎瀵嗙爜瀹夊叏绛栫暐鎴愬姛锛�"):BaseResult.fail("鍒犻櫎瀵嗙爜瀹夊叏绛栫暐澶辫触锛�"); + }catch (Exception e){ + e.printStackTrace(); + String exceptionMessage = "鍒犻櫎瀵嗙爜瀹夊叏绛栫暐鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + return BaseResult.fail(exceptionMessage); } } diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/controller/SmRoleQueryController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/controller/SmRoleQueryController.java index fdcb496..28c90bd 100644 --- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/controller/SmRoleQueryController.java +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/controller/SmRoleQueryController.java @@ -12,6 +12,8 @@ import com.vci.starter.web.util.WebThreadLocalUtil; import com.vci.web.enumpck.UserTypeEnum; import lombok.extern.slf4j.Slf4j; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; @@ -27,7 +29,6 @@ */ @RestController @RequestMapping("/roleQueryController") -@Slf4j public class SmRoleQueryController { /** @@ -35,6 +36,11 @@ */ @Autowired private SmRoleQueryServiceI roleQueryService; + + /** + * 鏃ュ織 + */ + private Logger logger = LoggerFactory.getLogger(getClass()); /** * 瑙掕壊鐨勫垪琛ㄥ弬鐓� @@ -52,9 +58,9 @@ return BaseResult.dataGrid(roleVODataGrid); }catch (Exception e){ e.printStackTrace(); - String exceptionMessage = VciBaseUtil.getExceptionMessage(e); - log.error("鏌ヨ瑙掕壊鍒楄〃鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + exceptionMessage); - return BaseResult.fail("鏌ヨ瑙掕壊鍒楄〃鏃跺嚭鐜伴敊璇紝鍘熷洜" + exceptionMessage); + String exceptionMessage = "鏌ヨ瑙掕壊鍒楄〃鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + return BaseResult.fail(exceptionMessage); } } @@ -81,9 +87,9 @@ return BaseResult.dataGrid(roleVOData); }catch (Exception e){ e.printStackTrace(); - String exceptionMessage = VciBaseUtil.getExceptionMessage(e); - log.error("鏌ヨ瑙掕壊鍒楄〃鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + exceptionMessage); - return BaseResult.fail("鏌ヨ瑙掕壊鍒楄〃鏃跺嚭鐜伴敊璇紝鍘熷洜锛�"+exceptionMessage); + String exceptionMessage = "鏌ヨ瑙掕壊鍒楄〃鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + return BaseResult.fail(exceptionMessage); } } @@ -99,9 +105,9 @@ return BaseResult.dataList(roleQueryService.listRoleByUserOid(userOid,queryMap)); }catch (Exception e){ e.printStackTrace(); - String exceptionMessage = VciBaseUtil.getExceptionMessage(e); - log.error("鏍规嵁鐢ㄦ埛涓婚敭鑾峰彇锛屽叧鑱旂殑瑙掕壊鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + exceptionMessage); - return BaseResult.fail("鏍规嵁鐢ㄦ埛涓婚敭鑾峰彇锛屽叧鑱旂殑瑙掕壊鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + exceptionMessage); + String exceptionMessage = "鏍规嵁鐢ㄦ埛涓婚敭鑾峰彇锛屽叧鑱旂殑瑙掕壊鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + return BaseResult.fail(exceptionMessage); } } @@ -130,9 +136,9 @@ return roleQueryService.addRole(smRoleDTO) ? BaseResult.success("瑙掕壊娣诲姞鎴愬姛锛�"):BaseResult.fail("瑙掕壊娣诲姞澶辫触锛�"); }catch (Exception e){ e.printStackTrace(); - String exceptionMessage = VciBaseUtil.getExceptionMessage(e); - log.error("娣诲姞瑙掕壊鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + exceptionMessage); - return BaseResult.fail("娣诲姞瑙掕壊鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + exceptionMessage); + String exceptionMessage = "娣诲姞瑙掕壊鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + return BaseResult.fail(exceptionMessage); } } @@ -147,9 +153,9 @@ return roleQueryService.updateRole(smRoleDTO) ? BaseResult.success("瑙掕壊淇敼鎴愬姛锛�"):BaseResult.fail("瑙掕壊淇敼澶辫触锛�"); }catch (Exception e){ e.printStackTrace(); - String exceptionMessage = VciBaseUtil.getExceptionMessage(e); - log.error("淇敼瑙掕壊鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + exceptionMessage); - return BaseResult.fail("淇敼瑙掕壊鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + exceptionMessage); + String exceptionMessage = "淇敼瑙掕壊鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + return BaseResult.fail(exceptionMessage); } } @@ -164,9 +170,9 @@ return roleQueryService.deleteRole(ids) ? BaseResult.success("鍒犻櫎鐢ㄦ埛鎴愬姛锛�"):BaseResult.fail("鍒犻櫎鐢ㄦ埛澶辫触锛�"); }catch (Exception e){ e.printStackTrace(); - String exceptionMessage = VciBaseUtil.getExceptionMessage(e); - log.error("娣诲姞鐢ㄦ埛鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + exceptionMessage); - return BaseResult.fail("娣诲姞鐢ㄦ埛鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + exceptionMessage); + String exceptionMessage = "娣诲姞鐢ㄦ埛鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + return BaseResult.fail(exceptionMessage); } } @@ -206,9 +212,9 @@ return roleQueryService.saveRights(userOids,roleIds) ? BaseResult.success("瑙掕壊鍒嗛厤鎴愬姛锛�"):BaseResult.fail("瑙掕壊鍒嗛厤澶辫触锛�"); }catch (Exception e){ e.printStackTrace(); - String exceptionMessage = VciBaseUtil.getExceptionMessage(e); - log.error("鍒嗛厤瑙掕壊鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + exceptionMessage); - return BaseResult.fail("鍒嗛厤瑙掕壊鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + exceptionMessage); + String exceptionMessage = "鍒嗛厤瑙掕壊鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + return BaseResult.fail(exceptionMessage); } } @@ -224,9 +230,9 @@ return roleQueryService.saveRight(userOids,roleId) ? BaseResult.success("鎴愬憳鍒嗛厤鎴愬姛锛�"):BaseResult.fail("鎴愬憳鍒嗛厤澶辫触锛�"); }catch (Exception e){ e.printStackTrace(); - String exceptionMessage = VciBaseUtil.getExceptionMessage(e); - log.error("鍒嗛厤鐢ㄦ埛鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + exceptionMessage); - return BaseResult.fail("鍒嗛厤鐢ㄦ埛鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + exceptionMessage); + String exceptionMessage = "鍒嗛厤鐢ㄦ埛鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + return BaseResult.fail(exceptionMessage); } } diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/controller/SmUserQueryController.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/controller/SmUserQueryController.java index b325c16..a35c5aa 100644 --- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/controller/SmUserQueryController.java +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/controller/SmUserQueryController.java @@ -14,6 +14,8 @@ import com.vci.web.util.Func; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; @@ -31,7 +33,6 @@ */ @RestController @RequestMapping("/userQueryController") -@Slf4j public class SmUserQueryController { /** @@ -39,6 +40,11 @@ */ @Autowired private SmUserQueryServiceI userQueryService; + + /** + * 鏃ュ織 + */ + private Logger logger = LoggerFactory.getLogger(getClass()); /** * 鐢ㄦ埛鐨勫垪琛ㄥ弬鐓э紝 @@ -80,9 +86,8 @@ * @throws VciBaseException */ @RequestMapping(value = "/countSmUserByDeptOid",method = RequestMethod.GET) - @VciUnCheckRight public BaseResult<List<SmUserVO>> countSmUserByDeptOid(String pkDepartment,BaseQueryObject queryObject) throws VciBaseException{ - VciBaseUtil.alertNotNull(pkDepartment,"閮ㄩ棬涓婚敭"); + //VciBaseUtil.alertNotNull(pkDepartment,"閮ㄩ棬涓婚敭");鍏佽涓虹┖鍥犱负浼氬嚭鐜扮粺璁℃墍鏈夐儴闂ㄨ繖涓妭鐐圭殑鎯呭喌 try { if(queryObject == null){ queryObject = new BaseQueryObject(); @@ -91,9 +96,9 @@ return BaseResult.dataList(userVODataGrid); }catch (Exception e){ e.printStackTrace(); - String exceptionMessage = VciBaseUtil.getExceptionMessage(e); - log.error("閫氳繃閮ㄩ棬涓婚敭鑾峰彇鍦ㄨ閮ㄩ棬涓嬬殑锛岀敤鎴峰弬鐓у垪琛ㄦ椂鍑虹幇閿欒锛屽師鍥狅細" + exceptionMessage); - return BaseResult.fail("閫氳繃閮ㄩ棬涓婚敭鑾峰彇鍦ㄨ閮ㄩ棬涓嬬殑锛岀敤鎴峰弬鐓у垪琛ㄦ椂鍑虹幇閿欒锛屽師鍥狅細" + exceptionMessage); + String exceptionMessage = "閫氳繃閮ㄩ棬涓婚敭鑾峰彇鍦ㄨ閮ㄩ棬涓嬬殑锛岀敤鎴峰弬鐓у垪琛ㄦ椂鍑虹幇閿欒锛屽師鍥狅細" + VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + return BaseResult.fail(exceptionMessage); } } @@ -105,7 +110,6 @@ * @throws VciBaseException 閮ㄩ棬涓婚敭涓虹┖銆佹煡璇㈠嚭閿欑殑鏃跺�欎細鎶涘嚭寮傚父锛屽鏋滄槸鑰佺殑椤圭洰閲屼笉鎶涘嚭寮傚父 */ @RequestMapping(value = "/listUserByDeptOid",method = RequestMethod.GET) - @VciUnCheckRight public BaseResult<List<SmUserVO>> listUserByDeptOid(String pkDepartment,BaseQueryObject queryObject) throws VciBaseException{ VciBaseUtil.alertNotNull(pkDepartment,"閮ㄩ棬涓婚敭"); try { @@ -116,9 +120,9 @@ return BaseResult.dataList(userVODataGrid); }catch (Exception e){ e.printStackTrace(); - String exceptionMessage = VciBaseUtil.getExceptionMessage(e); - log.error("閫氳繃閮ㄩ棬涓婚敭鑾峰彇鍦ㄨ閮ㄩ棬涓嬬殑锛岀敤鎴峰弬鐓у垪琛ㄦ椂鍑虹幇閿欒锛屽師鍥狅細" + exceptionMessage); - return BaseResult.fail("閫氳繃閮ㄩ棬涓婚敭鑾峰彇鍦ㄨ閮ㄩ棬涓嬬殑锛岀敤鎴峰弬鐓у垪琛ㄦ椂鍑虹幇閿欒锛屽師鍥狅細" + exceptionMessage); + String exceptionMessage = "閫氳繃閮ㄩ棬涓婚敭鑾峰彇鍦ㄨ閮ㄩ棬涓嬬殑锛岀敤鎴峰弬鐓у垪琛ㄦ椂鍑虹幇閿欒锛屽師鍥狅細" + VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + return BaseResult.fail(exceptionMessage); } } @@ -130,7 +134,6 @@ * @throws VciBaseException 閮ㄩ棬涓婚敭涓虹┖銆佹煡璇㈠嚭閿欑殑鏃跺�欎細鎶涘嚭寮傚父锛屽鏋滄槸鑰佺殑椤圭洰閲屼笉鎶涘嚭寮傚父 */ @RequestMapping(value = "/listUserUnInDeptOid",method = RequestMethod.GET) - @VciUnCheckRight public BaseResult<List<SmUserVO>> listUserUnInDeptOid(String pkDepartment,BaseQueryObject queryObject) throws VciBaseException{ VciBaseUtil.alertNotNull(pkDepartment,"閮ㄩ棬涓婚敭"); try { @@ -141,9 +144,9 @@ return BaseResult.dataList(userVODataGrid); }catch (Exception e){ e.printStackTrace(); - String exceptionMessage = VciBaseUtil.getExceptionMessage(e); - log.error("閫氳繃閮ㄩ棬涓婚敭鑾峰彇涓嶅湪璇ラ儴闂ㄤ笅鐨勶紝鐢ㄦ埛鍙傜収鍒楄〃鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + exceptionMessage); - return BaseResult.fail("閫氳繃閮ㄩ棬涓婚敭鑾峰彇涓嶅湪璇ラ儴闂ㄤ笅鐨勶紝鐢ㄦ埛鍙傜収鍒楄〃鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + exceptionMessage); + String exceptionMessage = "閫氳繃閮ㄩ棬涓婚敭鑾峰彇涓嶅湪璇ラ儴闂ㄤ笅鐨勶紝鐢ㄦ埛鍙傜収鍒楄〃鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + return BaseResult.fail(exceptionMessage); } } @@ -165,9 +168,9 @@ return BaseResult.dataList(smUserVOList); }catch (Exception e){ e.printStackTrace(); - String exceptionMessage = VciBaseUtil.getExceptionMessage(e); - log.error("閫氳繃瑙掕壊鏉ヨ幏鍙栫敤鎴风殑鍙傜収鍒楄〃鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + exceptionMessage); - return BaseResult.fail("閫氳繃瑙掕壊鏉ヨ幏鍙栫敤鎴风殑鍙傜収鍒楄〃鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + exceptionMessage); + String exceptionMessage = "閫氳繃瑙掕壊鏉ヨ幏鍙栫敤鎴风殑鍙傜収鍒楄〃鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + return BaseResult.fail(exceptionMessage); } } @@ -189,9 +192,9 @@ return BaseResult.dataList(smUserVOList); }catch (Exception e){ e.printStackTrace(); - String exceptionMessage = VciBaseUtil.getExceptionMessage(e); - log.error("鑾峰彇涓嶅湪褰撳墠瑙掕壊涓嬬殑锛岀敤鎴峰弬鐓у垪琛ㄦ椂鍑虹幇閿欒锛屽師鍥狅細" + exceptionMessage); - return BaseResult.fail("鑾峰彇涓嶅湪褰撳墠瑙掕壊涓嬬殑锛岀敤鎴峰弬鐓у垪琛ㄦ椂鍑虹幇閿欒锛屽師鍥狅細" + exceptionMessage); + String exceptionMessage = "鑾峰彇涓嶅湪褰撳墠瑙掕壊涓嬬殑锛岀敤鎴峰弬鐓у垪琛ㄦ椂鍑虹幇閿欒锛屽師鍥狅細" + VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + return BaseResult.fail(exceptionMessage); } } @@ -214,16 +217,15 @@ * @throws VciBaseException 鏌ヨ鍑洪敊鐨勬椂鍊欎細鎶涘嚭寮傚父锛屽鏋滄槸鑰佺殑椤圭洰閲屼笉鎶涘嚭寮傚父 */ @RequestMapping(value = "/getDataGridUsers",method = RequestMethod.GET) - //@VciUnCheckRight public BaseResult<SmUserVO> getDataGridUsers(BaseQueryObject queryObject) throws VciBaseException { try { DataGrid<SmUserVO> userVODataGrid = userQueryService.getDataGridUsers(queryObject.getConditionMap(),queryObject.getPageHelper()); return BaseResult.dataGrid(userVODataGrid); }catch (Exception e) { e.printStackTrace(); - String exceptionMessage = VciBaseUtil.getExceptionMessage(e); - log.error("鐢ㄦ埛绠$悊鍒楄〃鏌ヨ鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + exceptionMessage); - return BaseResult.fail("鐢ㄦ埛绠$悊鍒楄〃鏌ヨ鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + e.getMessage()); + String exceptionMessage = "鐢ㄦ埛绠$悊鍒楄〃鏌ヨ鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + return BaseResult.fail(e.getMessage()); } } @@ -233,15 +235,14 @@ * @return */ @RequestMapping(value = "/addUser",method = RequestMethod.POST) - @VciUnCheckRight public BaseResult addUser(@RequestBody SmUserDTO smUserDTO){ try { return userQueryService.addUser(smUserDTO) ? BaseResult.success("鐢ㄦ埛娣诲姞鎴愬姛锛�"):BaseResult.fail("鐢ㄦ埛娣诲姞澶辫触锛�"); }catch (Exception e){ e.printStackTrace(); - String exceptionMessage = VciBaseUtil.getExceptionMessage(e); - log.error("娣诲姞鐢ㄦ埛鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + exceptionMessage); - return BaseResult.fail("娣诲姞鐢ㄦ埛鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + exceptionMessage); + String exceptionMessage = "娣诲姞鐢ㄦ埛鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + return BaseResult.fail(exceptionMessage); } } @@ -251,15 +252,14 @@ * @return */ @RequestMapping(value = "/updateUser",method = RequestMethod.PUT) - @VciUnCheckRight public BaseResult updateUser(@RequestBody SmUserDTO smUserDTO){ try { return BaseResult.success(userQueryService.updateUser(smUserDTO) ? "鐢ㄦ埛淇敼鎴愬姛锛�":"鐢ㄦ埛淇敼澶辫触锛�"); }catch (Exception e){ e.printStackTrace(); - String exceptionMessage = VciBaseUtil.getExceptionMessage(e); - log.error("淇敼鐢ㄦ埛鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + exceptionMessage); - return BaseResult.fail("淇敼鐢ㄦ埛鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + exceptionMessage); + String exceptionMessage = "淇敼鐢ㄦ埛鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + return BaseResult.fail(exceptionMessage); } } @@ -269,15 +269,14 @@ * @return */ @RequestMapping(value = "/deleteUser",method = RequestMethod.DELETE) - @VciUnCheckRight public BaseResult deleteUser(String[] ids){ try { return userQueryService.deleteUser(ids) ? BaseResult.success("鍒犻櫎鐢ㄦ埛鎴愬姛锛�"):BaseResult.fail("鍒犻櫎鐢ㄦ埛澶辫触锛�"); }catch (Exception e){ e.printStackTrace(); - String exceptionMessage = VciBaseUtil.getExceptionMessage(e); - log.error("娣诲姞鐢ㄦ埛鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + exceptionMessage); - return BaseResult.fail("娣诲姞鐢ㄦ埛鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + exceptionMessage); + String exceptionMessage = "娣诲姞鐢ㄦ埛鏃跺嚭鐜伴敊璇紝鍘熷洜锛�" + VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + return BaseResult.fail(exceptionMessage); } } @@ -288,16 +287,15 @@ * @return */ @RequestMapping(value = "/stopUsers",method = RequestMethod.POST) - @VciUnCheckRight public BaseResult stopUsers(String[] ids,boolean flag){ try { userQueryService.stopUsers(ids,flag); return BaseResult.success("鐢ㄦ埛銆愬仠鐢�/鍚敤銆戞垚鍔燂紒"); }catch (Exception e){ e.printStackTrace(); - String exceptionMessage = VciBaseUtil.getExceptionMessage(e); - log.error("鐢ㄦ埛銆愬仠鐢�/鍚敤銆戞椂鍑虹幇閿欒锛屽師鍥狅細" + exceptionMessage); - return BaseResult.fail("鐢ㄦ埛銆愬仠鐢�/鍚敤銆戞椂鍑虹幇閿欒锛屽師鍥狅細" + exceptionMessage); + String exceptionMessage = "鐢ㄦ埛銆愬仠鐢�/鍚敤銆戞椂鍑虹幇閿欒锛屽師鍥狅細" + VciBaseUtil.getExceptionMessage(e); + logger.error(exceptionMessage); + return BaseResult.fail(exceptionMessage); } } @@ -307,7 +305,6 @@ * @param response */ @RequestMapping(value = "/downloadImportTemplate",method = RequestMethod.GET) - @VciUnCheckRight public void downloadImportTemplate(String downloadFileName, HttpServletResponse response){ try { String excelPath = userQueryService.downloadImportTemplate(downloadFileName); @@ -325,6 +322,8 @@ /** * 浜哄憳瀵煎叆 + * @param file + * @return */ @RequestMapping(value = "/importUser",method = RequestMethod.POST) public BaseResult importUser(MultipartFile file){ diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/enumpck/CombinationEnum.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/enumpck/CombinationEnum.java new file mode 100644 index 0000000..1d5793b --- /dev/null +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/enumpck/CombinationEnum.java @@ -0,0 +1,126 @@ +package com.vci.frameworkcore.enumpck; + +//import com.vci.frameworkcore.constant.FrameWorkEnumConstant; +//import com.vci.starter.web.annotation.VciEnum; + +import com.vci.starter.web.annotation.VciEnum; +import com.vci.starter.web.enumpck.BaseEnum; +import com.vci.web.util.Func; + +import java.util.List; +import java.util.Objects; + +/** + * 瀵嗙爜绛栫暐-缁勫悎鏂瑰紡绫诲瀷 + * @author ludc + * @date 2024/07/09 + */ +@VciEnum(name = "combination",text = "缁勫悎鏂瑰紡绫诲瀷",description = "缁勫悎鏂瑰紡绫诲瀷") +public enum CombinationEnum implements BaseEnum { + + /** + * 鏁板瓧 + */ + NUMBER("number","鏁板瓧"), + + /** + * 灏忓啓瀛楁瘝 + */ + LOWER("lower","灏忓啓瀛楁瘝"), + + /** + * 澶у啓瀛楁瘝 + */ + UPPER("upper","澶у啓瀛楁瘝"), + + /** + * 绗﹀彿 + */ + SYMBOL("symbol","绗﹀彿"); + + /** + * 鏋氫妇鐨勫�� + */ + private String value; + + /** + * 鏋氫妇鏄剧ず鏂囨湰 + */ + private String text; + + /** + * 鑾峰彇鏋氫妇鍊� + * @return 鏋氫妇鍊� + */ + @Override + public String getValue() { + return value; + } + + /** + * 鑾峰彇鏋氫妇鏄剧ず鏂囨湰 + * @return 鏄剧ず鏂囨湰 + */ + @Override + public String getText() { + return text; + } + + /** + * 鏋勯�犲嚱鏁� + * @param value 鍊� + * @param text 鏄剧ず鏂囨湰 + */ + private CombinationEnum(String value, String text){ + this.value = value; + this.text = text; + } + + /** + * 鏍规嵁鍚嶇О鑾峰彇瀵瑰簲鐨勬灇涓惧�� + * @param text 鍚嶇О + * @return 鏋氫妇鍊� + */ + public static String getValueByText(String text){ + for(CombinationEnum wenum : CombinationEnum.values()){ + if(wenum.getText().equalsIgnoreCase(text)){ + return wenum.getValue(); + } + } + return ""; + } + + /** + * 鏍规嵁鏋氫妇鍊艰幏鍙栧悕绉� + * @param value 鏋氫妇鍊� + * @return 鍚嶇О + */ + public static String getTextByValue(String value){ + for(CombinationEnum wenum : CombinationEnum.values()){ + if(wenum.getValue().equalsIgnoreCase(value)){ + return wenum.getText(); + } + } + return ""; + } + + /** + * 鑾峰彇缁勫悎鏂瑰紡绫诲瀷鏋氫妇鏄剧ず鍊硷紝澶氫釜鏋氫妇鍊间竴娆℃�ц浆 + * @param values + * @return + */ + public static String getCombinationText(String values){ + if(Objects.isNull(values)){ + return ""; + } + List<String> valueList = Func.toStrList(values); + StringBuilder sb = new StringBuilder(); + valueList.stream().forEach(item->{ + String text = getTextByValue(item); + sb.append(text); + sb.append(","); + }); + return sb.deleteCharAt(sb.length() - 1).toString(); + } + +} diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/model/SmPasswordStrategyDO.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/model/SmPasswordStrategyDO.java index 1a64769..9997330 100644 --- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/model/SmPasswordStrategyDO.java +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/model/SmPasswordStrategyDO.java @@ -86,7 +86,7 @@ /** * 瀵嗙爜瀛楃鎵�闇�绫诲瀷 */ - @Transient + @Column(name = "PLCHARTYPES") private String requireCharType; /** diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/model/SmPasswordStrategyForPlatform1.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/model/SmPasswordStrategyForPlatform1.java index 343d71d..9c54ed9 100644 --- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/model/SmPasswordStrategyForPlatform1.java +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/model/SmPasswordStrategyForPlatform1.java @@ -1,8 +1,11 @@ package com.vci.frameworkcore.model; import com.vci.frameworkcore.constant.FrameWorkBtmTypeConstant; +import com.vci.starter.web.annotation.Column; import com.vci.starter.web.annotation.VciBtmType; +import com.vci.starter.web.annotation.VciFieldType; import com.vci.starter.web.constant.FrameWorkLcStatusConstant; +import com.vci.starter.web.enumpck.VciFieldTypeEnum; import java.util.Date; @@ -11,90 +14,122 @@ */ @VciBtmType(name = FrameWorkBtmTypeConstant.SM_PASSWORD_STRATEGY,tableName = "plpasswordstrategy",lifeCycle = FrameWorkLcStatusConstant.EMTYPE_LIFE_CYCLE) public class SmPasswordStrategyForPlatform1 { + /** * 涓婚敭 */ + @Column(name = "pluid") private String pluid; /** * 鍚嶇О */ + @Column(name = "pname") private String pname; /** * 闀垮害 */ + @Column(range = ">0",name = "plength") private Integer plength; + + /** + * 鏈�澶ч暱搴� + */ + @Column(range = ">0",name = "PLMAXLENGTH") + private Integer plmaxlength; /** * 鏈夋晥澶╂暟 */ + @Column(range = ">0",name = "POVERDUEDAY") private Integer poverdueday; /** * 鎻愰啋澶╂暟 */ + @Column(range = ">0",name = "PREMINDDAY") private Integer premindday; /** * 瀵嗙爜閲嶈瘯娆℃暟 */ + @Column(range = ">0",name = "PRETRYTIME") private Integer pretrytime; /** * 閿佸畾鏃堕棿 */ + @Column(range = ">0",name = "PLOCKTIME") private Integer plocktime; /** * 鏄惁榛樿 */ + @Column(name = "PLISDEFAULT") private Integer plisdefault; /** * 鎻忚堪 */ + @Column(name = "PLDESC") private String pldesc; /** * 鍒涘缓鏃堕棿 */ - private Date plcreatetime; + @Column( + nullable = false, + name = "plcreatetime" + ) + @VciFieldType(VciFieldTypeEnum.VTDateTime) + private Long plcreatetime; /** * 鍒涘缓浜� */ + @Column( + length = 50, + nullable = false, + name = "plcreateuser" + ) private String plcreateuser; /** * 鏈�鍚庝慨鏀规椂闂� */ - private Date plupdatetime; + @Column( + name = "plupdatetime" + ) + @VciFieldType(VciFieldTypeEnum.VTDateTime) + private Long plupdatetime; /** * 鏈�鍚庝慨鏀逛汉 */ + @Column( + length = 50, + nullable = false, + name = "plupdateuser" + ) private String plupdateuser; /** * 瀵嗙爜鎵�闇�瀛楃绫诲瀷 */ - private Integer pcharspecies; + @Column(name = "PLCHARTYPES") + private Integer plchartypes; + + /** + * 闇�瑕佺殑绫诲瀷(蹇呭~绉嶇被瀛楁) + */ + @Column(name = "PLREQUIREDTYPE") + private Integer plrequiredtype; /** * 鎺堟潈鑰� */ private String pllicensors; - - /** - * 鏈�澶ч暱搴� - */ - private Integer plmaxlength; - - /** - * 闇�瑕佺殑绫诲瀷(蹇呭~绉嶇被瀛楁) - */ - private Integer plrequiredtype; public String getPluid() { return pluid; @@ -168,11 +203,11 @@ this.pldesc = pldesc == null ? null : pldesc.trim(); } - public Date getPlcreatetime() { + public Long getPlcreatetime() { return plcreatetime; } - public void setPlcreatetime(Date plcreatetime) { + public void setPlcreatetime(Long plcreatetime) { this.plcreatetime = plcreatetime; } @@ -184,11 +219,11 @@ this.plcreateuser = plcreateuser == null ? null : plcreateuser.trim(); } - public Date getPlupdatetime() { + public Long getPlupdatetime() { return plupdatetime; } - public void setPlupdatetime(Date plupdatetime) { + public void setPlupdatetime(Long plupdatetime) { this.plupdatetime = plupdatetime; } @@ -200,12 +235,12 @@ this.plupdateuser = plupdateuser == null ? null : plupdateuser.trim(); } - public Integer getPcharspecies() { - return pcharspecies; + public Integer getPlchartypes() { + return plchartypes; } - public void setPcharspecies(Integer pcharspecies) { - this.pcharspecies = pcharspecies; + public void setPlchartypes(Integer pcharspecies) { + this.plchartypes = pcharspecies; } public String getPllicensors() { @@ -248,7 +283,7 @@ ", plcreateuser='" + plcreateuser + '\'' + ", plupdatetime=" + plupdatetime + ", plupdateuser='" + plupdateuser + '\'' + - ", pcharspecies=" + pcharspecies + + ", plchartypes=" + plchartypes + ", pllicensors='" + pllicensors + '\'' + ", plmaxlength=" + plmaxlength + ", plrequiredtype=" + plrequiredtype + diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/model/dto/SmPasswordStrategyDTO.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/model/dto/SmPasswordStrategyDTO.java new file mode 100644 index 0000000..cab7107 --- /dev/null +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/model/dto/SmPasswordStrategyDTO.java @@ -0,0 +1,282 @@ +package com.vci.frameworkcore.model.dto; + +import com.vci.starter.web.pagemodel.BaseModelVO; + +/** + * 瀵嗙爜瀹夊叏绛栫暐鏁版嵁浼犺緭瀵硅薄 + * @author ludc + * @date 2024/7/10 13:01 + */ +public class SmPasswordStrategyDTO extends BaseModelVO { + + /** + * 绂佹淇敼杩欎釜鍊� + */ + private static final long serialVersionUID = 4615707120594571129L; + + /** + * 鏈�灏忛暱搴� + */ + private short minLength; + + /** + * 鏈夋晥澶╂暟 + */ + private short validDay; + + /** + * 鎻愰啋澶╂暟 + */ + private short remindDay; + + /** + * 鍙互閲嶈瘯鐨勬鏁� + */ + private short retryTime; + + /** + * 閿佸畾鏃堕棿 + */ + private short lockTime; + + /** + * 鏄惁涓洪粯璁� + */ + private Integer defaultFlag; + + /** + * 瀵嗙爜鐨勬渶澶ч暱搴� + */ + private short maxLength; + + /** + * 瀵嗙爜瀛楃鎵�闇�绫诲瀷 + */ + private short requireCharType; + + /** + * 瀵嗙爜瀛楃鎵�闇�绫诲瀷锛氱粍鍚堟柟寮忔樉绀哄�� + */ + private String combinations; + + /** + * 瀵嗙爜鎵�闇�瀛楃绉嶇被涓暟 + */ + private short requireCharCount; + + /** + * 缂栧彿 + */ + private String id; + + /** + * 鍚嶇О + */ + private String name; + + /** + * 鎻忚堪 + */ + private String description; + + public String getCombinations() { + return combinations; + } + + public void setCombinations(String combinations) { + this.combinations = combinations; + } + + /** + * 鑾峰彇 鏈�灏忛暱搴� + */ + public short getMinLength (){ + return minLength; + } + + /** + * 璁剧疆 鏈�灏忛暱搴� + */ + public void setMinLength (short minLength){ + this.minLength = minLength; + } + + /** + * 鑾峰彇 鏈夋晥澶╂暟 + */ + public short getValidDay (){ + return validDay; + } + + /** + * 璁剧疆 鏈夋晥澶╂暟 + */ + public void setValidDay (short validDay){ + this.validDay = validDay; + } + + /** + * 鑾峰彇 鎻愰啋澶╂暟 + */ + public short getRemindDay (){ + return remindDay; + } + + /** + * 璁剧疆 鎻愰啋澶╂暟 + */ + public void setRemindDay (short remindDay){ + this.remindDay = remindDay; + } + + /** + * 鑾峰彇 鍙互閲嶈瘯鐨勬鏁� + */ + public short getRetryTime (){ + return retryTime; + } + + /** + * 璁剧疆 鍙互閲嶈瘯鐨勬鏁� + */ + public void setRetryTime (short retryTime){ + this.retryTime = retryTime; + } + + /** + * 鑾峰彇 閿佸畾鏃堕棿 + */ + public short getLockTime (){ + return lockTime; + } + + /** + * 璁剧疆 閿佸畾鏃堕棿 + */ + public void setLockTime (short lockTime){ + this.lockTime = lockTime; + } + + /** + * 鑾峰彇 鏄惁涓洪粯璁� + */ + public Integer getDefaultFlag (){ + return defaultFlag; + } + + /** + * 璁剧疆 鏄惁涓洪粯璁� + */ + public void setDefaultFlag (Integer defaultFlag){ + this.defaultFlag = defaultFlag; + } + + /** + * 鑾峰彇 瀵嗙爜鐨勬渶澶ч暱搴� + */ + public short getMaxLength (){ + return maxLength; + } + + /** + * 璁剧疆 瀵嗙爜鐨勬渶澶ч暱搴� + */ + public void setMaxLength (short maxLength){ + this.maxLength = maxLength; + } + + /** + * 鑾峰彇 瀵嗙爜瀛楃鎵�闇�绫诲瀷 + */ + public short getRequireCharType (){ + return requireCharType; + } + + /** + * 璁剧疆 瀵嗙爜瀛楃鎵�闇�绫诲瀷 + */ + public void setRequireCharType (short requireCharType){ + this.requireCharType = requireCharType; + } + + /** + * 鑾峰彇 瀵嗙爜鎵�闇�瀛楃绉嶇被涓暟 + */ + public short getRequireCharCount (){ + return requireCharCount; + } + + /** + * 璁剧疆 瀵嗙爜鎵�闇�瀛楃绉嶇被涓暟 + */ + public void setRequireCharCount (short requireCharCount){ + this.requireCharCount = requireCharCount; + } + + /** + * 鑾峰彇 缂栧彿 + */ + @Override + public String getId (){ + return id; + } + + /** + * 璁剧疆 缂栧彿 + */ + @Override + public void setId (String id){ + this.id = id; + } + + /** + * 鑾峰彇 鍚嶇О + */ + @Override + public String getName (){ + return name; + } + + /** + * 璁剧疆 鍚嶇О + */ + @Override + public void setName (String name){ + this.name = name; + } + + /** + * 鑾峰彇 鎻忚堪 + */ + @Override + public String getDescription (){ + return description; + } + + /** + * 璁剧疆 鎻忚堪 + */ + @Override + public void setDescription (String description){ + this.description = description; + } + + @Override + public String toString() { + return "SmPasswordStrategyDTO{" + + "minLength='" + minLength +"',"+ + "validDay='" + validDay +"',"+ + "remindDay='" + remindDay +"',"+ + "retryTime='" + retryTime +"',"+ + "lockTime='" + lockTime +"',"+ + "defaultFlag='" + defaultFlag +"',"+ + "maxLength='" + maxLength +"',"+ + "requireCharType='" + requireCharType +"',"+ + "requireCharCount='" + requireCharCount +"',"+ + "id='" + id +"',"+ + "name='" + name +"',"+ + "description='" + description +"',"+ + "}" + super.toString(); + } + +} diff --git a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/pagemodel/SmPasswordStrategyVO.java b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/pagemodel/SmPasswordStrategyVO.java index 1b032a9..2598d78 100644 --- a/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/pagemodel/SmPasswordStrategyVO.java +++ b/Source/plt-web/plt-web-parent/plt-web/src/main/java/com/vci/frameworkcore/pagemodel/SmPasswordStrategyVO.java @@ -15,47 +15,52 @@ private static final long serialVersionUID = -389835469056130052L; /** - * 鏈�灏忛暱搴� + * 鏈�灏忛暱搴� 锛氶暱搴︼紙plength锛� */ private Integer minLength; /** - * 鏈夋晥澶╂暟 + * 鏈夋晥澶╂暟 锛氳繃鏈熸椂闂达紙poverdueday锛� */ private Integer validDay; /** - * 鎻愰啋澶╂暟 + * 鎻愰啋澶╂暟 锛坧remindday锛� */ private Integer remindDay; /** - * 鍙互閲嶈瘯鐨勬鏁� + * 鍙互閲嶈瘯鐨勬鏁� 锛氬瘑鐮侀噸璇曟鏁帮紙pretrytime锛� */ private Integer retryTime; /** - * 閿佸畾鏃堕棿 + * 閿佸畾鏃堕棿 锛氾紙plocktime锛� */ private Integer lockTime; /** - * 鏄惁涓洪粯璁� + * 鏄惁涓洪粯璁� 锛氾紙plisdefault锛� */ private boolean defaultFlag; /** - * 瀵嗙爜鐨勬渶澶ч暱搴� + * 瀵嗙爜鐨勬渶澶ч暱搴� 锛� 鏈�澶ч暱搴︼紙plmaxlength锛� */ private Integer maxLength; /** - * 瀵嗙爜瀛楃鎵�闇�绫诲瀷 + * 瀵嗙爜瀛楃鎵�闇�绫诲瀷 锛氾紙pcharspecies锛� 瀛楃绫诲瀷缁勫悎锛�0x01-鏁板瓧锛�0x02-灏忓啓瀛楁瘝锛�0x04-澶у啓瀛楁瘝锛�0x08-绗﹀彿 */ private String requireCharType; /** - * 瀵嗙爜鎵�闇�瀛楃绉嶇被涓暟 + * 瀵嗙爜瀛楃鎵�闇�绫诲瀷锛氱粍鍚堟柟寮忔樉绀哄�� + */ + private String requireCharTypeText; + + /** + * 瀵嗙爜鎵�闇�瀛楃绉嶇被涓暟 锛氾紙plrequiredtype锛� */ private Integer requireCharCount; @@ -70,10 +75,6 @@ public String getLicensors() { return licensors; - } - - public String getRequireCharType() { - return requireCharType; } public Integer getRequireCharCount() { @@ -140,7 +141,7 @@ this.maxLength = maxLength; } - public String getRequireCharType(Integer plrequiredtype) { + public String getRequireCharType() { return requireCharType; } @@ -148,6 +149,14 @@ this.requireCharType = requireCharType; } + public String getRequireCharTypeText() { + return requireCharTypeText; + } + + public void setRequireCharTypeText(String requireCharTypeText) { + this.requireCharTypeText = requireCharTypeText; + } + @Override public String toString() { return "SmPasswordStrategyVO{" + -- Gitblit v1.9.3