幼儿信息家长端维护 优化

This commit is contained in:
paidaxing444 2020-11-02 09:34:50 +08:00
parent ee479f68ee
commit 214fefc509
2 changed files with 11 additions and 2 deletions

View File

@ -468,7 +468,7 @@ export default {
updateContactpeople(this.form_jhr).then(response => {
if (response.code === 200) {
this.msgSuccess("修改成功");
this.hide = false;
// this.hide = false;
}
});
this.hide = false;

View File

@ -107,7 +107,16 @@ public class ByChildContactpeopleController extends BaseController {
@Log(title = "幼儿紧急情况联系人", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ByChildContactpeople byChildContactpeople) {
return toAjax(byChildContactpeopleService.updateByChildContactpeople(byChildContactpeople));
//如果存在就更新否则删除
ByChildContactpeople byChildContactpeoplenew = new ByChildContactpeople();
byChildContactpeoplenew.setChildid(byChildContactpeople.getChildid());
List<ByChildContactpeople> list = byChildContactpeopleService.selectByChildContactpeopleList(byChildContactpeoplenew);
if (list!=null&&list.size()>0){
return toAjax(byChildContactpeopleService.updateByChildContactpeople(byChildContactpeople));
}else{
return toAjax(byChildContactpeopleService.insertByChildContactpeople(byChildContactpeople));
}
}
/**