refactor: Skill状态字段从int改为string类型
- model/skill.go: Status字段从 int 改为 string,支持 "active"/"inactive" - handler/skill_handler.go: 适配Status字段的类型变化,处理"1"/"0"和"active"/"inactive"两种格式 - repository/skill_repo.go: 更新Status字段的空值判断逻辑 - service/skill_service.go: 同步更新 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -65,7 +65,7 @@ func (r *SkillRepository) Update(skill *model.Skill) error {
|
||||
if skill.SkillType != "" {
|
||||
updates["skill_type"] = skill.SkillType
|
||||
}
|
||||
if skill.Status != 0 {
|
||||
if skill.Status != "" {
|
||||
updates["status"] = skill.Status
|
||||
}
|
||||
if skill.Path != "" {
|
||||
|
||||
Reference in New Issue
Block a user