| @@ -51,9 +51,7 @@ public class WxCouponOrderController extends BaseController { | |||||
| @ApiImplicitParams({ | @ApiImplicitParams({ | ||||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | ||||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | ||||
| @SystemControllerLog(description = "券包-列表") | |||||
| public ResultData list(@ModelAttribute WxCouponOrderBVo wxCouponOrder, Integer pageNum, Integer pageSize) { | public ResultData list(@ModelAttribute WxCouponOrderBVo wxCouponOrder, Integer pageNum, Integer pageSize) { | ||||
| logger.debug("[" + getIpAddr() + "] WxCouponOrderController::list"); | |||||
| if (wxCouponOrder == null) wxCouponOrder = new WxCouponOrderBVo(); | if (wxCouponOrder == null) wxCouponOrder = new WxCouponOrderBVo(); | ||||
| wxCouponOrder.updateTenantInfo(getTenantInfo()); | wxCouponOrder.updateTenantInfo(getTenantInfo()); | ||||
| if (wxCouponOrder.getMerchantName() != null && | if (wxCouponOrder.getMerchantName() != null && | ||||
| @@ -62,6 +60,24 @@ public class WxCouponOrderController extends BaseController { | |||||
| } | } | ||||
| return wxCouponOrderService.listAdminAsPage(wxCouponOrder, pageNum, pageSize); | return wxCouponOrderService.listAdminAsPage(wxCouponOrder, pageNum, pageSize); | ||||
| } | } | ||||
| @TenantIgnore | |||||
| @ApiOperation("子商场查询集团券核销分页列表接口") | |||||
| @GetMapping("groupList") | |||||
| @ApiImplicitParams({ | |||||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||||
| public ResultData groupList(@ModelAttribute WxCouponOrderBVo wxCouponOrder, Integer pageNum, Integer pageSize) { | |||||
| if (wxCouponOrder == null) wxCouponOrder = new WxCouponOrderBVo(); | |||||
| TenantEntity mallTenantEntity = getTenantInfo(); | |||||
| wxCouponOrder.setTenantId(mallTenantEntity.getParentTenantId()); | |||||
| if (wxCouponOrder.getMerchantName() != null && | |||||
| wxCouponOrder.getMerchantName().isEmpty()) { | |||||
| wxCouponOrder.setMerchantName(null); | |||||
| } | |||||
| wxCouponOrder.setBTenantId(mallTenantEntity.getTenantId()); | |||||
| return wxCouponOrderService.listAdminAsPage(wxCouponOrder, pageNum, pageSize); | |||||
| } | |||||
| @ApiOperation(value = "卡券详情接口") | @ApiOperation(value = "卡券详情接口") | ||||
| @GetMapping("detail") | @GetMapping("detail") | ||||
| @@ -127,5 +143,21 @@ public class WxCouponOrderController extends BaseController { | |||||
| } | } | ||||
| wxCouponOrderService.exportData(false,wxCouponOrder, request, response); | wxCouponOrderService.exportData(false,wxCouponOrder, request, response); | ||||
| } | } | ||||
| @TenantIgnore | |||||
| @GetMapping("exportGroupData") | |||||
| @SystemControllerLog(description = "券订单数据-导出数据") | |||||
| public void exportGroupData(@ModelAttribute WxCouponOrderBVo wxCouponOrder, HttpServletRequest request, HttpServletResponse response) { | |||||
| logger.debug("[" + getIpAddr() + "] WxCouponOrderController::exportData"); | |||||
| if (wxCouponOrder == null) wxCouponOrder = new WxCouponOrderBVo(); | |||||
| TenantEntity mallTenantEntity = getTenantInfo(); | |||||
| wxCouponOrder.setTenantId(mallTenantEntity.getParentTenantId()); | |||||
| if (wxCouponOrder.getMerchantName() != null && | |||||
| wxCouponOrder.getMerchantName().isEmpty()) { | |||||
| wxCouponOrder.setMerchantName(null); | |||||
| } | |||||
| wxCouponOrder.setBTenantId(mallTenantEntity.getTenantId()); | |||||
| wxCouponOrderService.exportData(false,wxCouponOrder, request, response); | |||||
| } | |||||
| } | } | ||||
| @@ -2,9 +2,11 @@ package com.iformall.controller.market; | |||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| import com.iformall.annotation.SystemControllerLog; | import com.iformall.annotation.SystemControllerLog; | ||||
| import com.iformall.annotation.TenantIgnore; | |||||
| import com.iformall.common.ResultData; | import com.iformall.common.ResultData; | ||||
| import com.iformall.controller.base.BaseController; | import com.iformall.controller.base.BaseController; | ||||
| import com.iformall.domain.po.WxCUserBasicInfo; | import com.iformall.domain.po.WxCUserBasicInfo; | ||||
| import com.iformall.domain.po.base.TenantEntity; | |||||
| import com.iformall.domain.vo.WxProfitSharingOrderQueryVo; | import com.iformall.domain.vo.WxProfitSharingOrderQueryVo; | ||||
| import com.iformall.domain.vo.WxProfitSharingOrderVo; | import com.iformall.domain.vo.WxProfitSharingOrderVo; | ||||
| import com.iformall.service.WxProfitSharingOrderService; | import com.iformall.service.WxProfitSharingOrderService; | ||||
| @@ -41,7 +43,6 @@ public class WxProfitSharingOrderController extends BaseController { | |||||
| @ApiImplicitParams({ | @ApiImplicitParams({ | ||||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | ||||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | ||||
| @SystemControllerLog(description = "分账订单-列表") | |||||
| public ResultData list(@ModelAttribute WxProfitSharingOrderQueryVo order, Integer pageNum, Integer pageSize) { | public ResultData list(@ModelAttribute WxProfitSharingOrderQueryVo order, Integer pageNum, Integer pageSize) { | ||||
| logger.debug("[" + getIpAddr() + "] WxProfitSharingOrderController::list"); | logger.debug("[" + getIpAddr() + "] WxProfitSharingOrderController::list"); | ||||
| if (null == order) { | if (null == order) { | ||||
| @@ -51,6 +52,24 @@ public class WxProfitSharingOrderController extends BaseController { | |||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @TenantIgnore | |||||
| @ApiOperation("子广场集团券核销分页列表接口") | |||||
| @GetMapping("groupList") | |||||
| @ApiImplicitParams({ | |||||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||||
| public ResultData groupList(@ModelAttribute WxProfitSharingOrderQueryVo order, Integer pageNum, Integer pageSize) { | |||||
| logger.debug("[" + getIpAddr() + "] WxProfitSharingOrderController::list"); | |||||
| if (null == order) { | |||||
| order = new WxProfitSharingOrderQueryVo(); | |||||
| } | |||||
| TenantEntity mallTenantEntity = getTenantInfo(); | |||||
| order.setTenantId(mallTenantEntity.getParentTenantId()); | |||||
| order.setBTenantId(mallTenantEntity.getTenantId()); | |||||
| final PageInfo<WxProfitSharingOrderVo> page = wxProfitSharingOrderService.listAsPage(order, pageNum, pageSize); | |||||
| return new ResultData(page); | |||||
| } | |||||
| @ApiOperation("记录导出") | @ApiOperation("记录导出") | ||||
| @GetMapping("/exportData") | @GetMapping("/exportData") | ||||
| @@ -62,6 +81,19 @@ public class WxProfitSharingOrderController extends BaseController { | |||||
| wxProfitSharingOrderService.exportData(order, request, response); | wxProfitSharingOrderService.exportData(order, request, response); | ||||
| } | } | ||||
| @ApiOperation("记录导出") | |||||
| @GetMapping("/exportGroupData") | |||||
| @SystemControllerLog(description = "线上自动分账记录-导出") | |||||
| public void exportGroupData(@ModelAttribute WxProfitSharingOrderQueryVo order, HttpServletRequest request, HttpServletResponse response) { | |||||
| if (null == order) { | |||||
| order = new WxProfitSharingOrderQueryVo(); | |||||
| } | |||||
| TenantEntity mallTenantEntity = getTenantInfo(); | |||||
| order.setTenantId(mallTenantEntity.getParentTenantId()); | |||||
| order.setBTenantId(mallTenantEntity.getTenantId()); | |||||
| wxProfitSharingOrderService.exportData(order, request, response); | |||||
| } | |||||
| @ApiOperation("交易统计") | @ApiOperation("交易统计") | ||||
| @GetMapping("/queryOrderSummary") | @GetMapping("/queryOrderSummary") | ||||
| @SystemControllerLog(description = "分账订单-交易统计") | @SystemControllerLog(description = "分账订单-交易统计") | ||||
| @@ -117,6 +117,9 @@ public class WxCouponOrderBVo extends WxCouponOrder { | |||||
| @io.swagger.annotations.ApiModelProperty(value="1:A端发卷,2:B端发卷",name="sourceType") | @io.swagger.annotations.ApiModelProperty(value="1:A端发卷,2:B端发卷",name="sourceType") | ||||
| private Integer sourceType; | private Integer sourceType; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "b端核销商场tenantId", name = "bTenantId") | |||||
| private String bTenantId; | |||||
| public String getbUserName() { | public String getbUserName() { | ||||
| return bUserName; | return bUserName; | ||||
| @@ -45,6 +45,9 @@ public class WxProfitSharingOrderQueryVo extends TenantEntity { | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private Integer limit; | private Integer limit; | ||||
| @TableField(exist = false) | |||||
| private String bTenantId; | |||||
| } | } | ||||
| @@ -404,7 +404,9 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { | |||||
| List<WxMall> mallList = wxMallMapper.findList(wxMallq); | List<WxMall> mallList = wxMallMapper.findList(wxMallq); | ||||
| if ( null != mallList && mallList.size() > 0 ) { | if ( null != mallList && mallList.size() > 0 ) { | ||||
| for (WxMall mall : mallList) { | for (WxMall mall : mallList) { | ||||
| mallTenantIdList.add(mall.getTenantId()); | |||||
| if (!mallTenantIdList.contains(mall.getTenantId())) { | |||||
| mallTenantIdList.add(mall.getTenantId()); | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| for (int j = 0 ; j < couponOrderList.size(); j ++) { | for (int j = 0 ; j < couponOrderList.size(); j ++) { | ||||
| @@ -937,7 +939,9 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { | |||||
| List<WxMall> mallList = wxMallMapper.findList(wxMallq); | List<WxMall> mallList = wxMallMapper.findList(wxMallq); | ||||
| if ( null != mallList && mallList.size() > 0 ) { | if ( null != mallList && mallList.size() > 0 ) { | ||||
| for (WxMall mall : mallList) { | for (WxMall mall : mallList) { | ||||
| mallTenantIdList.add(mall.getTenantId()); | |||||
| if (!mallTenantIdList.contains(mall.getTenantId())) { | |||||
| mallTenantIdList.add(mall.getTenantId()); | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| @@ -787,6 +787,10 @@ | |||||
| AND co.update_date < #{verifyEndDate,jdbcType=TIMESTAMP} | AND co.update_date < #{verifyEndDate,jdbcType=TIMESTAMP} | ||||
| </if> | </if> | ||||
| <if test="bTenantId != null"> | |||||
| AND co.b_tenant_id = #{bTenantId} | |||||
| </if> | |||||
| <if test=" null != couponIds"> | <if test=" null != couponIds"> | ||||
| and co.coupon_id in | and co.coupon_id in | ||||
| <foreach collection="couponIds" index="index" item="couponIdItem" open="(" separator="," close=")"> | <foreach collection="couponIds" index="index" item="couponIdItem" open="(" separator="," close=")"> | ||||
| @@ -204,6 +204,9 @@ | |||||
| <if test="type!=null"> | <if test="type!=null"> | ||||
| and pso.type = #{type} | and pso.type = #{type} | ||||
| </if> | </if> | ||||
| <if test=" null != bTenantId and '' != bTenantId"> | |||||
| and pso.`b_tenant_id` = #{bTenantId} | |||||
| </if> | |||||
| </where> | </where> | ||||