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

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

RaoMeng 7 лет назад
Родитель
Сommit
841cd97034
33 измененных файлов с 1294 добавлено и 40 удалено
  1. 7 13
      README.md
  2. 19 0
      applications/school/school-dto/src/main/java/com/usoftchina/smartschool/school/dto/BatchDealBaseDTO.java
  3. 29 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/business/controller/HomeWorkController.java
  4. 31 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/business/controller/InOutRecordController.java
  5. 32 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/business/controller/NoticeController.java
  6. 43 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/business/controller/PrincipalMailController.java
  7. 7 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/business/service/HomeWorkService.java
  8. 10 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/business/service/InOutRecordService.java
  9. 8 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/business/service/NoticeService.java
  10. 13 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/business/service/PrincipalMailService.java
  11. 29 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/business/service/impl/HomeWorkServiceImpl.java
  12. 40 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/business/service/impl/InOutRecordServiceImpl.java
  13. 29 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/business/service/impl/NoticeServiceImpl.java
  14. 58 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/business/service/impl/PrincipalMailServiceImpl.java
  15. 22 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/HomeWorkMapper.java
  16. 22 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/NoticeMapper.java
  17. 24 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/OutInRecordMapper.java
  18. 19 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/PrincipalMailboxMapper.java
  19. 39 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/HomeWork.java
  20. 125 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/Notify.java
  21. 96 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/OutInRecord.java
  22. 2 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/SchoolDO.java
  23. 4 4
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/controller/WxUserController.java
  24. 1 0
      applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/service/impl/WxVoteServiceImpl.java
  25. 180 0
      applications/school/school-server/src/main/resources/mapper/HomeWorkMapper.xml
  26. 177 0
      applications/school/school-server/src/main/resources/mapper/NotifyMapper.xml
  27. 142 0
      applications/school/school-server/src/main/resources/mapper/OutInRecordMapper.xml
  28. 36 0
      applications/school/school-server/src/main/resources/mapper/PrincipalMailboxMapper.xml
  29. 9 4
      applications/school/school-server/src/main/resources/mapper/WxSchoolMapper.xml
  30. 9 3
      applications/wechat/wechat-api/src/main/java/com/usoftchina/smartschool/wechat/api/WxPushApi.java
  31. 8 1
      applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/WxPushService.java
  32. 13 11
      applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/impl/WxPushServiceImpl.java
  33. 11 4
      frontend/wechat-web/src/modules/hiPages/changephonenumber/ChangePhoneNumber.js

+ 7 - 13
README.md

@@ -70,19 +70,7 @@
 
 > 服务器
 
-| IP      |  账号  |  密码  |  环境  |  资源  |
-| --------   | :----:  | :----: | :------:  | :------:  |
-| 10.1.81.79 |  root  | select123*** |  CentOS7, MySQL  | Cpu: 8, Mem: 16G, Disk: 80G |
-| 10.1.81.75 |  root  | select123*** |  CentOS7, Docker  | Cpu: 4, Mem: 8G, Disk: 20G |
-| 10.1.81.78 |  root  | select123*** |  CentOS7, Docker  | Cpu: 4, Mem: 8G, Disk: 20G |
-| 10.1.81.76 |  root  | select123*** |  CentOS7, Docker  | Cpu: 4, Mem: 8G, Disk: 20G |
-| 10.1.81.59 |  root  | select123*** |  CentOS7, Docker  | Cpu: 4, Mem: 8G, Disk: 20G |
-| 10.1.81.60 |  root  | select123*** |  CentOS7, Docker  | Cpu: 4, Mem: 8G, Disk: 20G |
-| 10.1.81.61 |  root  | select123*** |  CentOS7, Docker  | Cpu: 8, Mem: 16G, Disk: 80G |
-| 10.1.81.62 |  root  | select123*** |  CentOS7, Redis  | Cpu: 2, Mem: 8G, Disk: 20G |
-| 10.1.81.63 |  root  | select123*** |  CentOS7, Mongo  | Cpu: 4, Mem: 8G, Disk: 50G |
-| 10.1.81.64 |  root  | select123*** |  CentOS7, Docker  | Cpu: 8, Mem: 16G, Disk: 50G |
-| 10.1.81.65 |  root  | select123*** |  CentOS7, Docker  | Cpu: 8, Mem: 16G, Disk: 50G |
+
 
 > 构建
 
@@ -90,6 +78,12 @@
 
 > 服务
 
+| 10.10.100.23 |  root  | 62cddbcc624b1b072d84117cc0e5a4db |  CentOS7, Docker  | Cpu: 40, Mem: 128G, Disk: 800G |
+| 10.10.100.24 |  root  | 4fd19c28ee472ef9ebc3c06de9277c1b |  CentOS7, Docker  | Cpu: 40, Mem: 128G, Disk: 800G |
+| 10.10.100.25 |  root  | 61a12a65cd42ef77a52dfef8e436bacc |  CentOS7, Docker  | Cpu: 40, Mem: 128G, Disk: 800G |
+| 10.10.100.26 |  root  | 8743e445c7a308edf4588b7997b21c73 |  CentOS7, Docker  | Cpu: 40, Mem: 128G, Disk: 800G |
+
+
 * [eureka http://10.1.81.61:8500](http://10.1.81.61:8500) **账号** admin **密码** select111***
 * [gateway http://10.1.81.61:8560](http://10.1.81.61:8560)
 * [admin http://10.1.81.61:8520](http://10.1.81.61:8520) **账号** admin **密码** select111***

+ 19 - 0
applications/school/school-dto/src/main/java/com/usoftchina/smartschool/school/dto/BatchDealBaseDTO.java

@@ -0,0 +1,19 @@
+package com.usoftchina.smartschool.school.dto;
+
+import java.util.List;
+
+/**
+ * @author: guq
+ * @create: 2019-02-15 09:08
+ **/
+public class BatchDealBaseDTO {
+    private List<DocBaseDTO> baseDTOs;
+
+    public List<DocBaseDTO> getBaseDTOs() {
+        return baseDTOs;
+    }
+
+    public void setBaseDTOs(List<DocBaseDTO> baseDTOs) {
+        this.baseDTOs = baseDTOs;
+    }
+}

+ 29 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/business/controller/HomeWorkController.java

@@ -0,0 +1,29 @@
+package com.usoftchina.smartschool.school.business.controller;
+
+import com.usoftchina.smartschool.base.Result;
+import com.usoftchina.smartschool.school.business.service.HomeWorkService;
+import com.usoftchina.smartschool.school.po.HomeWork;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author: guq
+ * @create: 2019-02-15 09:26
+ **/
+@RestController
+@RequestMapping("/homework")
+public class HomeWorkController {
+
+    @Autowired
+    private HomeWorkService homeWorkService;
+
+    @PostMapping("/save")
+    public Result save(@RequestBody HomeWork data) {
+        homeWorkService.save(data);
+        return Result.success();
+    }
+
+}

+ 31 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/business/controller/InOutRecordController.java

@@ -0,0 +1,31 @@
+package com.usoftchina.smartschool.school.business.controller;
+
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.smartschool.base.Result;
+import com.usoftchina.smartschool.page.PageDefault;
+import com.usoftchina.smartschool.page.PageRequest;
+import com.usoftchina.smartschool.school.business.service.InOutRecordService;
+import com.usoftchina.smartschool.school.dto.ListReqDTO;
+import com.usoftchina.smartschool.school.po.OutInRecord;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author: guq
+ * @create: 2019-02-14 14:47
+ **/
+@RestController
+@RequestMapping("/record")
+public class InOutRecordController {
+
+    @Autowired
+    private InOutRecordService inOutRecordService;
+
+    @GetMapping("/list")
+    public Result getList(@PageDefault PageRequest page, ListReqDTO listReqDTO) {
+        PageInfo<OutInRecord> record = inOutRecordService.getListData(page, listReqDTO);
+        return Result.success(record);
+    }
+}

+ 32 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/business/controller/NoticeController.java

@@ -0,0 +1,32 @@
+package com.usoftchina.smartschool.school.business.controller;
+
+import com.usoftchina.smartschool.base.Result;
+import com.usoftchina.smartschool.school.business.service.NoticeService;
+import com.usoftchina.smartschool.school.dto.DocBaseDTO;
+import com.usoftchina.smartschool.school.po.Notify;
+import com.usoftchina.smartschool.school.po.NotifyDO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author: guq
+ * @create: 2019-02-15 09:28
+ **/
+@RestController
+@RequestMapping("/notice")
+public class NoticeController {
+
+    @Autowired
+    private NoticeService noticeService;
+
+    @PostMapping("/save")
+    public Result save(@RequestBody Notify data) {
+        noticeService.save(data);
+        return Result.success();
+    }
+
+
+}

+ 43 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/business/controller/PrincipalMailController.java

@@ -0,0 +1,43 @@
+package com.usoftchina.smartschool.school.business.controller;
+
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.smartschool.base.Result;
+import com.usoftchina.smartschool.page.PageDefault;
+import com.usoftchina.smartschool.page.PageRequest;
+import com.usoftchina.smartschool.school.business.service.PrincipalMailService;
+import com.usoftchina.smartschool.school.dto.BatchDealBaseDTO;
+import com.usoftchina.smartschool.school.dto.ListReqDTO;
+import com.usoftchina.smartschool.school.po.PrincipalMailboxDO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+
+/**
+ * @author: guq
+ * @create: 2019-02-14 17:50
+ **/
+@RestController
+@RequestMapping("/principal")
+public class PrincipalMailController {
+
+    @Autowired
+    private PrincipalMailService principalMailService;
+
+    @GetMapping("/list")
+    public Result getList(@PageDefault PageRequest page, ListReqDTO listReqDTO) {
+        PageInfo<PrincipalMailboxDO> data = principalMailService.getListData(page, listReqDTO);
+        return Result.success(data);
+    }
+
+
+    /**
+     * @param baseDTOs
+     * @return
+     */
+    @PostMapping("/batchDelete")
+    public Result batchDelete(@RequestBody BatchDealBaseDTO baseDTOs) {
+        principalMailService.batchDelete(baseDTOs);
+        return Result.success();
+    }
+
+}

+ 7 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/business/service/HomeWorkService.java

@@ -0,0 +1,7 @@
+package com.usoftchina.smartschool.school.business.service;
+
+import com.usoftchina.smartschool.school.po.HomeWork;
+
+public interface HomeWorkService {
+    void save(HomeWork data);
+}

+ 10 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/business/service/InOutRecordService.java

@@ -0,0 +1,10 @@
+package com.usoftchina.smartschool.school.business.service;
+
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.smartschool.page.PageRequest;
+import com.usoftchina.smartschool.school.dto.ListReqDTO;
+import com.usoftchina.smartschool.school.po.OutInRecord;
+
+public interface InOutRecordService {
+    PageInfo<OutInRecord> getListData(PageRequest page, ListReqDTO listReqDTO);
+}

+ 8 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/business/service/NoticeService.java

@@ -0,0 +1,8 @@
+package com.usoftchina.smartschool.school.business.service;
+
+import com.usoftchina.smartschool.school.po.Notify;
+
+public interface NoticeService {
+
+    void save(Notify data);
+}

+ 13 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/business/service/PrincipalMailService.java

@@ -0,0 +1,13 @@
+package com.usoftchina.smartschool.school.business.service;
+
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.smartschool.page.PageRequest;
+import com.usoftchina.smartschool.school.dto.BatchDealBaseDTO;
+import com.usoftchina.smartschool.school.dto.ListReqDTO;
+import com.usoftchina.smartschool.school.po.PrincipalMailboxDO;
+
+public interface PrincipalMailService {
+    PageInfo<PrincipalMailboxDO> getListData(PageRequest page, ListReqDTO listReqDTO);
+
+    void batchDelete(BatchDealBaseDTO baseDTOs);
+}

+ 29 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/business/service/impl/HomeWorkServiceImpl.java

@@ -0,0 +1,29 @@
+package com.usoftchina.smartschool.school.business.service.impl;
+
+import com.usoftchina.smartschool.exception.BizException;
+import com.usoftchina.smartschool.school.business.service.HomeWorkService;
+import com.usoftchina.smartschool.school.exception.BizExceptionCode;
+import com.usoftchina.smartschool.school.mapper.HomeWorkMapper;
+import com.usoftchina.smartschool.school.po.HomeWork;
+import com.usoftchina.smartschool.school.wxschool.utils.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author: guq
+ * @create: 2019-02-15 09:54
+ **/
+@Service
+public class HomeWorkServiceImpl implements HomeWorkService{
+
+    @Autowired
+    private HomeWorkMapper homeWorkMapper;
+
+    @Override
+    public void save(HomeWork formdata) {
+        if (StringUtils.isArray(formdata)){
+            throw new BizException(BizExceptionCode.EMPTY_DATA);
+        }
+        homeWorkMapper.insertSelective(formdata);
+    }
+}

+ 40 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/business/service/impl/InOutRecordServiceImpl.java

@@ -0,0 +1,40 @@
+package com.usoftchina.smartschool.school.business.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.smartschool.context.BaseContextHolder;
+import com.usoftchina.smartschool.page.PageRequest;
+import com.usoftchina.smartschool.school.business.service.InOutRecordService;
+import com.usoftchina.smartschool.school.dto.ListReqDTO;
+import com.usoftchina.smartschool.school.mapper.OutInRecordMapper;
+import com.usoftchina.smartschool.school.po.OutInRecord;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @author: guq
+ * @create: 2019-02-14 15:12
+ **/
+@Service
+public class InOutRecordServiceImpl implements InOutRecordService{
+
+    @Autowired
+    private OutInRecordMapper outInRecordMapper;
+
+    @Override
+    public PageInfo<OutInRecord> getListData(PageRequest page, ListReqDTO listReqDTO) {
+        PageHelper.startPage(page.getNumber(), page.getSize());
+        Long schoolId = BaseContextHolder.getSchoolId();
+        schoolId = 1l;
+        //condition语句
+        String condition = listReqDTO.getFinalCondition();
+        if(condition == null){
+            condition = "1=1";
+        }
+        List<OutInRecord> data = outInRecordMapper.selectByConditon(condition, schoolId);
+        PageInfo<OutInRecord> list = new PageInfo<>(data);
+        return list;
+    }
+}

+ 29 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/business/service/impl/NoticeServiceImpl.java

@@ -0,0 +1,29 @@
+package com.usoftchina.smartschool.school.business.service.impl;
+
+import com.usoftchina.smartschool.exception.BizException;
+import com.usoftchina.smartschool.school.business.service.NoticeService;
+import com.usoftchina.smartschool.school.exception.BizExceptionCode;
+import com.usoftchina.smartschool.school.mapper.NoticeMapper;
+import com.usoftchina.smartschool.school.po.Notify;
+import com.usoftchina.smartschool.school.wxschool.utils.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * @author: guq
+ * @create: 2019-02-15 09:54
+ **/
+@Service
+public class NoticeServiceImpl implements NoticeService{
+
+    @Autowired
+    private NoticeMapper noticeMapper;
+
+    @Override
+    public void save(Notify formdata) {
+        if (StringUtils.isArray(formdata)){
+            throw new BizException(BizExceptionCode.EMPTY_DATA);
+        }
+        noticeMapper.insertSelective(formdata);
+    }
+}

+ 58 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/business/service/impl/PrincipalMailServiceImpl.java

@@ -0,0 +1,58 @@
+package com.usoftchina.smartschool.school.business.service.impl;
+
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import com.usoftchina.smartschool.context.BaseContextHolder;
+import com.usoftchina.smartschool.page.PageRequest;
+import com.usoftchina.smartschool.school.business.service.PrincipalMailService;
+import com.usoftchina.smartschool.school.dto.BatchDealBaseDTO;
+import com.usoftchina.smartschool.school.dto.DocBaseDTO;
+import com.usoftchina.smartschool.school.dto.ListReqDTO;
+import com.usoftchina.smartschool.school.mapper.PrincipalMailboxMapper;
+import com.usoftchina.smartschool.school.po.PrincipalMailboxDO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @author: guq
+ * @create: 2019-02-14 17:53
+ **/
+@Service
+public class PrincipalMailServiceImpl implements PrincipalMailService {
+
+    @Autowired
+    private PrincipalMailboxMapper principalMailboxMapper;
+
+    @Override
+    public PageInfo<PrincipalMailboxDO> getListData(PageRequest page, ListReqDTO listReqDTO) {
+        PageHelper.startPage(page.getNumber(), page.getSize());
+        Long schoolId = BaseContextHolder.getSchoolId();
+        schoolId = 1l;
+        //condition语句
+        String condition = listReqDTO.getFinalCondition();
+        if(condition == null){
+            condition = "1=1";
+        }
+        List<PrincipalMailboxDO> data = principalMailboxMapper.selectByConditon(condition, schoolId);
+        PageInfo<PrincipalMailboxDO> list = new PageInfo<>(data);
+        return list;
+    }
+
+    @Override
+    public void batchDelete(BatchDealBaseDTO baseDTOs) {
+        if (null == baseDTOs || null == baseDTOs.getBaseDTOs() ||
+                baseDTOs.getBaseDTOs().size() == 0) {
+            return;
+        }
+
+        for (DocBaseDTO base : baseDTOs.getBaseDTOs()) {
+            singleDelete(base.getId());
+        }
+    }
+
+    private void singleDelete(Long id) {
+        principalMailboxMapper.deleteByPrimaryKey(id);
+    }
+}

+ 22 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/HomeWorkMapper.java

@@ -0,0 +1,22 @@
+package com.usoftchina.smartschool.school.mapper;
+
+import com.usoftchina.smartschool.school.po.HomeWork;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface HomeWorkMapper {
+
+    int deleteByPrimaryKey(Long task_id);
+
+    int insert(HomeWork record);
+
+    int insertSelective(HomeWork record);
+
+    HomeWork selectByPrimaryKey(Long task_id);
+
+    int updateByPrimaryKeySelective(HomeWork record);
+
+    int updateByPrimaryKeyWithBLOBs(HomeWork record);
+
+    int updateByPrimaryKey(HomeWork record);
+}

+ 22 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/NoticeMapper.java

@@ -0,0 +1,22 @@
+package com.usoftchina.smartschool.school.mapper;
+
+import com.usoftchina.smartschool.school.po.Notify;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface NoticeMapper {
+
+    int deleteByPrimaryKey(Long notify_id);
+
+    int insert(Notify record);
+
+    int insertSelective(Notify record);
+
+    Notify selectByPrimaryKey(Long notify_id);
+
+    int updateByPrimaryKeySelective(Notify record);
+
+    int updateByPrimaryKeyWithBLOBs(Notify record);
+
+    int updateByPrimaryKey(Notify record);
+}

+ 24 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/OutInRecordMapper.java

@@ -0,0 +1,24 @@
+package com.usoftchina.smartschool.school.mapper;
+
+import com.usoftchina.smartschool.school.po.OutInRecord;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+@Mapper
+public interface OutInRecordMapper {
+    int deleteByPrimaryKey(Long record_id);
+
+    int insert(OutInRecord record);
+
+    int insertSelective(OutInRecord record);
+
+    OutInRecord selectByPrimaryKey(Long record_id);
+
+    int updateByPrimaryKeySelective(OutInRecord record);
+
+    int updateByPrimaryKey(OutInRecord record);
+
+    List<OutInRecord> selectByConditon(@Param("con") String con, @Param("school_id") Long school_id);
+}

+ 19 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/mapper/PrincipalMailboxMapper.java

@@ -0,0 +1,19 @@
+package com.usoftchina.smartschool.school.mapper;
+
+import com.usoftchina.smartschool.school.po.PrincipalMailboxDO;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+@Mapper
+public interface PrincipalMailboxMapper {
+  int deleteByPrimaryKey(Long mailbox_id);
+  /*  int insert(PrincipalMailboxDO record);
+
+    int insertSelective(PrincipalMailboxDO record);
+
+    PrincipalMailboxDO selectByPrimaryKey(Long mailbox_id);*/
+
+    List<PrincipalMailboxDO> selectByConditon(@Param("con") String condition, @Param("school_id") Long schoolId);
+}

+ 39 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/HomeWork.java

@@ -0,0 +1,39 @@
+package com.usoftchina.smartschool.school.po;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @author: guq
+ * @create: 2019-02-15 14:51
+ **/
+@Data
+public class HomeWork implements Serializable{
+
+    private Long task_id;
+
+    private Long subject_id;
+
+    private String task_title;
+
+    private Integer task_status;
+
+    private Date create_date;
+
+    private Date start_date;
+
+    private Date end_date;
+
+    private Long task_creator;
+
+    private Long school_id;
+
+    private String task_context;
+
+    private String task_files;
+
+    private String task_notifier;
+
+}

+ 125 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/Notify.java

@@ -0,0 +1,125 @@
+package com.usoftchina.smartschool.school.po;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class Notify implements Serializable{
+    private Long notify_id;
+
+    private String notify_title;
+
+    private Integer notify_type;
+
+    private Long notify_creator;
+
+    private Date create_date;
+
+    private Integer notify_status;
+
+    private String notify_remarks;
+
+    private Long school_id;
+    private String notify_details;
+
+    private String notify_files;
+
+    private String notify_teacher;
+
+    private String notify_stu;
+
+    public String getNotify_details() {
+        return notify_details;
+    }
+
+    public void setNotify_details(String notify_details) {
+        this.notify_details = notify_details == null ? null : notify_details.trim();
+    }
+
+    public String getNotify_files() {
+        return notify_files;
+    }
+
+    public void setNotify_files(String notify_files) {
+        this.notify_files = notify_files == null ? null : notify_files.trim();
+    }
+
+    public String getNotify_teacher() {
+        return notify_teacher;
+    }
+
+    public void setNotify_teacher(String notify_teacher) {
+        this.notify_teacher = notify_teacher == null ? null : notify_teacher.trim();
+    }
+
+    public String getNotify_stu() {
+        return notify_stu;
+    }
+
+    public void setNotify_stu(String notify_stu) {
+        this.notify_stu = notify_stu == null ? null : notify_stu.trim();
+    }
+
+    public Long getNotify_id() {
+        return notify_id;
+    }
+
+    public void setNotify_id(Long notify_id) {
+        this.notify_id = notify_id;
+    }
+
+    public String getNotify_title() {
+        return notify_title;
+    }
+
+    public void setNotify_title(String notify_title) {
+        this.notify_title = notify_title == null ? null : notify_title.trim();
+    }
+
+    public Integer getNotify_type() {
+        return notify_type;
+    }
+
+    public void setNotify_type(Integer notify_type) {
+        this.notify_type = notify_type;
+    }
+
+    public Long getNotify_creator() {
+        return notify_creator;
+    }
+
+    public void setNotify_creator(Long notify_creator) {
+        this.notify_creator = notify_creator;
+    }
+
+    public Date getCreate_date() {
+        return create_date;
+    }
+
+    public void setCreate_date(Date create_date) {
+        this.create_date = create_date;
+    }
+
+    public Integer getNotify_status() {
+        return notify_status;
+    }
+
+    public void setNotify_status(Integer notify_status) {
+        this.notify_status = notify_status;
+    }
+
+    public String getNotify_remarks() {
+        return notify_remarks;
+    }
+
+    public void setNotify_remarks(String notify_remarks) {
+        this.notify_remarks = notify_remarks == null ? null : notify_remarks.trim();
+    }
+
+    public Long getSchool_id() {
+        return school_id;
+    }
+
+    public void setSchool_id(Long school_id) {
+        this.school_id = school_id;
+    }
+}

+ 96 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/OutInRecord.java

@@ -0,0 +1,96 @@
+package com.usoftchina.smartschool.school.po;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class OutInRecord implements Serializable{
+    private Long record_id;
+
+    private String record_name;
+
+    private Date out_date;
+
+    private Date in_date;
+
+    private String record_details;
+
+    private String record_remarks;
+
+    private String device_id;
+
+    private Long stu_id;
+
+    private Long school_id;
+
+    public Long getRecord_id() {
+        return record_id;
+    }
+
+    public String getDevice_id() {
+		return device_id;
+	}
+
+	public void setDevice_id(String device_id) {
+		this.device_id = device_id;
+	}
+
+	public void setRecord_id(Long record_id) {
+        this.record_id = record_id;
+    }
+
+    public String getRecord_name() {
+        return record_name;
+    }
+
+    public void setRecord_name(String record_name) {
+        this.record_name = record_name == null ? null : record_name.trim();
+    }
+
+    public Date getOut_date() {
+        return out_date;
+    }
+
+    public void setOut_date(Date out_date) {
+        this.out_date = out_date;
+    }
+
+    public Date getIn_date() {
+        return in_date;
+    }
+
+    public void setIn_date(Date in_date) {
+        this.in_date = in_date;
+    }
+
+    public String getRecord_details() {
+        return record_details;
+    }
+
+    public void setRecord_details(String record_details) {
+        this.record_details = record_details == null ? null : record_details.trim();
+    }
+
+    public String getRecord_remarks() {
+        return record_remarks;
+    }
+
+    public void setRecord_remarks(String record_remarks) {
+        this.record_remarks = record_remarks == null ? null : record_remarks.trim();
+    }
+
+    public Long getStu_id() {
+        return stu_id;
+    }
+
+    public void setStu_id(Long stu_id) {
+        this.stu_id = stu_id;
+    }
+
+    public Long getSchool_id() {
+        return school_id;
+    }
+
+    public void setSchool_id(Long school_id) {
+        this.school_id = school_id;
+    }
+}

+ 2 - 0
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/po/SchoolDO.java

@@ -35,5 +35,7 @@ public class SchoolDO implements Serializable {
 
 	private Long teacherId;
 
+	private String accessToken;
+
 
 }

+ 4 - 4
applications/school/school-server/src/main/java/com/usoftchina/smartschool/school/wxschool/basic/controller/WxUserController.java

@@ -139,11 +139,11 @@ public class WxUserController {
 		param.put("openid",openid);
 		param.put("access_token",token);
 		param.put("lang","zh_CN");
-		HttpRequest res= HttpRequest.get("https://api.weixin.qq.com/sns/userinfo", param, true);
-		//HttpRequest res= HttpRequest.get("https://api.weixin.qq.com/cgi-bin/user/info", param, true);
+		//HttpRequest res= HttpRequest.get("https://api.weixin.qq.com/sns/userinfo", param, true);
+		HttpRequest res= HttpRequest.get("https://api.weixin.qq.com/cgi-bin/user/info", param, false);
 		String body = res.body();
-		//System.err.println("res======"+res);
-		//System.err.println("body======"+body);
+		System.err.println("res======"+res);
+		System.err.println("body======"+body);
 		String headimgurl = JSON.parseObject(body).getString("headimgurl");
 		String encode =null;
 		try {

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

@@ -50,6 +50,7 @@ public class WxVoteServiceImpl implements WxVoteService {
     /**
      * 创建投票单
      */
+    @Transactional
     public String voteCreate(String voteString) throws Exception {
         JSONObject votes = JSON.parseObject(voteString);
         VoteDO vote = new VoteDO();

+ 180 - 0
applications/school/school-server/src/main/resources/mapper/HomeWorkMapper.xml

@@ -0,0 +1,180 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.usoftchina.smartschool.school.mapper.HomeWorkMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.smartschool.school.po.HomeWork" >
+    <id column="task_id" property="task_id" jdbcType="BIGINT" />
+    <result column="subject_id" property="subject_id" jdbcType="BIGINT" />
+    <result column="task_title" property="task_title" jdbcType="VARCHAR" />
+    <result column="task_status" property="task_status" jdbcType="INTEGER" />
+    <result column="create_date" property="create_date" jdbcType="TIMESTAMP" />
+    <result column="start_date" property="start_date" jdbcType="TIMESTAMP" />
+    <result column="end_date" property="end_date" jdbcType="TIMESTAMP" />
+    <result column="task_creator" property="task_creator" jdbcType="BIGINT" />
+    <result column="school_id" property="school_id" jdbcType="BIGINT" />
+    <result column="task_context" property="task_context" jdbcType="LONGVARCHAR" />
+    <result column="task_files" property="task_files" jdbcType="LONGVARCHAR" />
+    <result column="task_notifier" property="task_notifier" jdbcType="LONGVARCHAR" />
+  </resultMap>
+
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
+    select 
+    *
+    from task_notify
+    where task_id = #{task_id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
+    delete from task_notify
+    where task_id = #{task_id,jdbcType=BIGINT}
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.smartschool.school.po.HomeWork" >
+    insert into task_notify (subject_id, task_title,
+      task_status, create_date, start_date, 
+      end_date, task_creator, school_id, 
+      task_context, task_files, task_notifier
+      )
+    values (#{subject_id,jdbcType=BIGINT}, #{task_title,jdbcType=VARCHAR},
+      #{task_status,jdbcType=INTEGER}, #{create_date,jdbcType=TIMESTAMP}, #{start_date,jdbcType=TIMESTAMP}, 
+      #{end_date,jdbcType=TIMESTAMP}, #{task_creator,jdbcType=BIGINT}, #{school_id,jdbcType=BIGINT}, 
+      #{task_context,jdbcType=LONGVARCHAR}, #{task_files,jdbcType=LONGVARCHAR}, #{task_notifier,jdbcType=LONGVARCHAR}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.smartschool.school.po.HomeWork" >
+    insert into task_notify
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="subject_id != null" >
+        subject_id,
+      </if>
+      <if test="task_title != null" >
+        task_title,
+      </if>
+      <if test="task_status != null" >
+        task_status,
+      </if>
+      <if test="create_date != null" >
+        create_date,
+      </if>
+      <if test="start_date != null" >
+        start_date,
+      </if>
+      <if test="end_date != null" >
+        end_date,
+      </if>
+      <if test="task_creator != null" >
+        task_creator,
+      </if>
+      <if test="school_id != null" >
+        school_id,
+      </if>
+      <if test="task_context != null" >
+        task_context,
+      </if>
+      <if test="task_files != null" >
+        task_files,
+      </if>
+      <if test="task_notifier != null" >
+        task_notifier,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="subject_id != null" >
+        #{subject_id,jdbcType=BIGINT},
+      </if>
+      <if test="task_title != null" >
+        #{task_title,jdbcType=VARCHAR},
+      </if>
+      <if test="task_status != null" >
+        #{task_status,jdbcType=INTEGER},
+      </if>
+      <if test="create_date != null" >
+        #{create_date,jdbcType=TIMESTAMP},
+      </if>
+      <if test="start_date != null" >
+        #{start_date,jdbcType=TIMESTAMP},
+      </if>
+      <if test="end_date != null" >
+        #{end_date,jdbcType=TIMESTAMP},
+      </if>
+      <if test="task_creator != null" >
+        #{task_creator,jdbcType=BIGINT},
+      </if>
+      <if test="school_id != null" >
+        #{school_id,jdbcType=BIGINT},
+      </if>
+      <if test="task_context != null" >
+        #{task_context,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="task_files != null" >
+        #{task_files,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="task_notifier != null" >
+        #{task_notifier,jdbcType=LONGVARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.smartschool.school.po.HomeWork" >
+    update task_notify
+    <set >
+      <if test="subject_id != null" >
+        subject_id = #{subject_id,jdbcType=BIGINT},
+      </if>
+      <if test="task_title != null" >
+        task_title = #{task_title,jdbcType=VARCHAR},
+      </if>
+      <if test="task_status != null" >
+        task_status = #{task_status,jdbcType=INTEGER},
+      </if>
+      <if test="create_date != null" >
+        create_date = #{create_date,jdbcType=TIMESTAMP},
+      </if>
+      <if test="start_date != null" >
+        start_date = #{start_date,jdbcType=TIMESTAMP},
+      </if>
+      <if test="end_date != null" >
+        end_date = #{end_date,jdbcType=TIMESTAMP},
+      </if>
+      <if test="task_creator != null" >
+        task_creator = #{task_creator,jdbcType=BIGINT},
+      </if>
+      <if test="school_id != null" >
+        school_id = #{school_id,jdbcType=BIGINT},
+      </if>
+      <if test="task_context != null" >
+        task_context = #{task_context,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="task_files != null" >
+        task_files = #{task_files,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="task_notifier != null" >
+        task_notifier = #{task_notifier,jdbcType=LONGVARCHAR},
+      </if>
+    </set>
+    where task_id = #{task_id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.usoftchina.smartschool.school.po.HomeWork" >
+    update task_notify
+    set subject_id = #{subject_id,jdbcType=BIGINT},
+      task_title = #{task_title,jdbcType=VARCHAR},
+      task_status = #{task_status,jdbcType=INTEGER},
+      create_date = #{create_date,jdbcType=TIMESTAMP},
+      start_date = #{start_date,jdbcType=TIMESTAMP},
+      end_date = #{end_date,jdbcType=TIMESTAMP},
+      task_creator = #{task_creator,jdbcType=BIGINT},
+      school_id = #{school_id,jdbcType=BIGINT},
+      task_context = #{task_context,jdbcType=LONGVARCHAR},
+      task_files = #{task_files,jdbcType=LONGVARCHAR},
+      task_notifier = #{task_notifier,jdbcType=LONGVARCHAR}
+    where task_id = #{task_id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.smartschool.school.po.HomeWork" >
+    update task_notify
+    set subject_id = #{subject_id,jdbcType=BIGINT},
+      task_title = #{task_title,jdbcType=VARCHAR},
+      task_status = #{task_status,jdbcType=INTEGER},
+      create_date = #{create_date,jdbcType=TIMESTAMP},
+      start_date = #{start_date,jdbcType=TIMESTAMP},
+      end_date = #{end_date,jdbcType=TIMESTAMP},
+      task_creator = #{task_creator,jdbcType=BIGINT},
+      school_id = #{school_id,jdbcType=BIGINT}
+    where task_id = #{task_id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 177 - 0
applications/school/school-server/src/main/resources/mapper/NotifyMapper.xml

@@ -0,0 +1,177 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.usoftchina.smartschool.school.mapper.NoticeMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.smartschool.school.po.Notify" >
+    <id column="notify_id" property="notify_id" jdbcType="BIGINT" />
+    <result column="notify_title" property="notify_title" jdbcType="VARCHAR" />
+    <result column="notify_type" property="notify_type" jdbcType="INTEGER" />
+    <result column="notify_creator" property="notify_creator" jdbcType="BIGINT" />
+    <result column="create_date" property="create_date" jdbcType="TIMESTAMP" />
+    <result column="notify_status" property="notify_status" jdbcType="INTEGER" />
+    <result column="notify_remarks" property="notify_remarks" jdbcType="VARCHAR" />
+    <result column="school_id" property="school_id" jdbcType="BIGINT" />
+    <result column="notify_details" property="notify_details" jdbcType="LONGVARCHAR" />
+    <result column="notify_files" property="notify_files" jdbcType="LONGVARCHAR" />
+    <result column="notify_teacher" property="notify_teacher" jdbcType="LONGVARCHAR" />
+    <result column="notify_stu" property="notify_stu" jdbcType="LONGVARCHAR" />
+  </resultMap>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
+    select *
+    from notify
+    where notify_id = #{notify_id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
+    delete from notify
+    where notify_id = #{notify_id,jdbcType=BIGINT}
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.smartschool.school.po.Notify" >
+    insert into notify (notify_id, notify_title, notify_type, 
+      notify_creator, create_date, notify_status, 
+      notify_remarks, school_id, notify_details, 
+      notify_files, notify_teacher, notify_stu
+      )
+    values (#{notify_id,jdbcType=BIGINT}, #{notify_title,jdbcType=VARCHAR}, #{notify_type,jdbcType=INTEGER}, 
+      #{notify_creator,jdbcType=BIGINT}, #{create_date,jdbcType=TIMESTAMP}, #{notify_status,jdbcType=INTEGER}, 
+      #{notify_remarks,jdbcType=VARCHAR}, #{school_id,jdbcType=BIGINT}, #{notify_details,jdbcType=LONGVARCHAR}, 
+      #{notify_files,jdbcType=LONGVARCHAR}, #{notify_teacher,jdbcType=LONGVARCHAR}, #{notify_stu,jdbcType=LONGVARCHAR}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.smartschool.school.po.Notify" >
+    insert into notify
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="notify_title != null" >
+        notify_title,
+      </if>
+      <if test="notify_type != null" >
+        notify_type,
+      </if>
+      <if test="notify_creator != null" >
+        notify_creator,
+      </if>
+      <if test="create_date != null" >
+        create_date,
+      </if>
+      <if test="notify_status != null" >
+        notify_status,
+      </if>
+      <if test="notify_remarks != null" >
+        notify_remarks,
+      </if>
+      <if test="school_id != null" >
+        school_id,
+      </if>
+      <if test="notify_details != null" >
+        notify_details,
+      </if>
+      <if test="notify_files != null" >
+        notify_files,
+      </if>
+      <if test="notify_teacher != null" >
+        notify_teacher,
+      </if>
+      <if test="notify_stu != null" >
+        notify_stu,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="notify_title != null" >
+        #{notify_title,jdbcType=VARCHAR},
+      </if>
+      <if test="notify_type != null" >
+        #{notify_type,jdbcType=INTEGER},
+      </if>
+      <if test="notify_creator != null" >
+        #{notify_creator,jdbcType=BIGINT},
+      </if>
+      <if test="create_date != null" >
+        #{create_date,jdbcType=TIMESTAMP},
+      </if>
+      <if test="notify_status != null" >
+        #{notify_status,jdbcType=INTEGER},
+      </if>
+      <if test="notify_remarks != null" >
+        #{notify_remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="school_id != null" >
+        #{school_id,jdbcType=BIGINT},
+      </if>
+      <if test="notify_details != null" >
+        #{notify_details,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="notify_files != null" >
+        #{notify_files,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="notify_teacher != null" >
+        #{notify_teacher,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="notify_stu != null" >
+        #{notify_stu,jdbcType=LONGVARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.smartschool.school.po.Notify" >
+    update notify
+    <set >
+      <if test="notify_title != null" >
+        notify_title = #{notify_title,jdbcType=VARCHAR},
+      </if>
+      <if test="notify_type != null" >
+        notify_type = #{notify_type,jdbcType=INTEGER},
+      </if>
+      <if test="notify_creator != null" >
+        notify_creator = #{notify_creator,jdbcType=BIGINT},
+      </if>
+      <if test="create_date != null" >
+        create_date = #{create_date,jdbcType=TIMESTAMP},
+      </if>
+      <if test="notify_status != null" >
+        notify_status = #{notify_status,jdbcType=INTEGER},
+      </if>
+      <if test="notify_remarks != null" >
+        notify_remarks = #{notify_remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="school_id != null" >
+        school_id = #{school_id,jdbcType=BIGINT},
+      </if>
+      <if test="notify_details != null" >
+        notify_details = #{notify_details,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="notify_files != null" >
+        notify_files = #{notify_files,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="notify_teacher != null" >
+        notify_teacher = #{notify_teacher,jdbcType=LONGVARCHAR},
+      </if>
+      <if test="notify_stu != null" >
+        notify_stu = #{notify_stu,jdbcType=LONGVARCHAR},
+      </if>
+    </set>
+    where notify_id = #{notify_id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.usoftchina.smartschool.school.po.Notify" >
+    update notify
+    set notify_title = #{notify_title,jdbcType=VARCHAR},
+      notify_type = #{notify_type,jdbcType=INTEGER},
+      notify_creator = #{notify_creator,jdbcType=BIGINT},
+      create_date = #{create_date,jdbcType=TIMESTAMP},
+      notify_status = #{notify_status,jdbcType=INTEGER},
+      notify_remarks = #{notify_remarks,jdbcType=VARCHAR},
+      school_id = #{school_id,jdbcType=BIGINT},
+      notify_details = #{notify_details,jdbcType=LONGVARCHAR},
+      notify_files = #{notify_files,jdbcType=LONGVARCHAR},
+      notify_teacher = #{notify_teacher,jdbcType=LONGVARCHAR},
+      notify_stu = #{notify_stu,jdbcType=LONGVARCHAR}
+    where notify_id = #{notify_id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.smartschool.school.po.Notify" >
+    update notify
+    set notify_title = #{notify_title,jdbcType=VARCHAR},
+      notify_type = #{notify_type,jdbcType=INTEGER},
+      notify_creator = #{notify_creator,jdbcType=BIGINT},
+      create_date = #{create_date,jdbcType=TIMESTAMP},
+      notify_status = #{notify_status,jdbcType=INTEGER},
+      notify_remarks = #{notify_remarks,jdbcType=VARCHAR},
+      school_id = #{school_id,jdbcType=BIGINT}
+    where notify_id = #{notify_id,jdbcType=BIGINT}
+  </update>
+</mapper>

+ 142 - 0
applications/school/school-server/src/main/resources/mapper/OutInRecordMapper.xml

@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.usoftchina.smartschool.school.mapper.OutInRecordMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.smartschool.school.po.OutInRecord" >
+    <id column="record_id" property="record_id" jdbcType="BIGINT" />
+    <result column="record_name" property="record_name" jdbcType="VARCHAR" />
+    <result column="out_date" property="out_date" jdbcType="TIMESTAMP" />
+    <result column="in_date" property="in_date" jdbcType="TIMESTAMP" />
+    <result column="record_details" property="record_details" jdbcType="VARCHAR" />
+    <result column="record_remarks" property="record_remarks" jdbcType="VARCHAR" />
+    <result column="stu_id" property="stu_id" jdbcType="BIGINT" />
+    <result column="school_id" property="school_id" jdbcType="BIGINT" />
+  </resultMap>
+  <sql id="Base_Column_List" >
+    record_id, record_name, out_date, in_date, record_details, record_remarks,
+    stu_id, school_id
+  </sql>
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
+    select 
+    <include refid="Base_Column_List" />
+    from out_in_record
+    where record_id = #{record_id,jdbcType=BIGINT}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
+    delete from out_in_record
+    where record_id = #{record_id,jdbcType=BIGINT}
+  </delete>
+  <insert id="insert" parameterType="com.usoftchina.smartschool.school.po.OutInRecord" >
+    insert into out_in_record (record_id, record_name, out_date, 
+      in_date, record_details, record_remarks, stu_id, school_id
+      )
+    values (#{record_id,jdbcType=BIGINT}, #{record_name,jdbcType=VARCHAR}, #{out_date,jdbcType=TIMESTAMP}, 
+      #{in_date,jdbcType=TIMESTAMP}, #{record_details,jdbcType=VARCHAR}, #{record_remarks,jdbcType=VARCHAR},#{stu_id,jdbcType=BIGINT}, #{school_id,jdbcType=BIGINT}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.usoftchina.smartschool.school.po.OutInRecord" >
+    insert into out_in_record
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="record_id != null" >
+        record_id,
+      </if>
+      <if test="record_name != null" >
+        record_name,
+      </if>
+      <if test="out_date != null" >
+        out_date,
+      </if>
+      <if test="in_date != null" >
+        in_date,
+      </if>
+      <if test="record_details != null" >
+        record_details,
+      </if>
+      <if test="record_remarks != null" >
+        record_remarks,
+      </if>
+      <if test="stu_id != null" >
+        stu_id,
+      </if>
+      <if test="school_id != null" >
+        school_id,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="record_id != null" >
+        #{record_id,jdbcType=BIGINT},
+      </if>
+      <if test="record_name != null" >
+        #{record_name,jdbcType=VARCHAR},
+      </if>
+      <if test="out_date != null" >
+        #{out_date,jdbcType=TIMESTAMP},
+      </if>
+      <if test="in_date != null" >
+        #{in_date,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record_details != null" >
+        #{record_details,jdbcType=VARCHAR},
+      </if>
+      <if test="record_remarks != null" >
+        #{record_remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="stu_id != null" >
+        #{stu_id,jdbcType=BIGINT},
+      </if>
+      <if test="school_id != null" >
+        #{school_id,jdbcType=BIGINT},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.smartschool.school.po.OutInRecord" >
+    update out_in_record
+    <set >
+      <if test="record_name != null" >
+        record_name = #{record_name,jdbcType=VARCHAR},
+      </if>
+      <if test="out_date != null" >
+        out_date = #{out_date,jdbcType=TIMESTAMP},
+      </if>
+      <if test="in_date != null" >
+        in_date = #{in_date,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record_details != null" >
+        record_details = #{record_details,jdbcType=VARCHAR},
+      </if>
+      <if test="record_remarks != null" >
+        record_remarks = #{record_remarks,jdbcType=VARCHAR},
+      </if>
+      <if test="stu_id != null" >
+        stu_id = #{stu_id,jdbcType=BIGINT},
+      </if>
+      <if test="school_id != null" >
+        school_id = #{school_id,jdbcType=BIGINT},
+      </if>
+    </set>
+    where record_id = #{record_id,jdbcType=BIGINT}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.usoftchina.smartschool.school.po.OutInRecord" >
+    update out_in_record
+    set record_name = #{record_name,jdbcType=VARCHAR},
+      out_date = #{out_date,jdbcType=TIMESTAMP},
+      in_date = #{in_date,jdbcType=TIMESTAMP},
+      record_details = #{record_details,jdbcType=VARCHAR},
+      record_remarks = #{record_remarks,jdbcType=VARCHAR},
+      stu_id = #{stu_id,jdbcType=BIGINT},
+      school_id = #{school_id,jdbcType=BIGINT}
+    where record_id = #{record_id,jdbcType=BIGINT}
+  </update>
+
+  <select id="selectByConditon" resultMap="BaseResultMap">
+    select * from out_in_record
+    <where>
+      <if test="con != null">
+        ${con}
+      </if>
+      <if test="school_id != null">
+        and school_id=#{school_id}
+      </if>
+    </where>
+    ORDER BY record_id DESC
+  </select>
+</mapper>

+ 36 - 0
applications/school/school-server/src/main/resources/mapper/PrincipalMailboxMapper.xml

@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.usoftchina.smartschool.school.mapper.PrincipalMailboxMapper" >
+  <resultMap id="BaseResultMap" type="com.usoftchina.smartschool.school.po.PrincipalMailboxDO" >
+    <id column="mailbox_id" property="mailboxId" jdbcType="BIGINT" />
+    <result column="mailbox_title" property="mailboxTitle" jdbcType="VARCHAR" />
+    <result column="is_anonymity" property="isAnonymity" jdbcType="INTEGER" />
+    <result column="create_date" property="createDate" jdbcType="TIMESTAMP" />
+    <result column="mailbox_creator" property="mailboxCreator" jdbcType="BIGINT" />
+    <result column="read_date" property="readDate" jdbcType="TIMESTAMP" />
+    <result column="mailbox_status" property="mailboxStatus" jdbcType="INTEGER" />
+    <result column="notifier" property="notifier" jdbcType="BIGINT" />
+    <result column="school_id" property="schoolId" jdbcType="BIGINT" />
+    <result column="mailbox_context" property="mailboxContext" jdbcType="LONGVARCHAR" />
+    <result column="mailbox_files" property="mailboxFiles" jdbcType="LONGVARCHAR" />
+  </resultMap>
+
+  <select id="selectByConditon" resultMap="BaseResultMap">
+    select * from principal_mailbox
+    <where>
+      <if test="con != null">
+        ${con}
+      </if>
+      <if test="school_id != null">
+        and school_id=#{school_id}
+      </if>
+    </where>
+    ORDER BY mailbox_id DESC
+  </select>
+
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
+    delete from principal_mailbox
+    where mailbox_id = #{mailbox_id,jdbcType=BIGINT}
+  </delete>
+
+</mapper>

+ 9 - 4
applications/school/school-server/src/main/resources/mapper/WxSchoolMapper.xml

@@ -4,7 +4,7 @@
 <mapper namespace="com.usoftchina.smartschool.school.wxschool.mapper.WxSchoolMapper">
 
     <sql id="SchoolVo">
-    select `school_id`,`school_name`,`school_status`,`school_remarks`,`school_address`,`school_phone`,`school_appid`,`school_secret`,`teacher_id` from sys_school
+    select `school_id`,`school_name`,`school_status`,`school_remarks`,`school_address`,`school_phone`,`school_appid`,`school_secret`,`teacher_id`,`access_token` from sys_school
     </sql>
 
 	<select id="get" resultType="com.usoftchina.smartschool.school.po.SchoolDO">
@@ -23,6 +23,7 @@
 		  		  <if test="schoolAppid != null and schoolAppid != ''"> and school_appid = #{schoolAppid} </if>
 		  		  <if test="schoolSecret != null and schoolSecret != ''"> and school_secret = #{schoolSecret} </if>
 			<if test="teacherId != null and teacherId != ''"> and teacher_id = #{teacherId} </if>
+			<if test="accessToken != null and accessToken != ''"> and access_token = #{accessToken} </if>
 		  		</where>
         <choose>
             <when test="sort != null and sort.trim() != ''">
@@ -49,6 +50,7 @@
 		  		  <if test="schoolAppid != null and schoolAppid != ''"> and school_appid = #{schoolAppid} </if>
 		  		  <if test="schoolSecret != null and schoolSecret != ''"> and school_secret = #{schoolSecret} </if>
 			 <if test="teacherId != null and teacherId != ''"> and teacher_id = #{teacherId} </if>
+			 <if test="accessToken != null and accessToken != ''"> and access_token = #{accessToken} </if>
 		  		</where>
 	</select>
 	 
@@ -62,7 +64,8 @@
 			`school_phone`, 
 			`school_appid`, 
 			`school_secret`,
-			`teacher_id`
+			`teacher_id`,
+			`access_token`
 		)
 		values
 		(
@@ -73,7 +76,8 @@
 			#{schoolPhone}, 
 			#{schoolAppid}, 
 			#{schoolSecret},
-			#{teacherId}
+			#{teacherId},
+			#{accessToken}
 		)
 	</insert>
 	 
@@ -87,7 +91,8 @@
 			<if test="schoolPhone != null">`school_phone` = #{schoolPhone}, </if>
 			<if test="schoolAppid != null">`school_appid` = #{schoolAppid}, </if>
 			<if test="schoolSecret != null">`school_secret` = #{schoolSecret},</if>
-			<if test="teacherId != null">`teacher_id` = #{teacherId} </if>
+			<if test="teacherId != null">`teacher_id` = #{teacherId}, </if>
+			<if test="accessToken != null">`access_token` = #{accessToken} </if>
 		</set>
 		where school_id = #{schoolId}
 	</update>

+ 9 - 3
applications/wechat/wechat-api/src/main/java/com/usoftchina/smartschool/wechat/api/WxPushApi.java

@@ -10,8 +10,14 @@ import org.springframework.web.bind.annotation.RequestParam;
 public interface WxPushApi {
 
     @GetMapping("/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(@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);
+
+    @GetMapping("/getWxAccessToken")
+    public String getWxAccessToken(@RequestParam("appId") String appId, @RequestParam("secret") String secret);
 
 }

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

@@ -6,8 +6,15 @@ 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);
+
+    public String getWxAccessToken(@Param("appId") String appId, @Param("secret") String secret);
 }

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

@@ -32,8 +32,8 @@ public class WxPushServiceImpl implements WxPushService{
                         + "\"keyword3\":{\"value\":\""+keyword3+"\",\"color\":\"#173177\"},"
                         + "\"keyword4\":{\"value\":\""+keyword4+"\",\"color\":\"#173177\"},"
                         + "\"remark\":{\"value\":\""+remark+"\",\"color\":\"#173177\"}}}";
-                String access_token=  getWxAcessToken(appId,secret);
-                //String token= JSON.parseObject(access_token).getString("access_token");
+                String access_token=  getWxAccessToken(appId,secret);
+                //System.err.println("wxPushAccess_token======" + access_token);
                 HttpRequest hRequest=  HttpRequest.post("https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="+access_token)
                         .header("Content-Type", "application/json")
                         .send(json.getBytes());
@@ -52,19 +52,21 @@ public class WxPushServiceImpl implements WxPushService{
             return "已推送";
         }
 
-        public String getWxAcessToken(String appId,String secret){
+        public String getWxAccessToken(String appId,String secret){
             HashMap<String, Object> params=new HashMap<>();
             params.put("appid", appId);
             params.put("secret", secret);
             params.put("grant_type", "client_credential");
-            //HttpRequest httpRequest= HttpRequest.get("https://api.weixin.qq.com/cgi-bin/token",params,false);
-           // String content=httpRequest.body();
-           //System.err.println("WxPushToken======"+content);
-            HttpRequest response= HttpRequest.get("https://api.weixin.qq.com/sns/oauth2/access_token", params, true);
-            String result=response.body();
-            System.err.println("WxPushResult======"+result);
-            String token= JSON.parseObject(result).getString("access_token");
-            System.err.println("WxPushToken====="+token);
+            HttpRequest httpRequest= HttpRequest.get("https://api.weixin.qq.com/cgi-bin/token",params,false);
+            String content=httpRequest.body();
+           // System.err.println("getWxAccessTokenContent======"+content);
+           // HttpRequest response= HttpRequest.get("https://api.weixin.qq.com/sns/oauth2/access_token", params, true);
+            //String result=response.body();
+            //System.err.println("getWxAccessTokenResult======"+result);
+            //String token= JSON.parseObject(result).getString("access_token");
+           // System.err.println("getWxAccessTokenToken====="+token);
+            String token= JSON.parseObject(content).getString("access_token");
+            System.err.println("getWxAccessToken======"+token);
             return token;
         }
 }

+ 11 - 4
frontend/wechat-web/src/modules/hiPages/changephonenumber/ChangePhoneNumber.js

@@ -68,24 +68,31 @@ let mSeconds = 0;
              return
          }
          if(this.state.vCode == null || this.state.vCode.trim().length == 0){
-             Toast.show("请输入正确的验证码")
+             Toast.show("请输入验证码")
              return
          }
          this.setState({
              changeSuccess:true
          })
          var params = {
-
+             userPhone:this.state.phoneNumber,
+             openid:this.props.userInfo.user.userOpenid,
+             code:this.state.vCode,
          }
-         fetchPost(API.oaCreate,{params},{})
+         fetchPost(API.updatePhone,{params},{})
              .then((response)=>{
                  console.log('response',response)
                  if(response.success){
-
+                     this.setState({
+                         changeSuccess:true
+                     },function () {
+                         this.props.history.push('/homepage/')
+                     })
                  }
              })
              .catch((error) =>{
                  console.log('error',error)
+                 Toast.show(error)
              })
      }
      getvCode = () =>{