Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
open-source
/
rpc-openplatform
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b941670f
authored
Dec 17, 2020
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
完成Dubbo基本开发 yangll
1 parent
c44ee63e
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
6 deletions
rpc-openplatform-api/src/main/java/cn/com/glsx/openplatform/model/PlatformCustomer.java
rpc-openplatform-container/src/main/java/cn/com/glsx/openplatform/mapper/PlatformCustomerMapper.java
rpc-openplatform-container/src/main/java/cn/com/glsx/openplatform/service/CustomerMgrServiceImpl.java
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformCustomerMapper.xml
rpc-openplatform-api/src/main/java/cn/com/glsx/openplatform/model/PlatformCustomer.java
View file @
b941670
...
@@ -58,7 +58,7 @@ public class PlatformCustomer implements Serializable {
...
@@ -58,7 +58,7 @@ public class PlatformCustomer implements Serializable {
/**
/**
* 城市 sys_area的id
* 城市 sys_area的id
*/
*/
private
Integer
A
rea
;
private
Integer
a
rea
;
/**
/**
* 详细地址
* 详细地址
...
@@ -255,11 +255,11 @@ public class PlatformCustomer implements Serializable {
...
@@ -255,11 +255,11 @@ public class PlatformCustomer implements Serializable {
}
}
public
Integer
getArea
()
{
public
Integer
getArea
()
{
return
A
rea
;
return
a
rea
;
}
}
public
void
setArea
(
Integer
area
)
{
public
void
setArea
(
Integer
area
)
{
A
rea
=
area
;
this
.
a
rea
=
area
;
}
}
@Override
@Override
...
@@ -273,7 +273,7 @@ public class PlatformCustomer implements Serializable {
...
@@ -273,7 +273,7 @@ public class PlatformCustomer implements Serializable {
", contactEmail='"
+
contactEmail
+
'\''
+
", contactEmail='"
+
contactEmail
+
'\''
+
", province="
+
province
+
", province="
+
province
+
", city="
+
city
+
", city="
+
city
+
", Area="
+
A
rea
+
", Area="
+
a
rea
+
", address='"
+
address
+
'\''
+
", address='"
+
address
+
'\''
+
", status="
+
status
+
", status="
+
status
+
", publicKey='"
+
publicKey
+
'\''
+
", publicKey='"
+
publicKey
+
'\''
+
...
...
rpc-openplatform-container/src/main/java/cn/com/glsx/openplatform/mapper/PlatformCustomerMapper.java
View file @
b941670
...
@@ -26,4 +26,6 @@ public interface PlatformCustomerMapper extends OreMapper<PlatformCustomer> {
...
@@ -26,4 +26,6 @@ public interface PlatformCustomerMapper extends OreMapper<PlatformCustomer> {
int
login
(
PlatformCustomer
customer
);
int
login
(
PlatformCustomer
customer
);
List
<
String
>
getAddressOptionList
(
@Param
(
"id"
)
int
id
);
List
<
String
>
getAddressOptionList
(
@Param
(
"id"
)
int
id
);
String
getAddressStr
(
@Param
(
"province"
)
Integer
province
);
}
}
\ No newline at end of file
\ No newline at end of file
rpc-openplatform-container/src/main/java/cn/com/glsx/openplatform/service/CustomerMgrServiceImpl.java
View file @
b941670
...
@@ -10,9 +10,7 @@ import com.alibaba.dubbo.config.annotation.Service;
...
@@ -10,9 +10,7 @@ import com.alibaba.dubbo.config.annotation.Service;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.security.PrivateKey
;
import
java.security.PrivateKey
;
import
java.security.PublicKey
;
import
java.security.PublicKey
;
import
java.security.SecureRandom
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Random
;
import
java.util.UUID
;
import
java.util.UUID
;
@Service
@Service
...
@@ -60,6 +58,11 @@ public class CustomerMgrServiceImpl implements CustomerMgrService {
...
@@ -60,6 +58,11 @@ public class CustomerMgrServiceImpl implements CustomerMgrService {
PublicKey
publicKey
=
RsaUtil
.
generatePublicKey
(
modulus
,
exponent
);
PublicKey
publicKey
=
RsaUtil
.
generatePublicKey
(
modulus
,
exponent
);
customer
.
setPrivateKey
(
privateKey
.
getAlgorithm
());
customer
.
setPrivateKey
(
privateKey
.
getAlgorithm
());
customer
.
setPublicKey
(
publicKey
.
getAlgorithm
());
customer
.
setPublicKey
(
publicKey
.
getAlgorithm
());
String
province
=
customerMapper
.
getAddressStr
(
customer
.
getProvince
());
String
city
=
customerMapper
.
getAddressStr
(
customer
.
getCity
());
String
area
=
customerMapper
.
getAddressStr
(
customer
.
getArea
());
customer
.
setAddress
(
province
+
city
+
area
+
customer
.
getAddress
());
return
customerMapper
.
insertSelective
(
customer
);
return
customerMapper
.
insertSelective
(
customer
);
}
}
...
...
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformCustomerMapper.xml
View file @
b941670
...
@@ -69,4 +69,11 @@
...
@@ -69,4 +69,11 @@
</choose>
</choose>
</select>
</select>
<select
id=
"getAddressStr"
resultType=
"java.lang.String"
>
select
area_name
from t_sys_area
where id = #{id,jdbcType=INTEGER}
</select>
</mapper>
</mapper>
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
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 post a comment