Browse Source

Merge remote-tracking branch 'origin/develop' into develop

develop
王兴琳 7 months ago
parent
commit
5eef6dfff6
  1. 2
      zc-business/src/main/java/com/zc/business/controller/DcEventImportantController.java
  2. 4
      zc-business/src/main/java/com/zc/business/service/IDcEventImportantService.java
  3. 12
      zc-business/src/main/java/com/zc/business/service/impl/DcEventImportantServiceImpl.java

2
zc-business/src/main/java/com/zc/business/controller/DcEventImportantController.java

@ -92,7 +92,7 @@ public class DcEventImportantController extends BaseController
@ApiOperation("修改事件侧重要素") @ApiOperation("修改事件侧重要素")
public AjaxResult edit(@RequestBody DcEventImportant dcEventImportant) public AjaxResult edit(@RequestBody DcEventImportant dcEventImportant)
{ {
return toAjax(dcEventImportantService.updateDcEventImportant(dcEventImportant)); return dcEventImportantService.updateDcEventImportant(dcEventImportant);
} }
/** /**

4
zc-business/src/main/java/com/zc/business/service/IDcEventImportantService.java

@ -1,6 +1,8 @@
package com.zc.business.service; package com.zc.business.service;
import java.util.List; import java.util.List;
import com.ruoyi.common.core.domain.AjaxResult;
import com.zc.business.domain.DcEventImportant; import com.zc.business.domain.DcEventImportant;
/** /**
@ -41,7 +43,7 @@ public interface IDcEventImportantService
* @param dcEventImportant 事件侧重要素 * @param dcEventImportant 事件侧重要素
* @return 结果 * @return 结果
*/ */
int updateDcEventImportant(DcEventImportant dcEventImportant); AjaxResult updateDcEventImportant(DcEventImportant dcEventImportant);
/** /**
* 批量删除事件侧重要素 * 批量删除事件侧重要素

12
zc-business/src/main/java/com/zc/business/service/impl/DcEventImportantServiceImpl.java

@ -1,6 +1,9 @@
package com.zc.business.service.impl; package com.zc.business.service.impl;
import java.util.List; import java.util.List;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.zc.business.mapper.DcEventImportantMapper; import com.zc.business.mapper.DcEventImportantMapper;
@ -62,13 +65,16 @@ public class DcEventImportantServiceImpl implements IDcEventImportantService
* @return 结果 * @return 结果
*/ */
@Override @Override
public int updateDcEventImportant(DcEventImportant dcEventImportant) public AjaxResult updateDcEventImportant(DcEventImportant dcEventImportant)
{ {
if (StringUtils.isEmpty(dcEventImportant.getEventId())){
return AjaxResult.error("事件id不能为空");
}
int i = dcEventImportantMapper.updateDcEventImportant(dcEventImportant); int i = dcEventImportantMapper.updateDcEventImportant(dcEventImportant);
if (i < 1){ if (i < 1){
i = dcEventImportantMapper.insertDcEventImportant(dcEventImportant); dcEventImportantMapper.insertDcEventImportant(dcEventImportant);
} }
return i; return AjaxResult.success("侧重要素添加成功");
} }
/** /**

Loading…
Cancel
Save