浏览代码

feat:企业版大会员名称展示

wangshan 2 年之前
父节点
当前提交
6fe5406842
共有 1 个文件被更改,包括 10 次插入1 次删除
  1. 10 1
      service/service.go

+ 10 - 1
service/service.go

@@ -162,9 +162,18 @@ func BuyProductList(this *entmanageapplication.BuyProductListReq) *entmanageappl
 			if product_type == "VIP订阅" {
 				product_type = "超级订阅"
 			}
+			productTypeSuffix := ""
+			if provinceCount := common.IntAllDef(v["province_count"], -1); provinceCount > 0 {
+				switch provinceCount {
+				case 1:
+					productTypeSuffix = "单省版"
+				default:
+					productTypeSuffix = "省份版"
+				}
+			}
 			obj := &entmanageapplication.BuyProductList{
 				WaitEmpowerId: common.Int64All(v["id"]),
-				ProductType:   product_type,
+				ProductType:   fmt.Sprintf("%s%s", product_type, productTypeSuffix),
 				UseCount:      common.Int64All(v["use_count"]),
 				EmpowerCount:  common.Int64All(v["empower_count"]),
 				ProvinceCount: common.Int64All(v["province_count"]),