Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cloud-fb
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
王衍超
cloud-fb
Commits
2f7d39af
Commit
2f7d39af
authored
Mar 19, 2021
by
PWF-WK01\pengwufeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
场站用户登录返回用户title,用户模型关联场站id
parent
136b1208
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
53 additions
and
18 deletions
+53
-18
SecurityConfig.java
...war/src/main/java/com/beecode/inz/war/SecurityConfig.java
+0
-1
AuthcConstants.java
.../beecode/inz/authentication/constants/AuthcConstants.java
+2
-1
RESTWarehouseUserAuthenticationSuccessHandler.java
...andler/RESTWarehouseUserAuthenticationSuccessHandler.java
+2
-0
WarehouseUserDao.java
...main/java/com/beecode/inz/basis/dao/WarehouseUserDao.java
+3
-0
WarehouseUserDaoImpl.java
.../beecode/inz/basis/internal/dao/WarehouseUserDaoImpl.java
+16
-1
WarehouseUser.mk
...in/model/com/beecode/inz/basis/datamodel/WarehouseUser.mk
+3
-0
WarehouseUser.jmx
...sources/com/beecode/inz/basis/datamodel/WarehouseUser.jmx
+9
-0
WarehouseUser.hbm.xml
...inz.basis/src/main/resources/config/WarehouseUser.hbm.xml
+3
-0
Position$sequence.jmx
...n/resources/com/xyst/dinas/biz/bill/Position$sequence.jmx
+1
-1
Position$serial.jmx
...ain/resources/com/xyst/dinas/biz/bill/Position$serial.jmx
+1
-1
Position.jmx
...z/src/main/resources/com/xyst/dinas/biz/bill/Position.jmx
+1
-1
BusinessTripApply$sequence.jmx
...ces/com/xyst/dinas/oa/bill/BusinessTripApply$sequence.jmx
+1
-1
BusinessTripApply$serial.jmx
...urces/com/xyst/dinas/oa/bill/BusinessTripApply$serial.jmx
+1
-1
BusinessTripApply.jmx
...in/resources/com/xyst/dinas/oa/bill/BusinessTripApply.jmx
+1
-1
ProtocolDocument$sequence.jmx
...rces/com/xyst/dinas/oa/bill/ProtocolDocument$sequence.jmx
+1
-1
ProtocolDocument$serial.jmx
...ources/com/xyst/dinas/oa/bill/ProtocolDocument$serial.jmx
+1
-1
ProtocolDocument.jmx
...ain/resources/com/xyst/dinas/oa/bill/ProtocolDocument.jmx
+1
-1
SealBorrow$sequence.jmx
.../resources/com/xyst/dinas/oa/bill/SealBorrow$sequence.jmx
+1
-1
SealBorrow$serial.jmx
...in/resources/com/xyst/dinas/oa/bill/SealBorrow$serial.jmx
+1
-1
SealBorrow.jmx
.../src/main/resources/com/xyst/dinas/oa/bill/SealBorrow.jmx
+1
-1
UseCarApply$sequence.jmx
...resources/com/xyst/dinas/oa/bill/UseCarApply$sequence.jmx
+1
-1
UseCarApply$serial.jmx
...n/resources/com/xyst/dinas/oa/bill/UseCarApply$serial.jmx
+1
-1
UseCarApply.jmx
...src/main/resources/com/xyst/dinas/oa/bill/UseCarApply.jmx
+1
-1
No files found.
backend/build.war/src/main/java/com/beecode/inz/war/SecurityConfig.java
View file @
2f7d39af
...
...
@@ -56,7 +56,6 @@ import com.beecode.inz.authentication.handler.RESTWarehouseUserAuthenticationSuc
import
com.beecode.inz.authentication.provider.AppUserAuthenticationProvider
;
import
com.beecode.inz.authentication.provider.UserAuthenticationProvider
;
import
com.beecode.inz.authentication.provider.WarehouseUserAuthenticationProvider
;
import
com.beecode.inz.basis.context.customer.CustomerContextRepository
;
import
com.beecode.inz.basis.context.warehouse.WarehouseUserContextPersistenceFilter
;
import
com.beecode.inz.basis.context.warehouse.WarehouseUserContextRepository
;
...
...
backend/inz.authentication/src/main/java/com/beecode/inz/authentication/constants/AuthcConstants.java
View file @
2f7d39af
...
...
@@ -36,8 +36,9 @@ public interface AuthcConstants {
public
String
SESSION_TENANTID
=
"tenant-id"
;
public
String
TENANT_Id
=
"tenantId"
;
public
String
TENANT
=
"tenant"
;
public
String
MESSAGE
=
"message"
;
public
String
TITLE
=
"title"
;
public
String
TOKEN
=
"token"
;
public
String
X_AUTH_TOKEN
=
"x-auth-token"
;
...
...
backend/inz.authentication/src/main/java/com/beecode/inz/authentication/handler/RESTWarehouseUserAuthenticationSuccessHandler.java
View file @
2f7d39af
...
...
@@ -54,6 +54,7 @@ public class RESTWarehouseUserAuthenticationSuccessHandler extends SimpleUrlAuth
request
.
getSession
().
setAttribute
(
AuthcConstants
.
USERID
,
warehouseUser
.
getId
());
request
.
getSession
().
setAttribute
(
AuthcConstants
.
USERNAME
,
warehouseUser
.
getUsername
());
request
.
getSession
().
setAttribute
(
AuthcConstants
.
TELEPHONE
,
warehouseUser
.
getTelephone
());
request
.
getSession
().
setAttribute
(
AuthcConstants
.
TITLE
,
warehouseUser
.
getTitle
());
request
.
getSession
().
setAttribute
(
"mobile"
,
true
);
request
.
getSession
().
setMaxInactiveInterval
(
30
*
24
*
60
*
60
);
...
...
@@ -65,6 +66,7 @@ public class RESTWarehouseUserAuthenticationSuccessHandler extends SimpleUrlAuth
returnJson
.
put
(
AuthcConstants
.
USERID
,
warehouseUser
.
getId
());
returnJson
.
put
(
AuthcConstants
.
USERNAME
,
warehouseUser
.
getUsername
());
returnJson
.
put
(
AuthcConstants
.
TELEPHONE
,
warehouseUser
.
getTelephone
());
returnJson
.
put
(
AuthcConstants
.
TITLE
,
warehouseUser
.
getTitle
());
returnJson
.
put
(
AuthcConstants
.
MESSAGE
,
"success"
);
returnJson
.
put
(
AuthcConstants
.
TOKEN
,
attr
.
getSessionId
());
returnJson
.
put
(
AuthcConstants
.
TENANT
,
tenant
);
...
...
backend/inz.basis/src/main/java/com/beecode/inz/basis/dao/WarehouseUserDao.java
View file @
2f7d39af
package
com
.
beecode
.
inz
.
basis
.
dao
;
import
java.util.List
;
import
java.util.UUID
;
import
com.beecode.bcp.type.KObject
;
...
...
@@ -11,4 +12,6 @@ public interface WarehouseUserDao extends BaseDao {
List
<
KObject
>
listByTelephone
(
String
telephone
);
KObject
findByUsernameOrTelephone
(
String
username
);
List
<
KObject
>
findAllByStationId
(
UUID
stationId
);
}
backend/inz.basis/src/main/java/com/beecode/inz/basis/internal/dao/WarehouseUserDaoImpl.java
View file @
2f7d39af
package
com
.
beecode
.
inz
.
basis
.
internal
.
dao
;
import
java.util.List
;
import
java.util.UUID
;
import
org.hibernate.query.Query
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -34,7 +35,7 @@ public class WarehouseUserDaoImpl extends AbstractBaseDao implements WarehouseUs
@Override
public
KObject
findByUsernameOrTelephone
(
String
username
)
{
return
getHibernateTemplate
().
execute
(
session
->
{
StringBuffer
sql
=
new
StringBuffer
(
"FROM "
+
getModelName
()
+
" WHERE
username = :username OR telephone = :username
"
);
StringBuffer
sql
=
new
StringBuffer
(
"FROM "
+
getModelName
()
+
" WHERE
(username = :username OR telephone = :username) AND enabled = 1 AND discard = 0
"
);
//创建查询
Query
<
KObject
>
query
=
session
.
createQuery
(
sql
.
toString
(),
KObject
.
class
);
query
.
setParameter
(
"username"
,
username
);
...
...
@@ -46,6 +47,20 @@ public class WarehouseUserDaoImpl extends AbstractBaseDao implements WarehouseUs
});
}
/**
* 获取场站所有用户
*/
@Override
public
List
<
KObject
>
findAllByStationId
(
UUID
stationId
)
{
return
getHibernateTemplate
().
execute
(
session
->
{
StringBuffer
sql
=
new
StringBuffer
(
"FROM "
+
getModelName
()
+
" WHERE stationId = :stationId AND enabled = 1 AND discard = 0 "
);
//创建查询
Query
<
KObject
>
query
=
session
.
createQuery
(
sql
.
toString
(),
KObject
.
class
);
query
.
setParameter
(
"stationId"
,
stationId
);
return
query
.
getResultList
();
});
}
@Override
public
List
<
KObject
>
listByUserName
(
String
username
)
{
return
listByAttributes
(
buildSingleMap
(
WarehouseUserConstants
.
USERNAME
,
username
));
...
...
backend/inz.basis/src/main/model/com/beecode/inz/basis/datamodel/WarehouseUser.mk
View file @
2f7d39af
...
...
@@ -33,6 +33,9 @@
<attribute id='77aa55d6-853e-11eb-b258-54ee750ba9b2' name='telephone' columnName='telephone' title='手机号' type='string' default='' precision='' isArray='false'>
<annotation id='77aa55d7-853e-11eb-b258-54ee750ba9b2' attributeId='77aa55d8-853e-11eb-b258-54ee750ba9b2' name='length' value='20'></annotation>
</attribute>
<attribute id='650ad03e-87d2-11eb-b258-54ee750ba9b2' name='stationId' columnName='station_id' title='所属场站id' type='uuid' default='' precision='' isArray='false'>
<annotation id='650ad059-87d2-11eb-b258-54ee750ba9b2' attributeId='650ad05d-87d2-11eb-b258-54ee750ba9b2' name='length' value='undefined'></annotation>
</attribute>
<attribute id='8f8ad8b3-853e-11eb-b258-54ee750ba9b2' name='org' columnName='org' title='所属组织' type='string' default='' precision='' isArray='false'>
<annotation id='8f8ad8b7-853e-11eb-b258-54ee750ba9b2' attributeId='8f8ad8bb-853e-11eb-b258-54ee750ba9b2' name='length' value='100'></annotation>
</attribute>
...
...
backend/inz.basis/src/main/resources/com/beecode/inz/basis/datamodel/WarehouseUser.jmx
View file @
2f7d39af
...
...
@@ -106,6 +106,15 @@
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations/>
<m:id>
650ad03e-87d2-11eb-b258-54ee750ba9b2
</m:id>
<m:name>
stationId
</m:name>
<m:title>
所属场站id
</m:title>
<m:type>
uuid
</m:type>
<m:description></m:description>
<m:default></m:default>
</m:attribute>
<m:attribute>
<m:annotations>
<m:annotation>
<m:type>
bcp.type.constraint.StringLength
</m:type>
...
...
backend/inz.basis/src/main/resources/config/WarehouseUser.hbm.xml
View file @
2f7d39af
...
...
@@ -28,6 +28,9 @@
<property
name=
"telephone"
type=
"string"
>
<column
name=
"telephone"
length=
"20"
></column>
</property>
<property
name=
"stationId"
type=
"uuid-binary"
>
<column
name=
"station_id"
length=
"16"
></column>
</property>
<property
name=
"org"
type=
"string"
>
<column
name=
"org"
length=
"100"
></column>
</property>
...
...
backend/xyst.dinas.biz/src/main/resources/com/xyst/dinas/biz/bill/Position$sequence.jmx
View file @
2f7d39af
<?xml version="1.0" encoding="UTF-8"?>
<metadata
xmlns=
"http://www.beecode.cn/schema/amino-metadata"
xmlns:m=
"http://www.beecode.cn/schema/bcp-sequence"
>
<specification>
1.0
</specification>
<id>
12eab197-5cc0-4dbf-96ab-eecd0b13232c
</id>
<id>
2a96eab1-c316-400c-8dfe-73277f5a618e
</id>
<name>
com.xyst.dinas.biz.bill.Position$sequence
</name>
<title>
岗位$sequence
</title>
<description>
岗位
</description>
...
...
backend/xyst.dinas.biz/src/main/resources/com/xyst/dinas/biz/bill/Position$serial.jmx
View file @
2f7d39af
<?xml version="1.0" encoding="UTF-8"?>
<metadata
xmlns=
"http://www.beecode.cn/schema/amino-metadata"
xmlns:m=
"http://www.beecode.cn/schema/bcp-serial"
>
<specification>
1.0
</specification>
<id>
e54c3a90-a21c-489b-ab55-cda37706e8e
5
</id>
<id>
15a90012-30db-4266-b2dc-f05cac8f586
5
</id>
<name>
com.xyst.dinas.biz.bill.Position$serial
</name>
<title>
岗位$serial
</title>
<description>
岗位
</description>
...
...
backend/xyst.dinas.biz/src/main/resources/com/xyst/dinas/biz/bill/Position.jmx
View file @
2f7d39af
<?xml version="1.0" encoding="UTF-8"?>
<metadata
xmlns=
"http://www.beecode.cn/schema/amino-metadata"
xmlns:m=
"http://www.beecode.cn/schema/bcp-biztype"
>
<specification>
1.0
</specification>
<id>
5cd3ab7c-6fab-41f9-9921-780195eb24a2
</id>
<id>
be913aae-6093-474c-b008-ba25211f107e
</id>
<name>
com.xyst.dinas.biz.bill.Position
</name>
<title>
岗位
</title>
<description>
岗位
</description>
...
...
backend/xyst.dinas.oa/src/main/resources/com/xyst/dinas/oa/bill/BusinessTripApply$sequence.jmx
View file @
2f7d39af
<?xml version="1.0" encoding="UTF-8"?>
<metadata
xmlns=
"http://www.beecode.cn/schema/amino-metadata"
xmlns:m=
"http://www.beecode.cn/schema/bcp-sequence"
>
<specification>
1.0
</specification>
<id>
8cd1acd2-ea6a-46d7-8545-326c99a5bb89
</id>
<id>
61aee674-615d-4458-8f8d-c05110452d33
</id>
<name>
com.xyst.dinas.oa.bill.BusinessTripApply$sequence
</name>
<title>
出差申请$sequence
</title>
<description>
出差申请
</description>
...
...
backend/xyst.dinas.oa/src/main/resources/com/xyst/dinas/oa/bill/BusinessTripApply$serial.jmx
View file @
2f7d39af
<?xml version="1.0" encoding="UTF-8"?>
<metadata
xmlns=
"http://www.beecode.cn/schema/amino-metadata"
xmlns:m=
"http://www.beecode.cn/schema/bcp-serial"
>
<specification>
1.0
</specification>
<id>
b02bb6c4-3827-4102-b930-6f13435a7e76
</id>
<id>
79839413-2bfb-4318-a1eb-e7814f596d32
</id>
<name>
com.xyst.dinas.oa.bill.BusinessTripApply$serial
</name>
<title>
出差申请$serial
</title>
<description>
出差申请
</description>
...
...
backend/xyst.dinas.oa/src/main/resources/com/xyst/dinas/oa/bill/BusinessTripApply.jmx
View file @
2f7d39af
<?xml version="1.0" encoding="UTF-8"?>
<metadata
xmlns=
"http://www.beecode.cn/schema/amino-metadata"
xmlns:m=
"http://www.beecode.cn/schema/bcp-biztype"
>
<specification>
1.0
</specification>
<id>
eb88e653-968c-47ee-bb6c-9a4518ad5071
</id>
<id>
49c6c36a-38a9-46b4-a84b-899535ce796b
</id>
<name>
com.xyst.dinas.oa.bill.BusinessTripApply
</name>
<title>
出差申请
</title>
<description>
出差申请
</description>
...
...
backend/xyst.dinas.oa/src/main/resources/com/xyst/dinas/oa/bill/ProtocolDocument$sequence.jmx
View file @
2f7d39af
<?xml version="1.0" encoding="UTF-8"?>
<metadata
xmlns=
"http://www.beecode.cn/schema/amino-metadata"
xmlns:m=
"http://www.beecode.cn/schema/bcp-sequence"
>
<specification>
1.0
</specification>
<id>
5e8338fa-7e65-4d4c-b0e3-6c82d749c136
</id>
<id>
322b4f87-72ba-4d4e-8455-512d61b449e1
</id>
<name>
com.xyst.dinas.oa.bill.ProtocolDocument$sequence
</name>
<title>
拟文$sequence
</title>
<description>
拟文
</description>
...
...
backend/xyst.dinas.oa/src/main/resources/com/xyst/dinas/oa/bill/ProtocolDocument$serial.jmx
View file @
2f7d39af
<?xml version="1.0" encoding="UTF-8"?>
<metadata
xmlns=
"http://www.beecode.cn/schema/amino-metadata"
xmlns:m=
"http://www.beecode.cn/schema/bcp-serial"
>
<specification>
1.0
</specification>
<id>
54dfa0b4-b205-4521-9d0b-cfbd375c0834
</id>
<id>
b050fc3f-9e62-4dee-8e53-a1ab61737dde
</id>
<name>
com.xyst.dinas.oa.bill.ProtocolDocument$serial
</name>
<title>
拟文$serial
</title>
<description>
拟文
</description>
...
...
backend/xyst.dinas.oa/src/main/resources/com/xyst/dinas/oa/bill/ProtocolDocument.jmx
View file @
2f7d39af
<?xml version="1.0" encoding="UTF-8"?>
<metadata
xmlns=
"http://www.beecode.cn/schema/amino-metadata"
xmlns:m=
"http://www.beecode.cn/schema/bcp-biztype"
>
<specification>
1.0
</specification>
<id>
a9db7f3e-daba-4f5c-9206-2251e9fc8a42
</id>
<id>
4c19c3a8-6955-4f7a-aa97-989e22b20ffe
</id>
<name>
com.xyst.dinas.oa.bill.ProtocolDocument
</name>
<title>
拟文
</title>
<description>
拟文
</description>
...
...
backend/xyst.dinas.oa/src/main/resources/com/xyst/dinas/oa/bill/SealBorrow$sequence.jmx
View file @
2f7d39af
<?xml version="1.0" encoding="UTF-8"?>
<metadata
xmlns=
"http://www.beecode.cn/schema/amino-metadata"
xmlns:m=
"http://www.beecode.cn/schema/bcp-sequence"
>
<specification>
1.0
</specification>
<id>
ff03f6c5-3843-4d65-9ece-6a0ae4b98e9a
</id>
<id>
5a583754-de0c-4884-a37e-613a82e0db8f
</id>
<name>
com.xyst.dinas.oa.bill.SealBorrow$sequence
</name>
<title>
证章借出$sequence
</title>
<description>
证章借出
</description>
...
...
backend/xyst.dinas.oa/src/main/resources/com/xyst/dinas/oa/bill/SealBorrow$serial.jmx
View file @
2f7d39af
<?xml version="1.0" encoding="UTF-8"?>
<metadata
xmlns=
"http://www.beecode.cn/schema/amino-metadata"
xmlns:m=
"http://www.beecode.cn/schema/bcp-serial"
>
<specification>
1.0
</specification>
<id>
650e4eac-4ab0-4704-8b43-e04212eed383
</id>
<id>
9311fb59-73d8-4241-a570-a962f280034f
</id>
<name>
com.xyst.dinas.oa.bill.SealBorrow$serial
</name>
<title>
证章借出$serial
</title>
<description>
证章借出
</description>
...
...
backend/xyst.dinas.oa/src/main/resources/com/xyst/dinas/oa/bill/SealBorrow.jmx
View file @
2f7d39af
<?xml version="1.0" encoding="UTF-8"?>
<metadata
xmlns=
"http://www.beecode.cn/schema/amino-metadata"
xmlns:m=
"http://www.beecode.cn/schema/bcp-biztype"
>
<specification>
1.0
</specification>
<id>
425c9108-d226-4210-ae7b-c22513b1b5f9
</id>
<id>
e705d36c-0ca6-46be-9f89-48389d162e3e
</id>
<name>
com.xyst.dinas.oa.bill.SealBorrow
</name>
<title>
证章借出
</title>
<description>
证章借出
</description>
...
...
backend/xyst.dinas.oa/src/main/resources/com/xyst/dinas/oa/bill/UseCarApply$sequence.jmx
View file @
2f7d39af
<?xml version="1.0" encoding="UTF-8"?>
<metadata
xmlns=
"http://www.beecode.cn/schema/amino-metadata"
xmlns:m=
"http://www.beecode.cn/schema/bcp-sequence"
>
<specification>
1.0
</specification>
<id>
8012c173-4025-4dcb-946f-2f715ea8e7dc
</id>
<id>
cf3798f9-c744-4ee5-afe5-52cf07e246cb
</id>
<name>
com.xyst.dinas.oa.bill.UseCarApply$sequence
</name>
<title>
用车申请$sequence
</title>
<description>
用车申请
</description>
...
...
backend/xyst.dinas.oa/src/main/resources/com/xyst/dinas/oa/bill/UseCarApply$serial.jmx
View file @
2f7d39af
<?xml version="1.0" encoding="UTF-8"?>
<metadata
xmlns=
"http://www.beecode.cn/schema/amino-metadata"
xmlns:m=
"http://www.beecode.cn/schema/bcp-serial"
>
<specification>
1.0
</specification>
<id>
acc789ac-dd0b-4580-b271-0cc9931947a6
</id>
<id>
8087d2fa-7450-4054-961e-01f5cc35b3c9
</id>
<name>
com.xyst.dinas.oa.bill.UseCarApply$serial
</name>
<title>
用车申请$serial
</title>
<description>
用车申请
</description>
...
...
backend/xyst.dinas.oa/src/main/resources/com/xyst/dinas/oa/bill/UseCarApply.jmx
View file @
2f7d39af
<?xml version="1.0" encoding="UTF-8"?>
<metadata
xmlns=
"http://www.beecode.cn/schema/amino-metadata"
xmlns:m=
"http://www.beecode.cn/schema/bcp-biztype"
>
<specification>
1.0
</specification>
<id>
3f8ff842-a50c-4b5b-a730-f4ccc9371b46
</id>
<id>
6f73f099-8c03-4ee5-80f3-527c0bd4ed37
</id>
<name>
com.xyst.dinas.oa.bill.UseCarApply
</name>
<title>
用车申请
</title>
<description>
用车申请
</description>
...
...
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