This commit is contained in:
laodaming
2023-09-15 14:19:14 +08:00
parent dd13dcbf0d
commit fd16d6ac67
9 changed files with 136 additions and 18 deletions

View File

@@ -21,14 +21,16 @@ type ModelInfo struct {
}
type FittingInfo struct {
FittingJson string `json:"fitting_json"` //配件设计json数据
FittingName string `json:"fitting_name"` //配件名称
}
type TemplateInfo struct {
TemplateJson string `json:"template_json"` //模板设计json数据
TemplateTag string `json:"template_tag"` //模板标签
}
type SizeInfo struct {
Inch string `json:"inch"`
Cm string `json:"cm"`
Inch string `json:"inch"`
Cm string `json:"cm"`
Capacity string `json:"capacity"`
}
type UserDiyInformation struct {
Phone string `json:"phone"` //电话

View File

@@ -14,6 +14,7 @@ type VerifyShoppingCartSnapshotDataChangeReq struct {
MapModel map[int64]gmodel.FsProductModel3d //模型跟配件都在
MapTemplate map[int64]gmodel.FsProductTemplateV2
MapCartChange map[int64]string
MapSnapshot map[int64]CartSnapshot
}
func VerifyShoppingCartSnapshotDataChange(req VerifyShoppingCartSnapshotDataChangeReq) error {
@@ -22,6 +23,7 @@ func VerifyShoppingCartSnapshotDataChange(req VerifyShoppingCartSnapshotDataChan
if err := json.Unmarshal([]byte(*cartInfo.Snapshot), &snapShotParseInfo); err != nil {
return err
}
req.MapSnapshot[cartInfo.Id] = snapShotParseInfo
//快照中模板设计json数据哈希值
snapshotTemplateJsonHash := hash.JsonHashKey(snapShotParseInfo.TemplateInfo.TemplateJson)
//快照中模型设计json数据哈希值