Browse Source

Merge branch 'dev' of ssh://10.10.100.21/source/smartschool-platform into dev

guq 6 years ago
parent
commit
7ac8b0977c
21 changed files with 76 additions and 73 deletions
  1. 1 0
      applications/school/school-server/pom.xml
  2. 1 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxMeetingServiceImpl.java
  3. 1 1
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxNotifyServiceImpl.java
  4. 2 2
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxOaApproveServiceImpl.java
  5. 1 1
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxOaLeaveServiceImpl.java
  6. 1 1
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxPrincipalMailboxServiceImpl.java
  7. 1 1
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxTaskNotifyServiceImpl.java
  8. 34 15
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxVoteServiceImpl.java
  9. 1 1
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/support/RemindTask.java
  10. 0 4
      applications/school/school-server/src/main/resources/config/application-docker-prod.yml
  11. 0 26
      applications/wechat/wechat-api/pom.xml
  12. 2 1
      applications/wechat/wechat-api/src/main/java/com/usoftchina/smartschool/wechat/api/WxPushApi.java
  13. 17 2
      applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/WechatApplication.java
  14. 1 1
      applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/controller/WxPushController.java
  15. 1 1
      applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/WxPushService.java
  16. 2 2
      applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/impl/WxPushServiceImpl.java
  17. 0 8
      applications/wechat/wechat-server/src/main/resources/application.yml
  18. 2 2
      base-servers/gateway-server/src/main/java/com/usoftchina/smartschool/gateway/config/AuthFilter.java
  19. 4 2
      frontend/wechat-web/src/configs/api.config.js
  20. 1 1
      frontend/wechat-web/src/modules/accountBind/BindMenu.jsx
  21. 3 1
      frontend/wechat-web/src/redux/reducers/redUserInfo.js

+ 1 - 0
applications/school/school-server/pom.xml

@@ -12,6 +12,7 @@
     <artifactId>school-server</artifactId>
 
     <dependencies>
+
         <dependency>
             <groupId>com.usoftchina.smartschool</groupId>
             <artifactId>server-starter</artifactId>

+ 1 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxMeetingServiceImpl.java

@@ -13,6 +13,7 @@ import com.usoftchina.smartschool.school.wxschool.basic.service.WxMeetingService
 import com.usoftchina.smartschool.school.wxschool.support.RemindTask;
 import com.usoftchina.smartschool.school.wxschool.utils.DateFormatUtil;
 import com.usoftchina.smartschool.school.wxschool.utils.ObjectUtils;
+
 import com.usoftchina.smartschool.wechat.api.WxPushApi;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;

+ 1 - 1
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxNotifyServiceImpl.java

@@ -105,7 +105,7 @@ public class WxNotifyServiceImpl implements WxNotifyService {
 					notifyrecordsMapper.save(notifyrecordsDO);
 					ParentsDO parentsDO = wxParentsMapper.get(l);
 					SchoolDO schoolDO = wxSchoolMapper.get(parentsDO.getSchoolId());
-					wxPushApi.wxPush(schoolDO.getSchoolAppid(),schoolDO.getSchoolSecret(),parentsDO.getOpenid(), "h0BkcnTo24b2jsficMeVO0B17GvE-VzlPvF0fVXea4w", "您好,您有一条通知", schoolDO.getSchoolName(),teacherMapper.get(notifyCreator).getTeacherName(),format.format(new Date()),notifyDetails, "点击查看详情", "");
+					this.wxPushApi.wxPush(schoolDO.getSchoolAppid(),schoolDO.getSchoolSecret(),parentsDO.getOpenid(), "h0BkcnTo24b2jsficMeVO0B17GvE-VzlPvF0fVXea4w", "您好,您有一条通知", schoolDO.getSchoolName(),teacherMapper.get(notifyCreator).getTeacherName(),format.format(new Date()),notifyDetails, "点击查看详情", "");
 				}
 			}
 			return "创建成功";

+ 2 - 2
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxOaApproveServiceImpl.java

@@ -77,9 +77,9 @@ public class WxOaApproveServiceImpl implements WxOaApproveService {
 						oaArticlesMapper.save(articles);
 					}
 				}
-				wxPushApi.wxPush(schoolDO.getSchoolAppid(),schoolDO.getSchoolSecret(),teacherDO.getOpenid(),"ohqfldHKfEmZPrLthLYt3h5SEjqd0AY7UFdngTDLTFY","您有一个待审批事项",approveTitle,teacher.getTeacherName(),format.format(new Date()),approveDetails,"点击查看详情","");
+				this.wxPushApi.wxPush(schoolDO.getSchoolAppid(),schoolDO.getSchoolSecret(),teacherDO.getOpenid(),"ohqfldHKfEmZPrLthLYt3h5SEjqd0AY7UFdngTDLTFY","您有一个待审批事项",approveTitle,teacher.getTeacherName(),format.format(new Date()),approveDetails,"点击查看详情","");
 			}else {
-				wxPushApi.wxPush(schoolDO.getSchoolAppid(),schoolDO.getSchoolSecret(),teacherDO.getOpenid(),"ohqfldHKfEmZPrLthLYt3h5SEjqd0AY7UFdngTDLTFY","您有一个待审批事项",approveTitle,teacher.getTeacherName(),format.format(new Date()),approveDetails,"点击查看详情","");
+				this.wxPushApi.wxPush(schoolDO.getSchoolAppid(),schoolDO.getSchoolSecret(),teacherDO.getOpenid(),"ohqfldHKfEmZPrLthLYt3h5SEjqd0AY7UFdngTDLTFY","您有一个待审批事项",approveTitle,teacher.getTeacherName(),format.format(new Date()),approveDetails,"点击查看详情","");
 			}
 			return i;
 		}else {

+ 1 - 1
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxOaLeaveServiceImpl.java

@@ -67,7 +67,7 @@ public class WxOaLeaveServiceImpl implements WxOaLeaveService {
 				for (Long teacherId:longs) {
 					TeacherDO teacherDO = teacherMapper.get(teacherId);
 					SchoolDO schoolDO = wxSchoolMapper.get(teacherDO.getSchoolId());
-					wxPushApi.wxPush(schoolDO.getSchoolAppid(),schoolDO.getSchoolSecret(),teacherDO.getOpenid(), "QC8H4hQd1Fh0wqaaE3mbAxvoBC6y-XkHctIe8Kx6gcA", "您好,您有一个来自家长的请假申请",studentMapper.get(lvProposer).getStuName(), json.getString("startDate")+"-"+json.getString("endDate"), leave.getLvDetails(),"-", "点击查看详情", "");
+					this.wxPushApi.wxPush(schoolDO.getSchoolAppid(),schoolDO.getSchoolSecret(),teacherDO.getOpenid(), "QC8H4hQd1Fh0wqaaE3mbAxvoBC6y-XkHctIe8Kx6gcA", "您好,您有一个来自家长的请假申请",studentMapper.get(lvProposer).getStuName(), json.getString("startDate")+"-"+json.getString("endDate"), leave.getLvDetails(),"-", "点击查看详情", "");
 				}
 				return "申请成功";
 			}else {

+ 1 - 1
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxPrincipalMailboxServiceImpl.java

@@ -55,7 +55,7 @@ public class WxPrincipalMailboxServiceImpl implements WxPrincipalMailboxService
 			SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
 			SchoolDO schoolDO = schoolMapper.get(schoolId);
 			TeacherDO teacherDO = teacherMapper.get(principalMailboxDO.getNotifier());
-			wxPushApi.wxPush(schoolDO.getSchoolAppid(),schoolDO.getSchoolSecret(),teacherDO.getOpenid(), "h0BkcnTo24b2jsficMeVO0B17GvE-VzlPvF0fVXea4w", "您有一个新的邮件通知",schoolDO.getSchoolName(),parentsMapper.get(principalMailboxDO.getMailboxCreator()).getParentsName(), simpleDateFormat.format(new Date()), principalMailboxDO.getMailboxContext(),"点击查看详情", "");
+			this.wxPushApi.wxPush(schoolDO.getSchoolAppid(),schoolDO.getSchoolSecret(),teacherDO.getOpenid(), "h0BkcnTo24b2jsficMeVO0B17GvE-VzlPvF0fVXea4w", "您有一个新的邮件通知",schoolDO.getSchoolName(),parentsMapper.get(principalMailboxDO.getMailboxCreator()).getParentsName(), simpleDateFormat.format(new Date()), principalMailboxDO.getMailboxContext(),"点击查看详情", "");
 			return principalMailboxDO.getMailboxId();
 		}else {
 			throw new Exception("提交失败,请重新提交");

+ 1 - 1
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxTaskNotifyServiceImpl.java

@@ -75,7 +75,7 @@ public class WxTaskNotifyServiceImpl implements WxTaskNotifyService {
 				SchoolDO schoolDO = wxSchoolMapper.get(schoolId);
 				List<Long> longs = JSON.parseArray(taskNotifier, Long.class);
 				for (Long parentId:longs) {
-					wxPushApi.wxPush(schoolDO.getSchoolAppid(),schoolDO.getSchoolSecret(),parentsMapper.get(parentId).getOpenid(), "WwKtiHd4lso9axuavfLdpHIVbzTiopOTyh_uCsL3ZI8",taskTitle,"-",format.format(new Date()), taskContext,"-", "点击查看详情", "");
+					this.wxPushApi.wxPush(schoolDO.getSchoolAppid(),schoolDO.getSchoolSecret(),parentsMapper.get(parentId).getOpenid(), "WwKtiHd4lso9axuavfLdpHIVbzTiopOTyh_uCsL3ZI8",taskTitle,"-",format.format(new Date()), taskContext,"-", "点击查看详情", "");
 				}
 			}
 			return "作业发布成功";

+ 34 - 15
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxVoteServiceImpl.java

@@ -8,10 +8,12 @@ import com.usoftchina.smartschool.school.wxschool.mapper.*;
 import com.usoftchina.smartschool.school.wxschool.support.RemindTaskVote;
 import com.usoftchina.smartschool.school.wxschool.utils.DateFormatUtil;
 import com.usoftchina.smartschool.school.wxschool.utils.ObjectUtils;
+import com.usoftchina.smartschool.wechat.api.WxPushApi;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.text.SimpleDateFormat;
 import java.util.*;
 
 
@@ -32,6 +34,18 @@ public class WxVoteServiceImpl implements WxVoteService {
 	@Autowired
 	private WxTeacherMapper teacherMapper;
 
+	@Autowired
+	private WxPushApi wxPushApi;
+
+	@Autowired
+	private WxSchoolMapper wxSchoolMapper;
+
+	@Autowired
+	private WxParentsStuMapper wxParentsStuMapper;
+
+	@Autowired
+	private WxParentsMapper wxParentsMapper;
+
 
 	/** 创建投票单 */
 	public String voteCreate(String voteString) throws Exception {
@@ -79,24 +93,29 @@ public class WxVoteServiceImpl implements WxVoteService {
 				timer.schedule(new RemindTaskVote(voteMapper,vote.getVoteId()),DateFormatUtil.string2Date(voteEndDate));
 			}
 			List<Long> teacherId = JSON.parseArray(teacherIds, Long.class);
-			List<Long> list = removeDuplicate(teacherId);
+			if (ObjectUtils.isNotEmpty(teacherId)){
+				List<Long> list = removeDuplicate(teacherId);
+				for (Long ll:list) {
+					TeacherDO teacherDO = teacherMapper.get(ll);
+					SchoolDO schoolDO = wxSchoolMapper.get(teacherDO.getSchoolId());
+					SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+					this.wxPushApi.wxPush(schoolDO.getSchoolAppid(),schoolDO.getSchoolSecret(),teacherDO.getOpenid(),"h0BkcnTo24b2jsficMeVO0B17GvE-VzlPvF0fVXea4w","有一个投票单需要您的支持",schoolDO.getSchoolName(),teacherMapper.get(creator).getTeacherName(),format.format(new Date()),vote.getVoteName(),"点击查看详情","");
+				}
+			}
 			List<Long> stuId = JSON.parseArray(stuIds, Long.class);
 			List<Long> list1 = removeDuplicate(stuId);
-			/*for (int j = 0; j <list.size() ; j++) {
-				Long teacherId = list.get(j);
-				SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
-				if (ObjectUtils.isNotEmpty(user)){
-					String userOpenid = user.getUserOpenid();
-					if (ObjectUtils.isNotEmpty(userOpenid)){
-						userService.wxPush(userOpenid,"h0BkcnTo24b2jsficMeVO0B17GvE-VzlPvF0fVXea4w","有一个投票单需要您的支持",schoolMapper.selectSchoolById(userMapper.selectUserById(votes.getLong("creator")).getSchoolId()).getSchName(),userMapper.selectUserById(votes.getLong("creator")).getUserName(),format.format(new Date()),vote.getVoteName(),"点击查看详情","https://www.akuiguoshu.com/smart-school/classRechargeDetail/"+userId+"/"+vote.getVoteId());
-					}*//*else {
-						throw new Exception("请关注智慧校园公众号");
-					}*//*
-				}else {
-					throw new Exception("用户不存在");
+			new ArrayList<Long>();
+			for (Long l:list1) {
+				List<ParentsStuDO> parentsStuDOS = wxParentsStuMapper.listByStuId(l);
+				if (parentsStuDOS.size() > 0) {
+					for (ParentsStuDO ps : parentsStuDOS) {
+						ParentsDO parentsDO = wxParentsMapper.get(ps.getParentId());
+						SchoolDO schoolDO = wxSchoolMapper.get(parentsDO.getSchoolId());
+						SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+						this.wxPushApi.wxPush(schoolDO.getSchoolAppid(), schoolDO.getSchoolSecret(), parentsDO.getOpenid(), "h0BkcnTo24b2jsficMeVO0B17GvE-VzlPvF0fVXea4w", "有一个投票单需要您的支持", schoolDO.getSchoolName(), teacherMapper.get(creator).getTeacherName(), format.format(new Date()), vote.getVoteName(), "点击查看详情", "");
+					}
 				}
-
-			}*/
+			}
 			return "创建成功";
 		}else {
 			throw new Exception("创建失败");

+ 1 - 1
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/support/RemindTask.java

@@ -53,7 +53,7 @@ public class RemindTask extends TimerTask {
                 List<Long> list = removeDuplicate(longs);
                 for (Long teacherId:list) {
                     SchoolDO schoolDO = wxSchoolMapper.get(meetingDO.getSchoolId());
-                    wxPushApi.wxPush(schoolDO.getSchoolAppid(),schoolDO.getSchoolSecret(),teacherMapper.get(teacherId).getOpenid(), "_hX_lGEG1W1bJmW37VBaPYQoLrRrUAlNCSScezZQQWk","您好,您有一条新的会议通知", meetingDO.getMeetingName(),simpleDateFormat.format(meetingDO.getStartDate()),meetingDO.getMeetingAddress(),"-", "点击查看详情", "");
+                    this.wxPushApi.wxPush(schoolDO.getSchoolAppid(),schoolDO.getSchoolSecret(),teacherMapper.get(teacherId).getOpenid(), "_hX_lGEG1W1bJmW37VBaPYQoLrRrUAlNCSScezZQQWk","您好,您有一条新的会议通知", meetingDO.getMeetingName(),simpleDateFormat.format(meetingDO.getStartDate()),meetingDO.getMeetingAddress(),"-", "点击查看详情", "");
                 }
 
             }

+ 0 - 4
applications/school/school-server/src/main/resources/config/application-docker-prod.yml

@@ -12,10 +12,6 @@ spring:
     virtual-host: school
     username: school
     password: select123***
-  datasource:
-    url: jdbc:mysql://10.10.100.18:3306/saas_biz?characterEncoding=utf-8&useSSL=false&allowMultiQueries=true
-    username: root
-    password: select111***
   redis:
     host: 10.10.100.173
     port: 6379

+ 0 - 26
applications/wechat/wechat-api/pom.xml

@@ -11,27 +11,7 @@
 
     <artifactId>wechat-api</artifactId>
 
-    <properties>
-        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-        <maven.compiler.source>1.8</maven.compiler.source>
-        <maven.compiler.target>1.8</maven.compiler.target>
-        <junit.version>4.12</junit.version>
-        <lombok.version>1.16.22</lombok.version>
-    </properties>
-
     <dependencies>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>${junit.version}</version>
-            <scope>test</scope>
-        </dependency>
-
-        <dependency>
-            <groupId>org.projectlombok</groupId>
-            <artifactId>lombok</artifactId>
-            <version>${lombok.version}</version>
-        </dependency>
         <dependency>
             <groupId>org.springframework.cloud</groupId>
             <artifactId>spring-cloud-starter-openfeign</artifactId>
@@ -40,11 +20,5 @@
             <groupId>com.usoftchina.smartschool</groupId>
             <artifactId>core</artifactId>
         </dependency>
-        <dependency>
-            <groupId>com.thoughtworks.xstream</groupId>
-            <artifactId>xstream</artifactId>
-            <version>1.4.9</version>
-        </dependency>
-
     </dependencies>
 </project>

+ 2 - 1
applications/wechat/wechat-api/src/main/java/com/usoftchina/smartschool/wechat/api/WxPushApi.java

@@ -1,5 +1,6 @@
 package com.usoftchina.smartschool.wechat.api;
 
+
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestParam;
@@ -12,4 +13,4 @@ public interface WxPushApi {
                          @RequestParam("title")String title, @RequestParam("keyword1")String keyword1, @RequestParam("keyword2")String keyword2, @RequestParam("keyword3")String keyword3,
                          @RequestParam("keyword4")String keyword4, @RequestParam("remark")String remark, @RequestParam("url")String url);
 
-}
+}

+ 17 - 2
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/WechatApplication.java

@@ -24,10 +24,25 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
 @ServletComponentScan
 @MapperScan("com.usoftchina.smartschool.wechat.mapper")
 @EnableEurekaClient
-@EnableFeignClients("com.usoftchina.smartschool")
-public class WechatApplication  {
+@EnableFeignClients("com.usoftchina.smartschool.wechat")
+@ComponentScan(basePackages = {"com.usoftchina.smartschool.wechat"})
+public class WechatApplication  extends WebMvcConfigurerAdapter {
     public static void main(String[] args) {
         SpringApplication.run(WechatApplication.class, args);
     }
 
+    //解决跨域问题
+   /* @Override
+    public void addCorsMappings(CorsRegistry registry) {
+        registry.addMapping("/**")
+                .allowedHeaders("*")
+                .allowedOrigins("*")
+                .allowedMethods("*")
+                .allowCredentials(true).maxAge(3600000);
+    }
+
+    @Bean
+    public RestTemplate restTemplate(){
+        return new RestTemplate();
+    }*/
 }

+ 1 - 1
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/controller/WxPushController.java

@@ -19,7 +19,7 @@ public class WxPushController {
     private WxPushService wxPushService;
 
     @PostMapping("/wxpush")
-    public String wxPush(@RequestParam("appId")String appId, @RequestParam("secret") String secret, @RequestParam("openid") String openid, @RequestParam("templateId")String templateId, @RequestParam("title")String title, @RequestParam("keyword1")String keyword1, @RequestParam("keyword2")String keyword2, @RequestParam("keyword3")String keyword3, @RequestParam("keyword4")String keyword4, @RequestParam("remark")String remark, @RequestParam("url")String url){
+    public String wxPush(String appId, String secret, String openid, String templateId, String title, String keyword1, String keyword2, String keyword3, String keyword4, String remark, String url){
         return wxPushService.wxPush(appId, secret,openid, templateId, title, keyword1, keyword2, keyword3, keyword4, remark, url);
     };
 

+ 1 - 1
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/WxPushService.java

@@ -9,5 +9,5 @@ public interface WxPushService {
      * @param
      * @return
      */
-    public String wxPush(@Param("appId")String appId,@Param("secret") String secret,@Param("openid") String openid, @Param("templateId")String templateId, @Param("title")String title, @Param("keyword1")String keyword1, @Param("keyword2")String keyword2, @Param("keyword3")String keyword3, @Param("keyword4")String keyword4, @Param("remark")String remark, @Param("url")String url);
+    public String wxPush(@Param("appId") String appId, @Param("secret") String secret, @Param("openid") String openid, @Param("templateId") String templateId, @Param("title") String title, @Param("keyword1") String keyword1, @Param("keyword2") String keyword2, @Param("keyword3") String keyword3, @Param("keyword4") String keyword4, @Param("remark") String remark, @Param("url") String url);
 }

+ 2 - 2
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/impl/WxPushServiceImpl.java

@@ -31,7 +31,7 @@ public class WxPushServiceImpl implements WxPushService{
                         + "\"remark\":{\"value\":\""+remark+"\",\"color\":\"#173177\"}}}";
                 String access_token=  getWxAcessToken(appId,secret);
                 String token= JSON.parseObject(access_token).getString("access_token");
-                com.github.kevinsawicki.http.HttpRequest hRequest=  com.github.kevinsawicki.http.HttpRequest.post("https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="+token)
+                HttpRequest hRequest=  HttpRequest.post("https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="+token)
                         .header("Content-Type", "application/json")
                         .send(json.getBytes());
                 String result= hRequest.body();
@@ -54,7 +54,7 @@ public class WxPushServiceImpl implements WxPushService{
             params.put("appid", appId);
             params.put("secret", secret);
             params.put("grant_type", "client_credential");
-            com.github.kevinsawicki.http.HttpRequest httpRequest= HttpRequest.get("https://api.weixin.qq.com/cgi-bin/token",params,false);
+            HttpRequest httpRequest= HttpRequest.get("https://api.weixin.qq.com/cgi-bin/token",params,false);
             String content=httpRequest.body();
             return content;
         }

+ 0 - 8
applications/wechat/wechat-server/src/main/resources/application.yml

@@ -39,9 +39,6 @@ spring:
   redis:
     host: 10.10.100.166
     port: 6379
-  jackson:
-    date-format: yyyy-MM-dd HH:mm
-    time-zone: GMT+8
   servlet:
     multipart:
       max-file-size: 100Mb
@@ -76,11 +73,6 @@ info:
   version: '@project.version@'
   spring-boot-version: '@spring.boot.version@'
   spring-cloud-version: '@spring.cloud.version@'
-mybatis:
-  configuration:
-    map-underscore-to-camel-case: true
-  type-aliases-package: com.usoftchina.smartschool.wechat.wxDemo
-  mapper-locations: classpath:mapper/*.xml
 auth:
   public-key: auth/pub.key
 ribbon:

+ 2 - 2
base-servers/gateway-server/src/main/java/com/usoftchina/smartschool/gateway/config/AuthFilter.java

@@ -39,7 +39,7 @@ public class AuthFilter implements GlobalFilter, Ordered {
     public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
         try {
                 // 鉴别身份信息
-                String token = getAuthToken(exchange.getRequest());
+             /*   String token = getAuthToken(exchange.getRequest());
                 JwtInfo jwt = null;
                 try {
                     jwt = JwtHelper.getInfoFromToken(token, authConfig.getPublicKey());
@@ -53,7 +53,7 @@ public class AuthFilter implements GlobalFilter, Ordered {
                 AccountDTO accountDTO = accountApi.findByMobile(jwt.getUserName()).getData();
                 if (null == accountDTO) {
                     throw new BizException(ExceptionCode.USER_NOT_EXIST);
-                }
+                }*/
             return chain.filter(exchange);
         } finally {
             BaseContextHolder.remove();

+ 4 - 2
frontend/wechat-web/src/configs/api.config.js

@@ -8,8 +8,10 @@ import store from './../redux/store/store'
  * Desc: 项目接口
  */
 // export const _baseURL = 'https://tmobile.ubtob.com/school'
-// export const _baseURL = 'http://10.1.80.101:8080/school'
-export const _baseURL = 'http://10.1.80.101:9560'
+// export const _baseURL = 'http://10.1.80.101:9560'
+export const _baseURL = 'https://school-api.ubtob.com/api/school'
+// export const _baseURL = 'https://school-api.ubtob.com/api/school/grade/read/1'
+
 export const API = {
     //获取openId
     GET_OPENID: _baseURL + '/wxPay/getOpenid',

+ 1 - 1
frontend/wechat-web/src/modules/accountBind/BindMenu.jsx

@@ -45,7 +45,7 @@ export default class BindMenu extends Component {
                 })
                 window.location.href =
                     'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' +
-                    this.paramId + '&redirect_uri=https%3a%2f%2fschool-api.ubtob.com%2fwxSchool%2fuser%2fuserLogin&response_type=code&scope=snsapi_userinfo&state=' +
+                    this.paramId + '&redirect_uri=https%3a%2f%2fschool-api.ubtob.com%2fapi%2fschool%2fwxSchool%2fuser%2fuserLogin&response_type=code&scope=snsapi_userinfo&state=' +
                     this.paramId + '&connect_redirect=1#wechat_redirect'
             }
 

+ 3 - 1
frontend/wechat-web/src/redux/reducers/redUserInfo.js

@@ -57,7 +57,9 @@ const initListState = {
     userRole: 0,
     teacher: '',
     parent: '',
-    user: '',
+    user: {
+        student: {}
+    },
 }
 
 const redUserInfo = (state = initListState, action) => {