Sfoglia il codice sorgente

openId改为string。

zhengqiang 5 anni fa
parent
commit
4725a0475d

+ 2 - 2
common/src/main/java/com/jpsoft/smart/modules/base/entity/PersonInfo.java

@@ -49,8 +49,8 @@ public class PersonInfo {
 	/**
 	 *微信openId
 	 */
-        @ApiModelProperty(value = "微信openId")
-	private Boolean openId;
+	@ApiModelProperty(value = "微信openId")
+	private String openId;
 	/**
 	 *人脸
 	 */

+ 2 - 2
common/src/main/resources/mapper/base/PersonInfo.xml

@@ -45,7 +45,7 @@
             ,#{name,jdbcType=VARCHAR}
             ,#{phone,jdbcType=VARCHAR}
             ,#{idCard,jdbcType=VARCHAR}
-            ,#{openId,jdbcType= NUMERIC }
+            ,#{openId,jdbcType= VARCHAR }
             ,#{faceEnabled,jdbcType= NUMERIC }
             ,#{cardEnabled,jdbcType= NUMERIC }
             ,#{appEnabled,jdbcType= NUMERIC }
@@ -84,7 +84,7 @@
                 id_card=#{idCard,jdbcType=VARCHAR},
             </if>
             <if test="openId!=null">
-                open_id=#{openId,jdbcType= NUMERIC },
+                open_id=#{openId,jdbcType= VARCHAR },
             </if>
             <if test="faceEnabled!=null">
                 face_enabled=#{faceEnabled,jdbcType= NUMERIC },

+ 6 - 3
web/src/main/java/com/jpsoft/smart/modules/mobile/controller/PersonInfoApiController.java

@@ -149,13 +149,13 @@ public class PersonInfoApiController {
     }
 
     @PostMapping("save")
-    @ApiOperation(value="保存照片信息")
+    @ApiOperation(value="保存人员信息")
     @ApiImplicitParams({
             @ApiImplicitParam(name="personId",value = "人员编号",required = true,paramType = "form"),
             @ApiImplicitParam(name="openId",value = "微信openId",required = true,paramType = "form"),
-            @ApiImplicitParam(name="photoUrl",value = "照片地址",required = true,paramType = "form")
+            @ApiImplicitParam(name="faceImageUrl",value = "照片地址",required = true,paramType = "form")
     })
-    public MessageResult<String> save(Long personId,String photoUrl){
+    public MessageResult<String> save(Long personId,String openId,String faceImageUrl){
         MessageResult<String> messageResult = new MessageResult<>();
 
         try {
@@ -165,6 +165,9 @@ public class PersonInfoApiController {
                 throw new Exception("人员信息不存在!");
             }
 
+            personInfo.setOpenId(openId);
+            personInfo.setFaceImageUrl(faceImageUrl);
+
             messageResult.setResult(true);
             messageResult.setCode(200);
         } catch (Exception e) {