|
@@ -1,8 +1,45 @@
|
|
package com.sky.ioc.service.information.impl;
|
|
package com.sky.ioc.service.information.impl;
|
|
|
|
|
|
|
|
+import com.sky.ioc.entity.domain.information.FloorConfiguration;
|
|
|
|
+import com.sky.ioc.mapper.information.FloorConfigurationMapper;
|
|
import com.sky.ioc.service.information.FloorConfigurationService;
|
|
import com.sky.ioc.service.information.FloorConfigurationService;
|
|
|
|
+import com.sky.ioc.tool.ReturnMsg;
|
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
@Service
|
|
@Service
|
|
public class FloorConfigurationServiceImpl implements FloorConfigurationService {
|
|
public class FloorConfigurationServiceImpl implements FloorConfigurationService {
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ FloorConfigurationMapper floorConfigurationMapper;
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public ReturnMsg getById(Integer id) {
|
|
|
|
+ FloorConfiguration floorConfiguration = floorConfigurationMapper.selectById(id);
|
|
|
|
+ return ReturnMsg.ok(floorConfiguration);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public ReturnMsg delById(Integer id) {
|
|
|
|
+ return ReturnMsg.ok(floorConfigurationMapper.deleteById(id));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public ReturnMsg add(FloorConfiguration floorConfiguration) {
|
|
|
|
+ if(StringUtils.isNotBlank(floorConfiguration.getName())){
|
|
|
|
+ return ReturnMsg.ok(floorConfigurationMapper.insert(floorConfiguration));
|
|
|
|
+ }else{
|
|
|
|
+ return ReturnMsg.fail("配置名不能为空");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public ReturnMsg edit(FloorConfiguration floorConfiguration) {
|
|
|
|
+ if(StringUtils.isNotBlank(floorConfiguration.getName())){
|
|
|
|
+ return ReturnMsg.ok(floorConfigurationMapper.updateById(floorConfiguration));
|
|
|
|
+ }else{
|
|
|
|
+ return ReturnMsg.fail("配置名不能为空");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|