Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-cloud-account
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.account
pica-cloud-account
提交
adee2ab2
提交
adee2ab2
编写于
8月 19, 2020
作者:
peijun.zhao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
账户增加 商户渠道新增用户
上级
62840589
流水线
#29389
已失败 于阶段
in 0 second
变更
4
流水线
2
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
15 行增加
和
8 行删除
+15
-8
pom.xml
client/pom.xml
+1
-1
RegisterClient.java
...com/pica/cloud/account/account/client/RegisterClient.java
+2
-1
CircleAccountService.java
.../account/account/server/service/CircleAccountService.java
+1
-1
CircleAccountServiceImpl.java
...account/server/service/impl/CircleAccountServiceImpl.java
+11
-5
未找到文件。
client/pom.xml
浏览文件 @
adee2ab2
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<groupId>
com.pica.cloud.account
</groupId>
<groupId>
com.pica.cloud.account
</groupId>
<artifactId>
pica-cloud-account-client
</artifactId>
<artifactId>
pica-cloud-account-client
</artifactId>
<version>
1.0.3.
7
</version>
<version>
1.0.3.
8
</version>
<name>
pica-cloud-account-client
</name>
<name>
pica-cloud-account-client
</name>
<packaging>
jar
</packaging>
<packaging>
jar
</packaging>
...
...
client/src/main/java/com/pica/cloud/account/account/client/RegisterClient.java
浏览文件 @
adee2ab2
...
@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestBody;
...
@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestHeader
;
import
org.springframework.web.bind.annotation.RequestHeader
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
* Created on 2019/10/16 17:28
* Created on 2019/10/16 17:28
...
@@ -31,7 +32,7 @@ public interface RegisterClient {
...
@@ -31,7 +32,7 @@ public interface RegisterClient {
PicaResponse
<
List
<
Integer
>>
register
(
@RequestBody
CircleAcctInitReq
circleAcctInitReq
,
@RequestHeader
(
value
=
"token"
)
String
token
);
PicaResponse
<
List
<
Integer
>>
register
(
@RequestBody
CircleAcctInitReq
circleAcctInitReq
,
@RequestHeader
(
value
=
"token"
)
String
token
);
@PostMapping
(
value
=
"/account/shop/acct"
)
@PostMapping
(
value
=
"/account/shop/acct"
)
PicaResponse
<
List
<
Integer
>>
shopRegister
(
@RequestBody
ShopAcctInitReq
shopAcctInitReq
,
@RequestHeader
(
value
=
"token"
)
String
token
);
PicaResponse
<
Map
<
String
,
Integer
>>
shopRegister
(
@RequestBody
ShopAcctInitReq
shopAcctInitReq
,
@RequestHeader
(
value
=
"token"
)
String
token
);
}
}
\ No newline at end of file
server/src/main/java/com/pica/cloud/account/account/server/service/CircleAccountService.java
浏览文件 @
adee2ab2
...
@@ -19,6 +19,6 @@ public interface CircleAccountService {
...
@@ -19,6 +19,6 @@ public interface CircleAccountService {
List
<
Integer
>
createCircleAccount
(
CircleAcctInitReq
circleAcctInitReq
);
List
<
Integer
>
createCircleAccount
(
CircleAcctInitReq
circleAcctInitReq
);
List
<
Integer
>
createShopAccount
(
ShopAcctInitReq
shopAcctInitReq
);
Map
<
String
,
Integer
>
createShopAccount
(
ShopAcctInitReq
shopAcctInitReq
);
}
}
server/src/main/java/com/pica/cloud/account/account/server/service/impl/CircleAccountServiceImpl.java
浏览文件 @
adee2ab2
...
@@ -19,7 +19,9 @@ import org.springframework.stereotype.Service;
...
@@ -19,7 +19,9 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
...
@@ -70,10 +72,12 @@ public class CircleAccountServiceImpl implements CircleAccountService {
...
@@ -70,10 +72,12 @@ public class CircleAccountServiceImpl implements CircleAccountService {
}
}
@Override
@Override
public
List
<
Integer
>
createShopAccount
(
ShopAcctInitReq
shopAcctInitReq
)
{
public
Map
<
String
,
Integer
>
createShopAccount
(
ShopAcctInitReq
shopAcctInitReq
)
{
Map
<
String
,
Integer
>
rtnMap
=
new
HashMap
();
logger
.
info
(
"createShopAccount:{}"
,
JSONObject
.
toJSONString
(
shopAcctInitReq
));
logger
.
info
(
"createShopAccount:{}"
,
JSONObject
.
toJSONString
(
shopAcctInitReq
));
List
<
ShopAcctInit
>
shopAcctInits
=
shopAcctInitReq
.
getShopAcctInitList
();
List
<
ShopAcctInit
>
shopAcctInits
=
shopAcctInitReq
.
getShopAcctInitList
();
List
<
Integer
>
savedIds
=
new
ArrayList
<>();
//
List<Integer> savedIds = new ArrayList<>();
try
{
try
{
for
(
ShopAcctInit
acct
:
shopAcctInits
){
for
(
ShopAcctInit
acct
:
shopAcctInits
){
String
encryMobile
=
EncryptUtils
.
encryptContent
(
acct
.
getMobile
(),
EncryptConstants
.
ENCRYPT_TYPE_MOBILE
);
String
encryMobile
=
EncryptUtils
.
encryptContent
(
acct
.
getMobile
(),
EncryptConstants
.
ENCRYPT_TYPE_MOBILE
);
...
@@ -85,11 +89,13 @@ public class CircleAccountServiceImpl implements CircleAccountService {
...
@@ -85,11 +89,13 @@ public class CircleAccountServiceImpl implements CircleAccountService {
account
.
setMobilePhone
(
encryMobile
);
account
.
setMobilePhone
(
encryMobile
);
account
.
setRegisterSource
(
shopAcctInitReq
.
getRegisterSource
());
account
.
setRegisterSource
(
shopAcctInitReq
.
getRegisterSource
());
accountService
.
createAccount
(
account
,
AccountTypeEnum
.
PRODUCT_TYPE_DOCTOR
.
getCode
());
accountService
.
createAccount
(
account
,
AccountTypeEnum
.
PRODUCT_TYPE_DOCTOR
.
getCode
());
savedIds
.
add
(
account
.
getId
().
intValue
());
//
savedIds.add(account.getId().intValue());
logger
.
info
(
"createShopAccount insert {}"
,
account
.
getId
().
intValue
());
logger
.
info
(
"createShopAccount insert {}"
,
account
.
getId
().
intValue
());
rtnMap
.
put
(
acct
.
getMobile
(),
account
.
getId
().
intValue
());
}
else
{
}
else
{
savedIds
.
add
(
dbAcct
.
getId
().
intValue
());
//
savedIds.add(dbAcct.getId().intValue());
logger
.
info
(
"createShopAccount exist {}"
,
dbAcct
.
getId
().
intValue
());
logger
.
info
(
"createShopAccount exist {}"
,
dbAcct
.
getId
().
intValue
());
rtnMap
.
put
(
acct
.
getMobile
(),
dbAcct
.
getId
().
intValue
());
}
}
}
}
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
...
@@ -97,7 +103,7 @@ public class CircleAccountServiceImpl implements CircleAccountService {
...
@@ -97,7 +103,7 @@ public class CircleAccountServiceImpl implements CircleAccountService {
throw
e
;
throw
e
;
}
}
return
savedIds
;
return
rtnMap
;
}
}
}
}
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录