|
|
@@ -9,6 +9,7 @@ import com.template.model.request.UpdateSmartSchoolRequest;
|
|
|
import com.template.model.result.CommonResult;
|
|
|
import com.template.model.result.PageUtils;
|
|
|
import com.template.services.SmartSchoolService;
|
|
|
+import com.template.services.SmartUserService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.validation.BindingResult;
|
|
|
|
|
|
@@ -30,6 +31,9 @@ public class SmartSchoolController implements SmartSchoolControllerAPI {
|
|
|
@Autowired
|
|
|
private SmartSchoolService smartSchoolService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private SmartUserService smartUserService;
|
|
|
+
|
|
|
/**
|
|
|
* 新增学校基本信息
|
|
|
*
|
|
|
@@ -93,7 +97,13 @@ public class SmartSchoolController implements SmartSchoolControllerAPI {
|
|
|
@Override
|
|
|
@DESRespondSecret(validated = true)
|
|
|
public CommonResult querySmartSchool() {
|
|
|
+
|
|
|
+ int studentCount = smartUserService.queryStudentCount();
|
|
|
+
|
|
|
SmartSchool result = smartSchoolService.getSmartSchool();
|
|
|
+ result.setStudentCount(studentCount);
|
|
|
+
|
|
|
+ smartSchoolService.updateSmartSchool(result);
|
|
|
|
|
|
return CommonResult.ok(result);
|
|
|
}
|