| @@ -140,9 +140,9 @@ public class WxInfoController extends BaseController { | |||||
| session_key = session.getSessionKey(); | session_key = session.getSessionKey(); | ||||
| openId = session.getOpenid(); | openId = session.getOpenid(); | ||||
| unionId = session.getUnionid(); | unionId = session.getUnionid(); | ||||
| if (StringUtils.isNotBlank(unionId)) { | |||||
| boolHaveUnionId = true; | |||||
| } | |||||
| //if (StringUtils.isNotBlank(unionId)) { | |||||
| // boolHaveUnionId = true; | |||||
| //} | |||||
| resultMap.put("openId", openId); | resultMap.put("openId", openId); | ||||
| resultMap.put("session_key", session_key); | resultMap.put("session_key", session_key); | ||||
| } catch (WxErrorException e) { | } catch (WxErrorException e) { | ||||
| @@ -55,7 +55,7 @@ public class WxMerchantController extends BaseController { | |||||
| public ResultData addAccount(@RequestBody WxMerchant wxMerchant) { | public ResultData addAccount(@RequestBody WxMerchant wxMerchant) { | ||||
| log.debug("[" + getIpAddr() + "] merchantProfitSharingReceiver::addAccount"); | log.debug("[" + getIpAddr() + "] merchantProfitSharingReceiver::addAccount"); | ||||
| if (!hasPermission()) { | if (!hasPermission()) { | ||||
| return new ResultData(ErrorCode.USER_NO_PERMISSION); | |||||
| return new ResultData(ErrorCode.USER_NO_PERMISSION.getCode(),"当前微信绑定的手机号不是商户的联系方式手机号,不能操作"); | |||||
| } | } | ||||
| if (wxMerchant.getId() == null) { | if (wxMerchant.getId() == null) { | ||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "商户ID不能为空"); | return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "商户ID不能为空"); | ||||
| @@ -82,7 +82,7 @@ public class WxMerchantController extends BaseController { | |||||
| public ResultData deleteByReceiverId(@ModelAttribute WxProfitSharingReceiver receiver) { | public ResultData deleteByReceiverId(@ModelAttribute WxProfitSharingReceiver receiver) { | ||||
| log.debug("[" + getIpAddr() + "] WxMerchantController::deleteByReceiverId"); | log.debug("[" + getIpAddr() + "] WxMerchantController::deleteByReceiverId"); | ||||
| if (!hasPermission()) { | if (!hasPermission()) { | ||||
| return new ResultData(ErrorCode.USER_NO_PERMISSION); | |||||
| return new ResultData(ErrorCode.USER_NO_PERMISSION.getCode(),"当前微信绑定的手机号不是商户的联系方式手机号,不能操作"); | |||||
| } | } | ||||
| if (receiver.getId() == null) { | if (receiver.getId() == null) { | ||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "商户分账账户ID不能为空"); | return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "商户分账账户ID不能为空"); | ||||
| @@ -110,6 +110,9 @@ public class TenantInfoImpl implements TenantInfo { | |||||
| if ("wx_msg_validationcode_model".equals(tableName)) { | if ("wx_msg_validationcode_model".equals(tableName)) { | ||||
| return true; | return true; | ||||
| } | } | ||||
| if ("wx_component_verify_ticket".equals(tableName)) { | |||||
| return true; | |||||
| } | |||||
| // wx_profit_sharing_receiver | // wx_profit_sharing_receiver | ||||
| // wx_profit_sharing_result | // wx_profit_sharing_result | ||||
| return false; | return false; | ||||
| @@ -177,6 +180,9 @@ public class TenantInfoImpl implements TenantInfo { | |||||
| if ("mem_coupon_from_dsp".equals(tableName)) { | if ("mem_coupon_from_dsp".equals(tableName)) { | ||||
| return true; | return true; | ||||
| } | } | ||||
| if ("wx_component_verify_ticket".equals(tableName)) { | |||||
| return true; | |||||
| } | |||||
| return false; | return false; | ||||
| } | } | ||||
| @@ -36,7 +36,7 @@ public class WxLiveController extends BaseController { | |||||
| resultData.data = wxMaService.getLiveService().getLiveInfo(start,limit); | resultData.data = wxMaService.getLiveService().getLiveInfo(start,limit); | ||||
| } catch (WxErrorException e) { | } catch (WxErrorException e) { | ||||
| logger.error("getLiveinfos error", e); | logger.error("getLiveinfos error", e); | ||||
| throw new MallinkException(ErrorCode.SYS_SERVER_ERROR); | |||||
| throw new MallinkException(ErrorCode.SYS_SERVER_ERROR.getCode(),"["+appId+"]getLiveinfos error"); | |||||
| } | } | ||||
| return resultData; | return resultData; | ||||
| } | } | ||||
| @@ -110,6 +110,9 @@ public class TenantInfoImpl implements TenantInfo { | |||||
| if ("wx_msg_validationcode_model".equals(tableName)) { | if ("wx_msg_validationcode_model".equals(tableName)) { | ||||
| return true; | return true; | ||||
| } | } | ||||
| if ("wx_component_verify_ticket".equals(tableName)) { | |||||
| return true; | |||||
| } | |||||
| // wx_profit_sharing_receiver | // wx_profit_sharing_receiver | ||||
| // wx_profit_sharing_result | // wx_profit_sharing_result | ||||
| return false; | return false; | ||||
| @@ -183,6 +186,9 @@ public class TenantInfoImpl implements TenantInfo { | |||||
| if ("mem_coupon_from_dsp".equals(tableName)) { | if ("mem_coupon_from_dsp".equals(tableName)) { | ||||
| return true; | return true; | ||||
| } | } | ||||
| if ("wx_component_verify_ticket".equals(tableName)) { | |||||
| return true; | |||||
| } | |||||
| return false; | return false; | ||||
| } | } | ||||
| @@ -693,7 +693,7 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { | |||||
| try { | try { | ||||
| return wxCouponSendService.sendCouponToUser(EnumCouponSendSendType.COUPON_VERIFY, wxOrder,EnumPayWay.PAY_WAY_NOT_UNPAY_VERRIFY); | return wxCouponSendService.sendCouponToUser(EnumCouponSendSendType.COUPON_VERIFY, wxOrder,EnumPayWay.PAY_WAY_NOT_UNPAY_VERRIFY); | ||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| logger.error("核销发券: " + e.getMessage()); | |||||
| logger.error("核销发券: " + e.getMessage(),e); | |||||
| } | } | ||||
| } | } | ||||
| return false; | return false; | ||||
| @@ -1,5 +1,6 @@ | |||||
| package com.iformall.service.park.impl.etcp; | package com.iformall.service.park.impl.etcp; | ||||
| import java.util.ArrayList; | |||||
| import java.util.Date; | import java.util.Date; | ||||
| import java.util.List; | import java.util.List; | ||||
| import java.util.Map; | import java.util.Map; | ||||
| @@ -136,29 +137,33 @@ public class EtcpHelper { | |||||
| WxCUserCar queryUserCar = new WxCUserCar(); | WxCUserCar queryUserCar = new WxCUserCar(); | ||||
| queryUserCar.setCUserId(cUserId); | queryUserCar.setCUserId(cUserId); | ||||
| List<WxCUserCar> uclist = wxCUserCarService.getList(queryUserCar); | List<WxCUserCar> uclist = wxCUserCarService.getList(queryUserCar); | ||||
| // 删除ETCP不存在 | |||||
| for (WxCUserCar userCar : uclist) { | |||||
| boolean bExist = isExistInArray(arr, userCar.getCarNumber()); | |||||
| if (!bExist) { | |||||
| wxCUserCarService.deleteById(userCar.getId()); | |||||
| uclist.remove(userCar); | |||||
| } | |||||
| } | |||||
| // 添加ETCP的 | |||||
| for (int i = 0; i < arr.size(); i++) { | |||||
| String _carNum = arr.getString(i); | |||||
| boolean bExist = isExistInList(uclist, _carNum); | |||||
| if (!bExist) { | |||||
| Date curr = new Date(); | |||||
| WxCUserCar userCar = new WxCUserCar(); | |||||
| userCar.setCUserId(cUserId); | |||||
| userCar.updateTenantInfo(tenantEntity); | |||||
| userCar.setCarNumber(_carNum); | |||||
| userCar.setVendorType(EnumCarVendor.CAR_ETCP.getCode()); | |||||
| userCar.setCreateDate(curr); | |||||
| userCar.setUpdateDate(curr); | |||||
| wxCUserCarService.saveOrUpdate(userCar); | |||||
| } | |||||
| if(null != uclist ) { | |||||
| List<WxCUserCar> ucclist = new ArrayList<WxCUserCar>(); | |||||
| ucclist.addAll(uclist); | |||||
| // 删除ETCP不存在 | |||||
| for (WxCUserCar userCar : uclist) { | |||||
| boolean bExist = isExistInArray(arr, userCar.getCarNumber()); | |||||
| if (!bExist) { | |||||
| wxCUserCarService.deleteById(userCar.getId()); | |||||
| ucclist.remove(userCar); | |||||
| } | |||||
| } | |||||
| // 添加ETCP的 | |||||
| for (int i = 0; i < arr.size(); i++) { | |||||
| String _carNum = arr.getString(i); | |||||
| boolean bExist = isExistInList(ucclist, _carNum); | |||||
| if (!bExist) { | |||||
| Date curr = new Date(); | |||||
| WxCUserCar userCar = new WxCUserCar(); | |||||
| userCar.setCUserId(cUserId); | |||||
| userCar.updateTenantInfo(tenantEntity); | |||||
| userCar.setCarNumber(_carNum); | |||||
| userCar.setVendorType(EnumCarVendor.CAR_ETCP.getCode()); | |||||
| userCar.setCreateDate(curr); | |||||
| userCar.setUpdateDate(curr); | |||||
| wxCUserCarService.saveOrUpdate(userCar); | |||||
| } | |||||
| } | |||||
| } | } | ||||
| return dataObj1; | return dataObj1; | ||||
| } | } | ||||