jzkai há 1 mês atrás
pai
commit
d0ef7b71b4

+ 10 - 12
.idea/workspace.xml

@@ -359,6 +359,7 @@
   <component name="PropertiesComponent">{
   &quot;keyToString&quot;: {
     &quot;ASKED_ADD_EXTERNAL_FILES&quot;: &quot;true&quot;,
+    &quot;RunOnceActivity.ShowReadmeOnStart&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;,
@@ -496,7 +497,15 @@
       <option name="project" value="LOCAL" />
       <updated>1762246781773</updated>
     </task>
-    <option name="localTasksCounter" value="11" />
+    <task id="LOCAL-00011" summary="师傅端移动接口">
+      <option name="closed" value="true" />
+      <created>1762481806091</created>
+      <option name="number" value="00011" />
+      <option name="presentableId" value="LOCAL-00011" />
+      <option name="project" value="LOCAL" />
+      <updated>1762481806091</updated>
+    </task>
+    <option name="localTasksCounter" value="12" />
     <servers />
   </component>
   <component name="TimeTrackingManager">
@@ -607,17 +616,6 @@
     <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" />

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

@@ -99,6 +99,7 @@ public class TechnicianInfo {
 
 	@ApiModelProperty(value = "资质")
 	private String qualification;
+	private List<String> qualificationList;
 
 	@ApiModelProperty(value = "收款户名")
 	private String receiveName;
@@ -127,6 +128,9 @@ public class TechnicianInfo {
 	@ApiModelProperty(value = "奖金发放(0:未发放,1:已发放)")
 	private Boolean issue;
 
+	@ApiModelProperty(value = "资质认证(0:未认证,1:已认证)")
+	private Boolean qualificationStatus;
+
 
 	@Transient
 	@ApiModelProperty(value = "完成单数")

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

@@ -38,6 +38,7 @@
 		<result property="receiptAddress" column="receipt_address" />
 		<result property="promoter" column="promoter_" />
 		<result property="issue" column="issue_" />
+		<result property="qualificationStatus" column="qualification_status" />
 	</resultMap>
 	<insert id="insert" parameterType="com.jpsoft.employment.modules.base.entity.TechnicianInfo">
 	<!--
@@ -47,7 +48,7 @@
 	-->
 	<![CDATA[
 		insert into base_technician_info
-	    (id_,user_name,password_,open_id,phone_,id_card,real_name,region_,image_,gender_,introduction_,service_info,business_scope,id_card_image,is_verified,promo_code,create_time,update_time,del_flag,create_by,update_by,status_,level_,deposit_,qualification_,receive_name,receive_bank,receive_account,receipt_name,receipt_phone,receipt_region,receipt_address,promoter_,issue_)
+	    (id_,user_name,password_,open_id,phone_,id_card,real_name,region_,image_,gender_,introduction_,service_info,business_scope,id_card_image,is_verified,promo_code,create_time,update_time,del_flag,create_by,update_by,status_,level_,deposit_,qualification_,receive_name,receive_bank,receive_account,receipt_name,receipt_phone,receipt_region,receipt_address,promoter_,issue_,qualification_status)
 		values
 		(
 #{id,jdbcType=VARCHAR}
@@ -84,6 +85,7 @@
 ,#{receiptAddress,jdbcType= VARCHAR }
 ,#{promoter,jdbcType= VARCHAR }
 ,#{issue,jdbcType= NUMERIC }
+,#{qualificationStatus,jdbcType= NUMERIC }
 		)
 	]]>
 	</insert>
@@ -153,6 +155,9 @@
 				<if test="updateBy!=null">
 		update_by=#{updateBy,jdbcType=VARCHAR},
 		</if>
+			<if test="status!=null">
+				status_=#{status,jdbcType=VARCHAR},
+			</if>
 			<if test="level!=null">
 				level_=#{level,jdbcType= NUMERIC },
 			</if>
@@ -189,6 +194,9 @@
 			<if test="issue!=null">
 				issue_=#{issue,jdbcType=NUMERIC},
 			</if>
+			<if test="qualificationStatus!=null">
+				qualification_status=#{qualificationStatus,jdbcType=NUMERIC},
+			</if>
 		</set>
 	where id_=#{id}
 	</update>

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

@@ -38,6 +38,7 @@
 		<result property="receiptAddress" column="receipt_address" />
 		<result property="promoter" column="promoter_" />
 		<result property="issue" column="issue_" />
+		<result property="qualificationStatus" column="qualification_status" />
 	</resultMap>
 	<insert id="insert" parameterType="com.jpsoft.employment.modules.base.entity.TechnicianInfo">
 	<!--
@@ -47,7 +48,7 @@
 	-->
 	<![CDATA[
 		insert into base_technician_info
-	    (id_,user_name,password_,open_id,phone_,id_card,real_name,region_,image_,gender_,introduction_,service_info,business_scope,id_card_image,is_verified,promo_code,create_time,update_time,del_flag,create_by,update_by,status_,level_,deposit_,qualification_,receive_name,receive_bank,receive_account,receipt_name,receipt_phone,receipt_region,receipt_address,promoter_,issue_)
+	    (id_,user_name,password_,open_id,phone_,id_card,real_name,region_,image_,gender_,introduction_,service_info,business_scope,id_card_image,is_verified,promo_code,create_time,update_time,del_flag,create_by,update_by,status_,level_,deposit_,qualification_,receive_name,receive_bank,receive_account,receipt_name,receipt_phone,receipt_region,receipt_address,promoter_,issue_,qualification_status)
 		values
 		(
 #{id,jdbcType=VARCHAR}
@@ -84,6 +85,7 @@
 ,#{receiptAddress,jdbcType= VARCHAR }
 ,#{promoter,jdbcType= VARCHAR }
 ,#{issue,jdbcType= NUMERIC }
+,#{qualificationStatus,jdbcType= NUMERIC }
 		)
 	]]>
 	</insert>
@@ -153,6 +155,9 @@
 				<if test="updateBy!=null">
 		update_by=#{updateBy,jdbcType=VARCHAR},
 		</if>
+			<if test="status!=null">
+				status_=#{status,jdbcType=VARCHAR},
+			</if>
 			<if test="level!=null">
 				level_=#{level,jdbcType= NUMERIC },
 			</if>
@@ -189,6 +194,9 @@
 			<if test="issue!=null">
 				issue_=#{issue,jdbcType=NUMERIC},
 			</if>
+			<if test="qualificationStatus!=null">
+				qualification_status=#{qualificationStatus,jdbcType=NUMERIC},
+			</if>
 		</set>
 	where id_=#{id}
 	</update>

+ 93 - 2
web/src/main/java/com/jpsoft/employment/modules/base/controller/TechnicianInfoController.java

@@ -225,8 +225,8 @@ public class TechnicianInfoController {
     }
 
     @ApiOperation(value="实名认证")
-    @PostMapping("check/{id}")
-    public MessageResult<TechnicianInfo> check(@PathVariable("id") String id,@RequestAttribute String subject){
+    @PostMapping("checkedRealName/{id}")
+    public MessageResult<TechnicianInfo> checkedRealName(@PathVariable("id") String id,@RequestAttribute String subject){
         MessageResult<TechnicianInfo> msgResult = new MessageResult<>();
 
         try {
@@ -251,4 +251,95 @@ public class TechnicianInfoController {
 
         return msgResult;
     }
+
+    @ApiOperation(value="入驻认证")
+    @PostMapping("checkedSettleIn/{id}")
+    public MessageResult<TechnicianInfo> checkedSettleIn(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<TechnicianInfo> msgResult = new MessageResult<>();
+
+        try {
+            TechnicianInfo technicianInfo = technicianInfoService.get(id);
+            technicianInfo.setStatus("2");
+            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;
+    }
+
+    @ApiOperation(value="资质认证")
+    @PostMapping("checkedQualification/{id}")
+    public MessageResult<TechnicianInfo> checkedQualification(@PathVariable("id") String id,@RequestAttribute String subject){
+        MessageResult<TechnicianInfo> msgResult = new MessageResult<>();
+
+        try {
+            TechnicianInfo technicianInfo = technicianInfoService.get(id);
+            technicianInfo.setQualificationStatus(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;
+    }
+
+    @ApiOperation(value="获取信息")
+    @GetMapping("detail/{id}")
+    public MessageResult<Map> detail(@PathVariable("id") String id){
+        MessageResult<Map> msgResult = new MessageResult<>();
+        Map<String,Object> map = new HashMap<>();
+
+        try {
+            TechnicianInfo technicianInfo = technicianInfoService.get(id);
+
+            if (technicianInfo != null) {
+                if(StringUtils.isNotEmpty(technicianInfo.getIdCardImage())) {
+                    technicianInfo.setIdCardImageList(Arrays.asList(technicianInfo.getIdCardImage().split(",")));
+                }
+                if(StringUtils.isNotEmpty(technicianInfo.getQualification())) {
+                    technicianInfo.setQualificationList(Arrays.asList(technicianInfo.getQualification().split(",")));
+                }
+                map.put("technician",technicianInfo);
+
+                msgResult.setResult(true);
+                msgResult.setData(map);
+            } else {
+                msgResult.setResult(false);
+                msgResult.setMessage("数据库不存在该记录!");
+            }
+        }
+        catch(Exception ex){
+            logger.error(ex.getMessage(),ex);
+
+            msgResult.setResult(false);
+            msgResult.setMessage(ex.getMessage());
+        }
+
+        return msgResult;
+    }
 }

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