Merge branch 'Bulbasaur' of gitee.com:beijing_hongye_huicheng/lilishop into Bulbasaur

This commit is contained in:
Chopper
2021-05-31 11:34:47 +08:00
37 changed files with 725 additions and 350 deletions

View File

@@ -27,7 +27,7 @@ import java.util.List;
@RestController
@Api(tags = "店铺端,直播商品接口")
@RequestMapping("/store/broadcast/commodity")
public class CommodityController {
public class CommodityStoreController {
@Autowired
private CommodityService commodityService;

View File

@@ -3,12 +3,10 @@ package cn.lili.controller.other.broadcast;
import cn.lili.common.enums.ResultCode;
import cn.lili.common.enums.ResultUtil;
import cn.lili.common.exception.ServiceException;
import cn.lili.common.utils.PageUtil;
import cn.lili.common.vo.PageVO;
import cn.lili.common.vo.ResultMessage;
import cn.lili.modules.broadcast.entity.dos.Studio;
import cn.lili.modules.broadcast.service.StudioService;
import cn.lili.modules.message.util.WechatAccessTokenUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
@@ -28,17 +26,16 @@ import org.springframework.web.bind.annotation.*;
@RestController
@Api(tags = "店铺端,直播间接口")
@RequestMapping("/store/broadcast/studio")
public class StudioController {
public class StudioStoreController {
@Autowired
private StudioService studioService;
@Autowired
private WechatAccessTokenUtil wechatAccessTokenUtil;
@ApiOperation(value = "获取店铺直播间列表")
@ApiImplicitParam(name = "status", value = "直播间状态", paramType = "query", dataType = "String")
@GetMapping
public ResultMessage<IPage<Studio>> page(PageVO pageVO) {
return ResultUtil.data(studioService.page(PageUtil.initPage(pageVO)));
public ResultMessage<IPage<Studio>> page(PageVO pageVO, String status) {
return ResultUtil.data(studioService.studioList(pageVO, null, status));
}
@ApiOperation(value = "获取店铺直播间详情")
@@ -57,6 +54,15 @@ public class StudioController {
throw new ServiceException(ResultCode.ERROR);
}
@ApiOperation(value = "修改直播间")
@PutMapping("/edit")
public ResultMessage<Object> edit(@Validated Studio studio) {
if (studioService.edit(studio)) {
return ResultUtil.success(ResultCode.SUCCESS);
}
throw new ServiceException(ResultCode.ERROR);
}
@ApiOperation(value = "店铺直播间添加商品")
@ApiImplicitParams({
@ApiImplicitParam(name = "roomId", value = "房间ID", required = true, dataType = "Integer", paramType = "path"),

View File

@@ -117,22 +117,23 @@ public class OrderStoreController {
return ResultUtil.data(orderService.cancel(orderSn, reason));
}
@ApiOperation(value = "根据核验码获取订单信息")
@ApiImplicitParam(name = "verificationCode", value = "核验码", required = true, paramType = "path")
@GetMapping(value = "/getOrderByVerificationCode/{verificationCode}")
public ResultMessage<Object> getOrderByVerificationCode(@PathVariable String verificationCode){
return ResultUtil.data(orderService.getOrderByVerificationCode(verificationCode));
}
@ApiOperation(value = "订单核验")
@ApiImplicitParams({
@ApiImplicitParam(name = "orderSn", value = "订单sn", required = true, dataType = "String", paramType = "path"),
@ApiImplicitParam(name = "qrCode", value = "发货单号", required = true, dataType = "String", paramType = "query")
})
@PostMapping(value = "/{orderSn}/take")
public ResultMessage<Object> take(@NotNull(message = "参数非法") @PathVariable String orderSn,
@NotNull(message = "核验码") String qrCode) {
return ResultUtil.data(orderService.take(orderSn, qrCode));
@ApiImplicitParam(name = "verificationCode", value = "核验码", required = true, paramType = "path")
@PutMapping(value = "/take/${order}/{verificationCode}")
public ResultMessage<Object> take(@PathVariable String orderSn,@PathVariable String verificationCode) {
return ResultUtil.data(orderService.take(orderSn,verificationCode));
}
@ApiOperation(value = "查询物流踪迹")
@ApiImplicitParams({
@ApiImplicitParam(name = "orderSn", value = "订单编号", required = true, dataType = "String", paramType = "path")
})
@PostMapping(value = "/getTraces/{orderSn}")
@ApiImplicitParam(name = "orderSn", value = "订单编号", required = true, dataType = "String", paramType = "path")
@GetMapping(value = "/getTraces/{orderSn}")
public ResultMessage<Object> getTraces(@NotBlank(message = "订单编号不能为空") @PathVariable String orderSn) {
return ResultUtil.data(orderService.getTraces(orderSn));
}