|
@@ -1701,8 +1701,10 @@ func (this *NewDialysisApiController) SaveMessage() {
|
1701
|
1701
|
fmt.Println("id", id)
|
1702
|
1702
|
message := this.GetString("message")
|
1703
|
1703
|
fmt.Println("message", message)
|
|
1704
|
+ orgid, _ := this.GetInt64("orgid")
|
1704
|
1705
|
role := models.SgjUserAdminRole{
|
1705
|
1706
|
Message: message,
|
|
1707
|
+ OrgId: orgid,
|
1706
|
1708
|
}
|
1707
|
1709
|
err := service.SaveMessage(id, &role)
|
1708
|
1710
|
if err != nil {
|
|
@@ -1719,8 +1721,10 @@ func (this *NewDialysisApiController) SaveSex() {
|
1719
|
1721
|
fmt.Println("sex", sex)
|
1720
|
1722
|
id, _ := this.GetInt64("id")
|
1721
|
1723
|
fmt.Println("id", id)
|
|
1724
|
+ orgid, _ := this.GetInt64("orgid")
|
1722
|
1725
|
role := models.SgjUserAdminRole{
|
1723
|
|
- Sex: sex,
|
|
1726
|
+ Sex: sex,
|
|
1727
|
+ OrgId: orgid,
|
1724
|
1728
|
}
|
1725
|
1729
|
err := service.SaveSex(id, &role)
|
1726
|
1730
|
if err != nil {
|
|
@@ -1743,8 +1747,11 @@ func (this *NewDialysisApiController) SaveBirthday() {
|
1743
|
1747
|
timeLayout := "2006-01-02 15:04:05"
|
1744
|
1748
|
theTime, err := utils.ParseTimeStringToTime(timeLayout, birthday+" 00:00:00")
|
1745
|
1749
|
birth := theTime.Unix()
|
|
1750
|
+ orgid := dataBody["orgid"].(string)
|
|
1751
|
+ orgids, err := strconv.ParseInt(orgid, 10, 64)
|
1746
|
1752
|
role := models.SgjUserAdminRole{
|
1747
|
1753
|
Birthday: birth,
|
|
1754
|
+ OrgId: orgids,
|
1748
|
1755
|
}
|
1749
|
1756
|
err = service.SaveBirthday(ids, &role)
|
1750
|
1757
|
if err != nil {
|
|
@@ -2207,7 +2214,8 @@ func (this *NewDialysisApiController) EditOrg() {
|
2207
|
2214
|
|
2208
|
2215
|
func (this *NewDialysisApiController) GetMyInforName() {
|
2209
|
2216
|
id, _ := this.GetInt64("id")
|
2210
|
|
- Username, err := service.GetAdminName(id)
|
|
2217
|
+ orgid, _ := this.GetInt64("orgid")
|
|
2218
|
+ Username, err := service.GetAdminName(id, orgid)
|
2211
|
2219
|
if err != nil {
|
2212
|
2220
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
2213
|
2221
|
return
|
|
@@ -2219,11 +2227,16 @@ func (this *NewDialysisApiController) GetMyInforName() {
|
2219
|
2227
|
|
2220
|
2228
|
func (this *NewDialysisApiController) GetMyInformationFour() {
|
2221
|
2229
|
adminUserInfo := this.GetMobileAdminUserInfo()
|
2222
|
|
- creatId := adminUserInfo.AdminUser.Id
|
2223
|
|
- fmt.Println("创建者ID", creatId)
|
|
2230
|
+ //creatId := adminUserInfo.AdminUser.Id
|
|
2231
|
+ //fmt.Println("创建者ID", creatId)
|
2224
|
2232
|
orgid := adminUserInfo.Org.Id
|
|
2233
|
+ //跟剧机构ID获取创建者ID
|
2225
|
2234
|
fmt.Println("orgid", orgid)
|
2226
|
|
- Username, err := service.GetMyOrgInformationFour(creatId, orgid)
|
|
2235
|
+ OrgId, _ := service.GetCreatByOrgId(orgid)
|
|
2236
|
+ fmt.Println("创建者ID", OrgId.Creator)
|
|
2237
|
+
|
|
2238
|
+ fmt.Println("当前机构ID信息---------------------", orgid)
|
|
2239
|
+ Username, err := service.GetMyOrgInformationFour(OrgId.Creator, orgid)
|
2227
|
2240
|
if err != nil {
|
2228
|
2241
|
this.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeSystemError)
|
2229
|
2242
|
return
|