Browse Source

考试发布状态bug修复

eganwu 1 year ago
parent
commit
f1bf54a19e

+ 3 - 2
src/custom/restcontroller/webmanage/saletool/courseware/coursewaretesthead.java

@@ -3,6 +3,7 @@ package restcontroller.webmanage.saletool.courseware;
 import beans.attachment.Attachment;
 import beans.department.Department;
 import beans.salearea.SaleArea;
+import beans.time.Time;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
@@ -196,8 +197,8 @@ public class coursewaretesthead extends Controller {
         UpdateSQL updateSQL = SQLFactory.createUpdateSQL(this, sat_courseware_testhead);
         updateSQL.setSiteid(siteid);
         updateSQL.setValue("status", status == 0 ? "新建" : "发布");
-        updateSQL.setValue("sendby", username);
-        updateSQL.setValue("senddate", getDateTime_Str());
+        updateSQL.setValue("sendby", status == 0 ? "null" : username);
+        updateSQL.setValue("senddate", status == 0 ? "null" : Time.getDateTime_Str());
         updateSQL.setWhere("sat_courseware_testheadid", sat_courseware_testheadids.toArray());
         updateSQL.update();