|
@@ -23,18 +23,18 @@ type AuthService struct {
|
|
//认证信息保存
|
|
//认证信息保存
|
|
func (b AuthService) UserAuthInfoSave(in *medical.UserInfo) (bool, string) {
|
|
func (b AuthService) UserAuthInfoSave(in *medical.UserInfo) (bool, string) {
|
|
//先判断用户是否存在
|
|
//先判断用户是否存在
|
|
- user := b.BasesqlConn.FindOne(entity.DOMAIN_CAPITAL_RETENTION, map[string]interface{}{
|
|
|
|
- "position_id": in.PositionId, "appid": in.Appid,
|
|
|
|
- }, "id", "")
|
|
|
|
- if user != nil {
|
|
|
|
- if in.OperationType == "add" {
|
|
|
|
- return false, "用户已验证"
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- if in.OperationType == "update" {
|
|
|
|
- return false, "用户未认证,不可修改"
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ // user := b.BasesqlConn.FindOne(entity.DOMAIN_CAPITAL_RETENTION, map[string]interface{}{
|
|
|
|
+ // "position_id": in.PositionId, "appid": in.Appid,
|
|
|
|
+ // }, "id", "")
|
|
|
|
+ // if user != nil {
|
|
|
|
+ // if in.OperationType == "add" {
|
|
|
|
+ // return false, "用户已验证"
|
|
|
|
+ // }
|
|
|
|
+ // } else {
|
|
|
|
+ // if in.OperationType == "update" {
|
|
|
|
+ // return false, "用户未认证,不可修改"
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
if in.OperationType == "update" {
|
|
if in.OperationType == "update" {
|
|
//修改处理
|
|
//修改处理
|
|
data := map[string]interface{}{
|
|
data := map[string]interface{}{
|
|
@@ -114,7 +114,7 @@ func (b AuthService) UserAuthInfoSave(in *medical.UserInfo) (bool, string) {
|
|
func (b AuthService) UserAuthInfo(in *medical.CommonReq) *map[string]interface{} {
|
|
func (b AuthService) UserAuthInfo(in *medical.CommonReq) *map[string]interface{} {
|
|
//先判断用户是否存在
|
|
//先判断用户是否存在
|
|
user := b.BasesqlConn.FindOne(entity.DOMAIN_CAPITAL_RETENTION, map[string]interface{}{
|
|
user := b.BasesqlConn.FindOne(entity.DOMAIN_CAPITAL_RETENTION, map[string]interface{}{
|
|
- "user_id": in.UserId, "appid": in.Appid, "source": entity.MEDICALDOMAIN,
|
|
|
|
|
|
+ "position_id": in.PositionId, "appid": in.Appid, "source": entity.MEDICALDOMAIN,
|
|
}, "*", "")
|
|
}, "*", "")
|
|
return user
|
|
return user
|
|
}
|
|
}
|