فهرست منبع

修改无用并在只修改展示结束时间中自动添加更新人更新时间

zhangyang 2 سال پیش
والد
کامیت
a3fe7da642

+ 3 - 5
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/PoTetherController.java

@@ -143,8 +143,8 @@ public class PoTetherController extends BaseController
     @Log(title = "套系", businessType = BusinessType.INSERT)
     @PostMapping("/add")
     public AjaxResult add(@RequestBody TetherVo tetherVo,
-                          @RequestBody @Param("poUser") PoUser poUser,
-                          @RequestBody PoTetherandcollection poTetherandcollection)
+                          @RequestBody @Param("poUser") PoUser poUser
+                          )
     {
         //判断当前用户是否有操作的权限
         poUserService.checkUserAllowed(poUser);
@@ -170,7 +170,7 @@ public class PoTetherController extends BaseController
         }else{
             tetherVo.setSellStatus(0);
         }
-        poTetherService.insertPoTetherWithCollection(tetherVo,poTetherandcollection);
+        poTetherService.insertPoTetherWithCollection(tetherVo);
         return success("新增成功");
     }
 
@@ -214,8 +214,6 @@ public class PoTetherController extends BaseController
         if(UserConstants.NOT_UNIQUE.equals(poTetherService.checkPostTetherImageUnique(tetherVo))){
             return AjaxResult.error("修改失败"+tetherVo.getImage()+"已经存在");
         }
-        tetherVo.setUpdateBy(getUsername());
-        tetherVo.setUpdateTime(new Date());
         if (tetherVo1.getGrounding() == 0){
             //已经上架只可以修改展示结束的时间
             poTetherService.updateShowTimeEnd(tetherVo);

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/IPoTetherService.java

@@ -69,7 +69,7 @@ public interface IPoTetherService extends IService<PoTether>
      * @param tetherVo
      * @return
      */
-    void insertPoTetherWithCollection(TetherVo tetherVo,PoTetherandcollection poTetherandcollection);
+    void insertPoTetherWithCollection(TetherVo tetherVo);
 
     /**
      * 通过id查询套系信息和对应的藏品信息

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/PoTetherServiceImpl.java

@@ -155,7 +155,7 @@ public class PoTetherServiceImpl extends ServiceImpl<PoTetherMapper,PoTether> im
      */
     @Override
     @Transactional
-    public void insertPoTetherWithCollection(TetherVo tetherVo,PoTetherandcollection poTetherandcollection) {
+    public void insertPoTetherWithCollection(TetherVo tetherVo) {
         //保存套系的基本数据到套系表tether
         this.poTetherMapper.insertPoTether(tetherVo);
         //套系包含藏品

+ 2 - 0
ruoyi-system/src/main/resources/mapper/system/PoTetherMapper.xml

@@ -291,6 +291,8 @@
         update po_tether
         <trim prefix="SET" suffixOverrides=",">
             <if test="showTimeEnd != null">show_time_end = #{showTimeEnd},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
         </trim>
         where tether_id = #{tetherId}
     </update>