|
@@ -483,7 +483,7 @@ func (rg *RegisterController) Add(c *gin.Context) {
|
|
|
}
|
|
|
}
|
|
|
ppOB := new(fms.ContractPreRegister)
|
|
|
- item, e := ppOB.FetchByRegisterId(req.ContractRegisterId)
|
|
|
+ items, e := ppOB.FetchByRegisterId(req.ContractRegisterId)
|
|
|
if e != nil {
|
|
|
if e == utils.ErrNoRow {
|
|
|
resp.Fail("预登记记录不存在或已被删除", c)
|
|
@@ -492,10 +492,12 @@ func (rg *RegisterController) Add(c *gin.Context) {
|
|
|
resp.FailMsg("获取预登记失败", "Err:"+e.Error(), c)
|
|
|
return
|
|
|
}
|
|
|
- e = item.Delete()
|
|
|
- if e != nil {
|
|
|
- resp.FailMsg("删除预登记失败", "Err:"+e.Error(), c)
|
|
|
- return
|
|
|
+ for _, item := range items {
|
|
|
+ e = item.Delete()
|
|
|
+ if e != nil {
|
|
|
+ resp.FailMsg("删除预登记失败", "Err:"+e.Error(), c)
|
|
|
+ return
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//更新合同套餐等内容
|