Merge branch 'dev-feature_分库分表v1.0'
Conflicts: com.sibu.orderHelper.service/pom.xml
正在显示
57 个修改的文件
包含
1697 行增加
和
201 行删除
| ... | @@ -13,7 +13,6 @@ | ... | @@ -13,7 +13,6 @@ |
| 13 | <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> | 13 | <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> |
| 14 | <sourceFolder url="file://$MODULE_DIR$/src/main/resources/META-INF/conf" type="java-resource" /> | 14 | <sourceFolder url="file://$MODULE_DIR$/src/main/resources/META-INF/conf" type="java-resource" /> |
| 15 | <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> | 15 | <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> |
| 16 | <excludeFolder url="file://$MODULE_DIR$/target" /> | ||
| 17 | </content> | 16 | </content> |
| 18 | <orderEntry type="inheritedJdk" /> | 17 | <orderEntry type="inheritedJdk" /> |
| 19 | <orderEntry type="sourceFolder" forTests="false" /> | 18 | <orderEntry type="sourceFolder" forTests="false" /> | ... | ... |
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <beans xmlns:dubbo="http://code.alibabatech.com/schema/dubbo" | ||
| 3 | xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| 4 | xmlns:mvc="http://www.springframework.org/schema/mvc" | ||
| 5 | xmlns:context="http://www.springframework.org/schema/context" | ||
| 6 | xsi:schemaLocation="http://www.springframework.org/schema/beans | ||
| 7 | http://www.springframework.org/schema/beans/spring-beans.xsd | ||
| 8 | http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd | ||
| 9 | http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> | ||
| 10 | |||
| 11 | <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> | ||
| 12 | <property name="locations"> | ||
| 13 | <list> | ||
| 14 | <value>classpath:META-INF/conf/dubbo.properties</value> | ||
| 15 | </list> | ||
| 16 | </property> | ||
| 17 | </bean> | ||
| 18 | |||
| 19 | <!-- zookeeper注册中心 --> | ||
| 20 | <dubbo:registry protocol="zookeeper" address="${dubbo.registryAddress}" /> | ||
| 21 | |||
| 22 | <!-- 远程服务代理接口 --> | ||
| 23 | <dubbo:annotation package="com.sibu.mall.order" /> | ||
| 24 | |||
| 25 | <!-- 关闭提供者的检索 --> | ||
| 26 | <dubbo:consumer check="false" group="${dubbo.consumer.group}" version="${dubbo.consumerVersion}"/> | ||
| 27 | |||
| 28 | <!-- 服务调用超时,超时重试--> | ||
| 29 | <dubbo:provider delay="-1" timeout="${dubbo.connectTimeOut}" retries="${dubbo.connectRetries}"/> | ||
| 30 | |||
| 31 | <!-- 消费者名称 --> | ||
| 32 | <dubbo:application name="${dubbo.applicationName}" /> | ||
| 33 | |||
| 34 | </beans> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | ##################### dubbo begin ############################# | ||
| 2 | dubbo.registryAddress = zookeeper://111.230.133.155:2181?backup=111.231.243.221:2181,118.89.51.164:2181 | ||
| 3 | dubbo.applicationName = mall-third-consumer | ||
| 4 | dubbo.connectTimeOut = 20000 | ||
| 5 | dubbo.connectRetries= 0 | ||
| 6 | dubbo.consumer.group= dev.sso.qiujw | ||
| 7 | dubbo.consumerVersion= 1.0 | ||
| 8 | ##################### dubbo end ############################# |
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <beans xmlns:dubbo="http://code.alibabatech.com/schema/dubbo" | ||
| 3 | xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| 4 | xmlns:mvc="http://www.springframework.org/schema/mvc" | ||
| 5 | xmlns:context="http://www.springframework.org/schema/context" | ||
| 6 | xsi:schemaLocation="http://www.springframework.org/schema/beans | ||
| 7 | http://www.springframework.org/schema/beans/spring-beans.xsd | ||
| 8 | http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd | ||
| 9 | http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> | ||
| 10 | |||
| 11 | <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> | ||
| 12 | <property name="locations"> | ||
| 13 | <list> | ||
| 14 | <value>classpath:META-INF/conf/dubbo.properties</value> | ||
| 15 | </list> | ||
| 16 | </property> | ||
| 17 | </bean> | ||
| 18 | |||
| 19 | <!-- zookeeper注册中心 --> | ||
| 20 | <dubbo:registry protocol="zookeeper" address="${dubbo.registryAddress}" /> | ||
| 21 | |||
| 22 | <!-- 远程服务代理接口 --> | ||
| 23 | <dubbo:annotation package="com.sibu.mall.order" /> | ||
| 24 | |||
| 25 | <!-- 关闭提供者的检索 --> | ||
| 26 | <dubbo:consumer check="false" group="${dubbo.consumer.group}" version="${dubbo.consumerVersion}"/> | ||
| 27 | |||
| 28 | <!-- 服务调用超时,超时重试--> | ||
| 29 | <dubbo:provider delay="-1" timeout="${dubbo.connectTimeOut}" retries="${dubbo.connectRetries}"/> | ||
| 30 | |||
| 31 | <!-- 消费者名称 --> | ||
| 32 | <dubbo:application name="${dubbo.applicationName}" /> | ||
| 33 | |||
| 34 | </beans> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | ##################### dubbo begin ############################# | ||
| 2 | dubbo.registryAddress = zookeeper://172.16.2.29:2181?backup=172.16.2.48:2181,172.16.2.31:2181 | ||
| 3 | dubbo.applicationName = mall-third-api-consumer | ||
| 4 | dubbo.connectTimeOut = 20000 | ||
| 5 | dubbo.connectRetries= 0 | ||
| 6 | dubbo.consumer.group= sibu.mall.pro | ||
| 7 | dubbo.consumerVersion= pro-1.0.1 | ||
| 8 | ##################### dubbo end ############################# |
| ... | @@ -4,6 +4,19 @@ jdbc.driverClassName=com.mysql.jdbc.Driver | ... | @@ -4,6 +4,19 @@ jdbc.driverClassName=com.mysql.jdbc.Driver |
| 4 | #数据库url | 4 | #数据库url |
| 5 | jdbc.imtegralurl=jdbc:mysql://10.170.4.106/sibu_integralmall_base?useUnicode=true&characterEncoding=utf8 | 5 | jdbc.imtegralurl=jdbc:mysql://10.170.4.106/sibu_integralmall_base?useUnicode=true&characterEncoding=utf8 |
| 6 | 6 | ||
| 7 | mall.write.url=jdbc:mysql://172.16.0.79:3306/ejavashop?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&autoReconnect=true&failOverReadOnly=false | ||
| 8 | mall.write.username=sibu_integralmall | ||
| 9 | mall.write.password=09NWaUZUNjjr0IRCYzm3 | ||
| 10 | mall.read.url=jdbc:mysql://172.16.0.136:3306/ejavashop?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&autoReconnect=true&failOverReadOnly=false | ||
| 11 | mall.read.username=sibu_read | ||
| 12 | mall.read.password=vOrTcmMxqNdqkD0c5a7wlQ== | ||
| 13 | mall.analysis.write.url=jdbc:mysql://172.16.0.17:3306/ejavashop_analysis | ||
| 14 | mall.analysis.write.username=sibu_integralmall | ||
| 15 | mall.analysis.write.password=09NWaUZUNjjr0IRCYzm3 | ||
| 16 | mall.analysis.read.url=jdbc:mysql://172.16.0.4:3306/ejavashop_analysis | ||
| 17 | mall.analysis.read.username=sibu_read | ||
| 18 | mall.analysis.read.password=vOrTcmMxqNdqkD0c5a7wlQ== | ||
| 19 | |||
| 7 | #数据库用户名 | 20 | #数据库用户名 |
| 8 | jdbc.imtegralusername=sibu_integralmall | 21 | jdbc.imtegralusername=sibu_integralmall |
| 9 | 22 | ... | ... |
| ... | @@ -7,9 +7,9 @@ | ... | @@ -7,9 +7,9 @@ |
| 7 | 7 | ||
| 8 | <bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close"> | 8 | <bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close"> |
| 9 | <!-- 基本属性 url、user、password --> | 9 | <!-- 基本属性 url、user、password --> |
| 10 | <property name="url" value="${jdbc.imtegralurl}"/> | 10 | <property name="url" value="${mall.read.url}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true" /> |
| 11 | <property name="username" value="${jdbc.imtegralusername}"/> | 11 | <property name="username" value="${mall.read.username}" /> |
| 12 | <property name="password" value="${jdbc.imtegralpassword}"/> | 12 | <property name="password" value="${mall.read.password}" /> |
| 13 | <property name="driverClassName" value="${jdbc.driverClassName}"/> | 13 | <property name="driverClassName" value="${jdbc.driverClassName}"/> |
| 14 | 14 | ||
| 15 | <!-- 配置初始化大小、最小、最大 --> | 15 | <!-- 配置初始化大小、最小、最大 --> | ... | ... |
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <beans xmlns:dubbo="http://code.alibabatech.com/schema/dubbo" | ||
| 3 | xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| 4 | xmlns:mvc="http://www.springframework.org/schema/mvc" | ||
| 5 | xmlns:context="http://www.springframework.org/schema/context" | ||
| 6 | xsi:schemaLocation="http://www.springframework.org/schema/beans | ||
| 7 | http://www.springframework.org/schema/beans/spring-beans.xsd | ||
| 8 | http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd | ||
| 9 | http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"> | ||
| 10 | |||
| 11 | <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> | ||
| 12 | <property name="locations"> | ||
| 13 | <list> | ||
| 14 | <value>classpath:META-INF/conf/dubbo.properties</value> | ||
| 15 | </list> | ||
| 16 | </property> | ||
| 17 | </bean> | ||
| 18 | |||
| 19 | <!-- zookeeper注册中心 --> | ||
| 20 | <dubbo:registry protocol="zookeeper" address="${dubbo.registryAddress}" /> | ||
| 21 | |||
| 22 | <!-- 远程服务代理接口 --> | ||
| 23 | <dubbo:annotation package="com.sibu.mall.order" /> | ||
| 24 | |||
| 25 | <!-- 关闭提供者的检索 --> | ||
| 26 | <dubbo:consumer check="false" group="${dubbo.consumer.group}" version="${dubbo.consumerVersion}"/> | ||
| 27 | |||
| 28 | <!-- 服务调用超时,超时重试--> | ||
| 29 | <dubbo:provider delay="-1" timeout="${dubbo.connectTimeOut}" retries="${dubbo.connectRetries}"/> | ||
| 30 | |||
| 31 | <!-- 消费者名称 --> | ||
| 32 | <dubbo:application name="${dubbo.applicationName}" /> | ||
| 33 | |||
| 34 | </beans> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 1 | ##################### dubbo begin ############################# | ||
| 2 | dubbo.registryAddress = zookeeper://111.230.133.155:2181?backup=111.231.243.221:2181,118.89.51.164:2181 | ||
| 3 | dubbo.applicationName = mall-third-consumer | ||
| 4 | dubbo.connectTimeOut = 20000 | ||
| 5 | dubbo.connectRetries= 0 | ||
| 6 | dubbo.consumer.group= dev.sso.qiujw | ||
| 7 | dubbo.consumerVersion= wangzhiliang2 | ||
| 8 | ##################### dubbo end ############################# |
| ... | @@ -7,6 +7,19 @@ jdbc.url=jdbc:mysql://120.76.137.184/sibu_wesale_base?useUnicode=true&characterE | ... | @@ -7,6 +7,19 @@ jdbc.url=jdbc:mysql://120.76.137.184/sibu_wesale_base?useUnicode=true&characterE |
| 7 | jdbc.imtegralurl=jdbc:mysql://120.76.137.184/sibu_integralmall_base?useUnicode=true&characterEncoding=utf8 | 7 | jdbc.imtegralurl=jdbc:mysql://120.76.137.184/sibu_integralmall_base?useUnicode=true&characterEncoding=utf8 |
| 8 | sqlserverjdbc.url=jdbc\:jtds\:sqlserver\://120.25.75.53\:1433;databaseName\=sibu_wesale_base_read_03 | 8 | sqlserverjdbc.url=jdbc\:jtds\:sqlserver\://120.25.75.53\:1433;databaseName\=sibu_wesale_base_read_03 |
| 9 | 9 | ||
| 10 | mall.write.url=jdbc:mysql://118.89.51.164:3306/ejavashop | ||
| 11 | mall.write.username=sibu_wesale | ||
| 12 | mall.write.password=6SvbL5+JhXQSpf+ASsQ0Rg== | ||
| 13 | mall.read.url=jdbc:mysql://111.231.243.221:3306/ejavashop | ||
| 14 | mall.read.username=sibu_wesale | ||
| 15 | mall.read.password=6SvbL5+JhXQSpf+ASsQ0Rg== | ||
| 16 | mall.analysis.write.url=jdbc:mysql://118.89.51.164:3306/analysis | ||
| 17 | mall.analysis.write.username=sibu_wesale | ||
| 18 | mall.analysis.write.password=6SvbL5+JhXQSpf+ASsQ0Rg== | ||
| 19 | mall.analysis.read.url=jdbc:mysql://111.231.243.221:3306/analysis | ||
| 20 | mall.analysis.read.username=sibu_wesale | ||
| 21 | mall.analysis.read.password=6SvbL5+JhXQSpf+ASsQ0Rg== | ||
| 22 | |||
| 10 | #数据库用户名 | 23 | #数据库用户名 |
| 11 | jdbc.username=root | 24 | jdbc.username=root |
| 12 | sqlserverjdbc.username=sa | 25 | sqlserverjdbc.username=sa | ... | ... |
| ... | @@ -84,8 +84,8 @@ public class UTF8StringHttpMessageConverter extends AbstractHttpMessageConverter | ... | @@ -84,8 +84,8 @@ public class UTF8StringHttpMessageConverter extends AbstractHttpMessageConverter |
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | private Charset getContentTypeCharset(MediaType contentType) { | 86 | private Charset getContentTypeCharset(MediaType contentType) { |
| 87 | if (contentType != null && contentType.getCharSet() != null) { | 87 | if (contentType != null && contentType.getCharset() != null) { |
| 88 | return contentType.getCharSet(); | 88 | return contentType.getCharset(); |
| 89 | } | 89 | } |
| 90 | else { | 90 | else { |
| 91 | return DEFAULT_CHARSET; | 91 | return DEFAULT_CHARSET; | ... | ... |
| ... | @@ -84,8 +84,8 @@ public class UTF8StringHttpMessageConverter extends AbstractHttpMessageConverter | ... | @@ -84,8 +84,8 @@ public class UTF8StringHttpMessageConverter extends AbstractHttpMessageConverter |
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | private Charset getContentTypeCharset(MediaType contentType) { | 86 | private Charset getContentTypeCharset(MediaType contentType) { |
| 87 | if (contentType != null && contentType.getCharSet() != null) { | 87 | if (contentType != null && contentType.getCharset() != null) { |
| 88 | return contentType.getCharSet(); | 88 | return contentType.getCharset(); |
| 89 | } | 89 | } |
| 90 | else { | 90 | else { |
| 91 | return DEFAULT_CHARSET; | 91 | return DEFAULT_CHARSET; | ... | ... |
com.sibu.orderHelper.common/src/main/java/com/sibu/orderHelper/common/util/BeanCopyUtils.java
0 → 100644
此文件的差异被折叠,
点击展开。
| 1 | #redis连接 | 1 | #redis连接 |
| 2 | address1=120.76.137.184:6379 | 2 | address1=10.116.35.133:6379 |
| 3 | address2=120.76.137.184:6380 | 3 | address2=10.116.35.133:6380 |
| 4 | address3=120.24.234.38:6379 | 4 | address3=10.170.13.1:6379 |
| 5 | address4=120.24.234.38:6380 | 5 | address4=10.170.13.1:6380 |
| 6 | address5=120.24.65.223:6379 | 6 | address5=10.44.79.57:6379 |
| 7 | address6=120.24.65.223:6380 | 7 | address6=10.44.79.57:6380 |
| 8 | 8 | ||
| 9 | maxRedirections=6 | 9 | maxRedirections=6 |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| 1 | package com.sibu.orderHelper.integral.dao; | 1 | package com.sibu.orderHelper.integral.dao; |
| 2 | import com.sibu.orderHelper.integral.model.*; | 2 | import com.sibu.orderHelper.integral.model.*; |
| 3 | import com.sibu.orderHelper.integral.pineapple.model.*; | ||
| 4 | import com.sibu.orderHelper.integral.pineapple.response.OrderResponse; | ||
| 3 | import com.sibu.orderHelper.integral.reponse.CheckRefundStatusResponse; | 5 | import com.sibu.orderHelper.integral.reponse.CheckRefundStatusResponse; |
| 4 | import com.sibu.orderHelper.integral.reponse.DoingOrderDetailResponse; | 6 | import com.sibu.orderHelper.integral.reponse.DoingOrderDetailResponse; |
| 5 | import com.sibu.orderHelper.integral.reponse.SkuApiResponse; | 7 | import com.sibu.orderHelper.integral.reponse.SkuApiResponse; |
| ... | @@ -11,147 +13,127 @@ import java.util.Map; | ... | @@ -11,147 +13,127 @@ import java.util.Map; |
| 11 | public interface PineappleDao { | 13 | public interface PineappleDao { |
| 12 | 14 | ||
| 13 | /** | 15 | /** |
| 14 | * 退货退款单下载 | 16 | * 根据订单号查询订单信息 只查询不是主订单的订单 |
| 15 | * @param params | 17 | * @param params |
| 16 | * @return | 18 | * @return |
| 17 | */ | 19 | */ |
| 18 | List<GetRefundBean> pageGetRefundBean(Map<String,Object> params)throws Exception; | 20 | Orders getOrdersByMap(Map<String,Object> params); |
| 19 | |||
| 20 | PineappleOderDetailBean getOneIMOrderById(Map<String,Object> map)throws Exception; | ||
| 21 | |||
| 22 | |||
| 23 | |||
| 24 | |||
| 25 | |||
| 26 | //获取api中的商品详情 | ||
| 27 | IMAPIProductBean getApiProductDetailById(@Param("productId") String productId) throws Exception; | ||
| 28 | |||
| 29 | |||
| 30 | |||
| 31 | //根据条件查询退款订单 | ||
| 32 | int countCheckRefundStatusResponse(Map<String,Object> params)throws Exception; | ||
| 33 | 21 | ||
| 34 | /** | 22 | /** |
| 35 | * 根据条件判断该订单是否有成功过的退款记录 | 23 | * 修改订单备注 |
| 36 | * @param params | 24 | * @param params |
| 37 | * @return | 25 | * @return |
| 38 | * @throws Exception | ||
| 39 | */ | 26 | */ |
| 40 | IMDoingOrderBean getIMDoingOrderBean(Map<String,Object> params)throws Exception; | 27 | int updateOdersRemark(Map<String,Object> params); |
| 41 | |||
| 42 | 28 | ||
| 43 | /** | 29 | /** |
| 44 | * 根据orderCode查询成功退款明细记录 | 30 | * 查询该订单是否有该快递单号 |
| 45 | * @param orderCode | 31 | * @param params |
| 46 | * @return | 32 | * @return |
| 47 | * @throws Exception | ||
| 48 | */ | 33 | */ |
| 49 | List<CheckRefundStatusBean> childrenrefundStatusBySuccess(@Param("orderCode")String orderCode)throws Exception; | 34 | int checkLogisticsNumber(Map<String,Object> params); |
| 50 | |||
| 51 | 35 | ||
| 52 | /** | 36 | /** |
| 53 | * 根据条件判断该订单是否有退款中的退款记录 | 37 | * 订单发货更新订单状态与信息 |
| 54 | * @param orderCode | 38 | * @param params |
| 55 | * @return | 39 | * @return |
| 56 | * @throws Exception | ||
| 57 | */ | 40 | */ |
| 58 | List<CheckRefundStatusBean> childrenrefundStatusByCourse(@Param("orderCode")String orderCode)throws Exception; | 41 | int updateOrdersState(Map<String,Object> params); |
| 59 | 42 | ||
| 60 | 43 | ||
| 61 | /** | 44 | /** |
| 62 | * 根据条件查询产品 | 45 | * 商品下载 |
| 63 | * @param params | 46 | * @param params |
| 64 | * @return | 47 | * @return |
| 65 | * @throws Exception | ||
| 66 | */ | 48 | */ |
| 67 | IMProductBean getIMProductBeanByMap(Map<String,Object> params)throws Exception; | 49 | List<DownloadProductBean> downloadProductListByMap(Map<String,Object> params); |
| 68 | 50 | ||
| 69 | 51 | ||
| 70 | /** | 52 | /** |
| 71 | * 修改订单备注 | 53 | * 根据条件查询商品 |
| 72 | * @param params | 54 | * @param params |
| 73 | * @return | 55 | * @return |
| 74 | */ | 56 | */ |
| 75 | int updateSelle(Map<String,Object> params)throws Exception; | 57 | DownloadProductBean getDownloadProductBeanByMap(Map<String,Object> params); |
| 76 | 58 | ||
| 77 | /** | 59 | /** |
| 78 | * 订单发货 | 60 | * 根据商品ID获取该商品的所有SKU |
| 79 | * @param params | 61 | * @param productId |
| 80 | * @return | 62 | * @return |
| 81 | * @throws Exception | ||
| 82 | */ | 63 | */ |
| 83 | int updateBusinessSend(Map<String,Object> params)throws Exception; | 64 | List<DownloadProductSkuBean> downloadSkuByProductId(@Param("productId") String productId); |
| 84 | 65 | ||
| 85 | /** | 66 | /** |
| 86 | * 订单发货时判断订单号是否存在,已存在就不添加该订单号 | 67 | * 根据条件更新sku库存 |
| 87 | * @param params | 68 | * @param params |
| 88 | * @return | 69 | * @return |
| 89 | * @throws Exception | ||
| 90 | */ | 70 | */ |
| 91 | int getOrderByMap(Map<String,Object> params)throws Exception; | 71 | int updateSkuStock(Map<String,Object> params); |
| 92 | 72 | ||
| 93 | /** | 73 | /** |
| 94 | * 根据条件查SKU | 74 | * 根据商品ID更新商品库存 |
| 95 | * @param params | 75 | * @param params |
| 96 | * @return | 76 | * @return |
| 97 | * @throws Exception | ||
| 98 | */ | 77 | */ |
| 99 | SkuBean getSkuBeanByMap(Map<String,Object> params)throws Exception; | 78 | int updateProductStock(Map<String,Object> params); |
| 100 | 79 | ||
| 101 | /** | 80 | /** |
| 102 | * 根据产品ID查询所有SKU | 81 | * 订单下载 |
| 103 | * @param productId | 82 | * @param params |
| 104 | * @return | 83 | * @return |
| 105 | * @throws Exception | ||
| 106 | */ | 84 | */ |
| 107 | List<SkuApiResponse> getSkuBeanListByMap(String productId)throws Exception; | 85 | List<Orders> getOrdersList(Map<String,Object> params); |
| 108 | 86 | ||
| 109 | /** | 87 | /** |
| 110 | * 更新SKU库存 | 88 | * 子订单查询 |
| 111 | * @param skuBean | 89 | * @param orderSn |
| 112 | * @return | 90 | * @return |
| 113 | * @throws Exception | ||
| 114 | */ | 91 | */ |
| 115 | int updateSku(SkuBean skuBean)throws Exception; | 92 | List<OrdersProduct> getOrdersProductList(@Param("orderSn")String orderSn); |
| 116 | 93 | ||
| 117 | //更新产品库存 | ||
| 118 | int updateProductInventory(IMProductInventory productInventory) throws Exception; | ||
| 119 | 94 | ||
| 120 | /** | 95 | /** |
| 121 | * 更新产品库存 | 96 | * 根据条件查询省市级信息 |
| 122 | * @param params | 97 | * @param params |
| 123 | * @return | 98 | * @return |
| 124 | * @throws Exception | ||
| 125 | */ | 99 | */ |
| 126 | int updateProduct(Map<String,Object> params)throws Exception; | 100 | Regions getRegionsByMap(Map<String,Object> params); |
| 101 | |||
| 102 | /** | ||
| 103 | * 根据id查询省市级信息 | ||
| 104 | * @param id | ||
| 105 | * @return | ||
| 106 | */ | ||
| 107 | Regions getRegionsById(@Param("id") Integer id); | ||
| 127 | 108 | ||
| 128 | 109 | ||
| 129 | /** | 110 | /** |
| 130 | * 商品下载 查询产品 | 111 | * 根据条件查询物流公司 |
| 131 | * @param params | ||
| 132 | * @return | 112 | * @return |
| 133 | * @throws Exception | ||
| 134 | */ | 113 | */ |
| 135 | List<DownloadProductBean> getProductListByMap(Map<String,Object> params)throws Exception; | 114 | List<CourierCompany> getCourierCompanyByName(Map<String,Object> params); |
| 136 | 115 | ||
| 137 | /** | 116 | /** |
| 138 | * 根据产品ID查询SKU | 117 | * 根据订单号查询退货信息 |
| 139 | * @param productid | 118 | * @param orderSn |
| 140 | * @return | 119 | * @return |
| 141 | * @throws Exception | ||
| 142 | */ | 120 | */ |
| 143 | List<DownloadProductSkuBean> getDownloadProductSkuBeanList(String productid)throws Exception; | 121 | List<MemberProductBack> getMemberProductBackByOrderSn(@Param("orderSn") String orderSn); |
| 144 | 122 | ||
| 145 | /** | 123 | /** |
| 146 | * 根据产品ID查询SKU属性 | 124 | * 根据订单号查询换货信息 |
| 147 | * @param skuId | 125 | * @param orderSn |
| 148 | * @return | 126 | * @return |
| 149 | * @throws Exception | ||
| 150 | */ | 127 | */ |
| 151 | List<DownloadProductSkuBean> getDownloadSkuBean(@Param("skuId") String skuId)throws Exception; | 128 | List<MemberProductExchange> getMemberProductExchangeByOrderSn(@Param("orderSn") String orderSn); |
| 129 | |||
| 152 | 130 | ||
| 131 | /** | ||
| 132 | * 根据订单ID查询投诉表 | ||
| 133 | * @param id | ||
| 134 | * @return | ||
| 135 | */ | ||
| 136 | List<SellerComplaint> getSellerComplaintByOrderId(@Param("orderId") Integer id); | ||
| 153 | 137 | ||
| 154 | IMDoingOrderBean getOrderListByMap(Map<String,Object> params)throws Exception; | ||
| 155 | 138 | ||
| 156 | IMProductBean getIMProductBeanById(@Param("productId") String productId)throws Exception; | ||
| 157 | } | 139 | } | ... | ... |
com.sibu.orderHelper.dao/src/main/java/com/sibu/orderHelper/mall/member/read/MemberReadDao.java
0 → 100644
| 1 | package com.sibu.orderHelper.mall.member.read; | ||
| 2 | |||
| 3 | import com.sibu.orderHelper.integral.model.DownloadProductBean; | ||
| 4 | import com.sibu.orderHelper.integral.model.DownloadProductSkuBean; | ||
| 5 | import com.sibu.orderHelper.integral.model.GetRefundBean; | ||
| 6 | import com.sibu.orderHelper.integral.model.IMSupplierApp; | ||
| 7 | import com.sibu.orderHelper.integral.pineapple.model.*; | ||
| 8 | import com.sibu.orderHelper.integral.reponse.MemberAddressResponse; | ||
| 9 | import com.sibu.orderHelper.integral.request.GetRefundRequest; | ||
| 10 | import com.sibu.orderHelper.integral.request.MemberAddressAddRequest; | ||
| 11 | import org.apache.ibatis.annotations.Param; | ||
| 12 | |||
| 13 | import java.util.List; | ||
| 14 | import java.util.Map; | ||
| 15 | |||
| 16 | public interface MemberReadDao { | ||
| 17 | Integer count(); | ||
| 18 | |||
| 19 | |||
| 20 | IMSupplierApp findByAppIdAndAppType(Map<String, String> params); | ||
| 21 | /** | ||
| 22 | * 根据订单号查询订单信息 只查询不是主订单的订单 | ||
| 23 | * @param params | ||
| 24 | * @return | ||
| 25 | */ | ||
| 26 | Orders getOrdersByMap(Map<String,Object> params); | ||
| 27 | |||
| 28 | /** | ||
| 29 | * 查询该订单是否有该快递单号 | ||
| 30 | * @param params | ||
| 31 | * @return | ||
| 32 | */ | ||
| 33 | int checkLogisticsNumber(Map<String,Object> params); | ||
| 34 | |||
| 35 | /** | ||
| 36 | * 商品下载 | ||
| 37 | * @param params | ||
| 38 | * @return | ||
| 39 | */ | ||
| 40 | List<DownloadProductBean> downloadProductListByMap(Map<String,Object> params); | ||
| 41 | |||
| 42 | |||
| 43 | /** | ||
| 44 | * 商品下载总数量 | ||
| 45 | * @param params | ||
| 46 | * @return | ||
| 47 | */ | ||
| 48 | int countDownloadProductListByMap(Map<String,Object> params); | ||
| 49 | |||
| 50 | |||
| 51 | /** | ||
| 52 | * 根据条件查询商品 | ||
| 53 | * @param params | ||
| 54 | * @return | ||
| 55 | */ | ||
| 56 | DownloadProductBean getDownloadProductBeanByMap(Map<String,Object> params); | ||
| 57 | |||
| 58 | /** | ||
| 59 | * 根据商品ID获取该商品的所有SKU | ||
| 60 | * @param productId | ||
| 61 | * @return | ||
| 62 | */ | ||
| 63 | List<DownloadProductSkuBean> downloadSkuByProductId(@Param("productId") String productId); | ||
| 64 | |||
| 65 | /** | ||
| 66 | * 订单下载 | ||
| 67 | * @param params | ||
| 68 | * @return | ||
| 69 | */ | ||
| 70 | List<Orders> getOrdersList(Map<String,Object> params); | ||
| 71 | |||
| 72 | |||
| 73 | /** | ||
| 74 | * 订单下载总数 | ||
| 75 | * @param params | ||
| 76 | * @return | ||
| 77 | */ | ||
| 78 | int countgetOrdersList(Map<String,Object> params); | ||
| 79 | |||
| 80 | /** | ||
| 81 | * 子订单查询 | ||
| 82 | * @param orderSn | ||
| 83 | * @return | ||
| 84 | */ | ||
| 85 | List<OrdersProduct> getOrdersProductList(@Param("orderSn")String orderSn); | ||
| 86 | |||
| 87 | |||
| 88 | /** | ||
| 89 | * 根据条件查询省市级信息 | ||
| 90 | * @param params | ||
| 91 | * @return | ||
| 92 | */ | ||
| 93 | List<Regions> getRegionsByMap(Map<String,Object> params); | ||
| 94 | |||
| 95 | /** | ||
| 96 | * 根据id查询省市级信息 | ||
| 97 | * @param id | ||
| 98 | * @return | ||
| 99 | */ | ||
| 100 | Regions getRegionsById(@Param("id") Integer id); | ||
| 101 | |||
| 102 | /** | ||
| 103 | * 根据id查询省市级信息 | ||
| 104 | * @param regionIdList | ||
| 105 | * @return | ||
| 106 | */ | ||
| 107 | List<Regions> getRegionsByIds(@Param("list") List regionIdList); | ||
| 108 | |||
| 109 | |||
| 110 | /** | ||
| 111 | * 根据条件查询物流公司 | ||
| 112 | * @return | ||
| 113 | */ | ||
| 114 | List<CourierCompany> getCourierCompanyByName(Map<String,Object> params); | ||
| 115 | |||
| 116 | /** | ||
| 117 | * 根据订单号查询退货信息 | ||
| 118 | * @param orderSn | ||
| 119 | * @return | ||
| 120 | */ | ||
| 121 | List<MemberProductBack> getMemberProductBackByOrderSn(@Param("orderSn") String orderSn); | ||
| 122 | |||
| 123 | /** | ||
| 124 | * 根据订单号查询换货信息 | ||
| 125 | * @param orderSn | ||
| 126 | * @return | ||
| 127 | */ | ||
| 128 | List<MemberProductExchange> getMemberProductExchangeByOrderSn(@Param("orderSn") String orderSn); | ||
| 129 | |||
| 130 | |||
| 131 | /** | ||
| 132 | * 根据订单ID查询投诉表 | ||
| 133 | * @param id | ||
| 134 | * @return | ||
| 135 | */ | ||
| 136 | List<SellerComplaint> getSellerComplaintById(@Param("orderId") Integer id); | ||
| 137 | |||
| 138 | |||
| 139 | List<Seller> getSeller(@Param("id") String id); | ||
| 140 | |||
| 141 | |||
| 142 | /** | ||
| 143 | * 退款单下载 | ||
| 144 | * @param params | ||
| 145 | * @return | ||
| 146 | */ | ||
| 147 | List<GetRefundBean> getGetRefundBean(Map<String,Object> params); | ||
| 148 | |||
| 149 | |||
| 150 | int countGetGetRefundBean(Map<String,Object> params); | ||
| 151 | |||
| 152 | /** | ||
| 153 | * 查询退款单的订单购买数量 | ||
| 154 | * @param orderProductId | ||
| 155 | * @return | ||
| 156 | */ | ||
| 157 | int countOrderProductNum(@Param("id") String orderProductId); | ||
| 158 | |||
| 159 | /** | ||
| 160 | * 根据旧订单号获取新订单号 | ||
| 161 | * @param orderSn | ||
| 162 | * @return | ||
| 163 | */ | ||
| 164 | String getNewOrderSnByOldOrderSn(@Param("orderSn") String orderSn); | ||
| 165 | } |
com.sibu.orderHelper.dao/src/main/java/com/sibu/orderHelper/mall/member/write/MemberWriteDao.java
0 → 100644
| 1 | package com.sibu.orderHelper.mall.member.write; | ||
| 2 | |||
| 3 | import com.sibu.orderHelper.integral.pineapple.model.Orders; | ||
| 4 | |||
| 5 | import java.util.Map; | ||
| 6 | |||
| 7 | public interface MemberWriteDao { | ||
| 8 | Integer count(); | ||
| 9 | |||
| 10 | /** | ||
| 11 | * 根据订单号查询订单信息 只查询不是主订单的订单 | ||
| 12 | * @param params | ||
| 13 | * @return | ||
| 14 | */ | ||
| 15 | Orders getOrdersByMap(Map<String,Object> params); | ||
| 16 | |||
| 17 | |||
| 18 | /** | ||
| 19 | * 修改订单备注 | ||
| 20 | * @param params | ||
| 21 | * @return | ||
| 22 | */ | ||
| 23 | int updateOdersRemark(Map<String,Object> params); | ||
| 24 | |||
| 25 | /** | ||
| 26 | * 订单发货更新订单状态与信息 | ||
| 27 | * @param params | ||
| 28 | * @return | ||
| 29 | */ | ||
| 30 | int updateOrdersState(Map<String,Object> params); | ||
| 31 | |||
| 32 | /** | ||
| 33 | * 根据条件更新sku库存 | ||
| 34 | * @param params | ||
| 35 | * @return | ||
| 36 | */ | ||
| 37 | int updateSkuStock(Map<String,Object> params); | ||
| 38 | |||
| 39 | /** | ||
| 40 | * 根据商品ID更新商品库存 | ||
| 41 | * @param params | ||
| 42 | * @return | ||
| 43 | */ | ||
| 44 | int updateProductStock(Map<String,Object> params); | ||
| 45 | |||
| 46 | /** | ||
| 47 | * 查询该订单是否有该快递单号 | ||
| 48 | * @param params | ||
| 49 | * @return | ||
| 50 | */ | ||
| 51 | int checkLogisticsNumber(Map<String,Object> params); | ||
| 52 | |||
| 53 | } |
| ... | @@ -18,6 +18,20 @@ | ... | @@ -18,6 +18,20 @@ |
| 18 | <groupId>com.sibu.orderHelper.service</groupId> | 18 | <groupId>com.sibu.orderHelper.service</groupId> |
| 19 | <artifactId>com.sibu.orderHelper.service</artifactId> | 19 | <artifactId>com.sibu.orderHelper.service</artifactId> |
| 20 | <version>0.0.1-SNAPSHOT</version> | 20 | <version>0.0.1-SNAPSHOT</version> |
| 21 | <exclusions> | ||
| 22 | <exclusion> | ||
| 23 | <artifactId>slf4j-api</artifactId> | ||
| 24 | <groupId>org.slf4j</groupId> | ||
| 25 | </exclusion> | ||
| 26 | <exclusion> | ||
| 27 | <artifactId>spring-context</artifactId> | ||
| 28 | <groupId>org.springframework</groupId> | ||
| 29 | </exclusion> | ||
| 30 | <exclusion> | ||
| 31 | <artifactId>commons-logging</artifactId> | ||
| 32 | <groupId>commons-logging</groupId> | ||
| 33 | </exclusion> | ||
| 34 | </exclusions> | ||
| 21 | </dependency> | 35 | </dependency> |
| 22 | <dependency> | 36 | <dependency> |
| 23 | <groupId>net.sourceforge.jtds</groupId> | 37 | <groupId>net.sourceforge.jtds</groupId> |
| ... | @@ -30,6 +44,7 @@ | ... | @@ -30,6 +44,7 @@ |
| 30 | <version>4.10</version> | 44 | <version>4.10</version> |
| 31 | <scope>test</scope> | 45 | <scope>test</scope> |
| 32 | </dependency> | 46 | </dependency> |
| 47 | |||
| 33 | </dependencies> | 48 | </dependencies> |
| 34 | <build> | 49 | <build> |
| 35 | <finalName>com.sibu.orderHelper.integralMall</finalName> | 50 | <finalName>com.sibu.orderHelper.integralMall</finalName> | ... | ... |
| ... | @@ -10,6 +10,8 @@ import com.sibu.orderHelper.common.util.SpringValuesUtil; | ... | @@ -10,6 +10,8 @@ import com.sibu.orderHelper.common.util.SpringValuesUtil; |
| 10 | import com.sibu.orderHelper.integral.service.IIMDoingOrderService; | 10 | import com.sibu.orderHelper.integral.service.IIMDoingOrderService; |
| 11 | import com.sibu.orderHelper.integral.vo.PayType; | 11 | import com.sibu.orderHelper.integral.vo.PayType; |
| 12 | import com.sibu.orderHelper.integralMall.controller.BaseController; | 12 | import com.sibu.orderHelper.integralMall.controller.BaseController; |
| 13 | import com.sibu.orderHelper.mall.member.read.MemberReadDao; | ||
| 14 | import com.sibu.orderHelper.mall.member.write.MemberWriteDao; | ||
| 13 | import org.apache.commons.lang3.time.DateUtils; | 15 | import org.apache.commons.lang3.time.DateUtils; |
| 14 | import org.aspectj.lang.ProceedingJoinPoint; | 16 | import org.aspectj.lang.ProceedingJoinPoint; |
| 15 | import org.aspectj.lang.annotation.Around; | 17 | import org.aspectj.lang.annotation.Around; |
| ... | @@ -18,11 +20,9 @@ import org.aspectj.lang.annotation.Pointcut; | ... | @@ -18,11 +20,9 @@ import org.aspectj.lang.annotation.Pointcut; |
| 18 | import org.springframework.beans.factory.annotation.Autowired; | 20 | import org.springframework.beans.factory.annotation.Autowired; |
| 19 | import org.springframework.http.MediaType; | 21 | import org.springframework.http.MediaType; |
| 20 | import org.springframework.stereotype.Controller; | 22 | import org.springframework.stereotype.Controller; |
| 21 | import org.springframework.web.bind.annotation.RequestMapping; | 23 | import org.springframework.web.bind.annotation.*; |
| 22 | import org.springframework.web.bind.annotation.RequestMethod; | ||
| 23 | import org.springframework.web.bind.annotation.ResponseBody; | ||
| 24 | import org.springframework.web.bind.annotation.RestController; | ||
| 25 | 24 | ||
| 25 | import javax.annotation.Resource; | ||
| 26 | import javax.validation.ValidationException; | 26 | import javax.validation.ValidationException; |
| 27 | import java.io.BufferedReader; | 27 | import java.io.BufferedReader; |
| 28 | import java.io.InputStreamReader; | 28 | import java.io.InputStreamReader; |
| ... | @@ -47,6 +47,21 @@ import java.util.Map; | ... | @@ -47,6 +47,21 @@ import java.util.Map; |
| 47 | public class IMOrderTestController extends BaseController { | 47 | public class IMOrderTestController extends BaseController { |
| 48 | @Autowired | 48 | @Autowired |
| 49 | private IIMDoingOrderService iimDoingOrderService; | 49 | private IIMDoingOrderService iimDoingOrderService; |
| 50 | @Resource | ||
| 51 | private MemberReadDao memberReadDao; | ||
| 52 | @Resource | ||
| 53 | private MemberWriteDao memberWriteDao; | ||
| 54 | |||
| 55 | /** | ||
| 56 | * | ||
| 57 | * | ||
| 58 | * @return | ||
| 59 | */ | ||
| 60 | @RequestMapping(value = "/test/mall/read-write/datasource", method = RequestMethod.GET) | ||
| 61 | public BaseResponse testReadAndWriteDb() { | ||
| 62 | String r = String.format("%s-%s", memberReadDao.count(), memberWriteDao.count()); | ||
| 63 | return ResponseRender.renderData(r); | ||
| 64 | } | ||
| 50 | 65 | ||
| 51 | /** | 66 | /** |
| 52 | * 验证测试环境 | 67 | * 验证测试环境 | ... | ... |
| ... | @@ -14,6 +14,7 @@ import com.sibu.orderHelper.integral.model.IMSupplier; | ... | @@ -14,6 +14,7 @@ import com.sibu.orderHelper.integral.model.IMSupplier; |
| 14 | import com.sibu.orderHelper.integral.model.IMSupplierApp; | 14 | import com.sibu.orderHelper.integral.model.IMSupplierApp; |
| 15 | import com.sibu.orderHelper.integral.pineapple.enums.SubErrorEnum; | 15 | import com.sibu.orderHelper.integral.pineapple.enums.SubErrorEnum; |
| 16 | import com.sibu.orderHelper.integral.pineapple.exception.BizException; | 16 | import com.sibu.orderHelper.integral.pineapple.exception.BizException; |
| 17 | import com.sibu.orderHelper.integral.pineapple.model.Seller; | ||
| 17 | import com.sibu.orderHelper.integral.pineapple.request.BaseRequest; | 18 | import com.sibu.orderHelper.integral.pineapple.request.BaseRequest; |
| 18 | import com.sibu.orderHelper.integral.pineapple.request.CallRequest; | 19 | import com.sibu.orderHelper.integral.pineapple.request.CallRequest; |
| 19 | import com.sibu.orderHelper.integral.pineapple.response.BaseResponse; | 20 | import com.sibu.orderHelper.integral.pineapple.response.BaseResponse; |
| ... | @@ -27,6 +28,7 @@ import com.sibu.orderHelper.integral.service.pineapple.BizService; | ... | @@ -27,6 +28,7 @@ import com.sibu.orderHelper.integral.service.pineapple.BizService; |
| 27 | import com.sibu.orderHelper.integral.service.pineapple.util.JsonUtils; | 28 | import com.sibu.orderHelper.integral.service.pineapple.util.JsonUtils; |
| 28 | import com.sibu.orderHelper.integral.pineapple.constant.PineAppleConst; | 29 | import com.sibu.orderHelper.integral.pineapple.constant.PineAppleConst; |
| 29 | import com.sibu.orderHelper.integral.service.pineapple.util.XmlUtils; | 30 | import com.sibu.orderHelper.integral.service.pineapple.util.XmlUtils; |
| 31 | import com.sibu.orderHelper.mall.member.read.MemberReadDao; | ||
| 30 | import net.sf.json.JSONObject; | 32 | import net.sf.json.JSONObject; |
| 31 | import org.apache.commons.collections.CollectionUtils; | 33 | import org.apache.commons.collections.CollectionUtils; |
| 32 | import org.apache.commons.lang3.StringUtils; | 34 | import org.apache.commons.lang3.StringUtils; |
| ... | @@ -67,6 +69,8 @@ public class PineappleController { | ... | @@ -67,6 +69,8 @@ public class PineappleController { |
| 67 | private IMSupplierAppService imSupplierAppService; | 69 | private IMSupplierAppService imSupplierAppService; |
| 68 | @Autowired | 70 | @Autowired |
| 69 | private IMSupplierDao imSupplierDao; | 71 | private IMSupplierDao imSupplierDao; |
| 72 | @Resource | ||
| 73 | private MemberReadDao memberReadDao; | ||
| 70 | 74 | ||
| 71 | @RequestMapping( | 75 | @RequestMapping( |
| 72 | value = "/pineapple/call", | 76 | value = "/pineapple/call", |
| ... | @@ -169,14 +173,19 @@ public class PineappleController { | ... | @@ -169,14 +173,19 @@ public class PineappleController { |
| 169 | } | 173 | } |
| 170 | 174 | ||
| 171 | private IMSupplier findAndCheckIMSupplier(BaseRequest request, IMSupplierApp imSupplierApp) { | 175 | private IMSupplier findAndCheckIMSupplier(BaseRequest request, IMSupplierApp imSupplierApp) { |
| 172 | List<IMSupplier> imSuppliers = imSupplierDao.findByIdIn(Arrays.asList(imSupplierApp.getSupplierId())); | 176 | //List<IMSupplier> imSuppliers = imSupplierDao.findByIdIn(Arrays.asList(imSupplierApp.getSupplierId())); |
| 173 | if (CollectionUtils.isEmpty(imSuppliers)) { | 177 | List<Seller> seller = memberReadDao.getSeller(imSupplierApp.getSupplierId()); |
| 178 | if (CollectionUtils.isEmpty(seller)) { | ||
| 174 | throw new BizException(MessageFormat.format("appKey【{0}】的店铺数据为空,请联系客服", request.getAppkey())); | 179 | throw new BizException(MessageFormat.format("appKey【{0}】的店铺数据为空,请联系客服", request.getAppkey())); |
| 175 | } | 180 | } |
| 176 | if (imSuppliers.size() > 1) { | 181 | if (seller.size() > 1) { |
| 177 | throw new BizException(MessageFormat.format("appKey【{0}】的店铺数据有重复,请联系客服", request.getAppkey())); | 182 | throw new BizException(MessageFormat.format("appKey【{0}】的店铺数据有重复,请联系客服", request.getAppkey())); |
| 178 | } | 183 | } |
| 179 | return imSuppliers.get(0); | 184 | Seller entity = seller.get(0); |
| 185 | IMSupplier iMSupplier = new IMSupplier(); | ||
| 186 | iMSupplier.setId(String.valueOf(entity.getId())); | ||
| 187 | iMSupplier.setName(entity.getName()); | ||
| 188 | return iMSupplier; | ||
| 180 | } | 189 | } |
| 181 | 190 | ||
| 182 | private IMSupplierApp findAndCheckSupplierApp(BaseRequest request) { | 191 | private IMSupplierApp findAndCheckSupplierApp(BaseRequest request) { | ... | ... |
| ... | @@ -29,6 +29,9 @@ | ... | @@ -29,6 +29,9 @@ |
| 29 | <!--加载mq配置--> | 29 | <!--加载mq配置--> |
| 30 | <import resource="classpath:META-INF/conf/service-spring-mq.xml"></import> | 30 | <import resource="classpath:META-INF/conf/service-spring-mq.xml"></import> |
| 31 | 31 | ||
| 32 | <!--dubbo配置--> | ||
| 33 | <import resource="classpath:META-INF/conf/dubbo-consumer-config.xml"></import> | ||
| 34 | |||
| 32 | <!-- 开启注解配置 | 35 | <!-- 开启注解配置 |
| 33 | <context:annotation-config />--> | 36 | <context:annotation-config />--> |
| 34 | <!-- 开启AOP监听 只对当前配置文件有效 --> | 37 | <!-- 开启AOP监听 只对当前配置文件有效 --> | ... | ... |
| ... | @@ -35,7 +35,7 @@ | ... | @@ -35,7 +35,7 @@ |
| 35 | 35 | ||
| 36 | <!--DEBUG信息输出--> | 36 | <!--DEBUG信息输出--> |
| 37 | <appender name="LOG.DEBUG" class="org.apache.log4j.DailyRollingFileAppender"> | 37 | <appender name="LOG.DEBUG" class="org.apache.log4j.DailyRollingFileAppender"> |
| 38 | <param name="File" value="/var/tomcat_8081/pineapple/integral_logs/debug_" /> | 38 | <param name="File" value="/var/tomcat/mall/third-api/debug_" /> |
| 39 | <param name="DatePattern" value="yyyy-MM-dd'.log'" /> | 39 | <param name="DatePattern" value="yyyy-MM-dd'.log'" /> |
| 40 | <layout class="org.apache.log4j.PatternLayout"> | 40 | <layout class="org.apache.log4j.PatternLayout"> |
| 41 | <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} [%p] [%C-%M] %m%n" /> | 41 | <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} [%p] [%C-%M] %m%n" /> |
| ... | @@ -48,7 +48,7 @@ | ... | @@ -48,7 +48,7 @@ |
| 48 | 48 | ||
| 49 | <!--INFO信息输出--> | 49 | <!--INFO信息输出--> |
| 50 | <appender name="LOG.INFO" class="org.apache.log4j.DailyRollingFileAppender"> | 50 | <appender name="LOG.INFO" class="org.apache.log4j.DailyRollingFileAppender"> |
| 51 | <param name="File" value="/var/tomcat_8081/pineapple/integral_logs/info_" /> | 51 | <param name="File" value="/var/tomcat/mall/third-api/info_" /> |
| 52 | <param name="DatePattern" value="yyyy-MM-dd'.log'" /> | 52 | <param name="DatePattern" value="yyyy-MM-dd'.log'" /> |
| 53 | <layout class="org.apache.log4j.PatternLayout"> | 53 | <layout class="org.apache.log4j.PatternLayout"> |
| 54 | <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} [%p] [%C-%M] %m%n" /> | 54 | <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} [%p] [%C-%M] %m%n" /> |
| ... | @@ -61,7 +61,7 @@ | ... | @@ -61,7 +61,7 @@ |
| 61 | 61 | ||
| 62 | <!--WARN信息输出--> | 62 | <!--WARN信息输出--> |
| 63 | <appender name="LOG.WARN" class="org.apache.log4j.DailyRollingFileAppender"> | 63 | <appender name="LOG.WARN" class="org.apache.log4j.DailyRollingFileAppender"> |
| 64 | <param name="File" value="/var/tomcat_8081/pineapple/integral_logs/warn_" /> | 64 | <param name="File" value="/var/tomcat/mall/third-api/warn_" /> |
| 65 | <param name="DatePattern" value="yyyy-MM-dd'.log'" /> | 65 | <param name="DatePattern" value="yyyy-MM-dd'.log'" /> |
| 66 | <layout class="org.apache.log4j.PatternLayout"> | 66 | <layout class="org.apache.log4j.PatternLayout"> |
| 67 | <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} [%p] [%C-%M] %m%n" /> | 67 | <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} [%p] [%C-%M] %m%n" /> |
| ... | @@ -74,7 +74,7 @@ | ... | @@ -74,7 +74,7 @@ |
| 74 | 74 | ||
| 75 | <!--ERROR信息输出--> | 75 | <!--ERROR信息输出--> |
| 76 | <appender name="LOG.ERROR" class="org.apache.log4j.DailyRollingFileAppender"> | 76 | <appender name="LOG.ERROR" class="org.apache.log4j.DailyRollingFileAppender"> |
| 77 | <param name="File" value="/var/tomcat_8081/pineapple/integral_logs/error_" /> | 77 | <param name="File" value="/var/tomcat/mall/third-api/error_" /> |
| 78 | <param name="DatePattern" value="yyyy-MM-dd'.log'" /> | 78 | <param name="DatePattern" value="yyyy-MM-dd'.log'" /> |
| 79 | <layout class="org.apache.log4j.PatternLayout"> | 79 | <layout class="org.apache.log4j.PatternLayout"> |
| 80 | <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} [%p] [%C-%M] %m%n" /> | 80 | <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} [%p] [%C-%M] %m%n" /> |
| ... | @@ -87,7 +87,7 @@ | ... | @@ -87,7 +87,7 @@ |
| 87 | 87 | ||
| 88 | <!--FATAL信息--> | 88 | <!--FATAL信息--> |
| 89 | <appender name="LOG.FATAL" class="org.apache.log4j.DailyRollingFileAppender"> | 89 | <appender name="LOG.FATAL" class="org.apache.log4j.DailyRollingFileAppender"> |
| 90 | <param name="File" value="/var/tomcat_8081/pineapple/integral_logs/fatal_" /> | 90 | <param name="File" value="/var/tomcat/mall/third-api/fatal_" /> |
| 91 | <param name="DatePattern" value="yyyy-MM-dd'.log'" /> | 91 | <param name="DatePattern" value="yyyy-MM-dd'.log'" /> |
| 92 | <layout class="org.apache.log4j.PatternLayout"> | 92 | <layout class="org.apache.log4j.PatternLayout"> |
| 93 | <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} [%p] [%C-%M] %m%n" /> | 93 | <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} [%p] [%C-%M] %m%n" /> | ... | ... |
com.sibu.orderHelper.integralMall/src/main/resources/mall-mapper/member/read/MemberReadMapper.xml
0 → 100644
此文件的差异被折叠,
点击展开。
com.sibu.orderHelper.integralMall/src/main/resources/mall-mapper/member/write/MemberWriteMapper.xml
0 → 100644
| 1 | <?xml version="1.0" encoding="UTF-8" ?> | ||
| 2 | <!DOCTYPE mapper | ||
| 3 | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 4 | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
| 5 | <mapper namespace="com.sibu.orderHelper.mall.member.write.MemberWriteDao"> | ||
| 6 | |||
| 7 | <!-- 订单实体 --> | ||
| 8 | <resultMap id="orders" type="com.sibu.orderHelper.integral.pineapple.model.Orders"> | ||
| 9 | <result property="id" column="id" /> | ||
| 10 | <result property="sellerId" column="seller_id" /> | ||
| 11 | <result property="sellerName" column="seller_name" /> | ||
| 12 | <result property="orderId" column="order_id" /> | ||
| 13 | <result property="orderSn" column="order_sn" /> | ||
| 14 | <result property="orderProductId" column="order_product_id" /> | ||
| 15 | <result property="productId" column="product_id" /> | ||
| 16 | <result property="productName" column="product_name" /> | ||
| 17 | <result property="memberId" column="member_id" /> | ||
| 18 | <result property="memberName" column="member_name" /> | ||
| 19 | <result property="provinceId" column="province_id" /> | ||
| 20 | <result property="cityId" column="city_id" /> | ||
| 21 | <result property="areaId" column="area_id" /> | ||
| 22 | <result property="addressAll" column="address_all" /> | ||
| 23 | <result property="addressInfo" column="address_info" /> | ||
| 24 | <result property="zipCode" column="zip_code" /> | ||
| 25 | <result property="changeName" column="change_name" /> | ||
| 26 | <result property="phone" column="phone" /> | ||
| 27 | <result property="logisticsId" column="logistics_id" /> | ||
| 28 | <result property="logisticsName" column="logistics_name" /> | ||
| 29 | <result property="logisticsMark" column="logistics_mark" /> | ||
| 30 | <result property="logisticsNumber" column="logistics_number" /> | ||
| 31 | <result property="number" column="number" /> | ||
| 32 | <result property="question" column="question" /> | ||
| 33 | <result property="image" column="image" /> | ||
| 34 | <result property="name" column="name" /> | ||
| 35 | <result property="state" column="state" /> | ||
| 36 | <result property="optId" column="opt_id" /> | ||
| 37 | <result property="optName" column="opt_name" /> | ||
| 38 | <result property="remark" column="remark" /> | ||
| 39 | <result property="createTime" column="create_time" /> | ||
| 40 | <result property="updateTime" column="update_time" /> | ||
| 41 | <result property="regionName1" column="regionName1" /> | ||
| 42 | <result property="regionName2" column="regionName2" /> | ||
| 43 | <result property="regionName3" column="regionName3" /> | ||
| 44 | <result property="orderState" column="order_state" /> | ||
| 45 | <result property="moneyOrder" column="money_order" /> | ||
| 46 | <result property="moneyPaidBalance" column="money_paid_balance" /> | ||
| 47 | <result property="moneyCoupon" column="money_coupon" /> | ||
| 48 | <result property="moneyLogistics" column="money_logistics" /> | ||
| 49 | <result property="moneyProduct" column="money_product" /> | ||
| 50 | <result property="moneyActFull" column="money_act_full" /> | ||
| 51 | <result property="moneyDiscount" column="money_discount" /> | ||
| 52 | <result property="moneyBack" column="money_back" /> | ||
| 53 | <result property="moneyIntegral" column="money_integral" /> | ||
| 54 | <result property="payTime" column="pay_time" /> | ||
| 55 | </resultMap> | ||
| 56 | |||
| 57 | <select id="count" resultType="java.lang.Integer"> | ||
| 58 | select count(*) from member | ||
| 59 | </select> | ||
| 60 | |||
| 61 | <!-- 根据订单号查询订单信息 只查询不是主订单的订单 --> | ||
| 62 | <select id="getOrdersByMap" parameterType="java.util.Map" resultMap="orders"> | ||
| 63 | select * from orders where order_sn=#{orderSn,jdbcType=VARCHAR} AND seller_id=#{sellerId,jdbcType=INTEGER} AND is_parent = 0 | ||
| 64 | </select> | ||
| 65 | |||
| 66 | <!-- 修改订单备注 --> | ||
| 67 | <update id="updateOdersRemark" parameterType="java.util.Map"> | ||
| 68 | UPDATE orders SET remark = #{remark},update_time = now() WHERE order_sn = #{orderSn} AND seller_id = #{sellerId} | ||
| 69 | </update> | ||
| 70 | |||
| 71 | <!-- 订单发货--> | ||
| 72 | <!-- 验证订单号是否已存在--> | ||
| 73 | <select id="checkLogisticsNumber" parameterType="java.util.Map" resultType="java.lang.Integer"> | ||
| 74 | select count(*) from orders where order_sn = #{orderSn} AND seller_id = #{sellerId} and logistics_number like concat(concat('%',#{logisticsNumber},'%')) | ||
| 75 | </select> | ||
| 76 | |||
| 77 | |||
| 78 | <!--更改订单状态、电话、地址、发货时间、收货人姓名,快递单号 --> | ||
| 79 | <update id="updateOrdersState"> | ||
| 80 | UPDATE orders | ||
| 81 | <set> | ||
| 82 | <if test="name !=null and name !=''"> | ||
| 83 | name = #{name}, | ||
| 84 | </if> | ||
| 85 | <if test="addressInfo !=null and addressInfo !=''"> | ||
| 86 | address_info = #{addressInfo}, | ||
| 87 | </if> | ||
| 88 | <if test="logisticsNumber !=null and logisticsNumber !=''"> | ||
| 89 | logistics_number = #{logisticsNumber}, | ||
| 90 | </if> | ||
| 91 | <if test="mobile !=null and mobile !=''"> | ||
| 92 | mobile = #{mobile}, | ||
| 93 | </if> | ||
| 94 | <if test="addressAll !=null and addressAll !=''"> | ||
| 95 | address_all = #{addressAll}, | ||
| 96 | </if> | ||
| 97 | <if test="orderState !=null and orderState !=''"> | ||
| 98 | order_state = #{orderState}, | ||
| 99 | </if> | ||
| 100 | <if test="provinceId !=null and provinceId !=''"> | ||
| 101 | province_id = #{provinceId}, | ||
| 102 | </if> | ||
| 103 | <if test="areaId !=null and areaId !=''"> | ||
| 104 | area_id = #{areaId}, | ||
| 105 | </if> | ||
| 106 | <if test="cityId !=null and cityId !=''"> | ||
| 107 | city_id = #{cityId}, | ||
| 108 | </if> | ||
| 109 | <if test="deliverTime !=null and deliverTime !=''"> | ||
| 110 | deliver_time = now(), | ||
| 111 | </if> | ||
| 112 | <if test="logisticsName !=null and logisticsName !=''"> | ||
| 113 | logistics_name = #{logisticsName}, | ||
| 114 | </if> | ||
| 115 | <if test="logisticsId !=null and logisticsId !=''"> | ||
| 116 | logistics_id = #{logisticsId}, | ||
| 117 | </if> | ||
| 118 | update_time = now() | ||
| 119 | </set> | ||
| 120 | WHERE order_sn = #{orderSn} AND seller_id = #{sellerId} | ||
| 121 | </update> | ||
| 122 | |||
| 123 | |||
| 124 | |||
| 125 | <!-- 更新SKU库存--> | ||
| 126 | <update id="updateSkuStock" parameterType="java.util.Map"> | ||
| 127 | UPDATE product_goods SET product_stock = #{stock} WHERE sku = #{skuId} and product_id = #{productId} | ||
| 128 | </update> | ||
| 129 | |||
| 130 | <!-- 更新产品库存--> | ||
| 131 | <update id="updateProductStock" parameterType="java.util.Map"> | ||
| 132 | UPDATE product SET product_stock = #{productStock} WHERE id = #{productId} | ||
| 133 | </update> | ||
| 134 | |||
| 135 | </mapper> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -37,6 +37,110 @@ | ... | @@ -37,6 +37,110 @@ |
| 37 | <!-- 事务注解驱动,标注@Transactional的类和方法将具有事务性 --> | 37 | <!-- 事务注解驱动,标注@Transactional的类和方法将具有事务性 --> |
| 38 | <tx:annotation-driven transaction-manager="transactionManager" proxy-target-class="true" mode="proxy"/> | 38 | <tx:annotation-driven transaction-manager="transactionManager" proxy-target-class="true" mode="proxy"/> |
| 39 | 39 | ||
| 40 | |||
| 41 | |||
| 42 | <!-- begin 新系统mall --> | ||
| 43 | <bean id="mallReadDataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close"> | ||
| 44 | <!-- 基本属性 url、user、password --> | ||
| 45 | <property name="url" value="${mall.read.url}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true" /> | ||
| 46 | <property name="username" value="${mall.read.username}" /> | ||
| 47 | <property name="password" value="${mall.read.password}" /> | ||
| 48 | |||
| 49 | <!-- 配置初始化大小、最小、最大 --> | ||
| 50 | <property name="initialSize" value="1"/> | ||
| 51 | <property name="minIdle" value="1"/> | ||
| 52 | <property name="maxActive" value="200"/> | ||
| 53 | |||
| 54 | <!-- 配置获取连接等待超时的时间 --> | ||
| 55 | <property name="maxWait" value="60000"/> | ||
| 56 | |||
| 57 | <!-- 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 --> | ||
| 58 | <property name="timeBetweenEvictionRunsMillis" value="60000"/> | ||
| 59 | |||
| 60 | <!-- 配置一个连接在池中最小生存的时间,单位是毫秒 --> | ||
| 61 | <property name="minEvictableIdleTimeMillis" value="300000"/> | ||
| 62 | |||
| 63 | <property name="validationQuery" value="SELECT 'x'"/> | ||
| 64 | <property name="testWhileIdle" value="true"/> | ||
| 65 | <property name="testOnBorrow" value="false"/> | ||
| 66 | <property name="testOnReturn" value="false"/> | ||
| 67 | |||
| 68 | <!-- 打开PSCache,并且指定每个连接上PSCache的大小 --> | ||
| 69 | <property name="poolPreparedStatements" value="true"/> | ||
| 70 | <property name="maxPoolPreparedStatementPerConnectionSize" value="20"/> | ||
| 71 | |||
| 72 | <!-- 配置监控统计拦截的filters --> | ||
| 73 | <property name="filters" value="stat"/> | ||
| 74 | </bean> | ||
| 75 | |||
| 76 | <bean id="mallReadSqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"> | ||
| 77 | <property name="mapperLocations" value="classpath:mall-mapper/**/read/**/*.xml" /> | ||
| 78 | <!--<property name="typeAliasesPackage" value="com.ejavashop.entity" />--> | ||
| 79 | <property name="configLocation" value="classpath:mybatis-config.xml"></property> | ||
| 80 | <property name="dataSource" ref="mallReadDataSource"/> | ||
| 81 | </bean> | ||
| 82 | <bean name="mallReadMapperScanner" class="org.mybatis.spring.mapper.MapperScannerConfigurer"> | ||
| 83 | <property name="basePackage" value="com.sibu.orderHelper.mall.*.read" /> | ||
| 84 | <property name="sqlSessionFactoryBeanName" value="mallReadSqlSessionFactory" /> | ||
| 85 | </bean> | ||
| 86 | |||
| 87 | |||
| 88 | |||
| 89 | <bean id="mallWriteDataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close"> | ||
| 90 | <!-- 基本属性 url、user、password --> | ||
| 91 | <property name="url" value="${mall.write.url}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true" /> | ||
| 92 | <property name="username" value="${mall.write.username}" /> | ||
| 93 | <property name="password" value="${mall.write.password}" /> | ||
| 94 | |||
| 95 | <!-- 配置初始化大小、最小、最大 --> | ||
| 96 | <property name="initialSize" value="1"/> | ||
| 97 | <property name="minIdle" value="1"/> | ||
| 98 | <property name="maxActive" value="200"/> | ||
| 99 | |||
| 100 | <!-- 配置获取连接等待超时的时间 --> | ||
| 101 | <property name="maxWait" value="60000"/> | ||
| 102 | |||
| 103 | <!-- 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 --> | ||
| 104 | <property name="timeBetweenEvictionRunsMillis" value="60000"/> | ||
| 105 | |||
| 106 | <!-- 配置一个连接在池中最小生存的时间,单位是毫秒 --> | ||
| 107 | <property name="minEvictableIdleTimeMillis" value="300000"/> | ||
| 108 | |||
| 109 | <property name="validationQuery" value="SELECT 'x'"/> | ||
| 110 | <property name="testWhileIdle" value="true"/> | ||
| 111 | <property name="testOnBorrow" value="false"/> | ||
| 112 | <property name="testOnReturn" value="false"/> | ||
| 113 | |||
| 114 | <!-- 打开PSCache,并且指定每个连接上PSCache的大小 --> | ||
| 115 | <property name="poolPreparedStatements" value="true"/> | ||
| 116 | <property name="maxPoolPreparedStatementPerConnectionSize" value="20"/> | ||
| 117 | |||
| 118 | <!-- 配置监控统计拦截的filters --> | ||
| 119 | <property name="filters" value="stat"/> | ||
| 120 | </bean> | ||
| 121 | |||
| 122 | <bean id="mallWriteSqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"> | ||
| 123 | <property name="mapperLocations" value="classpath:mall-mapper/**/write/**/*.xml" /> | ||
| 124 | <!--<property name="typeAliasesPackage" value="com.ejavashop.entity" />--> | ||
| 125 | <property name="configLocation" value="classpath:mybatis-config.xml"></property> | ||
| 126 | <property name="dataSource" ref="mallWriteDataSource" /> | ||
| 127 | </bean> | ||
| 128 | |||
| 129 | <bean name="shopMapperScannerWrite" class="org.mybatis.spring.mapper.MapperScannerConfigurer"> | ||
| 130 | <property name="basePackage" value="com.sibu.orderHelper.mall.*.write" /> | ||
| 131 | <property name="sqlSessionFactoryBeanName" value="mallWriteSqlSessionFactory" /> | ||
| 132 | </bean> | ||
| 133 | |||
| 134 | <bean id="transactionManagerForMall" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> | ||
| 135 | <property name="dataSource" ref="mallWriteDataSource"/> | ||
| 136 | </bean> | ||
| 137 | |||
| 138 | <tx:annotation-driven transaction-manager="transactionManagerForMall"/> | ||
| 139 | |||
| 140 | <!-- end 新系统mall --> | ||
| 141 | |||
| 142 | |||
| 143 | |||
| 40 | <!-- 配置事务的传播特性 --> | 144 | <!-- 配置事务的传播特性 --> |
| 41 | <!--<tx:advice id="txAdvice" transaction-manager="transactionManager">--> | 145 | <!--<tx:advice id="txAdvice" transaction-manager="transactionManager">--> |
| 42 | <!--<tx:attributes>--> | 146 | <!--<tx:attributes>--> | ... | ... |
| ... | @@ -16,12 +16,12 @@ public enum PineappleEnum { | ... | @@ -16,12 +16,12 @@ public enum PineappleEnum { |
| 16 | /** | 16 | /** |
| 17 | * 菠萝派对应商城【产品已上架】状态 | 17 | * 菠萝派对应商城【产品已上架】状态 |
| 18 | */ | 18 | */ |
| 19 | public static final Integer MALL_PRODUCT_PUTAWAY__STATUS = 1; | 19 | public static final Integer MALL_PRODUCT_PUTAWAY__STATUS = 6; |
| 20 | 20 | ||
| 21 | /** | 21 | /** |
| 22 | * 菠萝派对应商城【产品已下架】状态 | 22 | * 菠萝派对应商城【产品已下架】状态 |
| 23 | */ | 23 | */ |
| 24 | public static final Integer MALL_PRODUCT_SOLDIOUT__STATUS = 0; | 24 | public static final Integer MALL_PRODUCT_SOLDIOUT__STATUS = 7; |
| 25 | 25 | ||
| 26 | 26 | ||
| 27 | 27 | ... | ... |
| ... | @@ -2,7 +2,9 @@ package com.sibu.orderHelper.enums; | ... | @@ -2,7 +2,9 @@ package com.sibu.orderHelper.enums; |
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | import com.alibaba.druid.util.StringUtils; | 4 | import com.alibaba.druid.util.StringUtils; |
| 5 | import com.sibu.orderHelper.integral.pineapple.enums.MemberProductBackEnum; | ||
| 5 | import com.sibu.orderHelper.integral.pineapple.enums.OrderStatusEnum; | 6 | import com.sibu.orderHelper.integral.pineapple.enums.OrderStatusEnum; |
| 7 | import com.sibu.orderHelper.integral.pineapple.model.MemberProductBack; | ||
| 6 | import org.apache.commons.lang3.EnumUtils; | 8 | import org.apache.commons.lang3.EnumUtils; |
| 7 | 9 | ||
| 8 | import java.util.ArrayList; | 10 | import java.util.ArrayList; |
| ... | @@ -15,14 +17,16 @@ import java.util.List; | ... | @@ -15,14 +17,16 @@ import java.util.List; |
| 15 | * @description 菠萝派商城退款验证退款状态举类 | 17 | * @description 菠萝派商城退款验证退款状态举类 |
| 16 | */ | 18 | */ |
| 17 | public enum PineappleRefundEnum { | 19 | public enum PineappleRefundEnum { |
| 18 | JH_01("JH_01", "买家已经申请退款等待卖家同意",Arrays.asList(OrderRefundStatusEnum.WAIT_SELLER_AUDIT.getCode())), | 20 | JH_01("JH_01", "买家已经申请退款等待卖家同意",Arrays.asList(MemberProductBackEnum.Pending.getCode())), |
| 19 | JH_02("JH_02", "卖家已经同意退款等待买家退货", Arrays.asList(OrderRefundStatusEnum.WAIT_CUSTOMER_REFUND_GOODS.getCode(),OrderRefundStatusEnum.AGREE_CHANGE_GOODS.getCode())), | 21 | JH_02("JH_02", "卖家已经同意退款等待买家退货", Arrays.asList(MemberProductBackEnum.AuditSucceess.getCode())), |
| 20 | JH_03("JH_03", "买家已经退货等待卖家确认收货",Arrays.asList(OrderRefundStatusEnum.WAIT_SELLER_RECEIVE_GOODS.getCode(),OrderRefundStatusEnum.WAIT_SELLER_AUDIT_RECEIVE_GOODS.getCode())), | 22 | JH_03("JH_03", "买家已经退货等待卖家确认收货",Arrays.asList(MemberProductBackEnum.MemberDeliver.getCode())), |
| 21 | JH_04("JH_04", "卖家拒绝退款",Arrays.asList(OrderRefundStatusEnum.WAIT_CUSTOMER_AUDIT.getCode(),OrderRefundStatusEnum.DISAGREE_REFUNDING_MONEY.getCode(),OrderRefundStatusEnum.DISAGREE_CHANGE_GOODS.getCode(),OrderRefundStatusEnum.DENY_CHANGE_GOODS.getCode())), | 23 | JH_04("JH_04", "卖家拒绝退款",Arrays.asList()), |
| 22 | JH_05("JH_05", "退款关闭",new ArrayList<>()), | 24 | JH_05("JH_05", "退款关闭",new ArrayList<>(MemberProductBackEnum.Inattentive.getCode())), |
| 23 | JH_06("JH_06", "退款成功",Arrays.asList(OrderRefundStatusEnum.SELLER_REFUNDING_MONEY_SUCCESS.getCode())), | 25 | JH_06("JH_06", "退款成功",new ArrayList<>(MemberProductBackEnum.ShopDelivery.getCode())), |
| 24 | JH_07("JH_07", "没有退款",new ArrayList<>()), | 26 | JH_07("JH_07", "没有退款",new ArrayList<>()), |
| 25 | JH_99("JH_99", "其他",new ArrayList<>()); | 27 | JH_99("JH_99", "其他",Arrays.asList()); |
| 28 | |||
| 29 | |||
| 26 | 30 | ||
| 27 | private String code; // 错误代码 | 31 | private String code; // 错误代码 |
| 28 | private String msg; // 错误消息 | 32 | private String msg; // 错误消息 | ... | ... |
| 1 | package com.sibu.orderHelper.enums; | ||
| 2 | |||
| 3 | |||
| 4 | import com.alibaba.druid.util.StringUtils; | ||
| 5 | import com.sibu.orderHelper.integral.pineapple.enums.MemberProductBackEnum; | ||
| 6 | import org.apache.commons.lang3.EnumUtils; | ||
| 7 | |||
| 8 | import java.util.ArrayList; | ||
| 9 | import java.util.Arrays; | ||
| 10 | import java.util.List; | ||
| 11 | |||
| 12 | /** | ||
| 13 | * @author lauka | ||
| 14 | * @date 2018/03/30 | ||
| 15 | * @description 菠萝派商城退款验证退款状态举类 | ||
| 16 | */ | ||
| 17 | public enum PineappleRefundMoneyStateEnum { | ||
| 18 | NOT_REFUND("1", "未退款",PineappleRefundEnum.JH_99), | ||
| 19 | REFUND_ACCOUNT("2", "退款到账户", PineappleRefundEnum.JH_06), | ||
| 20 | REFUND_BANK("3", "退款到银行",PineappleRefundEnum.JH_06), | ||
| 21 | REFUND_ING("4", "退款中",PineappleRefundEnum.JH_99), | ||
| 22 | REFUND_ERROR ("5", "退款失败",PineappleRefundEnum.JH_99), | ||
| 23 | REFUND_UNKNOWN("-1", "未知",PineappleRefundEnum.JH_99),; | ||
| 24 | |||
| 25 | |||
| 26 | private String code; // 错误代码 | ||
| 27 | private String msg; // 错误消息 | ||
| 28 | private PineappleRefundEnum pineappleRefundEnum; | ||
| 29 | |||
| 30 | PineappleRefundMoneyStateEnum(String code, String msg, PineappleRefundEnum pineappleRefundEnum) { | ||
| 31 | this.code = code; | ||
| 32 | this.msg = msg; | ||
| 33 | this.pineappleRefundEnum = pineappleRefundEnum; | ||
| 34 | } | ||
| 35 | |||
| 36 | public String getCode() { | ||
| 37 | return code; | ||
| 38 | } | ||
| 39 | |||
| 40 | public void setCode(String code) { | ||
| 41 | this.code = code; | ||
| 42 | } | ||
| 43 | |||
| 44 | public String getMsg() { | ||
| 45 | return msg; | ||
| 46 | } | ||
| 47 | |||
| 48 | public void setMsg(String msg) { | ||
| 49 | this.msg = msg; | ||
| 50 | } | ||
| 51 | |||
| 52 | public PineappleRefundEnum getPineappleRefundEnum() { | ||
| 53 | return pineappleRefundEnum; | ||
| 54 | } | ||
| 55 | |||
| 56 | public void setPineappleRefundEnum(PineappleRefundEnum pineappleRefundEnum) { | ||
| 57 | this.pineappleRefundEnum = pineappleRefundEnum; | ||
| 58 | } | ||
| 59 | |||
| 60 | public static PineappleRefundMoneyStateEnum resolveByPlatformRefundStatus(Integer platformOrderStatus) { | ||
| 61 | List<PineappleRefundMoneyStateEnum> enums = EnumUtils.getEnumList(PineappleRefundMoneyStateEnum.class); | ||
| 62 | PineappleRefundMoneyStateEnum result = enums.stream() | ||
| 63 | .filter(p -> p.code.equals(platformOrderStatus)) | ||
| 64 | .findFirst() | ||
| 65 | .orElse(PineappleRefundMoneyStateEnum.REFUND_UNKNOWN); | ||
| 66 | return result; | ||
| 67 | } | ||
| 68 | } |
| ... | @@ -20,6 +20,8 @@ public class GetRefundBean implements Serializable{ | ... | @@ -20,6 +20,8 @@ public class GetRefundBean implements Serializable{ |
| 20 | //平台子订单号 | 20 | //平台子订单号 |
| 21 | private String subplatorderno; | 21 | private String subplatorderno; |
| 22 | 22 | ||
| 23 | private String ordersproductuid; | ||
| 24 | |||
| 23 | //订单总金额 | 25 | //订单总金额 |
| 24 | private BigDecimal totalamount; | 26 | private BigDecimal totalamount; |
| 25 | 27 | ||
| ... | @@ -86,6 +88,9 @@ public class GetRefundBean implements Serializable{ | ... | @@ -86,6 +88,9 @@ public class GetRefundBean implements Serializable{ |
| 86 | //商品外部商家编码 | 88 | //商品外部商家编码 |
| 87 | private String outerid; | 89 | private String outerid; |
| 88 | 90 | ||
| 91 | //退款状态 | ||
| 92 | private Integer stateMoney; | ||
| 93 | |||
| 89 | public String getRefundno() { | 94 | public String getRefundno() { |
| 90 | return refundno; | 95 | return refundno; |
| 91 | } | 96 | } |
| ... | @@ -285,4 +290,20 @@ public class GetRefundBean implements Serializable{ | ... | @@ -285,4 +290,20 @@ public class GetRefundBean implements Serializable{ |
| 285 | public void setOuterid(String outerid) { | 290 | public void setOuterid(String outerid) { |
| 286 | this.outerid = outerid; | 291 | this.outerid = outerid; |
| 287 | } | 292 | } |
| 293 | |||
| 294 | public Integer getStateMoney() { | ||
| 295 | return stateMoney; | ||
| 296 | } | ||
| 297 | |||
| 298 | public void setStateMoney(Integer stateMoney) { | ||
| 299 | this.stateMoney = stateMoney; | ||
| 300 | } | ||
| 301 | |||
| 302 | public String getOrdersproductuid() { | ||
| 303 | return ordersproductuid; | ||
| 304 | } | ||
| 305 | |||
| 306 | public void setOrdersproductuid(String ordersproductuid) { | ||
| 307 | this.ordersproductuid = ordersproductuid; | ||
| 308 | } | ||
| 288 | } | 309 | } | ... | ... |
| 1 | package com.sibu.orderHelper.integral.pineapple.constant; | 1 | package com.sibu.orderHelper.integral.pineapple.constant; |
| 2 | 2 | ||
| 3 | import com.sibu.orderHelper.enums.PayOrderStatus; | 3 | import com.sibu.orderHelper.enums.PayOrderStatus; |
| 4 | import com.sibu.orderHelper.integral.pineapple.enums.EJavaShopOrderStateEnum; | ||
| 4 | 5 | ||
| 5 | import java.util.Arrays; | 6 | import java.util.Arrays; |
| 6 | import java.util.List; | 7 | import java.util.List; |
| ... | @@ -19,45 +20,44 @@ public class PineAppleConst { | ... | @@ -19,45 +20,44 @@ public class PineAppleConst { |
| 19 | /** | 20 | /** |
| 20 | * 菠萝派对应商城【等待买家付款】状态 | 21 | * 菠萝派对应商城【等待买家付款】状态 |
| 21 | */ | 22 | */ |
| 22 | public static final List<Integer> MALL_WAIT_BUYER_PAY_ORDER_STATUS = Arrays.asList(PayOrderStatus.WaitPay.getCode()); | 23 | public static final List<Integer> MALL_WAIT_BUYER_PAY_ORDER_STATUS = Arrays.asList(EJavaShopOrderStateEnum.WaitPay.getCode()); |
| 23 | /** | 24 | /** |
| 24 | * 菠萝派对应商城【等待卖家发货】状态 | 25 | * 菠萝派对应商城【等待卖家发货】状态 |
| 25 | */ | 26 | */ |
| 26 | public static final List<Integer> MALL_WAIT_SELLER_DELIVER_ORDER_STATUS = Arrays.asList(PayOrderStatus.WaitShip.getCode()); | 27 | public static final List<Integer> MALL_WAIT_SELLER_DELIVER_ORDER_STATUS = Arrays.asList(EJavaShopOrderStateEnum.WaitConfirmed.getCode(),EJavaShopOrderStateEnum.WaitShip.getCode()); |
| 27 | /** | 28 | /** |
| 28 | * 菠萝派对应商城【等待买家确认收货】状态 | 29 | * 菠萝派对应商城【等待买家确认收货】状态 |
| 29 | */ | 30 | */ |
| 30 | public static final List<Integer> MALL_WAIT_BUYER_RECEIVED_ORDER_STATUS = Arrays.asList(PayOrderStatus.HasReceived.getCode()); | 31 | public static final List<Integer> MALL_WAIT_BUYER_RECEIVED_ORDER_STATUS = Arrays.asList(EJavaShopOrderStateEnum.HasReceived.getCode()); |
| 31 | /** | 32 | /** |
| 32 | * 菠萝派对应商城【交易完成】状态 | 33 | * 菠萝派对应商城【交易完成】状态 |
| 33 | */ | 34 | */ |
| 34 | public static final List<Integer> MALL_TRANSACTION_FINISHED_ORDER_STATUS = Arrays.asList(PayOrderStatus.HasDelive.getCode(), PayOrderStatus.Finished.getCode()); | 35 | public static final List<Integer> MALL_TRANSACTION_FINISHED_ORDER_STATUS = Arrays.asList(EJavaShopOrderStateEnum.Finished.getCode()); |
| 35 | /** | 36 | /** |
| 36 | * 菠萝派对应商城【交易关闭】状态 | 37 | * 菠萝派对应商城【交易关闭】状态 |
| 37 | */ | 38 | */ |
| 38 | public static final List<Integer> MALL_TRANSACTION_CLOSED_ORDER_STATUS = Arrays.asList(PayOrderStatus.RefundFail.getCode()); | 39 | public static final List<Integer> MALL_TRANSACTION_CLOSED_ORDER_STATUS = Arrays.asList(EJavaShopOrderStateEnum.RefundFail.getCode()); |
| 39 | /** | 40 | /** |
| 40 | * 菠萝派对应商城【所有订单】 | 41 | * 菠萝派对应商城【所有订单】 |
| 41 | */ | 42 | */ |
| 42 | public static final List<Integer> MALL_ALL_ORDER = Arrays.asList( | 43 | public static final List<Integer> MALL_ALL_ORDER = Arrays.asList( |
| 43 | PayOrderStatus.WaitPay.getCode(), | 44 | EJavaShopOrderStateEnum.WaitPay.getCode(), |
| 44 | PayOrderStatus.WaitShip.getCode(), | 45 | EJavaShopOrderStateEnum.WaitConfirmed.getCode(), |
| 45 | PayOrderStatus.HasReceived.getCode(), | 46 | EJavaShopOrderStateEnum.WaitShip.getCode(), |
| 46 | PayOrderStatus.HasDelive.getCode(), | 47 | EJavaShopOrderStateEnum.HasReceived.getCode(), |
| 47 | PayOrderStatus.Finished.getCode(), | 48 | EJavaShopOrderStateEnum.Finished.getCode(), |
| 48 | PayOrderStatus.RefundFail.getCode() | 49 | EJavaShopOrderStateEnum.RefundFail.getCode() |
| 49 | |||
| 50 | ); | 50 | ); |
| 51 | 51 | ||
| 52 | /** | 52 | /** |
| 53 | * 菠萝派对应商城【未知】状态订单 | 53 | * 菠萝派对应商城【未知】状态订单 |
| 54 | */ | 54 | */ |
| 55 | public static final List<Integer> MALL_UNKNOWN_ORDER_STATUS = Arrays.asList( | 55 | public static final List<Integer> MALL_UNKNOWN_ORDER_STATUS = Arrays.asList( |
| 56 | PayOrderStatus.WaitPay.getCode(), | 56 | EJavaShopOrderStateEnum.WaitPay.getCode(), |
| 57 | PayOrderStatus.WaitShip.getCode(), | 57 | EJavaShopOrderStateEnum.WaitConfirmed.getCode(), |
| 58 | PayOrderStatus.HasReceived.getCode(), | 58 | EJavaShopOrderStateEnum.WaitShip.getCode(), |
| 59 | PayOrderStatus.HasDelive.getCode(), | 59 | EJavaShopOrderStateEnum.HasReceived.getCode(), |
| 60 | PayOrderStatus.Finished.getCode(), | 60 | EJavaShopOrderStateEnum.Finished.getCode(), |
| 61 | PayOrderStatus.RefundFail.getCode() | 61 | EJavaShopOrderStateEnum.RefundFail.getCode() |
| 62 | ); | 62 | ); |
| 63 | } | 63 | } | ... | ... |
| 1 | package com.sibu.orderHelper.integral.pineapple.enums; | ||
| 2 | |||
| 3 | import com.alibaba.druid.util.StringUtils; | ||
| 4 | import com.sibu.orderHelper.enums.PayOrderStatus; | ||
| 5 | import com.sibu.orderHelper.integral.pineapple.constant.PineAppleConst; | ||
| 6 | import org.apache.commons.lang3.EnumUtils; | ||
| 7 | |||
| 8 | import java.util.List; | ||
| 9 | |||
| 10 | /** | ||
| 11 | * @author LauKa | ||
| 12 | * @contact a062431@vip.qq.com | ||
| 13 | * @date 2018/05/15 | ||
| 14 | * @description 新系统丁订单状态 | ||
| 15 | */ | ||
| 16 | public enum EJavaShopOrderStateEnum { | ||
| 17 | WaitPay(1, "待支付"), WaitConfirmed(2, "待确认"), WaitShip(3, "待发货"), | ||
| 18 | HasReceived(4, "已发货"), RefundFail(6, "交易关闭"),Finished(5, "交易完成"); | ||
| 19 | |||
| 20 | private int code; // 错误代码 | ||
| 21 | private String msg; // 错误消息 | ||
| 22 | |||
| 23 | public int getCode() { | ||
| 24 | return code; | ||
| 25 | } | ||
| 26 | |||
| 27 | public String getMsg() { | ||
| 28 | return msg; | ||
| 29 | } | ||
| 30 | |||
| 31 | EJavaShopOrderStateEnum(int code, String msg) { | ||
| 32 | this.code = code; | ||
| 33 | this.msg = msg; | ||
| 34 | } | ||
| 35 | |||
| 36 | public static EJavaShopOrderStateEnum valueOf(int code) { // 手写的从int到enum的转换函数 | ||
| 37 | List<EJavaShopOrderStateEnum> enums = EnumUtils.getEnumList(EJavaShopOrderStateEnum.class); | ||
| 38 | EJavaShopOrderStateEnum result = enums.stream() | ||
| 39 | .filter(p -> p.getCode() == code) | ||
| 40 | .findFirst() | ||
| 41 | .orElse(EJavaShopOrderStateEnum.RefundFail); | ||
| 42 | return result; | ||
| 43 | } | ||
| 44 | |||
| 45 | |||
| 46 | public static EJavaShopOrderStateEnum resolve(String code) { | ||
| 47 | List<EJavaShopOrderStateEnum> enums = EnumUtils.getEnumList(EJavaShopOrderStateEnum.class); | ||
| 48 | EJavaShopOrderStateEnum result = enums.stream() | ||
| 49 | .filter(p -> StringUtils.equalsIgnoreCase(String.valueOf(p.getCode()), code)) | ||
| 50 | .findFirst() | ||
| 51 | .orElse(EJavaShopOrderStateEnum.RefundFail); | ||
| 52 | return result; | ||
| 53 | } | ||
| 54 | |||
| 55 | |||
| 56 | } |
| 1 | package com.sibu.orderHelper.integral.pineapple.enums; | ||
| 2 | |||
| 3 | import com.alibaba.druid.util.StringUtils; | ||
| 4 | import org.apache.commons.lang3.EnumUtils; | ||
| 5 | |||
| 6 | import java.util.List; | ||
| 7 | |||
| 8 | /** | ||
| 9 | * @author LauKa | ||
| 10 | * @contact a062431@vip.qq.com | ||
| 11 | * @date 2018/05/15 | ||
| 12 | * @description 新系统退款表状态 1、未处理;2、审核通过;3、用户发货,4、店铺收货;5、不予处理' | ||
| 13 | */ | ||
| 14 | public enum MemberProductBackEnum { | ||
| 15 | Pending(1, "未处理"), AuditSucceess(2, "审核通过"), MemberDeliver(3, "用户发货"), | ||
| 16 | ShopDelivery(4, "店铺收货"), Inattentive(5, "不予处理"); | ||
| 17 | |||
| 18 | private int code; // 错误代码 | ||
| 19 | private String msg; // 错误消息 | ||
| 20 | |||
| 21 | public int getCode() { | ||
| 22 | return code; | ||
| 23 | } | ||
| 24 | |||
| 25 | public String getMsg() { | ||
| 26 | return msg; | ||
| 27 | } | ||
| 28 | |||
| 29 | MemberProductBackEnum(int code, String msg) { | ||
| 30 | this.code = code; | ||
| 31 | this.msg = msg; | ||
| 32 | } | ||
| 33 | |||
| 34 | public static MemberProductBackEnum valueOf(int code) { // 手写的从int到enum的转换函数 | ||
| 35 | List<MemberProductBackEnum> enums = EnumUtils.getEnumList(MemberProductBackEnum.class); | ||
| 36 | MemberProductBackEnum result = enums.stream() | ||
| 37 | .filter(p -> p.getCode() == code) | ||
| 38 | .findFirst() | ||
| 39 | .orElse(null); | ||
| 40 | return result; | ||
| 41 | } | ||
| 42 | |||
| 43 | |||
| 44 | public static MemberProductBackEnum resolve(String code) { | ||
| 45 | List<MemberProductBackEnum> enums = EnumUtils.getEnumList(MemberProductBackEnum.class); | ||
| 46 | MemberProductBackEnum result = enums.stream() | ||
| 47 | .filter(p -> StringUtils.equalsIgnoreCase(String.valueOf(p.getCode()), code)) | ||
| 48 | .findFirst() | ||
| 49 | .orElse(null); | ||
| 50 | return result; | ||
| 51 | } | ||
| 52 | |||
| 53 | |||
| 54 | } |
| 1 | package com.sibu.orderHelper.integral.pineapple.enums; | ||
| 2 | |||
| 3 | import com.alibaba.druid.util.StringUtils; | ||
| 4 | import org.apache.commons.lang3.EnumUtils; | ||
| 5 | |||
| 6 | import java.util.List; | ||
| 7 | |||
| 8 | /** | ||
| 9 | * @author LauKa | ||
| 10 | * @contact a062431@vip.qq.com | ||
| 11 | * @date 2018/05/15 | ||
| 12 | * @description 新系统换货表状态 换货状态:1、未处理;2、审核通过;3、用户发回退件;4、商家收到退件;5、商家发出换件;6、原件退还;7、不处理 | ||
| 13 | */ | ||
| 14 | public enum MemberProductExchangeEnum { | ||
| 15 | Pending(1, "未处理"), AuditSucceess(2, "审核通过"), MemberDeliver(3, "用户发回退件"), | ||
| 16 | ShopDelivery(4, "商家收到退件"),ShopExchange(5,"商家发出换件"),ReturnOld(6,"原件退还"), Inattentive(7, "不予处理"); | ||
| 17 | |||
| 18 | private int code; // 错误代码 | ||
| 19 | private String msg; // 错误消息 | ||
| 20 | |||
| 21 | public int getCode() { | ||
| 22 | return code; | ||
| 23 | } | ||
| 24 | |||
| 25 | public String getMsg() { | ||
| 26 | return msg; | ||
| 27 | } | ||
| 28 | |||
| 29 | MemberProductExchangeEnum(int code, String msg) { | ||
| 30 | this.code = code; | ||
| 31 | this.msg = msg; | ||
| 32 | } | ||
| 33 | |||
| 34 | public static MemberProductExchangeEnum valueOf(int code) { // 手写的从int到enum的转换函数 | ||
| 35 | List<MemberProductExchangeEnum> enums = EnumUtils.getEnumList(MemberProductExchangeEnum.class); | ||
| 36 | MemberProductExchangeEnum result = enums.stream() | ||
| 37 | .filter(p -> p.getCode() == code) | ||
| 38 | .findFirst() | ||
| 39 | .orElse(null); | ||
| 40 | return result; | ||
| 41 | } | ||
| 42 | |||
| 43 | |||
| 44 | public static MemberProductExchangeEnum resolve(String code) { | ||
| 45 | List<MemberProductExchangeEnum> enums = EnumUtils.getEnumList(MemberProductExchangeEnum.class); | ||
| 46 | MemberProductExchangeEnum result = enums.stream() | ||
| 47 | .filter(p -> StringUtils.equalsIgnoreCase(String.valueOf(p.getCode()), code)) | ||
| 48 | .findFirst() | ||
| 49 | .orElse(null); | ||
| 50 | return result; | ||
| 51 | } | ||
| 52 | |||
| 53 | |||
| 54 | } |
| 1 | package com.sibu.orderHelper.integral.pineapple.enums; | ||
| 2 | |||
| 3 | |||
| 4 | import com.alibaba.druid.util.StringUtils; | ||
| 5 | import org.apache.commons.lang3.EnumUtils; | ||
| 6 | |||
| 7 | import java.util.ArrayList; | ||
| 8 | import java.util.Arrays; | ||
| 9 | import java.util.List; | ||
| 10 | |||
| 11 | /** | ||
| 12 | * @author lauka | ||
| 13 | * @date 2018/03/30 | ||
| 14 | * @description 菠萝派商城退款验证换货状态举类 | ||
| 15 | */ | ||
| 16 | public enum PineappleExchangeEnum { | ||
| 17 | JH_01("JH_01", "买家已经申请退款等待卖家同意",Arrays.asList(MemberProductExchangeEnum.Pending.getCode())), | ||
| 18 | JH_02("JH_02", "卖家已经同意退款等待买家退货", Arrays.asList(MemberProductExchangeEnum.AuditSucceess.getCode())), | ||
| 19 | JH_03("JH_03", "买家已经退货等待卖家确认收货",Arrays.asList(MemberProductExchangeEnum.MemberDeliver.getCode())), | ||
| 20 | JH_04("JH_04", "卖家拒绝退款",Arrays.asList()), | ||
| 21 | JH_05("JH_05", "退款关闭",new ArrayList<>(MemberProductExchangeEnum.Inattentive.getCode())), | ||
| 22 | JH_06("JH_06", "退款成功",Arrays.asList()), | ||
| 23 | JH_07("JH_07", "没有退款",Arrays.asList(MemberProductExchangeEnum.ReturnOld.getCode(),MemberProductExchangeEnum.ShopExchange.getCode())), | ||
| 24 | JH_99("JH_99", "其他",new ArrayList<>(MemberProductExchangeEnum.ShopDelivery.getCode())); | ||
| 25 | |||
| 26 | |||
| 27 | |||
| 28 | private String code; // 错误代码 | ||
| 29 | private String msg; // 错误消息 | ||
| 30 | List<Integer> mallOrderStatus; | ||
| 31 | |||
| 32 | |||
| 33 | PineappleExchangeEnum(String code, String msg, List<Integer> mallOrderStatus) { | ||
| 34 | this.code = code; | ||
| 35 | this.msg = msg; | ||
| 36 | this.mallOrderStatus = mallOrderStatus; | ||
| 37 | } | ||
| 38 | |||
| 39 | public String getCode() { | ||
| 40 | return code; | ||
| 41 | } | ||
| 42 | |||
| 43 | public void setCode(String code) { | ||
| 44 | this.code = code; | ||
| 45 | } | ||
| 46 | |||
| 47 | public String getMsg() { | ||
| 48 | return msg; | ||
| 49 | } | ||
| 50 | |||
| 51 | public void setMsg(String msg) { | ||
| 52 | this.msg = msg; | ||
| 53 | } | ||
| 54 | |||
| 55 | public static PineappleExchangeEnum resolve(String code) { | ||
| 56 | List<PineappleExchangeEnum> enums = EnumUtils.getEnumList(PineappleExchangeEnum.class); | ||
| 57 | PineappleExchangeEnum result = enums.stream() | ||
| 58 | .filter(p -> StringUtils.equalsIgnoreCase(p.code, code)) | ||
| 59 | .findFirst() | ||
| 60 | .orElse(PineappleExchangeEnum.JH_99); | ||
| 61 | return result; | ||
| 62 | } | ||
| 63 | |||
| 64 | public static PineappleExchangeEnum resolveByPlatformRefundStatus(Integer platformOrderStatus) { | ||
| 65 | List<PineappleExchangeEnum> enums = EnumUtils.getEnumList(PineappleExchangeEnum.class); | ||
| 66 | PineappleExchangeEnum result = enums.stream() | ||
| 67 | .filter(p -> p.mallOrderStatus != null && p.mallOrderStatus.contains(platformOrderStatus)) | ||
| 68 | .findFirst() | ||
| 69 | .orElse(PineappleExchangeEnum.JH_99); | ||
| 70 | return result; | ||
| 71 | } | ||
| 72 | |||
| 73 | |||
| 74 | |||
| 75 | } |
| 1 | package com.sibu.orderHelper.integral.pineapple.model; | ||
| 2 | |||
| 3 | import lombok.Data; | ||
| 4 | import lombok.ToString; | ||
| 5 | |||
| 6 | import java.io.Serializable; | ||
| 7 | |||
| 8 | @Data | ||
| 9 | @ToString | ||
| 10 | public class CourierCompany implements Serializable{ | ||
| 11 | |||
| 12 | |||
| 13 | private Integer id; | ||
| 14 | private java.util.Date createTime; | ||
| 15 | private Integer state; | ||
| 16 | private String companyMark; | ||
| 17 | private String companyName; | ||
| 18 | private Integer seq; | ||
| 19 | private String companyType; | ||
| 20 | private Integer sellerId; | ||
| 21 | } |
| 1 | package com.sibu.orderHelper.integral.pineapple.model; | ||
| 2 | |||
| 3 | import lombok.Data; | ||
| 4 | import lombok.ToString; | ||
| 5 | |||
| 6 | import java.io.Serializable; | ||
| 7 | |||
| 8 | @Data | ||
| 9 | @ToString | ||
| 10 | public class MemberProductBack implements Serializable{ | ||
| 11 | |||
| 12 | private java.lang.Integer id; | ||
| 13 | private java.lang.Integer sellerId; | ||
| 14 | private java.lang.String sellerName; | ||
| 15 | private java.lang.Integer orderId; | ||
| 16 | private java.lang.String orderSn; | ||
| 17 | private java.lang.Integer orderProductId; | ||
| 18 | private java.lang.Integer productId; | ||
| 19 | private java.lang.String productName; | ||
| 20 | private java.lang.Integer memberId; | ||
| 21 | private java.lang.String memberName; | ||
| 22 | private java.lang.Integer provinceId; | ||
| 23 | private java.lang.Integer cityId; | ||
| 24 | private java.lang.Integer areaId; | ||
| 25 | private java.lang.String addressAll; | ||
| 26 | private java.lang.String addressInfo; | ||
| 27 | private java.lang.String zipCode; | ||
| 28 | private java.lang.String contactPhone; | ||
| 29 | private java.lang.String contactName; | ||
| 30 | private java.lang.Integer logisticsId; | ||
| 31 | private java.lang.String logisticsName; | ||
| 32 | private java.lang.String logisticsMark; | ||
| 33 | private java.lang.String logisticsNumber; | ||
| 34 | private java.lang.String question; | ||
| 35 | private java.lang.String image; | ||
| 36 | private java.lang.Integer stateReturn; | ||
| 37 | private java.lang.Integer stateMoney; | ||
| 38 | private java.lang.Integer number; | ||
| 39 | private java.math.BigDecimal backMoney; | ||
| 40 | private java.lang.Integer backIntegral; | ||
| 41 | private java.math.BigDecimal backIntegralMoney; | ||
| 42 | private java.lang.Integer backCouponUserId; | ||
| 43 | private java.util.Date backMoneyTime; | ||
| 44 | private java.lang.Integer optId; | ||
| 45 | private java.lang.String optName; | ||
| 46 | private java.lang.String remark; | ||
| 47 | private java.util.Date createTime; | ||
| 48 | private java.util.Date updateTime; | ||
| 49 | } |
| 1 | package com.sibu.orderHelper.integral.pineapple.model; | ||
| 2 | |||
| 3 | import lombok.Data; | ||
| 4 | import lombok.ToString; | ||
| 5 | |||
| 6 | import java.io.Serializable; | ||
| 7 | |||
| 8 | @Data | ||
| 9 | @ToString | ||
| 10 | public class MemberProductExchange implements Serializable { | ||
| 11 | |||
| 12 | private java.lang.Integer id; | ||
| 13 | private java.lang.Integer sellerId; | ||
| 14 | private java.lang.String sellerName; | ||
| 15 | private java.lang.Integer orderId; | ||
| 16 | private java.lang.String orderSn; | ||
| 17 | private java.lang.Integer orderProductId; | ||
| 18 | private java.lang.Integer productId; | ||
| 19 | private java.lang.String productName; | ||
| 20 | private java.lang.Integer memberId; | ||
| 21 | private java.lang.String memberName; | ||
| 22 | private java.lang.Integer provinceId; | ||
| 23 | private java.lang.Integer cityId; | ||
| 24 | private java.lang.Integer areaId; | ||
| 25 | private java.lang.String addressAll; | ||
| 26 | private java.lang.String addressInfo; | ||
| 27 | private java.lang.String zipCode; | ||
| 28 | private java.lang.String changeName; | ||
| 29 | private java.lang.String phone; | ||
| 30 | private java.lang.Integer logisticsId; | ||
| 31 | private java.lang.String logisticsName; | ||
| 32 | private java.lang.String logisticsMark; | ||
| 33 | private java.lang.String logisticsNumber; | ||
| 34 | private java.lang.Integer provinceId2; | ||
| 35 | private java.lang.Integer cityId2; | ||
| 36 | private java.lang.Integer areaId2; | ||
| 37 | private java.lang.String addressAll2; | ||
| 38 | private java.lang.String addressInfo2; | ||
| 39 | private java.lang.String zipCode2; | ||
| 40 | private java.lang.String changeName2; | ||
| 41 | private java.lang.String phone2; | ||
| 42 | private java.lang.Integer logisticsId2; | ||
| 43 | private java.lang.String logisticsName2; | ||
| 44 | private java.lang.String logisticsMark2; | ||
| 45 | private java.lang.String logisticsNumber2; | ||
| 46 | private java.lang.Integer number; | ||
| 47 | private java.lang.String question; | ||
| 48 | private java.lang.String image; | ||
| 49 | private java.lang.String name; | ||
| 50 | private java.lang.Integer state; | ||
| 51 | private java.lang.Integer optId; | ||
| 52 | private java.lang.String optName; | ||
| 53 | private java.lang.String remark; | ||
| 54 | private java.util.Date createTime; | ||
| 55 | private java.util.Date updateTime; | ||
| 56 | } |
com.sibu.orderHelper.model/src/main/java/com/sibu/orderHelper/integral/pineapple/model/Orders.java
0 → 100644
| 1 | package com.sibu.orderHelper.integral.pineapple.model; | ||
| 2 | |||
| 3 | import lombok.Data; | ||
| 4 | import lombok.ToString; | ||
| 5 | |||
| 6 | import java.io.Serializable; | ||
| 7 | import java.math.BigDecimal; | ||
| 8 | import java.util.Date; | ||
| 9 | import java.util.List; | ||
| 10 | |||
| 11 | @Data | ||
| 12 | @ToString | ||
| 13 | public class Orders implements Serializable{ | ||
| 14 | private Integer id; | ||
| 15 | private String orderSn; | ||
| 16 | private String orderPsn; | ||
| 17 | private Integer isParent; | ||
| 18 | private Integer isShow; | ||
| 19 | private String relationOrderSn; | ||
| 20 | private Integer orderType; | ||
| 21 | private Integer sellerId; | ||
| 22 | private String sellerName; | ||
| 23 | private Integer memberId; | ||
| 24 | private String memberName; | ||
| 25 | private Integer orderState; | ||
| 26 | private Date payTime; | ||
| 27 | private Integer paymentStatus; | ||
| 28 | private Integer invoiceStatus; | ||
| 29 | private String invoiceTitle; | ||
| 30 | private String invoiceType; | ||
| 31 | private BigDecimal moneyProduct; | ||
| 32 | private BigDecimal moneyLogistics; | ||
| 33 | private BigDecimal moneyOrder; | ||
| 34 | private BigDecimal moneyPaidBalance; | ||
| 35 | private BigDecimal moneyPaidReality; | ||
| 36 | private BigDecimal moneyCoupon; | ||
| 37 | private BigDecimal moneyActFull; | ||
| 38 | private BigDecimal moneyDiscount; | ||
| 39 | private BigDecimal moneyBack; | ||
| 40 | private BigDecimal moneyIntegral; | ||
| 41 | private Integer integral; | ||
| 42 | private Integer couponUserId; | ||
| 43 | private Integer actFullId; | ||
| 44 | private Integer activityId; | ||
| 45 | private String ip; | ||
| 46 | private String paymentName; | ||
| 47 | private String paymentCode; | ||
| 48 | private String name; | ||
| 49 | private Integer provinceId; | ||
| 50 | private Integer cityId; | ||
| 51 | private Integer areaId; | ||
| 52 | private String addressAll; | ||
| 53 | private String addressInfo; | ||
| 54 | private String mobile; | ||
| 55 | private String email; | ||
| 56 | private String zipCode; | ||
| 57 | private String remark; | ||
| 58 | private String deliverTime; | ||
| 59 | private String finishTime; | ||
| 60 | private String tradeSn; | ||
| 61 | private Integer source; | ||
| 62 | private Integer logisticsId; | ||
| 63 | private String logisticsName; | ||
| 64 | private String logisticsNumber; | ||
| 65 | private Integer isCodconfim; | ||
| 66 | private Integer codconfirmId; | ||
| 67 | private String codconfirmName; | ||
| 68 | private String codconfirmTime; | ||
| 69 | private String codconfirmRemark; | ||
| 70 | private Integer codconfirmState; | ||
| 71 | private Date createTime; | ||
| 72 | private String updateTime; | ||
| 73 | private Integer evaluateState; | ||
| 74 | private String regionName1; | ||
| 75 | private String regionName2; | ||
| 76 | private String regionName3; | ||
| 77 | private BigDecimal deductionVbMoney; | ||
| 78 | private BigDecimal couponMoney; | ||
| 79 | |||
| 80 | private List<OrdersProduct> goodinfos; | ||
| 81 | |||
| 82 | |||
| 83 | } |
| 1 | package com.sibu.orderHelper.integral.pineapple.model; | ||
| 2 | |||
| 3 | import lombok.Data; | ||
| 4 | import lombok.ToString; | ||
| 5 | |||
| 6 | import java.math.BigDecimal; | ||
| 7 | import java.util.Date; | ||
| 8 | |||
| 9 | @Data | ||
| 10 | @ToString | ||
| 11 | public class OrdersProduct { | ||
| 12 | private Integer id; | ||
| 13 | private Integer ordersId; | ||
| 14 | private String ordersSn; | ||
| 15 | private String ordersPsn; | ||
| 16 | private Integer sellerId; | ||
| 17 | private String sellerName; | ||
| 18 | private Integer productCateId; | ||
| 19 | private Integer productId; | ||
| 20 | private Integer productGoodsId; | ||
| 21 | private String specInfo; | ||
| 22 | private String productName; | ||
| 23 | private String productSku; | ||
| 24 | private Integer packageGroupsId; | ||
| 25 | private Integer mallGroupsId; | ||
| 26 | private Integer giftId; | ||
| 27 | private Integer isGift; | ||
| 28 | private BigDecimal moneyPrice; | ||
| 29 | private Integer number; | ||
| 30 | private BigDecimal moneyAmount; | ||
| 31 | private BigDecimal moneyActSingle; | ||
| 32 | private Integer actSingleId; | ||
| 33 | private Integer actGroupId; | ||
| 34 | private Integer actFlashSaleId; | ||
| 35 | private Integer actFlashSaleProductId; | ||
| 36 | private Integer actBiddingId; | ||
| 37 | private Integer actIntegralId; | ||
| 38 | private Integer actIntegralNum; | ||
| 39 | private BigDecimal actIntegralMoney; | ||
| 40 | private String systemRemark; | ||
| 41 | private Integer backNumber; | ||
| 42 | private Integer exchangeNumber; | ||
| 43 | private Date createTime; | ||
| 44 | private Date updateTime; | ||
| 45 | private Integer isEvaluate; | ||
| 46 | private BigDecimal moneyFullAoumt; | ||
| 47 | private BigDecimal moneyCouponAmount; | ||
| 48 | private BigDecimal deductionProductVbMoney; | ||
| 49 | |||
| 50 | |||
| 51 | |||
| 52 | } |
com.sibu.orderHelper.model/src/main/java/com/sibu/orderHelper/integral/pineapple/model/Product.java
0 → 100644
| 1 | package com.sibu.orderHelper.integral.pineapple.model; | ||
| 2 | |||
| 3 | import lombok.Data; | ||
| 4 | import lombok.ToString; | ||
| 5 | |||
| 6 | import java.math.BigDecimal; | ||
| 7 | import java.util.Date; | ||
| 8 | |||
| 9 | @Data | ||
| 10 | @ToString | ||
| 11 | public class Product { | ||
| 12 | private Integer id; | ||
| 13 | private Integer productCateId; | ||
| 14 | private String productCatePath; | ||
| 15 | private String name1; | ||
| 16 | private String name2; | ||
| 17 | private String keyword; | ||
| 18 | private Integer productBrandId; | ||
| 19 | private Integer isSelf; | ||
| 20 | private BigDecimal costPrice; | ||
| 21 | private BigDecimal protectedPrice; | ||
| 22 | private BigDecimal marketPrice; | ||
| 23 | private BigDecimal mallPcPrice; | ||
| 24 | private BigDecimal malMobilePrice; | ||
| 25 | private Integer virtualSales; | ||
| 26 | private Integer actualSales; | ||
| 27 | private Integer productStock; | ||
| 28 | private Integer isNorm; | ||
| 29 | private String normIds; | ||
| 30 | private String normName; | ||
| 31 | private Integer state; | ||
| 32 | private Integer isTop; | ||
| 33 | private Date upTime; | ||
| 34 | private String description; | ||
| 35 | private String packing; | ||
| 36 | private Integer sellerId; | ||
| 37 | private Integer createId; | ||
| 38 | private Date createTime; | ||
| 39 | private Date updateTime; | ||
| 40 | private Integer sellerCateId; | ||
| 41 | private Integer sellerIsTop; | ||
| 42 | private Integer sellerState; | ||
| 43 | private Integer commentsNumber; | ||
| 44 | private Integer productCateState; | ||
| 45 | private Integer isInventedProduct; | ||
| 46 | private Integer transportType; | ||
| 47 | private Integer transportId; | ||
| 48 | private String masterImg; | ||
| 49 | private String productCode; | ||
| 50 | private BigDecimal saleScale1; | ||
| 51 | private BigDecimal saleScale2; | ||
| 52 | |||
| 53 | |||
| 54 | } |
| 1 | package com.sibu.orderHelper.integral.pineapple.model; | ||
| 2 | |||
| 3 | import lombok.Data; | ||
| 4 | import lombok.ToString; | ||
| 5 | |||
| 6 | @Data | ||
| 7 | @ToString | ||
| 8 | public class ProductGoods { | ||
| 9 | private Long id; | ||
| 10 | private Long productId; | ||
| 11 | private String normAttrId; | ||
| 12 | private String normName; | ||
| 13 | private Double mallPcPrice; | ||
| 14 | private Double mallMobilePrice; | ||
| 15 | private Long productStock; | ||
| 16 | private Long productStockWarning; | ||
| 17 | private Long actualSales; | ||
| 18 | private String sku; | ||
| 19 | private String images; | ||
| 20 | private Long state; | ||
| 21 | private Double weight; | ||
| 22 | private Long length; | ||
| 23 | private Long width; | ||
| 24 | private Long height; | ||
| 25 | |||
| 26 | |||
| 27 | } |
com.sibu.orderHelper.model/src/main/java/com/sibu/orderHelper/integral/pineapple/model/Regions.java
0 → 100644
| 1 | package com.sibu.orderHelper.integral.pineapple.model; | ||
| 2 | |||
| 3 | |||
| 4 | import lombok.Data; | ||
| 5 | import lombok.ToString; | ||
| 6 | |||
| 7 | import java.io.Serializable; | ||
| 8 | |||
| 9 | @Data | ||
| 10 | @ToString | ||
| 11 | public class Regions implements Serializable{ | ||
| 12 | |||
| 13 | private Integer id; | ||
| 14 | private Integer parentId; | ||
| 15 | private String regionName; | ||
| 16 | private String parentPath; | ||
| 17 | private String firstLetter; | ||
| 18 | private Integer regionType; | ||
| 19 | private Integer agencyId; | ||
| 20 | private Integer shippingId; | ||
| 21 | private Integer visible; | ||
| 22 | private String rowId; | ||
| 23 | } |
com.sibu.orderHelper.model/src/main/java/com/sibu/orderHelper/integral/pineapple/model/Seller.java
0 → 100644
| 1 | package com.sibu.orderHelper.integral.pineapple.model; | ||
| 2 | |||
| 3 | import lombok.Data; | ||
| 4 | import lombok.ToString; | ||
| 5 | |||
| 6 | import java.io.Serializable; | ||
| 7 | import java.math.BigDecimal; | ||
| 8 | import java.util.Date; | ||
| 9 | |||
| 10 | @Data | ||
| 11 | @ToString | ||
| 12 | public class Seller implements Serializable{ | ||
| 13 | |||
| 14 | |||
| 15 | private Integer id; //id | ||
| 16 | private Integer memberId; //用户ID | ||
| 17 | private String name; //用户名 | ||
| 18 | private String sellerName; //店铺名称 | ||
| 19 | private String sellerLogo; //店铺logo | ||
| 20 | private Integer sellerGrade; //店铺等级 | ||
| 21 | private String scoreService; //店铺评分服务 | ||
| 22 | private String scoreDeliverGoods; //店铺评分发货 | ||
| 23 | private String scoreDescription; //店铺评分描述 | ||
| 24 | private Integer productNumber; //商品数量 | ||
| 25 | private Integer collectionNumber; //店铺收藏 | ||
| 26 | private Date createTime; //创建时间 | ||
| 27 | private BigDecimal saleMoney; //店铺总销售金额 | ||
| 28 | private Integer orderCount; //店铺总订单量 | ||
| 29 | private Integer orderCountOver; //店铺完成订单量 | ||
| 30 | private String sellerKeyword; //SEO关键字 | ||
| 31 | private String sellerDes; //SEO店铺描述 | ||
| 32 | private Integer auditStatus; //审核状态 1、待审核;2、审核通过;3、冻结 | ||
| 33 | private String storeSlide; | ||
| 34 | } |
| 1 | package com.sibu.orderHelper.integral.pineapple.model; | ||
| 2 | |||
| 3 | import lombok.Data; | ||
| 4 | import lombok.ToString; | ||
| 5 | |||
| 6 | import java.io.Serializable; | ||
| 7 | |||
| 8 | @Data | ||
| 9 | @ToString | ||
| 10 | public class SellerComplaint implements Serializable { | ||
| 11 | |||
| 12 | private java.lang.Integer id; //id | ||
| 13 | private java.lang.Integer userId; //投诉人ID | ||
| 14 | private java.lang.String userName; //投诉人账户 | ||
| 15 | private java.lang.Integer orderId; //订单ID | ||
| 16 | private java.lang.Integer orderProductId; //网单ID | ||
| 17 | private java.lang.Integer productBackId; //退货管理id,如没有置为0 | ||
| 18 | private java.lang.Integer productExchangeId; //换货管理id,如没有置为0 | ||
| 19 | private java.lang.String content; //投诉内容 | ||
| 20 | private java.lang.String image; //投诉图片 | ||
| 21 | private java.util.Date complaintTime; //投诉时间 | ||
| 22 | private java.lang.Integer sellerId; //投诉商家 | ||
| 23 | private java.util.Date sellerComplaintTime; //商家申诉时间 | ||
| 24 | private java.lang.String sellerCompContent; //商家申诉内容 | ||
| 25 | private java.lang.String sellerCompImage; //商家申诉图片 | ||
| 26 | private java.lang.Integer state; //状态:1、买家投诉待审核;2、买家投诉不通过;3、买家投诉通过;4、卖家申诉待审核;5、卖家申诉不通过;6、卖家申诉通过; | ||
| 27 | private java.lang.Integer optId; //平台处理人ID | ||
| 28 | private java.lang.String optContent; //平台处理结果 | ||
| 29 | private java.lang.String userContent; //客户反馈意见 | ||
| 30 | private java.util.Date createTime; //创建时间 | ||
| 31 | private java.util.Date optTime; //处理时间 | ||
| 32 | } |
| ... | @@ -12,6 +12,7 @@ public class PineappleSyncStockRequest { | ... | @@ -12,6 +12,7 @@ public class PineappleSyncStockRequest { |
| 12 | @JsonProperty("PlatProductID") | 12 | @JsonProperty("PlatProductID") |
| 13 | private String platProductID; | 13 | private String platProductID; |
| 14 | 14 | ||
| 15 | @NotBlank(message = "skuid参数不能为空") | ||
| 15 | @JsonProperty("SkuID") | 16 | @JsonProperty("SkuID") |
| 16 | private String skuID; | 17 | private String skuID; |
| 17 | 18 | ... | ... |
| ... | @@ -36,11 +36,17 @@ | ... | @@ -36,11 +36,17 @@ |
| 36 | <artifactId>com.sibu.orderHelper.activeMQ</artifactId> | 36 | <artifactId>com.sibu.orderHelper.activeMQ</artifactId> |
| 37 | <version>0.0.1-SNAPSHOT</version> | 37 | <version>0.0.1-SNAPSHOT</version> |
| 38 | </dependency> | 38 | </dependency> |
| 39 | <!-- https://mvnrepository.com/artifact/org.csource/fastdfs-client-java --> | 39 | <!-- fastDfs jar 导入 --> |
| 40 | <dependency> | 40 | <dependency> |
| 41 | <groupId>org.csource</groupId> | 41 | <groupId>org.csource</groupId> |
| 42 | <artifactId>fastdfs-client-java</artifactId> | 42 | <artifactId>fastdfs-client-java</artifactId> |
| 43 | <version>1.25</version> | 43 | <version>5.0.4</version> |
| 44 | </dependency> | ||
| 45 | |||
| 46 | <dependency> | ||
| 47 | <groupId>com.sibu.sibu-mall-order</groupId> | ||
| 48 | <artifactId>sibu-mall-order-service-api</artifactId> | ||
| 49 | <version>1.0.0</version> | ||
| 44 | </dependency> | 50 | </dependency> |
| 45 | 51 | ||
| 46 | </dependencies> | 52 | </dependencies> | ... | ... |
| ... | @@ -6,9 +6,11 @@ import com.sibu.orderHelper.integral.dao.IMSupplierAppDao; | ... | @@ -6,9 +6,11 @@ import com.sibu.orderHelper.integral.dao.IMSupplierAppDao; |
| 6 | import com.sibu.orderHelper.integral.model.IMSupplierApp; | 6 | import com.sibu.orderHelper.integral.model.IMSupplierApp; |
| 7 | import com.sibu.orderHelper.integral.pineapple.request.BaseRequest; | 7 | import com.sibu.orderHelper.integral.pineapple.request.BaseRequest; |
| 8 | import com.sibu.orderHelper.integral.service.IMSupplierAppService; | 8 | import com.sibu.orderHelper.integral.service.IMSupplierAppService; |
| 9 | import com.sibu.orderHelper.mall.member.read.MemberReadDao; | ||
| 9 | import org.springframework.beans.factory.annotation.Autowired; | 10 | import org.springframework.beans.factory.annotation.Autowired; |
| 10 | import org.springframework.stereotype.Service; | 11 | import org.springframework.stereotype.Service; |
| 11 | 12 | ||
| 13 | import javax.annotation.Resource; | ||
| 12 | import java.util.HashMap; | 14 | import java.util.HashMap; |
| 13 | import java.util.Map; | 15 | import java.util.Map; |
| 14 | 16 | ||
| ... | @@ -23,6 +25,9 @@ public class IMSupplierAppServiceImpl implements IMSupplierAppService { | ... | @@ -23,6 +25,9 @@ public class IMSupplierAppServiceImpl implements IMSupplierAppService { |
| 23 | @Autowired | 25 | @Autowired |
| 24 | private IMSupplierAppDao imSupplierAppDao; | 26 | private IMSupplierAppDao imSupplierAppDao; |
| 25 | 27 | ||
| 28 | @Resource | ||
| 29 | private MemberReadDao memberReadDao; | ||
| 30 | |||
| 26 | @Override | 31 | @Override |
| 27 | public IMSupplierApp findByAppIdAndAppType(String appId, SupplierAppTypeEnum appType) { | 32 | public IMSupplierApp findByAppIdAndAppType(String appId, SupplierAppTypeEnum appType) { |
| 28 | Map<String, String> params = new HashMap<>(); | 33 | Map<String, String> params = new HashMap<>(); |
| ... | @@ -37,6 +42,6 @@ public class IMSupplierAppServiceImpl implements IMSupplierAppService { | ... | @@ -37,6 +42,6 @@ public class IMSupplierAppServiceImpl implements IMSupplierAppService { |
| 37 | params.put("appId", requestParams.getAppkey()); | 42 | params.put("appId", requestParams.getAppkey()); |
| 38 | params.put("appToken", requestParams.getToken()); | 43 | params.put("appToken", requestParams.getToken()); |
| 39 | params.put("appType", appType.getCode()); | 44 | params.put("appType", appType.getCode()); |
| 40 | return imSupplierAppDao.findByAppIdAndAppType(params); | 45 | return memberReadDao.findByAppIdAndAppType(params); |
| 41 | } | 46 | } |
| 42 | } | 47 | } | ... | ... |
| ... | @@ -45,7 +45,7 @@ public class PineappleServiceImpl implements PineappleService { | ... | @@ -45,7 +45,7 @@ public class PineappleServiceImpl implements PineappleService { |
| 45 | params.put("endTime",""); | 45 | params.put("endTime",""); |
| 46 | params.put("pageNow","1"); | 46 | params.put("pageNow","1"); |
| 47 | params.put("PageSize","10"); | 47 | params.put("PageSize","10"); |
| 48 | return pineappleDao.pageGetRefundBean(params); | 48 | return null; |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | @Override | 51 | @Override |
| ... | @@ -68,7 +68,7 @@ public class PineappleServiceImpl implements PineappleService { | ... | @@ -68,7 +68,7 @@ public class PineappleServiceImpl implements PineappleService { |
| 68 | @Override | 68 | @Override |
| 69 | public PineappleSyncStockResponse updateSyncStock(PineappleSyncStockRequest pineappleSyncStockRequest) throws Exception { | 69 | public PineappleSyncStockResponse updateSyncStock(PineappleSyncStockRequest pineappleSyncStockRequest) throws Exception { |
| 70 | PineappleSyncStockResponse pineappleSyncStockResponse = new PineappleSyncStockResponse(); | 70 | PineappleSyncStockResponse pineappleSyncStockResponse = new PineappleSyncStockResponse(); |
| 71 | Map<String,Object> params = new HashMap<>(); | 71 | /* Map<String,Object> params = new HashMap<>(); |
| 72 | params.put("supplierId",""); | 72 | params.put("supplierId",""); |
| 73 | params.put("productId",pineappleSyncStockRequest.getPlatProductID()); | 73 | params.put("productId",pineappleSyncStockRequest.getPlatProductID()); |
| 74 | //先判断SKU在判断产品 | 74 | //先判断SKU在判断产品 |
| ... | @@ -144,12 +144,13 @@ public class PineappleServiceImpl implements PineappleService { | ... | @@ -144,12 +144,13 @@ public class PineappleServiceImpl implements PineappleService { |
| 144 | pineappleSyncStockResponse.setQuantity(String.valueOf(pineappleSyncStockRequest.getQuantity())); | 144 | pineappleSyncStockResponse.setQuantity(String.valueOf(pineappleSyncStockRequest.getQuantity())); |
| 145 | pineappleSyncStockResponse.setMessage(PineappleEnum.ERROR.getMsg()); | 145 | pineappleSyncStockResponse.setMessage(PineappleEnum.ERROR.getMsg()); |
| 146 | pineappleSyncStockResponse.setCode(PineappleEnum.ERROR.getCode()); | 146 | pineappleSyncStockResponse.setCode(PineappleEnum.ERROR.getCode()); |
| 147 | return pineappleSyncStockResponse; | 147 | return pineappleSyncStockResponse;*/ |
| 148 | return null; | ||
| 148 | } | 149 | } |
| 149 | 150 | ||
| 150 | @Override | 151 | @Override |
| 151 | public BaseResponse shipments(PineappleSendRequest pineappleSend) throws Exception { | 152 | public BaseResponse shipments(PineappleSendRequest pineappleSend) throws Exception { |
| 152 | BaseResponse baseResponse =new BaseResponse(); | 153 | /*BaseResponse baseResponse =new BaseResponse(); |
| 153 | Map<String,Object> params = new HashMap<>(); | 154 | Map<String,Object> params = new HashMap<>(); |
| 154 | String redisMysqlDbConfig = ""; | 155 | String redisMysqlDbConfig = ""; |
| 155 | //订单号不符合 | 156 | //订单号不符合 |
| ... | @@ -200,12 +201,13 @@ public class PineappleServiceImpl implements PineappleService { | ... | @@ -200,12 +201,13 @@ public class PineappleServiceImpl implements PineappleService { |
| 200 | pineappleDao.updateBusinessSend(params); | 201 | pineappleDao.updateBusinessSend(params); |
| 201 | baseResponse.setMessage(PineappleEnum.ERROR.getMsg()); | 202 | baseResponse.setMessage(PineappleEnum.ERROR.getMsg()); |
| 202 | baseResponse.setCode(PineappleEnum.ERROR.getCode()); | 203 | baseResponse.setCode(PineappleEnum.ERROR.getCode()); |
| 203 | return baseResponse; | 204 | return baseResponse;*/ |
| 205 | return null; | ||
| 204 | } | 206 | } |
| 205 | 207 | ||
| 206 | @Override | 208 | @Override |
| 207 | public UpdateSellerMemoResponse updateSelle(UpdateSellerMemoRequest updateSellerMemoRequest)throws Exception { | 209 | public UpdateSellerMemoResponse updateSelle(UpdateSellerMemoRequest updateSellerMemoRequest)throws Exception { |
| 208 | UpdateSellerMemoResponse UpdateSellerMemoResponse =new UpdateSellerMemoResponse(); | 210 | /* UpdateSellerMemoResponse UpdateSellerMemoResponse =new UpdateSellerMemoResponse(); |
| 209 | Map<String,Object> params = new HashMap<>(); | 211 | Map<String,Object> params = new HashMap<>(); |
| 210 | String redisMysqlDbConfig = ""; | 212 | String redisMysqlDbConfig = ""; |
| 211 | //订单号不符合 | 213 | //订单号不符合 |
| ... | @@ -226,6 +228,7 @@ public class PineappleServiceImpl implements PineappleService { | ... | @@ -226,6 +228,7 @@ public class PineappleServiceImpl implements PineappleService { |
| 226 | UpdateSellerMemoResponse.setCode(PineappleEnum.SUCCESS.getCode()); | 228 | UpdateSellerMemoResponse.setCode(PineappleEnum.SUCCESS.getCode()); |
| 227 | UpdateSellerMemoResponse.setMessage(PineappleEnum.SUCCESS.getMsg()); | 229 | UpdateSellerMemoResponse.setMessage(PineappleEnum.SUCCESS.getMsg()); |
| 228 | 230 | ||
| 229 | return UpdateSellerMemoResponse; | 231 | return UpdateSellerMemoResponse;*/ |
| 232 | return null; | ||
| 230 | } | 233 | } |
| 231 | } | 234 | } | ... | ... |
此文件的差异被折叠,
点击展开。
| ... | @@ -10,6 +10,7 @@ import com.sibu.orderHelper.integral.model.DownloadProductSkuBean; | ... | @@ -10,6 +10,7 @@ import com.sibu.orderHelper.integral.model.DownloadProductSkuBean; |
| 10 | import com.sibu.orderHelper.integral.pineapple.request.CallRequest; | 10 | import com.sibu.orderHelper.integral.pineapple.request.CallRequest; |
| 11 | import com.sibu.orderHelper.integral.reponse.DownloadProductResponse; | 11 | import com.sibu.orderHelper.integral.reponse.DownloadProductResponse; |
| 12 | import com.sibu.orderHelper.integral.request.DownloadProductRequest; | 12 | import com.sibu.orderHelper.integral.request.DownloadProductRequest; |
| 13 | import com.sibu.orderHelper.mall.member.read.MemberReadDao; | ||
| 13 | import org.apache.log4j.Logger; | 14 | import org.apache.log4j.Logger; |
| 14 | import org.springframework.stereotype.Service; | 15 | import org.springframework.stereotype.Service; |
| 15 | 16 | ||
| ... | @@ -23,15 +24,15 @@ public class DownloadProductBizServiceImpl extends AbstractBizService<DownloadP | ... | @@ -23,15 +24,15 @@ public class DownloadProductBizServiceImpl extends AbstractBizService<DownloadP |
| 23 | 24 | ||
| 24 | private static Logger log = Logger.getLogger(DownloadProductBizServiceImpl.class); | 25 | private static Logger log = Logger.getLogger(DownloadProductBizServiceImpl.class); |
| 25 | @Resource | 26 | @Resource |
| 26 | private PineappleDao pineappleDao; | 27 | private MemberReadDao memberReadDao; |
| 27 | 28 | ||
| 28 | @Override | 29 | @Override |
| 29 | public DownloadProductResponse call(CallRequest<DownloadProductRequest> callRequest) throws Exception { | 30 | public DownloadProductResponse call(CallRequest<DownloadProductRequest> callRequest) throws Exception { |
| 30 | DownloadProductResponse downloadProductResponse = new DownloadProductResponse(); | 31 | DownloadProductResponse downloadProductResponse = new DownloadProductResponse(); |
| 31 | Map<String,Object> params =new HashMap<>(); | 32 | Map<String,Object> params =new HashMap<>(); |
| 32 | params.put("supplierId",callRequest.getSupplier().getId()); | 33 | params.put("sellerId",callRequest.getSupplier().getId()); |
| 33 | if(!StringUtil.isNull(callRequest.getBizModel().getStatus())){ | 34 | if(!StringUtil.isNull(callRequest.getBizModel().getStatus())){ |
| 34 | params.put("isShow", DownloadProductStatusEnum.resolve(callRequest.getBizModel().getStatus()).intValue()); | 35 | params.put("state", DownloadProductStatusEnum.resolve(callRequest.getBizModel().getStatus()).intValue()); |
| 35 | } | 36 | } |
| 36 | params.put("PageIndex",(callRequest.getBizModel().getPageIndex() - 1) * callRequest.getBizModel().getPageSize()); | 37 | params.put("PageIndex",(callRequest.getBizModel().getPageIndex() - 1) * callRequest.getBizModel().getPageSize()); |
| 37 | params.put("PageSize",callRequest.getBizModel().getPageSize()); | 38 | params.put("PageSize",callRequest.getBizModel().getPageSize()); |
| ... | @@ -42,35 +43,15 @@ public class DownloadProductBizServiceImpl extends AbstractBizService<DownloadP | ... | @@ -42,35 +43,15 @@ public class DownloadProductBizServiceImpl extends AbstractBizService<DownloadP |
| 42 | params.put("productName",callRequest.getBizModel().getPageSize()); | 43 | params.put("productName",callRequest.getBizModel().getPageSize()); |
| 43 | } | 44 | } |
| 44 | //查询产品 | 45 | //查询产品 |
| 45 | List<DownloadProductBean> downloadProductBeanList = pineappleDao.getProductListByMap(params); | 46 | List<DownloadProductBean> downloadProductBeanList = memberReadDao.downloadProductListByMap(params); |
| 46 | if(!StringUtil.isNull(downloadProductBeanList) && !downloadProductBeanList.isEmpty()){ | 47 | if(!StringUtil.isNull(downloadProductBeanList) && !downloadProductBeanList.isEmpty()){ |
| 47 | for(DownloadProductBean product : downloadProductBeanList){ | 48 | for(DownloadProductBean product : downloadProductBeanList){ |
| 48 | //产品SKU | 49 | //产品SKU |
| 49 | List<DownloadProductSkuBean> downloadProductSkuBeanList = pineappleDao.getDownloadProductSkuBeanList(product.getPlatProductID()); | 50 | List<DownloadProductSkuBean> downloadProductSkuBeanList = memberReadDao.downloadSkuByProductId(product.getPlatProductID()); |
| 50 | if(!StringUtil.isNull(downloadProductSkuBeanList) && !downloadProductSkuBeanList.isEmpty()){ | ||
| 51 | for(int i=0;i<downloadProductSkuBeanList.size();i++){ | ||
| 52 | DownloadProductSkuBean sku = downloadProductSkuBeanList.get(i); | ||
| 53 | //查询SKU规格名称 | ||
| 54 | List<DownloadProductSkuBean> skuList = pineappleDao.getDownloadSkuBean(sku.getSkuID()); | ||
| 55 | if(!StringUtil.isNull(skuList) && !skuList.isEmpty()){ | ||
| 56 | StringBuffer sb = new StringBuffer(); | ||
| 57 | for(int j = 0;j<skuList.size();j++){ | ||
| 58 | if(j ==0){ | ||
| 59 | sb.append(skuList.get(j).getSkuname()); | ||
| 60 | }else{ | ||
| 61 | sb.append(","+skuList.get(j).getSkuname()); | ||
| 62 | } | ||
| 63 | } | ||
| 64 | sku.setSkuname(sb.toString()); | ||
| 65 | sku.setSkupictureurl(product.getPictureurl()); | ||
| 66 | } | ||
| 67 | |||
| 68 | } | ||
| 69 | } | ||
| 70 | product.setSkus(downloadProductSkuBeanList); | 51 | product.setSkus(downloadProductSkuBeanList); |
| 71 | }; | 52 | }; |
| 72 | 53 | int count = memberReadDao.countDownloadProductListByMap(params); | |
| 73 | downloadProductResponse.setTotalcount(downloadProductBeanList.size()); | 54 | downloadProductResponse.setTotalcount(count); |
| 74 | }else{ | 55 | }else{ |
| 75 | downloadProductResponse.setTotalcount(0); | 56 | downloadProductResponse.setTotalcount(0); |
| 76 | } | 57 | } | ... | ... |
此文件的差异被折叠,
点击展开。
| 1 | package com.sibu.orderHelper.integral.service.pineapple.impl; | 1 | package com.sibu.orderHelper.integral.service.pineapple.impl; |
| 2 | 2 | ||
| 3 | import com.alibaba.dubbo.config.annotation.Reference; | ||
| 4 | import com.doubo.common.model.response.CommonResponse; | ||
| 5 | import com.sibu.mall.common.utils.SeqGenUtil; | ||
| 6 | import com.sibu.mall.order.request.api.ApiOrdersSnRequest; | ||
| 7 | import com.sibu.mall.order.request.third.ThirdOrdersProductIdRequest; | ||
| 8 | import com.sibu.mall.order.response.api.ApiOrdersResponse; | ||
| 9 | import com.sibu.mall.order.service.ApiOrdersService; | ||
| 10 | import com.sibu.mall.order.service.ThirdApiOrderService; | ||
| 3 | import com.sibu.orderHelper.common.constants.AppConstants; | 11 | import com.sibu.orderHelper.common.constants.AppConstants; |
| 4 | import com.sibu.orderHelper.common.database.DBContextHolder; | 12 | import com.sibu.orderHelper.common.database.DBContextHolder; |
| 5 | import com.sibu.orderHelper.common.strategy.DbUtil; | 13 | import com.sibu.orderHelper.common.strategy.DbUtil; |
| ... | @@ -7,6 +15,7 @@ import com.sibu.orderHelper.common.util.StringUtil; | ... | @@ -7,6 +15,7 @@ import com.sibu.orderHelper.common.util.StringUtil; |
| 7 | import com.sibu.orderHelper.enums.PineappleEnum; | 15 | import com.sibu.orderHelper.enums.PineappleEnum; |
| 8 | import com.sibu.orderHelper.enums.PineappleMethodsEnum; | 16 | import com.sibu.orderHelper.enums.PineappleMethodsEnum; |
| 9 | import com.sibu.orderHelper.enums.PineappleRefundEnum; | 17 | import com.sibu.orderHelper.enums.PineappleRefundEnum; |
| 18 | import com.sibu.orderHelper.enums.PineappleRefundMoneyStateEnum; | ||
| 10 | import com.sibu.orderHelper.integral.dao.PineappleDao; | 19 | import com.sibu.orderHelper.integral.dao.PineappleDao; |
| 11 | import com.sibu.orderHelper.integral.model.GetRefundBean; | 20 | import com.sibu.orderHelper.integral.model.GetRefundBean; |
| 12 | import com.sibu.orderHelper.integral.model.PineappleOderDetailBean; | 21 | import com.sibu.orderHelper.integral.model.PineappleOderDetailBean; |
| ... | @@ -15,6 +24,7 @@ import com.sibu.orderHelper.integral.pineapple.exception.BizException; | ... | @@ -15,6 +24,7 @@ import com.sibu.orderHelper.integral.pineapple.exception.BizException; |
| 15 | import com.sibu.orderHelper.integral.pineapple.request.CallRequest; | 24 | import com.sibu.orderHelper.integral.pineapple.request.CallRequest; |
| 16 | import com.sibu.orderHelper.integral.reponse.GetRefundResponse; | 25 | import com.sibu.orderHelper.integral.reponse.GetRefundResponse; |
| 17 | import com.sibu.orderHelper.integral.request.GetRefundRequest; | 26 | import com.sibu.orderHelper.integral.request.GetRefundRequest; |
| 27 | import com.sibu.orderHelper.mall.member.read.MemberReadDao; | ||
| 18 | import org.apache.log4j.Logger; | 28 | import org.apache.log4j.Logger; |
| 19 | import org.springframework.stereotype.Service; | 29 | import org.springframework.stereotype.Service; |
| 20 | 30 | ||
| ... | @@ -31,6 +41,14 @@ public class GetRefundBizServiceImpl extends AbstractBizService<GetRefundReques | ... | @@ -31,6 +41,14 @@ public class GetRefundBizServiceImpl extends AbstractBizService<GetRefundReques |
| 31 | @Resource | 41 | @Resource |
| 32 | private PineappleDao pineappleDao; | 42 | private PineappleDao pineappleDao; |
| 33 | 43 | ||
| 44 | @Resource | ||
| 45 | private MemberReadDao memberReadDao; | ||
| 46 | |||
| 47 | @Reference | ||
| 48 | private ThirdApiOrderService thirdApiOrderService; | ||
| 49 | |||
| 50 | @Reference | ||
| 51 | private ApiOrdersService apiOrdersService; | ||
| 34 | 52 | ||
| 35 | @Override | 53 | @Override |
| 36 | public GetRefundResponse call(CallRequest<GetRefundRequest> callRequest) throws Exception { | 54 | public GetRefundResponse call(CallRequest<GetRefundRequest> callRequest) throws Exception { |
| ... | @@ -39,12 +57,53 @@ public class GetRefundBizServiceImpl extends AbstractBizService<GetRefundReques | ... | @@ -39,12 +57,53 @@ public class GetRefundBizServiceImpl extends AbstractBizService<GetRefundReques |
| 39 | params.put("supplierId",callRequest.getSupplier().getId()); | 57 | params.put("supplierId",callRequest.getSupplier().getId()); |
| 40 | params.put("beginTime",callRequest.getBizModel().getBeginTime()); | 58 | params.put("beginTime",callRequest.getBizModel().getBeginTime()); |
| 41 | params.put("endTime",callRequest.getBizModel().getEndTime()); | 59 | params.put("endTime",callRequest.getBizModel().getEndTime()); |
| 42 | params.put("pageNow",(callRequest.getBizModel().getPageIndex()- 1) * callRequest.getBizModel().getPageSize()); | 60 | params.put("PageIndex",(callRequest.getBizModel().getPageIndex()- 1) * callRequest.getBizModel().getPageSize()); |
| 43 | params.put("PageSize",callRequest.getBizModel().getPageSize()); | 61 | params.put("PageSize",callRequest.getBizModel().getPageSize()); |
| 44 | 62 | ||
| 45 | List<GetRefundBean> refundBeanList = pineappleDao.pageGetRefundBean(params); | 63 | List<GetRefundBean> refundBeanList = memberReadDao.getGetRefundBean(params); |
| 46 | if(!StringUtil.isNull(refundBeanList) && !refundBeanList.isEmpty()){ | 64 | if(!StringUtil.isNull(refundBeanList) && !refundBeanList.isEmpty()){ |
| 47 | for(GetRefundBean getRefundBean:refundBeanList){ | 65 | for(GetRefundBean getRefundBean:refundBeanList){ |
| 66 | |||
| 67 | String orderSn = getRefundBean.getPlatorderno(); | ||
| 68 | //旧订单号处理 | ||
| 69 | if(!orderSn.startsWith("B")){ | ||
| 70 | orderSn = memberReadDao.getNewOrderSnByOldOrderSn(orderSn); | ||
| 71 | } | ||
| 72 | |||
| 73 | ApiOrdersSnRequest apiOrdersSnRequest = new ApiOrdersSnRequest(orderSn); | ||
| 74 | apiOrdersSnRequest.setInitiationID(SeqGenUtil.getLogId()); | ||
| 75 | CommonResponse<ApiOrdersResponse> orderResponse = apiOrdersService.getOrdersByOrderSn(apiOrdersSnRequest); | ||
| 76 | if(orderResponse.isSuccess()){ | ||
| 77 | getRefundBean.setTotalamount(orderResponse.getResult().getMoneyOrder()); | ||
| 78 | getRefundBean.setPayamount(orderResponse.getResult().getMoneyOrder()); | ||
| 79 | getRefundBean.setOrderstatus(String.valueOf(orderResponse.getResult().getOrderState())); | ||
| 80 | }else { | ||
| 81 | throw new BizException(orderResponse.getErrorMsg()); | ||
| 82 | } | ||
| 83 | ThirdOrdersProductIdRequest thirdOrdersProductIdRequest = new ThirdOrdersProductIdRequest(getRefundBean.getOrdersproductuid(),orderSn); | ||
| 84 | thirdOrdersProductIdRequest.setInitiationID(SeqGenUtil.getLogId()); | ||
| 85 | CommonResponse<Integer> response = thirdApiOrderService.countOrderProductNum(thirdOrdersProductIdRequest); | ||
| 86 | getRefundBean.setProductnum(response.getResult()); | ||
| 87 | OrderStatusEnum orderStatusEnum = OrderStatusEnum.resolveByPlatformOrderStatus(Integer.valueOf(getRefundBean.getOrderstatus())); | ||
| 88 | if(orderStatusEnum.getCode().equals(OrderStatusEnum.UNKNOWN.getCode())){ | ||
| 89 | throw new BizException(String.format("菠萝派退款单下载,枚举查询订单状态报错,订单状态【{0}】转换失败",getRefundBean.getOrderstatus())); | ||
| 90 | } | ||
| 91 | getRefundBean.setOrderstatus(orderStatusEnum.getCode()); | ||
| 92 | getRefundBean.setOrderstatusdesc(orderStatusEnum.getMsg()); | ||
| 93 | PineappleRefundEnum pineappleRefundEnum = PineappleRefundEnum.resolveByPlatformRefundStatus(Integer.valueOf(getRefundBean.getRefundstatus())); | ||
| 94 | if(pineappleRefundEnum.getCode() == PineappleRefundEnum.JH_06.getCode()){ | ||
| 95 | PineappleRefundMoneyStateEnum pineappleRefundMoneyStateEnum = PineappleRefundMoneyStateEnum.resolveByPlatformRefundStatus(getRefundBean.getStateMoney()); | ||
| 96 | if(pineappleRefundMoneyStateEnum.getCode().equals(PineappleRefundMoneyStateEnum.REFUND_UNKNOWN.getCode())){ | ||
| 97 | throw new BizException(String.format("菠萝派退款单下载,枚举查询退款状态报错,订单状态【{0}】转换失败",getRefundBean.getRefundstatus())); | ||
| 98 | } | ||
| 99 | getRefundBean.setRefundstatus(pineappleRefundMoneyStateEnum.getPineappleRefundEnum().getCode()); | ||
| 100 | getRefundBean.setRefundstatusdesc(pineappleRefundMoneyStateEnum.getPineappleRefundEnum().getMsg()); | ||
| 101 | }else{ | ||
| 102 | getRefundBean.setRefundstatus(pineappleRefundEnum.getCode()); | ||
| 103 | getRefundBean.setRefundstatusdesc(pineappleRefundEnum.getMsg()); | ||
| 104 | } | ||
| 105 | } | ||
| 106 | /*for(GetRefundBean getRefundBean:refundBeanList){ | ||
| 48 | Map<String,Object> map = new HashMap<>(); | 107 | Map<String,Object> map = new HashMap<>(); |
| 49 | String redisMysqlDbConfig = ""; | 108 | String redisMysqlDbConfig = ""; |
| 50 | Integer dataBaseModule = DbUtil.getOrderInWhichDataBase(getRefundBean.getPlatorderno()); | 109 | Integer dataBaseModule = DbUtil.getOrderInWhichDataBase(getRefundBean.getPlatorderno()); |
| ... | @@ -54,7 +113,7 @@ public class GetRefundBizServiceImpl extends AbstractBizService<GetRefundReques | ... | @@ -54,7 +113,7 @@ public class GetRefundBizServiceImpl extends AbstractBizService<GetRefundReques |
| 54 | map.put("orderId1",getRefundBean.getSubplatorderno()); | 113 | map.put("orderId1",getRefundBean.getSubplatorderno()); |
| 55 | redisMysqlDbConfig = String.format(AppConstants.REDIS_DB_TYPE, AppConstants.INTEGRALMALL_ORDER_DATABASE, dataBaseModule.intValue()); | 114 | redisMysqlDbConfig = String.format(AppConstants.REDIS_DB_TYPE, AppConstants.INTEGRALMALL_ORDER_DATABASE, dataBaseModule.intValue()); |
| 56 | DBContextHolder.setDBType(redisMysqlDbConfig);//切换数据源 | 115 | DBContextHolder.setDBType(redisMysqlDbConfig);//切换数据源 |
| 57 | PineappleOderDetailBean pineappleOderDetailBean = pineappleDao.getOneIMOrderById(map); | 116 | PineappleOderDetailBean pineappleOderDetailBean = null; |
| 58 | if(StringUtil.isNull(pineappleOderDetailBean)){ | 117 | if(StringUtil.isNull(pineappleOderDetailBean)){ |
| 59 | log.error(String.format("订单号:%查询不到该订单信息,请求method:%s,appket:%s",getRefundBean.getSubplatorderno(),callRequest.getRequest().getMethod(),callRequest.getRequest().getAppkey())); | 118 | log.error(String.format("订单号:%查询不到该订单信息,请求method:%s,appket:%s",getRefundBean.getSubplatorderno(),callRequest.getRequest().getMethod(),callRequest.getRequest().getAppkey())); |
| 60 | throw new BizException(String.format("订单号:%查询不到该订单信息,请求method:%s,appket:%s",getRefundBean.getSubplatorderno(),callRequest.getRequest().getMethod(),callRequest.getRequest().getAppkey())); | 119 | throw new BizException(String.format("订单号:%查询不到该订单信息,请求method:%s,appket:%s",getRefundBean.getSubplatorderno(),callRequest.getRequest().getMethod(),callRequest.getRequest().getAppkey())); |
| ... | @@ -75,8 +134,8 @@ public class GetRefundBizServiceImpl extends AbstractBizService<GetRefundReques | ... | @@ -75,8 +134,8 @@ public class GetRefundBizServiceImpl extends AbstractBizService<GetRefundReques |
| 75 | getRefundBean.setRefundstatus(PineappleRefundEnum.resolveByPlatformRefundStatus(Integer.valueOf(getRefundBean.getRefundstatus())).getCode()); | 134 | getRefundBean.setRefundstatus(PineappleRefundEnum.resolveByPlatformRefundStatus(Integer.valueOf(getRefundBean.getRefundstatus())).getCode()); |
| 76 | 135 | ||
| 77 | 136 | ||
| 78 | } | 137 | }*/ |
| 79 | getRefundResponse.setTotalcount(refundBeanList.size()); | 138 | getRefundResponse.setTotalcount(memberReadDao.countGetGetRefundBean(params)); |
| 80 | }else{ | 139 | }else{ |
| 81 | getRefundResponse.setTotalcount(0); | 140 | getRefundResponse.setTotalcount(0); |
| 82 | } | 141 | } | ... | ... |
此文件的差异被折叠,
点击展开。
此文件的差异被折叠,
点击展开。
| 1 | package com.sibu.orderHelper.integral.service.pineapple.impl; | 1 | package com.sibu.orderHelper.integral.service.pineapple.impl; |
| 2 | 2 | ||
| 3 | import com.sibu.orderHelper.common.constants.AppConstants; | 3 | import com.alibaba.dubbo.config.annotation.Reference; |
| 4 | import com.sibu.orderHelper.common.database.DBContextHolder; | 4 | import com.doubo.common.model.response.CommonResponse; |
| 5 | import com.sibu.orderHelper.common.strategy.DbUtil; | 5 | import com.sibu.mall.common.utils.SeqGenUtil; |
| 6 | import com.sibu.mall.order.request.third.ThirdQueryOrderRequest; | ||
| 7 | import com.sibu.mall.order.request.third.ThirdUpdateOrderRequest; | ||
| 8 | import com.sibu.mall.order.response.api.ApiOrdersResponse; | ||
| 9 | import com.sibu.mall.order.service.ThirdApiOrderService; | ||
| 10 | import com.sibu.orderHelper.common.util.BeanCopyUtils; | ||
| 6 | import com.sibu.orderHelper.common.util.StringUtil; | 11 | import com.sibu.orderHelper.common.util.StringUtil; |
| 7 | import com.sibu.orderHelper.enums.PineappleEnum; | 12 | import com.sibu.orderHelper.enums.PineappleEnum; |
| 8 | import com.sibu.orderHelper.enums.PineappleMethodsEnum; | 13 | import com.sibu.orderHelper.enums.PineappleMethodsEnum; |
| 9 | import com.sibu.orderHelper.integral.dao.PineappleDao; | ||
| 10 | import com.sibu.orderHelper.integral.model.IMDoingOrderBean; | ||
| 11 | import com.sibu.orderHelper.integral.pineapple.exception.BizException; | 14 | import com.sibu.orderHelper.integral.pineapple.exception.BizException; |
| 15 | import com.sibu.orderHelper.integral.pineapple.model.Orders; | ||
| 12 | import com.sibu.orderHelper.integral.pineapple.request.CallRequest; | 16 | import com.sibu.orderHelper.integral.pineapple.request.CallRequest; |
| 13 | import com.sibu.orderHelper.integral.reponse.UpdateSellerMemoResponse; | 17 | import com.sibu.orderHelper.integral.reponse.UpdateSellerMemoResponse; |
| 14 | import com.sibu.orderHelper.integral.request.UpdateSellerMemoRequest; | 18 | import com.sibu.orderHelper.integral.request.UpdateSellerMemoRequest; |
| 19 | import com.sibu.orderHelper.mall.member.read.MemberReadDao; | ||
| 15 | import org.apache.log4j.Logger; | 20 | import org.apache.log4j.Logger; |
| 16 | import org.springframework.stereotype.Service; | 21 | import org.springframework.stereotype.Service; |
| 17 | |||
| 18 | import javax.annotation.Resource; | 22 | import javax.annotation.Resource; |
| 19 | import java.util.HashMap; | 23 | |
| 20 | import java.util.Map; | ||
| 21 | @Service | 24 | @Service |
| 22 | public class UpdateSellerMemoBizServiceImpl extends AbstractBizService<UpdateSellerMemoRequest> { | 25 | public class UpdateSellerMemoBizServiceImpl extends AbstractBizService<UpdateSellerMemoRequest> { |
| 23 | 26 | ||
| 24 | private static Logger log = Logger.getLogger(UpdateSellerMemoBizServiceImpl.class); | 27 | private static Logger log = Logger.getLogger(UpdateSellerMemoBizServiceImpl.class); |
| 25 | 28 | ||
| 26 | @Resource | 29 | @Resource |
| 27 | private PineappleDao pineappleDao; | 30 | private MemberReadDao memberReadDao; |
| 31 | |||
| 32 | @Reference | ||
| 33 | private ThirdApiOrderService thirdApiOrderService; | ||
| 28 | 34 | ||
| 29 | @Override | 35 | @Override |
| 30 | public UpdateSellerMemoResponse call(CallRequest<UpdateSellerMemoRequest> callRequest) throws Exception { | 36 | public UpdateSellerMemoResponse call(CallRequest<UpdateSellerMemoRequest> callRequest) throws Exception { |
| 31 | UpdateSellerMemoResponse UpdateSellerMemoResponse =new UpdateSellerMemoResponse(); | 37 | UpdateSellerMemoResponse UpdateSellerMemoResponse =new UpdateSellerMemoResponse(); |
| 32 | Map<String,Object> params = new HashMap<>(); | 38 | |
| 33 | String redisMysqlDbConfig = ""; | 39 | ThirdQueryOrderRequest thirdQueryOrderRequest = new ThirdQueryOrderRequest(); |
| 34 | Integer dataBaseModule = DbUtil.getOrderInWhichDataBase(callRequest.getBizModel().getPlatOrderNo()); | 40 | //旧订单号处理 |
| 35 | String tableIndex = DbUtil.getOrderInWhichTable(callRequest.getBizModel().getPlatOrderNo()); | 41 | if(!callRequest.getBizModel().getPlatOrderNo().startsWith("B")){ |
| 36 | params.put("doingOrderTable","im_doing_order_" + tableIndex); | 42 | callRequest.getBizModel().setPlatOrderNo(memberReadDao.getNewOrderSnByOldOrderSn(callRequest.getBizModel().getPlatOrderNo())); |
| 37 | params.put("orderCode",callRequest.getBizModel().getPlatOrderNo()); | 43 | } |
| 38 | params.put("sellerRemark",callRequest.getBizModel().getSellerMemo()); | 44 | |
| 39 | params.put("supplierId",callRequest.getSupplier().getId()); | 45 | thirdQueryOrderRequest.setOrderSn(callRequest.getBizModel().getPlatOrderNo()); |
| 40 | redisMysqlDbConfig = String.format(AppConstants.REDIS_DB_TYPE, AppConstants.INTEGRALMALL_ORDER_DATABASE, dataBaseModule.intValue()); | 46 | thirdQueryOrderRequest.setSellerId(callRequest.getSupplier().getId()); |
| 41 | DBContextHolder.setDBType(redisMysqlDbConfig);//切换数据源 | 47 | thirdQueryOrderRequest.setInitiationID(SeqGenUtil.getLogId()); |
| 42 | IMDoingOrderBean iMDoingOrderBean = pineappleDao.getOrderListByMap(params); | 48 | |
| 43 | if(StringUtil.isNull(iMDoingOrderBean)){ | 49 | ThirdUpdateOrderRequest thirdUpdateOrderRequest = new ThirdUpdateOrderRequest(); |
| 44 | log.error("获取订单数据业务异常"); | 50 | thirdUpdateOrderRequest.setOrderSn(callRequest.getBizModel().getPlatOrderNo()); |
| 45 | throw new BizException("获取订单数据业务异常"); | 51 | thirdUpdateOrderRequest.setSellerId(callRequest.getSupplier().getId()); |
| 52 | thirdUpdateOrderRequest.setRemark(callRequest.getBizModel().getSellerMemo()); | ||
| 53 | thirdUpdateOrderRequest.setInitiationID(SeqGenUtil.getLogId()); | ||
| 54 | |||
| 55 | Orders orders = null; | ||
| 56 | CommonResponse<ApiOrdersResponse> response = thirdApiOrderService.getOrdersByMap(thirdQueryOrderRequest); | ||
| 57 | if(response.isSuccess()){ | ||
| 58 | orders = BeanCopyUtils.copyProperties(Orders.class,response.getResult()); | ||
| 59 | }else { | ||
| 60 | throw new BizException(response.getErrorMsg()); | ||
| 61 | } | ||
| 62 | if(StringUtil.isNull(orders)){ | ||
| 63 | log.error(String.format("修改订单备注,获取订单数据业务异常,订单号:[%s]",callRequest.getBizModel().getPlatOrderNo())); | ||
| 64 | throw new BizException(String.format("修改订单备注,获取订单数据业务异常,订单号:[%s]",callRequest.getBizModel().getPlatOrderNo())); | ||
| 65 | } | ||
| 66 | CommonResponse<Boolean> updateResponse = thirdApiOrderService.updateOrders(thirdUpdateOrderRequest); | ||
| 67 | if(!updateResponse.isSuccess()){ | ||
| 68 | log.error(String.format("修改订单备注,修改失败,订单号:[%s]",callRequest.getBizModel().getPlatOrderNo())); | ||
| 69 | throw new BizException(String.format("修改订单备注,修改失败,订单号:[%s]",callRequest.getBizModel().getPlatOrderNo())); | ||
| 46 | } | 70 | } |
| 47 | DBContextHolder.setDBType(redisMysqlDbConfig);//切换数据源 | ||
| 48 | pineappleDao.updateSelle(params); | ||
| 49 | UpdateSellerMemoResponse.setCode(PineappleEnum.SUCCESS.getCode()); | 71 | UpdateSellerMemoResponse.setCode(PineappleEnum.SUCCESS.getCode()); |
| 50 | UpdateSellerMemoResponse.setMessage(PineappleEnum.SUCCESS.getMsg()); | 72 | UpdateSellerMemoResponse.setMessage(PineappleEnum.SUCCESS.getMsg()); |
| 51 | return UpdateSellerMemoResponse; | 73 | return UpdateSellerMemoResponse; | ... | ... |
| ... | @@ -25,12 +25,12 @@ | ... | @@ -25,12 +25,12 @@ |
| 25 | </modules> | 25 | </modules> |
| 26 | <properties> | 26 | <properties> |
| 27 | <!-- spring版本 --> | 27 | <!-- spring版本 --> |
| 28 | <spring.version>4.0.0.RELEASE</spring.version> | 28 | <spring.version>4.3.16.RELEASE</spring.version> |
| 29 | <!-- mybatis版本 --> | 29 | <!-- mybatis版本 --> |
| 30 | <mybatis.version>3.2.4</mybatis.version> | 30 | <mybatis.version>3.2.4</mybatis.version> |
| 31 | <!-- log4j日志文件管理包版 --> | 31 | <!-- log4j日志文件管理包版 --> |
| 32 | <slf4j.version>1.6.6</slf4j.version> | 32 | <slf4j.version>1.7.25</slf4j.version> |
| 33 | <log4j.version>1.2.13</log4j.version> | 33 | <log4j.version>1.2.17</log4j.version> |
| 34 | <!-- mysql驱动的版 --> | 34 | <!-- mysql驱动的版 --> |
| 35 | <mysql.version>5.1.35</mysql.version> | 35 | <mysql.version>5.1.35</mysql.version> |
| 36 | <!-- <mysql.version>3.1.14</mysql.version> --> | 36 | <!-- <mysql.version>3.1.14</mysql.version> --> |
| ... | @@ -47,6 +47,10 @@ | ... | @@ -47,6 +47,10 @@ |
| 47 | 47 | ||
| 48 | <doubo-parent.version>2.0.0</doubo-parent.version> | 48 | <doubo-parent.version>2.0.0</doubo-parent.version> |
| 49 | 49 | ||
| 50 | <dubbo.version>2.6.3</dubbo.version> | ||
| 51 | |||
| 52 | <curator.version>2.12.0</curator.version> | ||
| 53 | |||
| 50 | </properties> | 54 | </properties> |
| 51 | <dependencies> | 55 | <dependencies> |
| 52 | <dependency> | 56 | <dependency> |
| ... | @@ -406,6 +410,32 @@ | ... | @@ -406,6 +410,32 @@ |
| 406 | <artifactId>protobuf-java</artifactId> | 410 | <artifactId>protobuf-java</artifactId> |
| 407 | <version>2.6.1</version> | 411 | <version>2.6.1</version> |
| 408 | </dependency> | 412 | </dependency> |
| 413 | |||
| 414 | <!-- dubbo begin --> | ||
| 415 | <!-- https://mvnrepository.com/artifact/com.alibaba/dubbo --> | ||
| 416 | <dependency> | ||
| 417 | <groupId>com.alibaba</groupId> | ||
| 418 | <artifactId>dubbo</artifactId> | ||
| 419 | <version>${dubbo.version}</version> | ||
| 420 | <exclusions> | ||
| 421 | <exclusion> | ||
| 422 | <artifactId>slf4j-log4j12</artifactId> | ||
| 423 | <groupId>org.slf4j</groupId> | ||
| 424 | </exclusion> | ||
| 425 | </exclusions> | ||
| 426 | </dependency> | ||
| 427 | <dependency> | ||
| 428 | <groupId>org.apache.curator</groupId> | ||
| 429 | <artifactId>curator-framework</artifactId> | ||
| 430 | <version>${curator.version}</version> | ||
| 431 | </dependency> | ||
| 432 | <dependency> | ||
| 433 | <groupId>org.apache.curator</groupId> | ||
| 434 | <artifactId>curator-recipes</artifactId> | ||
| 435 | <version>${curator.version}</version> | ||
| 436 | </dependency> | ||
| 437 | <!-- dubbo begin --> | ||
| 438 | |||
| 409 | <!-- taobao sms start --> | 439 | <!-- taobao sms start --> |
| 410 | <dependency> | 440 | <dependency> |
| 411 | <groupId>com.taobao</groupId> | 441 | <groupId>com.taobao</groupId> |
| ... | @@ -426,12 +456,6 @@ | ... | @@ -426,12 +456,6 @@ |
| 426 | <version>${doubo-parent.version}</version> | 456 | <version>${doubo-parent.version}</version> |
| 427 | </dependency> | 457 | </dependency> |
| 428 | <!--阿里mq--> | 458 | <!--阿里mq--> |
| 429 | |||
| 430 | <dependency> | ||
| 431 | <groupId>cglib</groupId> | ||
| 432 | <artifactId>cglib</artifactId> | ||
| 433 | <version>3.1</version> | ||
| 434 | </dependency> | ||
| 435 | </dependencies> | 459 | </dependencies> |
| 436 | <dependencyManagement> | 460 | <dependencyManagement> |
| 437 | <dependencies> | 461 | <dependencies> | ... | ... |
-
请 注册 或 登录 后发表评论