| | |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.core.context.PageData; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.fee.FeeDto; |
| | | import com.java110.dto.ownerCarOpenUser.OwnerCarOpenUserDto; |
| | | import com.java110.dto.smallWeChat.SmallWeChatDto; |
| | | import com.java110.dto.owner.OwnerCarOpenUserDto; |
| | | import com.java110.dto.parking.ParkingAreaDto; |
| | | import com.java110.dto.wechat.SmallWeChatDto; |
| | | import com.java110.dto.fee.TempCarPayOrderDto; |
| | | import com.java110.intf.community.IParkingAreaV1InnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerCarOpenUserV1InnerServiceSMO; |
| | | import com.java110.po.ownerCarOpenUser.OwnerCarOpenUserPo; |
| | | import com.java110.utils.cache.CommonCache; |
| | | import com.java110.po.owner.OwnerCarOpenUserPo; |
| | | import com.java110.utils.cache.MappingCache; |
| | | import com.java110.utils.constant.CommonConstant; |
| | | import com.java110.utils.constant.WechatConstant; |
| | |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import com.java110.core.log.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.HttpStatus; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | import java.util.UUID; |
| | | import java.util.*; |
| | | |
| | | @Service("toPayTempCarFeeSMOImpl") |
| | | public class ToPayTempCarFeeSMOImpl extends AppAbstractComponentSMO implements IToPayTempCarFeeSMO { |
| | |
| | | return super.businessProcess(pd); |
| | | } |
| | | |
| | | @Autowired |
| | | private IParkingAreaV1InnerServiceSMO parkingAreaV1InnerServiceSMOImpl; |
| | | |
| | | |
| | | @Override |
| | | protected void validate(IPageData pd, JSONObject paramIn) { |
| | |
| | | Assert.jsonObjectHaveKey(paramIn, "openId", "请求报文中未包含openId节点"); |
| | | Assert.jsonObjectHaveKey(paramIn, "paId", "请求报文中未包含paId节点"); |
| | | Assert.jsonObjectHaveKey(paramIn, "inoutId", "请求报文中未包含inoutId节点"); |
| | | Assert.jsonObjectHaveKey(paramIn, "couponList", "请求报文中未包含couponList节点"); |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | ResponseEntity responseEntity = null; |
| | | |
| | | //根据paId 查询communityId |
| | | ParkingAreaDto parkingAreaDto = new ParkingAreaDto(); |
| | | parkingAreaDto.setPaId(paramIn.getString("paId")); |
| | | List<ParkingAreaDto> parkingAreaDtos = parkingAreaV1InnerServiceSMOImpl.queryParkingAreas(parkingAreaDto); |
| | | |
| | | Assert.listOnlyOne(parkingAreaDtos,"停车场不存在"); |
| | | paramIn.put("communityId",parkingAreaDtos.get(0).getCommunityId()); |
| | | SmallWeChatDto smallWeChatDto = getSmallWechat(pd, paramIn); |
| | | |
| | | if (smallWeChatDto == null) { //从配置文件中获取 小程序配置信息 |
| | |
| | | smallWeChatDto.setMchId(wechatAuthProperties.getMchId()); |
| | | smallWeChatDto.setPayPassword(wechatAuthProperties.getKey()); |
| | | } |
| | | |
| | | |
| | | JSONArray couponList = paramIn.getJSONArray("couponList"); |
| | | List<String> couponIds = new ArrayList<String>(); |
| | | if (couponList != null && couponList.size() > 0) { |
| | | for (int couponIndex = 0; couponIndex < couponList.size(); couponIndex++) { |
| | | couponIds.add(couponList.getJSONObject(couponIndex).getString("couponId")); |
| | | } |
| | | } |
| | | //查询用户ID |
| | | paramIn.put("userId", pd.getUserId()); |
| | | String url = "tempCarFee.getTempCarFeeOrder?paId=" + paramIn.getString("paId") + "&carNum=" + paramIn.getString("carNum"); |
| | | String url = "tempCarFee.queryTempCarFeeOrder?paId=" + paramIn.getString("paId") |
| | | + "&carNum=" + paramIn.getString("carNum") |
| | | + "&machineId=" + paramIn.getString("machineId") |
| | | +"&couponIds="+StringUtils.join(couponIds,","); |
| | | responseEntity = super.callCenterService(restTemplate, pd, "", url, HttpMethod.GET); |
| | | |
| | | if (responseEntity.getStatusCode() != HttpStatus.OK) { |
| | |
| | | if (money <= 0) { |
| | | JSONObject paramOut = new JSONObject(); |
| | | paramOut.put("oId", orderId); |
| | | paramOut.put("payType", TempCarPayOrderDto.PAY_TYPE_WECHAT); |
| | | String urlOut = "tempCarFee.notifyTempCarFeeOrder"; |
| | | responseEntity = this.callCenterService(getHeaders("-1", pd.getAppId()), paramOut.toJSONString(), urlOut, HttpMethod.POST); |
| | | JSONObject param = new JSONObject(); |