Browse Source

Merge branch 'master' of http://192.168.20.122:3000/root/qiyewechatApp

 Conflicts:
	ymall/src/main/resources/application-pgtest.properties
chenhongzhou1 4 years ago
parent
commit
e90d05fa5b

+ 27 - 36
ymall/src/main/java/com/liangjian11/ymall/controller/common/WechatController.java

@@ -127,54 +127,45 @@ public class WechatController {
     }else{
       MongoDBUtil.updateVLoginTOken(calendar.getTime(),userAccount.getId(),loginToken);
     }
-    if (netLoginVideoAccess.contains(redirectCode)) {
-      Cookie cookie0 = new Cookie("loginTokenAccount", userAccount.getId());
-      cookie0.setPath("/");
-      cookie0.setMaxAge(24 * 60 * 60);
-      cookie0.setDomain("360lj.com");
-      response.addCookie(cookie0);
-      Cookie cookie1 = new Cookie("LoginToken", loginToken);
-      cookie1.setPath("/");
-      cookie1.setMaxAge(24 * 60 * 60);
-      cookie1.setDomain("360lj.com");
-      response.addCookie(cookie1);
-      if (identity.equals(0)) {  //用户授权
-        if (StringUtils.isBlank(userAccount.getNickname())) {
-		  String url = redirectPathSource.getRedirectPath(redirectCode, userAccount, id);
-		  logger.debug("将跳转至:"+url);
-          response.sendRedirect(url);
-          return;
-        }
-	    String url = redirectPathSource.getRedirectPath(redirectCode, null, "");
-	    logger.debug("将跳转至:"+url);
-        response.sendRedirect(url);
-        return;
-      }
-      return;
-    }
-
-    //原.net授权
-    JSONObject userInfoJson1 = WechatHandle.getUserInfo(openid, appid, secret, code);
-    UserAccount user = userAccountService.checkAccountByUnionid(userInfoJson1);
-    Cookie cookie1 = new Cookie("loginTokenAccount", user.getId());
+    Cookie cookie0 = new Cookie("loginTokenAccount", userAccount.getId());
+    cookie0.setPath("/");
+    cookie0.setMaxAge(24 * 60 * 60);
+    cookie0.setDomain("360lj.com");
+    response.addCookie(cookie0);
+    Cookie cookie1 = new Cookie("LoginToken", loginToken);
     cookie1.setPath("/");
     cookie1.setMaxAge(24 * 60 * 60);
     cookie1.setDomain("360lj.com");
     response.addCookie(cookie1);
+//    if (netLoginVideoAccess.contains(redirectCode)) {
+//      if (identity.equals(0)) {  //用户授权
+//        if (StringUtils.isBlank(userAccount.getNickname())) {
+//          String url = redirectPathSource.getRedirectPath(redirectCode, userAccount, id);
+//          logger.debug("将跳转至:" + url);
+//          response.sendRedirect(url);
+//          return;
+//        }
+//      }
+//      String url = redirectPathSource.getRedirectPath(redirectCode, null, "");
+//      logger.debug("将跳转至:"+url);
+//      response.sendRedirect(url);
+//      return;
+//    }
+
     if (identity.equals(0)) {  //用户授权
-      if (StringUtils.isBlank(user.getNickname())) {
-        response.sendRedirect(redirectPathSource.getRedirectPath(redirectCode, user, id));
+      if (StringUtils.isBlank(userAccount.getNickname())) {
+        response.sendRedirect(redirectPathSource.getRedirectPath(redirectCode, userAccount, id));
         return;
       }
       response.sendRedirect(redirectPathSource.getRedirectPath(redirectCode, null, ""));
       return;
     } else if(identity.equals(1) || identity.equals(2)){ //医生合伙人授权
-      userRoleService.checkRole(identity, user, id, redirectCode, response);
+      userRoleService.checkRole(identity, userAccount, id, redirectCode, response);
       return;
     }
 
 		// 判断是否有该用户,如果有跳转个人中心,没有则跳转注册页面
-		if (user == null) {
+		if (userAccount == null) {
 			JSONObject userInfo = WechatHandle.getUserInfo(openid, appid, secret, code);
 			userAccountService.create(userInfo);
 			logger.info("将跳转至: " + fillInfoPath);
@@ -182,13 +173,13 @@ public class WechatController {
 			response.getWriter().print(html);
 			return;
 		}
-		if (StringUtils.isBlank(user.getMobile())) {
+		if (StringUtils.isBlank(userAccount.getMobile())) {
 			logger.info("将跳转至: " + fillInfoPath);
 			String html = "<script type='text/javascript'>location.href='" + fillInfoPath + "';</script>";
 			response.getWriter().print(html);
 			return;
 		}
-		String otherRedirectPath = redirectPathSource.getRedirectPath(redirectCode, user, id);
+		String otherRedirectPath = redirectPathSource.getRedirectPath(redirectCode, userAccount, id);
 		logger.info("将跳转至: " + otherRedirectPath);
 		String html = "<script type='text/javascript'>" +
 				"location.href='" + otherRedirectPath + "';" +

+ 19 - 19
ymall/src/main/resources/application-pgprodtest.properties

@@ -42,26 +42,26 @@ domain.mpcpzuul= http://mem.360lj.com:13000
 #ymall.secret= ea186d9f2941b5cd88004e339a4ec479
 ymall.appid= wxa9fef05eee8dae34
 ymall.secret= b7c3b15b2933dce80135b39a7d366832
-ymall.path.fillInfo= https://mem.360lj.com/uip/#/doctorRegister
-ymall.path.doctorFlow= https://mem.360lj.com/uip/#/doctorFlow
-ymall.path.personalInfo= https://mem.360lj.com/uip/#/doctorMine
+ymall.path.fillInfo= https://mem.360lj.com/ui/#/doctorRegister
+ymall.path.doctorFlow= https://mem.360lj.com/ui/#/doctorFlow
+ymall.path.personalInfo= https://mem.360lj.com/ui/#/doctorMine
 ymall.path.queryExpress= https://m.360lj.com/nhome/express
-ymall.path.guideFlow= https://mem.360lj.com/uip/#/h5Flow
-ymall.path.activityhelpPage= https://mem.360lj.com/uip/#/friendsHelp
-ymall.path.activityIndex= https://mem.360lj.com/uip/#/myHelp
-ymall.path.specialist= https://mem.360lj.com/uip/#/specialist
-ymall.path.shortVideo=https://mem.360lj.com/uip/#/shortVideo
-ymall.path.selectRoles= https://mem.360lj.com/uip/#/selectRoles
-ymall.path.signUp= https://mem.360lj.com/uip/#/SignUp
-ymall.path.doctorDeactivation= https://mem.360lj.com/uip/#/doctorMine
-ymall.path.doctorToBeCertified= https://mem.360lj.com/uip/#/doctorFlow
-ymall.path.doctorHome= https://mem.360lj.com/uip/#/doctorMine
-ymall.path.partnerDeactivation= https://mem.360lj.com/uip/#/PartnerDeactivation
-ymall.path.partnerToBeCertified= https://mem.360lj.com/uip/#/PartnerToBeCertified
-ymall.path.partnerHome= https://mem.360lj.com/uip/#/PartnerHome
-ymall.path.noFollow= https://mem.360lj.com/uip/#/NoFollow
-ymall.path.myProfitIndex= https://mem.360lj.com/uip/#/MyProfitIndex
-ymall.path.frontHost= https://mem.360lj.com/uip
+ymall.path.guideFlow= https://mem.360lj.com/ui/#/h5Flow
+ymall.path.activityhelpPage= https://mem.360lj.com/ui/#/friendsHelp
+ymall.path.activityIndex= https://mem.360lj.com/ui/#/myHelp
+ymall.path.specialist= https://mem.360lj.com/ui/#/specialist
+ymall.path.shortVideo=https://mem.360lj.com/ui/#/shortVideo
+ymall.path.selectRoles= https://mem.360lj.com/ui/#/selectRoles
+ymall.path.signUp= https://mem.360lj.com/ui/#/SignUp
+ymall.path.doctorDeactivation= https://mem.360lj.com/ui/#/doctorMine
+ymall.path.doctorToBeCertified= https://mem.360lj.com/ui/#/doctorFlow
+ymall.path.doctorHome= https://mem.360lj.com/ui/#/doctorMine
+ymall.path.partnerDeactivation= https://mem.360lj.com/ui/#/PartnerDeactivation
+ymall.path.partnerToBeCertified= https://mem.360lj.com/ui/#/PartnerToBeCertified
+ymall.path.partnerHome= https://mem.360lj.com/ui/#/PartnerHome
+ymall.path.noFollow= https://mem.360lj.com/ui/#/NoFollow
+ymall.path.myProfitIndex= https://mem.360lj.com/ui/#/MyProfitIndex
+ymall.path.frontHost= https://mem.360lj.com/ui
 
 
 #\u5C0F\u7A0B\u5E8Fappid\u548C\u5BC6\u94A5

+ 23 - 23
ymall/src/main/resources/application-pgtest.properties

@@ -18,6 +18,12 @@ spring.druid.maxPoolPreparedStatementPerConnectionSize= 20
 spring.druid.filters= stat,wall,slf4j
 spring.druid.connectionProperties= druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
 
+mongodb.port=27018
+mongodb.host=192.168.50.41
+mongodb.username=
+mongodb.password=
+mongodb.database=
+
 #\u670D\u52A1\u540D
 spring.application.name = ymall
 
@@ -36,27 +42,27 @@ domain.mpcpzuul= http://192.168.50.32:13001
 # \u91CD\u5B9A\u5411\u8DEF\u5F84
 ymall.appid= wx4f8c9fef3896ad71
 ymall.secret= ea186d9f2941b5cd88004e339a4ec479
-ymall.path.fillInfo= https://mem.360lj.com/ui/#/doctorRegister
-ymall.path.doctorFlow= https://mem.360lj.com/ui/#/doctorFlow
-ymall.path.personalInfo= https://mem.360lj.com/ui/#/doctorMine
+ymall.path.fillInfo= https://mem.360lj.com/ui2/#/doctorRegister
+ymall.path.doctorFlow= https://mem.360lj.com/ui2/#/doctorFlow
+ymall.path.personalInfo= https://mem.360lj.com/ui2/#/doctorMine
 ymall.path.queryExpress= https://m.360lj.com/nhome/express
-ymall.path.guideFlow= https://mem.360lj.com/ui/#/h5Flow
-ymall.path.activityhelpPage= https://mem.360lj.com/ui/#/friendsHelp
-ymall.path.activityIndex= https://mem.360lj.com/ui/#/myHelp
+ymall.path.guideFlow= https://mem.360lj.com/ui2/#/h5Flow
+ymall.path.activityhelpPage= https://mem.360lj.com/ui2/#/friendsHelp
+ymall.path.activityIndex= https://mem.360lj.com/ui2/#/myHelp
 ymall.path.specialist= https://mem.360lj.com/ui2/#/specialist
 ymall.path.shortVideo=https://mem.360lj.com/ui2/#/shortVideo
-ymall.path.selectRoles= https://mem.360lj.com/ui/#/selectRoles
-ymall.path.signUp= https://mem.360lj.com/ui/#/SignUp
-ymall.path.doctorDeactivation= https://mem.360lj.com/ui/#/doctorMine
-ymall.path.doctorToBeCertified= https://mem.360lj.com/ui/#/doctorFlow
+ymall.path.selectRoles= https://mem.360lj.com/ui2/#/selectRoles
+ymall.path.signUp= https://mem.360lj.com/ui2/#/SignUp
+ymall.path.doctorDeactivation= https://mem.360lj.com/ui2/#/doctorMine
+ymall.path.doctorToBeCertified= https://mem.360lj.com/ui2/#/doctorFlow
 #ymall.path.doctorHome= https://mem.360lj.com/ui/#/DoctorHome
-ymall.path.doctorHome= https://mem.360lj.com/ui/#/doctorMine
-ymall.path.partnerDeactivation= https://mem.360lj.com/ui/#/PartnerDeactivation
-ymall.path.partnerToBeCertified= https://mem.360lj.com/ui/#/PartnerToBeCertified
-ymall.path.partnerHome= https://mem.360lj.com/ui/#/PartnerHome
-ymall.path.noFollow= https://mem.360lj.com/ui/#/NoFollow
-ymall.path.myProfitIndex= https://mem.360lj.com/ui/#/MyProfitIndex
-ymall.path.frontHost= https://mem.360lj.com/ui
+ymall.path.doctorHome= https://mem.360lj.com/ui2/#/doctorMine
+ymall.path.partnerDeactivation= https://mem.360lj.com/ui2/#/PartnerDeactivation
+ymall.path.partnerToBeCertified= https://mem.360lj.com/ui2/#/PartnerToBeCertified
+ymall.path.partnerHome= https://mem.360lj.com/ui2/#/PartnerHome
+ymall.path.noFollow= https://mem.360lj.com/ui2/#/NoFollow
+ymall.path.myProfitIndex= https://mem.360lj.com/ui2/#/MyProfitIndex
+ymall.path.frontHost= https://mem.360lj.com/ui2
 
 #\u5C0F\u7A0B\u5E8Fappid\u548C\u5BC6\u94A5
 ymall.miniappid= wxa9fef05eee8dae34
@@ -83,9 +89,3 @@ cron.doctorRegister01= 0 0 9,17 * * ?
 cron.doctorRegister02= 0 30 13 * * ?
 # \u624B\u673A\u53F7,\u533B\u751F\u5BA1\u6838\u4FE1\u606F\u63D0\u9192\uFF0C\u591A\u4E2A\u7528,\u9694\u5F00
 phone.doctorRegister= 15347409413,13679724847
-
-mongodb.host=192.168.50.41
-mongodb.port=27018
-mongodb.database=
-mongodb.username=
-mongodb.password=