正在显示
18 个修改的文件
包含
1409 行增加
和
1 行删除
| @@ -32,7 +32,7 @@ | @@ -32,7 +32,7 @@ | ||
| 32 | <dependency> | 32 | <dependency> |
| 33 | <groupId>com.alibaba</groupId> | 33 | <groupId>com.alibaba</groupId> |
| 34 | <artifactId>fastjson</artifactId> | 34 | <artifactId>fastjson</artifactId> |
| 35 | - <version>1.2.68</version> | 35 | + <version>1.2.73</version> |
| 36 | </dependency> | 36 | </dependency> |
| 37 | 37 | ||
| 38 | <dependency> | 38 | <dependency> |
| @@ -46,6 +46,24 @@ | @@ -46,6 +46,24 @@ | ||
| 46 | <artifactId>lombok</artifactId> | 46 | <artifactId>lombok</artifactId> |
| 47 | <version>1.18.10</version> | 47 | <version>1.18.10</version> |
| 48 | </dependency> | 48 | </dependency> |
| 49 | + | ||
| 50 | + <dependency> | ||
| 51 | + <groupId>mysql</groupId> | ||
| 52 | + <artifactId>mysql-connector-java</artifactId> | ||
| 53 | + <version>5.1.13</version> | ||
| 54 | + </dependency> | ||
| 55 | + | ||
| 56 | + <dependency> | ||
| 57 | + <groupId>tk.mybatis</groupId> | ||
| 58 | + <artifactId>mapper-spring-boot-starter</artifactId> | ||
| 59 | + <version>2.1.1</version> | ||
| 60 | + </dependency> | ||
| 61 | + | ||
| 62 | + <dependency> | ||
| 63 | + <groupId>org.mybatis.spring.boot</groupId> | ||
| 64 | + <artifactId>mybatis-spring-boot-starter</artifactId> | ||
| 65 | + <version>1.3.2</version> | ||
| 66 | + </dependency> | ||
| 49 | </dependencies> | 67 | </dependencies> |
| 50 | 68 | ||
| 51 | <build> | 69 | <build> |
| @@ -54,6 +72,30 @@ | @@ -54,6 +72,30 @@ | ||
| 54 | <groupId>org.springframework.boot</groupId> | 72 | <groupId>org.springframework.boot</groupId> |
| 55 | <artifactId>spring-boot-maven-plugin</artifactId> | 73 | <artifactId>spring-boot-maven-plugin</artifactId> |
| 56 | </plugin> | 74 | </plugin> |
| 75 | + | ||
| 76 | + <!-- mybatis自动生成插件 --> | ||
| 77 | + <plugin> | ||
| 78 | + <groupId>org.mybatis.generator</groupId> | ||
| 79 | + <artifactId>mybatis-generator-maven-plugin</artifactId> | ||
| 80 | + <version>1.3.5</version> | ||
| 81 | + <configuration> | ||
| 82 | + <configurationFile>src/main/resources/generator/generatorConfig.xml</configurationFile> | ||
| 83 | + <overwrite>true</overwrite> | ||
| 84 | + <verbose>true</verbose> | ||
| 85 | + </configuration> | ||
| 86 | + <dependencies> | ||
| 87 | + <dependency> | ||
| 88 | + <groupId>mysql</groupId> | ||
| 89 | + <artifactId>mysql-connector-java</artifactId> | ||
| 90 | + <version>5.1.13</version> | ||
| 91 | + </dependency> | ||
| 92 | + <dependency> | ||
| 93 | + <groupId>tk.mybatis</groupId> | ||
| 94 | + <artifactId>mapper</artifactId> | ||
| 95 | + <version>3.4.4</version> | ||
| 96 | + </dependency> | ||
| 97 | + </dependencies> | ||
| 98 | + </plugin> | ||
| 57 | </plugins> | 99 | </plugins> |
| 58 | </build> | 100 | </build> |
| 59 | 101 |
| 1 | +package com.aukey.example.commom.mapper; | ||
| 2 | + | ||
| 3 | + | ||
| 4 | +import tk.mybatis.mapper.common.BaseMapper; | ||
| 5 | +import tk.mybatis.mapper.common.ConditionMapper; | ||
| 6 | +import tk.mybatis.mapper.common.ExampleMapper; | ||
| 7 | +import tk.mybatis.mapper.common.IdsMapper; | ||
| 8 | +import tk.mybatis.mapper.common.special.InsertListMapper; | ||
| 9 | + | ||
| 10 | +/** | ||
| 11 | + * @author wgf | ||
| 12 | + * 定制版MyBatis Mapper插件接口,如需其他接口参考官方文档自行添加。 | ||
| 13 | + */ | ||
| 14 | +public interface Mapper<T> extends BaseMapper<T>, ConditionMapper<T>, IdsMapper<T>, InsertListMapper<T>, ExampleMapper<T> { | ||
| 15 | +} |
| 1 | +package com.aukey.example.conf; | ||
| 2 | + | ||
| 3 | +import com.aukey.example.commom.mapper.Mapper; | ||
| 4 | +import org.apache.ibatis.session.SqlSessionFactory; | ||
| 5 | +import org.mybatis.spring.SqlSessionFactoryBean; | ||
| 6 | +import org.mybatis.spring.SqlSessionTemplate; | ||
| 7 | +import org.springframework.beans.factory.annotation.Qualifier; | ||
| 8 | +import org.springframework.boot.context.properties.ConfigurationProperties; | ||
| 9 | +import org.springframework.boot.jdbc.DataSourceBuilder; | ||
| 10 | +import org.springframework.context.annotation.Bean; | ||
| 11 | +import org.springframework.context.annotation.Configuration; | ||
| 12 | +import org.springframework.context.annotation.Primary; | ||
| 13 | +import org.springframework.core.io.support.PathMatchingResourcePatternResolver; | ||
| 14 | +import org.springframework.jdbc.datasource.DataSourceTransactionManager; | ||
| 15 | +import tk.mybatis.mapper.entity.Config; | ||
| 16 | +import tk.mybatis.mapper.mapperhelper.MapperHelper; | ||
| 17 | +import tk.mybatis.spring.annotation.MapperScan; | ||
| 18 | + | ||
| 19 | +import javax.sql.DataSource; | ||
| 20 | +import java.util.Properties; | ||
| 21 | + | ||
| 22 | + | ||
| 23 | +@Configuration | ||
| 24 | +@MapperScan(basePackages = FbaStockDataSourceConf.SCAN_PACKAGE, sqlSessionFactoryRef = "fbaStockSqlSessionFactory") | ||
| 25 | +public class FbaStockDataSourceConf { | ||
| 26 | + | ||
| 27 | + public static final String SCAN_PACKAGE = "com.aukey.example.mapper.fbaStock"; | ||
| 28 | + public static final String MAPPER_LOCATION = "classpath*:mapper/fbaStock/*.xml"; | ||
| 29 | + | ||
| 30 | + @Bean | ||
| 31 | + @ConfigurationProperties(prefix = "spring.datasource.fba-stock") | ||
| 32 | + public DataSource fbaStockDataSource() { | ||
| 33 | + return DataSourceBuilder.create().build(); | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + @Bean | ||
| 37 | + public DataSourceTransactionManager fbaStockTransactionManager(@Qualifier("fbaStockDataSource") DataSource dataSource) { | ||
| 38 | + return new DataSourceTransactionManager(dataSource); | ||
| 39 | + } | ||
| 40 | + | ||
| 41 | + @Bean | ||
| 42 | + public SqlSessionFactory fbaStockSqlSessionFactory( | ||
| 43 | + @Qualifier("fbaStockDataSource") DataSource dataSource | ||
| 44 | + ) throws Exception { | ||
| 45 | + final SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean(); | ||
| 46 | + sessionFactory.setDataSource(dataSource); | ||
| 47 | + | ||
| 48 | + //更多详细配置见: https://pagehelper.github.io/docs/howtouse/ | ||
| 49 | + Properties properties = new Properties(); | ||
| 50 | + properties.setProperty("helperDialect", "mysql"); //方言 | ||
| 51 | + properties.setProperty("rowBoundsWithCount", "true"); //使用 RowBounds 分页会进行 count 查询 | ||
| 52 | + properties.setProperty("reasonable", "true"); //pageNum<=0 时会查询第一页, pageNum>pages(超过总数时),会查询最后一页 | ||
| 53 | + properties.setProperty("pageSizeZero", "true"); //如果 pageSize=0 或者 RowBounds.limit = 0 就会查询出全部的结果 | ||
| 54 | + properties.setProperty("supportMethodsArguments", "true"); //支持通过 Mapper 接口参数来传递分页参数 | ||
| 55 | + properties.setProperty("offsetAsPageNum", "true"); //将 RowBounds 中的 offset 参数当成 pageNum 使用 | ||
| 56 | + | ||
| 57 | + //设置mapper location | ||
| 58 | + sessionFactory.setMapperLocations(new PathMatchingResourcePatternResolver().getResources(MAPPER_LOCATION)); | ||
| 59 | + return sessionFactory.getObject(); | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + @Bean | ||
| 63 | + @Primary | ||
| 64 | + public SqlSessionTemplate fbaStockTestSqlSessionTemplate(@Qualifier("fbaStockSqlSessionFactory") SqlSessionFactory sqlSessionFactory) throws Exception { | ||
| 65 | + return new SqlSessionTemplate(sqlSessionFactory); | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | + /** | ||
| 69 | + * Mybatis 通用Mapper配置 | ||
| 70 | + * | ||
| 71 | + * @param sqlSessionFactory | ||
| 72 | + * @return | ||
| 73 | + */ | ||
| 74 | + @Bean | ||
| 75 | + public MapperHelper fbaStockMapperHelper(@Qualifier("fbaStockSqlSessionFactory") SqlSessionFactory sqlSessionFactory) { | ||
| 76 | + MapperHelper mapperHelper = new MapperHelper(); | ||
| 77 | + //特殊配置 | ||
| 78 | + Config config = new Config(); | ||
| 79 | + config.setNotEmpty(false); | ||
| 80 | + config.setIDENTITY("MYSQL"); | ||
| 81 | + | ||
| 82 | + //更多详细配置: http://git.oschina.net/free/Mapper/blob/master/wiki/mapper3/2.Integration.md | ||
| 83 | + mapperHelper.setConfig(config); | ||
| 84 | + mapperHelper.registerMapper(Mapper.class); | ||
| 85 | + mapperHelper.processConfiguration(sqlSessionFactory.getConfiguration()); | ||
| 86 | + | ||
| 87 | + return mapperHelper; | ||
| 88 | + } | ||
| 89 | +} |
| 1 | +package com.aukey.example.entity.fbaStock; | ||
| 2 | + | ||
| 3 | +import com.alibaba.fastjson.annotation.JSONField; | ||
| 4 | +import lombok.Data; | ||
| 5 | +import org.apache.commons.lang3.StringUtils; | ||
| 6 | + | ||
| 7 | +import javax.persistence.Column; | ||
| 8 | +import javax.persistence.Id; | ||
| 9 | +import javax.persistence.Table; | ||
| 10 | +import javax.persistence.Transient; | ||
| 11 | +import java.io.UnsupportedEncodingException; | ||
| 12 | +import java.util.Date; | ||
| 13 | + | ||
| 14 | +@Data | ||
| 15 | +@Table(name = "amazon_order") | ||
| 16 | +public class AmazonOrder { | ||
| 17 | + /** | ||
| 18 | + * 自增主键 | ||
| 19 | + */ | ||
| 20 | + @Id | ||
| 21 | + private Integer aid; | ||
| 22 | + | ||
| 23 | + /** | ||
| 24 | + * 亚马逊订单ID | ||
| 25 | + */ | ||
| 26 | + @Column(name = "amazon_order_id") | ||
| 27 | + private String amazonOrderId; | ||
| 28 | + | ||
| 29 | + /** | ||
| 30 | + * 卖家订单ID | ||
| 31 | + */ | ||
| 32 | + @Column(name = "seller_order_id") | ||
| 33 | + private String sellerOrderId; | ||
| 34 | + | ||
| 35 | + /** | ||
| 36 | + * 购买日期 | ||
| 37 | + */ | ||
| 38 | + @Column(name = "purchase_date") | ||
| 39 | + private Date purchaseDate; | ||
| 40 | + | ||
| 41 | + /** | ||
| 42 | + * 付款日期 | ||
| 43 | + */ | ||
| 44 | + @Column(name = "payments_date") | ||
| 45 | + private Date paymentsDate; | ||
| 46 | + | ||
| 47 | + /** | ||
| 48 | + * 最后更新日期 | ||
| 49 | + */ | ||
| 50 | + @Column(name = "last_update_date") | ||
| 51 | + private Date lastUpdateDate; | ||
| 52 | + | ||
| 53 | + /** | ||
| 54 | + * 订单状态:1、Pending Availability等待订单生效;2、Pending待定;3、Unshipped未发货;4、Partially Shipped部分发货;5、Shipped已发货;6、Invoice Unconfirmed发票未确认;7、Canceled已取消;8、Unfulfillable无法发货 | ||
| 55 | + */ | ||
| 56 | + @Column(name = "order_status") | ||
| 57 | + private String orderStatus; | ||
| 58 | + | ||
| 59 | + /** | ||
| 60 | + * 发货渠道(AFN、MFN) | ||
| 61 | + */ | ||
| 62 | + @Column(name = "fulfillment_channel") | ||
| 63 | + private String fulfillmentChannel; | ||
| 64 | + | ||
| 65 | + /** | ||
| 66 | + * 销售渠道(站点) | ||
| 67 | + */ | ||
| 68 | + @Column(name = "sales_channel") | ||
| 69 | + private String salesChannel; | ||
| 70 | + | ||
| 71 | + /** | ||
| 72 | + * 运输服务等级 | ||
| 73 | + */ | ||
| 74 | + @Column(name = "ship_service_level") | ||
| 75 | + private String shipServiceLevel; | ||
| 76 | + | ||
| 77 | + /** | ||
| 78 | + * 收货地址-城市 | ||
| 79 | + */ | ||
| 80 | + @Column(name = "shipping_address_city") | ||
| 81 | + private String shippingAddressCity; | ||
| 82 | + | ||
| 83 | + /** | ||
| 84 | + * 收货地址-县 | ||
| 85 | + */ | ||
| 86 | + @Column(name = "shipping_address_county") | ||
| 87 | + private String shippingAddressCounty; | ||
| 88 | + | ||
| 89 | + /** | ||
| 90 | + * 收货地址-地区 | ||
| 91 | + */ | ||
| 92 | + @Column(name = "shipping_address_district") | ||
| 93 | + private String shippingAddressDistrict; | ||
| 94 | + | ||
| 95 | + /** | ||
| 96 | + * 收货地址-州 | ||
| 97 | + */ | ||
| 98 | + @Column(name = "shipping_address_stateOrRegion") | ||
| 99 | + private String shippingAddressStateorregion; | ||
| 100 | + | ||
| 101 | + /** | ||
| 102 | + * 收货地址-邮政编码 | ||
| 103 | + */ | ||
| 104 | + @Column(name = "shipping_address_postalCode") | ||
| 105 | + private String shippingAddressPostalcode; | ||
| 106 | + | ||
| 107 | + /** | ||
| 108 | + * 收货地址-国家编码 | ||
| 109 | + */ | ||
| 110 | + @Column(name = "shipping_address_countryCode") | ||
| 111 | + private String shippingAddressCountrycode; | ||
| 112 | + | ||
| 113 | + @Column(name = "shipping_address_phone") | ||
| 114 | + private String shippingAddressPhone; | ||
| 115 | + | ||
| 116 | + /** | ||
| 117 | + * 订单总额(币种) | ||
| 118 | + */ | ||
| 119 | + @Column(name = "order_total_currency_code") | ||
| 120 | + private String orderTotalCurrencyCode; | ||
| 121 | + | ||
| 122 | + /** | ||
| 123 | + * 订单总额 | ||
| 124 | + */ | ||
| 125 | + @Column(name = "order_total_amount") | ||
| 126 | + private Double orderTotalAmount; | ||
| 127 | + | ||
| 128 | + /** | ||
| 129 | + * 邮费总额 | ||
| 130 | + */ | ||
| 131 | + @Column(name = "postage_total") | ||
| 132 | + private Double postageTotal; | ||
| 133 | + | ||
| 134 | + /** | ||
| 135 | + * 折扣总额 | ||
| 136 | + */ | ||
| 137 | + @Column(name = "discount_total") | ||
| 138 | + private Double discountTotal; | ||
| 139 | + | ||
| 140 | + /** | ||
| 141 | + * 发货数量 | ||
| 142 | + */ | ||
| 143 | + @Column(name = "number_of_items_shipped") | ||
| 144 | + private Integer numberOfItemsShipped; | ||
| 145 | + | ||
| 146 | + /** | ||
| 147 | + * 未发货数量 | ||
| 148 | + */ | ||
| 149 | + @Column(name = "number_of_items_unshipped") | ||
| 150 | + private Integer numberOfItemsUnshipped; | ||
| 151 | + | ||
| 152 | + /** | ||
| 153 | + * 付款方式 | ||
| 154 | + */ | ||
| 155 | + @Column(name = "payment_method") | ||
| 156 | + private String paymentMethod; | ||
| 157 | + | ||
| 158 | + /** | ||
| 159 | + * 市场ID | ||
| 160 | + */ | ||
| 161 | + @Column(name = "marketplace_id") | ||
| 162 | + private String marketplaceId; | ||
| 163 | + | ||
| 164 | + /** | ||
| 165 | + * 买家邮箱 | ||
| 166 | + */ | ||
| 167 | + @Column(name = "buyer_email") | ||
| 168 | + private String buyerEmail; | ||
| 169 | + | ||
| 170 | + /** | ||
| 171 | + * 买家名称 | ||
| 172 | + */ | ||
| 173 | + @Column(name = "buyer_name") | ||
| 174 | + private String buyerName; | ||
| 175 | + | ||
| 176 | + /** | ||
| 177 | + * 出货服务等级类别 | ||
| 178 | + */ | ||
| 179 | + @Column(name = "shipment_service_level_category") | ||
| 180 | + private String shipmentServiceLevelCategory; | ||
| 181 | + | ||
| 182 | + @Column(name = "shipped_by_amazon_tfm") | ||
| 183 | + private String shippedByAmazonTfm; | ||
| 184 | + | ||
| 185 | + @Column(name = "tfm_shipment_status") | ||
| 186 | + private String tfmShipmentStatus; | ||
| 187 | + | ||
| 188 | + @Column(name = "cba_displayable_shipping_label") | ||
| 189 | + private String cbaDisplayableShippingLabel; | ||
| 190 | + | ||
| 191 | + /** | ||
| 192 | + * 订单类型 | ||
| 193 | + */ | ||
| 194 | + @Column(name = "order_type") | ||
| 195 | + private String orderType; | ||
| 196 | + | ||
| 197 | + /** | ||
| 198 | + * 最早发货日期 | ||
| 199 | + */ | ||
| 200 | + @Column(name = "earliest_ship_date") | ||
| 201 | + private Date earliestShipDate; | ||
| 202 | + | ||
| 203 | + /** | ||
| 204 | + * 最晚发货日期 | ||
| 205 | + */ | ||
| 206 | + @Column(name = "latest_ship_date") | ||
| 207 | + private Date latestShipDate; | ||
| 208 | + | ||
| 209 | + /** | ||
| 210 | + * 最早交货日期 | ||
| 211 | + */ | ||
| 212 | + @Column(name = "earliest_delivery_date") | ||
| 213 | + private Date earliestDeliveryDate; | ||
| 214 | + | ||
| 215 | + /** | ||
| 216 | + * 最晚交货日期 | ||
| 217 | + */ | ||
| 218 | + @Column(name = "latest_delivery_date") | ||
| 219 | + private Date latestDeliveryDate; | ||
| 220 | + | ||
| 221 | + @Column(name = "is_business_order") | ||
| 222 | + private String isBusinessOrder; | ||
| 223 | + | ||
| 224 | + /** | ||
| 225 | + * 买家采购订单编号 | ||
| 226 | + */ | ||
| 227 | + @Column(name = "purchase_order_number") | ||
| 228 | + private String purchaseOrderNumber; | ||
| 229 | + | ||
| 230 | + @Column(name = "is_prime") | ||
| 231 | + private String isPrime; | ||
| 232 | + | ||
| 233 | + @Column(name = "is_premium_order") | ||
| 234 | + private String isPremiumOrder; | ||
| 235 | + | ||
| 236 | + /** | ||
| 237 | + * 是否导入E登:0未导入;1已导入 | ||
| 238 | + */ | ||
| 239 | + @Column(name = "is_import_ed") | ||
| 240 | + private String isImportEd; | ||
| 241 | + | ||
| 242 | + /** | ||
| 243 | + * 导入E登时间 | ||
| 244 | + */ | ||
| 245 | + @Column(name = "import_ed_date") | ||
| 246 | + private Date importEdDate; | ||
| 247 | + | ||
| 248 | + /** | ||
| 249 | + * 抓单时间 | ||
| 250 | + */ | ||
| 251 | + @Column(name = "import_sys_date") | ||
| 252 | + private Date importSysDate; | ||
| 253 | + | ||
| 254 | + /** | ||
| 255 | + * 店铺ID | ||
| 256 | + */ | ||
| 257 | + @Column(name = "account_id") | ||
| 258 | + private Integer accountId; | ||
| 259 | + | ||
| 260 | + /** | ||
| 261 | + * 店铺简码 | ||
| 262 | + */ | ||
| 263 | + @Column(name = "account_code") | ||
| 264 | + private String accountCode; | ||
| 265 | + | ||
| 266 | + /** | ||
| 267 | + * 区域ID | ||
| 268 | + */ | ||
| 269 | + @Column(name = "area_id") | ||
| 270 | + private Integer areaId; | ||
| 271 | + | ||
| 272 | + /** | ||
| 273 | + * 区域 | ||
| 274 | + */ | ||
| 275 | + private String area; | ||
| 276 | + | ||
| 277 | + /** | ||
| 278 | + * 记录创建时间 | ||
| 279 | + */ | ||
| 280 | + @Column(name = "create_date") | ||
| 281 | + private Date createDate; | ||
| 282 | + | ||
| 283 | + /** | ||
| 284 | + * 记录更新时间 | ||
| 285 | + */ | ||
| 286 | + @Column(name = "update_date") | ||
| 287 | + private Date updateDate; | ||
| 288 | + | ||
| 289 | + /** | ||
| 290 | + * item表处理状态 | ||
| 291 | + */ | ||
| 292 | + @Column(name = "order_item_status") | ||
| 293 | + private String orderItemStatus; | ||
| 294 | + | ||
| 295 | + /** | ||
| 296 | + * 收件人姓名 | ||
| 297 | + */ | ||
| 298 | + @Column(name = "shipping_address_name") | ||
| 299 | + private byte[] shippingAddressName; | ||
| 300 | + | ||
| 301 | + /** | ||
| 302 | + * 收货地址-街道1 | ||
| 303 | + */ | ||
| 304 | + @Column(name = "shipping_address_line1") | ||
| 305 | + private byte[] shippingAddressLine1; | ||
| 306 | + | ||
| 307 | + /** | ||
| 308 | + * 收货地址-街道2 | ||
| 309 | + */ | ||
| 310 | + @Column(name = "shipping_address_line2") | ||
| 311 | + private byte[] shippingAddressLine2; | ||
| 312 | + | ||
| 313 | + /** | ||
| 314 | + * 收货地址-街道3 | ||
| 315 | + */ | ||
| 316 | + @Column(name = "shipping_address_line3") | ||
| 317 | + private byte[] shippingAddressLine3; | ||
| 318 | + | ||
| 319 | + @Transient | ||
| 320 | + @JSONField(name = "shipping_address_name") | ||
| 321 | + private String shippingAddressNameStr; | ||
| 322 | + | ||
| 323 | + @Transient | ||
| 324 | + @JSONField(name = "shipping_address_line1") | ||
| 325 | + private String shippingAddressLine1Str; | ||
| 326 | + | ||
| 327 | + @Transient | ||
| 328 | + @JSONField(name = "shipping_address_line2") | ||
| 329 | + private String shippingAddressLine2Str; | ||
| 330 | + | ||
| 331 | + @Transient | ||
| 332 | + @JSONField(name = "shipping_address_line3") | ||
| 333 | + private String shippingAddressLine3Str; | ||
| 334 | + | ||
| 335 | + public byte[] getShippingAddressName() { | ||
| 336 | + if (StringUtils.isNotBlank(shippingAddressNameStr)) { | ||
| 337 | + try { | ||
| 338 | + return shippingAddressNameStr.getBytes("UTF-8"); | ||
| 339 | + } catch (UnsupportedEncodingException e) { | ||
| 340 | + e.printStackTrace(); | ||
| 341 | + } | ||
| 342 | + } | ||
| 343 | + return null; | ||
| 344 | + } | ||
| 345 | + | ||
| 346 | + public byte[] getShippingAddressLine1() { | ||
| 347 | + if (StringUtils.isNotBlank(shippingAddressLine1Str)) { | ||
| 348 | + try { | ||
| 349 | + return shippingAddressLine1Str.getBytes("UTF-8"); | ||
| 350 | + } catch (UnsupportedEncodingException e) { | ||
| 351 | + e.printStackTrace(); | ||
| 352 | + } | ||
| 353 | + } | ||
| 354 | + return null; | ||
| 355 | + } | ||
| 356 | + | ||
| 357 | + public byte[] getShippingAddressLine2() { | ||
| 358 | + if (StringUtils.isNotBlank(shippingAddressLine2Str)) { | ||
| 359 | + try { | ||
| 360 | + return shippingAddressLine2Str.getBytes("UTF-8"); | ||
| 361 | + } catch (UnsupportedEncodingException e) { | ||
| 362 | + e.printStackTrace(); | ||
| 363 | + } | ||
| 364 | + } | ||
| 365 | + return null; | ||
| 366 | + } | ||
| 367 | + | ||
| 368 | + public byte[] getShippingAddressLine3() { | ||
| 369 | + if (StringUtils.isNotBlank(shippingAddressLine3Str)) { | ||
| 370 | + try { | ||
| 371 | + return shippingAddressLine3Str.getBytes("UTF-8"); | ||
| 372 | + } catch (UnsupportedEncodingException e) { | ||
| 373 | + e.printStackTrace(); | ||
| 374 | + } | ||
| 375 | + } | ||
| 376 | + return null; | ||
| 377 | + } | ||
| 378 | +} |
| 1 | +package com.aukey.example.entity.fbaStock; | ||
| 2 | + | ||
| 3 | +import com.alibaba.fastjson.annotation.JSONField; | ||
| 4 | +import lombok.Data; | ||
| 5 | +import org.apache.commons.lang3.StringUtils; | ||
| 6 | + | ||
| 7 | +import javax.persistence.Column; | ||
| 8 | +import javax.persistence.Id; | ||
| 9 | +import javax.persistence.Table; | ||
| 10 | +import javax.persistence.Transient; | ||
| 11 | +import java.io.UnsupportedEncodingException; | ||
| 12 | +import java.util.Date; | ||
| 13 | + | ||
| 14 | +@Data | ||
| 15 | +@Table(name = "amazon_order_item") | ||
| 16 | +public class AmazonOrderItem { | ||
| 17 | + /** | ||
| 18 | + * 自增主键 | ||
| 19 | + */ | ||
| 20 | + @Id | ||
| 21 | + private Integer aid; | ||
| 22 | + | ||
| 23 | + /** | ||
| 24 | + * 亚马逊订单ID | ||
| 25 | + */ | ||
| 26 | + @Column(name = "amazon_order_id") | ||
| 27 | + private String amazonOrderId; | ||
| 28 | + | ||
| 29 | + /** | ||
| 30 | + * 亚马逊SKU | ||
| 31 | + */ | ||
| 32 | + private String asin; | ||
| 33 | + | ||
| 34 | + /** | ||
| 35 | + * 卖家SKU | ||
| 36 | + */ | ||
| 37 | + @Column(name = "seller_sku") | ||
| 38 | + private String sellerSku; | ||
| 39 | + | ||
| 40 | + /** | ||
| 41 | + * 订单项ID | ||
| 42 | + */ | ||
| 43 | + @Column(name = "order_item_id") | ||
| 44 | + private String orderItemId; | ||
| 45 | + | ||
| 46 | + /** | ||
| 47 | + * 订购数量 | ||
| 48 | + */ | ||
| 49 | + @Column(name = "quantity_ordered") | ||
| 50 | + private Integer quantityOrdered; | ||
| 51 | + | ||
| 52 | + /** | ||
| 53 | + * 发货数量 | ||
| 54 | + */ | ||
| 55 | + @Column(name = "quantity_shipped") | ||
| 56 | + private Integer quantityShipped; | ||
| 57 | + | ||
| 58 | + @Column(name = "points_number") | ||
| 59 | + private Integer pointsNumber; | ||
| 60 | + | ||
| 61 | + @Column(name = "points_currency_code") | ||
| 62 | + private String pointsCurrencyCode; | ||
| 63 | + | ||
| 64 | + @Column(name = "points_amount") | ||
| 65 | + private Double pointsAmount; | ||
| 66 | + | ||
| 67 | + /** | ||
| 68 | + * sku币种 | ||
| 69 | + */ | ||
| 70 | + @Column(name = "item_price_currency_code") | ||
| 71 | + private String itemPriceCurrencyCode; | ||
| 72 | + | ||
| 73 | + /** | ||
| 74 | + * sku价格 | ||
| 75 | + */ | ||
| 76 | + @Column(name = "item_price_amount") | ||
| 77 | + private Double itemPriceAmount; | ||
| 78 | + | ||
| 79 | + /** | ||
| 80 | + * 邮费币种 | ||
| 81 | + */ | ||
| 82 | + @Column(name = "shipping_price_currency_code") | ||
| 83 | + private String shippingPriceCurrencyCode; | ||
| 84 | + | ||
| 85 | + /** | ||
| 86 | + * 邮费 | ||
| 87 | + */ | ||
| 88 | + @Column(name = "shipping_price_amount") | ||
| 89 | + private Double shippingPriceAmount; | ||
| 90 | + | ||
| 91 | + /** | ||
| 92 | + * 礼品包装币种 | ||
| 93 | + */ | ||
| 94 | + @Column(name = "gift_wrap_price_currency_code") | ||
| 95 | + private String giftWrapPriceCurrencyCode; | ||
| 96 | + | ||
| 97 | + /** | ||
| 98 | + * 礼品包装价格 | ||
| 99 | + */ | ||
| 100 | + @Column(name = "gift_wrap_price_amount") | ||
| 101 | + private Double giftWrapPriceAmount; | ||
| 102 | + | ||
| 103 | + /** | ||
| 104 | + * 价格税币种 | ||
| 105 | + */ | ||
| 106 | + @Column(name = "item_tax_currency_code") | ||
| 107 | + private String itemTaxCurrencyCode; | ||
| 108 | + | ||
| 109 | + /** | ||
| 110 | + * 价格税 | ||
| 111 | + */ | ||
| 112 | + @Column(name = "item_tax_amount") | ||
| 113 | + private Double itemTaxAmount; | ||
| 114 | + | ||
| 115 | + /** | ||
| 116 | + * 邮费税币种 | ||
| 117 | + */ | ||
| 118 | + @Column(name = "shipping_tax_currency_code") | ||
| 119 | + private String shippingTaxCurrencyCode; | ||
| 120 | + | ||
| 121 | + /** | ||
| 122 | + * 邮费税 | ||
| 123 | + */ | ||
| 124 | + @Column(name = "shipping_tax_amount") | ||
| 125 | + private Double shippingTaxAmount; | ||
| 126 | + | ||
| 127 | + /** | ||
| 128 | + * 礼品包装税币种 | ||
| 129 | + */ | ||
| 130 | + @Column(name = "gift_wrap_tax_currency_code") | ||
| 131 | + private String giftWrapTaxCurrencyCode; | ||
| 132 | + | ||
| 133 | + /** | ||
| 134 | + * 礼品包装价格税 | ||
| 135 | + */ | ||
| 136 | + @Column(name = "gift_wrap_tax_amount") | ||
| 137 | + private Double giftWrapTaxAmount; | ||
| 138 | + | ||
| 139 | + /** | ||
| 140 | + * 邮费折扣币种 | ||
| 141 | + */ | ||
| 142 | + @Column(name = "shipping_discount_currency_code") | ||
| 143 | + private String shippingDiscountCurrencyCode; | ||
| 144 | + | ||
| 145 | + /** | ||
| 146 | + * 邮费折扣 | ||
| 147 | + */ | ||
| 148 | + @Column(name = "shipping_discount_amount") | ||
| 149 | + private Double shippingDiscountAmount; | ||
| 150 | + | ||
| 151 | + /** | ||
| 152 | + * 促销折扣币种 | ||
| 153 | + */ | ||
| 154 | + @Column(name = "promotion_discount_currency_code") | ||
| 155 | + private String promotionDiscountCurrencyCode; | ||
| 156 | + | ||
| 157 | + /** | ||
| 158 | + * 促销折扣 | ||
| 159 | + */ | ||
| 160 | + @Column(name = "promotion_discount_amount") | ||
| 161 | + private Double promotionDiscountAmount; | ||
| 162 | + | ||
| 163 | + /** | ||
| 164 | + * 促销IDS | ||
| 165 | + */ | ||
| 166 | + @Column(name = "promotion_ids") | ||
| 167 | + private String promotionIds; | ||
| 168 | + | ||
| 169 | + /** | ||
| 170 | + * COD费币种 | ||
| 171 | + */ | ||
| 172 | + @Column(name = "cod_fee_currency_code") | ||
| 173 | + private String codFeeCurrencyCode; | ||
| 174 | + | ||
| 175 | + /** | ||
| 176 | + * COD费 | ||
| 177 | + */ | ||
| 178 | + @Column(name = "cod_fee_amount") | ||
| 179 | + private Double codFeeAmount; | ||
| 180 | + | ||
| 181 | + /** | ||
| 182 | + * COD折扣币种 | ||
| 183 | + */ | ||
| 184 | + @Column(name = "cod_fee_discount_currency_code") | ||
| 185 | + private String codFeeDiscountCurrencyCode; | ||
| 186 | + | ||
| 187 | + /** | ||
| 188 | + * COD折扣 | ||
| 189 | + */ | ||
| 190 | + @Column(name = "cod_fee_discount_amount") | ||
| 191 | + private Double codFeeDiscountAmount; | ||
| 192 | + | ||
| 193 | + /** | ||
| 194 | + * 礼品包装级别 | ||
| 195 | + */ | ||
| 196 | + @Column(name = "gift_wrap_level") | ||
| 197 | + private String giftWrapLevel; | ||
| 198 | + | ||
| 199 | + /** | ||
| 200 | + * 发票要求 | ||
| 201 | + */ | ||
| 202 | + @Column(name = "invoice_requirement") | ||
| 203 | + private String invoiceRequirement; | ||
| 204 | + | ||
| 205 | + /** | ||
| 206 | + * 买家选择发票类别 | ||
| 207 | + */ | ||
| 208 | + @Column(name = "buyer_selected_invoice_category") | ||
| 209 | + private String buyerSelectedInvoiceCategory; | ||
| 210 | + | ||
| 211 | + /** | ||
| 212 | + * 发票抬头 | ||
| 213 | + */ | ||
| 214 | + @Column(name = "invoice_title") | ||
| 215 | + private String invoiceTitle; | ||
| 216 | + | ||
| 217 | + /** | ||
| 218 | + * 发票信息 | ||
| 219 | + */ | ||
| 220 | + @Column(name = "invoice_information") | ||
| 221 | + private String invoiceInformation; | ||
| 222 | + | ||
| 223 | + /** | ||
| 224 | + * 条件备注 | ||
| 225 | + */ | ||
| 226 | + @Column(name = "condition_note") | ||
| 227 | + private String conditionNote; | ||
| 228 | + | ||
| 229 | + /** | ||
| 230 | + * 条件Id | ||
| 231 | + */ | ||
| 232 | + @Column(name = "condition_id") | ||
| 233 | + private String conditionId; | ||
| 234 | + | ||
| 235 | + /** | ||
| 236 | + * 子条件Id | ||
| 237 | + */ | ||
| 238 | + @Column(name = "condition_subtype_id") | ||
| 239 | + private String conditionSubtypeId; | ||
| 240 | + | ||
| 241 | + /** | ||
| 242 | + * 预定交货开始日期 | ||
| 243 | + */ | ||
| 244 | + @Column(name = "scheduled_delivery_start_date") | ||
| 245 | + private Date scheduledDeliveryStartDate; | ||
| 246 | + | ||
| 247 | + /** | ||
| 248 | + * 预定交货结束日期 | ||
| 249 | + */ | ||
| 250 | + @Column(name = "scheduled_delivery_end_date") | ||
| 251 | + private Date scheduledDeliveryEndDate; | ||
| 252 | + | ||
| 253 | + /** | ||
| 254 | + * 价格标示 | ||
| 255 | + */ | ||
| 256 | + @Column(name = "price_designation") | ||
| 257 | + private String priceDesignation; | ||
| 258 | + | ||
| 259 | + /** | ||
| 260 | + * 定制URL | ||
| 261 | + */ | ||
| 262 | + @Column(name = "customized_url") | ||
| 263 | + private String customizedUrl; | ||
| 264 | + | ||
| 265 | + /** | ||
| 266 | + * 发货渠道(AFN、MFN) | ||
| 267 | + */ | ||
| 268 | + @Column(name = "fulfillment_channel") | ||
| 269 | + private String fulfillmentChannel; | ||
| 270 | + | ||
| 271 | + /** | ||
| 272 | + * 店铺ID | ||
| 273 | + */ | ||
| 274 | + @Column(name = "account_id") | ||
| 275 | + private Integer accountId; | ||
| 276 | + | ||
| 277 | + /** | ||
| 278 | + * 店铺简码 | ||
| 279 | + */ | ||
| 280 | + @Column(name = "account_code") | ||
| 281 | + private String accountCode; | ||
| 282 | + | ||
| 283 | + /** | ||
| 284 | + * 区域ID | ||
| 285 | + */ | ||
| 286 | + @Column(name = "area_id") | ||
| 287 | + private Integer areaId; | ||
| 288 | + | ||
| 289 | + /** | ||
| 290 | + * 区域 | ||
| 291 | + */ | ||
| 292 | + private String area; | ||
| 293 | + | ||
| 294 | + /** | ||
| 295 | + * 记录创建时间 | ||
| 296 | + */ | ||
| 297 | + @Column(name = "create_date") | ||
| 298 | + private Date createDate; | ||
| 299 | + | ||
| 300 | + /** | ||
| 301 | + * 记录更新时间 | ||
| 302 | + */ | ||
| 303 | + @Column(name = "update_date") | ||
| 304 | + private Date updateDate; | ||
| 305 | + | ||
| 306 | + @Column(name = "order_header_id") | ||
| 307 | + private Integer orderHeaderId; | ||
| 308 | + | ||
| 309 | + /** | ||
| 310 | + * 产品标题 | ||
| 311 | + */ | ||
| 312 | + @Column(name = "title") | ||
| 313 | + private byte[] titleAlias; | ||
| 314 | + | ||
| 315 | + /** | ||
| 316 | + * 礼品消息文本 | ||
| 317 | + */ | ||
| 318 | + @Column(name = "gift_message_text") | ||
| 319 | + private byte[] giftMessageText; | ||
| 320 | + | ||
| 321 | + @Transient | ||
| 322 | + @JSONField(name = "title") | ||
| 323 | + private String titleStr; | ||
| 324 | + | ||
| 325 | + @Transient | ||
| 326 | + @JSONField(name = "gift_message_text") | ||
| 327 | + private String giftMessageTextStr; | ||
| 328 | + | ||
| 329 | + public byte[] getTitleAlias() { | ||
| 330 | + if (StringUtils.isNotBlank(titleStr)) { | ||
| 331 | + try { | ||
| 332 | + return titleStr.getBytes("UTF-8"); | ||
| 333 | + } catch (UnsupportedEncodingException e) { | ||
| 334 | + e.printStackTrace(); | ||
| 335 | + } | ||
| 336 | + } | ||
| 337 | + return null; | ||
| 338 | + } | ||
| 339 | + | ||
| 340 | + public byte[] getGiftMessageText() { | ||
| 341 | + if (StringUtils.isNotBlank(giftMessageTextStr)) { | ||
| 342 | + try { | ||
| 343 | + return giftMessageTextStr.getBytes("UTF-8"); | ||
| 344 | + } catch (UnsupportedEncodingException e) { | ||
| 345 | + e.printStackTrace(); | ||
| 346 | + } | ||
| 347 | + } | ||
| 348 | + return null; | ||
| 349 | + } | ||
| 350 | +} |
| 1 | +package com.aukey.example.listener; | ||
| 2 | + | ||
| 3 | +import com.alibaba.fastjson.JSON; | ||
| 4 | +import com.alibaba.fastjson.TypeReference; | ||
| 5 | +import com.aukey.example.constant.EventType; | ||
| 6 | +import com.aukey.example.constant.MQConst; | ||
| 7 | +import com.aukey.example.entity.fbaStock.AmazonOrderItem; | ||
| 8 | +import com.aukey.example.service.fbaStock.AmazonOrderItemService; | ||
| 9 | +import com.aukey.example.vo.MessageVo; | ||
| 10 | +import com.rabbitmq.client.Channel; | ||
| 11 | +import lombok.extern.slf4j.Slf4j; | ||
| 12 | +import org.springframework.amqp.core.Message; | ||
| 13 | +import org.springframework.amqp.rabbit.annotation.RabbitListener; | ||
| 14 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 15 | +import org.springframework.stereotype.Component; | ||
| 16 | + | ||
| 17 | +import java.io.IOException; | ||
| 18 | + | ||
| 19 | +/** | ||
| 20 | + * @author: wgf | ||
| 21 | + * @create: 2020-06-09 14:30 | ||
| 22 | + * @description: CanalUser监听器 | ||
| 23 | + **/ | ||
| 24 | +@Slf4j | ||
| 25 | +@Component | ||
| 26 | +public class AmazonOrderItemListener { | ||
| 27 | + | ||
| 28 | + @Autowired | ||
| 29 | + AmazonOrderItemService amazonOrderItemService; | ||
| 30 | + | ||
| 31 | + @RabbitListener(queues = "polaris_order_center.amazon_order_item") | ||
| 32 | + public void receive(String message, Channel channel, Message messageEntity) throws IOException { | ||
| 33 | + | ||
| 34 | + try { | ||
| 35 | + | ||
| 36 | + log.info("接收到队列: {} 消息:{}", MQConst.TEST, message); | ||
| 37 | + | ||
| 38 | + MessageVo<AmazonOrderItem> messageVo = JSON.parseObject(message, new TypeReference<MessageVo<AmazonOrderItem>>() { | ||
| 39 | + }); | ||
| 40 | + | ||
| 41 | + EventType eventType = EventType.valueOf(messageVo.getType()); | ||
| 42 | + | ||
| 43 | + log.info("当前监听binlog 数据库:{}, 数据表:{}", messageVo.getDatabase(), messageVo.getTable()); | ||
| 44 | + | ||
| 45 | + // 数据同步只关注这三种事件 | ||
| 46 | + switch (eventType) { | ||
| 47 | + case INSERT: | ||
| 48 | + log.info("触发 INSERT 事件"); | ||
| 49 | + this.amazonOrderItemService.insertOrUpdate(messageVo.getData()); | ||
| 50 | + break; | ||
| 51 | + case UPDATE: | ||
| 52 | + log.info("触发 UPDATE 事件"); | ||
| 53 | + this.amazonOrderItemService.insertOrUpdate(messageVo.getData()); | ||
| 54 | + break; | ||
| 55 | + case DELETE: | ||
| 56 | + log.info("触发 DELETE 事件"); | ||
| 57 | + this.amazonOrderItemService.delete(messageVo.getData()); | ||
| 58 | + break; | ||
| 59 | + default: | ||
| 60 | + log.info("其他事件类型:{}, 过滤不处理", eventType); | ||
| 61 | + } | ||
| 62 | + | ||
| 63 | + log.info("消息长度:{}", messageVo.getData().size()); | ||
| 64 | + | ||
| 65 | + /** | ||
| 66 | + * 消息消费确认 | ||
| 67 | + * 如果客户端在线没有签收没有签收这条Message,则此消息进入Unacked状态,此时监听器阻塞等待消息确认,不推送新Message | ||
| 68 | + * 如果待消息确认并且客户端下线,下次客户端上线重新推送上次Unacked状态Message | ||
| 69 | + */ | ||
| 70 | + channel.basicAck(messageEntity.getMessageProperties().getDeliveryTag(), false); | ||
| 71 | + } catch (Exception e) { | ||
| 72 | + /** | ||
| 73 | + * 第一个参数deliveryTag:发布的每一条消息都会获得一个唯一的deliveryTag,deliveryTag在channel范围内是唯一的 | ||
| 74 | + * 第二个参数multiple:批量确认标志。如果值为true,包含本条消息在内的、所有比该消息deliveryTag值小的 消息都被拒绝了(除了已经被 ack 的以外);如果值为false,只拒绝三本条消息 | ||
| 75 | + * 第三个参数requeue:表示如何处理这条消息,如果值为true,则重新放入RabbitMQ的发送队列,如果值为false,则通知RabbitMQ销毁这条消息 | ||
| 76 | + */ | ||
| 77 | + //channel.basicNack(messageEntity.getMessageProperties().getDeliveryTag(), false,true); | ||
| 78 | + e.printStackTrace(); | ||
| 79 | + } | ||
| 80 | + } | ||
| 81 | +} |
| 1 | +package com.aukey.example.listener; | ||
| 2 | + | ||
| 3 | +import com.alibaba.fastjson.JSON; | ||
| 4 | +import com.alibaba.fastjson.TypeReference; | ||
| 5 | +import com.aukey.example.constant.EventType; | ||
| 6 | +import com.aukey.example.constant.MQConst; | ||
| 7 | +import com.aukey.example.entity.fbaStock.AmazonOrder; | ||
| 8 | +import com.aukey.example.service.fbaStock.AmazonOrderService; | ||
| 9 | +import com.aukey.example.vo.MessageVo; | ||
| 10 | +import com.rabbitmq.client.Channel; | ||
| 11 | +import lombok.extern.slf4j.Slf4j; | ||
| 12 | +import org.springframework.amqp.core.Message; | ||
| 13 | +import org.springframework.amqp.rabbit.annotation.RabbitListener; | ||
| 14 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 15 | +import org.springframework.stereotype.Component; | ||
| 16 | + | ||
| 17 | +import java.io.IOException; | ||
| 18 | + | ||
| 19 | +/** | ||
| 20 | + * @author: wgf | ||
| 21 | + * @create: 2020-06-09 14:30 | ||
| 22 | + * @description: CanalUser监听器 | ||
| 23 | + **/ | ||
| 24 | +@Slf4j | ||
| 25 | +@Component | ||
| 26 | +public class AmazonOrderListener { | ||
| 27 | + | ||
| 28 | + @Autowired | ||
| 29 | + AmazonOrderService amazonOrderService; | ||
| 30 | + | ||
| 31 | + @RabbitListener(queues = "polaris_order_center.amazon_order") | ||
| 32 | + public void receive(String message, Channel channel, Message messageEntity) throws IOException { | ||
| 33 | + | ||
| 34 | + try { | ||
| 35 | + | ||
| 36 | + log.info("接收到队列: {} 消息:{}", MQConst.TEST, message); | ||
| 37 | + | ||
| 38 | + MessageVo<AmazonOrder> messageVo = JSON.parseObject(message, new TypeReference<MessageVo<AmazonOrder>>() { | ||
| 39 | + }); | ||
| 40 | + | ||
| 41 | + EventType eventType = EventType.valueOf(messageVo.getType()); | ||
| 42 | + | ||
| 43 | + log.info("当前监听binlog 数据库:{}, 数据表:{}", messageVo.getDatabase(), messageVo.getTable()); | ||
| 44 | + | ||
| 45 | + // 数据同步只关注这三种事件 | ||
| 46 | + switch (eventType) { | ||
| 47 | + case INSERT: | ||
| 48 | + log.info("触发 INSERT 事件"); | ||
| 49 | + this.amazonOrderService.insertOrUpdate(messageVo.getData()); | ||
| 50 | + break; | ||
| 51 | + case UPDATE: | ||
| 52 | + log.info("触发 UPDATE 事件"); | ||
| 53 | + this.amazonOrderService.insertOrUpdate(messageVo.getData()); | ||
| 54 | + break; | ||
| 55 | + case DELETE: | ||
| 56 | + log.info("触发 DELETE 事件"); | ||
| 57 | + this.amazonOrderService.delete(messageVo.getData()); | ||
| 58 | + break; | ||
| 59 | + default: | ||
| 60 | + log.info("其他事件类型:{}, 过滤不处理", eventType); | ||
| 61 | + } | ||
| 62 | + | ||
| 63 | + log.info("消息长度:{}", messageVo.getData().size()); | ||
| 64 | + | ||
| 65 | + /** | ||
| 66 | + * 消息消费确认 | ||
| 67 | + * 如果客户端在线没有签收没有签收这条Message,则此消息进入Unacked状态,此时监听器阻塞等待消息确认,不推送新Message | ||
| 68 | + * 如果待消息确认并且客户端下线,下次客户端上线重新推送上次Unacked状态Message | ||
| 69 | + */ | ||
| 70 | + channel.basicAck(messageEntity.getMessageProperties().getDeliveryTag(), false); | ||
| 71 | + } catch (Exception e) { | ||
| 72 | + /** | ||
| 73 | + * 第一个参数deliveryTag:发布的每一条消息都会获得一个唯一的deliveryTag,deliveryTag在channel范围内是唯一的 | ||
| 74 | + * 第二个参数multiple:批量确认标志。如果值为true,包含本条消息在内的、所有比该消息deliveryTag值小的 消息都被拒绝了(除了已经被 ack 的以外);如果值为false,只拒绝三本条消息 | ||
| 75 | + * 第三个参数requeue:表示如何处理这条消息,如果值为true,则重新放入RabbitMQ的发送队列,如果值为false,则通知RabbitMQ销毁这条消息 | ||
| 76 | + */ | ||
| 77 | + //channel.basicNack(messageEntity.getMessageProperties().getDeliveryTag(), false,true); | ||
| 78 | + e.printStackTrace(); | ||
| 79 | + } | ||
| 80 | + } | ||
| 81 | +} |
| 1 | +package com.aukey.example.service.fbaStock; | ||
| 2 | + | ||
| 3 | +import com.aukey.example.entity.fbaStock.AmazonOrderItem; | ||
| 4 | + | ||
| 5 | +import java.util.List; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * @author: wgf | ||
| 9 | + * @create: 2020-08-25 14:36 | ||
| 10 | + * @description: | ||
| 11 | + **/ | ||
| 12 | +public interface AmazonOrderItemService { | ||
| 13 | + | ||
| 14 | + /** | ||
| 15 | + * demo 具体实现自己优化 | ||
| 16 | + * | ||
| 17 | + * @param list | ||
| 18 | + */ | ||
| 19 | + void insertOrUpdate(List<AmazonOrderItem> list); | ||
| 20 | + | ||
| 21 | + /** | ||
| 22 | + * demo 具体实现自己优化 | ||
| 23 | + * | ||
| 24 | + * @param list | ||
| 25 | + */ | ||
| 26 | + void delete(List<AmazonOrderItem> list); | ||
| 27 | +} |
| 1 | +package com.aukey.example.service.fbaStock; | ||
| 2 | + | ||
| 3 | +import com.aukey.example.entity.fbaStock.AmazonOrder; | ||
| 4 | + | ||
| 5 | +import java.util.List; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * @author: wgf | ||
| 9 | + * @create: 2020-08-25 14:36 | ||
| 10 | + * @description: | ||
| 11 | + **/ | ||
| 12 | +public interface AmazonOrderService { | ||
| 13 | + | ||
| 14 | + /** | ||
| 15 | + * demo 具体实现自己优化 | ||
| 16 | + * @param list | ||
| 17 | + */ | ||
| 18 | + void insertOrUpdate(List<AmazonOrder> list); | ||
| 19 | + | ||
| 20 | + /** | ||
| 21 | + * demo 具体实现自己优化 | ||
| 22 | + * @param list | ||
| 23 | + */ | ||
| 24 | + void delete(List<AmazonOrder> list); | ||
| 25 | +} |
| 1 | +package com.aukey.example.service.fbaStock.impl; | ||
| 2 | + | ||
| 3 | +import com.aukey.example.entity.fbaStock.AmazonOrderItem; | ||
| 4 | +import com.aukey.example.mapper.fbaStock.AmazonOrderItemMapper; | ||
| 5 | +import com.aukey.example.service.fbaStock.AmazonOrderItemService; | ||
| 6 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 7 | +import org.springframework.stereotype.Service; | ||
| 8 | +import org.springframework.transaction.annotation.Transactional; | ||
| 9 | + | ||
| 10 | +import java.util.List; | ||
| 11 | +import java.util.Objects; | ||
| 12 | + | ||
| 13 | +/** | ||
| 14 | + * @author: wgf | ||
| 15 | + * @create: 2020-08-25 14:36 | ||
| 16 | + * @description: | ||
| 17 | + **/ | ||
| 18 | +@Service | ||
| 19 | +public class AmazonOrderItemServiceImpl implements AmazonOrderItemService { | ||
| 20 | + | ||
| 21 | + @Autowired | ||
| 22 | + AmazonOrderItemMapper amazonOrderItemMapper; | ||
| 23 | + | ||
| 24 | + @Override | ||
| 25 | + @Transactional(value = "fbaStockTransactionManager") | ||
| 26 | + public void insertOrUpdate(List<AmazonOrderItem> list) { | ||
| 27 | + for (AmazonOrderItem amazonOrderItem : list) { | ||
| 28 | + AmazonOrderItem query = new AmazonOrderItem(); | ||
| 29 | + query.setAccountId(amazonOrderItem.getAccountId()); | ||
| 30 | + query.setAreaId(amazonOrderItem.getAreaId()); | ||
| 31 | + query.setAmazonOrderId(amazonOrderItem.getAmazonOrderId()); | ||
| 32 | + AmazonOrderItem existOrder = this.amazonOrderItemMapper.selectOne(query); | ||
| 33 | + | ||
| 34 | + // 主键和 headId不能使用 | ||
| 35 | + amazonOrderItem.setOrderHeaderId(null); | ||
| 36 | + if (Objects.isNull(existOrder)) { | ||
| 37 | + amazonOrderItem.setAid(null); | ||
| 38 | + this.amazonOrderItemMapper.insertSelective(amazonOrderItem); | ||
| 39 | + } else { | ||
| 40 | + amazonOrderItem.setAid(existOrder.getAid()); | ||
| 41 | + this.amazonOrderItemMapper.updateByPrimaryKeySelective(amazonOrderItem); | ||
| 42 | + } | ||
| 43 | + } | ||
| 44 | + } | ||
| 45 | + | ||
| 46 | + | ||
| 47 | + @Override | ||
| 48 | + @Transactional(value = "fbaStockTransactionManager") | ||
| 49 | + public void delete(List<AmazonOrderItem> list) { | ||
| 50 | + AmazonOrderItem condition = new AmazonOrderItem(); | ||
| 51 | + for (AmazonOrderItem amazonOrderItem : list) { | ||
| 52 | + condition.setAccountId(amazonOrderItem.getAccountId()); | ||
| 53 | + condition.setAreaId(amazonOrderItem.getAreaId()); | ||
| 54 | + condition.setAmazonOrderId(amazonOrderItem.getAmazonOrderId()); | ||
| 55 | + this.amazonOrderItemMapper.delete(condition); | ||
| 56 | + } | ||
| 57 | + } | ||
| 58 | +} |
| 1 | +package com.aukey.example.service.fbaStock.impl; | ||
| 2 | + | ||
| 3 | +import com.aukey.example.entity.fbaStock.AmazonOrder; | ||
| 4 | +import com.aukey.example.mapper.fbaStock.AmazonOrderMapper; | ||
| 5 | +import com.aukey.example.service.fbaStock.AmazonOrderService; | ||
| 6 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 7 | +import org.springframework.stereotype.Service; | ||
| 8 | +import org.springframework.transaction.annotation.Transactional; | ||
| 9 | + | ||
| 10 | +import java.util.List; | ||
| 11 | +import java.util.Objects; | ||
| 12 | + | ||
| 13 | +/** | ||
| 14 | + * @author: wgf | ||
| 15 | + * @create: 2020-08-25 14:36 | ||
| 16 | + * @description: | ||
| 17 | + **/ | ||
| 18 | +@Service | ||
| 19 | +public class AmazonOrderServiceImpl implements AmazonOrderService { | ||
| 20 | + | ||
| 21 | + @Autowired | ||
| 22 | + AmazonOrderMapper amazonOrderMapper; | ||
| 23 | + | ||
| 24 | + @Override | ||
| 25 | + @Transactional(value = "fbaStockTransactionManager") | ||
| 26 | + public void insertOrUpdate(List<AmazonOrder> list) { | ||
| 27 | + for (AmazonOrder amazonOrder : list) { | ||
| 28 | + AmazonOrder query = new AmazonOrder(); | ||
| 29 | + query.setAccountId(amazonOrder.getAccountId()); | ||
| 30 | + query.setAreaId(amazonOrder.getAreaId()); | ||
| 31 | + query.setAmazonOrderId(amazonOrder.getAmazonOrderId()); | ||
| 32 | + AmazonOrder existOrder = this.amazonOrderMapper.selectOne(query); | ||
| 33 | + | ||
| 34 | + // 主键不能使用 | ||
| 35 | + if (Objects.isNull(existOrder)) { | ||
| 36 | + amazonOrder.setAid(null); | ||
| 37 | + this.amazonOrderMapper.insertSelective(amazonOrder); | ||
| 38 | + } else { | ||
| 39 | + amazonOrder.setAid(existOrder.getAid()); | ||
| 40 | + this.amazonOrderMapper.updateByPrimaryKeySelective(amazonOrder); | ||
| 41 | + } | ||
| 42 | + } | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + | ||
| 46 | + @Override | ||
| 47 | + @Transactional(value = "fbaStockTransactionManager") | ||
| 48 | + public void delete(List<AmazonOrder> list) { | ||
| 49 | + AmazonOrder condition = new AmazonOrder(); | ||
| 50 | + for (AmazonOrder amazonOrder : list) { | ||
| 51 | + condition.setAccountId(amazonOrder.getAccountId()); | ||
| 52 | + condition.setAreaId(amazonOrder.getAreaId()); | ||
| 53 | + condition.setAmazonOrderId(amazonOrder.getAmazonOrderId()); | ||
| 54 | + this.amazonOrderMapper.delete(condition); | ||
| 55 | + } | ||
| 56 | + } | ||
| 57 | +} |
| @@ -12,3 +12,19 @@ spring: | @@ -12,3 +12,19 @@ spring: | ||
| 12 | acknowledge-mode: manual | 12 | acknowledge-mode: manual |
| 13 | simple: | 13 | simple: |
| 14 | acknowledge-mode: manual | 14 | acknowledge-mode: manual |
| 15 | + | ||
| 16 | + datasource: | ||
| 17 | + fba-stock: | ||
| 18 | + driver-class-name: com.mysql.jdbc.Driver | ||
| 19 | + jdbc-url: jdbc:mysql://10.1.1.86:3306/fba_stock?useUnicode=true&characterEncoding=utf8&useSSL=true&allowMultiQueries=true | ||
| 20 | + username: xmdo | ||
| 21 | + password: xmdao123#li | ||
| 22 | + | ||
| 23 | + max-idle: 20 | ||
| 24 | + min-idle: 20 | ||
| 25 | + initial-size: 20 | ||
| 26 | + max-wait: 10000 | ||
| 27 | + validation-query: SELECT 1 FROM DUAL | ||
| 28 | + test-on-borrow: false | ||
| 29 | + test-while-idle: true | ||
| 30 | + time-between-eviction-runs-millis: 18800 |
| 1 | +jdbc.driverClassName=com.mysql.jdbc.Driver | ||
| 2 | +jdbc.url=jdbc:mysql://10.1.1.86:3306/fba_stock?useUnicode=true&characterEncoding=utf8&useSSL=true&allowMultiQueries=true | ||
| 3 | +jdbc.username=xmdo | ||
| 4 | +jdbc.password=xmdao123#li | ||
| 5 | + | ||
| 6 | +targetModelPackage =com.aukey.example.entity.fbaStock | ||
| 7 | +targetJavaProject = src/main/java | ||
| 8 | +targetMapperPackage=com.aukey.example.mapper.fbaStock | ||
| 9 | +targetXMLPackage = mapper/fbaStock | ||
| 10 | +targetResourcesProject = src/main/resources | ||
| 11 | + | ||
| 12 | +tableName = amazon_order_item | ||
| 13 | + |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<!DOCTYPE generatorConfiguration | ||
| 3 | + PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" | ||
| 4 | + "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd"> | ||
| 5 | + | ||
| 6 | +<generatorConfiguration> | ||
| 7 | + | ||
| 8 | + <properties resource="generator/config.properties"/> | ||
| 9 | + | ||
| 10 | + <context id="Mysql" targetRuntime="MyBatis3Simple" defaultModelType="flat"> | ||
| 11 | + | ||
| 12 | + <plugin type="tk.mybatis.mapper.generator.MapperPlugin"> | ||
| 13 | + <property name="mappers" value="com.aukey.example.commom.mapper.Mapper"/> | ||
| 14 | + <!-- caseSensitive默认false,当数据库表名区分大小写时,可以将该属性设置为true --> | ||
| 15 | + <property name="caseSensitive" value="false"/> | ||
| 16 | + </plugin> | ||
| 17 | + | ||
| 18 | + <jdbcConnection driverClass="${jdbc.driverClassName}" | ||
| 19 | + connectionURL="${jdbc.url}" | ||
| 20 | + userId="${jdbc.username}" | ||
| 21 | + password="${jdbc.password}"> | ||
| 22 | + </jdbcConnection> | ||
| 23 | + | ||
| 24 | + <!-- model生成配置 --> | ||
| 25 | + <javaModelGenerator targetPackage="${targetModelPackage}" targetProject="${targetJavaProject}"/> | ||
| 26 | + | ||
| 27 | + <!-- xml映射文件生成配置 --> | ||
| 28 | + <sqlMapGenerator targetPackage="${targetXMLPackage}" targetProject="${targetResourcesProject}"/> | ||
| 29 | + | ||
| 30 | + <!-- mapper生成配置 --> | ||
| 31 | + <javaClientGenerator targetPackage="${targetMapperPackage}" targetProject="${targetJavaProject}" type="XMLMAPPER" /> | ||
| 32 | + | ||
| 33 | + <table tableName="${tableName}" > | ||
| 34 | + <generatedKey column="id" sqlStatement="Mysql" identity="true"/> | ||
| 35 | + </table> | ||
| 36 | + </context> | ||
| 37 | +</generatorConfiguration> |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
| 3 | +<mapper namespace="com.aukey.example.mapper.fbaStock.AmazonOrderItemMapper"> | ||
| 4 | + <resultMap id="BaseResultMap" type="com.aukey.example.entity.fbaStock.AmazonOrderItem"> | ||
| 5 | + <!-- | ||
| 6 | + WARNING - @mbg.generated | ||
| 7 | + --> | ||
| 8 | + <id column="aid" jdbcType="INTEGER" property="aid" /> | ||
| 9 | + <result column="amazon_order_id" jdbcType="VARCHAR" property="amazonOrderId" /> | ||
| 10 | + <result column="asin" jdbcType="VARCHAR" property="asin" /> | ||
| 11 | + <result column="seller_sku" jdbcType="VARCHAR" property="sellerSku" /> | ||
| 12 | + <result column="order_item_id" jdbcType="VARCHAR" property="orderItemId" /> | ||
| 13 | + <result column="quantity_ordered" jdbcType="INTEGER" property="quantityOrdered" /> | ||
| 14 | + <result column="quantity_shipped" jdbcType="INTEGER" property="quantityShipped" /> | ||
| 15 | + <result column="points_number" jdbcType="INTEGER" property="pointsNumber" /> | ||
| 16 | + <result column="points_currency_code" jdbcType="VARCHAR" property="pointsCurrencyCode" /> | ||
| 17 | + <result column="points_amount" jdbcType="DOUBLE" property="pointsAmount" /> | ||
| 18 | + <result column="item_price_currency_code" jdbcType="VARCHAR" property="itemPriceCurrencyCode" /> | ||
| 19 | + <result column="item_price_amount" jdbcType="DOUBLE" property="itemPriceAmount" /> | ||
| 20 | + <result column="shipping_price_currency_code" jdbcType="VARCHAR" property="shippingPriceCurrencyCode" /> | ||
| 21 | + <result column="shipping_price_amount" jdbcType="DOUBLE" property="shippingPriceAmount" /> | ||
| 22 | + <result column="gift_wrap_price_currency_code" jdbcType="VARCHAR" property="giftWrapPriceCurrencyCode" /> | ||
| 23 | + <result column="gift_wrap_price_amount" jdbcType="DOUBLE" property="giftWrapPriceAmount" /> | ||
| 24 | + <result column="item_tax_currency_code" jdbcType="VARCHAR" property="itemTaxCurrencyCode" /> | ||
| 25 | + <result column="item_tax_amount" jdbcType="DOUBLE" property="itemTaxAmount" /> | ||
| 26 | + <result column="shipping_tax_currency_code" jdbcType="VARCHAR" property="shippingTaxCurrencyCode" /> | ||
| 27 | + <result column="shipping_tax_amount" jdbcType="DOUBLE" property="shippingTaxAmount" /> | ||
| 28 | + <result column="gift_wrap_tax_currency_code" jdbcType="VARCHAR" property="giftWrapTaxCurrencyCode" /> | ||
| 29 | + <result column="gift_wrap_tax_amount" jdbcType="DOUBLE" property="giftWrapTaxAmount" /> | ||
| 30 | + <result column="shipping_discount_currency_code" jdbcType="VARCHAR" property="shippingDiscountCurrencyCode" /> | ||
| 31 | + <result column="shipping_discount_amount" jdbcType="DOUBLE" property="shippingDiscountAmount" /> | ||
| 32 | + <result column="promotion_discount_currency_code" jdbcType="VARCHAR" property="promotionDiscountCurrencyCode" /> | ||
| 33 | + <result column="promotion_discount_amount" jdbcType="DOUBLE" property="promotionDiscountAmount" /> | ||
| 34 | + <result column="promotion_ids" jdbcType="VARCHAR" property="promotionIds" /> | ||
| 35 | + <result column="cod_fee_currency_code" jdbcType="VARCHAR" property="codFeeCurrencyCode" /> | ||
| 36 | + <result column="cod_fee_amount" jdbcType="DOUBLE" property="codFeeAmount" /> | ||
| 37 | + <result column="cod_fee_discount_currency_code" jdbcType="VARCHAR" property="codFeeDiscountCurrencyCode" /> | ||
| 38 | + <result column="cod_fee_discount_amount" jdbcType="DOUBLE" property="codFeeDiscountAmount" /> | ||
| 39 | + <result column="gift_wrap_level" jdbcType="VARCHAR" property="giftWrapLevel" /> | ||
| 40 | + <result column="invoice_requirement" jdbcType="VARCHAR" property="invoiceRequirement" /> | ||
| 41 | + <result column="buyer_selected_invoice_category" jdbcType="VARCHAR" property="buyerSelectedInvoiceCategory" /> | ||
| 42 | + <result column="invoice_title" jdbcType="VARCHAR" property="invoiceTitle" /> | ||
| 43 | + <result column="invoice_information" jdbcType="VARCHAR" property="invoiceInformation" /> | ||
| 44 | + <result column="condition_note" jdbcType="VARCHAR" property="conditionNote" /> | ||
| 45 | + <result column="condition_id" jdbcType="VARCHAR" property="conditionId" /> | ||
| 46 | + <result column="condition_subtype_id" jdbcType="VARCHAR" property="conditionSubtypeId" /> | ||
| 47 | + <result column="scheduled_delivery_start_date" jdbcType="TIMESTAMP" property="scheduledDeliveryStartDate" /> | ||
| 48 | + <result column="scheduled_delivery_end_date" jdbcType="TIMESTAMP" property="scheduledDeliveryEndDate" /> | ||
| 49 | + <result column="price_designation" jdbcType="VARCHAR" property="priceDesignation" /> | ||
| 50 | + <result column="customized_url" jdbcType="VARCHAR" property="customizedUrl" /> | ||
| 51 | + <result column="fulfillment_channel" jdbcType="VARCHAR" property="fulfillmentChannel" /> | ||
| 52 | + <result column="account_id" jdbcType="INTEGER" property="accountId" /> | ||
| 53 | + <result column="account_code" jdbcType="VARCHAR" property="accountCode" /> | ||
| 54 | + <result column="area_id" jdbcType="INTEGER" property="areaId" /> | ||
| 55 | + <result column="area" jdbcType="VARCHAR" property="area" /> | ||
| 56 | + <result column="create_date" jdbcType="TIMESTAMP" property="createDate" /> | ||
| 57 | + <result column="update_date" jdbcType="TIMESTAMP" property="updateDate" /> | ||
| 58 | + <result column="order_header_id" jdbcType="INTEGER" property="orderHeaderId" /> | ||
| 59 | + <result column="title" jdbcType="LONGVARBINARY" property="titleAlias" /> | ||
| 60 | + <result column="gift_message_text" jdbcType="LONGVARBINARY" property="giftMessageText" /> | ||
| 61 | + </resultMap> | ||
| 62 | +</mapper> |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
| 3 | +<mapper namespace="com.aukey.example.mapper.fbaStock.AmazonOrderMapper"> | ||
| 4 | + <resultMap id="BaseResultMap" type="com.aukey.example.entity.fbaStock.AmazonOrder"> | ||
| 5 | + <!-- | ||
| 6 | + WARNING - @mbg.generated | ||
| 7 | + --> | ||
| 8 | + <id column="aid" jdbcType="INTEGER" property="aid" /> | ||
| 9 | + <result column="amazon_order_id" jdbcType="VARCHAR" property="amazonOrderId" /> | ||
| 10 | + <result column="seller_order_id" jdbcType="VARCHAR" property="sellerOrderId" /> | ||
| 11 | + <result column="purchase_date" jdbcType="TIMESTAMP" property="purchaseDate" /> | ||
| 12 | + <result column="payments_date" jdbcType="TIMESTAMP" property="paymentsDate" /> | ||
| 13 | + <result column="last_update_date" jdbcType="TIMESTAMP" property="lastUpdateDate" /> | ||
| 14 | + <result column="order_status" jdbcType="VARCHAR" property="orderStatus" /> | ||
| 15 | + <result column="fulfillment_channel" jdbcType="VARCHAR" property="fulfillmentChannel" /> | ||
| 16 | + <result column="sales_channel" jdbcType="VARCHAR" property="salesChannel" /> | ||
| 17 | + <result column="ship_service_level" jdbcType="VARCHAR" property="shipServiceLevel" /> | ||
| 18 | + <result column="shipping_address_city" jdbcType="VARCHAR" property="shippingAddressCity" /> | ||
| 19 | + <result column="shipping_address_county" jdbcType="VARCHAR" property="shippingAddressCounty" /> | ||
| 20 | + <result column="shipping_address_district" jdbcType="VARCHAR" property="shippingAddressDistrict" /> | ||
| 21 | + <result column="shipping_address_stateOrRegion" jdbcType="VARCHAR" property="shippingAddressStateorregion" /> | ||
| 22 | + <result column="shipping_address_postalCode" jdbcType="VARCHAR" property="shippingAddressPostalcode" /> | ||
| 23 | + <result column="shipping_address_countryCode" jdbcType="VARCHAR" property="shippingAddressCountrycode" /> | ||
| 24 | + <result column="shipping_address_phone" jdbcType="VARCHAR" property="shippingAddressPhone" /> | ||
| 25 | + <result column="order_total_currency_code" jdbcType="VARCHAR" property="orderTotalCurrencyCode" /> | ||
| 26 | + <result column="order_total_amount" jdbcType="DOUBLE" property="orderTotalAmount" /> | ||
| 27 | + <result column="postage_total" jdbcType="DOUBLE" property="postageTotal" /> | ||
| 28 | + <result column="discount_total" jdbcType="DOUBLE" property="discountTotal" /> | ||
| 29 | + <result column="number_of_items_shipped" jdbcType="INTEGER" property="numberOfItemsShipped" /> | ||
| 30 | + <result column="number_of_items_unshipped" jdbcType="INTEGER" property="numberOfItemsUnshipped" /> | ||
| 31 | + <result column="payment_method" jdbcType="VARCHAR" property="paymentMethod" /> | ||
| 32 | + <result column="marketplace_id" jdbcType="VARCHAR" property="marketplaceId" /> | ||
| 33 | + <result column="buyer_email" jdbcType="VARCHAR" property="buyerEmail" /> | ||
| 34 | + <result column="buyer_name" jdbcType="VARCHAR" property="buyerName" /> | ||
| 35 | + <result column="shipment_service_level_category" jdbcType="VARCHAR" property="shipmentServiceLevelCategory" /> | ||
| 36 | + <result column="shipped_by_amazon_tfm" jdbcType="CHAR" property="shippedByAmazonTfm" /> | ||
| 37 | + <result column="tfm_shipment_status" jdbcType="VARCHAR" property="tfmShipmentStatus" /> | ||
| 38 | + <result column="cba_displayable_shipping_label" jdbcType="VARCHAR" property="cbaDisplayableShippingLabel" /> | ||
| 39 | + <result column="order_type" jdbcType="VARCHAR" property="orderType" /> | ||
| 40 | + <result column="earliest_ship_date" jdbcType="TIMESTAMP" property="earliestShipDate" /> | ||
| 41 | + <result column="latest_ship_date" jdbcType="TIMESTAMP" property="latestShipDate" /> | ||
| 42 | + <result column="earliest_delivery_date" jdbcType="TIMESTAMP" property="earliestDeliveryDate" /> | ||
| 43 | + <result column="latest_delivery_date" jdbcType="TIMESTAMP" property="latestDeliveryDate" /> | ||
| 44 | + <result column="is_business_order" jdbcType="CHAR" property="isBusinessOrder" /> | ||
| 45 | + <result column="purchase_order_number" jdbcType="VARCHAR" property="purchaseOrderNumber" /> | ||
| 46 | + <result column="is_prime" jdbcType="CHAR" property="isPrime" /> | ||
| 47 | + <result column="is_premium_order" jdbcType="CHAR" property="isPremiumOrder" /> | ||
| 48 | + <result column="is_import_ed" jdbcType="CHAR" property="isImportEd" /> | ||
| 49 | + <result column="import_ed_date" jdbcType="TIMESTAMP" property="importEdDate" /> | ||
| 50 | + <result column="import_sys_date" jdbcType="TIMESTAMP" property="importSysDate" /> | ||
| 51 | + <result column="account_id" jdbcType="INTEGER" property="accountId" /> | ||
| 52 | + <result column="account_code" jdbcType="VARCHAR" property="accountCode" /> | ||
| 53 | + <result column="area_id" jdbcType="INTEGER" property="areaId" /> | ||
| 54 | + <result column="area" jdbcType="VARCHAR" property="area" /> | ||
| 55 | + <result column="create_date" jdbcType="TIMESTAMP" property="createDate" /> | ||
| 56 | + <result column="update_date" jdbcType="TIMESTAMP" property="updateDate" /> | ||
| 57 | + <result column="order_item_status" jdbcType="VARCHAR" property="orderItemStatus" /> | ||
| 58 | + <result column="shipping_address_name" jdbcType="BLOB" property="shippingAddressName" /> | ||
| 59 | + <result column="shipping_address_line1" jdbcType="BLOB" property="shippingAddressLine1" /> | ||
| 60 | + <result column="shipping_address_line2" jdbcType="BLOB" property="shippingAddressLine2" /> | ||
| 61 | + <result column="shipping_address_line3" jdbcType="BLOB" property="shippingAddressLine3" /> | ||
| 62 | + </resultMap> | ||
| 63 | +</mapper> |
-
请 注册 或 登录 后发表评论