From 4213107216b45d0ca317f3a343e2341f3759a1a2 Mon Sep 17 00:00:00 2001
From: xuhubin <1269286451@qq.com>
Date: Thu, 5 Nov 2020 09:48:46 +0800
Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E7=BA=BF=E4=B8=8A=E8=AF=BE=E7=A8=8B?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E8=B0=83=E6=95=B4=202=E3=80=81=E7=BA=BF?=
=?UTF-8?q?=E4=B8=8A=E8=AF=BE=E7=A8=8B=E8=AF=84=E8=AE=BA=E5=A2=9E=E5=8A=A0?=
=?UTF-8?q?=E5=AD=97=E6=AE=B5=203=E3=80=81=E9=A1=B5=E9=9D=A2=E6=97=A0?=
=?UTF-8?q?=E7=94=A8=E4=BB=A3=E7=A0=81=E6=B3=A8=E9=87=8A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../OnlineCoursesEvaluateController.java | 4 +-
.../main/resources/static/ruoyi/js/common.js | 44 +++++++++++
.../front/domain/OnlineCoursesEvaluate.java | 45 ++++++++++-
.../mapper/OnlineCoursesEvaluateMapper.java | 2 +-
.../IOnlineCoursesEvaluateService.java | 2 +-
.../OnlineCoursesEvaluateServiceImpl.java | 2 +-
.../front/OnlineCoursesEvaluateMapper.xml | 17 ++++-
.../templates/front/carousel/add.html | 68 ++++++++---------
.../templates/front/carousel/edit.html | 76 +++++++++----------
.../resources/templates/front/cases/add.html | 68 ++++++++---------
.../resources/templates/front/cases/edit.html | 76 +++++++++----------
.../templates/front/courses/add.html | 71 ++++++++++++++---
.../templates/front/courses/courses.html | 35 ++++++---
.../templates/front/courses/edit.html | 72 ++++++++++++++++--
.../templates/front/evaluate/add.html | 33 ++++++++
.../templates/front/evaluate/edit.html | 33 ++++++++
.../templates/front/evaluate/evaluate.html | 33 +++++++-
.../templates/front/recruitment/add.html | 68 ++++++++---------
.../templates/front/recruitment/edit.html | 76 +++++++++----------
19 files changed, 575 insertions(+), 250 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/front/OnlineCoursesEvaluateController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/front/OnlineCoursesEvaluateController.java
index 0ec1d1683..2135c538f 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/front/OnlineCoursesEvaluateController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/front/OnlineCoursesEvaluateController.java
@@ -1,4 +1,4 @@
-package com.ruoyi.web.controller.front;
+package com.ruoyi.front.controller;
import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions;
@@ -23,7 +23,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
* 线上课程评价Controller
*
* @author ruoyi
- * @date 2020-10-21
+ * @date 2020-11-05
*/
@Controller
@RequestMapping("/front/evaluate")
diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js
index 11a0a4394..53db4b9d0 100644
--- a/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js
+++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/common.js
@@ -500,4 +500,48 @@ function uploadFile(async, fullPathId, fileNameId, absolutePAthId) {
});
return res;
+}
+//上传文件
+function uploadMoreFile(async, fullPathId,formNameId, fileNameId, absolutePAthId) {
+ let res = -1;
+ var formData = new FormData();
+ if ($('#filePath')[0].files[0] == null) {
+ $.modal.alertWarning("请先选择文件路径");
+ return res;
+ }
+ formData.append('fileName', $("#fileName").val());
+ formData.append('file', $('#'+formNameId)[0].files[0]);
+ $.ajax({
+ url: "/common/upload",
+ type: 'post',
+ cache: false,
+ data: formData,
+ processData: false,
+ contentType: false,
+ dataType: "json",
+ async: async,
+ success: function(result) {
+ if (result.code == web_status.SUCCESS) {
+ if (fullPathId) {
+ $('#' + fullPathId).val(result.url);
+ }
+ if (fileNameId) {
+ $('#' + fileNameId).val(result.originalFilename);
+ }
+ if (absolutePAthId) {
+ $('#' + absolutePAthId).val(result.fileName);
+ }
+
+ } else {
+ $.modal.alertError(result.msg);
+ }
+
+ res = result.code;
+ },
+ error: function(error) {
+ $.modal.alertWarning("文件上传失败。");
+ }
+ });
+
+ return res;
}
\ No newline at end of file
diff --git a/ruoyi-front/src/main/java/com/ruoyi/front/domain/OnlineCoursesEvaluate.java b/ruoyi-front/src/main/java/com/ruoyi/front/domain/OnlineCoursesEvaluate.java
index 4fac2cbe9..352aa3d3c 100644
--- a/ruoyi-front/src/main/java/com/ruoyi/front/domain/OnlineCoursesEvaluate.java
+++ b/ruoyi-front/src/main/java/com/ruoyi/front/domain/OnlineCoursesEvaluate.java
@@ -1,5 +1,6 @@
package com.ruoyi.front.domain;
+import java.util.Date;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
@@ -9,7 +10,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
* 线上课程评价对象 online_courses_evaluate
*
* @author ruoyi
- * @date 2020-10-21
+ * @date 2020-11-05
*/
public class OnlineCoursesEvaluate extends BaseEntity
{
@@ -33,6 +34,18 @@ public class OnlineCoursesEvaluate extends BaseEntity
/** 删除标志(0代表存在 2代表删除) */
private String delFlag;
+ /** 状态(0:待审核,1:审核不通过,2:审核通过) */
+ @Excel(name = "状态", readConverterExp = "0=:待审核,1:审核不通过,2:审核通过")
+ private String auditStatus;
+
+ /** 审核者 */
+ @Excel(name = "审核者")
+ private String checkBy;
+
+ /** 审核时间 */
+ @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
+ private Date checkTime;
+
public void setId(Long id)
{
this.id = id;
@@ -78,6 +91,33 @@ public class OnlineCoursesEvaluate extends BaseEntity
{
return delFlag;
}
+ public void setAuditStatus(String auditStatus)
+ {
+ this.auditStatus = auditStatus;
+ }
+
+ public String getAuditStatus()
+ {
+ return auditStatus;
+ }
+ public void setCheckBy(String checkBy)
+ {
+ this.checkBy = checkBy;
+ }
+
+ public String getCheckBy()
+ {
+ return checkBy;
+ }
+ public void setCheckTime(Date checkTime)
+ {
+ this.checkTime = checkTime;
+ }
+
+ public Date getCheckTime()
+ {
+ return checkTime;
+ }
@Override
public String toString() {
@@ -91,6 +131,9 @@ public class OnlineCoursesEvaluate extends BaseEntity
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
+ .append("auditStatus", getAuditStatus())
+ .append("checkBy", getCheckBy())
+ .append("checkTime", getCheckTime())
.toString();
}
}
diff --git a/ruoyi-front/src/main/java/com/ruoyi/front/mapper/OnlineCoursesEvaluateMapper.java b/ruoyi-front/src/main/java/com/ruoyi/front/mapper/OnlineCoursesEvaluateMapper.java
index 349d1ce75..d412c2975 100644
--- a/ruoyi-front/src/main/java/com/ruoyi/front/mapper/OnlineCoursesEvaluateMapper.java
+++ b/ruoyi-front/src/main/java/com/ruoyi/front/mapper/OnlineCoursesEvaluateMapper.java
@@ -7,7 +7,7 @@ import com.ruoyi.front.domain.OnlineCoursesEvaluate;
* 线上课程评价Mapper接口
*
* @author ruoyi
- * @date 2020-10-21
+ * @date 2020-11-05
*/
public interface OnlineCoursesEvaluateMapper
{
diff --git a/ruoyi-front/src/main/java/com/ruoyi/front/service/IOnlineCoursesEvaluateService.java b/ruoyi-front/src/main/java/com/ruoyi/front/service/IOnlineCoursesEvaluateService.java
index 2e16be6ce..d93f487a6 100644
--- a/ruoyi-front/src/main/java/com/ruoyi/front/service/IOnlineCoursesEvaluateService.java
+++ b/ruoyi-front/src/main/java/com/ruoyi/front/service/IOnlineCoursesEvaluateService.java
@@ -7,7 +7,7 @@ import com.ruoyi.front.domain.OnlineCoursesEvaluate;
* 线上课程评价Service接口
*
* @author ruoyi
- * @date 2020-10-21
+ * @date 2020-11-05
*/
public interface IOnlineCoursesEvaluateService
{
diff --git a/ruoyi-front/src/main/java/com/ruoyi/front/service/impl/OnlineCoursesEvaluateServiceImpl.java b/ruoyi-front/src/main/java/com/ruoyi/front/service/impl/OnlineCoursesEvaluateServiceImpl.java
index 5113c1aed..104e057d6 100644
--- a/ruoyi-front/src/main/java/com/ruoyi/front/service/impl/OnlineCoursesEvaluateServiceImpl.java
+++ b/ruoyi-front/src/main/java/com/ruoyi/front/service/impl/OnlineCoursesEvaluateServiceImpl.java
@@ -13,7 +13,7 @@ import com.ruoyi.common.core.text.Convert;
* 线上课程评价Service业务层处理
*
* @author ruoyi
- * @date 2020-10-21
+ * @date 2020-11-05
*/
@Service
public class OnlineCoursesEvaluateServiceImpl implements IOnlineCoursesEvaluateService
diff --git a/ruoyi-front/src/main/resources/mapper/front/OnlineCoursesEvaluateMapper.xml b/ruoyi-front/src/main/resources/mapper/front/OnlineCoursesEvaluateMapper.xml
index 279a8c7ff..297004956 100644
--- a/ruoyi-front/src/main/resources/mapper/front/OnlineCoursesEvaluateMapper.xml
+++ b/ruoyi-front/src/main/resources/mapper/front/OnlineCoursesEvaluateMapper.xml
@@ -14,10 +14,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+
+
+
- select id, online_courses_id, evaluate_content, anonymous_flag, del_flag, create_by, create_time, update_by, update_time from online_courses_evaluate
+ select id, online_courses_id, evaluate_content, anonymous_flag, del_flag, create_by, create_time, update_by, update_time, audit_status, check_by, check_time from online_courses_evaluate
@@ -45,6 +51,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
create_time,
update_by,
update_time,
+ audit_status,
+ check_by,
+ check_time,
#{onlineCoursesId},
@@ -55,6 +64,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{createTime},
#{updateBy},
#{updateTime},
+ #{auditStatus},
+ #{checkBy},
+ #{checkTime},
@@ -69,6 +81,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
create_time = #{createTime},
update_by = #{updateBy},
update_time = #{updateTime},
+ audit_status = #{auditStatus},
+ check_by = #{checkBy},
+ check_time = #{checkTime},
where id = #{id}
diff --git a/ruoyi-front/src/main/resources/templates/front/carousel/add.html b/ruoyi-front/src/main/resources/templates/front/carousel/add.html
index 843d73d72..f2d89227f 100644
--- a/ruoyi-front/src/main/resources/templates/front/carousel/add.html
+++ b/ruoyi-front/src/main/resources/templates/front/carousel/add.html
@@ -41,40 +41,40 @@
}
}
- $(function() {
- $('.summernote').summernote({
- lang: 'zh-CN',
- callbacks: {
- onChange: function(contents, $edittable) {
- $("input[name='" + this.id + "']").val(contents);
- },
- onImageUpload: function(files) {
- var obj = this;
- var data = new FormData();
- data.append("file", files[0]);
- $.ajax({
- type: "post",
- url: ctx + "common/upload",
- data: data,
- cache: false,
- contentType: false,
- processData: false,
- dataType: 'json',
- success: function(result) {
- if (result.code == web_status.SUCCESS) {
- $('#' + obj.id).summernote('insertImage', result.url);
- } else {
- $.modal.alertError(result.msg);
- }
- },
- error: function(error) {
- $.modal.alertWarning("图片上传失败。");
- }
- });
- }
- }
- });
- });
+ // $(function() {
+ // $('.summernote').summernote({
+ // lang: 'zh-CN',
+ // callbacks: {
+ // onChange: function(contents, $edittable) {
+ // $("input[name='" + this.id + "']").val(contents);
+ // },
+ // onImageUpload: function(files) {
+ // var obj = this;
+ // var data = new FormData();
+ // data.append("file", files[0]);
+ // $.ajax({
+ // type: "post",
+ // url: ctx + "common/upload",
+ // data: data,
+ // cache: false,
+ // contentType: false,
+ // processData: false,
+ // dataType: 'json',
+ // success: function(result) {
+ // if (result.code == web_status.SUCCESS) {
+ // $('#' + obj.id).summernote('insertImage', result.url);
+ // } else {
+ // $.modal.alertError(result.msg);
+ // }
+ // },
+ // error: function(error) {
+ // $.modal.alertWarning("图片上传失败。");
+ // }
+ // });
+ // }
+ // }
+ // });
+ // });