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
提交
63d3c610
提交
63d3c610
编写于
10月 16, 2019
作者:
dong.an
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加web登录后查询用户信息接口
上级
acd729c1
流水线
#15906
已失败 于阶段
in 2 second
变更
9
流水线
1
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
789 行增加
和
5 行删除
+789
-5
LoginController.java
...ud/account/account/server/controller/LoginController.java
+15
-4
LoginResultWeb.java
...a/cloud/account/account/server/entity/LoginResultWeb.java
+39
-0
PICAPDoctor.java
...pica/cloud/account/account/server/entity/PICAPDoctor.java
+533
-0
PICAPDoctorEducation.java
...d/account/account/server/entity/PICAPDoctorEducation.java
+147
-0
DoctorMapper.java
...ica/cloud/account/account/server/mapper/DoctorMapper.java
+3
-0
LoginService.java
...ca/cloud/account/account/server/service/LoginService.java
+3
-0
LoginServiceImpl.java
...account/account/server/service/impl/LoginServiceImpl.java
+35
-1
bootstrap-dev.properties
server/src/main/resources/bootstrap-dev.properties
+1
-0
DoctorMapper.xml
server/src/main/resources/mybatis/DoctorMapper.xml
+13
-0
未找到文件。
server/src/main/java/com/pica/cloud/account/account/server/controller/LoginController.java
浏览文件 @
63d3c610
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
controller
;
import
com.pica.cloud.account.account.server.entity.EncryptEntity
;
import
com.pica.cloud.account.account.server.entity.LogLoginEntity
;
import
com.pica.cloud.account.account.server.entity.LoginResult
;
import
com.pica.cloud.account.account.server.entity.*
;
import
com.pica.cloud.account.account.server.enums.AccountExceptionEnum
;
import
com.pica.cloud.account.account.server.enums.AccountTypeEnum
;
import
com.pica.cloud.account.account.server.exception.AccountException
;
...
...
@@ -16,6 +13,7 @@ import com.pica.cloud.account.account.server.util.AccountUtils;
import
com.pica.cloud.account.account.server.util.CryptoUtil
;
import
com.pica.cloud.foundation.entity.PicaResponse
;
import
com.pica.cloud.foundation.redis.ICacheClient
;
import
com.pica.cloud.foundation.utils.utils.CommonUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang.StringUtils
;
...
...
@@ -154,4 +152,17 @@ public class LoginController extends AccountBaseController {
throw
new
AccountException
(
AccountExceptionEnum
.
PICA_LOGIN_AGAIN
);
}
}
@ApiOperation
(
value
=
"web登录获取用户信息"
)
@GetMapping
(
"/login/web"
)
public
PicaResponse
<
LoginResultWeb
>
getLoginResult
()
{
long
doctorId
=
super
.
getDoctorIdByToken
();
PICAPDoctor
doctor
=
loginService
.
queryDoctor
(
doctorId
);
LoginResultWeb
resultWeb
=
new
LoginResultWeb
();
resultWeb
.
setPicapDoctor
(
doctor
);
if
(
doctor
.
getStatus
()
!=
null
)
{
resultWeb
.
setCertifyDoc
(
doctor
.
getStatus
().
intValue
());
}
return
PicaResponse
.
toResponse
(
resultWeb
);
}
}
server/src/main/java/com/pica/cloud/account/account/server/entity/LoginResultWeb.java
0 → 100644
浏览文件 @
63d3c610
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
entity
;
import
io.swagger.annotations.ApiModel
;
/**
* @author andong
* @create 2019/10/16
*/
@ApiModel
public
class
LoginResultWeb
{
private
int
certifyDoc
=
1
;
private
int
isExist
=
1
;
private
PICAPDoctor
picapDoctor
;
public
int
getCertifyDoc
()
{
return
certifyDoc
;
}
public
void
setCertifyDoc
(
int
certifyDoc
)
{
this
.
certifyDoc
=
certifyDoc
;
}
public
int
getIsExist
()
{
return
isExist
;
}
public
void
setIsExist
(
int
isExist
)
{
this
.
isExist
=
isExist
;
}
public
PICAPDoctor
getPicapDoctor
()
{
return
picapDoctor
;
}
public
void
setPicapDoctor
(
PICAPDoctor
picapDoctor
)
{
this
.
picapDoctor
=
picapDoctor
;
}
}
server/src/main/java/com/pica/cloud/account/account/server/entity/PICAPDoctor.java
0 → 100644
浏览文件 @
63d3c610
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
entity
;
import
java.util.Date
;
/**
* @author andong
* @create 2019/10/16
*/
public
class
PICAPDoctor
{
private
Integer
id
;
private
Integer
sex
;
private
String
name
;
private
String
mobile_phone
;
private
Integer
status
;
private
Integer
type
;
private
Integer
hospital_id
;
private
Integer
department_id
;
private
Integer
title_id
;
private
String
cert_image_url
;
private
String
avatar_image_url
;
protected
Date
auth_time
;
protected
Date
rejected_time
;
private
String
honor
;
private
String
skills
;
private
String
card
;
private
Integer
thumb_up_num
;
private
String
email
;
private
String
qrcode
;
private
String
nickname
;
private
String
personal_sign
;
private
Integer
praise_num
;
private
String
password
;
private
String
gaoxueya_password
;
private
String
info
;
private
String
rank
;
private
Long
county
;
private
Long
city
;
private
Integer
province
;
private
String
hospital
;
private
String
department
;
private
String
title
;
private
String
invite_code
;
private
Integer
entire_flag
;
private
Integer
doctor_project_type
;
private
Integer
sms_send_num
;
private
Integer
total_sms_send_num
;
private
String
province_name
;
private
String
city_name
;
private
String
county_name
;
protected
Date
invite_start_time
;
private
Long
town
;
private
String
town_name
;
private
Integer
register_source
;
private
Integer
register_type
;
private
Integer
administer_title_id
;
private
String
administer_title
;
protected
Date
birthday
;
protected
String
birthdayStr
=
""
;
protected
Integer
age
=
0
;
protected
PICAPDoctorEducation
doctorEducation
;
private
Integer
delete_flag
;
private
Integer
creat_id
;
protected
Date
creat_time
;
private
Integer
modify_id
;
protected
Date
modify_time
;
private
Integer
create_id
;
protected
Date
create_time
;
public
Date
getBirthday
()
{
return
this
.
birthday
;
}
public
void
setBirthday
(
Date
birthday
)
{
this
.
birthday
=
birthday
;
}
public
Integer
getAge
()
{
return
this
.
age
;
}
public
void
setAge
(
Integer
age
)
{
this
.
age
=
age
;
}
public
String
getBirthdayStr
()
{
return
this
.
birthdayStr
;
}
public
void
setBirthdayStr
(
String
birthdayStr
)
{
this
.
birthdayStr
=
birthdayStr
;
}
public
String
getCard
()
{
return
this
.
card
;
}
public
void
setCard
(
String
card
)
{
this
.
card
=
card
;
}
public
PICAPDoctorEducation
getDoctorEducation
()
{
return
this
.
doctorEducation
;
}
public
void
setDoctorEducation
(
PICAPDoctorEducation
doctorEducation
)
{
this
.
doctorEducation
=
doctorEducation
;
}
public
Integer
getRegister_type
()
{
return
this
.
register_type
;
}
public
void
setRegister_type
(
Integer
register_type
)
{
this
.
register_type
=
register_type
;
}
public
String
getAdminister_title
()
{
return
this
.
administer_title
;
}
public
void
setAdminister_title
(
String
administer_title
)
{
this
.
administer_title
=
administer_title
;
}
public
Integer
getAdminister_title_id
()
{
return
this
.
administer_title_id
;
}
public
void
setAdminister_title_id
(
Integer
administer_title_id
)
{
this
.
administer_title_id
=
administer_title_id
;
}
public
Integer
getRegister_source
()
{
return
this
.
register_source
;
}
public
void
setRegister_source
(
Integer
register_source
)
{
this
.
register_source
=
register_source
;
}
public
Integer
getTotal_sms_send_num
()
{
return
this
.
total_sms_send_num
;
}
public
void
setTotal_sms_send_num
(
Integer
total_sms_send_num
)
{
this
.
total_sms_send_num
=
total_sms_send_num
;
}
public
Integer
getSms_send_num
()
{
return
this
.
sms_send_num
;
}
public
void
setSms_send_num
(
Integer
sms_send_num
)
{
this
.
sms_send_num
=
sms_send_num
;
}
public
Integer
getDoctor_project_type
()
{
return
this
.
doctor_project_type
;
}
public
void
setDoctor_project_type
(
Integer
doctor_project_type
)
{
this
.
doctor_project_type
=
doctor_project_type
;
}
public
String
getGaoxueya_password
()
{
return
this
.
gaoxueya_password
;
}
public
void
setGaoxueya_password
(
String
gaoxueya_password
)
{
this
.
gaoxueya_password
=
gaoxueya_password
;
}
public
String
getInvite_code
()
{
return
this
.
invite_code
;
}
public
void
setInvite_code
(
String
invite_code
)
{
this
.
invite_code
=
invite_code
;
}
public
Integer
getEntire_flag
()
{
return
this
.
entire_flag
;
}
public
void
setEntire_flag
(
Integer
entire_flag
)
{
this
.
entire_flag
=
entire_flag
;
}
public
Date
getAuth_time
()
{
return
this
.
auth_time
;
}
public
void
setAuth_time
(
Date
auth_time
)
{
this
.
auth_time
=
auth_time
;
}
public
Date
getRejected_time
()
{
return
this
.
rejected_time
;
}
public
void
setRejected_time
(
Date
rejected_time
)
{
this
.
rejected_time
=
rejected_time
;
}
public
Long
getCounty
()
{
return
this
.
county
;
}
public
void
setCounty
(
Long
county
)
{
this
.
county
=
county
;
}
public
Long
getCity
()
{
return
this
.
city
;
}
public
void
setCity
(
Long
city
)
{
this
.
city
=
city
;
}
public
Integer
getProvince
()
{
return
this
.
province
;
}
public
void
setProvince
(
Integer
province
)
{
this
.
province
=
province
;
}
public
String
getHospital
()
{
return
this
.
hospital
;
}
public
void
setHospital
(
String
hospital
)
{
this
.
hospital
=
hospital
;
}
public
String
getDepartment
()
{
return
this
.
department
;
}
public
void
setDepartment
(
String
department
)
{
this
.
department
=
department
;
}
public
String
getTitle
()
{
return
this
.
title
;
}
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
public
Integer
getId
()
{
return
this
.
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
Integer
getSex
()
{
return
this
.
sex
;
}
public
void
setSex
(
Integer
sex
)
{
this
.
sex
=
sex
;
}
public
String
getName
()
{
return
this
.
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getMobile_phone
()
{
return
this
.
mobile_phone
;
}
public
void
setMobile_phone
(
String
mobile_phone
)
{
this
.
mobile_phone
=
mobile_phone
;
}
public
Integer
getStatus
()
{
return
this
.
status
;
}
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
}
public
Integer
getType
()
{
return
this
.
type
;
}
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
}
public
Integer
getHospital_id
()
{
return
this
.
hospital_id
;
}
public
void
setHospital_id
(
Integer
hospital_id
)
{
this
.
hospital_id
=
hospital_id
;
}
public
Integer
getDepartment_id
()
{
return
this
.
department_id
;
}
public
void
setDepartment_id
(
Integer
department_id
)
{
this
.
department_id
=
department_id
;
}
public
Integer
getTitle_id
()
{
return
this
.
title_id
;
}
public
void
setTitle_id
(
Integer
title_id
)
{
this
.
title_id
=
title_id
;
}
public
String
getCert_image_url
()
{
return
this
.
cert_image_url
;
}
public
void
setCert_image_url
(
String
cert_image_url
)
{
this
.
cert_image_url
=
cert_image_url
;
}
public
String
getAvatar_image_url
()
{
return
this
.
avatar_image_url
;
}
public
void
setAvatar_image_url
(
String
avatar_image_url
)
{
this
.
avatar_image_url
=
avatar_image_url
;
}
public
String
getHonor
()
{
return
this
.
honor
;
}
public
void
setHonor
(
String
honor
)
{
this
.
honor
=
honor
;
}
public
String
getSkills
()
{
return
this
.
skills
;
}
public
void
setSkills
(
String
skills
)
{
this
.
skills
=
skills
;
}
public
Integer
getThumb_up_num
()
{
return
this
.
thumb_up_num
;
}
public
void
setThumb_up_num
(
Integer
thumb_up_num
)
{
this
.
thumb_up_num
=
thumb_up_num
;
}
public
String
getEmail
()
{
return
this
.
email
;
}
public
void
setEmail
(
String
email
)
{
this
.
email
=
email
;
}
public
String
getQrcode
()
{
return
this
.
qrcode
;
}
public
void
setQrcode
(
String
qrcode
)
{
this
.
qrcode
=
qrcode
;
}
public
String
getNickname
()
{
return
this
.
nickname
;
}
public
void
setNickname
(
String
nickname
)
{
this
.
nickname
=
nickname
;
}
public
String
getPersonal_sign
()
{
return
this
.
personal_sign
;
}
public
void
setPersonal_sign
(
String
personal_sign
)
{
this
.
personal_sign
=
personal_sign
;
}
public
Integer
getPraise_num
()
{
return
this
.
praise_num
;
}
public
void
setPraise_num
(
Integer
praise_num
)
{
this
.
praise_num
=
praise_num
;
}
public
String
getPassword
()
{
return
this
.
password
;
}
public
void
setPassword
(
String
password
)
{
this
.
password
=
password
;
}
public
String
getInfo
()
{
return
this
.
info
;
}
public
void
setInfo
(
String
info
)
{
this
.
info
=
info
;
}
public
String
getRank
()
{
return
this
.
rank
;
}
public
void
setRank
(
String
rank
)
{
this
.
rank
=
rank
;
}
public
Date
getInvite_start_time
()
{
return
this
.
invite_start_time
;
}
public
void
setInvite_start_time
(
Date
invite_start_time
)
{
this
.
invite_start_time
=
invite_start_time
;
}
public
String
getProvince_name
()
{
return
this
.
province_name
;
}
public
void
setProvince_name
(
String
province_name
)
{
this
.
province_name
=
province_name
;
}
public
String
getCity_name
()
{
return
this
.
city_name
;
}
public
void
setCity_name
(
String
city_name
)
{
this
.
city_name
=
city_name
;
}
public
String
getCounty_name
()
{
return
this
.
county_name
;
}
public
void
setCounty_name
(
String
county_name
)
{
this
.
county_name
=
county_name
;
}
public
Long
getTown
()
{
return
this
.
town
;
}
public
void
setTown
(
Long
town
)
{
this
.
town
=
town
;
}
public
String
getTown_name
()
{
return
this
.
town_name
;
}
public
void
setTown_name
(
String
town_name
)
{
this
.
town_name
=
town_name
;
}
public
Integer
getCreate_id
()
{
return
this
.
create_id
;
}
public
void
setCreate_id
(
Integer
create_id
)
{
this
.
create_id
=
create_id
;
}
public
Date
getCreate_time
()
{
return
this
.
create_time
;
}
public
void
setCreate_time
(
Date
create_time
)
{
this
.
create_time
=
create_time
;
}
public
Integer
getDelete_flag
()
{
return
this
.
delete_flag
;
}
public
void
setDelete_flag
(
Integer
delete_flag
)
{
this
.
delete_flag
=
delete_flag
;
}
public
Integer
getCreat_id
()
{
return
this
.
creat_id
;
}
public
void
setCreat_id
(
Integer
creat_id
)
{
this
.
creat_id
=
creat_id
;
}
public
Date
getCreat_time
()
{
return
this
.
creat_time
;
}
public
void
setCreat_time
(
Date
creat_time
)
{
this
.
creat_time
=
creat_time
;
}
public
Integer
getModify_id
()
{
return
this
.
modify_id
;
}
public
void
setModify_id
(
Integer
modify_id
)
{
this
.
modify_id
=
modify_id
;
}
public
Date
getModify_time
()
{
return
this
.
modify_time
;
}
public
void
setModify_time
(
Date
modify_time
)
{
this
.
modify_time
=
modify_time
;
}
}
server/src/main/java/com/pica/cloud/account/account/server/entity/PICAPDoctorEducation.java
0 → 100644
浏览文件 @
63d3c610
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
entity
;
import
java.util.Date
;
/**
* @author andong
* @create 2019/10/16
*/
public
class
PICAPDoctorEducation
{
private
static
final
long
serialVersionUID
=
1L
;
private
Integer
id
=
0
;
private
Integer
doctor_id
=
0
;
private
String
school_name
=
""
;
private
Integer
major_id
=
0
;
private
String
major_name
=
""
;
private
String
education_id
=
""
;
private
String
education_name
=
""
;
private
String
year
=
""
;
private
Integer
delete_flag
;
private
Integer
creat_id
;
protected
Date
creat_time
;
private
Integer
modify_id
;
protected
Date
modify_time
;
private
Integer
create_id
;
protected
Date
create_time
;
public
String
getMajor_name
()
{
return
this
.
major_name
;
}
public
void
setMajor_name
(
String
major_name
)
{
this
.
major_name
=
major_name
;
}
public
String
getEducation_name
()
{
return
this
.
education_name
;
}
public
void
setEducation_name
(
String
education_name
)
{
this
.
education_name
=
education_name
;
}
public
Integer
getId
()
{
return
this
.
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
Integer
getDoctor_id
()
{
return
this
.
doctor_id
;
}
public
void
setDoctor_id
(
Integer
doctor_id
)
{
this
.
doctor_id
=
doctor_id
;
}
public
String
getSchool_name
()
{
return
this
.
school_name
;
}
public
void
setSchool_name
(
String
school_name
)
{
this
.
school_name
=
school_name
;
}
public
Integer
getMajor_id
()
{
return
this
.
major_id
;
}
public
void
setMajor_id
(
Integer
major_id
)
{
this
.
major_id
=
major_id
;
}
public
String
getEducation_id
()
{
return
this
.
education_id
;
}
public
void
setEducation_id
(
String
education_id
)
{
this
.
education_id
=
education_id
;
}
public
String
getYear
()
{
return
this
.
year
;
}
public
void
setYear
(
String
year
)
{
this
.
year
=
year
;
}
public
Integer
getCreate_id
()
{
return
this
.
create_id
;
}
public
void
setCreate_id
(
Integer
create_id
)
{
this
.
create_id
=
create_id
;
}
public
Date
getCreate_time
()
{
return
this
.
create_time
;
}
public
void
setCreate_time
(
Date
create_time
)
{
this
.
create_time
=
create_time
;
}
public
Integer
getDelete_flag
()
{
return
this
.
delete_flag
;
}
public
void
setDelete_flag
(
Integer
delete_flag
)
{
this
.
delete_flag
=
delete_flag
;
}
public
Integer
getCreat_id
()
{
return
this
.
creat_id
;
}
public
void
setCreat_id
(
Integer
creat_id
)
{
this
.
creat_id
=
creat_id
;
}
public
Date
getCreat_time
()
{
return
this
.
creat_time
;
}
public
void
setCreat_time
(
Date
creat_time
)
{
this
.
creat_time
=
creat_time
;
}
public
Integer
getModify_id
()
{
return
this
.
modify_id
;
}
public
void
setModify_id
(
Integer
modify_id
)
{
this
.
modify_id
=
modify_id
;
}
public
Date
getModify_time
()
{
return
this
.
modify_time
;
}
public
void
setModify_time
(
Date
modify_time
)
{
this
.
modify_time
=
modify_time
;
}
}
server/src/main/java/com/pica/cloud/account/account/server/mapper/DoctorMapper.java
浏览文件 @
63d3c610
...
...
@@ -3,6 +3,7 @@ package com.pica.cloud.account.account.server.mapper;
import
com.pica.cloud.account.account.server.entity.Doctor
;
import
com.pica.cloud.account.account.server.entity.DoctorEntity
;
import
com.pica.cloud.account.account.server.entity.PICAPDoctor
;
import
org.apache.ibatis.annotations.Param
;
public
interface
DoctorMapper
{
...
...
@@ -69,4 +70,6 @@ public interface DoctorMapper {
* @return
*/
int
unbindWeChat
(
@Param
(
"acctId"
)
int
acctId
);
PICAPDoctor
queryDoctor
(
long
doctorId
);
}
\ No newline at end of file
server/src/main/java/com/pica/cloud/account/account/server/service/LoginService.java
浏览文件 @
63d3c610
package
com
.
pica
.
cloud
.
account
.
account
.
server
.
service
;
import
com.pica.cloud.account.account.server.entity.LoginResult
;
import
com.pica.cloud.account.account.server.entity.PICAPDoctor
;
import
com.pica.cloud.account.account.server.req.BaseRequest
;
public
interface
LoginService
{
...
...
@@ -49,4 +50,6 @@ public interface LoginService {
* @param request 参数模型
*/
void
bindWeChat
(
BaseRequest
request
);
PICAPDoctor
queryDoctor
(
long
doctorId
);
}
server/src/main/java/com/pica/cloud/account/account/server/service/impl/LoginServiceImpl.java
浏览文件 @
63d3c610
...
...
@@ -17,6 +17,7 @@ import com.pica.cloud.account.account.server.util.TokenUtils;
import
com.pica.cloud.account.account.server.util.WeChatUtils
;
import
com.pica.cloud.foundation.entity.PicaException
;
import
com.pica.cloud.foundation.redis.ICacheClient
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -24,7 +25,6 @@ import org.springframework.beans.factory.annotation.Qualifier;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.Map
;
...
...
@@ -78,6 +78,20 @@ public class LoginServiceImpl implements LoginService {
@Value
(
"${weChatURL}"
)
private
String
weChatURL
;
private
static
final
String
DEFAULT_DOCTOR_PICTURE_URL
=
"/File/doctor_default.png"
;
public
static
Map
<
String
,
String
>
PIC_TYPE_MAP
=
new
HashMap
();
static
{
PIC_TYPE_MAP
.
put
(
"jpg"
,
"FFD8FF"
);
PIC_TYPE_MAP
.
put
(
"jpeg"
,
"FFD8FF"
);
PIC_TYPE_MAP
.
put
(
"png"
,
"89504E47"
);
PIC_TYPE_MAP
.
put
(
"gif"
,
"47494638"
);
PIC_TYPE_MAP
.
put
(
"bmp"
,
"424D"
);
PIC_TYPE_MAP
.
put
(
"png"
,
"89504E470D0a1a0a0000"
);
PIC_TYPE_MAP
.
put
(
"bmp"
,
"424d228c010000000000"
);
PIC_TYPE_MAP
.
put
(
"bmp"
,
"424d8240090000000000"
);
PIC_TYPE_MAP
.
put
(
"bmp"
,
"424d8e1b030000000000"
);
}
@Override
public
LoginResult
login
(
BaseRequest
request
)
{
String
mobile
=
request
.
getMobile
();
...
...
@@ -308,4 +322,24 @@ public class LoginServiceImpl implements LoginService {
accountWeChatInfoEntity
.
setLanguage
(
weChatUserInfoEntity
.
getLanguage
());
accountWeChatInfoMapper
.
insertSelective
(
accountWeChatInfoEntity
);
}
public
PICAPDoctor
queryDoctor
(
long
doctorId
)
{
PICAPDoctor
doctor
=
doctorInfoMapper
.
queryDoctor
(
doctorId
);
doctor
.
setAvatar_image_url
(
this
.
processDoctorAvatar
(
doctor
.
getAvatar_image_url
()));
return
doctor
;
}
private
String
processDoctorAvatar
(
String
avatar_image_url
)
{
if
(
StringUtils
.
isEmpty
(
avatar_image_url
))
{
return
DEFAULT_DOCTOR_PICTURE_URL
;
}
else
{
int
pos
=
avatar_image_url
.
lastIndexOf
(
"."
);
if
(
pos
<
0
)
{
return
DEFAULT_DOCTOR_PICTURE_URL
;
}
else
{
String
ext
=
avatar_image_url
.
substring
(
pos
+
1
,
avatar_image_url
.
length
()).
toLowerCase
();
return
!
PIC_TYPE_MAP
.
containsKey
(
ext
)
?
DEFAULT_DOCTOR_PICTURE_URL
:
avatar_image_url
;
}
}
}
}
server/src/main/resources/bootstrap-dev.properties
浏览文件 @
63d3c610
...
...
@@ -27,6 +27,7 @@ ribbon.ConnectTimeout=60000
#------------ Please don't change above configurations ------------
spring.jackson.date-format
=
yyyy-MM-dd HH:mm:ss
spring.jackson.time-zone
=
GMT+8
#spring.jackson.default-property-inclusion=non_null
memcached.url
=
192.168.130.230:11211
#微信登陆
weChatAppID
=
wx5103ed453ef2dbe8
...
...
server/src/main/resources/mybatis/DoctorMapper.xml
浏览文件 @
63d3c610
...
...
@@ -994,4 +994,17 @@
set unionid = ''
where acct_id = #{acctId}
</update>
<select
id=
"queryDoctor"
resultType=
"com.pica.cloud.account.account.server.entity.PICAPDoctor"
parameterType=
"java.lang.Long"
>
SELECT aa.id, aa.sex, aa.name, aa.mobile_phone, aa.status,
aa.type, aa.hospital_id, aa.department_id, aa.title_id,aa.card,
aa.hospital as hospital, aa.department, aa.title, aa.cert_image_url,
aa.avatar_image_url, aa.auth_time, aa.honor, aa.skills, aa.thumb_up_num, aa.email,
aa.qrcode, aa.nickname, aa.personal_sign, aa.delete_flag, aa.creat_id, aa.creat_time,
aa.modify_id, aa.modify_time, aa.praise_num, aa.password, aa.info, aa.rank, aa.province,
aa.city, aa.county, aa.invite_code, aa.gaoxueya_password, aa.sms_send_num, aa.total_sms_send_num,
aa.entire_flag, aa.doctor_project_type,aa.invite_start_time
FROM p_doctor aa
where aa.id = #{doctorId} and aa.delete_flag = 1
</select>
</mapper>
\ No newline at end of file
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录