Browse Source

优化

pull/268/head
chenzhihang 8 months ago
parent
commit
7a939f3f29
2 changed files with 1 additions and 7 deletions
  1. +1
    -4
      ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ExperimentServiceImpl.java
  2. +0
    -3
      ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/ExperimentDaoMapper.xml

+ 1
- 4
ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ExperimentServiceImpl.java View File

@@ -149,9 +149,7 @@ public class ExperimentServiceImpl implements ExperimentService {
checkDeclaredName(experiment); checkDeclaredName(experiment);
experiment.setCreateBy(loginUser.getUsername()); experiment.setCreateBy(loginUser.getUsername());
experiment.setUpdateBy(loginUser.getUsername()); experiment.setUpdateBy(loginUser.getUsername());
experiment.setUpdateTime(new Date());
experiment.setCreateTime(new Date());
experiment.setState(1);
experiment.setState(Constant.State_valid);
this.experimentDao.insert(experiment); this.experimentDao.insert(experiment);
return experiment; return experiment;
} }
@@ -167,7 +165,6 @@ public class ExperimentServiceImpl implements ExperimentService {
LoginUser loginUser = SecurityUtils.getLoginUser(); LoginUser loginUser = SecurityUtils.getLoginUser();
checkDeclaredName(experiment); checkDeclaredName(experiment);
experiment.setUpdateBy(loginUser.getUsername()); experiment.setUpdateBy(loginUser.getUsername());
experiment.setUpdateTime(new Date());
this.experimentDao.update(experiment); this.experimentDao.update(experiment);
return this.queryById(experiment.getId()); return this.queryById(experiment.getId());
} }


+ 0
- 3
ruoyi-modules/management-platform/src/main/resources/mapper/managementPlatform/ExperimentDaoMapper.xml View File

@@ -215,9 +215,6 @@
<if test="updateBy != null and updateBy != ''"> <if test="updateBy != null and updateBy != ''">
update_by = #{updateBy}, update_by = #{updateBy},
</if> </if>
<if test="updateTime != null">
update_time = #{updateTime},
</if>
<if test="state != null"> <if test="state != null">
state = #{state}, state = #{state},
</if> </if>


Loading…
Cancel
Save