| @@ -8,6 +8,7 @@ import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.AliBusinessCircleOrder; | |||
| import com.iformall.domain.po.WxBusinessCircleOrder; | |||
| import com.iformall.domain.po.base.BaseEntity; | |||
| import com.iformall.domain.vo.AlipayOrWxStatistics; | |||
| import com.iformall.service.AliBusinessCircleOrderService; | |||
| import com.iformall.utils.Constant; | |||
| import io.swagger.annotations.Api; | |||
| @@ -51,7 +52,7 @@ public class AliBusinessCircleOrderController extends BaseController { | |||
| } | |||
| circleOrder.updateTenantInfo(getTenantInfo()); | |||
| circleOrder.setSortColumns(BaseEntity.SortField.CreateTime_DESC,BaseEntity.SortField.Id_DESC); | |||
| final PageInfo<AliBusinessCircleOrder> page = aliBusinessCircleOrderService.listAsPage(circleOrder, pageNum, pageSize); | |||
| PageInfo<AliBusinessCircleOrder> page = aliBusinessCircleOrderService.listAsPage(circleOrder, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @@ -109,5 +110,47 @@ public class AliBusinessCircleOrderController extends BaseController { | |||
| aliBusinessCircleOrderService.exportData(circleOrder, request, response); | |||
| } | |||
| @ApiOperation("阿里记录分页列表接口") | |||
| @GetMapping("aliPayList") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true), | |||
| }) | |||
| @SystemControllerLog(description = "-列表") | |||
| public ResultData aliPayList(@ModelAttribute AliBusinessCircleOrder circleOrder, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] AliBusinessCircleOrderController::aliPayList"); | |||
| if (null == circleOrder) { | |||
| circleOrder = new AliBusinessCircleOrder(); | |||
| } | |||
| circleOrder.updateTenantInfo(getTenantInfo()); | |||
| PageInfo<AlipayOrWxStatistics> page = aliBusinessCircleOrderService.aliPayList(circleOrder, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @ApiOperation("统计接口2") | |||
| @GetMapping("aliStatistics") | |||
| @ApiImplicitParams({ | |||
| }) | |||
| @SystemControllerLog(description = "-统计") | |||
| public ResultData aliStatistics(@ModelAttribute AliBusinessCircleOrder circleOrder) { | |||
| logger.debug("[" + getIpAddr() + "] AliBusinessCircleOrderController::aliStatistics"); | |||
| if (null == circleOrder) { | |||
| circleOrder = new AliBusinessCircleOrder(); | |||
| } | |||
| circleOrder.updateTenantInfo(getTenantInfo()); | |||
| AlipayOrWxStatistics aliStatistics = aliBusinessCircleOrderService.aliStatistics(circleOrder); | |||
| return new ResultData(aliStatistics); | |||
| } | |||
| @GetMapping("exportStatisticsData") | |||
| @SystemControllerLog(description = "导出数据") | |||
| public void exportStatisticsData(@ModelAttribute AliBusinessCircleOrder circleOrder, HttpServletRequest request, HttpServletResponse response) { | |||
| logger.debug("[" + getIpAddr() + "] AliBusinessCircleOrderController::exportStatisticsData"); | |||
| if (null == circleOrder) { | |||
| circleOrder = new AliBusinessCircleOrder(); | |||
| } | |||
| circleOrder.updateTenantInfo(getTenantInfo()); | |||
| aliBusinessCircleOrderService.exportStatisticsData(circleOrder, request, response); | |||
| } | |||
| } | |||
| @@ -7,6 +7,7 @@ import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.domain.po.base.BaseEntity; | |||
| import com.iformall.domain.vo.AlipayOrWxStatistics; | |||
| import com.iformall.service.*; | |||
| import com.iformall.utils.Constant; | |||
| import io.swagger.annotations.Api; | |||
| @@ -47,7 +48,7 @@ public class WxBusinessCircleOrderController extends BaseController { | |||
| } | |||
| circleOrder.updateTenantInfo(getTenantInfo()); | |||
| circleOrder.setSortColumns(BaseEntity.SortField.CreateTime_DESC,BaseEntity.SortField.Id_DESC); | |||
| final PageInfo<WxBusinessCircleOrder> page = wxBusinessCircleOrderService.listAsPage(circleOrder, pageNum, pageSize); | |||
| PageInfo<WxBusinessCircleOrder> page = wxBusinessCircleOrderService.listAsPage(circleOrder, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @@ -105,5 +106,47 @@ public class WxBusinessCircleOrderController extends BaseController { | |||
| wxBusinessCircleOrderService.exportData(circleOrder, request, response); | |||
| } | |||
| @ApiOperation("微信数据分页列表接口") | |||
| @GetMapping("wxPayList") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true), | |||
| }) | |||
| @SystemControllerLog(description = "-列表") | |||
| public ResultData wxPayList(@ModelAttribute WxBusinessCircleOrder circleOrder, Integer pageNum, Integer pageSize) { | |||
| logger.debug("[" + getIpAddr() + "] WxBusinessCircleOrderController::wxPayList"); | |||
| if (null == circleOrder) { | |||
| circleOrder = new WxBusinessCircleOrder(); | |||
| } | |||
| circleOrder.updateTenantInfo(getTenantInfo()); | |||
| PageInfo<AlipayOrWxStatistics> page = wxBusinessCircleOrderService.wxPayList(circleOrder, pageNum, pageSize); | |||
| return new ResultData(page); | |||
| } | |||
| @ApiOperation("统计接口2") | |||
| @GetMapping("wxStatistics") | |||
| @ApiImplicitParams({ | |||
| }) | |||
| @SystemControllerLog(description = "-统计") | |||
| public ResultData wxStatistics(@ModelAttribute WxBusinessCircleOrder circleOrder) { | |||
| logger.debug("[" + getIpAddr() + "] WxBusinessCircleOrderController::wxPayList"); | |||
| if (null == circleOrder) { | |||
| circleOrder = new WxBusinessCircleOrder(); | |||
| } | |||
| circleOrder.updateTenantInfo(getTenantInfo()); | |||
| AlipayOrWxStatistics aliStatistics = wxBusinessCircleOrderService.wxStatistics(circleOrder); | |||
| return new ResultData(aliStatistics); | |||
| } | |||
| @GetMapping("exportStatisticsData") | |||
| @SystemControllerLog(description = "导出数据") | |||
| public void exportStatisticsData(@ModelAttribute WxBusinessCircleOrder circleOrder, HttpServletRequest request, HttpServletResponse response) { | |||
| logger.debug("[" + getIpAddr() + "] WxBusinessCircleOrderController::exportStatisticsData"); | |||
| if (null == circleOrder) { | |||
| circleOrder = new WxBusinessCircleOrder(); | |||
| } | |||
| circleOrder.updateTenantInfo(getTenantInfo()); | |||
| wxBusinessCircleOrderService.exportStatisticsData(circleOrder, request, response); | |||
| } | |||
| } | |||
| @@ -0,0 +1,9 @@ | |||
| INSERT INTO `mallink`.`mall_permission`(`id`, `name`, `parent_id`, `available`, `permission`, `resource_type`, `module_color`, `module_color_num`, `url`, `icon`, `version_type`, `sort`) VALUES (423, '商圈交易统计', 416, 'Y', NULL, 1, NULL, NULL, 'circleSum', NULL, 0, 421); | |||
| UPDATE `mallink`.`mall_sale_type` SET `menus` = '[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 50, 101, 102, 103, 104, 105, 106, 107, 108, 109, 201, 202, 203, 204, 205, 206, 209, 210, 211, 212, 221, 222, 224, 225, 251, 261, 299, 300, 301, 302, 303, 304, 305, 306, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 420, 421, 422, 423, 431, 432, 502, 503, 504, 505, 506, 507, 508, 509, 511, 512, 513, 514, 521, 522, 523, 531, 532, 533, 591, 592, 595, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 616, 621, 622, 623, 624, 625, 626, 627, 641, 642, 643, 644, 645, 646, 651, 652, 653, 661, 662, 663, 664, 665, 666, 671, 672, 673, 674, 675, 681, 682, 683, 684, 685, 687, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 713, 714, 715, 901, 902, 903, 904, 905, 906, 907, 908, 910, 931, 932, 951, 952, 961, 962, 963, 965, 966, 967, 968, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 5502, 6610, 6611, 41701, 41702, 60701, 60702, 61201]' WHERE `id` = 1; | |||
| UPDATE `mallink`.`mall_sale_type` SET `menus` = '[1, 2, 4, 5, 6, 7, 8, 9, 10, 50, 101, 102, 103, 104, 105, 106, 107, 201, 202, 203, 204, 205, 209, 210, 211, 212, 221, 222, 224, 225, 251, 261, 409, 410, 411, 416, 418, 420, 421, 423, 502, 503, 504, 505, 506, 507, 508, 509, 511, 512, 513, 514, 521, 522, 523, 531, 532, 533, 591, 592, 595, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 616, 621, 622, 623, 624, 625, 626, 627, 641, 642, 643, 644, 645, 646, 651, 652, 653, 661, 662, 663, 664, 665, 666, 671, 672, 673, 674, 675, 681, 682, 683, 684, 685, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 713, 714, 715, 901, 902, 903, 904, 905, 906, 907, 908, 910, 931, 932, 951, 961, 5502, 6610, 6611, 60701, 60702, 61201]' WHERE `id` = 2; | |||
| UPDATE `mallink`.`mall_sale_type` SET `menus` = '[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 50, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 201, 202, 203, 204, 205, 206, 209, 210, 211, 212, 221, 222, 223, 224, 225, 251, 261, 299, 300, 301, 302, 303, 304, 305, 306, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 420, 421, 422, 423, 431, 432, 502, 503, 504, 505, 506, 507, 508, 509, 511, 512, 513, 514, 521, 522, 523, 531, 532, 533, 591, 592, 595, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 615, 616, 621, 622, 623, 624, 625, 626, 627, 641, 642, 643, 644, 645, 646, 647, 651, 652, 653, 661, 662, 663, 664, 665, 666, 671, 672, 673, 674, 675, 676, 680, 681, 682, 683, 684, 685, 687, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 713, 714, 715, 901, 902, 903, 904, 905, 906, 907, 908, 910, 931, 932, 951, 952, 961, 962, 963, 965, 966, 967, 968, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 5502, 6610, 6611, 41701, 41702, 60701, 60702, 61201, 61202, 61501, 61502]' WHERE `id` = 12; | |||
| UPDATE `mallink`.`mall_sale_type` SET `menus` = '[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 50, 101, 102, 103, 104, 105, 106, 107, 108, 109, 201, 202, 203, 204, 205, 206, 209, 210, 211, 212, 221, 222, 224, 225, 251, 261, 299, 300, 301, 302, 303, 304, 305, 306, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 420, 421, 422, 423, 431, 432, 502, 503, 504, 505, 506, 507, 508, 509, 511, 512, 513, 514, 521, 522, 523, 531, 532, 533, 591, 592, 595, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 616, 621, 622, 623, 624, 625, 626, 627, 641, 642, 643, 644, 645, 646, 651, 652, 653, 661, 662, 663, 664, 665, 666, 671, 672, 673, 674, 675, 681, 682, 683, 684, 685, 687, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 713, 714, 715, 901, 902, 903, 904, 905, 906, 907, 910, 931, 932, 951, 952, 961, 962, 963, 965, 966, 967, 968, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 5502, 6610, 6611, 41701, 41702, 60701, 60702, 61201]' WHERE `id` = 1028; | |||
| UPDATE `mallink`.`mall_sale_type` SET `menus` = '[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 50, 101, 102, 103, 104, 105, 106, 107, 108, 109, 201, 202, 203, 204, 205, 206, 209, 210, 211, 212, 221, 222, 224, 225, 251, 261, 299, 300, 307, 308, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 420, 421, 422, 423, 431, 432, 502, 503, 504, 505, 506, 507, 508, 509, 511, 512, 513, 514, 521, 522, 523, 531, 532, 533, 591, 592, 595, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 616, 621, 622, 623, 624, 625, 626, 627, 641, 642, 643, 644, 645, 646, 651, 652, 653, 661, 662, 663, 664, 665, 666, 671, 672, 673, 674, 675, 681, 682, 683, 684, 685, 687, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 713, 714, 715, 901, 902, 903, 904, 905, 906, 907, 908, 910, 931, 932, 951, 952, 961, 962, 963, 965, 966, 967, 968, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 5502, 6610, 6611, 41701, 41702, 60701, 60702, 61201]' WHERE `id` = 1035001036; | |||
| UPDATE `mallink`.`mall_sale_type` SET `menus` = '[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 50, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 201, 202, 203, 204, 205, 206, 209, 210, 211, 212, 221, 222, 225, 223, 224, 251, 261, 299, 300, 307, 308, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 420, 421, 422, 423, 431, 432, 502, 503, 504, 505, 506, 507, 508, 509, 511, 512, 513, 514, 521, 522, 523, 531, 532, 533, 591, 592, 595, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 615, 616, 621, 622, 623, 624, 625, 626, 627, 641, 642, 643, 644, 645, 646, 647, 651, 652, 653, 661, 662, 663, 664, 665, 666, 671, 672, 673, 674, 675, 676, 680, 681, 682, 683, 684, 685, 687, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 713, 714, 715, 901, 902, 903, 904, 905, 906, 907, 908, 910, 931, 932, 951, 952, 961, 962, 963, 965, 966, 967, 968, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 5502, 6610, 6611, 41701, 41702, 60701, 60702, 61201, 61202, 61501, 61502]' WHERE `id` = 103500103610; | |||
| @@ -124,6 +124,7 @@ public class ShiroConfig { | |||
| filterChainDefinitionMap.put("/hkwsCarCallback/**", "anon"); | |||
| filterChainDefinitionMap.put("/futeCarCallback/**", "anon"); | |||
| filterChainDefinitionMap.put("/carPaidCallback/**", "anon"); | |||
| filterChainDefinitionMap.put("/keTuoCarCallback/**", "anon"); | |||
| // static files | |||
| filterChainDefinitionMap.put("/css/**", "anon"); | |||
| @@ -10,6 +10,7 @@ import lombok.ToString; | |||
| import java.math.BigDecimal; | |||
| import java.util.Date; | |||
| import java.util.List; | |||
| @Data | |||
| @ToString(callSuper = true) | |||
| @@ -138,4 +139,6 @@ public class BusinessCircleBase extends TenantEntity { | |||
| return refundAmount != null ? new BigDecimal(refundAmount).divide(new BigDecimal(100)).toPlainString(): refundAmountStr; | |||
| } | |||
| private List<Long> merchantIds; | |||
| } | |||
| @@ -0,0 +1,40 @@ | |||
| package com.iformall.domain.vo; | |||
| import cn.afterturn.easypoi.excel.annotation.Excel; | |||
| import com.baomidou.mybatisplus.annotation.TableField; | |||
| import lombok.Data; | |||
| import java.io.Serializable; | |||
| import java.math.BigDecimal; | |||
| @Data | |||
| public class AlipayOrWxStatistics implements Serializable { | |||
| private static final long serialVersionUID = 1L; | |||
| @Excel(name = "商户名称", width = 20, orderNum = "2") | |||
| private String merchantName;//商户名称 | |||
| private Integer payAmount;//支付总金额 | |||
| @Excel(name = "支付金额(元)", width = 20, orderNum = "3") | |||
| @TableField(exist = false) | |||
| @io.swagger.annotations.ApiModelProperty(value="用户实际付款金额,单位(元)",name="payAmountStr") | |||
| private String payAmountStr; | |||
| public String getPayAmountStr() { | |||
| return payAmount != null ? new BigDecimal(payAmount).divide(new BigDecimal(100)).toPlainString(): payAmountStr; | |||
| } | |||
| private Integer refundAmount;//退款总金额 | |||
| @Excel(name = "退款金额(元)", width = 20, orderNum = "5") | |||
| @TableField(exist = false) | |||
| @io.swagger.annotations.ApiModelProperty(value="用户退款金额,单位(元)",name="refundAmountStr") | |||
| private String refundAmountStr; | |||
| public String getRefundAmountStr() { | |||
| return refundAmount != null ? new BigDecimal(refundAmount).divide(new BigDecimal(100)).toPlainString(): refundAmountStr; | |||
| } | |||
| @Excel(name = "支付积分", width = 20, orderNum = "4") | |||
| private Integer payPoints;//支付添加总积分 | |||
| @Excel(name = "退款积分", width = 20, orderNum = "6") | |||
| private Integer refundPoints;//支付退款扣减总积分 | |||
| @Excel(name = "商户ID", width = 20, orderNum = "1") | |||
| private Long merchantId; | |||
| } | |||
| @@ -69,6 +69,9 @@ public enum EnumCarCmd { | |||
| list.add(CAR_CYF_CALLBACK_PARK_IN.getCode()); | |||
| list.add(CAR_JIESHUN_CALLBACK_PARK_IN.getCode()); | |||
| list.add(CAR_HAIKANGWEISHI_CALLBACK_PARK_IN.getCode()); | |||
| list.add(CAR_FUTE_CALLBACK_PARK_IN.getCode()); | |||
| list.add(CAR_LIFANG_CALLBACK_PARK_IN.getCode()); | |||
| list.add(CAR_KETUO_CALLBACK_PARK_IN.getCode()); | |||
| return list; | |||
| } | |||
| @@ -80,6 +83,9 @@ public enum EnumCarCmd { | |||
| list.add(CAR_CYF_CALLBACK_PARK_OUT.getCode()); | |||
| list.add(CAR_JIESHUN_CALLBACK_PARK_OUT.getCode()); | |||
| list.add(CAR_HAIKANGWEISHI_CALLBACK_PARK_OUT.getCode()); | |||
| list.add(CAR_FUTE_CALLBACK_PARK_OUT.getCode()); | |||
| list.add(CAR_LIFANG_CALLBACK_PARK_OUT.getCode()); | |||
| list.add(CAR_KETUO_CALLBACK_PARK_OUT.getCode()); | |||
| return list; | |||
| } | |||
| @@ -91,6 +97,9 @@ public enum EnumCarCmd { | |||
| list.add(CAR_CYF_CALLBACK_PAID.getCode()); | |||
| list.add(CAR_JIESHUN_CALLBACK_PAID.getCode()); | |||
| list.add(CAR_HAIKANGWEISHI_CALLBACK_PAID.getCode()); | |||
| list.add(CAR_FUTE_CALLBACK_PAID.getCode()); | |||
| list.add(CAR_LIFANG_CALLBACK_PAID.getCode()); | |||
| list.add(CAR_KETUO_CALLBACK_PAID.getCode()); | |||
| return list; | |||
| } | |||
| @@ -4,6 +4,7 @@ package com.iformall.mapper; | |||
| import com.iformall.common.CommonMapper; | |||
| import com.iformall.domain.po.AliBusinessCircleOrder; | |||
| import com.iformall.domain.po.BusinessCircleBase; | |||
| import com.iformall.domain.vo.AlipayOrWxStatistics; | |||
| import org.apache.ibatis.annotations.Param; | |||
| import java.util.Date; | |||
| @@ -47,4 +48,13 @@ public interface AliBusinessCircleOrderMapper extends CommonMapper<AliBusinessCi | |||
| Integer sumCirclePayment(BusinessCircleBase record); | |||
| Integer sumCircleRefundAmount(BusinessCircleBase circleOrder); | |||
| List<AlipayOrWxStatistics> aliPayList(AliBusinessCircleOrder record); | |||
| List<AlipayOrWxStatistics> aliRefundList(AliBusinessCircleOrder record); | |||
| AlipayOrWxStatistics aliPayStatistics(AliBusinessCircleOrder record); | |||
| AlipayOrWxStatistics aliRefundStatistics(AliBusinessCircleOrder record); | |||
| } | |||
| @@ -1,11 +1,11 @@ | |||
| package com.iformall.mapper; | |||
| import com.iformall.common.CommonMapper; | |||
| import com.iformall.domain.po.AliBusinessCircleOrder; | |||
| import com.iformall.domain.po.BusinessCircleBase; | |||
| import com.iformall.domain.po.WxBusinessCircleOrder; | |||
| import org.apache.ibatis.annotations.Param; | |||
| import com.iformall.domain.vo.AlipayOrWxStatistics; | |||
| import java.util.Date; | |||
| import java.util.List; | |||
| public interface WxBusinessCircleOrderMapper extends CommonMapper<WxBusinessCircleOrder, Long> { | |||
| @@ -50,4 +50,13 @@ public interface WxBusinessCircleOrderMapper extends CommonMapper<WxBusinessCirc | |||
| Integer sumCirclePayment(BusinessCircleBase record); | |||
| Integer sumCircleRefundAmount(BusinessCircleBase circleOrder); | |||
| List<AlipayOrWxStatistics> wxPayList(WxBusinessCircleOrder record); | |||
| List<AlipayOrWxStatistics> wxRefundList(WxBusinessCircleOrder record); | |||
| AlipayOrWxStatistics wxPayStatistics(WxBusinessCircleOrder record); | |||
| AlipayOrWxStatistics wxRefundStatistics(WxBusinessCircleOrder record); | |||
| } | |||
| @@ -6,6 +6,7 @@ import com.iformall.domain.po.AliBusinessCircleOrder; | |||
| import com.iformall.domain.po.BusinessCircleBase; | |||
| import com.iformall.domain.po.WxMerchant; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.domain.vo.AlipayOrWxStatistics; | |||
| import javax.servlet.http.HttpServletRequest; | |||
| import javax.servlet.http.HttpServletResponse; | |||
| @@ -57,4 +58,10 @@ public interface AliBusinessCircleOrderService { | |||
| Integer sumCirclePayment(BusinessCircleBase circleOrder); | |||
| Integer sumCircleRefundAmount(BusinessCircleBase circleOrder); | |||
| PageInfo<AlipayOrWxStatistics> aliPayList(AliBusinessCircleOrder circleOrder, Integer pageNum, Integer pageSize); | |||
| AlipayOrWxStatistics aliStatistics(AliBusinessCircleOrder circleOrder); | |||
| void exportStatisticsData(AliBusinessCircleOrder circleOrder, HttpServletRequest request, HttpServletResponse response); | |||
| } | |||
| @@ -2,9 +2,11 @@ package com.iformall.service; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.AliBusinessCircleOrder; | |||
| import com.iformall.domain.po.BusinessCircleBase; | |||
| import com.iformall.domain.po.WxBusinessCircleOrder; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.domain.vo.AlipayOrWxStatistics; | |||
| import javax.servlet.http.HttpServletRequest; | |||
| import javax.servlet.http.HttpServletResponse; | |||
| @@ -89,4 +91,9 @@ public interface WxBusinessCircleOrderService { | |||
| void sendSyncParkingsMsg(TenantEntity tenantEntity,Long carCmdLogId); | |||
| PageInfo<AlipayOrWxStatistics> wxPayList(WxBusinessCircleOrder circleOrder, Integer pageNum, Integer pageSize); | |||
| AlipayOrWxStatistics wxStatistics(WxBusinessCircleOrder circleOrder); | |||
| void exportStatisticsData(WxBusinessCircleOrder circleOrder, HttpServletRequest request, HttpServletResponse response); | |||
| } | |||
| @@ -3,6 +3,7 @@ package com.iformall.service; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.dto.WxMerchantDto; | |||
| import com.iformall.domain.po.WxBusinessCircleOrder; | |||
| import com.iformall.domain.po.WxMerchantCorp; | |||
| import com.iformall.domain.po.WxPark; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| @@ -12,6 +13,7 @@ import com.iformall.domain.vo.WxMerchantTradeDetailVo; | |||
| import com.iformall.domain.vo.WxMerchantTradeVo; | |||
| import com.iformall.domain.vo.WxMerchantVo; | |||
| import org.apache.ibatis.annotations.Param; | |||
| import org.springframework.web.bind.annotation.ModelAttribute; | |||
| import javax.servlet.http.HttpServletRequest; | |||
| @@ -220,6 +222,7 @@ public interface WxMerchantService { | |||
| PageInfo<WxMerchant> subMerchantList(WxMerchant wxMerchant, Integer pageNum, Integer pageSize); | |||
| List<Long> selectByMerchantIds(String merchantName); | |||
| void initMerchantByPoi(String poiName,String poiId); | |||
| } | |||
| @@ -7,12 +7,14 @@ import com.iformall.common.IdWorker; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.domain.vo.AlipayOrWxStatistics; | |||
| import com.iformall.enums.*; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.mapper.AliBusinessCircleOrderMapper; | |||
| import com.iformall.service.*; | |||
| import com.iformall.utils.Constant; | |||
| import com.iformall.utils.RedisLock; | |||
| import org.apache.commons.collections.CollectionUtils; | |||
| import org.apache.commons.lang3.StringUtils; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| @@ -25,6 +27,8 @@ import javax.servlet.http.HttpServletRequest; | |||
| import javax.servlet.http.HttpServletResponse; | |||
| import java.util.Date; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| import java.util.stream.Collectors; | |||
| @Service | |||
| public class AliBusinessCircleOrderServiceImpl implements AliBusinessCircleOrderService { | |||
| @@ -379,4 +383,139 @@ public class AliBusinessCircleOrderServiceImpl implements AliBusinessCircleOrder | |||
| return sumCircleRefundAmount==null?0:sumCircleRefundAmount; | |||
| } | |||
| @Override | |||
| public PageInfo<AlipayOrWxStatistics> aliPayList(AliBusinessCircleOrder record, Integer pageIndex, Integer pageSize) { | |||
| if (StringUtils.isNotEmpty(record.getMerchantName())) { | |||
| List<Long> ids = wxMerchantService.selectByMerchantIds(record.getMerchantName()); | |||
| if (!CollectionUtils.isEmpty(ids)) { | |||
| record.setMerchantIds(ids); | |||
| }else{ | |||
| ids.add(-999l); | |||
| record.setMerchantIds(ids); | |||
| } | |||
| } | |||
| PageInfo<AlipayOrWxStatistics> pageInfo = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> aliBusinessCircleOrderMapper.aliPayList(record)); | |||
| if (CollectionUtils.isEmpty(pageInfo.getList())) { | |||
| return pageInfo; | |||
| } | |||
| List<Long> list = pageInfo.getList().parallelStream().filter(s -> s.getMerchantId() != null) | |||
| .map(AlipayOrWxStatistics::getMerchantId).collect(Collectors.toList()); | |||
| Map<Long, AlipayOrWxStatistics> statisticsMap = null; | |||
| Map<Long, String> merchantNamesMap = null; | |||
| if(CollectionUtils.isNotEmpty(list)){ | |||
| //查询退款数据 | |||
| record.setMerchantIds(list); | |||
| List<AlipayOrWxStatistics> alipayOrWxStatistics = aliBusinessCircleOrderMapper.aliRefundList(record); | |||
| if (CollectionUtils.isNotEmpty(alipayOrWxStatistics)) { | |||
| statisticsMap = alipayOrWxStatistics.stream().collect(Collectors.toMap(AlipayOrWxStatistics::getMerchantId, s -> s)); | |||
| } | |||
| WxMerchant wxMerchant = new WxMerchant(); | |||
| wxMerchant.setIds(list); | |||
| merchantNamesMap = wxMerchantService.getIdAndNamesMap(wxMerchant); | |||
| } | |||
| for (AlipayOrWxStatistics statistics:pageInfo.getList()) { | |||
| if(merchantNamesMap != null){ | |||
| statistics.setMerchantName(merchantNamesMap.get(statistics.getMerchantId())); | |||
| } | |||
| if(StringUtils.isBlank(statistics.getMerchantName())){ | |||
| statistics.setMerchantName("未知门店"); | |||
| } | |||
| if(statisticsMap != null){ | |||
| AlipayOrWxStatistics refundstatistics = statisticsMap.get(statistics.getMerchantId()); | |||
| if(refundstatistics != null){ | |||
| statistics.setRefundAmount(refundstatistics.getRefundAmount()); | |||
| statistics.setRefundPoints(refundstatistics.getRefundPoints()); | |||
| } | |||
| } | |||
| if(statistics.getRefundAmount() == null){ | |||
| statistics.setRefundAmount(0); | |||
| statistics.setRefundPoints(0); | |||
| } | |||
| } | |||
| return pageInfo; | |||
| } | |||
| @Override | |||
| public AlipayOrWxStatistics aliStatistics(AliBusinessCircleOrder record) { | |||
| if (StringUtils.isNotEmpty(record.getMerchantName())) { | |||
| List<Long> ids = wxMerchantService.selectByMerchantIds(record.getMerchantName()); | |||
| if (!CollectionUtils.isEmpty(ids)) { | |||
| record.setMerchantIds(ids); | |||
| }else{ | |||
| ids.add(-999l); | |||
| record.setMerchantIds(ids); | |||
| } | |||
| } | |||
| AlipayOrWxStatistics aliStatistics = aliBusinessCircleOrderMapper.aliPayStatistics(record); | |||
| if(aliStatistics.getPayAmount() > 0){ | |||
| AlipayOrWxStatistics aliRefundStatistics = aliBusinessCircleOrderMapper.aliRefundStatistics(record); | |||
| aliStatistics.setRefundAmount(aliRefundStatistics.getRefundAmount()); | |||
| aliStatistics.setRefundPoints(aliRefundStatistics.getRefundPoints()); | |||
| } | |||
| if(aliStatistics.getRefundAmount() == null){ | |||
| aliStatistics.setRefundAmount(0); | |||
| aliStatistics.setRefundPoints(0); | |||
| } | |||
| return aliStatistics; | |||
| } | |||
| @Override | |||
| public void exportStatisticsData(AliBusinessCircleOrder record, HttpServletRequest request, HttpServletResponse response) { | |||
| if (StringUtils.isNotEmpty(record.getMerchantName())) { | |||
| List<Long> ids = wxMerchantService.selectByMerchantIds(record.getMerchantName()); | |||
| if (!CollectionUtils.isEmpty(ids)) { | |||
| record.setMerchantIds(ids); | |||
| }else{ | |||
| ids.add(-999l); | |||
| record.setMerchantIds(ids); | |||
| } | |||
| } | |||
| List<AlipayOrWxStatistics> aliStatistics = aliBusinessCircleOrderMapper.aliPayList(record); | |||
| List<Long> list = aliStatistics.parallelStream().filter(s -> s.getMerchantId() != null) | |||
| .map(AlipayOrWxStatistics::getMerchantId).collect(Collectors.toList()); | |||
| Map<Long, AlipayOrWxStatistics> statisticsMap = null; | |||
| Map<Long, String> merchantNamesMap = null; | |||
| if(CollectionUtils.isNotEmpty(list)){ | |||
| //查询退款数据 | |||
| record.setMerchantIds(list); | |||
| List<AlipayOrWxStatistics> alipayOrWxStatistics = aliBusinessCircleOrderMapper.aliRefundList(record); | |||
| if (CollectionUtils.isNotEmpty(alipayOrWxStatistics)) { | |||
| statisticsMap = alipayOrWxStatistics.stream().collect(Collectors.toMap(AlipayOrWxStatistics::getMerchantId, s -> s)); | |||
| } | |||
| WxMerchant wxMerchant = new WxMerchant(); | |||
| wxMerchant.setIds(list); | |||
| merchantNamesMap = wxMerchantService.getIdAndNamesMap(wxMerchant); | |||
| } | |||
| for (AlipayOrWxStatistics statistics:aliStatistics) { | |||
| if(merchantNamesMap != null){ | |||
| statistics.setMerchantName(merchantNamesMap.get(statistics.getMerchantId())); | |||
| } | |||
| if(StringUtils.isBlank(statistics.getMerchantName())){ | |||
| statistics.setMerchantName("未知门店"); | |||
| } | |||
| if(statisticsMap != null){ | |||
| AlipayOrWxStatistics refundstatistics = statisticsMap.get(statistics.getMerchantId()); | |||
| if(refundstatistics != null){ | |||
| statistics.setRefundAmount(refundstatistics.getRefundAmount()); | |||
| statistics.setRefundPoints(refundstatistics.getRefundPoints()); | |||
| } | |||
| } | |||
| if(statistics.getRefundAmount() == null){ | |||
| statistics.setRefundAmount(0); | |||
| statistics.setRefundPoints(0); | |||
| } | |||
| } | |||
| excelService.exportExcel(aliStatistics, null, "支付宝商圈统计", AlipayOrWxStatistics.class, "支付宝商圈统计.xlsx", response, false); | |||
| } | |||
| } | |||
| @@ -14,6 +14,7 @@ import com.iformall.common.ResultData; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.domain.po.base.TenantEntity; | |||
| import com.iformall.domain.po.msg.AfterBusinessCreditMsg; | |||
| import com.iformall.domain.vo.AlipayOrWxStatistics; | |||
| import com.iformall.enums.*; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.mapper.WxBusinessCircleOrderMapper; | |||
| @@ -23,6 +24,7 @@ import com.iformall.utils.Constant; | |||
| import com.iformall.utils.DateUtils; | |||
| import com.iformall.utils.MaUtil; | |||
| import com.iformall.utils.RedisLock; | |||
| import org.apache.commons.collections.CollectionUtils; | |||
| import org.apache.commons.lang3.StringUtils; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| @@ -36,6 +38,9 @@ import javax.servlet.http.HttpServletResponse; | |||
| import java.math.BigDecimal; | |||
| import java.util.Date; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| import java.util.Objects; | |||
| import java.util.stream.Collectors; | |||
| @Service | |||
| public class WxBusinessCircleOrderServiceImpl implements WxBusinessCircleOrderService { | |||
| @@ -553,5 +558,141 @@ public class WxBusinessCircleOrderServiceImpl implements WxBusinessCircleOrderSe | |||
| // mqBaseProducer.sendMessage(msg, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode()); | |||
| } | |||
| @Override | |||
| public PageInfo<AlipayOrWxStatistics> wxPayList(WxBusinessCircleOrder record, Integer pageIndex, Integer pageSize) { | |||
| if (StringUtils.isNotEmpty(record.getMerchantName())) { | |||
| List<Long> ids = wxMerchantService.selectByMerchantIds(record.getMerchantName()); | |||
| if (!CollectionUtils.isEmpty(ids)) { | |||
| record.setMerchantIds(ids); | |||
| }else{ | |||
| ids.add(-999l); | |||
| record.setMerchantIds(ids); | |||
| } | |||
| } | |||
| PageInfo<AlipayOrWxStatistics> pageInfo = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxBusinessCircleOrderMapper.wxPayList(record)); | |||
| if (CollectionUtils.isEmpty(pageInfo.getList())) { | |||
| return pageInfo; | |||
| } | |||
| List<Long> list = pageInfo.getList().parallelStream().filter(s -> s.getMerchantId() != null) | |||
| .map(AlipayOrWxStatistics::getMerchantId).collect(Collectors.toList()); | |||
| Map<Long, AlipayOrWxStatistics> statisticsMap = null; | |||
| Map<Long, String> merchantNamesMap = null; | |||
| if(CollectionUtils.isNotEmpty(list)){ | |||
| //查询退款数据 | |||
| record.setMerchantIds(list); | |||
| List<AlipayOrWxStatistics> alipayOrWxStatistics = wxBusinessCircleOrderMapper.wxRefundList(record); | |||
| if (CollectionUtils.isNotEmpty(alipayOrWxStatistics)) { | |||
| statisticsMap = alipayOrWxStatistics.stream().collect(Collectors.toMap(AlipayOrWxStatistics::getMerchantId, s -> s)); | |||
| } | |||
| WxMerchant wxMerchant = new WxMerchant(); | |||
| wxMerchant.setIds(list); | |||
| merchantNamesMap = wxMerchantService.getIdAndNamesMap(wxMerchant); | |||
| } | |||
| for (AlipayOrWxStatistics statistics:pageInfo.getList()) { | |||
| if(merchantNamesMap != null){ | |||
| statistics.setMerchantName(merchantNamesMap.get(statistics.getMerchantId())); | |||
| } | |||
| if(StringUtils.isBlank(statistics.getMerchantName())){ | |||
| statistics.setMerchantName("未知门店"); | |||
| } | |||
| if(statisticsMap != null){ | |||
| AlipayOrWxStatistics refundstatistics = statisticsMap.get(statistics.getMerchantId()); | |||
| if(refundstatistics != null){ | |||
| statistics.setRefundAmount(refundstatistics.getRefundAmount()); | |||
| statistics.setRefundPoints(refundstatistics.getRefundPoints()); | |||
| } | |||
| } | |||
| if(statistics.getRefundAmount() == null){ | |||
| statistics.setRefundAmount(0); | |||
| statistics.setRefundPoints(0); | |||
| } | |||
| } | |||
| return pageInfo; | |||
| } | |||
| @Override | |||
| public AlipayOrWxStatistics wxStatistics(WxBusinessCircleOrder record) { | |||
| if (StringUtils.isNotEmpty(record.getMerchantName())) { | |||
| List<Long> ids = wxMerchantService.selectByMerchantIds(record.getMerchantName()); | |||
| if (!CollectionUtils.isEmpty(ids)) { | |||
| record.setMerchantIds(ids); | |||
| }else{ | |||
| ids.add(-999l); | |||
| record.setMerchantIds(ids); | |||
| } | |||
| } | |||
| AlipayOrWxStatistics aliStatistics = wxBusinessCircleOrderMapper.wxPayStatistics(record); | |||
| if(aliStatistics.getPayAmount() > 0){ | |||
| AlipayOrWxStatistics aliRefundStatistics = wxBusinessCircleOrderMapper.wxRefundStatistics(record); | |||
| aliStatistics.setRefundAmount(aliRefundStatistics.getRefundAmount()); | |||
| aliStatistics.setRefundPoints(aliRefundStatistics.getRefundPoints()); | |||
| } | |||
| if(aliStatistics.getRefundAmount() == null){ | |||
| aliStatistics.setRefundAmount(0); | |||
| aliStatistics.setRefundPoints(0); | |||
| } | |||
| return aliStatistics; | |||
| } | |||
| @Override | |||
| public void exportStatisticsData(WxBusinessCircleOrder record, HttpServletRequest request, HttpServletResponse response) { | |||
| if (StringUtils.isNotEmpty(record.getMerchantName())) { | |||
| List<Long> ids = wxMerchantService.selectByMerchantIds(record.getMerchantName()); | |||
| if (!CollectionUtils.isEmpty(ids)) { | |||
| record.setMerchantIds(ids); | |||
| }else{ | |||
| ids.add(-999l); | |||
| record.setMerchantIds(ids); | |||
| } | |||
| } | |||
| List<AlipayOrWxStatistics> wxStatistics = wxBusinessCircleOrderMapper.wxPayList(record); | |||
| List<Long> list = wxStatistics.parallelStream().filter(s -> s.getMerchantId() != null) | |||
| .map(AlipayOrWxStatistics::getMerchantId).collect(Collectors.toList()); | |||
| Map<Long, AlipayOrWxStatistics> statisticsMap = null; | |||
| Map<Long, String> merchantNamesMap = null; | |||
| if(CollectionUtils.isNotEmpty(list)){ | |||
| //查询退款数据 | |||
| record.setMerchantIds(list); | |||
| List<AlipayOrWxStatistics> wxpayOrWxStatistics = wxBusinessCircleOrderMapper.wxRefundList(record); | |||
| if (CollectionUtils.isNotEmpty(wxpayOrWxStatistics)) { | |||
| statisticsMap = wxpayOrWxStatistics.stream().collect(Collectors.toMap(AlipayOrWxStatistics::getMerchantId, s -> s)); | |||
| } | |||
| WxMerchant wxMerchant = new WxMerchant(); | |||
| wxMerchant.setIds(list); | |||
| merchantNamesMap = wxMerchantService.getIdAndNamesMap(wxMerchant); | |||
| } | |||
| for (AlipayOrWxStatistics statistics:wxStatistics) { | |||
| if(merchantNamesMap != null){ | |||
| statistics.setMerchantName(merchantNamesMap.get(statistics.getMerchantId())); | |||
| } | |||
| if(StringUtils.isBlank(statistics.getMerchantName())){ | |||
| statistics.setMerchantName("未知门店"); | |||
| } | |||
| if(statisticsMap != null){ | |||
| AlipayOrWxStatistics refundstatistics = statisticsMap.get(statistics.getMerchantId()); | |||
| if(refundstatistics != null){ | |||
| statistics.setRefundAmount(refundstatistics.getRefundAmount()); | |||
| statistics.setRefundPoints(refundstatistics.getRefundPoints()); | |||
| } | |||
| } | |||
| if(statistics.getRefundAmount() == null){ | |||
| statistics.setRefundAmount(0); | |||
| statistics.setRefundPoints(0); | |||
| } | |||
| } | |||
| excelService.exportExcel(wxStatistics, null, "微信商圈统计", AlipayOrWxStatistics.class, "微信商圈统计.xlsx", response, false); | |||
| } | |||
| } | |||
| @@ -2133,7 +2133,14 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||
| return pageInfo; | |||
| } | |||
| @Override | |||
| @Override | |||
| public List<Long> selectByMerchantIds(String merchantName) { | |||
| WxMerchant merchant = new WxMerchant(); | |||
| merchant.setName(merchantName); | |||
| return wxMerchantMapper.findIdList(merchant); | |||
| } | |||
| @Override | |||
| public void initMerchantByPoi(String poiName, String poiId) { | |||
| } | |||
| @@ -1,5 +1,6 @@ | |||
| package com.iformall.service.park.impl.ketuo; | |||
| import java.math.BigDecimal; | |||
| import java.util.Date; | |||
| import java.util.HashMap; | |||
| import java.util.Map; | |||
| @@ -109,7 +110,8 @@ public class KeTuoParkService extends BaseParkService implements ParkAdapterServ | |||
| if (null == retObject ) { | |||
| throw new MallinkException(retObj.getInteger("resCode"), "ketuo getCarStopFee error. no order result"+carNumber); | |||
| } | |||
| Double totalFee = retObject.getDouble("payable"); | |||
| Double totalFee = retObject.getDouble("payable");//分 | |||
| String _fee = String.valueOf(new BigDecimal(totalFee).divide(new BigDecimal(100)).doubleValue()); | |||
| String appId = "wx54e676273869baa6"; | |||
| String parkOrderId = retObject.getString("orderNo"); | |||
| Integer freeMinute = (Integer)park.getVendorParamsByKey("freeMinute"); | |||
| @@ -117,7 +119,7 @@ public class KeTuoParkService extends BaseParkService implements ParkAdapterServ | |||
| String endTime = retObject.getString("payTime");//离场时间,格式为“yyyy-MM-dd HH:mi:ss” | |||
| String payPath = "pages/index/index?lotId="+Integer.parseInt(park.getParkingId())+"&lpn="+carNumber; | |||
| return new ParkStopFee(parkOrderId,ketuo.utcToLocal(createTime),ketuo.utcToLocal(endTime), | |||
| String.valueOf(totalFee),appId,payPath,null,null,"请支付后"+freeMinute+"分钟内离场"); | |||
| _fee,appId,payPath,null,null,"请支付后"+freeMinute+"分钟内离场"); | |||
| }else { | |||
| logger.error("ketuoCarStopFee error. paramMap: {} . ketuoResult: {}",JSON.toJSONString(paramMap),ret); | |||
| String msg = retObj.getString("resMsg"); | |||
| @@ -154,7 +156,8 @@ public class KeTuoParkService extends BaseParkService implements ParkAdapterServ | |||
| boolean isReduceMoney = this.isReduceMoney(coupon); | |||
| Integer reduceValue = this.getReduceValue(coupon); | |||
| String executeRet = ketuo.executediscount(park, fee.getOrderId(), planNo, Integer.parseInt(fee.getRemainingFee()),isReduceMoney, reduceValue); | |||
| Integer parkFee = new BigDecimal(fee.getRemainingFee()).multiply(new BigDecimal(100)).intValue(); | |||
| String executeRet = ketuo.executediscount(park, fee.getOrderId(), planNo, parkFee,isReduceMoney, reduceValue); | |||
| logger.info("ketuo executediscount result:"+executeRet); | |||
| JSONObject executeRetObj = JSON.parseObject(executeRet); | |||
| if (executeRetObj.getIntValue("resCode") == 0){ | |||
| @@ -57,7 +57,7 @@ public class KeTuoUtil { | |||
| JSONObject param = new JSONObject(); | |||
| param.put("plateNo", carNumber);//车牌号 | |||
| log.info("ketuo getCarStopFee :" + JSON.toJSONString(param)); | |||
| return Proc(QUERY_FEE,"getParkingPaymentInfo", vp.getString("appId"), vp.getString("appSercet"), Integer.parseInt(wxPark.getParkingId()),vp.getString("version"),param); | |||
| return Proc(vp.getString("uri")+QUERY_FEE,"getParkingPaymentInfo", vp.getString("appId"), vp.getString("appSercet"), Integer.parseInt(wxPark.getParkingId()),vp.getString("version"),param); | |||
| } | |||
| /** | |||
| @@ -74,7 +74,9 @@ public class KeTuoUtil { | |||
| param.put("payMethod", 1010);//付款方式 | |||
| if (isDiscountMoney) { | |||
| param.put("freeMoney", discountValue);//减免总金额(单位 分) | |||
| param.put("freeTime", 0); | |||
| }else { | |||
| param.put("freeMoney", 0); | |||
| param.put("freeTime", discountValue*3600);//减免总时长(单位 秒) | |||
| } | |||
| param.put("isCarLeave", 0);//车辆是否离场 | |||
| @@ -94,7 +96,7 @@ public class KeTuoUtil { | |||
| freeDetails.add(freeDeail); | |||
| param.put("freeDetail", JSON.toJSONString(freeDetails));//json数组字符串 | |||
| log.info("ketuo executediscount :" + JSON.toJSONString(param)); | |||
| return Proc(PAY_FEE,"payParkingFee", vp.getString("appId"), vp.getString("appSercet"), Integer.parseInt(wxPark.getParkingId()),vp.getString("version"),param); | |||
| return Proc(vp.getString("uri")+PAY_FEE,"payParkingFee", vp.getString("appId"), vp.getString("appSercet"), Integer.parseInt(wxPark.getParkingId()),vp.getString("version"),param); | |||
| } | |||
| private static String Proc(String url, String serviceCode,String appId,String appSercet,Integer parkId,String version, JSONObject params) { | |||
| @@ -111,8 +113,8 @@ public class KeTuoUtil { | |||
| params.put("parkId", parkId); | |||
| params.put("serviceCode", serviceCode); | |||
| params.put("ts", String.valueOf(Calendar.getInstance().getTimeInMillis())); | |||
| params.put("key", paramsSign(params, appSercet)); | |||
| params.put("reqId", Utility.generate32UUID()+String.valueOf(Calendar.getInstance().getTimeInMillis())); | |||
| params.put("key", paramsSign(params, appSercet)); | |||
| httpPost.setEntity(new StringEntity(JSONObject.toJSONString(params),ContentType.create("application/json","utf-8"))); | |||
| } catch (Exception e) { | |||
| log.error(e.getLocalizedMessage(),e); | |||
| @@ -169,6 +171,7 @@ public class KeTuoUtil { | |||
| }); | |||
| //拼接appSecret | |||
| String temp = Joiner.on("&").withKeyValueSeparator("=").join(params).concat("&").concat(appSecret); | |||
| log.info(">>> signUrl="+temp); | |||
| return md5(temp).toUpperCase(); | |||
| } | |||
| @@ -229,4 +229,113 @@ | |||
| and is_refund = 1 | |||
| </select> | |||
| <select id="aliPayList" parameterType="com.iformall.domain.po.AliBusinessCircleOrder" resultType="com.iformall.domain.vo.AlipayOrWxStatistics"> | |||
| SELECT merchant_id as 'merchantId', | |||
| IFNULL(SUM(`pay_amount`),0) as 'payAmount', | |||
| IFNULL(SUM(`increased_points`),0) as 'payPoints' | |||
| FROM ali_business_circle_order | |||
| where is_refund = 0 | |||
| <if test=" null != tenantId and '' != tenantId"> | |||
| and `tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||
| and `parent_tenant_id` = #{parentTenantId} | |||
| </if> | |||
| <if test=" null != startTime "> | |||
| and `time_end` >= #{startTime} | |||
| </if> | |||
| <if test=" null != endTime"> | |||
| and `time_end` < #{endTime} | |||
| </if> | |||
| <if test=" null != merchantIds and merchantIds.size > 0 "> | |||
| and merchant_id in | |||
| <foreach collection="merchantIds" index="index" item="id" open="(" separator="," close=")"> | |||
| #{id} | |||
| </foreach> | |||
| </if> | |||
| GROUP BY merchant_id | |||
| order by payAmount desc | |||
| </select> | |||
| <select id="aliRefundList" parameterType="com.iformall.domain.po.AliBusinessCircleOrder" resultType="com.iformall.domain.vo.AlipayOrWxStatistics"> | |||
| SELECT merchant_id as 'merchantId', | |||
| IFNULL(SUM(`refund_amount`),0) as 'refundAmount', | |||
| IFNULL(SUM(`increased_points`),0) as 'refundPoints' | |||
| FROM ali_business_circle_order | |||
| where is_refund = 1 | |||
| <if test=" null != tenantId and '' != tenantId"> | |||
| and `tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||
| and `parent_tenant_id` = #{parentTenantId} | |||
| </if> | |||
| <if test=" null != startTime "> | |||
| and `time_end` >= #{startTime} | |||
| </if> | |||
| <if test=" null != endTime"> | |||
| and `time_end` < #{endTime} | |||
| </if> | |||
| <if test=" null != merchantIds and merchantIds.size > 0 "> | |||
| and merchant_id in | |||
| <foreach collection="merchantIds" index="index" item="id" open="(" separator="," close=")"> | |||
| #{id} | |||
| </foreach> | |||
| </if> | |||
| GROUP BY merchant_id | |||
| </select> | |||
| <select id="aliPayStatistics" parameterType="com.iformall.domain.po.AliBusinessCircleOrder" resultType="com.iformall.domain.vo.AlipayOrWxStatistics"> | |||
| SELECT | |||
| IFNULL(SUM(`pay_amount`),0) as 'payAmount', | |||
| IFNULL(SUM(`increased_points`),0) as 'payPoints' | |||
| FROM ali_business_circle_order | |||
| where is_refund = 0 | |||
| <if test=" null != tenantId and '' != tenantId"> | |||
| and `tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||
| and `parent_tenant_id` = #{parentTenantId} | |||
| </if> | |||
| <if test=" null != startTime "> | |||
| and `time_end` >= #{startTime} | |||
| </if> | |||
| <if test=" null != endTime"> | |||
| and `time_end` < #{endTime} | |||
| </if> | |||
| <if test=" null != merchantIds and merchantIds.size > 0 "> | |||
| and merchant_id in | |||
| <foreach collection="merchantIds" index="index" item="id" open="(" separator="," close=")"> | |||
| #{id} | |||
| </foreach> | |||
| </if> | |||
| </select> | |||
| <select id="aliRefundStatistics" parameterType="com.iformall.domain.po.AliBusinessCircleOrder" resultType="com.iformall.domain.vo.AlipayOrWxStatistics"> | |||
| SELECT | |||
| IFNULL(SUM(`refund_amount`),0) as 'refundAmount', | |||
| IFNULL(SUM(`increased_points`),0) as 'refundPoints' | |||
| FROM ali_business_circle_order | |||
| where is_refund = 1 | |||
| <if test=" null != tenantId and '' != tenantId"> | |||
| and `tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||
| and `parent_tenant_id` = #{parentTenantId} | |||
| </if> | |||
| <if test=" null != startTime "> | |||
| and `time_end` >= #{startTime} | |||
| </if> | |||
| <if test=" null != endTime"> | |||
| and `time_end` < #{endTime} | |||
| </if> | |||
| <if test=" null != merchantIds and merchantIds.size > 0 "> | |||
| and merchant_id in | |||
| <foreach collection="merchantIds" index="index" item="id" open="(" separator="," close=")"> | |||
| #{id} | |||
| </foreach> | |||
| </if> | |||
| </select> | |||
| </mapper> | |||
| @@ -261,4 +261,111 @@ | |||
| and is_refund = 1 | |||
| </select> | |||
| </mapper> | |||
| <select id="wxPayList" parameterType="com.iformall.domain.po.WxBusinessCircleOrder" resultType="com.iformall.domain.vo.AlipayOrWxStatistics"> | |||
| SELECT merchant_id as 'merchantId', | |||
| IFNULL(SUM(`pay_amount`),0) as 'payAmount', | |||
| IFNULL(SUM(`increased_points`),0) as 'payPoints' | |||
| FROM wx_business_circle_order | |||
| where is_refund = 0 | |||
| <if test=" null != tenantId and '' != tenantId"> | |||
| and `tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||
| and `parent_tenant_id` = #{parentTenantId} | |||
| </if> | |||
| <if test=" null != startTime "> | |||
| and `time_end` >= #{startTime} | |||
| </if> | |||
| <if test=" null != endTime"> | |||
| and `time_end` < #{endTime} | |||
| </if> | |||
| <if test=" null != merchantIds and merchantIds.size > 0 "> | |||
| and merchant_id in | |||
| <foreach collection="merchantIds" index="index" item="id" open="(" separator="," close=")"> | |||
| #{id} | |||
| </foreach> | |||
| </if> | |||
| GROUP BY merchant_id | |||
| order by payAmount desc | |||
| </select> | |||
| <select id="wxRefundList" parameterType="com.iformall.domain.po.WxBusinessCircleOrder" resultType="com.iformall.domain.vo.AlipayOrWxStatistics"> | |||
| SELECT merchant_id as 'merchantId', | |||
| IFNULL(SUM(`refund_amount`),0) as 'refundAmount', | |||
| IFNULL(SUM(`increased_points`),0) as 'refundPoints' | |||
| FROM wx_business_circle_order | |||
| where is_refund = 1 | |||
| <if test=" null != tenantId and '' != tenantId"> | |||
| and `tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||
| and `parent_tenant_id` = #{parentTenantId} | |||
| </if> | |||
| <if test=" null != startTime "> | |||
| and `time_end` >= #{startTime} | |||
| </if> | |||
| <if test=" null != endTime"> | |||
| and `time_end` < #{endTime} | |||
| </if> | |||
| <if test=" null != merchantIds and merchantIds.size > 0 "> | |||
| and merchant_id in | |||
| <foreach collection="merchantIds" index="index" item="id" open="(" separator="," close=")"> | |||
| #{id} | |||
| </foreach> | |||
| </if> | |||
| GROUP BY merchant_id | |||
| </select> | |||
| <select id="wxPayStatistics" parameterType="com.iformall.domain.po.WxBusinessCircleOrder" resultType="com.iformall.domain.vo.AlipayOrWxStatistics"> | |||
| SELECT | |||
| IFNULL(SUM(`pay_amount`),0) as 'payAmount', | |||
| IFNULL(SUM(`increased_points`),0) as 'payPoints' | |||
| FROM wx_business_circle_order | |||
| where is_refund = 0 | |||
| <if test=" null != tenantId and '' != tenantId"> | |||
| and `tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||
| and `parent_tenant_id` = #{parentTenantId} | |||
| </if> | |||
| <if test=" null != startTime "> | |||
| and `time_end` >= #{startTime} | |||
| </if> | |||
| <if test=" null != endTime"> | |||
| and `time_end` < #{endTime} | |||
| </if> | |||
| <if test=" null != merchantIds and merchantIds.size > 0 "> | |||
| and merchant_id in | |||
| <foreach collection="merchantIds" index="index" item="id" open="(" separator="," close=")"> | |||
| #{id} | |||
| </foreach> | |||
| </if> | |||
| </select> | |||
| <select id="wxRefundStatistics" parameterType="com.iformall.domain.po.WxBusinessCircleOrder" resultType="com.iformall.domain.vo.AlipayOrWxStatistics"> | |||
| SELECT | |||
| IFNULL(SUM(`refund_amount`),0) as 'refundAmount', | |||
| IFNULL(SUM(`increased_points`),0) as 'refundPoints' | |||
| FROM wx_business_circle_order | |||
| where is_refund = 1 | |||
| <if test=" null != tenantId and '' != tenantId"> | |||
| and `tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||
| and `parent_tenant_id` = #{parentTenantId} | |||
| </if> | |||
| <if test=" null != startTime "> | |||
| and `time_end` >= #{startTime} | |||
| </if> | |||
| <if test=" null != endTime"> | |||
| and `time_end` < #{endTime} | |||
| </if> | |||
| <if test=" null != merchantIds and merchantIds.size > 0 "> | |||
| and merchant_id in | |||
| <foreach collection="merchantIds" index="index" item="id" open="(" separator="," close=")"> | |||
| #{id} | |||
| </foreach> | |||
| </if> | |||
| </select> | |||
| </mapper> | |||