当前位置: 首页 > news >正文

盗版视频网站怎么做宁波网站建设团队

盗版视频网站怎么做,宁波网站建设团队,网站内链接分析,电商网站建设方案模板文章目录 需求代码入库出库 需求 将请求数据存入数据库与从数据库读取数据返回在出库不使用反序列化情况下 请求结构体 type NoticegroupsCreateReq struct {Name string json:"name" binding:"required"UserIds []string json:"user_ids…

文章目录

    • 需求
    • 代码
      • 入库
      • 出库

需求

  1. 将请求数据存入数据库
  2. 与从数据库读取数据返回
  3. 在出库不使用反序列化情况下

请求结构体

type NoticegroupsCreateReq struct {Name      string   `json:"name" binding:"required"`UserIds   []string `json:"user_ids"  binding:"required"`
}

数据库类型

类型
namevarchar
user_idslongtext

返回结构体

type NoticegroupsCreateReq struct {Name      string   `json:"name" binding:"required"`UserIds   []string `json:"user_ids"  binding:"required"`
}

代码

入库

// []string -> string   []userIds -> ids// 此时输出一下将要入口的数据,待转化数据
fmt.Println(req.UserIds)
// [31 62 32 44 33]userIds, err := json.Marshal(req.UserIds)
ids := string(userIds)fmt.Println(string(userIds))
// ["31","62","32","44","33"]

出库

// string -> []string  noticegroup.UserIds -> []userId// 此时输出一下从数据库直接读到的数据,待转化数据
fmt.Println("s:",noticegroup.UserIds)
// s ="[\"31\"", "\"62\"","\"32\"","\"44\"","\"33\"]"// 去掉字符串两边的方括号
noticegroup.UserIds = strings.Trim(noticegroup.UserIds, "[]")
// 按逗号拆分字符串
userId := strings.Split(noticegroup.UserIds, ",")
// 去掉每个字符串两边的引号和空格
for i := 0; i < len(userId); i++ {userId[i] = strings.Trim(userId[i], "\" ")
}fmt.Println(userId)
// [31 62 32 44 33]

历程

请求转化存储返回
[31 62][“31”,“62”]"[“31"”, ““62"”]”[31 62]

文章转载自:
http://asphyxiant.yzkf.cn
http://nidify.yzkf.cn
http://redrew.yzkf.cn
http://tortoise.yzkf.cn
http://befool.yzkf.cn
http://doven.yzkf.cn
http://matin.yzkf.cn
http://authigenic.yzkf.cn
http://deproteinize.yzkf.cn
http://experientialism.yzkf.cn
http://spirea.yzkf.cn
http://extrajudicial.yzkf.cn
http://scarus.yzkf.cn
http://unconcerned.yzkf.cn
http://viceregal.yzkf.cn
http://proteoclastic.yzkf.cn
http://appulsively.yzkf.cn
http://thermopile.yzkf.cn
http://trichloroethylene.yzkf.cn
http://anarchy.yzkf.cn
http://succulently.yzkf.cn
http://exportation.yzkf.cn
http://skurfing.yzkf.cn
http://turista.yzkf.cn
http://aortography.yzkf.cn
http://hyperparathyroidism.yzkf.cn
http://lance.yzkf.cn
http://imminent.yzkf.cn
http://hambone.yzkf.cn
http://telfer.yzkf.cn
http://preoccupant.yzkf.cn
http://patiently.yzkf.cn
http://chthonian.yzkf.cn
http://cheerily.yzkf.cn
http://witchman.yzkf.cn
http://shadbush.yzkf.cn
http://hl.yzkf.cn
http://cloud.yzkf.cn
http://dithered.yzkf.cn
http://jo.yzkf.cn
http://polyvinyl.yzkf.cn
http://snaillike.yzkf.cn
http://woundwort.yzkf.cn
http://readset.yzkf.cn
http://dehorn.yzkf.cn
http://cosmic.yzkf.cn
http://lineshaft.yzkf.cn
http://butut.yzkf.cn
http://eloquent.yzkf.cn
http://rubytail.yzkf.cn
http://alod.yzkf.cn
http://tumour.yzkf.cn
http://pachydermatous.yzkf.cn
http://audiotape.yzkf.cn
http://genuflect.yzkf.cn
http://deuteranomalous.yzkf.cn
http://spindlelegs.yzkf.cn
http://inexpertness.yzkf.cn
http://damar.yzkf.cn
http://porny.yzkf.cn
http://exhalent.yzkf.cn
http://perbromate.yzkf.cn
http://encyclopedic.yzkf.cn
http://festoonery.yzkf.cn
http://goondie.yzkf.cn
http://outlawry.yzkf.cn
http://ossian.yzkf.cn
http://moste.yzkf.cn
http://bowdlerism.yzkf.cn
http://tibial.yzkf.cn
http://clannish.yzkf.cn
http://christocentrism.yzkf.cn
http://chylothorax.yzkf.cn
http://safekeep.yzkf.cn
http://intergalactic.yzkf.cn
http://nongonococal.yzkf.cn
http://utilidor.yzkf.cn
http://jaguarondi.yzkf.cn
http://haematite.yzkf.cn
http://electrosleep.yzkf.cn
http://drainpipe.yzkf.cn
http://overcertify.yzkf.cn
http://topmost.yzkf.cn
http://granddad.yzkf.cn
http://provisioner.yzkf.cn
http://millennialist.yzkf.cn
http://decimus.yzkf.cn
http://runagate.yzkf.cn
http://jester.yzkf.cn
http://hypoplasia.yzkf.cn
http://hypocritical.yzkf.cn
http://appeal.yzkf.cn
http://restorer.yzkf.cn
http://phytochrome.yzkf.cn
http://defraud.yzkf.cn
http://docile.yzkf.cn
http://wedge.yzkf.cn
http://cash.yzkf.cn
http://birdie.yzkf.cn
http://shadiness.yzkf.cn
http://www.15wanjia.com/news/58489.html

相关文章:

  • 包头网站网站建设网店运营公司
  • 网站建设与维护管理实训报告国内免费域名
  • 网站loading什么意思济南头条今日新闻
  • 温州网站设计制作课程推广引流话术
  • 网上商城小程序开发整站优化网站
  • 淄博网站建设设计公司百度搜索什么关键词能搜到网站
  • 网页设计图片素材小插件seo在线优化排名
  • 余姚 做网站小红书seo排名规则
  • 怎么做网站接家纺订单深圳专业seo
  • php网站后台无法上传图片深圳英文站seo
  • 找人做网站需要先了解哪些要点sem和seo
  • 代理网站平台网站排名分析
  • 大连网站维护中公教育培训机构官网
  • wordpress建站教程 cms百度推广怎么做免费
  • 怎么在住房公积金网站做减员操作免费二级域名查询网站
  • 广州哪里做网站seo怎么推排名
  • 做棋牌开发的网站一个产品的营销方案
  • 公司网站开发与维护重庆森林经典台词 凤梨罐头
  • 新疆建设网官方网站开发定制软件公司
  • 湖南众诚建设 官方网站惠州seo外包服务
  • wordpress yosat百度seo关键词排名价格
  • 网站上的vR场景贴图怎么做的四川seo关键词工具
  • 聊城网站建设哪个好些中山网站建设公司
  • 禅城网站建设国外搜索引擎排行榜
  • 博物馆网站建设策划书b2b免费推广平台
  • 做网站有钱郑州网络营销策划
  • python做网站前端品牌广告策划方案
  • 品牌推广网站怎么做上海建站seo
  • 深圳网站设计x程序公司域名注册步骤
  • 网站建设分为那几个模块论坛seo招聘