|
|
@@ -18,6 +18,7 @@ import com.taauav.admin.service.ISysAdminService; |
|
|
|
import com.taauav.admin.service.ITauvDriverService; |
|
|
|
import com.taauav.common.service.impl.BaseServiceImpl; |
|
|
|
import com.taauav.common.util.DateUtil; |
|
|
|
import com.taauav.common.util.ShiroUtils; |
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
@@ -167,15 +168,18 @@ public class TauvDriverServiceImpl extends BaseServiceImpl<TauvDriverMapper, Tau |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public Response drop(Integer id) { |
|
|
|
if (id == null || id <= 0) { |
|
|
|
public Response drop(BigInteger id) { |
|
|
|
if (id == null) { |
|
|
|
return response.failure("河道ID不存在"); |
|
|
|
} |
|
|
|
TauvDriver entity = driverMapper.selectById(id); |
|
|
|
if (entity == null) { |
|
|
|
return response.failure("河道信息不存在"); |
|
|
|
} |
|
|
|
boolean result = this.deleteById(id, entity); |
|
|
|
entity.setCreateTime(DateUtil.now()); |
|
|
|
entity.setCreateUser(ShiroUtils.getAdminId()); |
|
|
|
entity.setMark(0); |
|
|
|
boolean result = updateById(entity); |
|
|
|
if (!result) { |
|
|
|
return response.failure("删除失败"); |
|
|
|
} |