From 5433d76ee8145e312ce8da321f210a2d0cb2f77e Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Fri, 8 Apr 2022 16:43:31 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B7=B2=E7=9F=A5?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/cweb/controller/HighUserController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighUserController.java b/hai-cweb/src/main/java/com/cweb/controller/HighUserController.java index 0acbf60b..894b50b2 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighUserController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighUserController.java @@ -97,7 +97,7 @@ public class HighUserController { HighUser detailData = highUserService.getDetailDataByUser(highUser.getId()); detailData.setPassword(null); highUserModel.setHighUser(detailData); - SessionObject so = new SessionObject(detailData.getUnionId(), 1 , highUserModel); + SessionObject so = new SessionObject(detailData.getPhone(), 1 , highUserModel); return ResponseMsgUtil.success(so); } catch (Exception e) { @@ -154,7 +154,7 @@ public class HighUserController { HighUser detailData = highUserService.getDetailDataByUser(userInfoModel.getHighUser().getId()); detailData.setPassword(null); highUserModel.setHighUser(detailData); - SessionObject so = new SessionObject(detailData.getUnionId(), 1 , highUserModel); + SessionObject so = new SessionObject(detailData.getPhone(), 1 , highUserModel); return ResponseMsgUtil.success(so); } catch (Exception e) { From 1b485010753d516d94ad7b7d78a204a33141f6e1 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Mon, 11 Apr 2022 15:50:42 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HighTyAgentOilStationController.java | 48 +++++++++++++++---- .../dao/HighTyAgentOilStationMapperExt.java | 18 +++---- .../main/java/com/hai/model/TyOrderModel.java | 18 +++++++ 3 files changed, 67 insertions(+), 17 deletions(-) diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighTyAgentOilStationController.java b/hai-bweb/src/main/java/com/bweb/controller/HighTyAgentOilStationController.java index 4fcb8163..d2c02ac7 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighTyAgentOilStationController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighTyAgentOilStationController.java @@ -1,6 +1,7 @@ package com.bweb.controller; import com.alibaba.excel.EasyExcel; +import com.alibaba.excel.util.DateUtils; import com.alibaba.fastjson.JSONObject; import com.bweb.config.SysConst; import com.github.pagehelper.PageHelper; @@ -9,6 +10,7 @@ import com.hai.common.exception.ErrorCode; import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.SysCode; import com.hai.common.security.UserCenter; +import com.hai.common.utils.DateUtil; import com.hai.common.utils.ResponseMsgUtil; import com.hai.entity.HighTySalesman; import com.hai.enum_type.UserObjectTypeEnum; @@ -20,6 +22,7 @@ import com.hai.service.HighTyAgentOilStationService; import com.hai.service.HighTySalesmanService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import org.apache.commons.collections4.MapUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Controller; @@ -27,10 +30,7 @@ import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import java.io.File; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; @Controller @RequestMapping(value = "/tyAgentOilStation") @@ -334,6 +334,9 @@ public class HighTyAgentOilStationController { @RequestParam(name = "salesmanName", required = false) String salesmanName, @RequestParam(name = "agentName", required = false) String agentName, @RequestParam(name = "orgName", required = false) String orgName, + @RequestParam(name = "memPhone", required = false) String memPhone, + @RequestParam(name = "payTimeS", required = false) Long payTimeS, + @RequestParam(name = "payTimeE", required = false) Long payTimeE, @RequestParam(name = "pageNum", required = true) Integer pageNum, @RequestParam(name = "pageSize", required = true) Integer pageSize) { try { @@ -344,6 +347,14 @@ public class HighTyAgentOilStationController { Map param = new HashMap<>(); param.put("orderNo", orderNo); param.put("goodsName", goodsName); + param.put("memPhone", memPhone); + if (payTimeS != null) { + param.put("payTimeS", DateUtil.format(new Date(payTimeS), "yyyy-MM-dd HH:mm:ss")); + } + + if (payTimeE != null) { + param.put("payTimeE", DateUtil.format(new Date(payTimeE), "yyyy-MM-dd HH:mm:ss")); + } if (userModel.getBsCompany() != null && userModel.getSecUser().getAdminFlag().equals(1)) { param.put("companyId", userModel.getBsCompany().getId()); @@ -378,10 +389,13 @@ public class HighTyAgentOilStationController { @ResponseBody @ApiOperation(value = "导出订单") public ResponseData excelOrder(@RequestParam(name = "orderNo", required = false) String orderNo, - @RequestParam(name = "goodsName", required = false) String goodsName, - @RequestParam(name = "salesmanName", required = false) String salesmanName, - @RequestParam(name = "agentName", required = false) String agentName, - @RequestParam(name = "orgName", required = false) String orgName) { + @RequestParam(name = "goodsName", required = false) String goodsName, + @RequestParam(name = "salesmanName", required = false) String salesmanName, + @RequestParam(name = "memPhone", required = false) String memPhone, + @RequestParam(name = "payTimeS", required = false) Long payTimeS, + @RequestParam(name = "payTimeE", required = false) Long payTimeE, + @RequestParam(name = "agentName", required = false) String agentName, + @RequestParam(name = "orgName", required = false) String orgName) { try { UserInfoModel userModel = userCenter.getSessionModel(UserInfoModel.class); if (userModel == null) { @@ -390,6 +404,14 @@ public class HighTyAgentOilStationController { Map param = new HashMap<>(); param.put("orderNo", orderNo); param.put("goodsName", goodsName); + param.put("memPhone", memPhone); + if (payTimeS != null) { + param.put("payTimeS", DateUtil.format(new Date(payTimeS), "yyyy-MM-dd HH:mm:ss")); + } + + if (payTimeE != null) { + param.put("payTimeE", DateUtil.format(new Date(payTimeE), "yyyy-MM-dd HH:mm:ss")); + } if (userModel.getBsCompany() != null && userModel.getSecUser().getAdminFlag().equals(1)) { param.put("companyId", userModel.getBsCompany().getId()); @@ -423,8 +445,12 @@ public class HighTyAgentOilStationController { if (userModel.getBsCompany() != null || userModel.getSecUser().getObjectType().equals(UserObjectTypeEnum.type6.getType())) { headList.add("业务员"); } + if (userModel.getBsCompany() != null && userModel.getSecUser().getAdminFlag().equals(1)) { + headList.add("用户手机号"); + } headList.add("加油站"); - headList.add("订单号"); + headList.add("平台订单号"); + headList.add("团油订单号"); headList.add("支付类型"); headList.add("加油金额"); headList.add("优惠金额"); @@ -450,8 +476,12 @@ public class HighTyAgentOilStationController { if (userModel.getBsCompany() != null || userModel.getSecUser().getObjectType().equals(UserObjectTypeEnum.type6.getType())) { data.add(orderModel.getSalesmanName()); } + if (userModel.getBsCompany() != null && userModel.getSecUser().getAdminFlag().equals(1)) { + data.add(orderModel.getMemPhone()); + } data.add(orderModel.getGoodsName()); data.add(orderModel.getOrderNo()); + data.add(orderModel.getGasOrderNo()); data.add(orderModel.getPayType()); data.add(orderModel.getTotalPrice()); data.add(orderModel.getDeductionPrice()); diff --git a/hai-service/src/main/java/com/hai/dao/HighTyAgentOilStationMapperExt.java b/hai-service/src/main/java/com/hai/dao/HighTyAgentOilStationMapperExt.java index 8092689f..bff5f790 100644 --- a/hai-service/src/main/java/com/hai/dao/HighTyAgentOilStationMapperExt.java +++ b/hai-service/src/main/java/com/hai/dao/HighTyAgentOilStationMapperExt.java @@ -54,7 +54,9 @@ public interface HighTyAgentOilStationMapperExt { @Select("