update 修改充电桩别名

This commit is contained in:
Lemon
2023-08-08 15:54:53 +08:00
parent ae05198fdb
commit 6d67dd212c
9 changed files with 83 additions and 3 deletions

View File

@@ -6,6 +6,8 @@ import com.jsowell.common.core.controller.BaseController;
import com.jsowell.common.core.domain.AjaxResult;
import com.jsowell.common.core.page.TableDataInfo;
import com.jsowell.common.enums.BusinessType;
import com.jsowell.common.exception.BusinessException;
import com.jsowell.common.response.RestApiResponse;
import com.jsowell.common.util.StringUtils;
import com.jsowell.common.util.poi.ExcelUtil;
import com.jsowell.pile.domain.PileBasicInfo;
@@ -112,6 +114,28 @@ public class PileBasicInfoController extends BaseController {
return toAjax(pileBasicInfoService.updatePileBasicInfo(pileBasicInfo));
}
/**
* 修改桩别名
* @param pileBasicInfo
* @return
*/
@PostMapping("/updatePileName")
public RestApiResponse<?> updatePileName(@RequestBody PileBasicInfo pileBasicInfo) {
logger.info("修改桩别名 params:{}", JSONObject.toJSONString(pileBasicInfo));
RestApiResponse<?> response = null;
try {
int i = pileBasicInfoService.updatePileBasicInfo(pileBasicInfo);
response = new RestApiResponse<>(i);
} catch (BusinessException e) {
response = new RestApiResponse<>(e.getCode(), e.getMessage());
} catch (Exception e) {
response = new RestApiResponse<>(e);
}
logger.info("修改桩别名 result:{}", response);
return response;
}
/**
* 删除设备管理
*/