From 59bb0f01bd8468dcf485533bc4dc021c626996a9 Mon Sep 17 00:00:00 2001 From: chenweijian <820961417@qq.com> Date: Wed, 22 Mar 2023 15:11:17 +0800 Subject: [PATCH] =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=A0=81=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/constDef.go | 1 + mysql/3.5.0.sql | 17 ++++++++++++++++- route/group_power_r/group_power.go | 4 ++-- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/common/constDef.go b/common/constDef.go index c487484..5b041b5 100644 --- a/common/constDef.go +++ b/common/constDef.go @@ -106,6 +106,7 @@ const ( MSG_ID_DEALER_CAN_NOT_SOLE MsgIdType = 166 // 此用户已有家族代理,不能出售钻石 MSG_ID_BUY_FROM_FAMILY MsgIdType = 167 // 请向本家族代理购买钻石 MSG_ID_NEED_JOIN_FAMILY MsgIdType = 168 // 请加入代理的家族后进行购买 + MSG_ID_SET_FAMILY_NAMEPL MsgIdType = 169 // 等级不够不能修改家族铭牌 ADD_GROUP_FAILED AddGroupResultType = 0 ADD_GROUP_DONE AddGroupResultType = 1 diff --git a/mysql/3.5.0.sql b/mysql/3.5.0.sql index bad37d7..8655d4b 100644 --- a/mysql/3.5.0.sql +++ b/mysql/3.5.0.sql @@ -41,4 +41,19 @@ CREATE TABLE `group_power_quit_log` ( KEY `user_id` (`user_id`) USING BTREE, KEY `created_time` (`created_time`) USING BTREE, KEY `mgr_id` (`mgr_id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; \ No newline at end of file +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + +INSERT INTO hilo.res_multi_text (msg_id, `language`, content) +VALUES (169, 'zh', '白银等级才可以修改'), + (169, 'en', 'Can only be modified at the silver level'), + (169, 'ar', 'لا يمكن تعديله إلا على المستوى الفضي'), + (169, 'tr', 'Yalnızca gümüş seviyesinde değiştirilebilir'), + (169, 'id', 'Hanya dapat dimodifikasi pada level perak'), + (169, 'ru', 'Можно модифицировать только на серебряном уровне'), + (169, 'ko', '실버 등급에서만 수정 가능'), + (169, 'pt', 'Só pode ser modificado no nível prata'), + (169, 'th', 'สามารถแก้ไขได้ที่ระดับซิลเวอร์เท่านั้น'), + (169, 'ca', 'Solo se puede modificar en el nivel plata.'), + (169, 'hi', 'केवल चांदी के स्तर पर संशोधित किया जा सकता है'), + (169, 'vi', 'Chỉ có thể được sửa đổi ở cấp độ bạc'), + (169, 'ur', 'صرف چاندی کی سطح پر نظر ثانی کی جا سکتی ہے'); \ No newline at end of file diff --git a/route/group_power_r/group_power.go b/route/group_power_r/group_power.go index 0f22f37..22bfecb 100644 --- a/route/group_power_r/group_power.go +++ b/route/group_power_r/group_power.go @@ -1378,7 +1378,7 @@ func GroupPowerSetAdmin(c *gin.Context) (*mycontext.MyContext, error) { // @Router /v1/groupPower/info/set [post] func GroupPowerSetInfo(c *gin.Context) (*mycontext.MyContext, error) { myContext := mycontext.CreateMyContext(c.Keys) - userId, err := req.GetUserId(c) + userId, lang, err := req.GetUserIdLang(c, myContext) if err != nil { return myContext, err } @@ -1420,7 +1420,7 @@ func GroupPowerSetInfo(c *gin.Context) (*mycontext.MyContext, error) { } grade := gradeM[myGroupPUser.GroupPowerId] if grade.Grade < 1 { - return myContext, bizerr.GroupPowerChangeNameplate + return myContext, res_m.GetErrByLanguage(model.Db, common.MSG_ID_SET_FAMILY_NAMEPL, lang, bizerr.GroupPowerChangeNameplate) } // 检查铭牌长度和唯一性 if len(para.Nameplate) > 6 { -- 2.22.0