微信小程序优化
This commit is contained in:
parent
7fa0fb75b1
commit
0324951d9a
@ -12,8 +12,8 @@ import cn.lili.modules.member.service.MemberService;
|
||||
import cn.lili.modules.order.order.entity.dos.AfterSale;
|
||||
import cn.lili.modules.order.order.entity.dos.Order;
|
||||
import cn.lili.modules.order.order.entity.dto.OrderMessage;
|
||||
import cn.lili.modules.order.order.entity.enums.OrderPromotionTypeEnum;
|
||||
import cn.lili.modules.order.order.entity.enums.OrderStatusEnum;
|
||||
import cn.lili.modules.order.order.entity.enums.OrderTypeEnum;
|
||||
import cn.lili.modules.order.order.service.OrderService;
|
||||
import cn.lili.modules.order.trade.entity.enums.AfterSaleStatusEnum;
|
||||
import cn.lili.modules.system.entity.dos.Setting;
|
||||
@ -77,7 +77,7 @@ public class MemberPointExecute implements MemberRegisterEvent, GoodsCommentComp
|
||||
if(orderMessage.getNewStatus().equals(OrderStatusEnum.COMPLETED)){
|
||||
//根据订单编号获取订单数据,如果为积分订单则跳回
|
||||
Order order = orderService.getBySn(orderMessage.getOrderSn());
|
||||
if(order.getOrderType().equals(OrderTypeEnum.POINT)){
|
||||
if(order.getOrderPromotionType().equals(OrderPromotionTypeEnum.POINT.name())){
|
||||
return;
|
||||
}
|
||||
//获取积分设置
|
||||
|
@ -11,12 +11,11 @@ import cn.lili.modules.message.service.NoticeMessageService;
|
||||
import cn.lili.modules.order.cart.entity.dto.TradeDTO;
|
||||
import cn.lili.modules.order.order.entity.dos.AfterSale;
|
||||
import cn.lili.modules.order.order.entity.dto.OrderMessage;
|
||||
import cn.lili.modules.order.order.entity.enums.OrderTypeEnum;
|
||||
import cn.lili.modules.order.order.entity.enums.OrderPromotionTypeEnum;
|
||||
import cn.lili.modules.order.order.entity.vo.OrderDetailVO;
|
||||
import cn.lili.modules.order.order.service.OrderService;
|
||||
import cn.lili.modules.order.trade.entity.enums.AfterSaleStatusEnum;
|
||||
import cn.lili.modules.order.trade.entity.enums.AfterSaleTypeEnum;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@ -83,7 +82,7 @@ public class NoticeMessageExecute implements TradeEvent, OrderStatusChangeEvent,
|
||||
break;
|
||||
//如果是拼团订单,发送拼团成功消息
|
||||
case UNDELIVERED:
|
||||
if(orderDetailVO.getOrder().getOrderType().equals(OrderTypeEnum.PINTUAN.name())){
|
||||
if(orderDetailVO.getOrder().getOrderPromotionType().equals(OrderPromotionTypeEnum.PINTUAN.name())){
|
||||
//拼团成功消息
|
||||
noticeMessageDTO.setNoticeMessageNodeEnum(NoticeMessageNodeEnum.PINTUAN_SUCCESS);
|
||||
}
|
||||
|
@ -0,0 +1,27 @@
|
||||
package cn.lili.modules.broadcast.entity.enums;
|
||||
|
||||
|
||||
/**
|
||||
* 直播间状态
|
||||
* @author Bulbasaur
|
||||
* @date: 2021/5/31 10:32 上午
|
||||
*
|
||||
*/
|
||||
public enum StudioStatusEnum {
|
||||
|
||||
NEW("新建"), START("开始"), END("结束");
|
||||
|
||||
private final String clientName;
|
||||
|
||||
StudioStatusEnum(String des) {
|
||||
this.clientName = des;
|
||||
}
|
||||
|
||||
public String clientName() {
|
||||
return this.clientName;
|
||||
}
|
||||
|
||||
public String value() {
|
||||
return this.name();
|
||||
}
|
||||
}
|
@ -8,15 +8,15 @@ import lombok.Data;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author liushuai(liushuai711 @ gmail.com)
|
||||
* @version v4.1
|
||||
* @Description:
|
||||
* @since 2021/5/17 3:04 下午
|
||||
* 直播间VO
|
||||
*
|
||||
* @author Bulbasaur
|
||||
* @date: 2021/5/31 11:58 上午
|
||||
*/
|
||||
@Data
|
||||
public class StudioVO extends Studio {
|
||||
|
||||
@ApiModelProperty(value = "直播间商品列表")
|
||||
private List<Commodity> CommodityList;
|
||||
private List<Commodity> commodityList;
|
||||
|
||||
}
|
||||
|
@ -26,8 +26,8 @@ public interface CommodityMapper extends BaseMapper<Commodity> {
|
||||
@Select("SELECT * FROM li_commodity c INNER JOIN li_studio_commodity sc ON sc.goods_id = c.live_goods_id WHERE sc.room_id =#{roomId}")
|
||||
List<Commodity> getCommodityByRoomId(Integer roomId);
|
||||
|
||||
@Select("SELECT name,goods_image FROM li_commodity c INNER JOIN li_studio_commodity sc ON sc.goods_id = c.live_goods_id WHERE sc.room_id =#{roomId}")
|
||||
List<SimpleCommodity> getSimpleCommodityByRoomId(Integer roomId);
|
||||
@Select("SELECT goods_image FROM li_commodity c INNER JOIN li_studio_commodity sc ON sc.goods_id = c.live_goods_id WHERE sc.room_id =#{roomId}")
|
||||
List<String> getSimpleCommodityByRoomId(Integer roomId);
|
||||
|
||||
@Select("SELECT c.*,gs.quantity,s.store_name FROM li_commodity c INNER JOIN li_goods_sku gs ON c.sku_id = gs.id INNER JOIN li_store s ON s.id=c.store_id ${ew.customSqlSegment}")
|
||||
IPage<CommodityVO> commodityVOList(IPage<CommodityVO> page, @Param(Constants.WRAPPER) Wrapper<CommodityVO> queryWrapper);
|
||||
|
@ -78,7 +78,7 @@ public class CommodityServiceImpl extends ServiceImpl<CommodityMapper, Commodity
|
||||
public boolean deleteCommodity(String goodsId) {
|
||||
JSONObject json = wechatLivePlayerUtil.deleteGoods(goodsId);
|
||||
if (json.getStr("errcode").equals("0")) {
|
||||
return this.remove(this.lambdaQuery().eq(Commodity::getLiveGoodsId, goodsId));
|
||||
return this.remove(new LambdaQueryWrapper<Commodity>().eq(Commodity::getLiveGoodsId, goodsId));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -106,6 +106,7 @@ public class CommodityServiceImpl extends ServiceImpl<CommodityMapper, Commodity
|
||||
return this.baseMapper.commodityVOList(PageUtil.initPage(pageVO),
|
||||
new QueryWrapper<CommodityVO>().like(name != null, "c.name", name)
|
||||
.eq(auditStatus != null, "c.audit_status", auditStatus)
|
||||
.eq(UserContext.getCurrentUser().getRole().equals(UserEnums.STORE), "c.store_id", UserContext.getCurrentUser().getStoreId()));
|
||||
.eq(UserContext.getCurrentUser().getRole().equals(UserEnums.STORE), "c.store_id", UserContext.getCurrentUser().getStoreId())
|
||||
.orderByDesc("create_time"));
|
||||
}
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import cn.lili.common.security.context.UserContext;
|
||||
import cn.lili.common.utils.BeanUtil;
|
||||
import cn.lili.common.utils.PageUtil;
|
||||
import cn.lili.common.vo.PageVO;
|
||||
import cn.lili.modules.broadcast.entity.StudioStatusEnum;
|
||||
import cn.lili.modules.broadcast.entity.dos.Studio;
|
||||
import cn.lili.modules.broadcast.entity.dos.StudioCommodity;
|
||||
import cn.lili.modules.broadcast.entity.vos.StudioVO;
|
||||
@ -49,6 +50,7 @@ public class StudioServiceImpl extends ServiceImpl<StudioMapper, Studio> impleme
|
||||
studio.setRoomId(Integer.parseInt(roomMap.get("roomId")));
|
||||
studio.setQrCodeUrl(roomMap.get("qrcodeUrl"));
|
||||
studio.setStoreId(UserContext.getCurrentUser().getStoreId());
|
||||
studio.setStatus(StudioStatusEnum.NEW.name());
|
||||
return this.save(studio);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@ -98,7 +100,6 @@ public class StudioServiceImpl extends ServiceImpl<StudioMapper, Studio> impleme
|
||||
//设置直播间默认的商品(前台展示)只展示两个
|
||||
if (studio.getRoomGoodsNum() < 3) {
|
||||
studio.setRoomGoodsList(JSONUtil.toJsonStr(commodityMapper.getSimpleCommodityByRoomId(roomId)));
|
||||
;
|
||||
}
|
||||
return this.updateById(studio);
|
||||
}
|
||||
@ -116,7 +117,6 @@ public class StudioServiceImpl extends ServiceImpl<StudioMapper, Studio> impleme
|
||||
//设置直播间默认的商品(前台展示)只展示两个
|
||||
if (studio.getRoomGoodsNum() < 3) {
|
||||
studio.setRoomGoodsList(JSONUtil.toJsonStr(commodityMapper.getSimpleCommodityByRoomId(roomId)));
|
||||
;
|
||||
}
|
||||
return this.updateById(studio);
|
||||
}
|
||||
@ -127,7 +127,8 @@ public class StudioServiceImpl extends ServiceImpl<StudioMapper, Studio> impleme
|
||||
public IPage<Studio> studioList(PageVO pageVO, Integer recommend, String status) {
|
||||
return this.page(PageUtil.initPage(pageVO), new QueryWrapper<Studio>()
|
||||
.eq(recommend != null, "recommend", true)
|
||||
.eq(status!=null,"status",status));
|
||||
.eq(status!=null,"status",status)
|
||||
.orderByDesc("create_time"));
|
||||
|
||||
}
|
||||
|
||||
|
@ -196,7 +196,7 @@ public class WechatLivePlayerUtil {
|
||||
String url = "https://api.weixin.qq.com/wxaapi/broadcast/goods/delete?access_token=" + token;
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("goodsId", goodsId);
|
||||
String content = HttpUtils.doPostWithJson(url, goodsId);
|
||||
String content = HttpUtils.doPostWithJson(url, map);
|
||||
JSONObject json = new JSONObject(content);
|
||||
log.info("微信小程序删除直播商品结果:" + content);
|
||||
return json;
|
||||
|
@ -13,22 +13,8 @@ public enum OrderTypeEnum {
|
||||
*/
|
||||
NORMAL,
|
||||
|
||||
/**
|
||||
* 赠品订单
|
||||
*/
|
||||
GIFT,
|
||||
|
||||
/**
|
||||
* 虚拟订单
|
||||
*/
|
||||
VIRTUAL,
|
||||
/**
|
||||
* 拼团订单
|
||||
*/
|
||||
PINTUAN,
|
||||
/**
|
||||
* 积分订单
|
||||
*/
|
||||
POINT
|
||||
|
||||
VIRTUAL;
|
||||
}
|
||||
|
@ -201,7 +201,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
||||
@OrderLogPoint(description = "'订单['+#orderSn+']取消,原因为:'+#reason", orderSn = "#orderSn")
|
||||
public Order cancel(String orderSn, String reason) {
|
||||
Order order = OperationalJudgment.judgment(this.getBySn(orderSn));
|
||||
if (order.getOrderType().equals(OrderTypeEnum.PINTUAN.name()) && !order.getOrderStatus().equals(OrderStatusEnum.UNDELIVERED.name())) {
|
||||
if (order.getOrderPromotionType().equals(OrderPromotionTypeEnum.PINTUAN.name()) && !order.getOrderStatus().equals(OrderStatusEnum.UNDELIVERED.name())) {
|
||||
throw new ServiceException("未成团订单不可取消");
|
||||
}
|
||||
if (CharSequenceUtil.equalsAny(order.getOrderStatus(),
|
||||
@ -635,7 +635,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
||||
//寻找拼团的所有订单
|
||||
LambdaQueryWrapper<Order> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(Order::getPromotionId, pintuanId)
|
||||
.eq(Order::getOrderType, OrderTypeEnum.PINTUAN.name())
|
||||
.eq(Order::getOrderPromotionType, OrderPromotionTypeEnum.PINTUAN.name())
|
||||
.eq(Order::getPayStatus, PayStatusEnum.PAID.name());
|
||||
// 拼团sn=开团订单sn 或者 参团订单的开团订单sn
|
||||
queryWrapper.and(i -> i.eq(Order::getSn, parentOrderSn)
|
||||
@ -692,7 +692,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
||||
BeanUtil.copyProperties(priceDetailDTO, order, "id");
|
||||
order.setSn(SnowFlake.createStr("G"));
|
||||
order.setTradeSn(tradeDTO.getSn());
|
||||
order.setOrderType(OrderTypeEnum.GIFT.name());
|
||||
order.setOrderType(OrderPromotionTypeEnum.GIFT.name());
|
||||
order.setOrderStatus(OrderStatusEnum.UNPAID.name());
|
||||
order.setPayStatus(PayStatusEnum.UNPAID.name());
|
||||
order.setDeliverStatus(DeliverStatusEnum.UNDELIVERED.name());
|
||||
@ -772,7 +772,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
||||
*/
|
||||
private void checkOrder(Order order) {
|
||||
//订单类型为拼团订单,检测购买数量是否超过了限购数量
|
||||
if (OrderTypeEnum.PINTUAN.name().equals(order.getOrderType())) {
|
||||
if (OrderPromotionTypeEnum.PINTUAN.name().equals(order.getOrderPromotionType())) {
|
||||
Pintuan pintuan = pintuanService.getPintuanById(order.getPromotionId());
|
||||
Integer limitNum = pintuan.getLimitNum();
|
||||
if (limitNum != 0 && order.getGoodsNum() > limitNum) {
|
||||
|
@ -17,7 +17,6 @@ import cn.lili.modules.member.entity.dos.Member;
|
||||
import cn.lili.modules.member.service.MemberService;
|
||||
import cn.lili.modules.order.order.entity.dos.Order;
|
||||
import cn.lili.modules.order.order.entity.enums.OrderStatusEnum;
|
||||
import cn.lili.modules.order.order.entity.enums.OrderTypeEnum;
|
||||
import cn.lili.modules.order.order.entity.enums.PayStatusEnum;
|
||||
import cn.lili.modules.order.order.service.OrderService;
|
||||
import cn.lili.modules.promotion.entity.dos.Pintuan;
|
||||
@ -103,8 +102,10 @@ public class PintuanServiceImpl extends ServiceImpl<PintuanMapper, Pintuan> impl
|
||||
return new ArrayList<>();
|
||||
}
|
||||
LambdaQueryWrapper<Order> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(Order::getPromotionId, pintuanId).eq(Order::getOrderType, OrderTypeEnum.PINTUAN.name())
|
||||
.eq(Order::getOrderStatus, OrderStatusEnum.PAID.name()).eq(Order::getParentOrderSn, "");
|
||||
queryWrapper.eq(Order::getPromotionId, pintuanId)
|
||||
.eq(Order::getOrderPromotionType, PromotionTypeEnum.PINTUAN.name())
|
||||
.eq(Order::getOrderStatus, OrderStatusEnum.PAID.name())
|
||||
.eq(Order::getParentOrderSn, "");
|
||||
List<Order> orders = orderService.list(queryWrapper);
|
||||
// 遍历订单状态为已支付,为团长的拼团订单
|
||||
for (Order order : orders) {
|
||||
@ -266,7 +267,7 @@ public class PintuanServiceImpl extends ServiceImpl<PintuanMapper, Pintuan> impl
|
||||
} else {
|
||||
pintuan.setPromotionStatus(PromotionStatusEnum.END.name());
|
||||
LambdaQueryWrapper<Order> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(Order::getOrderType, OrderTypeEnum.PINTUAN.name());
|
||||
queryWrapper.eq(Order::getOrderPromotionType, PromotionTypeEnum.PINTUAN.name());
|
||||
queryWrapper.eq(Order::getPromotionId, pintuanId);
|
||||
queryWrapper.nested(i -> i.eq(Order::getPayStatus, PayStatusEnum.PAID.name()).or().eq(Order::getOrderStatus, OrderStatusEnum.PAID.name()));
|
||||
// 过滤父级拼团订单,根据父级拼团订单分组
|
||||
@ -323,7 +324,7 @@ public class PintuanServiceImpl extends ServiceImpl<PintuanMapper, Pintuan> impl
|
||||
pintuanShareVO.setPintuanMemberVOS(new ArrayList<>());
|
||||
LambdaQueryWrapper<Order> queryWrapper = new LambdaQueryWrapper<>();
|
||||
// 查找团长订单和已和当前拼团订单拼团的订单
|
||||
queryWrapper.eq(Order::getOrderType, OrderTypeEnum.PINTUAN.name())
|
||||
queryWrapper.eq(Order::getOrderPromotionType, PromotionTypeEnum.PINTUAN.name())
|
||||
.eq(Order::getPayStatus, OrderStatusEnum.PAID.name())
|
||||
.and(i -> i.eq(Order::getParentOrderSn, parentOrderSn).or(j -> j.eq(Order::getSn, parentOrderSn)));
|
||||
List<Order> orders = orderService.list(queryWrapper);
|
||||
@ -332,7 +333,7 @@ public class PintuanServiceImpl extends ServiceImpl<PintuanMapper, Pintuan> impl
|
||||
if (!orders.isEmpty() && pintuanShareVO.getPromotionGoods() == null) {
|
||||
LambdaQueryWrapper<Order> orderLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
// 查找团长订单和已和当前拼团订单拼团的订单
|
||||
orderLambdaQueryWrapper.eq(Order::getOrderType, OrderTypeEnum.PINTUAN.name())
|
||||
orderLambdaQueryWrapper.eq(Order::getOrderPromotionType, PromotionTypeEnum.PINTUAN.name())
|
||||
.eq(Order::getPayStatus, OrderStatusEnum.PAID.name())
|
||||
.ne(Order::getSn, parentOrderSn)
|
||||
.and(i -> i.eq(Order::getParentOrderSn, orders.get(0).getParentOrderSn()).or(j -> j.eq(Order::getSn, orders.get(0).getParentOrderSn())));
|
||||
@ -424,7 +425,7 @@ public class PintuanServiceImpl extends ServiceImpl<PintuanMapper, Pintuan> impl
|
||||
if (Boolean.FALSE.equals(pintuan.getFictitious()) && entry.getValue().size() < requiredNum) {
|
||||
// 如果未开启虚拟成团且已参团人数小于成团人数,则自动取消订单
|
||||
LambdaUpdateWrapper<Order> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
updateWrapper.eq(Order::getOrderType, OrderTypeEnum.PINTUAN.name());
|
||||
updateWrapper.eq(Order::getOrderPromotionType, PromotionTypeEnum.PINTUAN.name());
|
||||
updateWrapper.eq(Order::getPromotionId, pintuan.getId());
|
||||
updateWrapper.eq(Order::getParentOrderSn, entry.getKey());
|
||||
updateWrapper.set(Order::getOrderStatus, OrderStatusEnum.CANCELLED.name());
|
||||
|
@ -6,6 +6,7 @@ import cn.lili.common.exception.ServiceException;
|
||||
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.entity.vos.StudioVO;
|
||||
import cn.lili.modules.broadcast.service.StudioService;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@ -14,10 +15,9 @@ import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 管理端,直播间接口
|
||||
@ -26,7 +26,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* @date: 2021/5/28 11:56 上午
|
||||
*/
|
||||
@RestController
|
||||
@Api(tags = "店铺端,直播商品接口")
|
||||
@Api(tags = "店铺端,直播间接口")
|
||||
@RequestMapping("/manager/broadcast/studio")
|
||||
public class StudioManagerController {
|
||||
|
||||
@ -34,26 +34,26 @@ public class StudioManagerController {
|
||||
private StudioService studioService;
|
||||
|
||||
@ApiOperation(value = "获取店铺直播间列表")
|
||||
@ApiImplicitParam(name = "status", value = "直播间状态", paramType = "query", dataType = "String")
|
||||
@ApiImplicitParam(name = "status", value = "直播间状态", paramType = "query")
|
||||
@GetMapping
|
||||
public ResultMessage<IPage<Studio>> page(PageVO pageVO, String status) {
|
||||
return ResultUtil.data(studioService.studioList(pageVO, null, status));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取店铺直播间详情")
|
||||
@ApiImplicitParam(name = "studioId", value = "直播间ID", required = true, dataType = "String", paramType = "path")
|
||||
@ApiImplicitParam(name = "studioId", value = "直播间ID", required = true, paramType = "path")
|
||||
@GetMapping("/studioInfo/{studioId}")
|
||||
public ResultMessage<Studio> studioInfo(@PathVariable String studioId) {
|
||||
return ResultUtil.data(studioService.getById(studioId));
|
||||
public ResultMessage<StudioVO> studioInfo(@PathVariable String studioId) {
|
||||
return ResultUtil.data(studioService.getStudioVO(studioId));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "是否推荐直播间")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "id", value = "Id", required = true, dataType = "String", paramType = "path"),
|
||||
@ApiImplicitParam(name = "recommend", value = "是否推荐", required = true, dataType = "boolean", paramType = "path")
|
||||
@ApiImplicitParam(name = "id", value = "Id", required = true, paramType = "path"),
|
||||
@ApiImplicitParam(name = "recommend", value = "是否推荐", required = true, paramType = "query")
|
||||
})
|
||||
@GetMapping("/id/{studioId}")
|
||||
public ResultMessage<Object> recommend(@PathVariable String id, @PathVariable boolean recommend) {
|
||||
@PutMapping("/recommend/{id}")
|
||||
public ResultMessage<Object> recommend(@PathVariable String id, @NotNull boolean recommend) {
|
||||
if (studioService.update(new UpdateWrapper<Studio>()
|
||||
.eq("id", id)
|
||||
.set("recommend", recommend))) {
|
||||
|
@ -6,13 +6,13 @@ import cn.lili.common.exception.ServiceException;
|
||||
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.entity.vos.StudioVO;
|
||||
import cn.lili.modules.broadcast.service.StudioService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Delete;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -41,8 +41,8 @@ public class StudioStoreController {
|
||||
@ApiOperation(value = "获取店铺直播间详情")
|
||||
@ApiImplicitParam(name = "studioId", value = "直播间ID", required = true, dataType = "String", paramType = "path")
|
||||
@GetMapping("/studioInfo/{studioId}")
|
||||
public ResultMessage<Studio> studioInfo(@PathVariable String studioId) {
|
||||
return ResultUtil.data(studioService.getById(studioId));
|
||||
public ResultMessage<StudioVO> studioInfo(@PathVariable String studioId) {
|
||||
return ResultUtil.data(studioService.getStudioVO(studioId));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "添加直播间")
|
||||
@ -81,7 +81,7 @@ public class StudioStoreController {
|
||||
@ApiImplicitParam(name = "roomId", value = "房间ID", required = true, dataType = "Integer", paramType = "path"),
|
||||
@ApiImplicitParam(name = "liveGoodsId", value = "直播商品ID", required = true, dataType = "Integer", paramType = "path")
|
||||
})
|
||||
@Delete(value = "/deleteInRoom/{roomId}/{liveGoodsId}")
|
||||
@DeleteMapping(value = "/deleteInRoom/{roomId}/{liveGoodsId}")
|
||||
public ResultMessage<Studio> deleteInRoom(@PathVariable Integer roomId, @PathVariable Integer liveGoodsId) {
|
||||
if (studioService.goodsDeleteInRoom(roomId, liveGoodsId)) {
|
||||
return ResultUtil.success(ResultCode.SUCCESS);
|
||||
|
@ -125,8 +125,11 @@ public class OrderStoreController {
|
||||
}
|
||||
|
||||
@ApiOperation(value = "订单核验")
|
||||
@ApiImplicitParam(name = "verificationCode", value = "核验码", required = true, paramType = "path")
|
||||
@PutMapping(value = "/take/${order}/{verificationCode}")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "orderSn", value = "订单号", required = true, paramType = "path"),
|
||||
@ApiImplicitParam(name = "verificationCode", value = "核验码", required = true, paramType = "path")
|
||||
})
|
||||
@PutMapping(value = "/take/{orderSn}/{verificationCode}")
|
||||
public ResultMessage<Object> take(@PathVariable String orderSn,@PathVariable String verificationCode) {
|
||||
return ResultUtil.data(orderService.take(orderSn,verificationCode));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user