|
@@ -0,0 +1,49 @@
|
|
|
+package com.onemap.apply.service.impl.tdgy;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
+import com.onemap.apply.domain.tdgy.dto.TdgySjDTO;
|
|
|
+import com.onemap.apply.domain.tdgy.vo.UpdateTdgyVo;
|
|
|
+import com.onemap.apply.mapper.tdgy.TdgyMapper;
|
|
|
+import com.onemap.apply.service.tdgy.TdgyService;
|
|
|
+import com.onemap.common.core.web.domain.RequestResult;
|
|
|
+import com.onemap.common.datasource.annotation.Slave;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 土地供应服务实现类
|
|
|
+ */
|
|
|
+@Service
|
|
|
+public class TdgyServiceImp implements TdgyService {
|
|
|
+ @Resource
|
|
|
+ private TdgyMapper tdgyMapper;
|
|
|
+
|
|
|
+ @Slave
|
|
|
+ @Override
|
|
|
+ public RequestResult updateTdgy(UpdateTdgyVo updateTdgyVo) {
|
|
|
+ // 查询地块是否存在
|
|
|
+ TdgySjDTO tdgySjDTO = tdgyMapper.selectById(updateTdgyVo.getId());
|
|
|
+ if (tdgySjDTO == null) {
|
|
|
+ return RequestResult.error("地块不存在");
|
|
|
+ }
|
|
|
+
|
|
|
+ // 更新土地供应
|
|
|
+ UpdateWrapper<TdgySjDTO> wrapper = new UpdateWrapper<>();
|
|
|
+ wrapper.eq("id", updateTdgyVo.getId());
|
|
|
+ if (updateTdgyVo.getYdkgsj() != null) {
|
|
|
+ wrapper.set("ydkgsj", updateTdgyVo.getYdkgsj());
|
|
|
+ }
|
|
|
+ if (updateTdgyVo.getYdjgsj() != null) {
|
|
|
+ wrapper.set("ydjgsj", updateTdgyVo.getYdjgsj());
|
|
|
+ }
|
|
|
+ if (updateTdgyVo.getSjkgsj() != null) {
|
|
|
+ wrapper.set("sjkgsj", updateTdgyVo.getSjkgsj());
|
|
|
+ }
|
|
|
+ if (updateTdgyVo.getSfjg() != null) {
|
|
|
+ wrapper.set("sfjg", updateTdgyVo.getSfjg());
|
|
|
+ }
|
|
|
+ tdgyMapper.update(null, wrapper);
|
|
|
+ return RequestResult.success();
|
|
|
+ }
|
|
|
+}
|