2
This commit is contained in:
parent
bc4913c59a
commit
56429af0ff
@ -2,6 +2,7 @@ package service
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
"hospital-admin-api/api/dao"
|
"hospital-admin-api/api/dao"
|
||||||
"hospital-admin-api/api/dto"
|
"hospital-admin-api/api/dto"
|
||||||
"hospital-admin-api/api/model"
|
"hospital-admin-api/api/model"
|
||||||
@ -683,14 +684,14 @@ func (r *UserDoctorService) PutUserDoctor(doctorId int64, req requests.PutUserDo
|
|||||||
|
|
||||||
// 删除签章配置
|
// 删除签章配置
|
||||||
deleteUserSignConfigRequestData := &ca.DeleteUserSignConfigRequestData{
|
deleteUserSignConfigRequestData := &ca.DeleteUserSignConfigRequestData{
|
||||||
UserId: strconv.FormatInt(userDoctor.UserId, 10),
|
UserId: fmt.Sprintf("%d", userDoctor.UserId),
|
||||||
ConfigKey: strconv.FormatInt(userDoctor.UserId, 10),
|
ConfigKey: fmt.Sprintf("%d", userDoctor.UserId),
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err := ca.DeleteUserSignConfig(deleteUserSignConfigRequestData)
|
_, err := ca.DeleteUserSignConfig(deleteUserSignConfigRequestData)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
tx.Rollback()
|
tx.Rollback()
|
||||||
return false, errors.New(err.Error())
|
return false, errors.New("删除用户签章配置失败")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,7 +76,7 @@ func postRequest(requestUrl string, formData url.Values, signature string) (map[
|
|||||||
}(resp.Body)
|
}(resp.Body)
|
||||||
|
|
||||||
if resp.StatusCode != 200 {
|
if resp.StatusCode != 200 {
|
||||||
return nil, errors.New("请求失败")
|
return nil, errors.New("ca请求失败")
|
||||||
}
|
}
|
||||||
|
|
||||||
// 读取响应内容
|
// 读取响应内容
|
||||||
|
|||||||
@ -229,6 +229,7 @@ func DeleteUserSignConfig(d *DeleteUserSignConfigRequestData) (bool, error) {
|
|||||||
// 获取签名
|
// 获取签名
|
||||||
requestDataMap := make(map[string]interface{})
|
requestDataMap := make(map[string]interface{})
|
||||||
requestDataMap["userId"] = d.UserId
|
requestDataMap["userId"] = d.UserId
|
||||||
|
requestDataMap["configKey"] = d.ConfigKey
|
||||||
|
|
||||||
signature := GenerateSignature(requestDataMap)
|
signature := GenerateSignature(requestDataMap)
|
||||||
if signature == "" {
|
if signature == "" {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user