增强提交接口功能
This commit is contained in:
@@ -142,6 +142,16 @@ public class SysPlanService extends MybatisBaseService<SysPlanMapper, SysPlan> {
|
|||||||
|
|
||||||
public ResultBean upSysPlan(SysPlan sysPlan) {
|
public ResultBean upSysPlan(SysPlan sysPlan) {
|
||||||
ResultBean rb = ResultBean.fireFail();
|
ResultBean rb = ResultBean.fireFail();
|
||||||
|
if (sysPlan.getId() == null){
|
||||||
|
if (sysPlan.getTeacherNo() == null){
|
||||||
|
return rb.setMsg("提交失败,请选择提交的教师");
|
||||||
|
}
|
||||||
|
sysPlan.setState(1);
|
||||||
|
int i = baseMapper.insert(sysPlan);
|
||||||
|
if (i == 0){
|
||||||
|
return rb.setMsg("提交失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
if (sysPlan.getTeacherNo() == null){
|
if (sysPlan.getTeacherNo() == null){
|
||||||
return rb.setMsg("提交失败,请选择提交的教师");
|
return rb.setMsg("提交失败,请选择提交的教师");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user