| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- /**
- * @author chengliang
- * @date 2026/1/12 21:16
- * @brief
- *
- **/
- package service
- import "dsbqj-admin/model/mongo/hotupdate"
- type TGetVersionReq struct {
- Proj string `form:"proj" binding:"required" json:"proj"`
- Os string `form:"os" binding:"required" json:"os"`
- }
- type TGetMaxVersionReq struct {
- Os string `form:"os" binding:"required" json:"os"`
- }
- type TGetVersionRsp struct {
- ID string `json:"id"`
- Proj string `json:"proj"`
- Os string `json:"os"`
- CreateTimeSec int64 `json:"createTime"`
- UpdateTimeSec int64 `json:"updateTime"`
- Version string `json:"version"`
- PackageUrl string `json:"packageUrl"`
- RemoteManifestUrl string `json:"remoteManifestUrl"`
- RemoteVersionUrl string `json:"remoteVersionUrl"`
- Status int16 `json:"status"`
- }
- func (this *TGetVersionRsp) FromMVersion(mVersion *hotupdate.MVersionInfo) {
- this.ID = mVersion.ID.Hex()
- this.CreateTimeSec = mVersion.CreatedAt.Unix()
- this.UpdateTimeSec = mVersion.UpdatedAt.Unix()
- this.Version = mVersion.Version
- this.PackageUrl = mVersion.PackageUrl
- this.RemoteVersionUrl = mVersion.RemoteVersionUrl
- this.RemoteManifestUrl = mVersion.RemoteManifestUrl
- this.Status = mVersion.Status
- this.Proj = mVersion.Proj
- this.Os = mVersion.Os
- }
- type TAddVersionReq struct {
- Proj string `form:"proj" binding:"required" json:"proj"`
- Os string `form:"os" binding:"required" json:"os"`
- Version string `form:"version" binding:"required" json:"version"`
- PackageUrl string `form:"packageUrl" binding:"required" json:"packageUrl"`
- RemoteManifestUrl string `form:"remoteManifestUrl" binding:"required" json:"remoteManifestUrl"`
- RemoteVersionUrl string `form:"remoteVersionUrl" binding:"required" json:"remoteVersionUrl"`
- TimeSec int64 `form:"timesec" json:"timesec"`
- Sign string `form:"sign" json:"sign"`
- }
- type TGetVersionListReq struct {
- Start int64 `form:"start" binding:"required" json:"start"` // Start是闭区间 包含的,列如去前5条 start=1,limit=5
- Limit int64 `form:"limit" binding:"required" json:"limit"`
- }
- type TChangeStautsReq struct {
- ID string `form:"id" binding:"required" json:"id"`
- Status int16 `form:"status" binding:"required" json:"status"`
- }
|