Rick.Lan 1 settimana fa
parent
commit
32c12f718c

BIN
asserts/01b623a66e1446358a60485ef13d465c.png Vedi File


BIN
asserts/07ebb05a8b9b407ce6d4c228222ba09d.png Vedi File


BIN
asserts/0c92ef13367544aa8b09c740e8537771.png Vedi File


BIN
asserts/38ba571de80b4963f2a88f3990d938ee.png Vedi File


BIN
asserts/515a3860ede84bb58e5259b1d005b851.png Vedi File


BIN
asserts/5eaa5818f95e48e6b108deec9bf8509a.png Vedi File


BIN
asserts/81c07b74ca344565bb4433377e0c31d0.png Vedi File


BIN
asserts/8d0f4592dc6843b1c4fced1989b3fae9.png Vedi File


BIN
asserts/9b136b48800b43e0a5464ef3e3cea624.png Vedi File


BIN
asserts/af31bdb163d749ce83208122422b8b76.png Vedi File


BIN
asserts/ccfa54a9d590428f8f64def281915571.png Vedi File


BIN
asserts/dcac935486e1477d8ec2947b78a7f431.png Vedi File


BIN
asserts/ec27612bb58d43fad6477d1c5bd9de28.png Vedi File


BIN
asserts/fd32831b56854ad18c7a685daa1de2f1.png Vedi File


+ 40 - 1
conf/app.conf Vedi File

@@ -56,4 +56,43 @@ artdbpass = 1Q2W3e4r!@#$
56 56
 artdbname = shengws_test
57 57
 
58 58
 #appid = "wx25576346fbca6905"
59
-#appsecret="f6d53ccb4a529dc4d3bd543a7634b6bd"
59
+#appsecret="f6d53ccb4a529dc4d3bd543a7634b6bd"
60
+
61
+
62
+[prod]
63
+
64
+redishost = kuyicloud.redis.rds.aliyuncs.com
65
+redisport = 6379
66
+redispasswrod = 1Q2W3e4r!@#$
67
+redisdb = 4
68
+
69
+readmysqlhost = kuyicloud2024lt.mysql.rds.aliyuncs.com
70
+readmysqlport = 3306
71
+readmysqluser = syh
72
+readmysqlpass = Zc8xxwN4jkZswprx8VKHRSd2rBMRWgC4
73
+readmysqlname = sws_xcx
74
+
75
+writemysqlhost = kuyicloud2024lt.mysql.rds.aliyuncs.com
76
+writemysqlport = 3306
77
+writemysqluser = syh
78
+writemysqlpass = Zc8xxwN4jkZswprx8VKHRSd2rBMRWgC4
79
+writemysqlname = sws_xcx
80
+
81
+
82
+readuserhost = kuyicloud2024lt.mysql.rds.aliyuncs.com
83
+readuserport = 3306
84
+readuseruser = syh
85
+readuserpass = Zc8xxwN4jkZswprx8VKHRSd2rBMRWgC4
86
+readusername = sgj_users
87
+
88
+readxthost = kuyicloud2024lt.mysql.rds.aliyuncs.com
89
+readxtport = 3306
90
+readxtuser = syh
91
+readxtpass = Zc8xxwN4jkZswprx8VKHRSd2rBMRWgC4
92
+readxtname = sgj_xt
93
+
94
+artdbhost = kuyicloud2024lt.mysql.rds.aliyuncs.com
95
+artdbport = 3306
96
+artdbuser = syh
97
+artdbpass = Zc8xxwN4jkZswprx8VKHRSd2rBMRWgC4
98
+artdbname = shengws

+ 2 - 0
controllers/api_base_controller.go Vedi File

@@ -23,6 +23,7 @@ func ApiControllersRegisterRouters() {
23 23
 	beego.Router("/xcx/api/device/emqmsg", &MessageApiControllor{}, "Post:PutEmqxMessage")
24 24
 
25 25
 	beego.Router("/xcx/api/user/login", &LoginApiController{}, "Post:WxXcxLogin")
26
+	beego.Router("/xcx/api/user/loginbyopenid", &LoginApiController{}, "Post:LoginByOpenId")
26 27
 
27 28
 	beego.Router("/xcx/api/user/updatephonebycode", &UserApiController{}, "Post:UpdatePhoneByCode")
28 29
 
@@ -57,6 +58,7 @@ func ApiControllersRegisterRouters() {
57 58
 	beego.Router("/xcx/api/article/getarticlebyid", &ArticleApiController{}, "Get:GetArticleByID")
58 59
 	beego.Router("/xcx/api/article/getarticlemenu", &ArticleApiController{}, "Get:GetArticleMenu")
59 60
 	beego.Router("/xcx/api/article/getramdonarticlelist", &ArticleApiController{}, "Get:GetRamdonArticleList")
61
+	beego.Router("/xcx/api/article/getcheckitemnews", &ArticleApiController{}, "Get:GetCheckItemNews")
60 62
 
61 63
 }
62 64
 

+ 14 - 0
controllers/article_api_controller.go Vedi File

@@ -32,6 +32,20 @@ func (c *ArticleApiController) GetArticleList() {
32 32
 	c.ServeSuccessPageJSON(arts, toltal)
33 33
 }
34 34
 
35
+// @Title GetCheckItemNews
36
+// @Description 获取检测项目说明
37
+// @Success 200 {array} models.CheckItemNewsVO success
38
+// @Failure 500 error
39
+// @router /getcheckitemnews [get]
40
+func (c *ArticleApiController) GetCheckItemNews() {
41
+	news, err := service.NewCheckItemService().GetCheckItemNews()
42
+	if err != nil {
43
+		c.ServeDynamicFailJsonSend(err.Error())
44
+		return
45
+	}
46
+	c.ServeSuccessJSON(news)
47
+}
48
+
35 49
 // @Title GetArticleByID
36 50
 // @Description 获取文章详情
37 51
 // @Param   id query int true "文章id"

+ 2 - 2
controllers/check_record_api_controller.go Vedi File

@@ -340,8 +340,8 @@ func analyzeCheckRecord(ritems []*models.CheckRecordItem, citems []*models.Check
340 340
 						detail.Alert = true
341 341
 					}
342 342
 					detail.ValueIndex = strconv.Itoa(ri.CheckValueIndex)
343
-					detail.ID = item.Id
344
-					detail.Value = scope.Value
343
+					detail.ID = item.CheckItemNumber
344
+					detail.Value = ri.CheckValue
345 345
 					detail.NameCn = item.NameCn
346 346
 					detail.NameEn = item.NameEn
347 347
 					detail.ReferenceValue = item.ReferenceValue

+ 31 - 1
controllers/login_api_controllor.go Vedi File

@@ -16,7 +16,7 @@ type LoginApiController struct {
16 16
 
17 17
 // @Title WxXcxLogin
18 18
 // @Description 微信小程序登录
19
-// @Param	body	body 	models.WxXcxLoginReq	true  "小程序登录请求参数"
19
+// @Param	body	body 	models.WxXcxLoginReq	true  "小程序登录code"
20 20
 // @Success	200	{object}	models.WxXcxLoginResp
21 21
 // @Failure 500 error
22 22
 // @router /login [post]
@@ -59,3 +59,33 @@ func (c *LoginApiController) WxXcxLogin() {
59 59
 	c.ServeSuccessJSON(models.WxXcxLoginResp{OpenId: u.OpenId, PatientId: u.PatientId, UserOrgId: u.UserOrgId, Token: t})
60 60
 
61 61
 }
62
+
63
+// @Title LoginByOpenId
64
+// @Description 微信小程序登录
65
+// @Param	body	body 	models.WxXcxLoginReq	true  "小程序登录openid"
66
+// @Success	200	{object}	models.WxXcxLoginResp
67
+// @Failure 500 error
68
+// @router /loginbyopenid [post]
69
+func (c *LoginApiController) LoginByOpenId() {
70
+
71
+	dataBody := models.WxXcxLoginReq{}
72
+	if err := json.Unmarshal(c.Ctx.Input.RequestBody, &dataBody); err != nil || dataBody.Code == "" {
73
+
74
+		c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeParamFormatWrong)
75
+		return
76
+	}
77
+
78
+	s := service.NewXcxUserService()
79
+	u, err := s.GetByOpenId(dataBody.Code)
80
+	if err != nil {
81
+		c.ServeDynamicFailJsonSend(err.Error())
82
+		return
83
+	}
84
+	t, err := c.BaseApiController.login(*u)
85
+	if err != nil {
86
+		c.ServeDynamicFailJsonSend(err.Error())
87
+		return
88
+	}
89
+	c.ServeSuccessJSON(models.WxXcxLoginResp{OpenId: u.OpenId, PatientId: u.PatientId, UserOrgId: u.UserOrgId, Token: t})
90
+
91
+}

+ 26 - 1
controllers/user_api_controller.go Vedi File

@@ -113,9 +113,34 @@ func (c *UserApiController) SaveUserInfo() {
113 113
 		return
114 114
 	}
115 115
 
116
+	h, err := service.NewUserHealthProfileService().GetUserHealthProfileByUserId(c.CurrentUser.Id)
117
+	if err != nil {
118
+		c.ServeDynamicFailJsonSend(err.Error())
119
+		return
120
+	}
121
+
122
+	if h != nil && h.InpatientRegPhone != req.InpatientRegPhone && req.InpatientRegPhone != "" {
123
+		if req.VerifyCode == "" {
124
+			c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeVerificationCodeWrong)
125
+			return
126
+		} else {
127
+			redisClient := service.RedisClient()
128
+			defer redisClient.Close()
129
+			cache_code, _ := redisClient.Get("code_msg_" + req.InpatientRegPhone).Result()
130
+			if cache_code != req.VerifyCode {
131
+				c.ServeFailJSONWithSGJErrorCode(enums.ErrorCodeVerificationCodeWrong)
132
+				return
133
+
134
+			} else {
135
+				// 验证成功后验证码就要使其失效
136
+				redisClient.Del("code_msg_" + req.InpatientRegPhone)
137
+			}
138
+		}
139
+	}
140
+
116 141
 	p, err1 := service.NewXcxUserService().GetMobilePatientInfo(req.InpatientRegPhone, req.RealName, req.IdCard)
117 142
 
118
-	err := c.updateCurrentUser(func(u *models.XcxUser) {
143
+	err = c.updateCurrentUser(func(u *models.XcxUser) {
119 144
 		u.Avatar = req.Avatar
120 145
 		u.Email = req.Email
121 146
 		u.NickName = req.NickName

+ 32 - 4
models/dbmodels.go Vedi File

@@ -90,6 +90,7 @@ type Device struct {
90 90
 	Ctime                time.Time `json:"ctime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP; COMMENT:'创建时间'" description:"创建时间"`
91 91
 	Mtime                time.Time `json:"mtime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; COMMENT:'更新时间 '" description:"更新时间 "`
92 92
 	DeleteFlag           int       `json:"delete_flag" gorm:"type:int(11); DEFAULT:'0'; COMMENT:'删除标志'" description:"删除标志"`
93
+	OrgID                int64     `json:"org_id" gorm:"type:bigint(20); NOT NULL; default:0; COMMENT:'所属机构'" description:"所属机构"`
93 94
 }
94 95
 
95 96
 func (Device) TableName() string {
@@ -120,6 +121,7 @@ type DeviceRelate struct {
120 121
 	Ctime      time.Time `json:"ctime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP; COMMENT:'创建时间'" description:"创建时间"`
121 122
 	Mtime      time.Time `json:"mtime" gorm:"type:datetime; DEFAULT: CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; COMMENT:'更新时间 '" description:"更新时间 "`
122 123
 	DeleteFlag int       `json:"delete_flag" gorm:"type:int(11); DEFAULT:'0'; COMMENT:'删除标志(解绑时标记为删除)'" description:"删除标志(解绑时标记为删除)"`
124
+	OrgID      int64     `json:"org_id" gorm:"type:bigint(20); NOT NULL; default:0; COMMENT:'所属机构'" description:"所属机构"`
123 125
 }
124 126
 
125 127
 func (DeviceRelate) TableName() string {
@@ -149,18 +151,18 @@ type UserHealthProfile struct {
149 151
 	InpatientRegPhone   string    `json:"inpatient_reg_phone" gorm:"type:varchar(32); COMMENT:'住院登记手机号'" description:"住院登记手机号"`
150 152
 	Gender              int       `json:"gender" gorm:"type:int(11); DEFAULT:'0'; COMMENT:'性别(0:未知 1:男 2:女)'" description:"性别(0:未知 1:男 2:女)"`
151 153
 	Height              int       `json:"height" gorm:"type:int(11); COMMENT:'身高'" description:"身高"`
152
-	Weight              int       `json:"weight" gorm:"type:int(11); COMMENT:'体重'" description:"体重"`
154
+	Weight              float64   `json:"weight" gorm:"COMMENT:'体重'" description:"体重"`
153 155
 	BloodType           string    `json:"blood_type" gorm:"type:varchar(32); COMMENT:'血型'" description:"血型"`
154 156
 	Birthday            time.Time `json:"birthday" gorm:"type:datetime; COMMENT:'生日'" description:"生日"`
155 157
 	IllnessState        string    `json:"illness_state" gorm:"type:varchar(255); COMMENT:'病情'" description:"病情"`
156 158
 	RenalFunctionStatus int       `json:"renal_function_status" gorm:"type:int(11); COMMENT:'肾功能情况(0:未透析,1: 血液透析,2:腹膜透析,3:肾脏移植)'" description:"肾功能情况(0:未透析,1: 血液透析,2:腹膜透析,3:肾脏移植)"`
157
-	Creatinine          int       `json:"creatinine" gorm:"type:int(11); NOT NULL; DEFAULT:'0'; COMMENT:'血肌酐'" description:"血肌酐"`
159
+	Creatinine          float64   `json:"creatinine" gorm:"DEFAULT:'0'; COMMENT:'血肌酐'" description:"血肌酐"`
158 160
 	CreatinineUnit      string    `json:"creatinine_unit" gorm:"type:varchar(32); COMMENT:'肌酐单位(umol/L,mg/dl)'" description:"肌酐单位(umol/L,mg/dl)"`
159 161
 	CreatineTime        time.Time `json:"creatine_time" gorm:"type:datetime; COMMENT:'肌酐检测时间'" description:"肌酐检测时间"`
160 162
 	UrineProtein24hUnit string    `json:"urine_protein_24h_unit" gorm:"column:urine_protein_24h_unit; type:varchar(32); COMMENT:'24小时尿蛋白单位(g/24h,mg/24h)'" description:"24小时尿蛋白单位(g/24h,mg/24h)"`
161
-	UrineProtein24h     int       `json:"urine_protein_24h" gorm:"column:urine_protein_24h;type:int(11); NOT NULL; DEFAULT:'0'; COMMENT:'24小时尿蛋白'" description:"24小时尿蛋白"`
163
+	UrineProtein24h     float64   `json:"urine_protein_24h" gorm:"column:urine_protein_24h;NOT NULL; DEFAULT:'0'; COMMENT:'24小时尿蛋白'" description:"24小时尿蛋白"`
162 164
 	UrineProtein24hTime time.Time `json:"urine_protein_24h_time" gorm:"column:urine_protein_24h_time;type:datetime; COMMENT:'24小时尿蛋白检测时间'" description:"24小时尿蛋白检测时间"`
163
-	UrineProtein        int       `json:"urine_protein" gorm:"type:int(11); NOT NULL; DEFAULT:'0'; COMMENT:'尿蛋白'" description:"尿蛋白"`
165
+	UrineProtein        float64   `json:"urine_protein" gorm:" NOT NULL; DEFAULT:'0'; COMMENT:'尿蛋白'" description:"尿蛋白"`
164 166
 	UrineProteinUnit    string    `json:"urine_protein_unit" gorm:"column:urine_protein_unit; type:varchar(32); COMMENT:'尿蛋白单位(g,mg)'" description:"尿蛋白单位(g,mg)"`
165 167
 	UrineProteinTime    time.Time `json:"urine_protein_time" gorm:"column:urine_protein_time;type:datetime; COMMENT:'尿蛋白检测时间'" description:"尿蛋白检测时间"`
166 168
 	Status              int       `json:"status" gorm:"type:int(11); DEFAULT:'1'; COMMENT:'状态(1:有效 0:无效 )'" description:"状态(1:有效 0:无效 )"`
@@ -354,3 +356,29 @@ type SyhArticlesComment struct {
354 356
 	CommentNum uint      `json:"comment_num" gorm:"column:comment_num; type:int(10) unsigned; not null; default:'0'; comment:'评论数'" description:"评论数"`
355 357
 	CommentID  uint      `json:"comment_id" gorm:"column:comment_id; type:int(10) unsigned; not null; default:'0'; comment:'在评论详情页面时用'" description:"评论ID"`
356 358
 }
359
+
360
+// CheckItemNews 表示新闻条目的结构体
361
+type CheckItemNews struct {
362
+	ID              int64     `gorm:"column:id;primary_key;auto_increment:false" json:"id" description:"主键,唯一标识每条记录"`
363
+	AuthorID        int64     `gorm:"column:author_id" json:"author_id" description:"新闻作者的ID"`
364
+	Title           string    `gorm:"column:title" json:"title" description:"新闻标题"`
365
+	Introduction    string    `gorm:"column:introduction" json:"introduction" description:"新闻简介或摘要"`
366
+	Tags            string    `gorm:"column:tags" json:"tags" description:"新闻标签,用以分类或检索"`
367
+	ReadingQuantity int       `gorm:"column:reading_quantity" json:"reading_quantity" description:"阅读量"`
368
+	ContentImages   string    `gorm:"column:content_images" json:"content_images" description:"存储新闻内容中的图片路径,可能为逗号分隔的字符串或JSON格式"`
369
+	CommentCount    int       `gorm:"column:comment_count" json:"comment_count" description:"评论数"`
370
+	LikeCount       int       `gorm:"column:like_count" json:"like_count" description:"点赞数"`
371
+	CollectCount    int       `gorm:"column:collect_count" json:"collect_count" description:"收藏数"`
372
+	Content         string    `gorm:"column:content" json:"content" description:"新闻正文内容"`
373
+	Status          int       `gorm:"column:status" json:"status" description:"新闻状态(例如,草稿、已发布等)"`
374
+	DeleteFlag      int       `gorm:"column:delete_flag" json:"delete_flag" description:"删除标记,0表示未删除,1表示已删除"`
375
+	StyleType       int       `gorm:"column:style_type" json:"style_type" description:"显示样式类型,可能用于控制前端展示效果"`
376
+	SortInTag       string    `gorm:"column:sort_in_tag" json:"sort_in_tag" description:"在特定标签内的排序规则"`
377
+	UpdateTime      time.Time `gorm:"column:update_time;default:CURRENT_TIMESTAMP;on_update:CURRENT_TIMESTAMP" json:"update_time" description:"记录最后更新的时间,自动更新"`
378
+	CreateTime      time.Time `gorm:"column:create_time;default:CURRENT_TIMESTAMP" json:"create_time" description:"创建时间"`
379
+}
380
+
381
+// TableName 返回表名
382
+func (CheckItemNews) TableName() string {
383
+	return "check_item_news"
384
+}

+ 57 - 35
models/httpmodels.go Vedi File

@@ -53,6 +53,8 @@ type SaveUserInfoReq struct {
53 53
 	RealName          string `json:"real_name" description:"真实姓名"`
54 54
 	IdCard            string `json:"id_card" description:"身份证号"`
55 55
 	InpatientRegPhone string `json:"inpatient_reg_phone" description:"住院登记手机号"`
56
+
57
+	VerifyCode string `json:"verify_code" description:"手机验证码"`
56 58
 }
57 59
 
58 60
 type UserInfoResp struct {
@@ -82,22 +84,22 @@ type UserInfoResp struct {
82 84
 }
83 85
 
84 86
 type SaveHealthProfileReq struct {
85
-	Gender              int    `json:"gender" description:"性别(0:未知 1:男 2:女)"`
86
-	Height              int    `json:"height" description:"身高"`
87
-	Weight              int    `json:"weight" description:"体重"`
88
-	BloodType           string `json:"blood_type" description:"血型"`
89
-	Birthday            string `json:"birthday" description:"生日 yyyy-MM-dd HH:mm:ss"`
90
-	IllnessState        string `json:"illness_state" description:"病情"`
91
-	RenalFunctionStatus int    `json:"renal_function_status" description:"肾功能情况(0:未透析,1: 血液透析,2:腹膜透析,3:肾脏移植)"`
92
-	Creatinine          int    `json:"creatinine" description:"血肌酐"`
93
-	CreatinineUnit      string `json:"creatinine_unit" description:"肌酐单位(umol/L,mg/dl)"`
94
-	CreatineTime        string `json:"creatine_time" description:"肌酐检测时间 yyyy-MM-dd HH:mm:ss"`
95
-	UrineProtein24hUnit string `json:"urine_protein_24h_unit" description:"24小时尿蛋白单位(g/24h,mg/24h)"`
96
-	UrineProtein24h     int    `json:"urine_protein_24h" description:"24小时尿蛋白"`
97
-	UrineProtein24hTime string `json:"urine_protein_24h_time" description:"24小时尿蛋白检测时间 yyyy-MM-dd HH:mm:ss"`
98
-	UrineProtein        int    `json:"urine_protein" description:"尿蛋白"`
99
-	UrineProteinUnit    string `json:"urine_protein_unit" description:"尿蛋白单位(g,mg)"`
100
-	UrineProteinTime    string `json:"urine_protein_time" description:"尿蛋白检测时间 yyyy-MM-dd HH:mm:ss"`
87
+	Gender              int     `json:"gender" description:"性别(0:未知 1:男 2:女)"`
88
+	Height              int     `json:"height" description:"身高"`
89
+	Weight              float64 `json:"weight" description:"体重"`
90
+	BloodType           string  `json:"blood_type" description:"血型"`
91
+	Birthday            string  `json:"birthday" description:"生日 yyyy-MM-dd HH:mm:ss"`
92
+	IllnessState        string  `json:"illness_state" description:"病情"`
93
+	RenalFunctionStatus int     `json:"renal_function_status" description:"肾功能情况(0:未透析,1: 血液透析,2:腹膜透析,3:肾脏移植)"`
94
+	Creatinine          float64 `json:"creatinine" description:"血肌酐"`
95
+	CreatinineUnit      string  `json:"creatinine_unit" description:"肌酐单位(umol/L,mg/dl)"`
96
+	CreatineTime        string  `json:"creatine_time" description:"肌酐检测时间 yyyy-MM-dd HH:mm:ss"`
97
+	UrineProtein24hUnit string  `json:"urine_protein_24h_unit" description:"24小时尿蛋白单位(g/24h,mg/24h)"`
98
+	UrineProtein24h     float64 `json:"urine_protein_24h" description:"24小时尿蛋白"`
99
+	UrineProtein24hTime string  `json:"urine_protein_24h_time" description:"24小时尿蛋白检测时间 yyyy-MM-dd HH:mm:ss"`
100
+	UrineProtein        float64 `json:"urine_protein" description:"尿蛋白"`
101
+	UrineProteinUnit    string  `json:"urine_protein_unit" description:"尿蛋白单位(g,mg)"`
102
+	UrineProteinTime    string  `json:"urine_protein_time" description:"尿蛋白检测时间 yyyy-MM-dd HH:mm:ss"`
101 103
 }
102 104
 
103 105
 type HealthProfileResp struct {
@@ -106,25 +108,25 @@ type HealthProfileResp struct {
106 108
 	//RealName            string    `json:"real_name" description:"真实姓名"`
107 109
 	//IdCard              string    `json:"id_card" description:"身份证号"`
108 110
 	//InpatientRegPhone   string    `json:"inpatient_reg_phone" description:"住院登记手机号"`
109
-	Gender              int    `json:"gender" description:"性别(0:未知 1:男 2:女)"`
110
-	Height              int    `json:"height" description:"身高"`
111
-	Weight              int    `json:"weight" description:"体重"`
112
-	BloodType           string `json:"blood_type" description:"血型"`
113
-	Birthday            Time   `json:"birthday" description:"生日"`
114
-	IllnessState        string `json:"illness_state" description:"病情"`
115
-	RenalFunctionStatus int    `json:"renal_function_status" description:"肾功能情况(0:未透析,1: 血液透析,2:腹膜透析,3:肾脏移植)"`
116
-	Creatinine          int    `json:"creatinine" description:"血肌酐"`
117
-	CreatinineUnit      string `json:"creatinine_unit" description:"肌酐单位(umol/L,mg/dl)"`
118
-	CreatineTime        Time   `json:"creatine_time" description:"肌酐检测时间"`
119
-	UrineProtein24hUnit string `json:"urine_protein_24h_unit" description:"24小时尿蛋白单位(g/24h,mg/24h)"`
120
-	UrineProtein24h     int    `json:"urine_protein_24h" description:"24小时尿蛋白"`
121
-	UrineProtein24hTime Time   `json:"urine_protein_24h_time" description:"24小时尿蛋白检测时间"`
122
-	UrineProtein        int    `json:"urine_protein" description:"尿蛋白"`
123
-	UrineProteinUnit    string `json:"urine_protein_unit" description:"尿蛋白单位(g,mg)"`
124
-	UrineProteinTime    Time   `json:"urine_protein_time" description:"尿蛋白检测时间"`
125
-	Status              int    `json:"status" description:"状态(1:有效 0:无效 )"`
126
-	Ctime               Time   `json:"ctime" description:"创建时间"`
127
-	Mtime               Time   `json:"mtime" description:"更新时间 "`
111
+	Gender              int     `json:"gender" description:"性别(0:未知 1:男 2:女)"`
112
+	Height              int     `json:"height" description:"身高"`
113
+	Weight              float64 `json:"weight" description:"体重"`
114
+	BloodType           string  `json:"blood_type" description:"血型"`
115
+	Birthday            Time    `json:"birthday" description:"生日"`
116
+	IllnessState        string  `json:"illness_state" description:"病情"`
117
+	RenalFunctionStatus int     `json:"renal_function_status" description:"肾功能情况(0:未透析,1: 血液透析,2:腹膜透析,3:肾脏移植)"`
118
+	Creatinine          float64 `json:"creatinine" description:"血肌酐"`
119
+	CreatinineUnit      string  `json:"creatinine_unit" description:"肌酐单位(umol/L,mg/dl)"`
120
+	CreatineTime        Time    `json:"creatine_time" description:"肌酐检测时间"`
121
+	UrineProtein24hUnit string  `json:"urine_protein_24h_unit" description:"24小时尿蛋白单位(g/24h,mg/24h)"`
122
+	UrineProtein24h     float64 `json:"urine_protein_24h" description:"24小时尿蛋白"`
123
+	UrineProtein24hTime Time    `json:"urine_protein_24h_time" description:"24小时尿蛋白检测时间"`
124
+	UrineProtein        float64 `json:"urine_protein" description:"尿蛋白"`
125
+	UrineProteinUnit    string  `json:"urine_protein_unit" description:"尿蛋白单位(g,mg)"`
126
+	UrineProteinTime    Time    `json:"urine_protein_time" description:"尿蛋白检测时间"`
127
+	Status              int     `json:"status" description:"状态(1:有效 0:无效 )"`
128
+	Ctime               Time    `json:"ctime" description:"创建时间"`
129
+	Mtime               Time    `json:"mtime" description:"更新时间 "`
128 130
 }
129 131
 
130 132
 type DicResp struct {
@@ -273,3 +275,23 @@ type SyhArticlesCommentVO struct {
273 275
 	CommentNum uint   `json:"comment_num" gorm:"column:comment_num; type:int(10) unsigned; not null; default:'0'; comment:'评论数'" description:"评论数"`
274 276
 	CommentID  uint   `json:"comment_id" gorm:"column:comment_id; type:int(10) unsigned; not null; default:'0'; comment:'在评论详情页面时用'" description:"评论ID"`
275 277
 }
278
+
279
+type CheckItemNewsVO struct {
280
+	ID              int64  `gorm:"column:id;primary_key;auto_increment:false" json:"id" description:"主键,唯一标识每条记录"`
281
+	AuthorID        int64  `gorm:"column:author_id" json:"author_id" description:"新闻作者的ID"`
282
+	Title           string `gorm:"column:title" json:"title" description:"新闻标题"`
283
+	Introduction    string `gorm:"column:introduction" json:"introduction" description:"新闻简介或摘要"`
284
+	Tags            string `gorm:"column:tags" json:"tags" description:"新闻标签,用以分类或检索"`
285
+	ReadingQuantity int    `gorm:"column:reading_quantity" json:"reading_quantity" description:"阅读量"`
286
+	ContentImages   string `gorm:"column:content_images" json:"content_images" description:"存储新闻内容中的图片路径,可能为逗号分隔的字符串或JSON格式"`
287
+	CommentCount    int    `gorm:"column:comment_count" json:"comment_count" description:"评论数"`
288
+	LikeCount       int    `gorm:"column:like_count" json:"like_count" description:"点赞数"`
289
+	CollectCount    int    `gorm:"column:collect_count" json:"collect_count" description:"收藏数"`
290
+	Content         string `gorm:"column:content" json:"content" description:"新闻正文内容"`
291
+	Status          int    `gorm:"column:status" json:"status" description:"新闻状态(例如,草稿、已发布等)"`
292
+	DeleteFlag      int    `gorm:"column:delete_flag" json:"delete_flag" description:"删除标记,0表示未删除,1表示已删除"`
293
+	StyleType       int    `gorm:"column:style_type" json:"style_type" description:"显示样式类型,可能用于控制前端展示效果"`
294
+	SortInTag       string `gorm:"column:sort_in_tag" json:"sort_in_tag" description:"在特定标签内的排序规则"`
295
+	UpdateTime      Time   `gorm:"column:update_time;default:CURRENT_TIMESTAMP;on_update:CURRENT_TIMESTAMP" json:"update_time" description:"记录最后更新的时间,自动更新"`
296
+	CreateTime      Time   `gorm:"column:create_time;default:CURRENT_TIMESTAMP" json:"create_time" description:"创建时间"`
297
+}

+ 6 - 0
service/checkitemservice.go Vedi File

@@ -44,3 +44,9 @@ func (s *CheckItemService) GetCheckItemByNumber(number int, lang, deviceType str
44 44
 	}
45 45
 	return
46 46
 }
47
+
48
+func (s *CheckItemService) GetCheckItemNews() (items []*models.CheckItemNewsVO, err error) {
49
+
50
+	err = s.rdb.Model(&models.CheckItemNews{}).Where("delete_flag = ?", 0).Order("sort_in_tag asc").Limit(50).Scan(&items).Error
51
+	return
52
+}

+ 14 - 13
service/checkrecordservice.go Vedi File

@@ -45,7 +45,7 @@ func (s *CheckRecordService) GetCheckRecordList(pageNum, pageSize int, userid ui
45 45
 		}
46 46
 		mcn := make(map[int]models.CheckItem, len(cnItems))
47 47
 		for _, item := range cnItems {
48
-			mcn[item.Id] = *item
48
+			mcn[item.CheckItemNumber] = *item
49 49
 		}
50 50
 
51 51
 		vos = make([]models.AppCheckRecordVO, len(records))
@@ -66,8 +66,8 @@ func (s *CheckRecordService) GetCheckRecordList(pageNum, pageSize int, userid ui
66 66
 				names := make([]string, len(ids))
67 67
 				for j, id := range ids {
68 68
 
69
-					ii, _ := strconv.Atoi(id)
70
-					if item, ok := mcn[ii]; ok {
69
+					n, _ := strconv.Atoi(id)
70
+					if item, ok := mcn[n]; ok {
71 71
 						names[j] = item.NameCn
72 72
 					}
73 73
 
@@ -98,7 +98,7 @@ func (s *CheckRecordService) GetCheckRecordItemReport(dataNum, itemNum int, user
98 98
 
99 99
 	var items []*models.CheckRecordItem
100 100
 
101
-	err = s.rdb.Raw("select i.* from  check_record_item as i inner join check_record as c on i.check_id=c.id where i.check_item_id = ? and c.user_id = ? and c.delete_flag=0", item.Id, userid).Order("id desc").Limit(dataNum).Scan(&items).Error
101
+	err = s.rdb.Raw("select i.* from  check_record_item as i inner join check_record as c on i.check_id=c.id where i.check_item_id = ? and c.user_id = ? and c.delete_flag=0", item.CheckItemNumber, userid).Order("id desc").Limit(dataNum).Scan(&items).Error
102 102
 
103 103
 	if len(items) > 0 {
104 104
 		var scopes []*models.CheckItemScopeVO
@@ -110,15 +110,16 @@ func (s *CheckRecordService) GetCheckRecordItemReport(dataNum, itemNum int, user
110 110
 			report.CheckValueIndex = ci.CheckValueIndex
111 111
 			report.Unit = item.Unit
112 112
 			report.Date = models.Time(ci.Ctime)
113
-			for _, scope := range scopes {
114
-				if scope.Index == ci.CheckValueIndex {
115
-					if scope.Num != "" {
116
-						report.Value = scope.Num
117
-					} else {
118
-						report.Value = scope.Value
119
-					}
120
-				}
121
-			}
113
+			report.Value = ci.CheckValue
114
+			// for _, scope := range scopes {
115
+			// 	if scope.Index == ci.CheckValueIndex {
116
+			// 		if scope.Num != "" {
117
+			// 			report.Value = scope.Num
118
+			// 		} else {
119
+			// 			report.Value = scope.Value
120
+			// 		}
121
+			// 	}
122
+			// }
122 123
 			reports[i] = &report
123 124
 		}
124 125
 	}

+ 9 - 0
service/userservice.go Vedi File

@@ -39,6 +39,15 @@ func (s *XcxUserService) GetOrCreate(openId string, unionId string) (*models.Xcx
39 39
 
40 40
 }
41 41
 
42
+func (s *XcxUserService) GetByOpenId(openId string) (*models.XcxUser, error) {
43
+
44
+	user := &models.XcxUser{}
45
+	db := writeDb.Where("open_id = ?", openId)
46
+	db.First(user)
47
+	return user, db.Error
48
+
49
+}
50
+
42 51
 func (s *XcxUserService) UpdateUser(user *models.XcxUser) error {
43 52
 
44 53
 	user.Mtime = time.Now()

+ 163 - 17
swagger/swagger.json Vedi File

@@ -128,6 +128,29 @@
128 128
                 }
129 129
             }
130 130
         },
131
+        "/api/article/getcheckitemnews": {
132
+            "get": {
133
+                "tags": [
134
+                    "api/article"
135
+                ],
136
+                "description": "获取检测项目说明\n\u003cbr\u003e",
137
+                "operationId": "ArticleApiController.GetCheckItemNews",
138
+                "responses": {
139
+                    "200": {
140
+                        "description": "success",
141
+                        "schema": {
142
+                            "type": "array",
143
+                            "items": {
144
+                                "$ref": "#/definitions/models.CheckItemNewsVO"
145
+                            }
146
+                        }
147
+                    },
148
+                    "500": {
149
+                        "description": "error"
150
+                    }
151
+                }
152
+            }
153
+        },
131 154
         "/api/article/getramdonarticlelist": {
132 155
             "get": {
133 156
                 "tags": [
@@ -633,7 +656,38 @@
633 656
                     {
634 657
                         "in": "body",
635 658
                         "name": "body",
636
-                        "description": "小程序登录请求参数",
659
+                        "description": "小程序登录code",
660
+                        "required": true,
661
+                        "schema": {
662
+                            "$ref": "#/definitions/models.WxXcxLoginReq"
663
+                        }
664
+                    }
665
+                ],
666
+                "responses": {
667
+                    "200": {
668
+                        "description": "",
669
+                        "schema": {
670
+                            "$ref": "#/definitions/models.WxXcxLoginResp"
671
+                        }
672
+                    },
673
+                    "500": {
674
+                        "description": "error"
675
+                    }
676
+                }
677
+            }
678
+        },
679
+        "/api/user/loginbyopenid": {
680
+            "post": {
681
+                "tags": [
682
+                    "api/user"
683
+                ],
684
+                "description": "微信小程序登录\n\u003cbr\u003e",
685
+                "operationId": "LoginApiController.LoginByOpenId",
686
+                "parameters": [
687
+                    {
688
+                        "in": "body",
689
+                        "name": "body",
690
+                        "description": "小程序登录openid",
637 691
                         "required": true,
638 692
                         "schema": {
639 693
                             "$ref": "#/definitions/models.WxXcxLoginReq"
@@ -1020,6 +1074,89 @@
1020 1074
                 }
1021 1075
             }
1022 1076
         },
1077
+        "models.CheckItemNewsVO": {
1078
+            "title": "CheckItemNewsVO",
1079
+            "type": "object",
1080
+            "properties": {
1081
+                "author_id": {
1082
+                    "description": "新闻作者的ID",
1083
+                    "type": "integer",
1084
+                    "format": "int64"
1085
+                },
1086
+                "collect_count": {
1087
+                    "description": "收藏数",
1088
+                    "type": "integer",
1089
+                    "format": "int64"
1090
+                },
1091
+                "comment_count": {
1092
+                    "description": "评论数",
1093
+                    "type": "integer",
1094
+                    "format": "int64"
1095
+                },
1096
+                "content": {
1097
+                    "description": "新闻正文内容",
1098
+                    "type": "string"
1099
+                },
1100
+                "content_images": {
1101
+                    "description": "存储新闻内容中的图片路径,可能为逗号分隔的字符串或JSON格式",
1102
+                    "type": "string"
1103
+                },
1104
+                "create_time": {
1105
+                    "$ref": "#/definitions/models.Time",
1106
+                    "description": "创建时间"
1107
+                },
1108
+                "delete_flag": {
1109
+                    "description": "删除标记,0表示未删除,1表示已删除",
1110
+                    "type": "integer",
1111
+                    "format": "int64"
1112
+                },
1113
+                "id": {
1114
+                    "description": "主键,唯一标识每条记录",
1115
+                    "type": "integer",
1116
+                    "format": "int64"
1117
+                },
1118
+                "introduction": {
1119
+                    "description": "新闻简介或摘要",
1120
+                    "type": "string"
1121
+                },
1122
+                "like_count": {
1123
+                    "description": "点赞数",
1124
+                    "type": "integer",
1125
+                    "format": "int64"
1126
+                },
1127
+                "reading_quantity": {
1128
+                    "description": "阅读量",
1129
+                    "type": "integer",
1130
+                    "format": "int64"
1131
+                },
1132
+                "sort_in_tag": {
1133
+                    "description": "在特定标签内的排序规则",
1134
+                    "type": "string"
1135
+                },
1136
+                "status": {
1137
+                    "description": "新闻状态(例如,草稿、已发布等)",
1138
+                    "type": "integer",
1139
+                    "format": "int64"
1140
+                },
1141
+                "style_type": {
1142
+                    "description": "显示样式类型,可能用于控制前端展示效果",
1143
+                    "type": "integer",
1144
+                    "format": "int64"
1145
+                },
1146
+                "tags": {
1147
+                    "description": "新闻标签,用以分类或检索",
1148
+                    "type": "string"
1149
+                },
1150
+                "title": {
1151
+                    "description": "新闻标题",
1152
+                    "type": "string"
1153
+                },
1154
+                "update_time": {
1155
+                    "$ref": "#/definitions/models.Time",
1156
+                    "description": "记录最后更新的时间,自动更新"
1157
+                }
1158
+            }
1159
+        },
1023 1160
         "models.CheckItemScopeVO": {
1024 1161
             "title": "CheckItemScopeVO",
1025 1162
             "type": "object",
@@ -1114,6 +1251,11 @@
1114 1251
                     "type": "integer",
1115 1252
                     "format": "int64"
1116 1253
                 },
1254
+                "org_id": {
1255
+                    "description": "所属机构",
1256
+                    "type": "integer",
1257
+                    "format": "int64"
1258
+                },
1117 1259
                 "paper_check": {
1118 1260
                     "description": "试纸检查状态",
1119 1261
                     "type": "integer",
@@ -1190,8 +1332,8 @@
1190 1332
                 },
1191 1333
                 "creatinine": {
1192 1334
                     "description": "血肌酐",
1193
-                    "type": "integer",
1194
-                    "format": "int64"
1335
+                    "type": "number",
1336
+                    "format": "double"
1195 1337
                 },
1196 1338
                 "creatinine_unit": {
1197 1339
                     "description": "肌酐单位(umol/L,mg/dl)",
@@ -1236,13 +1378,13 @@
1236 1378
                 },
1237 1379
                 "urine_protein": {
1238 1380
                     "description": "尿蛋白",
1239
-                    "type": "integer",
1240
-                    "format": "int64"
1381
+                    "type": "number",
1382
+                    "format": "double"
1241 1383
                 },
1242 1384
                 "urine_protein_24h": {
1243 1385
                     "description": "24小时尿蛋白",
1244
-                    "type": "integer",
1245
-                    "format": "int64"
1386
+                    "type": "number",
1387
+                    "format": "double"
1246 1388
                 },
1247 1389
                 "urine_protein_24h_time": {
1248 1390
                     "$ref": "#/definitions/models.Time",
@@ -1262,8 +1404,8 @@
1262 1404
                 },
1263 1405
                 "weight": {
1264 1406
                     "description": "体重",
1265
-                    "type": "integer",
1266
-                    "format": "int64"
1407
+                    "type": "number",
1408
+                    "format": "double"
1267 1409
                 }
1268 1410
             }
1269 1411
         },
@@ -1285,8 +1427,8 @@
1285 1427
                 },
1286 1428
                 "creatinine": {
1287 1429
                     "description": "血肌酐",
1288
-                    "type": "integer",
1289
-                    "format": "int64"
1430
+                    "type": "number",
1431
+                    "format": "double"
1290 1432
                 },
1291 1433
                 "creatinine_unit": {
1292 1434
                     "description": "肌酐单位(umol/L,mg/dl)",
@@ -1313,13 +1455,13 @@
1313 1455
                 },
1314 1456
                 "urine_protein": {
1315 1457
                     "description": "尿蛋白",
1316
-                    "type": "integer",
1317
-                    "format": "int64"
1458
+                    "type": "number",
1459
+                    "format": "double"
1318 1460
                 },
1319 1461
                 "urine_protein_24h": {
1320 1462
                     "description": "24小时尿蛋白",
1321
-                    "type": "integer",
1322
-                    "format": "int64"
1463
+                    "type": "number",
1464
+                    "format": "double"
1323 1465
                 },
1324 1466
                 "urine_protein_24h_time": {
1325 1467
                     "description": "24小时尿蛋白检测时间 yyyy-MM-dd HH:mm:ss",
@@ -1339,8 +1481,8 @@
1339 1481
                 },
1340 1482
                 "weight": {
1341 1483
                     "description": "体重",
1342
-                    "type": "integer",
1343
-                    "format": "int64"
1484
+                    "type": "number",
1485
+                    "format": "double"
1344 1486
                 }
1345 1487
             }
1346 1488
         },
@@ -1375,6 +1517,10 @@
1375 1517
                 "real_name": {
1376 1518
                     "description": "真实姓名",
1377 1519
                     "type": "string"
1520
+                },
1521
+                "verify_code": {
1522
+                    "description": "手机验证码",
1523
+                    "type": "string"
1378 1524
                 }
1379 1525
             }
1380 1526
         },

+ 127 - 17
swagger/swagger.yml Vedi File

@@ -93,6 +93,23 @@ paths:
93 93
               $ref: '#/definitions/models.SyhArticlesMenu'
94 94
         "500":
95 95
           description: error
96
+  /api/article/getcheckitemnews:
97
+    get:
98
+      tags:
99
+      - api/article
100
+      description: |-
101
+        获取检测项目说明
102
+        <br>
103
+      operationId: ArticleApiController.GetCheckItemNews
104
+      responses:
105
+        "200":
106
+          description: success
107
+          schema:
108
+            type: array
109
+            items:
110
+              $ref: '#/definitions/models.CheckItemNewsVO'
111
+        "500":
112
+          description: error
96 113
   /api/article/getramdonarticlelist:
97 114
     get:
98 115
       tags:
@@ -449,7 +466,29 @@ paths:
449 466
       parameters:
450 467
       - in: body
451 468
         name: body
452
-        description: 小程序登录请求参数
469
+        description: 小程序登录code
470
+        required: true
471
+        schema:
472
+          $ref: '#/definitions/models.WxXcxLoginReq'
473
+      responses:
474
+        "200":
475
+          description: ""
476
+          schema:
477
+            $ref: '#/definitions/models.WxXcxLoginResp'
478
+        "500":
479
+          description: error
480
+  /api/user/loginbyopenid:
481
+    post:
482
+      tags:
483
+      - api/user
484
+      description: |-
485
+        微信小程序登录
486
+        <br>
487
+      operationId: LoginApiController.LoginByOpenId
488
+      parameters:
489
+      - in: body
490
+        name: body
491
+        description: 小程序登录openid
453 492
         required: true
454 493
         schema:
455 494
           $ref: '#/definitions/models.WxXcxLoginReq'
@@ -728,6 +767,70 @@ definitions:
728 767
       unit:
729 768
         description: 单位
730 769
         type: string
770
+  models.CheckItemNewsVO:
771
+    title: CheckItemNewsVO
772
+    type: object
773
+    properties:
774
+      author_id:
775
+        description: 新闻作者的ID
776
+        type: integer
777
+        format: int64
778
+      collect_count:
779
+        description: 收藏数
780
+        type: integer
781
+        format: int64
782
+      comment_count:
783
+        description: 评论数
784
+        type: integer
785
+        format: int64
786
+      content:
787
+        description: 新闻正文内容
788
+        type: string
789
+      content_images:
790
+        description: 存储新闻内容中的图片路径,可能为逗号分隔的字符串或JSON格式
791
+        type: string
792
+      create_time:
793
+        $ref: '#/definitions/models.Time'
794
+        description: 创建时间
795
+      delete_flag:
796
+        description: 删除标记,0表示未删除,1表示已删除
797
+        type: integer
798
+        format: int64
799
+      id:
800
+        description: 主键,唯一标识每条记录
801
+        type: integer
802
+        format: int64
803
+      introduction:
804
+        description: 新闻简介或摘要
805
+        type: string
806
+      like_count:
807
+        description: 点赞数
808
+        type: integer
809
+        format: int64
810
+      reading_quantity:
811
+        description: 阅读量
812
+        type: integer
813
+        format: int64
814
+      sort_in_tag:
815
+        description: 在特定标签内的排序规则
816
+        type: string
817
+      status:
818
+        description: 新闻状态(例如,草稿、已发布等)
819
+        type: integer
820
+        format: int64
821
+      style_type:
822
+        description: 显示样式类型,可能用于控制前端展示效果
823
+        type: integer
824
+        format: int64
825
+      tags:
826
+        description: 新闻标签,用以分类或检索
827
+        type: string
828
+      title:
829
+        description: 新闻标题
830
+        type: string
831
+      update_time:
832
+        $ref: '#/definitions/models.Time'
833
+        description: 记录最后更新的时间,自动更新
731 834
   models.CheckItemScopeVO:
732 835
     title: CheckItemScopeVO
733 836
     type: object
@@ -800,6 +903,10 @@ definitions:
800 903
         description: 厂商(0:自营  1:艾玛OEM)
801 904
         type: integer
802 905
         format: int64
906
+      org_id:
907
+        description: 所属机构
908
+        type: integer
909
+        format: int64
803 910
       paper_check:
804 911
         description: 试纸检查状态
805 912
         type: integer
@@ -857,8 +964,8 @@ definitions:
857 964
         description: 肌酐检测时间
858 965
       creatinine:
859 966
         description: 血肌酐
860
-        type: integer
861
-        format: int64
967
+        type: number
968
+        format: double
862 969
       creatinine_unit:
863 970
         description: 肌酐单位(umol/L,mg/dl)
864 971
         type: string
@@ -893,12 +1000,12 @@ definitions:
893 1000
         format: int64
894 1001
       urine_protein:
895 1002
         description: 尿蛋白
896
-        type: integer
897
-        format: int64
1003
+        type: number
1004
+        format: double
898 1005
       urine_protein_24h:
899 1006
         description: 24小时尿蛋白
900
-        type: integer
901
-        format: int64
1007
+        type: number
1008
+        format: double
902 1009
       urine_protein_24h_time:
903 1010
         $ref: '#/definitions/models.Time'
904 1011
         description: 24小时尿蛋白检测时间
@@ -913,8 +1020,8 @@ definitions:
913 1020
         type: string
914 1021
       weight:
915 1022
         description: 体重
916
-        type: integer
917
-        format: int64
1023
+        type: number
1024
+        format: double
918 1025
   models.SaveHealthProfileReq:
919 1026
     title: SaveHealthProfileReq
920 1027
     type: object
@@ -930,8 +1037,8 @@ definitions:
930 1037
         type: string
931 1038
       creatinine:
932 1039
         description: 血肌酐
933
-        type: integer
934
-        format: int64
1040
+        type: number
1041
+        format: double
935 1042
       creatinine_unit:
936 1043
         description: 肌酐单位(umol/L,mg/dl)
937 1044
         type: string
@@ -952,12 +1059,12 @@ definitions:
952 1059
         format: int64
953 1060
       urine_protein:
954 1061
         description: 尿蛋白
955
-        type: integer
956
-        format: int64
1062
+        type: number
1063
+        format: double
957 1064
       urine_protein_24h:
958 1065
         description: 24小时尿蛋白
959
-        type: integer
960
-        format: int64
1066
+        type: number
1067
+        format: double
961 1068
       urine_protein_24h_time:
962 1069
         description: 24小时尿蛋白检测时间 yyyy-MM-dd HH:mm:ss
963 1070
         type: string
@@ -972,8 +1079,8 @@ definitions:
972 1079
         type: string
973 1080
       weight:
974 1081
         description: 体重
975
-        type: integer
976
-        format: int64
1082
+        type: number
1083
+        format: double
977 1084
   models.SaveUserInfoReq:
978 1085
     title: SaveUserInfoReq
979 1086
     type: object
@@ -999,6 +1106,9 @@ definitions:
999 1106
       real_name:
1000 1107
         description: 真实姓名
1001 1108
         type: string
1109
+      verify_code:
1110
+        description: 手机验证码
1111
+        type: string
1002 1112
   models.SyhArticlesMenu:
1003 1113
     title: SyhArticlesMenu
1004 1114
     type: object

File diff suppressed because it is too large
+ 375 - 0
sws_xcx_2024-09-14_154952.sql


+ 12 - 0
tests/gendb_test.go Vedi File

@@ -125,3 +125,15 @@ func TestStr(t *testing.T) {
125 125
 	strArr := strings.Split(str, "")
126 126
 	t.Log(strArr)
127 127
 }
128
+
129
+func TestCheckRecordService_GetCheckRecordList(t *testing.T) {
130
+	s := service.NewCheckRecordService()
131
+	vos, total, err := s.GetCheckRecordList(1, 2, 2)
132
+	if err != nil {
133
+		t.Error(err)
134
+		return
135
+	}
136
+	t.Log(total)
137
+	t.Logf("%+v", vos)
138
+
139
+}