|
|
@@ -1,6 +1,5 @@
|
|
|
package shop.alien.store.controller;
|
|
|
|
|
|
-import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
|
@@ -9,11 +8,12 @@ import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import shop.alien.entity.result.R;
|
|
|
-import shop.alien.entity.store.LifeGroupBuyCount;
|
|
|
-import shop.alien.entity.store.dto.LifeGroupBuyDto;
|
|
|
-import shop.alien.entity.store.vo.LifeGroupBuyThaliVo;
|
|
|
+import shop.alien.entity.store.vo.LifeGroupBuyCountDateVo;
|
|
|
+import shop.alien.entity.store.vo.LifeGroupBuyCountVo;
|
|
|
import shop.alien.store.service.LifeGroupBuyCountService;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
/**
|
|
|
* 团购统计
|
|
|
*/
|
|
|
@@ -29,13 +29,13 @@ public class LifeGroupBuyCountController {
|
|
|
|
|
|
@ApiOperation("插入团购统计")
|
|
|
@PostMapping("/insertGroupBuyCount")
|
|
|
- public R insertGroupBuyCount(@RequestBody LifeGroupBuyCount lifeGroupBuyCount) {
|
|
|
- log.info("LifeGroupBuyCountController.insertGroupBuyCount?lifeGroupBuyCount={}", lifeGroupBuyCount.toString());
|
|
|
+ public R insertGroupBuyCount(@RequestParam(value = "storeId") Integer storeId,@RequestParam(value = "groupId") Integer groupId,@RequestParam(value = "userId") Integer userId,@RequestParam(value = "countType") String countType) {
|
|
|
+ log.info("LifeGroupBuyCountController.insertGroupBuyCount?storeId={},groupId={},userId={},countType={}", storeId,groupId,userId,countType);
|
|
|
try {
|
|
|
- lifeGroupBuyCountService.insertGroupBuyCount(lifeGroupBuyCount);
|
|
|
+ lifeGroupBuyCountService.insertGroupBuyCount(storeId, groupId, userId, countType);
|
|
|
return R.success("成功");
|
|
|
}catch (Exception e){
|
|
|
- log.error("LifeGroupBuyCountController.insertGroupBuyCount?lifeGroupBuyCount={}", lifeGroupBuyCount.toString(), e);
|
|
|
+ log.error("LifeGroupBuyCountController.insertGroupBuyCount?storeId={},groupId={},userId={},countType={}", storeId,groupId,userId,countType,e);
|
|
|
return R.fail("失败");
|
|
|
}
|
|
|
}
|
|
|
@@ -43,7 +43,7 @@ public class LifeGroupBuyCountController {
|
|
|
@ApiOperation("团购统计-经营数据")
|
|
|
@ApiImplicitParams({@ApiImplicitParam(name = "storeId", value = "门店id", dataType = "String", paramType = "query", required = true)})
|
|
|
@GetMapping("/getJysj")
|
|
|
- private R getJysj(@RequestParam(value = "storeId") String storeId) {
|
|
|
+ private R<List<LifeGroupBuyCountVo>> getJysj(@RequestParam(value = "storeId") String storeId) {
|
|
|
log.info("LifeGroupBuyCountController.getJysj?storeId={}", storeId);
|
|
|
return R.data(lifeGroupBuyCountService.getJysj(storeId));
|
|
|
}
|
|
|
@@ -51,7 +51,7 @@ public class LifeGroupBuyCountController {
|
|
|
@ApiOperation("团购统计-商品核心指标趋势")
|
|
|
@ApiImplicitParams({@ApiImplicitParam(name = "storeId", value = "门店id", dataType = "String", paramType = "query", required = true)})
|
|
|
@GetMapping("/getSphxzb")
|
|
|
- private R getSphxzb(@RequestParam(value = "storeId") String storeId) {
|
|
|
+ private R<List<LifeGroupBuyCountDateVo>> getSphxzb(@RequestParam(value = "storeId") String storeId) {
|
|
|
log.info("LifeGroupBuyCountController.getSphxzb?storeId={}", storeId);
|
|
|
return R.data(lifeGroupBuyCountService.getSphxzb(storeId));
|
|
|
}
|
|
|
@@ -59,7 +59,7 @@ public class LifeGroupBuyCountController {
|
|
|
@ApiOperation("团购统计-单品指标排名")
|
|
|
@ApiImplicitParams({@ApiImplicitParam(name = "storeId", value = "门店id", dataType = "String", paramType = "query", required = true)})
|
|
|
@GetMapping("/getDpzbpm")
|
|
|
- private R getDpzbpm(@RequestParam(value = "storeId") String storeId) {
|
|
|
+ private R<List<LifeGroupBuyCountDateVo>> getDpzbpm(@RequestParam(value = "storeId") String storeId) {
|
|
|
log.info("LifeGroupBuyCountController.getDpzbpm?storeId={}", storeId);
|
|
|
return R.data(lifeGroupBuyCountService.getDpzbpm(storeId));
|
|
|
}
|