Просмотр исходного кода

[微信第三方登录][修改]:code提交检查用户提交version

release_toaliyun_real
Stormeye Wu 7 лет назад
Родитель
Сommit
53bda15e48
2 измененных файлов: 31 добавлений и 4 удалений
  1. +8
    -4
      mallinkWechatOpen/src/main/java/com/iformall/controller/WechatWeappCodeController.java
  2. +23
    -0
      mallinkWechatOpen/src/main/java/com/iformall/controller/WxWeappInfoController.java

+ 8
- 4
mallinkWechatOpen/src/main/java/com/iformall/controller/WechatWeappCodeController.java Просмотреть файл

@@ -10,10 +10,7 @@ import com.iformall.common.ResultData;
import com.iformall.domain.po.WxAppinfo; import com.iformall.domain.po.WxAppinfo;
import com.iformall.domain.po.WxAuthorizerInfo; import com.iformall.domain.po.WxAuthorizerInfo;
import com.iformall.domain.po.WxWeappCodeStatus; import com.iformall.domain.po.WxWeappCodeStatus;
import com.iformall.enums.EnumWeappAuditStatus;
import com.iformall.enums.EnumWeappCodeCommitStatus;
import com.iformall.enums.EnumWeappReleaseStatus;
import com.iformall.enums.EnumWxAuthorizationStatus;
import com.iformall.enums.*;
import com.iformall.service.WxAppinfoService; import com.iformall.service.WxAppinfoService;
import com.iformall.service.WxAuthorizerInfoService; import com.iformall.service.WxAuthorizerInfoService;
import com.iformall.service.WxWeappCodeStatusService; import com.iformall.service.WxWeappCodeStatusService;
@@ -81,6 +78,13 @@ public class WechatWeappCodeController {


WxAppinfo appinfo = appinfoService.getByAppId(appId); WxAppinfo appinfo = appinfoService.getByAppId(appId);


int iAppType = 0;
String appTypeStr = userVersion.substring(0, 1);
if(appTypeStr.equalsIgnoreCase("C"))
iAppType = EnumAppType.C.getCode();
else if(appTypeStr.equalsIgnoreCase("B"))
iAppType = EnumAppType.B.getCode();

try { try {
// code提交 // code提交
WxOpenMaService openMaService = openService.getWxOpenComponentService().getWxMaServiceByAppid(appId); WxOpenMaService openMaService = openService.getWxOpenComponentService().getWxMaServiceByAppid(appId);


+ 23
- 0
mallinkWechatOpen/src/main/java/com/iformall/controller/WxWeappInfoController.java Просмотреть файл

@@ -354,6 +354,17 @@ public class WxWeappInfoController extends BaseController {
private void codeOperation(String appId, String userVersion, String userDesc, Long templateId) { private void codeOperation(String appId, String userVersion, String userDesc, Long templateId) {
WxAppinfo appinfo = appinfoService.getByAppId(appId); WxAppinfo appinfo = appinfoService.getByAppId(appId);


int iAppType = 0;
String appTypeStr = userVersion.substring(0, 1);
if(appTypeStr.equalsIgnoreCase("C"))
iAppType = EnumAppType.C.getCode();
else if(appTypeStr.equalsIgnoreCase("B"))
iAppType = EnumAppType.B.getCode();
if(!appinfo.getType().equals(iAppType)) {
// 如果版本号与小程序的类型不一致,不提交版本
return;
}

// get ext json // get ext json
WxWeappExtSet extSetQ = new WxWeappExtSet(); WxWeappExtSet extSetQ = new WxWeappExtSet();
extSetQ.setAppId(appId); extSetQ.setAppId(appId);
@@ -424,6 +435,18 @@ public class WxWeappInfoController extends BaseController {
private void codeCommit(String appId, String userVersion, String userDesc, Long templateId) { private void codeCommit(String appId, String userVersion, String userDesc, Long templateId) {
WxAppinfo appinfo = appinfoService.getByAppId(appId); WxAppinfo appinfo = appinfoService.getByAppId(appId);


int iAppType = 0;
String appTypeStr = userVersion.substring(0, 1);
if(appTypeStr.equalsIgnoreCase("C"))
iAppType = EnumAppType.C.getCode();
else if(appTypeStr.equalsIgnoreCase("B"))
iAppType = EnumAppType.B.getCode();

if(!appinfo.getType().equals(iAppType)) {
// 如果版本号与小程序的类型不一致,不提交版本
return;
}

// get ext json // get ext json
WxWeappExtSet extSetQ = new WxWeappExtSet(); WxWeappExtSet extSetQ = new WxWeappExtSet();
extSetQ.setAppId(appId); extSetQ.setAppId(appId);


Загрузка…
Отмена
Сохранить