| | |
| | | import com.java110.core.context.ICmdDataFlowContext; |
| | | import com.java110.core.event.cmd.Cmd; |
| | | import com.java110.core.event.cmd.CmdEvent; |
| | | import com.java110.dto.parkingBoxArea.ParkingBoxAreaDto; |
| | | import com.java110.dto.smallWeChat.SmallWeChatDto; |
| | | import com.java110.core.factory.CommunitySettingFactory; |
| | | import com.java110.core.log.LoggerFactory; |
| | | import com.java110.dto.parking.ParkingBoxAreaDto; |
| | | import com.java110.dto.wechat.SmallWeChatDto; |
| | | import com.java110.intf.community.IParkingBoxAreaV1InnerServiceSMO; |
| | | import com.java110.intf.store.ISmallWeChatInnerServiceSMO; |
| | | import com.java110.utils.cache.MappingCache; |
| | | import com.java110.utils.cache.UrlCache; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.slf4j.Logger; |
| | | import com.java110.core.log.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | import java.util.List; |
| | |
| | | private ISmallWeChatInnerServiceSMO smallWeChatInnerServiceSMOImpl; |
| | | @Autowired |
| | | private IParkingBoxAreaV1InnerServiceSMO parkingBoxAreaV1InnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含小区信息"); |
| | |
| | | smallWeChatDto.setObjId(reqJson.getString("communityId")); |
| | | smallWeChatDto.setWeChatType(SmallWeChatDto.WECHAT_TYPE_PUBLIC); |
| | | List<SmallWeChatDto> smallWeChatDtos = smallWeChatInnerServiceSMOImpl.querySmallWeChats(smallWeChatDto); |
| | | String ownerUrl = MappingCache.getValue("OWNER_WECHAT_URL"); |
| | | ownerUrl += ("/#/pages/tempParkingFee/tempParkingFee?paId="+ getPaIds(reqJson)); |
| | | if(smallWeChatDtos != null && smallWeChatDtos.size()> 0){ |
| | | ownerUrl += ("&appId="+smallWeChatDtos.get(0).getAppId()); |
| | | String ownerUrl = UrlCache.getOwnerUrl(); |
| | | ownerUrl += ("/#/pages/fee/tempParkingFee?paId=" + getPaIds(reqJson)+"&communityId="+reqJson.getString("communityId")); |
| | | if (smallWeChatDtos != null && smallWeChatDtos.size() > 0) { |
| | | ownerUrl += ("&appId=" + smallWeChatDtos.get(0).getAppId()); |
| | | } |
| | | reqJson.put("url",ownerUrl); |
| | | |
| | | if (reqJson.containsKey("machineId") && !"-1".equals(reqJson.getString("machineId"))) { |
| | | ownerUrl += ("&machineId=" + reqJson.getString("machineId")); |
| | | } |
| | | |
| | | String aliAppId = CommunitySettingFactory.getValue(reqJson.getString("communityId"),"APP_ID"); |
| | | if( !StringUtil.isEmpty(aliAppId)){ |
| | | ownerUrl += ("&aliAppId=" + aliAppId); |
| | | } |
| | | reqJson.put("url", ownerUrl); |
| | | cmdDataFlowContext.setResponseEntity(ResultVo.createResponseEntity(reqJson)); |
| | | } |
| | | |
| | |
| | | |
| | | return parkingBoxAreaDtos.get(0).getPaId(); |
| | | } |
| | | return ""; |
| | | return reqJson.getString("paId"); |
| | | } |
| | | } |