Browse Source

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

FANGLH 6 years ago
parent
commit
92feff4b15

+ 8 - 6
frontend/wechat-web/src/configs/api.config.js

@@ -61,7 +61,6 @@ export const API = {
     notifyMessage: _baseURL + '/notify/getMeetingList',
 
 
-
     //发布作业
     homeWorkAdd: _baseURL + "/notify/issueNotification",
     homeWorkList: _baseURL + "/notify/getMeetingList",
@@ -138,7 +137,6 @@ export const API = {
 
 
 
-
     ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
     //获取用户是否绑定
     USER_ISBINDING: _baseURL + '/wxSchool/user/isBinding',
@@ -157,8 +155,10 @@ export const API = {
     //1系统信息 2使用帮助
     SYSTEM_MESSAGE: _baseURL + '/wxSchool/notify/selectNotifyListByType',
 
-    //获取班级列表
+    //获取教师班级列表
     GET_CLASS_LIST: _baseURL + '/wxSchool/clazz/selectClazzByTeacher',
+    //获取学生班级列表
+    GET_STU_CLASS_LIST: _baseURL + '/wxSchool/clazz/selectClazzByStu',
     //文件上传地址
     UPLOAD_FILE: _baseURL + '/wxSchool/file/uploadFile',
     //新建相册
@@ -170,12 +170,14 @@ export const API = {
     //获取相册内所有图片
     GET_PICTURE_LIST: _baseURL + '/wxSchool/clazzPicture/getPictureByAlbum',
 
+    //创建通知公告
+    NOTIFY_CREATE: _baseURL + '/wxSchool/notify/createNotify',
     //通知公告列表家长端
-    NOTIFY_LIST_PARENT: _baseURL + '/wxSchool/notify/notifyListByParent',
+    NOTIFY_LIST_PARENT: _baseURL + '/wxSchool/notify/notifyListByStu',
     //通知公告列表教师端
     NOTIFY_LIST_TEACHER: _baseURL + '/wxSchool/notify/notifyListByTeacher',
-    //创建通知公告
-    NOTIFY_CREATE: _baseURL + '/wxSchool/notify/createNotify',
+    //通知公告详情
+    NOTIFY_DETAIL: _baseURL + '/wxSchool/notify/getNotifyDetails',
 }
 
 

+ 28 - 28
frontend/wechat-web/src/modules/album/ClassAlbum.jsx

@@ -5,10 +5,10 @@
 
 import React, {Component} from 'react'
 import AlbumItem from 'components/AlbumItem'
-import {getStrValue, isObjEmpty} from "../../utils/common";
+import {getIntValue, getStrValue, isObjEmpty} from "../../utils/common";
 import {Icon} from 'antd'
 import {Picker, List, Toast} from 'antd-mobile'
-import {fetchGet} from "../../utils/fetchRequest";
+import {fetchGet, fetchPost} from "../../utils/fetchRequest";
 import {_baseURL, API} from "../../configs/api.config";
 import ClassBean from 'model/ClassBean'
 import AlbumBean from "../../model/AlbumBean";
@@ -42,7 +42,6 @@ class ClassAlbum extends Component {
     }
 
     componentDidMount() {
-        console.log(this.props.userInfo)
         document.title = '班级相册'
         this.node.scrollIntoView();
 
@@ -105,18 +104,19 @@ class ClassAlbum extends Component {
         classList.length = 0
 
         let userRole = this.props.userInfo.userRole;
-        let params
+        let params, url
         if (userRole == 1) {
+            url = API.GET_STU_CLASS_LIST
             params = {
-                stuId: this.props.userInfo.stuId
+                stuId: this.props.userInfo.user.student.stuId
             }
         } else {
+            url = API.GET_CLASS_LIST
             params = {
-                userId: this.props.userInfo.userId
+                teacherId: this.props.userInfo.user.userFunId
             }
         }
-        console.log(params)
-        fetchGet(API.GET_CLASS_LIST, params).then(response => {
+        fetchGet(url, params).then(response => {
             Toast.hide()
 
             this.analysisClassList(response)
@@ -131,7 +131,7 @@ class ClassAlbum extends Component {
     getAlbumList = classBean => {
         this.initAlbumList()
 
-        fetchGet(API.GET_ALBUM_LIST, {
+        fetchPost(API.GET_ALBUM_LIST, {
             clazzId: classBean.schId,
             albumStatus: 1,
             albumType: 1,
@@ -148,18 +148,18 @@ class ClassAlbum extends Component {
                     if (dataObject) {
                         let albumBean = new AlbumBean()
 
-                        albumBean.albumId = getStrValue(dataObject, 'picId')
-                        albumBean.coverImg = getStrValue(dataObject, 'picUrl') ?
-                            _baseURL + getStrValue(dataObject, 'picUrl') : ''
-                        albumBean.albumName = getStrValue(dataObject, 'picName')
-                        albumBean.quantity = getStrValue(dataObject, 'quantity')
-                        albumBean.albumDate = getStrValue(dataObject, 'picDate')
-                        albumBean.type = getStrValue(dataObject, 'picType')
-                        albumBean.status = getStrValue(dataObject, 'picStatus')
-                        albumBean.remarks = getStrValue(dataObject, 'picStatus')
-                        albumBean.gradeId = getStrValue(dataObject, 'parentId')
-                        albumBean.classId = getStrValue(dataObject, 'schId')
-                        albumBean.classname = getStrValue(dataObject, 'schName')
+                        albumBean.albumId = getStrValue(dataObject, 'albumId')
+                        albumBean.coverImg = getStrValue(dataObject, 'albumUrl') ?
+                            _baseURL + getStrValue(dataObject, 'albumUrl') : ''
+                        albumBean.albumName = getStrValue(dataObject, 'albumTitle')
+                        albumBean.quantity = getIntValue(dataObject, 'albumCount')
+                        albumBean.albumDate = getStrValue(dataObject, 'createDate')
+                        albumBean.type = getStrValue(dataObject, 'albumType')
+                        albumBean.status = getStrValue(dataObject, 'albumStatus')
+                        albumBean.remarks = getStrValue(dataObject, 'albumRemarks')
+                        // albumBean.gradeId = getStrValue(dataObject, 'parentId')
+                        albumBean.classId = getStrValue(dataObject, 'clazzId')
+                        // albumBean.classname = getStrValue(dataObject, 'schName')
 
                         albumList.push(albumBean)
                     }
@@ -223,14 +223,14 @@ class ClassAlbum extends Component {
                 if (dataObject) {
                     let classBean = new ClassBean()
 
-                    classBean.label = getStrValue(dataObject, 'parentName') + getStrValue(dataObject, 'schName')
+                    classBean.label = getStrValue(dataObject, 'gradeName') + getStrValue(dataObject, 'clazzName')
                     classBean.value = i
-                    classBean.schId = getStrValue(dataObject, 'schId')
-                    classBean.parentId = getStrValue(dataObject, 'parentId')
-                    classBean.schName = getStrValue(dataObject, 'schName')
-                    classBean.schStatus = getStrValue(dataObject, 'schStatus')
-                    classBean.schRemarks = getStrValue(dataObject, 'schRemarks')
-                    classBean.grade = getStrValue(dataObject, 'parentName')
+                    classBean.schId = getStrValue(dataObject, 'clazzId')
+                    classBean.parentId = getStrValue(dataObject, 'gradeId')
+                    classBean.schName = getStrValue(dataObject, 'clazzName')
+                    classBean.schStatus = getStrValue(dataObject, 'clazzStatus')
+                    classBean.schRemarks = getStrValue(dataObject, 'clazzRemarks')
+                    classBean.grade = getStrValue(dataObject, 'gradeName')
 
                     classList.push(classBean)
                 }

+ 25 - 19
frontend/wechat-web/src/modules/album/NewAlbum.jsx

@@ -89,17 +89,19 @@ class NewAlbum extends Component {
         classList.length = 0
 
         let userRole = this.props.userInfo.userRole;
-        let params
+        let params, url
         if (userRole == 1) {
+            url = API.GET_STU_CLASS_LIST
             params = {
-                stuId: this.props.userInfo.stuId
+                stuId: this.props.userInfo.user.student.stuId
             }
         } else {
+            url = API.GET_CLASS_LIST
             params = {
-                userId: this.props.userInfo.userId
+                teacherId: this.props.userInfo.user.userFunId
             }
         }
-        fetchGet(API.GET_CLASS_LIST, params).then(response => {
+        fetchGet(url, params).then(response => {
             Toast.hide()
 
             this.analysisClassList(response)
@@ -125,19 +127,18 @@ class NewAlbum extends Component {
                 if (dataObject) {
                     let classBean = new ClassBean()
 
-                    classBean.label = getStrValue(dataObject, 'parentName') + getStrValue(dataObject, 'schName')
+                    classBean.label = getStrValue(dataObject, 'gradeName') + getStrValue(dataObject, 'clazzName')
                     classBean.value = i
-                    classBean.schId = getStrValue(dataObject, 'schId')
+                    classBean.schId = getStrValue(dataObject, 'clazzId')
+                    classBean.parentId = getStrValue(dataObject, 'gradeId')
+                    classBean.schName = getStrValue(dataObject, 'clazzName')
+                    classBean.schStatus = getStrValue(dataObject, 'clazzStatus')
+                    classBean.schRemarks = getStrValue(dataObject, 'clazzRemarks')
+                    classBean.grade = getStrValue(dataObject, 'gradeName')
+
                     if (this.classId == classBean.schId) {
                         classindex = i
                     }
-
-                    classBean.parentId = getStrValue(dataObject, 'parentId')
-                    classBean.schName = getStrValue(dataObject, 'schName')
-                    classBean.schStatus = getStrValue(dataObject, 'schStatus')
-                    classBean.schRemarks = getStrValue(dataObject, 'schRemarks')
-                    classBean.grade = getStrValue(dataObject, 'parentName')
-
                     classList.push(classBean)
                 }
             }
@@ -182,15 +183,20 @@ class NewAlbum extends Component {
         }
 
         Toast.loading('新建相册中...', 0)
+        const paramObj = {
+            albumTitle: albumTitle,
+            albumUrl: '',
+            albumType: 1,
+            albumRemarks: albumdescription,
+            clazzId: this.classId,
+            creator: this.props.userInfo.user.userFunId,
+            albumStatus: 1
+        }
         fetchPost(API.NEW_CLASS_ALBUM, {
-            picName: albumTitle,
-            picUrl: '',
-            picType: 1,
-            picRemarks: albumdescription,
-            schId: this.classId
+            jsonAlbum: JSON.stringify(paramObj)
         }).then(response => {
             Toast.hide()
-            Toast.success(`相册【${albumTitle}】新建成功`,1)
+            Toast.success(`相册【${albumTitle}】新建成功`, 1)
             this.setState({
                 albumTitle: '',
                 albumdescription: ''

+ 17 - 18
frontend/wechat-web/src/modules/album/PictureList.jsx

@@ -12,7 +12,7 @@ import '../../index.css'
 import 'css/album-item.css'
 
 import ImagesViewer from '../../components/imagesVIewer/index'
-import {fetchGet} from "../../utils/fetchRequest";
+import {fetchGet, fetchPost} from "../../utils/fetchRequest";
 import {_baseURL, API} from "../../configs/api.config";
 import PictureBean from "../../model/PictureBean";
 
@@ -29,13 +29,14 @@ export default class PictureList extends Component {
         }
     }
 
-    componentDidMount() {
-        const title = this.props.match.params.title
-
+    componentWillMount() {
         this.mType = this.props.match.params.type
         this.albumId = this.props.match.params.albumId
+    }
+
+    componentDidMount() {
+        const title = this.props.match.params.title
 
-        console.log(title + '---' + this.albumId)
         if (title) {
             document.title = title
         } else {
@@ -105,10 +106,10 @@ export default class PictureList extends Component {
 
     getPictureList = albumId => {
 
-        fetchGet(API.GET_PICTURE_LIST, {
+        fetchPost(API.GET_PICTURE_LIST, {
             albumId: albumId,
             pageIndex: 1,
-            pageSize: 100,
+            pageSize: 1000,
         }).then(response => {
             Toast.hide()
 
@@ -118,14 +119,11 @@ export default class PictureList extends Component {
             if (response) {
                 const dataObject = response.data
                 if (dataObject) {
-                    const albumObj = dataObject.album
-                    if (albumObj.picRemarks) {
-                        this.setState({
-                            description: albumObj.picRemarks
-                        })
-                    }
+                    this.setState({
+                        description: getStrValue(dataObject,'albumRemarks')
+                    })
 
-                    const pictures = dataObject.pictures
+                    const pictures = dataObject.clazzPictureDOS
                     if (pictures) {
                         pictures.forEach((picture, index) => {
                             const pictureBean = new PictureBean()
@@ -136,13 +134,14 @@ export default class PictureList extends Component {
                             pictureBean.picDate = getStrValue(picture, 'picDate')
                             pictureBean.picType = getStrValue(picture, 'picType')
                             pictureBean.picStatus = getStrValue(picture, 'picStatus')
-                            pictureBean.parentId = getStrValue(picture, 'parentId')
                             pictureBean.picRemarks = getStrValue(picture, 'picRemarks')
-                            pictureBean.schId = getStrValue(picture, 'schId')
-                            pictureBean.quantity = getStrValue(picture, 'quantity')
-                            pictureBean.schName = getStrValue(picture, 'schName')
+                            pictureBean.schId = getStrValue(picture, 'clazzId')
                             pictureBean.url = _baseURL + getStrValue(picture, 'picUrl')
 
+                            // pictureBean.parentId = getStrValue(picture, 'parentId')
+                            // pictureBean.quantity = getStrValue(picture, 'quantity')
+                            // pictureBean.schName = getStrValue(picture, 'schName')
+
                             pictureList.push(pictureBean)
                         })
                     }

+ 20 - 19
frontend/wechat-web/src/modules/album/UploadImage.jsx

@@ -66,10 +66,10 @@ export default class UploadImage extends Component {
     }
 
     getPictureList = albumId => {
-        fetchGet(API.GET_PICTURE_LIST, {
+        fetchPost(API.GET_PICTURE_LIST, {
             albumId: albumId,
             pageIndex: 1,
-            pageSize: 100,
+            pageSize: 1000,
         }).then(response => {
             Toast.hide()
 
@@ -77,27 +77,28 @@ export default class UploadImage extends Component {
             fileList.length = 0
 
             if (response) {
-                const dataArray = response.data.pictures
+                const dataArray = response.data.clazzPictureDOS
                 if (dataArray) {
-                    dataArray.forEach((dataObject, index) => {
+                    dataArray.forEach((picture, index) => {
                         const pictureBean = new PictureBean()
 
-                        pictureBean.picId = getStrValue(dataObject, 'picId')
-                        pictureBean.picName = getStrValue(dataObject, 'picName')
-                        pictureBean.picUrl = getStrValue(dataObject, 'picUrl')
-                        pictureBean.picDate = getStrValue(dataObject, 'picDate')
-                        pictureBean.picType = getStrValue(dataObject, 'picType')
-                        pictureBean.picStatus = getStrValue(dataObject, 'picStatus')
-                        pictureBean.parentId = getStrValue(dataObject, 'parentId')
-                        pictureBean.picRemarks = getStrValue(dataObject, 'picRemarks')
-                        pictureBean.schId = getStrValue(dataObject, 'schId')
-                        pictureBean.quantity = getStrValue(dataObject, 'quantity')
-                        pictureBean.schName = getStrValue(dataObject, 'schName')
-
-                        pictureBean.uid = getStrValue(dataObject, 'picId')
-                        pictureBean.url = _baseURL + getStrValue(dataObject, 'picUrl')
+                        pictureBean.picId = getStrValue(picture, 'picId')
+                        pictureBean.picName = getStrValue(picture, 'picName')
+                        pictureBean.picUrl = getStrValue(picture, 'picUrl')
+                        pictureBean.picDate = getStrValue(picture, 'picDate')
+                        pictureBean.picType = getStrValue(picture, 'picType')
+                        pictureBean.picStatus = getStrValue(picture, 'picStatus')
+                        pictureBean.picRemarks = getStrValue(picture, 'picRemarks')
+                        pictureBean.schId = getStrValue(picture, 'clazzId')
+
+                        // pictureBean.parentId = getStrValue(picture, 'parentId')
+                        // pictureBean.quantity = getStrValue(picture, 'quantity')
+                        // pictureBean.schName = getStrValue(picture, 'schName')
+
+                        pictureBean.uid = getStrValue(picture, 'picId')
+                        pictureBean.url = _baseURL + getStrValue(picture, 'picUrl')
                         // pictureBean.type = ''
-                        pictureBean.thumbUrl = _baseURL + getStrValue(dataObject, 'picUrl')
+                        pictureBean.thumbUrl = _baseURL + getStrValue(picture, 'picUrl')
                         pictureBean.status = 'done'
                         // pictureBean.size = ''
 

+ 16 - 6
frontend/wechat-web/src/modules/announce/AnnounceRelease.jsx

@@ -188,23 +188,33 @@ class AnnounceRelease extends Component {
                 fileUrls.push(value.picUrl)
             })
         }
-        const userList = []
+        const stuList = [], teacherList = []
         if (!isObjEmpty(this.checkNodes)) {
             this.checkNodes.forEach((node, index) => {
-                userList.push(node.userId)
+                if (node.value.startWith('0')) {
+                    teacherList.push(node.userId)
+                } else if (node.value.startWith('2')) {
+                    stuList.push(node.userId)
+                }
             })
         }
-        console.log(userList)
 
-        fetchPost(API.NOTIFY_CREATE, {
+        const paramObj = {
             notifyTitle: announceTitle,
             notifyType: 3,
             notifyDetails: announceContent,
-            notifyCreator: this.props.userInfo.userId,
+            notifyCreator: this.props.userInfo.user.userFunId,
             notifyStatus: 1,
             notifyFiles: JSON.stringify(fileUrls),
             notifyRemarks: '',
-            userIds: JSON.stringify(userList)
+            notifyTeacher: JSON.stringify(teacherList),
+            notifyStu: JSON.stringify(stuList),
+        }
+
+        console.log(paramObj)
+
+        fetchPost(API.NOTIFY_CREATE, {
+            jsonNotify: JSON.stringify(paramObj)
         }).then(response => {
             Toast.hide()
             Toast.success('发布成功', 1)

+ 16 - 16
frontend/wechat-web/src/modules/notificationCenter/NotifyBoardDetail.jsx

@@ -7,7 +7,7 @@ import React, {Component} from 'react'
 import ImagesViewer from "../../components/imagesVIewer";
 import {getArrayValue, getIntValue, getStrValue, isObjEmpty} from "../../utils/common";
 import NotifyBoBean from "../../model/NotifyBoBean";
-import {fetchGet} from "../../utils/fetchRequest";
+import {fetchGet, fetchPost} from "../../utils/fetchRequest";
 import {_baseURL, API} from "../../configs/api.config";
 import {List, Icon} from 'antd'
 import {Toast} from 'antd-mobile'
@@ -62,13 +62,15 @@ class NotifyBoardDetail extends Component {
         if (!isObjEmpty(readedList) && readedList != '[]') {
             for (let i = 0; i < readedList.length; i++) {
                 receiveItems.push(<span
-                    className='notify-detail-modal-read'>{getStrValue(readedList[i], 'userName')}</span>)
+                    className='notify-detail-modal-read'>{getStrValue(readedList[i], 'stuName') ?
+                    getStrValue(readedList[i], 'stuName') : getStrValue(readedList[i], 'teacherName')}</span>)
             }
         }
         if (!isObjEmpty(unReadList) && unReadList != '[]') {
             for (let i = 0; i < unReadList.length; i++) {
                 receiveItems.push(<span
-                    className='notify-detail-modal-unread'>{getStrValue(unReadList[i], 'userName')}</span>)
+                    className='notify-detail-modal-unread'>{getStrValue(unReadList[i], 'stuName') ?
+                    getStrValue(unReadList[i], 'stuName') : getStrValue(unReadList[i], 'teacherName')}</span>)
             }
         }
 
@@ -115,9 +117,8 @@ class NotifyBoardDetail extends Component {
 
     obtainDetail = () => {
         Toast.loading('', 0)
-        fetchGet(API.TASK_DETAIL, {
+        fetchPost(API.NOTIFY_DETAIL, {
             notifyId: this.notifyId,
-            userId: '10000',
         }).then(response => {
             Toast.hide()
             if (response && response.data) {
@@ -126,18 +127,17 @@ class NotifyBoardDetail extends Component {
                 let item = response.data
                 if (item) {
                     notifyBoBean.noId = getIntValue(item, 'notifyId')
-                    notifyBoBean.noTitle = getStrValue(item, 'notifyName')
-                    console.log(getArrayValue(item, 'notifyFiles'))
-                    notifyBoBean.enclosure = getArrayValue(item, 'notifyFiles').length > 0 ? JSON.parse(getArrayValue(item, 'notifyFiles')) : []
-                    if (item.notifyRecords) {
-                        notifyBoBean.unRead = getArrayValue(item.notifyRecords, 'unReads')
-                        notifyBoBean.readed = getArrayValue(item.notifyRecords, 'reads')
-
-                        notifyBoBean.allCount = getIntValue(notifyBoBean.unRead, 'length') + getIntValue(notifyBoBean.readed, 'length')
-                    }
+                    notifyBoBean.noTitle = getStrValue(item, 'notifyTitle')
+                    notifyBoBean.enclosure = getArrayValue(item, 'notifyFiles').length > 0
+                        ? JSON.parse(getArrayValue(item, 'notifyFiles')) : []
+
+                    notifyBoBean.unRead = getArrayValue(item, 'unRead')
+                    notifyBoBean.readed = getArrayValue(item, 'read')
+
+                    notifyBoBean.allCount = getIntValue(notifyBoBean.unRead, 'length') + getIntValue(notifyBoBean.readed, 'length')
                     notifyBoBean.noContent = getStrValue(item, 'notifyDetails')
-                    notifyBoBean.noIssue = getStrValue(item, 'notifyCreatorName')
-                    notifyBoBean.noTime = getStrValue(item, 'creatDate')
+                    notifyBoBean.noIssue = getStrValue(item, 'teacherName')
+                    notifyBoBean.noTime = getStrValue(item, 'createDate')
 
                     notifyBoBean.noStatu = ''
                 }

+ 11 - 11
frontend/wechat-web/src/modules/notificationCenter/NotifyBoardParent.jsx

@@ -251,26 +251,26 @@ class NotifyBoardParent extends Component {
         }
 
         fetchPost(API.NOTIFY_LIST_PARENT, {
-            parentId: this.props.userInfo.userId,
+            stuId: this.props.userInfo.user.student.stuId,
             notifyStatus: 1,
             pageIndex: mPageIndex,
             pageSize: mPageSize
         }).then(response => {
             Toast.hide()
-            if (response && response.data && response.data.notify.length > 0) {
-                response.data.notify.forEach((item, index) => {
+            if (response && response.data) {
+                response.data.forEach((item, index) => {
                     let notifyBoBean = new NotifyBoBean()
 
                     notifyBoBean.noId = getIntValue(item, 'notifyId')
-                    notifyBoBean.noTitle = getStrValue(item, 'notifyName')
-                    notifyBoBean.enclosure = getArrayValue(item, 'enclosure')
-                    if (item.notifyRecords) {
-                        notifyBoBean.unRead = getArrayValue(item.notifyRecords, 'unReads')
-                        notifyBoBean.readed = getArrayValue(item.notifyRecords, 'reads')
-                    }
+                    notifyBoBean.noTitle = getStrValue(item, 'notifyTitle')
+                    notifyBoBean.enclosure = getArrayValue(item, 'notifyFiles')
+                    notifyBoBean.unRead = getArrayValue(item, 'unRead')
+                    notifyBoBean.readed = getArrayValue(item, 'read')
+                    notifyBoBean.allCount = getIntValue(notifyBoBean.unRead, 'length') + getIntValue(notifyBoBean.readed, 'length')
+
                     notifyBoBean.noContent = getStrValue(item, 'notifyDetails')
-                    notifyBoBean.noIssue = getStrValue(item, 'notifyCreatorName')
-                    notifyBoBean.noTime = getStrValue(item, 'creatDate')
+                    notifyBoBean.noIssue = getStrValue(item, 'teacherName')
+                    notifyBoBean.noTime = getStrValue(item, 'createDate')
 
                     if (getIntValue(item, 'isRead') == 1) {
                         notifyBoBean.noStatu = '未读'

+ 16 - 20
frontend/wechat-web/src/modules/notificationCenter/NotifyBoardTeacher.jsx

@@ -384,27 +384,25 @@ class NotifyBoardTeacher extends Component {
         }
 
         fetchPost(API.NOTIFY_LIST_TEACHER, {
-            teacherId: this.props.userInfo.userId,
+            teacherId: this.props.userInfo.user.userFunId,
             notifyStatus: 1,
             pageIndex: mReleaseIndex,
             pageSize: mPageSize
         }).then(response => {
-            if (response && response.data && response.data.creat.length > 0) {
-                response.data.creat.forEach((item, index) => {
+            if (response && response.data && response.data.create.length > 0) {
+                response.data.create.forEach((item, index) => {
                     let notifyBoBean = new NotifyBoBean()
 
                     notifyBoBean.noId = getIntValue(item, 'notifyId')
-                    notifyBoBean.noTitle = getStrValue(item, 'notifyName')
+                    notifyBoBean.noTitle = getStrValue(item, 'notifyTitle')
                     notifyBoBean.enclosure = getArrayValue(item, 'notifyFiles')
-                    if (item.notifyRecords) {
-                        notifyBoBean.unRead = getArrayValue(item.notifyRecords, 'unReads')
-                        notifyBoBean.readed = getArrayValue(item.notifyRecords, 'reads')
+                    notifyBoBean.unRead = getArrayValue(item, 'unRead')
+                    notifyBoBean.readed = getArrayValue(item, 'read')
+                    notifyBoBean.allCount = getIntValue(notifyBoBean.unRead, 'length') + getIntValue(notifyBoBean.readed, 'length')
 
-                        notifyBoBean.allCount = getIntValue(notifyBoBean.unRead, 'length') + getIntValue(notifyBoBean.readed, 'length')
-                    }
                     notifyBoBean.noContent = getStrValue(item, 'notifyDetails')
-                    notifyBoBean.noIssue = getStrValue(item, 'notifyCreatorName')
-                    notifyBoBean.noTime = getStrValue(item, 'creatDate')
+                    notifyBoBean.noIssue = getStrValue(item, 'teacherName')
+                    notifyBoBean.noTime = getStrValue(item, 'createDate')
 
                     /*if (getIntValue(item, 'isRead') == 1) {
                         notifyBoBean.noStatu = '未读'
@@ -457,7 +455,7 @@ class NotifyBoardTeacher extends Component {
         }
 
         fetchPost(API.NOTIFY_LIST_TEACHER, {
-            teacherId: this.props.userInfo.userId,
+            teacherId: this.props.userInfo.user.userFunId,
             notifyStatus: 1,
             pageIndex: mReceiveIndex,
             pageSize: mPageSize
@@ -467,17 +465,15 @@ class NotifyBoardTeacher extends Component {
                     let notifyBoBean = new NotifyBoBean()
 
                     notifyBoBean.noId = getIntValue(item, 'notifyId')
-                    notifyBoBean.noTitle = getStrValue(item, 'notifyName')
+                    notifyBoBean.noTitle = getStrValue(item, 'notifyTitle')
                     notifyBoBean.enclosure = getArrayValue(item, 'notifyFiles')
-                    if (item.notifyRecords) {
-                        notifyBoBean.unRead = getArrayValue(item.notifyRecords, 'unReads')
-                        notifyBoBean.readed = getArrayValue(item.notifyRecords, 'reads')
+                    notifyBoBean.unRead = getArrayValue(item, 'unRead')
+                    notifyBoBean.readed = getArrayValue(item, 'read')
+                    notifyBoBean.allCount = getIntValue(notifyBoBean.unRead, 'length') + getIntValue(notifyBoBean.readed, 'length')
 
-                        notifyBoBean.allCount = getIntValue(notifyBoBean.unRead, 'length') + getIntValue(notifyBoBean.readed, 'length')
-                    }
                     notifyBoBean.noContent = getStrValue(item, 'notifyDetails')
-                    notifyBoBean.noIssue = getStrValue(item, 'notifyCreatorName')
-                    notifyBoBean.noTime = getStrValue(item, 'creatDate')
+                    notifyBoBean.noIssue = getStrValue(item, 'teacherName')
+                    notifyBoBean.noTime = getStrValue(item, 'createDate')
 
                     if (getIntValue(item, 'isRead') == 1) {
                         notifyBoBean.noStatu = '未读'

+ 6 - 4
frontend/wechat-web/src/modules/phonesBook/PhonesSelect.jsx

@@ -158,17 +158,19 @@ class PhonesSelect extends Component {
         const {parentList} = this.state
 
         let userRole = this.props.userInfo.userRole;
-        let params
+        let params, url
         if (userRole == 1) {
+            url = API.GET_STU_CLASS_LIST
             params = {
-                stuId: this.props.userInfo.stuId
+                stuId: this.props.userInfo.user.student.stuId
             }
         } else {
+            url = API.GET_CLASS_LIST
             params = {
-                userId: this.props.userInfo.userId
+                teacherId: this.props.userInfo.user.userFunId
             }
         }
-        fetchGet(API.GET_CLASS_LIST, params).then(response => {
+        fetchGet(url, params).then(response => {
             Toast.hide();
 
             if (response && response.data) {

+ 14 - 12
frontend/wechat-web/src/modules/video/UploadVideo.jsx

@@ -119,17 +119,19 @@ class UploadVideo extends Component {
         classList.length = 0
 
         let userRole = this.props.userInfo.userRole;
-        let params
+        let params, url
         if (userRole == 1) {
+            url = API.GET_STU_CLASS_LIST
             params = {
-                stuId: this.props.userInfo.stuId
+                stuId: this.props.userInfo.user.student.stuId
             }
         } else {
+            url = API.GET_CLASS_LIST
             params = {
-                userId: this.props.userInfo.userId
+                teacherId: this.props.userInfo.user.userFunId
             }
         }
-        fetchGet(API.GET_CLASS_LIST, params).then(response => {
+        fetchGet(url, params).then(response => {
             Toast.hide()
 
             this.analysisClassList(response)
@@ -154,19 +156,19 @@ class UploadVideo extends Component {
                 if (dataObject) {
                     let classBean = new ClassBean()
 
-                    classBean.label = getStrValue(dataObject, 'parentName') + getStrValue(dataObject, 'schName')
+                    classBean.label = getStrValue(dataObject, 'gradeName') + getStrValue(dataObject, 'clazzName')
                     classBean.value = i
-                    classBean.schId = getStrValue(dataObject, 'schId')
+                    classBean.schId = getStrValue(dataObject, 'clazzId')
+                    classBean.parentId = getStrValue(dataObject, 'gradeId')
+                    classBean.schName = getStrValue(dataObject, 'clazzName')
+                    classBean.schStatus = getStrValue(dataObject, 'clazzStatus')
+                    classBean.schRemarks = getStrValue(dataObject, 'clazzRemarks')
+                    classBean.grade = getStrValue(dataObject, 'gradeName')
+
                     if (this.classId == classBean.schId) {
                         classindex = i
                     }
 
-                    classBean.parentId = getStrValue(dataObject, 'parentId')
-                    classBean.schName = getStrValue(dataObject, 'schName')
-                    classBean.schStatus = getStrValue(dataObject, 'schStatus')
-                    classBean.schRemarks = getStrValue(dataObject, 'schRemarks')
-                    classBean.grade = getStrValue(dataObject, 'parentName')
-
                     classList.push(classBean)
                 }
             }

+ 14 - 12
frontend/wechat-web/src/modules/video/WonderMoment.jsx

@@ -106,18 +106,20 @@ class WonderMoment extends Component {
         const {classList, classValue} = this.state
         classList.length = 0
 
-        let userRole = this.props.userInfo.userRole
-        let params
+        let userRole = this.props.userInfo.userRole;
+        let params, url
         if (userRole == 1) {
+            url = API.GET_STU_CLASS_LIST
             params = {
-                stuId: this.props.userInfo.stuId
+                stuId: this.props.userInfo.user.student.stuId
             }
         } else {
+            url = API.GET_CLASS_LIST
             params = {
-                userId: this.props.userInfo.userId
+                teacherId: this.props.userInfo.user.userFunId
             }
         }
-        fetchGet(API.GET_CLASS_LIST, params).then(response => {
+        fetchGet(url, params).then(response => {
             Toast.hide()
 
             this.analysisClassList(response)
@@ -142,14 +144,14 @@ class WonderMoment extends Component {
                 if (dataObject) {
                     let classBean = new ClassBean()
 
-                    classBean.label = getStrValue(dataObject, 'parentName') + getStrValue(dataObject, 'schName')
+                    classBean.label = getStrValue(dataObject, 'gradeName') + getStrValue(dataObject, 'clazzName')
                     classBean.value = i
-                    classBean.schId = getStrValue(dataObject, 'schId')
-                    classBean.parentId = getStrValue(dataObject, 'parentId')
-                    classBean.schName = getStrValue(dataObject, 'schName')
-                    classBean.schStatus = getStrValue(dataObject, 'schStatus')
-                    classBean.schRemarks = getStrValue(dataObject, 'schRemarks')
-                    classBean.grade = getStrValue(dataObject, 'parentName')
+                    classBean.schId = getStrValue(dataObject, 'clazzId')
+                    classBean.parentId = getStrValue(dataObject, 'gradeId')
+                    classBean.schName = getStrValue(dataObject, 'clazzName')
+                    classBean.schStatus = getStrValue(dataObject, 'clazzStatus')
+                    classBean.schRemarks = getStrValue(dataObject, 'clazzRemarks')
+                    classBean.grade = getStrValue(dataObject, 'gradeName')
 
                     classList.push(classBean)
                 }