|
|
|
@@ -1,6 +1,9 @@ |
|
|
|
package com.iformall.controller; |
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.google.gson.Gson; |
|
|
|
import com.google.gson.GsonBuilder; |
|
|
|
import com.google.gson.reflect.TypeToken; |
|
|
|
import com.iformall.common.Result; |
|
|
|
import com.iformall.common.ResultData; |
|
|
|
import com.iformall.service.wechat.WxOpenService; |
|
|
|
@@ -43,7 +46,8 @@ public class WechatWeappCodeController { |
|
|
|
@PostMapping("/codeCommit") |
|
|
|
public ResultData codeCommit(Long templateId, String userVersion, String userDesc, String extInfoStr) { |
|
|
|
try { |
|
|
|
WxMaOpenCommitExtInfo extInfo = JSON.parseObject(extInfoStr, WxMaOpenCommitExtInfo.class); |
|
|
|
Gson gson= new GsonBuilder().create(); |
|
|
|
WxMaOpenCommitExtInfo extInfo = gson.fromJson(extInfoStr, new TypeToken<WxMaOpenCommitExtInfo>() { }.getType()); |
|
|
|
WxOpenMaService openMaService = openService.getWxOpenComponentService().getWxMaServiceByAppid(extInfo.getExtAppid()); |
|
|
|
logger.info(extInfo.toString()); |
|
|
|
WxOpenResult openRet = openMaService.codeCommit(templateId, userVersion, userDesc, extInfo); |
|
|
|
|