Browse Source

[拼团营销分析][添加][业务]

release_toaliyun_real
gongbiao 7 years ago
parent
commit
4bc2a663c8
2 changed files with 41 additions and 1 deletions
  1. +40
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/WxOrderGroupController.java
  2. +1
    -1
      mallinkService/src/main/resources/mapper/WxOrderGroupMapper.xml

+ 40
- 0
mallinkAdmin/src/main/java/com/iformall/controller/WxOrderGroupController.java View File

@@ -0,0 +1,40 @@
package com.iformall.controller;

import com.github.pagehelper.PageInfo;
import com.iformall.common.ResultData;
import com.iformall.domain.vo.WxOrderGroupMarketing;
import com.iformall.service.WxOrderGroupService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/orderGroup")
@Api(description = "拼团接口")
public class WxOrderGroupController extends BaseController {
private final Logger logger = LoggerFactory.getLogger(this.getClass());

@Autowired
WxOrderGroupService wxOrderGroupService;

@ApiOperation(value = "拼团营销分析")
@GetMapping("queryOrderGroupMarketingList")
@ApiImplicitParams({
@ApiImplicitParam(name = "couponId", value = "couponId", dataType = "String", paramType = "query"),
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true),
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true),
})
public ResultData queryOrderGroupMarketingList(@ModelAttribute WxOrderGroupMarketing wxOrderGroupMarketing, Integer pageNum, Integer pageSize) {
final PageInfo<WxOrderGroupMarketing> page = wxOrderGroupService.queryOrderGroupMarketingList(wxOrderGroupMarketing, pageNum, pageSize);
return new ResultData(page);
}

}

+ 1
- 1
mallinkService/src/main/resources/mapper/WxOrderGroupMapper.xml View File

@@ -102,7 +102,7 @@
ROUND(IFNULL((c.group_success_count/c.group_total_count),0)*100)
group_transfer_ratio,c.success_people,c.verify_count,
ROUND(IFNULL((verify_count/success_people),0)*100) verify_ratio,c.total_people from(
select tenant_id,id couponId,cover_img,title,FORMAT(price/100,2) price,FORMAT(sale_price/100,2) sale_price,
select tenant_id,id coupon_id,cover_img,title,FORMAT(price/100,2) price,FORMAT(sale_price/100,2) sale_price,
(select count(*) total from wx_order_group where coupon_id=c.id) group_total_count,
(select count(*) total from wx_order_group where status=11 and coupon_id=c.id) group_success_count,
IFNULL((select success.total from (


Loading…
Cancel
Save