| | |
| | | package com.taoke.autopay.factory; |
| | | |
| | | import com.google.gson.Gson; |
| | | import com.taoke.autopay.entity.ClientInfo; |
| | | import com.taoke.autopay.entity.KeyOrder; |
| | | import com.taoke.autopay.entity.OrderChannelEnum; |
| | | import com.taoke.autopay.entity.WxUserOrderCount; |
| | | import com.taoke.autopay.entity.agent.ChannelAgent; |
| | | import com.taoke.autopay.utils.Constant; |
| | | import com.taoke.autopay.utils.IPUtil; |
| | | import com.taoke.autopay.utils.StringUtil; |
| | | import com.taoke.autopay.utils.TimeUtil; |
| | | import com.taoke.autopay.utils.order.OrderChannelUtil; |
| | |
| | | vo.setState(KeyOrderVO.STATE_PROCESSED); |
| | | break; |
| | | } |
| | | vo.setPayType(order.getPayType()); |
| | | return vo; |
| | | } |
| | | |
| | |
| | | vo.setUid(order.getUid()); |
| | | OrderChannelEnum orderChannel=OrderChannelUtil.getChannelByKey(order.getOrderChannel()); |
| | | vo.setOrderChannel(orderChannel==null?"未知":orderChannel.getName()); |
| | | vo.setPayMerchant(order.getPayMerchant()); |
| | | vo.setIp(order.getIp()); |
| | | vo.setIgnore(order.getIgnore()); |
| | | if(!StringUtil.isNullOrEmpty(order.getIpInfo())){ |
| | | vo.setIpInfo(new Gson().fromJson(order.getIpInfo(), IPUtil.IPInfo.class)); |
| | | } |
| | | if(agent!=null){ |
| | | vo.setAgent(agent.getName()); |
| | | }else{ |
| | |
| | | } |
| | | |
| | | public static String createId(WxUserOrderCount orderCountInfo) { |
| | | return String.format("%s-%s-%s", orderCountInfo.getDay(), orderCountInfo.getUid(), orderCountInfo.getOrderType()); |
| | | return String.format("%s-%s-%s-%s", orderCountInfo.getDay(), orderCountInfo.getUid(), orderCountInfo.getOrderType(),orderCountInfo.getOrderChannel()==null?"": orderCountInfo.getOrderChannel().name()); |
| | | } |
| | | |
| | | |