溪鸭夏 2 лет назад
Родитель
Сommit
eebda5631e

+ 35 - 31
.idea/workspace.xml

@@ -2,16 +2,8 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="981dbcd1-a700-4015-8567-2ccff8e76f0a" name="Default Changelist" comment="">
-      <change afterPath="$PROJECT_DIR$/src/main/java/com/template/model/enumModel/eSeewoUserType.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/src/main/java/com/template/model/seewo/PhotoServiceSavePhotosParam.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/src/main/java/com/template/model/seewo/PhotoServiceSavePhotosRequest.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/src/main/java/com/template/model/seewo/PhotoServiceSavePhotosResult.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/main/java/com/template/api/SmartUserControllerAPI.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/template/api/SmartUserControllerAPI.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/main/java/com/template/controller/ScheduleController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/template/controller/ScheduleController.java" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/src/main/java/com/template/controller/SmartUserController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/template/controller/SmartUserController.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst" beforeDir="false" afterPath="$PROJECT_DIR$/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst" beforeDir="false" afterPath="$PROJECT_DIR$/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/target/mybatis_plus-0.0.1-SNAPSHOT.jar.original" beforeDir="false" afterPath="$PROJECT_DIR$/target/mybatis_plus-0.0.1-SNAPSHOT.jar.original" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main/java/com/template/model/request/updateSmartUserRequest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/template/model/request/updateSmartUserRequest.java" afterDir="false" />
     </list>
     <ignored path="$PROJECT_DIR$/classes/" />
     <ignored path="$PROJECT_DIR$/target/" />
@@ -30,8 +22,8 @@
       <file pinned="false" current-in-tab="true">
         <entry file="file://$PROJECT_DIR$/src/main/java/com/template/controller/SmartUserController.java">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="-6634">
-              <caret line="150" column="40" selection-start-line="150" selection-start-column="24" selection-end-line="150" selection-end-column="40" />
+            <state relative-caret-position="269">
+              <caret line="1532" column="48" selection-start-line="1532" selection-start-column="48" selection-end-line="1532" selection-end-column="48" />
               <folding>
                 <element signature="imports" expanded="true" />
               </folding>
@@ -40,6 +32,15 @@
         </entry>
       </file>
       <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/main/java/com/template/model/request/updateSmartUserRequest.java">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="609">
+              <caret line="75" column="28" selection-start-line="75" selection-start-column="19" selection-end-line="75" selection-end-column="28" />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/src/main/java/com/template/api/SmartUserControllerAPI.java">
           <provider selected="true" editor-type-id="text-editor">
             <state relative-caret-position="62">
@@ -79,8 +80,6 @@
   </component>
   <component name="FindInProjectRecents">
     <findStrings>
-      <find>queryTimeGroups</find>
-      <find>SeewoInsertStudent</find>
       <find>queryPageSmartUser</find>
       <find>students</find>
       <find>deleteSmartUserById</find>
@@ -109,6 +108,8 @@
       <find>eSeewoUserType.Teacher.getValue()</find>
       <find>导入</find>
       <find>readXls</find>
+      <find>CommonResult.fail</find>
+      <find>update</find>
     </findStrings>
     <replaceStrings>
       <replace />
@@ -146,6 +147,7 @@
         <option value="$PROJECT_DIR$/src/main/resources/application-prod.yml" />
         <option value="$PROJECT_DIR$/src/main/java/com/template/api/SmartUserControllerAPI.java" />
         <option value="$PROJECT_DIR$/src/main/java/com/template/model/enumModel/eSeewoUserType.java" />
+        <option value="$PROJECT_DIR$/src/main/java/com/template/model/request/updateSmartUserRequest.java" />
         <option value="$PROJECT_DIR$/src/main/java/com/template/controller/SmartUserController.java" />
       </list>
     </option>
@@ -178,8 +180,9 @@
   <component name="MavenRunner">
     <option name="skipTests" value="true" />
   </component>
-  <component name="ProjectFrameBounds">
-    <option name="x" value="-7" />
+  <component name="ProjectFrameBounds" extendedState="6">
+    <option name="x" value="-8" />
+    <option name="y" value="-8" />
     <option name="width" value="974" />
     <option name="height" value="1039" />
   </component>
@@ -307,7 +310,7 @@
     <property name="RequestMappingsPanelWidth1" value="75" />
     <property name="WebServerToolWindowFactoryState" value="false" />
     <property name="aspect.path.notification.shown" value="true" />
-    <property name="last_opened_file_path" value="$PROJECT_DIR$/../../私有项目/mall/java" />
+    <property name="last_opened_file_path" value="$PROJECT_DIR$/../../校车预约移动端/carBooksDevelopV" />
     <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
     <property name="nodejs_npm_path_reset_for_default_project" value="true" />
     <property name="settings.editor.selected.configurable" value="MavenSettings" />
@@ -376,15 +379,16 @@
       <option name="number" value="Default" />
       <option name="presentableId" value="Default" />
       <updated>1712903307839</updated>
-      <workItem from="1712903309092" duration="73621000" />
+      <workItem from="1712903309092" duration="76946000" />
     </task>
     <servers />
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="73621000" />
+    <option name="totallyTimeSpent" value="76946000" />
   </component>
   <component name="ToolWindowManager">
-    <frame x="-7" y="0" width="974" height="1039" extended-state="0" />
+    <frame x="-8" y="-8" width="1936" height="1048" extended-state="6" />
+    <editor active="true" />
     <layout>
       <window_info id="JRebel" side_tool="true" />
       <window_info id="Image Layers" />
@@ -393,7 +397,7 @@
       <window_info id="Favorites" side_tool="true" />
       <window_info id="Designer" />
       <window_info id="Web" side_tool="true" />
-      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.309628" />
+      <window_info content_ui="combo" id="Project" order="0" weight="0.15085287" />
       <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
       <window_info anchor="bottom" id="Spring" weight="0.32932165" />
       <window_info anchor="bottom" id="Event Log" side_tool="true" />
@@ -407,7 +411,7 @@
       <window_info anchor="bottom" id="JRebel Console" side_tool="true" />
       <window_info anchor="bottom" id="Message" order="0" />
       <window_info anchor="bottom" id="Find" order="1" weight="0.32932165" />
-      <window_info anchor="bottom" id="Run" order="2" visible="true" weight="0.4563536" />
+      <window_info anchor="bottom" id="Run" order="2" weight="0.45185995" />
       <window_info anchor="bottom" id="Debug" order="3" weight="0.6291028" />
       <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
       <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
@@ -469,7 +473,7 @@
         </line-breakpoint>
         <line-breakpoint enabled="true" type="java-line">
           <url>file://$PROJECT_DIR$/src/main/java/com/template/controller/SmartUserController.java</url>
-          <line>2675</line>
+          <line>2689</line>
           <properties />
           <option name="timeStamp" value="66" />
         </line-breakpoint>
@@ -489,13 +493,6 @@
     </breakpoint-manager>
   </component>
   <component name="editorHistoryManager">
-    <entry file="file://$PROJECT_DIR$/src/main/java/com/template/core/JwtAuthenticationInterceptor.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="295">
-          <caret line="75" column="39" selection-start-line="75" selection-start-column="12" selection-end-line="75" selection-end-column="39" />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/src/main/java/com/template/common/utils/AesUtils.java">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="307">
@@ -858,10 +855,17 @@
         </state>
       </provider>
     </entry>
+    <entry file="file://$PROJECT_DIR$/src/main/java/com/template/model/request/updateSmartUserRequest.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="609">
+          <caret line="75" column="28" selection-start-line="75" selection-start-column="19" selection-end-line="75" selection-end-column="28" />
+        </state>
+      </provider>
+    </entry>
     <entry file="file://$PROJECT_DIR$/src/main/java/com/template/controller/SmartUserController.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-6634">
-          <caret line="150" column="40" selection-start-line="150" selection-start-column="24" selection-end-line="150" selection-end-column="40" />
+        <state relative-caret-position="269">
+          <caret line="1532" column="48" selection-start-line="1532" selection-start-column="48" selection-end-line="1532" selection-end-column="48" />
           <folding>
             <element signature="imports" expanded="true" />
           </folding>

+ 18 - 4
src/main/java/com/template/controller/SmartUserController.java

@@ -446,7 +446,7 @@ public class SmartUserController implements SmartUserControllerAPI {
             }
 
             //region 最后上传学生图片 这样能保证图片上传失败也不影响数据导入
-            if(useXw == 1){
+            if (useXw == 1) {
                 SeewoClient seewoClient = new DefaultSeewoClient(new Account(seewoConfig.getAppId(), seewoConfig.getAppSecret()));
                 int num = (int) Math.ceil((double) photoList.size() / 1000);
                 for (int count = 1; count <= num; count++) {
@@ -1515,20 +1515,34 @@ public class SmartUserController implements SmartUserControllerAPI {
      */
     @Override
     @DESRespondSecret(validated = true)
-    public CommonResult updateSmartUserById(updateSmartUserRequest usur, BindingResult bindingResult) throws
-            Exception {
+    public CommonResult updateSmartUserById(updateSmartUserRequest usur, BindingResult bindingResult) throws Exception {
         if (bindingResult.hasErrors()) {
             String st = paramUtils.getParamError(bindingResult);
             return CommonResult.fail(st);
         }
 
+        //region 参数判断
+        if (usur.getIdentityId().intValue() == eIdentityStatu.Student.getValue()) {
+            if (usur.getTimeGroupId() == null) {
+                return CommonResult.fail("学生时间组不能为空");
+            }
+            if (usur.getCardNo() == null) {
+                return CommonResult.fail("学生编号不能为空");
+            }
+            if (usur.getHeadImage() == null) {
+                return CommonResult.fail("学生人脸照片不能为空");
+            }
+        }
+
+        //endregion
+
         int useXw = 1;
         int useBs = 0;
 
         //更新的同时将百胜用户信息同步过去或者同步过来?
         SmartUser su = smartUserService.getSmartById(usur.getId());
         if (su == null) {
-            CommonResult.fail("用户数据已失效,修改失败!");
+            return CommonResult.fail("用户数据已失效,修改失败!");
         }
 
         //是否转换身份

+ 4 - 4
src/main/java/com/template/model/request/updateSmartUserRequest.java

@@ -22,7 +22,7 @@ public class updateSmartUserRequest {
     /**
      * 时间组ID
      */
-    @NotNull(message = "时间组ID不能为空")
+    //@NotNull(message = "时间组ID不能为空")
     private Integer timeGroupId;
 
     /**
@@ -34,7 +34,7 @@ public class updateSmartUserRequest {
     /**
      * 编号
      */
-    @NotBlank(message = "编号不能为空")
+    //@NotBlank(message = "编号不能为空")
     private String cardNo;
 
     /**
@@ -52,7 +52,7 @@ public class updateSmartUserRequest {
     /**
      * 身份证
      */
-    @NotBlank(message = "身份证不能为空")
+    //@NotBlank(message = "身份证不能为空")
     private String idCard;
 
     /**
@@ -72,7 +72,7 @@ public class updateSmartUserRequest {
     /**
      * 人脸照片
      */
-    @NotBlank(message = "人脸照片不能为空")
+    //@NotBlank(message = "人脸照片不能为空")
     private String headImage;
 
     /**