From e34e91568095f88b3731046d18d776961556e089 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期五, 11 十二月 2020 09:17:32 +0800
Subject: [PATCH] 优化员工认证功能
---
service-user/src/main/java/com/java110/user/api/StaffApi.java | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/service-user/src/main/java/com/java110/user/api/StaffApi.java b/service-user/src/main/java/com/java110/user/api/StaffApi.java
index fc99215..43128f7 100644
--- a/service-user/src/main/java/com/java110/user/api/StaffApi.java
+++ b/service-user/src/main/java/com/java110/user/api/StaffApi.java
@@ -1,6 +1,7 @@
package com.java110.user.api;
import com.alibaba.fastjson.JSONObject;
+import com.java110.dto.app.AppDto;
import com.java110.dto.staffAppAuth.StaffAppAuthDto;
import com.java110.po.staffAppAuth.StaffAppAuthPo;
import com.java110.user.bmo.staffAppAuth.IDeleteStaffAppAuthBMO;
@@ -13,12 +14,7 @@
import com.java110.vo.ResultVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestHeader;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
@RestController
@@ -67,8 +63,8 @@
Assert.hasKeyAndValue(reqJson, "staffId", "璇锋眰鎶ユ枃涓湭鍖呭惈staffId");
Assert.hasKeyAndValue(reqJson, "appType", "璇锋眰鎶ユ枃涓湭鍖呭惈appType");
- Assert.hasKeyAndValue(reqJson, "auId", "auId涓嶈兘涓虹┖");
-
+ Assert.hasKeyAndValue(reqJson, "openId", "璇锋眰鎶ユ枃涓湭鍖呭惈openId");
+ Assert.hasKeyAndValue(reqJson, "state", "璇锋眰鎶ユ枃涓湭鍖呭惈openId");
StaffAppAuthPo staffAppAuthPo = BeanConvertUtil.covertBean(reqJson, StaffAppAuthPo.class);
return updateStaffAppAuthBMOImpl.update(staffAppAuthPo);
@@ -126,9 +122,10 @@
public ResponseEntity<String> generatorQrCode(@RequestHeader(value = "store-id") String storeId,
@RequestHeader(value = "user-id") String userId,
@RequestParam(value = "communityId") String communityId) {
+
String ownerUrl = MappingCache.getValue("OWNER_WECHAT_URL")
+ "/app/staffAuth?storeId=" + storeId + "&staffId=" + userId
- + "&communityId=" + communityId;
+ + "&communityId=" + communityId + "&appId=" + AppDto.WECHAT_OWNER_APP_ID;
return ResultVo.createResponseEntity(ownerUrl);
}
}
--
Gitblit v1.8.0