| @@ -4,6 +4,7 @@ import com.github.pagehelper.PageInfo; | |||||
| import com.iformall.annotation.SystemControllerLog; | import com.iformall.annotation.SystemControllerLog; | ||||
| import com.iformall.annotation.TenantIgnore; | import com.iformall.annotation.TenantIgnore; | ||||
| import com.iformall.common.ErrorCode; | import com.iformall.common.ErrorCode; | ||||
| import com.iformall.common.Result; | |||||
| 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.WxAppinfo; | import com.iformall.domain.po.WxAppinfo; | ||||
| @@ -29,6 +30,9 @@ import org.springframework.web.bind.annotation.*; | |||||
| import javax.servlet.http.HttpServletRequest; | import javax.servlet.http.HttpServletRequest; | ||||
| import javax.servlet.http.HttpServletResponse; | import javax.servlet.http.HttpServletResponse; | ||||
| import java.io.IOException; | |||||
| import java.io.PrintWriter; | |||||
| import java.util.Map; | import java.util.Map; | ||||
| @RestController | @RestController | ||||
| @@ -59,6 +63,11 @@ public class WxCouponOrderController extends BaseController { | |||||
| wxCouponOrder.getMerchantName().isEmpty()) { | wxCouponOrder.getMerchantName().isEmpty()) { | ||||
| wxCouponOrder.setMerchantName(null); | wxCouponOrder.setMerchantName(null); | ||||
| } | } | ||||
| if (null == wxCouponOrder.getStartDate() && null == wxCouponOrder.getEndDate() | |||||
| && null == wxCouponOrder.getVerifyStartDate() && null == wxCouponOrder.getVerifyEndDate()) { | |||||
| return new ResultData(Result.ERROR,"交易时间和核销时间请至少选择一个"); | |||||
| } | |||||
| return wxCouponOrderService.listAdminAsPage(wxCouponOrder, pageNum, pageSize); | return wxCouponOrderService.listAdminAsPage(wxCouponOrder, pageNum, pageSize); | ||||
| } | } | ||||
| @@ -142,6 +151,18 @@ public class WxCouponOrderController extends BaseController { | |||||
| wxCouponOrder.getMerchantName().isEmpty()) { | wxCouponOrder.getMerchantName().isEmpty()) { | ||||
| wxCouponOrder.setMerchantName(null); | wxCouponOrder.setMerchantName(null); | ||||
| } | } | ||||
| if (null == wxCouponOrder.getStartDate() && null == wxCouponOrder.getEndDate() | |||||
| && null == wxCouponOrder.getVerifyStartDate() && null == wxCouponOrder.getVerifyEndDate()) { | |||||
| PrintWriter out; | |||||
| try { | |||||
| response.setContentType("text/html;charset=utf-8"); | |||||
| out = response.getWriter(); | |||||
| out.print("<div><font color = \"red\">交易时间和核销时间请至少选择一个</font></div>"); | |||||
| out.close(); | |||||
| } catch (IOException e) { | |||||
| logger.error(" alipayCallback writeResponse error.",e); | |||||
| } | |||||
| } | |||||
| wxCouponOrderService.exportData(false,wxCouponOrder, request, response); | wxCouponOrderService.exportData(false,wxCouponOrder, request, response); | ||||
| } | } | ||||
| @@ -38,7 +38,7 @@ import java.util.Map; | |||||
| */ | */ | ||||
| @RestController | @RestController | ||||
| @RequestMapping("wxProfitPayment") | @RequestMapping("wxProfitPayment") | ||||
| public class WxProfitPaymentControllerController extends BaseController { | |||||
| public class WxProfitPaymentController extends BaseController { | |||||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | private final Logger logger = LoggerFactory.getLogger(this.getClass()); | ||||
| @Autowired | @Autowired | ||||
| @@ -19,7 +19,8 @@ CREATE TABLE `wx_car_pay_order` ( | |||||
| `car_vendor` int(1) NOT NULL COMMENT '车场类型EnumCarVendor', | `car_vendor` int(1) NOT NULL COMMENT '车场类型EnumCarVendor', | ||||
| PRIMARY KEY (`id`), | PRIMARY KEY (`id`), | ||||
| UNIQUE KEY `id_UNIQUE` (`id`), | UNIQUE KEY `id_UNIQUE` (`id`), | ||||
| UNIQUE KEY `pay_order_no` (`park_order_no`) | |||||
| UNIQUE KEY `pay_order_no` (`park_order_no`), | |||||
| index KEY `c_user_id`(`c_user_id`) | |||||
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='支付单表'; | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='支付单表'; | ||||
| CREATE TABLE wx_car_pay_order_0 LIKE wx_car_pay_order; | CREATE TABLE wx_car_pay_order_0 LIKE wx_car_pay_order; | ||||
| @@ -1,6 +1,6 @@ | |||||
| ALTER TABLE `mallink`.`tt_goods_category` | ALTER TABLE `mallink`.`tt_goods_category` | ||||
| MODIFY COLUMN `service_fee` int(11) DEFAULT NULL COMMENT ''抖音软件服务费率(万分之)'' AFTER `is_leaf`, | |||||
| ADD COLUMN `software_fee` int(11) COMMENT ''软件服务费率(万分位)'' AFTER `service_fee`; | |||||
| MODIFY COLUMN `service_fee` int(11) DEFAULT NULL COMMENT '抖音软件服务费率(万分之)' AFTER `is_leaf`, | |||||
| ADD COLUMN `software_fee` int(11) COMMENT '软件服务费率(万分位)' AFTER `service_fee`; | |||||
| DROP TABLE IF EXISTS `tt_mall_goods_category`; | DROP TABLE IF EXISTS `tt_mall_goods_category`; | ||||
| CREATE TABLE `tt_mall_goods_category` ( | CREATE TABLE `tt_mall_goods_category` ( | ||||
| @@ -286,7 +286,7 @@ public class WxCouponController extends BaseController { | |||||
| sb.append(coupon.getRemainInventory()); | sb.append(coupon.getRemainInventory()); | ||||
| } | } | ||||
| sb.append(",\"inventory\":").append(coupon.getInventory()).append(",\"price\":").append(coupon.getPrice()).append(",\"creditPrice\":").append(coupon.getCreditPrice()); | sb.append(",\"inventory\":").append(coupon.getInventory()).append(",\"price\":").append(coupon.getPrice()).append(",\"creditPrice\":").append(coupon.getCreditPrice()); | ||||
| if (null != config && config.getConfigItemValue().equals("1")) { | |||||
| if (null != config && "1".equals(config.getConfigItemValue())) { | |||||
| sb.append(",\"selledCount\":").append(coupon.getInventory()-coupon.getRemainInventory()); | sb.append(",\"selledCount\":").append(coupon.getInventory()-coupon.getRemainInventory()); | ||||
| } | } | ||||
| sb.append("}"); | sb.append("}"); | ||||
| @@ -86,7 +86,7 @@ public class CarPaidNotifySchedule { | |||||
| WxCarPayOrder _po = orderList.get(i); | WxCarPayOrder _po = orderList.get(i); | ||||
| //通知车场支付成功 | //通知车场支付成功 | ||||
| try { | try { | ||||
| String payOrderNo = ParkCreatePayOrder.getUniqueParkOrderNumber(_po.getParkOrderNo(), EnumCarVendor.getEnum(_po.getCarVendor())); | |||||
| //String payOrderNo = ParkCreatePayOrder.getUniqueParkOrderNumber(_po.getParkOrderNo(), EnumCarVendor.getEnum(_po.getCarVendor())); | |||||
| parkFactory.getParkService(_po.getCarVendor()).notifyPaid(wxPark,new ParkNotifyPaid(_po.getTenantId(),_po.getParkOrderNo(), _po.getPayAmount(), _po.getPayTime())); | parkFactory.getParkService(_po.getCarVendor()).notifyPaid(wxPark,new ParkNotifyPaid(_po.getTenantId(),_po.getParkOrderNo(), _po.getPayAmount(), _po.getPayTime())); | ||||
| payOrder.setParkNotify(EnumYesOrNo.YES.getCode()); | payOrder.setParkNotify(EnumYesOrNo.YES.getCode()); | ||||
| payOrder.setUpdateTime(new Date()); | payOrder.setUpdateTime(new Date()); | ||||
| @@ -95,7 +95,7 @@ public class WxCampaign extends TenantEntity { | |||||
| if(type.equals(EnumCampaignType.PAGEPATH.getCode())) { | if(type.equals(EnumCampaignType.PAGEPATH.getCode())) { | ||||
| return pagePath; | return pagePath; | ||||
| } | } | ||||
| return Constant.mainPageUrl + "?type=bd&bt="+type+"&id="+id; | |||||
| return Constant.mainPageUrl + "?type=bd&bt="+type+"&id="+id+"&tenantId="+tenantId; | |||||
| } | } | ||||
| public String getWeappScene() { | public String getWeappScene() { | ||||
| @@ -104,7 +104,7 @@ public class WxCampaign extends TenantEntity { | |||||
| if(type.equals(EnumCampaignType.PAGEPATH.getCode())) { | if(type.equals(EnumCampaignType.PAGEPATH.getCode())) { | ||||
| return pageScene; | return pageScene; | ||||
| } | } | ||||
| return "t:bd:" + type + ":" +id; | |||||
| return "t:bd:" + type + ":" + id + ":" + tenantId; | |||||
| } | } | ||||
| } | } | ||||
| @@ -1241,17 +1241,22 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { | |||||
| private void handleWxCouponOrderBVoQueryParam(WxCouponOrderBVo wxCouponOrder) { | private void handleWxCouponOrderBVoQueryParam(WxCouponOrderBVo wxCouponOrder) { | ||||
| if(null == wxCouponOrder.getStartDate()) { | |||||
| wxCouponOrder.setStartDate(DateUtils.getFirstDayForCurrMonth()); | |||||
| // if(null == wxCouponOrder.getStartDate()) { | |||||
| // wxCouponOrder.setStartDate(DateUtils.getFirstDayForCurrMonth()); | |||||
| // } | |||||
| if (null != wxCouponOrder.getStartDate()) { | |||||
| wxCouponOrder.setStartDateTimes(wxCouponOrder.getStartDate().getTime()); | |||||
| wxCouponOrder.setStartDate(null); | |||||
| } | } | ||||
| wxCouponOrder.setStartDateTimes(wxCouponOrder.getStartDate().getTime()); | |||||
| wxCouponOrder.setStartDate(null); | |||||
| if(null == wxCouponOrder.getEndDate()) { | |||||
| wxCouponOrder.setEndDate(DateUtils.getLastDayForMonth(new Date())); | |||||
| // if(null == wxCouponOrder.getEndDate()) { | |||||
| // wxCouponOrder.setEndDate(DateUtils.getLastDayForMonth(new Date())); | |||||
| // } | |||||
| if (null != wxCouponOrder.getEndDate()) { | |||||
| wxCouponOrder.setEndDateTimes(wxCouponOrder.getEndDate().getTime()); | |||||
| wxCouponOrder.setEndDate(null); | |||||
| } | } | ||||
| wxCouponOrder.setEndDateTimes(wxCouponOrder.getEndDate().getTime()); | |||||
| wxCouponOrder.setEndDate(null); | |||||
| String cuserPhone = StringUtils.trimToNull(wxCouponOrder.getcuserPhone()); | String cuserPhone = StringUtils.trimToNull(wxCouponOrder.getcuserPhone()); | ||||
| if (null != cuserPhone) { | if (null != cuserPhone) { | ||||
| @@ -955,7 +955,12 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||||
| }else { | }else { | ||||
| //置空,删除此收款账号 | //置空,删除此收款账号 | ||||
| if (StringUtils.isBlank(wxMerchant.getAccount())){ | if (StringUtils.isBlank(wxMerchant.getAccount())){ | ||||
| return wxProfitPaymentReceiverService.deleteReceiver(receiver, receiver.getId()); | |||||
| ResultData data = wxProfitPaymentReceiverService.deleteReceiver(receiver, receiver.getId()); | |||||
| String key = Constant.paymentReceicerPrev + wxMerchant.getTenantId() | |||||
| + ":" + EnumAppPlat.WX.getCode() | |||||
| + ":" + wxMerchant.getId(); | |||||
| RedisCacheUtils.removeCache(redisTemplate, key); | |||||
| return data; | |||||
| } | } | ||||
| } | } | ||||
| StringBuffer psb = new StringBuffer("{\"").append(Constant.paymentReceiverParamIsv).append("\":").append(wxMerchant.getIsIsv()).append(""); | StringBuffer psb = new StringBuffer("{\"").append(Constant.paymentReceiverParamIsv).append("\":").append(wxMerchant.getIsIsv()).append(""); | ||||