更正了字段不匹配的问题
This commit is contained in:
parent
9d0305bedd
commit
15cfd2a5c5
|
@ -122,7 +122,7 @@ public class BusinessController {
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "管理员根据id查询商家")
|
@ApiOperation(value = "管理员根据id查询商家")
|
||||||
@GetMapping("/getById")
|
@GetMapping("/getById")
|
||||||
public BaseResponse<BusinessAdminVO> getBusinessById(long id, HttpServletRequest request) {
|
public BaseResponse<BusinessAdminVO> getBusinessById(@RequestParam Long id, HttpServletRequest request) {
|
||||||
//判断是否为管理员
|
//判断是否为管理员
|
||||||
userService.isAdmin(request);
|
userService.isAdmin(request);
|
||||||
ThrowUtils.throwIf(id < 0, ErrorCode.NULL_ERROR);
|
ThrowUtils.throwIf(id < 0, ErrorCode.NULL_ERROR);
|
||||||
|
@ -135,6 +135,25 @@ public class BusinessController {
|
||||||
return ResultUtils.success(businessAdminVO);
|
return ResultUtils.success(businessAdminVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "根据id查询商家")
|
||||||
|
@GetMapping("/userGetById")
|
||||||
|
public BaseResponse<BusinessVO> userGetBusinessById(@RequestParam Long id, HttpServletRequest request) {
|
||||||
|
|
||||||
|
ThrowUtils.throwIf(id < 0, ErrorCode.NULL_ERROR);
|
||||||
|
|
||||||
|
//获取商家视图
|
||||||
|
Business business = businessService.getById(id);
|
||||||
|
ThrowUtils.throwIf(business == null , ErrorCode.PARAMS_ERROR, "id不符合规范");
|
||||||
|
BusinessVO businessVO = businessService.getBusinessVO(business);
|
||||||
|
|
||||||
|
return ResultUtils.success(businessVO);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询所有商家
|
* 查询所有商家
|
||||||
* @return
|
* @return
|
||||||
|
|
|
@ -13,6 +13,7 @@ public class CartAddRequest implements Serializable {
|
||||||
|
|
||||||
@Serial
|
@Serial
|
||||||
private static final long serialVersionUID = 2466273435949197859L;
|
private static final long serialVersionUID = 2466273435949197859L;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商家id
|
* 商家id
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -19,6 +19,11 @@ public class CartUpdateRequest implements Serializable {
|
||||||
*/
|
*/
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商家id
|
||||||
|
*/
|
||||||
|
private Long businessId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 关联的商品id
|
* 关联的商品id
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -16,7 +16,7 @@ public class OrderAddRequest implements Serializable {
|
||||||
/**
|
/**
|
||||||
* 姓名
|
* 姓名
|
||||||
*/
|
*/
|
||||||
private String username;
|
private String userName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 手机号
|
* 手机号
|
||||||
|
|
Loading…
Reference in New Issue
Block a user