Explorar o código

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

wangshan %!s(int64=2) %!d(string=hai) anos
pai
achega
6fe5406842
Modificáronse 1 ficheiros con 10 adicións e 1 borrados
  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"]),