Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-smart
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
platform
hp-smart
Commits
56ed24e0
Commit
56ed24e0
authored
Feb 02, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.企业管理增加登录前缀
2.企业在注册用户时登录号前强制增加登录前缀
parent
4c5cac02
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
43 additions
and
17 deletions
+43
-17
HPPZ009.java
src/main/java/com/baosight/hpjx/hp/pz/domain/HPPZ009.java
+0
-0
ServiceHPPZ009.java
.../java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ009.java
+1
-0
HPPZ009.xml
src/main/java/com/baosight/hpjx/hp/pz/sql/HPPZ009.xml
+16
-10
ServiceXS3001.java
...java/com/baosight/xservices/xs/service/ServiceXS3001.java
+4
-0
HPPZ009.jsp
src/main/webapp/HP/PZ/HPPZ009.jsp
+1
-0
XSOG0801.jsp
src/main/webapp/XS/OG/XSOG0801.jsp
+9
-3
XS3001.jsp
src/main/webapp/XS/XS3001.jsp
+12
-4
No files found.
src/main/java/com/baosight/hpjx/hp/pz/domain/HPPZ009.java
View file @
56ed24e0
This diff is collapsed.
Click to expand it.
src/main/java/com/baosight/hpjx/hp/pz/service/ServiceHPPZ009.java
View file @
56ed24e0
...
@@ -106,6 +106,7 @@ public class ServiceHPPZ009 extends ServiceBase {
...
@@ -106,6 +106,7 @@ public class ServiceHPPZ009 extends ServiceBase {
HPPZ009
hppz009
=
new
HPPZ009
();
HPPZ009
hppz009
=
new
HPPZ009
();
hppz009
.
fromMap
(
resultRows
.
get
(
i
));
hppz009
.
fromMap
(
resultRows
.
get
(
i
));
AssertUtils
.
isEmpty
(
hppz009
.
getCompanyName
(),
"企业名称不能为空"
);
AssertUtils
.
isEmpty
(
hppz009
.
getCompanyName
(),
"企业名称不能为空"
);
AssertUtils
.
isEmpty
(
hppz009
.
getLoginPrefix
(),
"登录前缀不能为空"
);
AssertUtils
.
isNull
(
hppz009
.
getValidFlag
(),
"是否启用不能为空"
);
AssertUtils
.
isNull
(
hppz009
.
getValidFlag
(),
"是否启用不能为空"
);
}
}
}
}
...
...
src/main/java/com/baosight/hpjx/hp/pz/sql/HPPZ009.xml
View file @
56ed24e0
...
@@ -2,28 +2,33 @@
...
@@ -2,28 +2,33 @@
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap
namespace=
"HPPZ009"
>
<sqlMap
namespace=
"HPPZ009"
>
<sql
id=
"column
s
"
>
<sql
id=
"column"
>
ID as "id",
ID as "id",
COMPANY_CODE as "companyCode",
<!-- 企业编码 -->
COMPANY_CODE as "companyCode",
<!-- 企业编码 -->
COMPANY_NAME as "companyName",
<!-- 企业名称 -->
COMPANY_NAME as "companyName",
<!-- 企业名称 -->
VALID_FLAG as "validFlag",
<!-- 是否启用:1.启用,0.停用 -->
VALID_FLAG as "validFlag",
<!-- 是否启用:1.启用,0.停用 -->
LOGIN_PREFIX as "loginPrefix",
<!-- 登录前缀 -->
REMARK as "remark",
<!-- 备注 -->
REMARK as "remark",
<!-- 备注 -->
CREATED_BY as "createdBy",
<!-- 创建人 -->
CREATED_BY as "createdBy",
<!-- 创建人 -->
CREATED_NAME as "createdName",
<!-- 创建人名称 -->
CREATED_NAME as "createdName",
<!-- 创建人名称 -->
CREATED_TIME as "createdTime",
<!-- 创建时间 -->
CREATED_TIME as "createdTime",
<!-- 创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 更新人 -->
UPDATED_BY as "updatedBy",
<!-- 更新人 -->
UPDATED_NAME as "updatedName",
<!-- 更新人名称 -->
UPDATED_NAME as "updatedName",
<!-- 更新人名称 -->
UPDATED_TIME as "updatedTime"
<!-- 更新时间 -->
UPDATED_TIME as "updatedTime",
<!-- 更新时间 -->
DELETE_FLAG as "deleteFlag"
<!-- 是否删除:1.是,0.否 -->
</sql>
</sql>
<sql
id=
"condition
s
"
>
<sql
id=
"condition"
>
AND DELETE_FLAG = 0
AND DELETE_FLAG = 0
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
COMPANY_CODE = #companyCode#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"validFlag"
>
VALID_FLAG = #validFlag#
</isNotEmpty>
</sql>
</sql>
<sql
id=
"queryCondition
s
"
>
<sql
id=
"queryCondition"
>
<isNotEmpty
prepend=
" AND "
property=
"companyName"
>
<isNotEmpty
prepend=
" AND "
property=
"companyName"
>
COMPANY_NAME LIKE CONCAT('%', #companyName#, '%')
COMPANY_NAME LIKE CONCAT('%', #companyName#, '%')
</isNotEmpty>
</isNotEmpty>
...
@@ -50,11 +55,11 @@
...
@@ -50,11 +55,11 @@
<!-- 查询品种大类配置 -->
<!-- 查询品种大类配置 -->
<select
id=
"query"
resultClass=
"com.baosight.hpjx.hp.pz.domain.HPPZ009"
>
<select
id=
"query"
resultClass=
"com.baosight.hpjx.hp.pz.domain.HPPZ009"
>
SELECT
SELECT
<include
refid=
"column
s
"
/>
<include
refid=
"column"
/>
FROM ${hpjxSchema}.T_HPPZ009
FROM ${hpjxSchema}.T_HPPZ009
WHERE 1=1
WHERE 1=1
<include
refid=
"condition
s
"
/>
<include
refid=
"condition"
/>
<include
refid=
"queryCondition
s
"
/>
<include
refid=
"queryCondition"
/>
<include
refid=
"dynamic"
/>
<include
refid=
"dynamic"
/>
</select>
</select>
...
@@ -63,8 +68,8 @@
...
@@ -63,8 +68,8 @@
SELECT COUNT(1)
SELECT COUNT(1)
FROM ${hpjxSchema}.T_HPPZ009
FROM ${hpjxSchema}.T_HPPZ009
WHERE 1=1
WHERE 1=1
<include
refid=
"condition
s
"
/>
<include
refid=
"condition"
/>
<include
refid=
"queryCondition
s
"
/>
<include
refid=
"queryCondition"
/>
</select>
</select>
<insert
id=
"insert"
>
<insert
id=
"insert"
>
...
@@ -72,12 +77,13 @@
...
@@ -72,12 +77,13 @@
COMPANY_CODE,
<!-- 企业编码 -->
COMPANY_CODE,
<!-- 企业编码 -->
COMPANY_NAME,
<!-- 企业名称 -->
COMPANY_NAME,
<!-- 企业名称 -->
VALID_FLAG,
<!-- 是否启用:1.启用,0.停用 -->
VALID_FLAG,
<!-- 是否启用:1.启用,0.停用 -->
LOGIN_PREFIX,
<!-- 登录前缀 -->
REMARK,
<!-- 备注 -->
REMARK,
<!-- 备注 -->
CREATED_BY,
<!-- 创建人 -->
CREATED_BY,
<!-- 创建人 -->
CREATED_NAME,
<!-- 创建人名称 -->
CREATED_NAME,
<!-- 创建人名称 -->
CREATED_TIME
<!-- 创建时间 -->
CREATED_TIME
<!-- 创建时间 -->
) VALUES (
) VALUES (
#companyCode#, #companyName#, #validFlag#, #remark#, #createdBy#,
#companyCode#, #companyName#, #validFlag#,
#loginPrefix#,
#remark#, #createdBy#,
#createdName#, #createdTime#
#createdName#, #createdTime#
)
)
</insert>
</insert>
...
...
src/main/java/com/baosight/xservices/xs/service/ServiceXS3001.java
View file @
56ed24e0
package
com
.
baosight
.
xservices
.
xs
.
service
;
package
com
.
baosight
.
xservices
.
xs
.
service
;
import
com.baosight.hpjx.core.security.UserSessionUtils
;
import
com.baosight.hpjx.core.security.UserSessionUtils
;
import
com.baosight.hpjx.hp.pz.domain.HPPZ009
;
import
com.baosight.hpjx.hp.pz.tools.HPPZTools
;
import
com.baosight.hpjx.util.LogUtils
;
import
com.baosight.iplat4j.core.cache.CacheManager
;
import
com.baosight.iplat4j.core.cache.CacheManager
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.log.Logger
;
import
com.baosight.iplat4j.core.log.Logger
;
import
com.baosight.iplat4j.core.log.LoggerFactory
;
import
com.baosight.iplat4j.core.log.LoggerFactory
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
...
...
src/main/webapp/HP/PZ/HPPZ009.jsp
View file @
56ed24e0
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
cname=
"企业编码"
ename=
"companyCode"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
cname=
"企业编码"
ename=
"companyCode"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
cname=
"企业名称"
ename=
"companyName"
width=
"140"
required=
"true"
/>
<EF:EFColumn
cname=
"企业名称"
ename=
"companyName"
width=
"140"
required=
"true"
/>
<EF:EFColumn
cname=
"登录前缀"
ename=
"loginPrefix"
width=
"100"
align=
"center"
readonly=
"true"
/>
<EF:EFComboColumn
cname=
"是否启用"
ename=
"validFlag"
width=
"80"
align=
"center"
required=
"true"
>
<EF:EFComboColumn
cname=
"是否启用"
ename=
"validFlag"
width=
"80"
align=
"center"
required=
"true"
>
<EF:EFCodeOption
codeName=
"hpjx.hppz.validFlag"
/>
<EF:EFCodeOption
codeName=
"hpjx.hppz.validFlag"
/>
</EF:EFComboColumn>
</EF:EFComboColumn>
...
...
src/main/webapp/XS/OG/XSOG0801.jsp
View file @
56ed24e0
<%@ page import="com.baosight.iplat4j.core.ioc.spring.PlatApplicationContext" %>
<%@ page import="com.baosight.iplat4j.core.ioc.spring.PlatApplicationContext" %>
<%@ page import="com.baosight.xservices.xs.constants.LoginConstants" %>
<%@ page import="com.baosight.xservices.xs.constants.LoginConstants" %>
<%@ page import="org.apache.commons.lang.StringUtils" %>
<%@ page import="org.apache.commons.lang.StringUtils" %>
<%@ page import="com.baosight.hpjx.hp.pz.tools.HPPZTools" %>
<%@ page import="com.baosight.hpjx.core.security.UserSessionUtils" %>
<!DOCTYPE html>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
...
@@ -99,12 +101,14 @@
...
@@ -99,12 +101,14 @@
String passwordDesc = StringUtils.defaultIfEmpty(PlatApplicationContext.getProperty("xservices.security.checkpassword.desc"), "密码必须包含英文及数字");
String passwordDesc = StringUtils.defaultIfEmpty(PlatApplicationContext.getProperty("xservices.security.checkpassword.desc"), "密码必须包含英文及数字");
String loginPublicKey = LoginConstants.loginRsaPublicKey;
String loginPublicKey = LoginConstants.loginRsaPublicKey;
String cryptoPasswordEnable = LoginConstants.cryptoPasswordEnable;
String cryptoPasswordEnable = LoginConstants.cryptoPasswordEnable;
String companyCode = UserSessionUtils.getCompanyCode();
String loginPrefix = StringUtils.isBlank(companyCode) ? "" : HPPZTools.getPz009(companyCode).getLoginPrefix();
%>
%>
<c:set var="pwdRgx" value="<%=passwordRegex%>"/>
<c:set var="pwdRgx" value="<%=passwordRegex%>"/>
<c:set var="pwdDesc" value="<%=passwordDesc%>"/>
<c:set var="pwdDesc" value="<%=passwordDesc%>"/>
<c:set var="login_PublicKey" value="<%=loginPublicKey%>"/>
<c:set var="login_PublicKey" value="<%=loginPublicKey%>"/>
<c:set var="crypto_PasswordEnable" value="<%=cryptoPasswordEnable%>"/>
<c:set var="crypto_PasswordEnable" value="<%=cryptoPasswordEnable%>"/>
<c:set var="loginPrefix" value="<%=loginPrefix%>"/>
<EF:EFPage>
<EF:EFPage>
<script>
<script>
var ctx = "${ctx}";
var ctx = "${ctx}";
...
@@ -343,9 +347,11 @@
...
@@ -343,9 +347,11 @@
</div>
</div>
<div class="col-xs-3">
<div class="col-xs-3">
<EF:EFInput cname="登录账号" ename="details-0-loginName"
<EF:EFInput cname="登录账号" ename="details-0-loginName"
data-regex="/^[_a-zA-Z0-9]{1,64}$/"
value=""
data-regex="/^[_a-zA-Z0-9]{1,64}$/"
data-errorPrompt="对不起,登录账号只能是不超过64位的英文字母或者数字字符或下划线"
data-errorPrompt="对不起,登录账号只能是不超过64位的英文字母或者数字字符或下划线"
validateGroupName="group1" required="required" inline="true"/>
validateGroupName="group1" required="required" inline="true"
value="${loginPrefix}"
oninput="this.value='${loginPrefix}' + this.value.slice(this.value.indexOf('${loginPrefix}')+('${loginPrefix}'.length));"/>
</div>
</div>
<div class="col-xs-7">
<div class="col-xs-7">
<span id="details-0-loginName-prompt">【登录账号只能由不超过64位的英文字母或者数字字符或者下划线组成。】</span>
<span id="details-0-loginName-prompt">【登录账号只能由不超过64位的英文字母或者数字字符或者下划线组成。】</span>
...
...
src/main/webapp/XS/XS3001.jsp
View file @
56ed24e0
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
<%@ page import="com.baosight.xservices.xs.constants.LoginConstants" %>
<%@ page import="com.baosight.xservices.xs.constants.LoginConstants" %>
<%@ page import="org.apache.commons.lang.StringUtils" %>
<%@ page import="org.apache.commons.lang.StringUtils" %>
<%@ page import="com.baosight.xservices.xs.util.UserSession" %>
<%@ page import="com.baosight.xservices.xs.util.UserSession" %>
<%@ page import="com.baosight.hpjx.core.security.UserSessionUtils" %>
<%@ page import="com.baosight.hpjx.hp.pz.tools.HPPZTools" %>
<!DOCTYPE html>
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
...
@@ -18,7 +20,9 @@
...
@@ -18,7 +20,9 @@
} else {
} else {
request.setAttribute("passwordTip", "密码由不超过255位的英文字母或者数字字符或下划线组成。");
request.setAttribute("passwordTip", "密码由不超过255位的英文字母或者数字字符或下划线组成。");
}
}
String username = UserSession.getUser().getUsername();
String companyCode = UserSessionUtils.getCompanyCode();
String loginPrefix = StringUtils.isBlank(companyCode) ? "" : HPPZTools.getPz009(companyCode).getLoginPrefix();
String username = UserSession.getUser().getUsername();
String passwordRegex = StringUtils.defaultIfEmpty(PlatApplicationContext.getProperty("xservices.security.checkpassword.regex"), "^(?=.*?[a-zA-Z])(?=.*?[0-9]).{1,}$");
String passwordRegex = StringUtils.defaultIfEmpty(PlatApplicationContext.getProperty("xservices.security.checkpassword.regex"), "^(?=.*?[a-zA-Z])(?=.*?[0-9]).{1,}$");
String passwordDesc = StringUtils.defaultIfEmpty(PlatApplicationContext.getProperty("xservices.security.checkpassword.desc"), "密码必须包含英文及数字");
String passwordDesc = StringUtils.defaultIfEmpty(PlatApplicationContext.getProperty("xservices.security.checkpassword.desc"), "密码必须包含英文及数字");
String loginPublicKey = LoginConstants.loginRsaPublicKey;
String loginPublicKey = LoginConstants.loginRsaPublicKey;
...
@@ -29,6 +33,7 @@
...
@@ -29,6 +33,7 @@
<c:set var="login_PublicKey" value="<%=loginPublicKey%>"/>
<c:set var="login_PublicKey" value="<%=loginPublicKey%>"/>
<c:set var="crypto_PasswordEnable" value="<%=cryptoPasswordEnable%>"/>
<c:set var="crypto_PasswordEnable" value="<%=cryptoPasswordEnable%>"/>
<c:set var="username" value="<%=username%>"/>
<c:set var="username" value="<%=username%>"/>
<c:set var="loginPrefix" value="<%=loginPrefix%>"/>
<script>
<script>
let username = "${username}"
let username = "${username}"
</script>
</script>
...
@@ -253,12 +258,15 @@
...
@@ -253,12 +258,15 @@
</div>
</div>
<div class="col-xs-3">
<div class="col-xs-3">
<EF:EFInput cname="登录账号" ename="details-0-loginName"
<EF:EFInput cname="登录账号" ename="details-0-loginName"
data-regex="/^[_a-zA-Z0-9]{1,64}$/"
value=""
data-regex="/^[_a-zA-Z0-9]{1,64}$/"
data-errorPrompt="对不起,登录账号只能是不超过64位的英文字母或者数字字符或下划线"
data-errorPrompt="对不起,登录账号只能是不超过64位的英文字母或者数字字符或下划线"
validateGroupName="group1" required="required" inline="true"/>
validateGroupName="group1" required="required" inline="true"
value="${loginPrefix}"
oninput="this.value='${loginPrefix}' + this.value.slice(this.value.indexOf('${loginPrefix}')+('${loginPrefix}'.length));"/>
</div>
</div>
<div class="col-xs-7">
<div class="col-xs-7">
<span id="details-0-loginName-prompt">【登录账号只能由不超过64位的英文字母或者数字字符或者下划线组成。】</span>
<span id="details-0-loginName-prompt">【登录账号只能由不超过64位的英文字母或者数字字符或者下划线组成。】</span><br/>
<span id="details-0-loginName-prompt1" style="color: red">【登录账号由"固定前缀+自定义输入值"组成。】</span>
</div>
</div>
</div>
</div>
</br>
</br>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment