Browse Source

微信第三方平台-授权回调

dev_shibei_match
zxc 5 years ago
parent
commit
9a91f7c649
  1. 5
      epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/OpenAppIdFormDTO.java
  2. 5
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/AppLetAuthorizationController.java
  3. 3
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/AppLetAuthorizationService.java
  4. 5
      epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/AppLetAuthorizationServiceImpl.java
  5. 2
      epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/CustomerMpDao.xml

5
epmet-module/epmet-third/epmet-third-client/src/main/java/com/epmet/dto/form/OpenAppIdFormDTO.java

@ -17,4 +17,9 @@ public class OpenAppIdFormDTO implements Serializable {
* 客户端类型 * 客户端类型
*/ */
private String clientType; private String clientType;
/**
* 客户ID
*/
private String customerId;
} }

5
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/controller/AppLetAuthorizationController.java

@ -53,13 +53,12 @@ public class AppLetAuthorizationController {
/** /**
* @Description 查看小程序绑定的开放平台账号 * @Description 查看小程序绑定的开放平台账号
* @param tokenDto
* @param formDTO * @param formDTO
* @author zxc * @author zxc
*/ */
@PostMapping("getopenappidbyauthappid") @PostMapping("getopenappidbyauthappid")
public Result<String> getOpenAppId(@LoginUser TokenDto tokenDto , @RequestBody OpenAppIdFormDTO formDTO){ public Result<String> getOpenAppId( @RequestBody OpenAppIdFormDTO formDTO){
String openAppId = appLetAuthorizationService.getOpenAppId(tokenDto, formDTO); String openAppId = appLetAuthorizationService.getOpenAppId(formDTO);
return new Result<String>().ok(openAppId); return new Result<String>().ok(openAppId);
} }

3
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/AppLetAuthorizationService.java

@ -29,10 +29,9 @@ public interface AppLetAuthorizationService {
/** /**
* @Description 查看小程序绑定的开放平台账号 * @Description 查看小程序绑定的开放平台账号
* @param tokenDto
* @param formDTO * @param formDTO
* @author zxc * @author zxc
*/ */
String getOpenAppId(TokenDto tokenDto, OpenAppIdFormDTO formDTO); String getOpenAppId(OpenAppIdFormDTO formDTO);
} }

5
epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/AppLetAuthorizationServiceImpl.java

@ -102,13 +102,12 @@ public class AppLetAuthorizationServiceImpl implements AppLetAuthorizationServic
/** /**
* @Description 查看小程序绑定的开放平台账号 * @Description 查看小程序绑定的开放平台账号
* @param tokenDto
* @param formDTO * @param formDTO
* @author zxc * @author zxc
*/ */
@Override @Override
public String getOpenAppId(TokenDto tokenDto, OpenAppIdFormDTO formDTO) { public String getOpenAppId(OpenAppIdFormDTO formDTO) {
String customerId = componentVerifyTicketServiceImpl.getLoginUserCustomerId(tokenDto); String customerId = formDTO.getCustomerId();
String clientType = formDTO.getClientType(); String clientType = formDTO.getClientType();
String authAppId = customerMpDao.getAppId(customerId, clientType); String authAppId = customerMpDao.getAppId(customerId, clientType);
Map<String, Object> authInfo = redisThird.getAuthInfo(customerId, clientType); Map<String, Object> authInfo = redisThird.getAuthInfo(customerId, clientType);

2
epmet-module/epmet-third/epmet-third-server/src/main/resources/mapper/CustomerMpDao.xml

@ -135,7 +135,7 @@
WHERE WHERE
del_flag = 0 del_flag = 0
AND customer_id = #{customerId} AND customer_id = #{customerId}
AND client_type = #{clientType} AND client = #{clientType}
</select> </select>
</mapper> </mapper>
Loading…
Cancel
Save