Version: 0.9.81.dev.260506
后端: 1. Credit 价格规则补齐利润率与实际计费单价语义:新增 `profit_rate_bps` 与 `charge_*_price_micros` 展示字段,下沉共享价格推导 helper,tokenstore rpc/client/proto/model/default rule 全链路同步,LLM usage 扣费统一改按加价后的 charge 单价换算。 2. task-class 更新链路修正全量覆盖与归属校验:`runtime/conv` 保留 item id,DAO 更新前显式校验 task-class 与 item 归属,改用显式字段 map 落库 nil/空切片/零值,避免 `RowsAffected=0` 误判越权,同时补齐任务项可编辑字段更新。 3. GormCache task-class 失效补空 user_id 保护:更新语句缺少模型上下文时直接跳过失效,避免缓存插件因空指针影响主事务。 前端: 4. 课表中心补齐任务类编辑能力:新增 `updateTaskClass` API,创建弹窗支持编辑态回填与 item id 提交,日程页支持先拉详情再编辑并在保存后刷新任务类详情与列表。 5. 计划广场详情补点赞交互与奖励提示:详情页新增点赞/取消点赞按钮、奖励反馈文案与计数展示,论坛类型补 `reward_hint`,评论区与帖子作者头像统一接入兜底头像工具。 6. 品牌与展示细节收口:侧边栏与 favicon 切到项目 logo,首页标题改为 `SmartMate`,主面板缩放上限微调,论坛列表头像显示与整体品牌观感同步统一。
This commit is contained in:
@@ -336,18 +336,23 @@ func creditTransactionsToPB(items []creditcontracts.CreditTransactionView) []*pb
|
||||
|
||||
func creditPriceRuleToPB(rule creditcontracts.CreditPriceRuleView) *pb.CreditPriceRuleView {
|
||||
return &pb.CreditPriceRuleView{
|
||||
RuleId: rule.RuleID,
|
||||
Scene: rule.Scene,
|
||||
ProviderName: rule.ProviderName,
|
||||
ModelName: rule.ModelName,
|
||||
InputPriceMicros: rule.InputPriceMicros,
|
||||
OutputPriceMicros: rule.OutputPriceMicros,
|
||||
CachedPriceMicros: rule.CachedPriceMicros,
|
||||
ReasoningPriceMicros: rule.ReasoningPriceMicros,
|
||||
CreditPerYuan: rule.CreditPerYuan,
|
||||
Status: rule.Status,
|
||||
Priority: int32(rule.Priority),
|
||||
Description: rule.Description,
|
||||
RuleId: rule.RuleID,
|
||||
Scene: rule.Scene,
|
||||
ProviderName: rule.ProviderName,
|
||||
ModelName: rule.ModelName,
|
||||
InputPriceMicros: rule.InputPriceMicros,
|
||||
OutputPriceMicros: rule.OutputPriceMicros,
|
||||
CachedPriceMicros: rule.CachedPriceMicros,
|
||||
ReasoningPriceMicros: rule.ReasoningPriceMicros,
|
||||
CreditPerYuan: rule.CreditPerYuan,
|
||||
ProfitRateBps: rule.ProfitRateBps,
|
||||
ChargeInputPriceMicros: rule.ChargeInputPriceMicros,
|
||||
ChargeOutputPriceMicros: rule.ChargeOutputPriceMicros,
|
||||
ChargeCachedPriceMicros: rule.ChargeCachedPriceMicros,
|
||||
ChargeReasoningPriceMicros: rule.ChargeReasoningPriceMicros,
|
||||
Status: rule.Status,
|
||||
Priority: int32(rule.Priority),
|
||||
Description: rule.Description,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -331,18 +331,23 @@ func (m *CreditTransactionView) String() string { return proto.CompactTextString
|
||||
func (*CreditTransactionView) ProtoMessage() {}
|
||||
|
||||
type CreditPriceRuleView struct {
|
||||
RuleId uint64 `protobuf:"varint,1,opt,name=rule_id,json=ruleId,proto3" json:"rule_id,omitempty"`
|
||||
Scene string `protobuf:"bytes,2,opt,name=scene,proto3" json:"scene,omitempty"`
|
||||
ProviderName string `protobuf:"bytes,3,opt,name=provider_name,json=providerName,proto3" json:"provider_name,omitempty"`
|
||||
ModelName string `protobuf:"bytes,4,opt,name=model_name,json=modelName,proto3" json:"model_name,omitempty"`
|
||||
InputPriceMicros int64 `protobuf:"varint,5,opt,name=input_price_micros,json=inputPriceMicros,proto3" json:"input_price_micros,omitempty"`
|
||||
OutputPriceMicros int64 `protobuf:"varint,6,opt,name=output_price_micros,json=outputPriceMicros,proto3" json:"output_price_micros,omitempty"`
|
||||
CachedPriceMicros int64 `protobuf:"varint,7,opt,name=cached_price_micros,json=cachedPriceMicros,proto3" json:"cached_price_micros,omitempty"`
|
||||
ReasoningPriceMicros int64 `protobuf:"varint,8,opt,name=reasoning_price_micros,json=reasoningPriceMicros,proto3" json:"reasoning_price_micros,omitempty"`
|
||||
CreditPerYuan int64 `protobuf:"varint,9,opt,name=credit_per_yuan,json=creditPerYuan,proto3" json:"credit_per_yuan,omitempty"`
|
||||
Status string `protobuf:"bytes,10,opt,name=status,proto3" json:"status,omitempty"`
|
||||
Priority int32 `protobuf:"varint,11,opt,name=priority,proto3" json:"priority,omitempty"`
|
||||
Description string `protobuf:"bytes,12,opt,name=description,proto3" json:"description,omitempty"`
|
||||
RuleId uint64 `protobuf:"varint,1,opt,name=rule_id,json=ruleId,proto3" json:"rule_id,omitempty"`
|
||||
Scene string `protobuf:"bytes,2,opt,name=scene,proto3" json:"scene,omitempty"`
|
||||
ProviderName string `protobuf:"bytes,3,opt,name=provider_name,json=providerName,proto3" json:"provider_name,omitempty"`
|
||||
ModelName string `protobuf:"bytes,4,opt,name=model_name,json=modelName,proto3" json:"model_name,omitempty"`
|
||||
InputPriceMicros int64 `protobuf:"varint,5,opt,name=input_price_micros,json=inputPriceMicros,proto3" json:"input_price_micros,omitempty"`
|
||||
OutputPriceMicros int64 `protobuf:"varint,6,opt,name=output_price_micros,json=outputPriceMicros,proto3" json:"output_price_micros,omitempty"`
|
||||
CachedPriceMicros int64 `protobuf:"varint,7,opt,name=cached_price_micros,json=cachedPriceMicros,proto3" json:"cached_price_micros,omitempty"`
|
||||
ReasoningPriceMicros int64 `protobuf:"varint,8,opt,name=reasoning_price_micros,json=reasoningPriceMicros,proto3" json:"reasoning_price_micros,omitempty"`
|
||||
CreditPerYuan int64 `protobuf:"varint,9,opt,name=credit_per_yuan,json=creditPerYuan,proto3" json:"credit_per_yuan,omitempty"`
|
||||
Status string `protobuf:"bytes,10,opt,name=status,proto3" json:"status,omitempty"`
|
||||
Priority int32 `protobuf:"varint,11,opt,name=priority,proto3" json:"priority,omitempty"`
|
||||
Description string `protobuf:"bytes,12,opt,name=description,proto3" json:"description,omitempty"`
|
||||
ProfitRateBps int64 `protobuf:"varint,13,opt,name=profit_rate_bps,json=profitRateBps,proto3" json:"profit_rate_bps,omitempty"`
|
||||
ChargeInputPriceMicros int64 `protobuf:"varint,14,opt,name=charge_input_price_micros,json=chargeInputPriceMicros,proto3" json:"charge_input_price_micros,omitempty"`
|
||||
ChargeOutputPriceMicros int64 `protobuf:"varint,15,opt,name=charge_output_price_micros,json=chargeOutputPriceMicros,proto3" json:"charge_output_price_micros,omitempty"`
|
||||
ChargeCachedPriceMicros int64 `protobuf:"varint,16,opt,name=charge_cached_price_micros,json=chargeCachedPriceMicros,proto3" json:"charge_cached_price_micros,omitempty"`
|
||||
ChargeReasoningPriceMicros int64 `protobuf:"varint,17,opt,name=charge_reasoning_price_micros,json=chargeReasoningPriceMicros,proto3" json:"charge_reasoning_price_micros,omitempty"`
|
||||
}
|
||||
|
||||
func (m *CreditPriceRuleView) Reset() { *m = CreditPriceRuleView{} }
|
||||
|
||||
@@ -235,6 +235,11 @@ message CreditPriceRuleView {
|
||||
string status = 10;
|
||||
int32 priority = 11;
|
||||
string description = 12;
|
||||
int64 profit_rate_bps = 13;
|
||||
int64 charge_input_price_micros = 14;
|
||||
int64 charge_output_price_micros = 15;
|
||||
int64 charge_cached_price_micros = 16;
|
||||
int64 charge_reasoning_price_micros = 17;
|
||||
}
|
||||
|
||||
message CreditRewardRuleView {
|
||||
|
||||
Reference in New Issue
Block a user