新增解密收货人

This commit is contained in:
2023-09-11 17:29:39 +08:00
parent 615982cd19
commit a05fd1d50d
4 changed files with 69 additions and 2 deletions
+21
View File
@@ -140,3 +140,24 @@ func (b *Admin) GetDecryptBank(c *gin.Context) {
userCardNum, _ := userService.GetUserBankNumByDoctorId(doctorId)
responses.OkWithData(userCardNum, c)
}
// GetDecryptOrderProductConsignee 解密药品订单收货人数据
func (b *Admin) GetDecryptOrderProductConsignee(c *gin.Context) {
id := c.Param("order_product_id")
if id == "" {
responses.FailWithMessage("缺少参数", c)
return
}
// 将 id 转换为 int64 类型
orderProductId, err := strconv.ParseInt(id, 10, 64)
if err != nil {
responses.Fail(c)
return
}
// 获取药品订单收货人数据
orderProductService := service.OrderProductService{}
OrderProductConsignee, _ := orderProductService.GetOrderProductConsignee(orderProductId)
responses.OkWithData(OrderProductConsignee, c)
}