修改删除bug
This commit is contained in:
parent
90f22fa887
commit
ca01cb1536
@ -1,4 +1,4 @@
|
||||
package com.xkrs.microservice.controller;
|
||||
package com.xkrs.microservice.common.tool.controller;
|
||||
|
||||
import com.xkrs.microservice.common.encapsulation.PromptMessageEnum;
|
||||
import com.xkrs.microservice.model.entity.FileAppEntity;
|
@ -1,4 +1,4 @@
|
||||
package com.xkrs.microservice.controller;
|
||||
package com.xkrs.microservice.common.tool.controller;
|
||||
|
||||
import com.xkrs.microservice.service.CacheService;
|
||||
import org.springframework.context.i18n.LocaleContextHolder;
|
@ -1,4 +1,4 @@
|
||||
package com.xkrs.microservice.controller;
|
||||
package com.xkrs.microservice.common.tool.controller;
|
||||
|
||||
import com.xkrs.microservice.common.encapsulation.PromptMessageEnum;
|
||||
import com.xkrs.microservice.model.entity.CropClassifyRecordEntity;
|
@ -1,4 +1,4 @@
|
||||
package com.xkrs.microservice.controller;
|
||||
package com.xkrs.microservice.common.tool.controller;
|
||||
|
||||
import com.xkrs.microservice.common.encapsulation.PromptMessageEnum;
|
||||
import com.xkrs.microservice.model.entity.*;
|
@ -1,4 +1,4 @@
|
||||
package com.xkrs.microservice.controller;
|
||||
package com.xkrs.microservice.common.tool.controller;
|
||||
|
||||
import com.xkrs.microservice.common.encapsulation.PromptMessageEnum;
|
||||
import com.xkrs.microservice.model.entity.FarmingInfoEntity;
|
@ -1,4 +1,4 @@
|
||||
package com.xkrs.microservice.controller;
|
||||
package com.xkrs.microservice.common.tool.controller;
|
||||
|
||||
import com.xkrs.microservice.common.encapsulation.PromptMessageEnum;
|
||||
import com.xkrs.microservice.model.entity.FileDocumentEntity;
|
@ -1,4 +1,4 @@
|
||||
package com.xkrs.microservice.controller;
|
||||
package com.xkrs.microservice.common.tool.controller;
|
||||
|
||||
import com.xkrs.microservice.model.vo.FileServerResultVo;
|
||||
import com.xkrs.microservice.service.FileServerService;
|
@ -1,4 +1,4 @@
|
||||
package com.xkrs.microservice.controller;
|
||||
package com.xkrs.microservice.common.tool.controller;
|
||||
|
||||
import com.xkrs.microservice.common.encapsulation.PromptMessageEnum;
|
||||
import org.springframework.context.i18n.LocaleContextHolder;
|
@ -1,4 +1,4 @@
|
||||
package com.xkrs.microservice.controller;
|
||||
package com.xkrs.microservice.common.tool.controller;
|
||||
|
||||
import com.xkrs.microservice.common.encapsulation.PromptMessageEnum;
|
||||
import com.xkrs.microservice.model.entity.HydrologicalStationEntity;
|
@ -1,4 +1,4 @@
|
||||
package com.xkrs.microservice.controller;
|
||||
package com.xkrs.microservice.common.tool.controller;
|
||||
|
||||
import com.xkrs.microservice.common.encapsulation.PromptMessageEnum;
|
||||
import com.xkrs.microservice.model.entity.IndependentCheckEntity;
|
@ -1,4 +1,4 @@
|
||||
package com.xkrs.microservice.controller;
|
||||
package com.xkrs.microservice.common.tool.controller;
|
||||
|
||||
import com.xkrs.microservice.common.encapsulation.PromptMessageEnum;
|
||||
import com.xkrs.microservice.model.entity.IrrigationCheckEntity;
|
@ -1,4 +1,4 @@
|
||||
package com.xkrs.microservice.controller;
|
||||
package com.xkrs.microservice.common.tool.controller;
|
||||
|
||||
import com.xkrs.microservice.common.encapsulation.PromptMessageEnum;
|
||||
import com.xkrs.microservice.model.entity.IrrigationRecordEntity;
|
@ -1,4 +1,4 @@
|
||||
package com.xkrs.microservice.controller;
|
||||
package com.xkrs.microservice.common.tool.controller;
|
||||
|
||||
import com.xkrs.microservice.common.encapsulation.PromptMessageEnum;
|
||||
import com.xkrs.microservice.model.entity.IrrigationSarRecordEntity;
|
@ -1,4 +1,4 @@
|
||||
package com.xkrs.microservice.controller;
|
||||
package com.xkrs.microservice.common.tool.controller;
|
||||
|
||||
import com.xkrs.microservice.common.encapsulation.PromptMessageEnum;
|
||||
import com.xkrs.microservice.model.vo.ShpCityVo;
|
@ -1,4 +1,4 @@
|
||||
package com.xkrs.microservice.controller;
|
||||
package com.xkrs.microservice.common.tool.controller;
|
||||
|
||||
import com.xkrs.microservice.common.encapsulation.PromptMessageEnum;
|
||||
import nl.basjes.parse.useragent.UserAgent;
|
@ -1,4 +1,4 @@
|
||||
package com.xkrs.microservice.controller;
|
||||
package com.xkrs.microservice.common.tool.controller;
|
||||
|
||||
import com.xkrs.microservice.common.encapsulation.PromptMessageEnum;
|
||||
import com.xkrs.microservice.model.entity.SysRoleEntity;
|
@ -1,4 +1,4 @@
|
||||
package com.xkrs.microservice.controller;
|
||||
package com.xkrs.microservice.common.tool.controller;
|
||||
|
||||
import com.xkrs.microservice.common.encapsulation.PromptMessageEnum;
|
||||
import com.xkrs.microservice.model.entity.TeaGardenPlotEntity;
|
@ -1,4 +1,4 @@
|
||||
package com.xkrs.microservice.controller;
|
||||
package com.xkrs.microservice.common.tool.controller;
|
||||
|
||||
import com.xkrs.microservice.common.encapsulation.PromptMessageEnum;
|
||||
import com.xkrs.microservice.model.entity.TifProductEntity;
|
@ -1,4 +1,4 @@
|
||||
package com.xkrs.microservice.controller;
|
||||
package com.xkrs.microservice.common.tool.controller;
|
||||
|
||||
import com.xkrs.microservice.common.encapsulation.PromptMessageEnum;
|
||||
import com.xkrs.microservice.model.entity.TypicalFarmerEntity;
|
@ -1,4 +1,4 @@
|
||||
package com.xkrs.microservice.controller;
|
||||
package com.xkrs.microservice.common.tool.controller;
|
||||
|
||||
import com.xkrs.microservice.common.encapsulation.PromptMessageEnum;
|
||||
import com.xkrs.microservice.model.entity.TypicalPlotEntity;
|
@ -1,4 +1,4 @@
|
||||
package com.xkrs.microservice.controller;
|
||||
package com.xkrs.microservice.common.tool.controller;
|
||||
|
||||
import com.xkrs.microservice.common.encapsulation.PromptMessageEnum;
|
||||
import com.xkrs.microservice.model.entity.TypicalPlotIrrigationEntity;
|
@ -1,4 +1,4 @@
|
||||
package com.xkrs.microservice.controller;
|
||||
package com.xkrs.microservice.common.tool.controller;
|
||||
|
||||
import com.xkrs.microservice.common.encapsulation.PromptMessageEnum;
|
||||
import com.xkrs.microservice.model.entity.WcsRecordEntity;
|
@ -1,4 +1,4 @@
|
||||
package com.xkrs.microservice.controller;
|
||||
package com.xkrs.microservice.common.tool.controller;
|
||||
|
||||
import com.xkrs.microservice.common.encapsulation.PromptMessageEnum;
|
||||
import com.xkrs.microservice.common.tool.PageBean;
|
@ -1,4 +1,4 @@
|
||||
package com.xkrs.microservice.controller;
|
||||
package com.xkrs.microservice.common.tool.controller;
|
||||
|
||||
import com.xkrs.microservice.common.encapsulation.PromptMessageEnum;
|
||||
import com.xkrs.microservice.model.vo.ForecastWeather7DayVo;
|
@ -8,8 +8,10 @@ import com.xkrs.microservice.util.CopyPropertiesUtil;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.cache.annotation.CacheConfig;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
@ -57,7 +59,8 @@ public class TeaGardenPlotServiceImpl implements TeaGardenPlotService {
|
||||
* 新增典型地块记录
|
||||
* @param teaGardenPlotQo
|
||||
*/
|
||||
@Cacheable(keyGenerator = "keyGenerator", unless="#result == null")
|
||||
@Transactional(rollbackFor=Exception.class)
|
||||
@CacheEvict(value = "TeaGardenPlotServiceCache",allEntries = true)
|
||||
@Override
|
||||
public void add(TeaGardenPlotQo teaGardenPlotQo){
|
||||
TeaGardenPlotEntity teaGardenPlotEntity = new TeaGardenPlotEntity();
|
||||
@ -73,7 +76,8 @@ public class TeaGardenPlotServiceImpl implements TeaGardenPlotService {
|
||||
* 更新典型地块记录
|
||||
* @param teaGardenPlotQo
|
||||
*/
|
||||
@Cacheable(keyGenerator = "keyGenerator", unless="#result == null")
|
||||
@Transactional(rollbackFor=Exception.class)
|
||||
@CacheEvict(value = "TeaGardenPlotServiceCache",allEntries = true)
|
||||
@Override
|
||||
public void update(TeaGardenPlotQo teaGardenPlotQo){
|
||||
TeaGardenPlotEntity teaGardenPlotEntity = new TeaGardenPlotEntity();
|
||||
@ -90,11 +94,12 @@ public class TeaGardenPlotServiceImpl implements TeaGardenPlotService {
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Cacheable(keyGenerator = "keyGenerator", unless="#result == null")
|
||||
@Transactional(rollbackFor=Exception.class)
|
||||
@CacheEvict(value = "TeaGardenPlotServiceCache",allEntries = true)
|
||||
@Override
|
||||
public int delete(Integer id){
|
||||
Optional<TeaGardenPlotEntity> teaGardenPlotEntityOptional = teaGardenPlotDao.findById(id);
|
||||
if(teaGardenPlotEntityOptional.isPresent()){
|
||||
if(teaGardenPlotEntityOptional.isEmpty()){
|
||||
return 1;
|
||||
}
|
||||
teaGardenPlotDao.deleteById(id);
|
||||
|
Loading…
Reference in New Issue
Block a user