Browse Source

修复计划无法分配给小组的bug

bigcat 2 years ago
parent
commit
6a9a9a2495
1 changed files with 1 additions and 1 deletions
  1. 1 1
      controller/plan.go

+ 1 - 1
controller/plan.go

@@ -167,7 +167,7 @@ func AssignPlan(c *gin.Context) {
 		}
 
 		// 重复分配校验
-		if err := db.Model(&model.Plan2Group{}).Where("group_id = ?", groupId).
+		if err := db.Model(&model.Plan2Group{}).Where("group_id = ? and plan_id = ?", groupId, groupVo.PlanId).
 			First(&model.Plan2Group{}).Error; err == nil {
 			response.Fail(c, nil, "分配失败,小组已被该计划分配")
 			return