|
|
|
|
package com.kiisoo.ic.activity.controller;
|
|
|
|
|
|
|
|
|
|
import com.kiisoo.ic.common.BaseController;
|
|
|
|
|
import com.kiisoo.ic.store.entity.PoiStoreStaff;
|
|
|
|
|
import com.kiisoo.ic.synchronous.entity.TurnBackDTO;
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
@Api(value = "小程序-我的活动推广", tags = {"小程序-我的活动推广"})
|
|
|
|
|
@RestController
|
|
|
|
|
@RequestMapping("/webapp/my")
|
|
|
|
|
@Slf4j
|
|
|
|
|
public class WebAppActivityController extends BaseController {
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "我的活动推广列表")
|
|
|
|
|
@GetMapping("/get/promotions")
|
|
|
|
|
public Map<String, Object> myPromotions(long userId) {
|
|
|
|
|
// TODO 查询当前小程序用户,在活动有效期间的有效活动,包含活动名称,活动二维码
|
|
|
|
|
// TODO 从 promotion_src 获取当前导购的推广关系,并关联 activity_instance等表获取活动详情(注意活动有效性)
|
|
|
|
|
// TODO 需要附加这个活动已经推广的客户列表 promotion_friends_src
|
|
|
|
|
return data(null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "我的活动推广列表")
|
|
|
|
|
@PostMapping("/post/promotions")
|
|
|
|
|
public Map<String, Object> pushPromotion(long userId, List<PoiStoreStaff> list, long promotionId) {
|
|
|
|
|
// TODO 将活动推广给单个或多个用户 promotion_friends_src
|
|
|
|
|
// TODO 如果已经推广过了,则忽略
|
|
|
|
|
return data(null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "好友添加回调通知")
|
|
|
|
|
@PostMapping("/cb")
|
|
|
|
|
public Map<String, Object> turnBack(@RequestBody List<TurnBackDTO> turnBackDTOS) {
|
|
|
|
|
// TODO 待调查
|
|
|
|
|
return data(null);
|
|
|
|
|
}
|
|
|
|
|
}
|