mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-22 03:55:17 +08:00
add 新增用户解绑个人桩接口
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.jsowell.api.uniapp;
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.jsowell.common.annotation.Anonymous;
|
||||
import com.jsowell.common.core.controller.BaseController;
|
||||
@@ -70,6 +71,31 @@ public class PersonPileController extends BaseController {
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户解绑个人桩
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/userUnbindPile")
|
||||
public RestApiResponse<?> userUnbindPile(HttpServletRequest request, @RequestBody PileMemberBindingDTO dto) {
|
||||
logger.info("用户解绑个人桩信息 params:{}", JSONObject.toJSONString(dto));
|
||||
RestApiResponse<?> response = null;
|
||||
try {
|
||||
String memberId = getMemberIdByAuthorization(request);
|
||||
dto.setMemberId(memberId);
|
||||
int i = pileService.userUnbindPile(dto);
|
||||
response = new RestApiResponse<>(i);
|
||||
} catch (BusinessException e) {
|
||||
logger.error("用户解绑个人桩 error, ", e);
|
||||
response = new RestApiResponse<>(e.getCode(), e.getMessage());
|
||||
} catch (Exception e) {
|
||||
logger.error("用户解绑个人桩 error, ", e);
|
||||
response = new RestApiResponse<>(ReturnCodeEnum.CODE_UNBIND_PILE_ERROR);
|
||||
}
|
||||
logger.info("用户解绑个人桩 result:{}", response);
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 个人桩管理员下发给其他用户
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user