ソースを参照

师傅端移动接口

jzkai 1 週間 前
コミット
9a2565e4fb

+ 30 - 26
.idea/workspace.xml

@@ -8,27 +8,12 @@
   </component>
   <component name="ChangeListManager">
     <list default="true" id="26f59b4a-23ab-4f82-9dad-16520ce4a7cc" name="更改" comment="">
-      <change afterPath="$PROJECT_DIR$/common/src/main/java/com/jpsoft/employment/modules/base/dao/PrizeDAO.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/common/src/main/java/com/jpsoft/employment/modules/base/entity/Prize.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/common/src/main/java/com/jpsoft/employment/modules/base/service/PrizeService.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/common/src/main/java/com/jpsoft/employment/modules/base/service/impl/PrizeServiceImpl.java" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/common/src/main/resources/mapper/base/Prize.xml" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/web/src/main/java/com/jpsoft/employment/modules/base/controller/PrizeController.java" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/common/src/main/java/com/jpsoft/employment/modules/base/entity/TechnicianInfo.java" beforeDir="false" afterPath="$PROJECT_DIR$/common/src/main/java/com/jpsoft/employment/modules/base/entity/TechnicianInfo.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/common/src/main/java/com/jpsoft/employment/modules/base/service/RevenueInfoService.java" beforeDir="false" afterPath="$PROJECT_DIR$/common/src/main/java/com/jpsoft/employment/modules/base/service/RevenueInfoService.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/common/src/main/java/com/jpsoft/employment/modules/base/service/impl/RevenueInfoServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/common/src/main/java/com/jpsoft/employment/modules/base/service/impl/RevenueInfoServiceImpl.java" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/common/src/main/resources/mapper/base/TechnicianInfo.xml" beforeDir="false" afterPath="$PROJECT_DIR$/common/src/main/resources/mapper/base/TechnicianInfo.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/common/target/classes/com/jpsoft/employment/modules/base/entity/Deposit.class" beforeDir="false" afterPath="$PROJECT_DIR$/common/target/classes/com/jpsoft/employment/modules/base/entity/Deposit.class" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/common/target/classes/com/jpsoft/employment/modules/base/entity/TechnicianInfo.class" beforeDir="false" afterPath="$PROJECT_DIR$/common/target/classes/com/jpsoft/employment/modules/base/entity/TechnicianInfo.class" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/common/target/classes/mapper/base/Deposit.xml" beforeDir="false" afterPath="$PROJECT_DIR$/common/target/classes/mapper/base/Deposit.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/common/target/classes/mapper/base/TechnicianInfo.xml" beforeDir="false" afterPath="$PROJECT_DIR$/common/target/classes/mapper/base/TechnicianInfo.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/web/src/main/java/com/jpsoft/employment/modules/mobile/controller/MessageApiController.java" beforeDir="false" afterPath="$PROJECT_DIR$/web/src/main/java/com/jpsoft/employment/modules/mobile/controller/MessageApiController.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/web/src/main/java/com/jpsoft/employment/modules/mobile/controller/RevenueApiController.java" beforeDir="false" afterPath="$PROJECT_DIR$/web/src/main/java/com/jpsoft/employment/modules/mobile/controller/RevenueApiController.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/web/src/main/java/com/jpsoft/employment/modules/mobile/controller/TechnicianApiController.java" beforeDir="false" afterPath="$PROJECT_DIR$/web/src/main/java/com/jpsoft/employment/modules/mobile/controller/TechnicianApiController.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/web/src/main/java/com/jpsoft/employment/modules/mobile/controller/WorkOrderApiController.java" beforeDir="false" afterPath="$PROJECT_DIR$/web/src/main/java/com/jpsoft/employment/modules/mobile/controller/WorkOrderApiController.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/web/target/classes/com/jpsoft/employment/modules/mobile/controller/MessageApiController.class" beforeDir="false" afterPath="$PROJECT_DIR$/web/target/classes/com/jpsoft/employment/modules/mobile/controller/MessageApiController.class" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/web/target/classes/com/jpsoft/employment/modules/mobile/controller/WorkOrderApiController.class" beforeDir="false" afterPath="$PROJECT_DIR$/web/target/classes/com/jpsoft/employment/modules/mobile/controller/WorkOrderApiController.class" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/web/src/main/java/com/jpsoft/employment/modules/base/controller/TechnicianInfoController.java" beforeDir="false" afterPath="$PROJECT_DIR$/web/src/main/java/com/jpsoft/employment/modules/base/controller/TechnicianInfoController.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/web/target/classes/com/jpsoft/employment/modules/base/controller/TechnicianInfoController.class" beforeDir="false" afterPath="$PROJECT_DIR$/web/target/classes/com/jpsoft/employment/modules/base/controller/TechnicianInfoController.class" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -371,15 +356,15 @@
     <option name="hideEmptyMiddlePackages" value="true" />
     <option name="showLibraryContents" value="true" />
   </component>
-  <component name="PropertiesComponent"><![CDATA[{
-  "keyToString": {
-    "ASKED_ADD_EXTERNAL_FILES": "true",
-    "kotlin-language-version-configured": "true",
-    "last_opened_file_path": "D:/Projects Files/水箱定制项目/water-tank-installation-server/web/src/main/java/com/jpsoft/employment/modules/base/controller",
-    "settings.editor.selected.configurable": "MavenSettings",
-    "应用程序.EmploymentApplication.executor": "Debug"
+  <component name="PropertiesComponent">{
+  &quot;keyToString&quot;: {
+    &quot;ASKED_ADD_EXTERNAL_FILES&quot;: &quot;true&quot;,
+    &quot;kotlin-language-version-configured&quot;: &quot;true&quot;,
+    &quot;last_opened_file_path&quot;: &quot;D:/Projects Files/水箱定制项目/water-tank-installation-server/web/src/main/java/com/jpsoft/employment/modules/base/controller&quot;,
+    &quot;settings.editor.selected.configurable&quot;: &quot;MavenSettings&quot;,
+    &quot;应用程序.EmploymentApplication.executor&quot;: &quot;Debug&quot;
   }
-}]]></component>
+}</component>
   <component name="RecentsManager">
     <key name="CopyFile.RECENT_KEYS">
       <recent name="D:\Projects Files\水箱定制项目\water-tank-installation-server\web\src\main\java\com\jpsoft\employment\modules\base\controller" />
@@ -503,7 +488,15 @@
       <option name="project" value="LOCAL" />
       <updated>1762134335301</updated>
     </task>
-    <option name="localTasksCounter" value="10" />
+    <task id="LOCAL-00010" summary="师傅端移动接口">
+      <option name="closed" value="true" />
+      <created>1762246781773</created>
+      <option name="number" value="00010" />
+      <option name="presentableId" value="LOCAL-00010" />
+      <option name="project" value="LOCAL" />
+      <updated>1762246781773</updated>
+    </task>
+    <option name="localTasksCounter" value="11" />
     <servers />
   </component>
   <component name="TimeTrackingManager">
@@ -614,6 +607,17 @@
     <MESSAGE value="师傅端移动接口" />
     <option name="LAST_COMMIT_MESSAGE" value="师傅端移动接口" />
   </component>
+  <component name="XDebuggerManager">
+    <breakpoint-manager>
+      <breakpoints>
+        <line-breakpoint enabled="true" type="java-line">
+          <url>file://$PROJECT_DIR$/web/src/main/java/com/jpsoft/employment/modules/base/controller/TechnicianInfoController.java</url>
+          <line>229</line>
+          <option name="timeStamp" value="6" />
+        </line-breakpoint>
+      </breakpoints>
+    </breakpoint-manager>
+  </component>
   <component name="antWorkspaceConfiguration">
     <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
     <option name="FILTER_TARGETS" value="false" />

+ 2 - 0
common/src/main/java/com/jpsoft/employment/modules/base/entity/TechnicianInfo.java

@@ -4,6 +4,7 @@ import java.io.Serializable;
 import java.util.Date;
 import java.text.SimpleDateFormat;
 import java.math.BigDecimal;
+import java.util.List;
 
 import org.springframework.data.annotation.Transient;
 import org.springframework.format.annotation.DateTimeFormat;
@@ -59,6 +60,7 @@ public class TechnicianInfo {
 	
 				@ApiModelProperty(value = "身份证图片")
 	private String idCardImage;
+	private List<String> idCardImageList;
 	
 				@ApiModelProperty(value = "是否实名认证(0:未认证,1:已认证)")
 	private Boolean isVerified;

+ 9 - 3
common/src/main/resources/mapper/base/TechnicianInfo.xml

@@ -209,15 +209,21 @@
 			<if test="searchParams.status != null">
 				and status_ = #{searchParams.status}
 			</if>
-			<if test="searchParams.id != null">
-				and real_name like #{searchParams.id}
-			</if>
 			<if test="searchParams.promoter != null">
 				and promoter_ = #{searchParams.promoter}
 			</if>
 			<if test="searchParams.issue != null">
 				and issue_ = #{searchParams.issue}
 			</if>
+			<if test="searchParams.realName != null">
+				and real_name like #{searchParams.realName}
+			</if>
+			<if test="searchParams.idCard != null">
+				and id_card like #{searchParams.idCard}
+			</if>
+			<if test="searchParams.phone != null">
+				and phone_ like #{searchParams.phone}
+			</if>
 		</where>
 		<foreach item="sort" collection="sortList"  open="order by" separator=",">
 	        ${sort.name} ${sort.order}

+ 9 - 3
common/target/classes/mapper/base/TechnicianInfo.xml

@@ -209,15 +209,21 @@
 			<if test="searchParams.status != null">
 				and status_ = #{searchParams.status}
 			</if>
-			<if test="searchParams.id != null">
-				and real_name like #{searchParams.id}
-			</if>
 			<if test="searchParams.promoter != null">
 				and promoter_ = #{searchParams.promoter}
 			</if>
 			<if test="searchParams.issue != null">
 				and issue_ = #{searchParams.issue}
 			</if>
+			<if test="searchParams.realName != null">
+				and real_name like #{searchParams.realName}
+			</if>
+			<if test="searchParams.idCard != null">
+				and id_card like #{searchParams.idCard}
+			</if>
+			<if test="searchParams.phone != null">
+				and phone_ like #{searchParams.phone}
+			</if>
 		</where>
 		<foreach item="sort" collection="sortList"  open="order by" separator=",">
 	        ${sort.name} ${sort.order}

+ 39 - 12
web/src/main/java/com/jpsoft/employment/modules/base/controller/TechnicianInfoController.java

@@ -195,33 +195,60 @@ public class TechnicianInfoController {
     @ApiOperation(value="列表")
     @RequestMapping(value = "pageList",method = RequestMethod.POST)
     public MessageResult<Map> pageList(
-            String id,
+            String realName, String idCard, String phone,
             @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
             @RequestParam(value="pageSize",defaultValue="20") int pageSize,
             HttpServletRequest request){
         String subject = (String)request.getAttribute("subject");
-
-        //当前用户ID
-        System.out.println(subject);
-
         MessageResult<Map> msgResult = new MessageResult<>();
 
         Map<String,Object> searchParams = new HashMap<>();
-
-        List<Sort> sortList = new ArrayList<>();
-        sortList.add(new Sort("id_","asc"));
-
-        if (StringUtils.isNotEmpty(id)) {
-            searchParams.put("id","%" + id + "%");
+        if (StringUtils.isNotEmpty(realName)) {
+            searchParams.put("realName","%" + realName + "%");
+        }
+        if (StringUtils.isNotEmpty(idCard)) {
+            searchParams.put("idCard","%" + idCard + "%");
+        }
+        if (StringUtils.isNotEmpty(phone)) {
+            searchParams.put("phone","%" + phone + "%");
         }
 
+        List<Sort> sortList = new ArrayList<>();
+        sortList.add(new Sort("create_time","desc"));
 
         Page<TechnicianInfo> page = technicianInfoService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
 
-
         msgResult.setResult(true);
         msgResult.setData(PojoUtils.pageWrapper(page));
 
         return msgResult;
     }
+
+    @ApiOperation(value="实名认证")
+    @PostMapping("check/{id}")
+    public MessageResult<TechnicianInfo> check(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<TechnicianInfo> msgResult = new MessageResult<>();
+
+        try {
+            TechnicianInfo technicianInfo = technicianInfoService.get(id);
+            technicianInfo.setIsVerified(true);
+            technicianInfo.setUpdateBy(subject);
+            technicianInfo.setUpdateTime(new Date());
+
+            int affectCount = technicianInfoService.update(technicianInfo);
+
+            if (affectCount > 0) {
+                msgResult.setResult(true);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库删除失败");
+            }
+        }
+        catch(Exception ex){
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
 }

BIN
web/target/classes/com/jpsoft/employment/modules/base/controller/TechnicianInfoController.class