Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
sibu-v-mall
/
sibu-v-mall-third-api
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
1ba87f72
由
刘嘉
编写于
2018-05-15 11:07:07 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
菠萝派接口-发货接口
1 个父辈
2f6a3a63
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
214 行增加
和
43 行删除
com.sibu.orderHelper.dao/src/main/java/com/sibu/orderHelper/integral/dao/PineappleDao.java
com.sibu.orderHelper.integralMall/src/main/resources/mapper/PineappleMapper.xml
com.sibu.orderHelper.model/src/main/java/com/sibu/orderHelper/integral/pineapple/enums/EJavaShopOrderStateEnum.java
com.sibu.orderHelper.model/src/main/java/com/sibu/orderHelper/integral/pineapple/model/CourierCompany.java
com.sibu.orderHelper.model/src/main/java/com/sibu/orderHelper/integral/pineapple/model/Regions.java
com.sibu.orderHelper.service/src/main/java/com/sibu/orderHelper/integral/service/pineapple/impl/PineappleSendBizServiceImpl.java
com.sibu.orderHelper.dao/src/main/java/com/sibu/orderHelper/integral/dao/PineappleDao.java
查看文件 @
1ba87f7
package
com
.
sibu
.
orderHelper
.
integral
.
dao
;
import
com.sibu.orderHelper.integral.model.*
;
import
com.sibu.orderHelper.integral.pineapple.model.Orders
;
import
com.sibu.orderHelper.integral.pineapple.model.OrdersProduct
;
import
com.sibu.orderHelper.integral.pineapple.model.Product
;
import
com.sibu.orderHelper.integral.pineapple.model.*
;
import
com.sibu.orderHelper.integral.reponse.CheckRefundStatusResponse
;
import
com.sibu.orderHelper.integral.reponse.DoingOrderDetailResponse
;
import
com.sibu.orderHelper.integral.reponse.SkuApiResponse
;
...
...
@@ -86,4 +84,28 @@ public interface PineappleDao {
List
<
OrdersProduct
>
getOrdersProductList
(
@Param
(
"orderSn"
)
String
orderSn
);
/**
* 根据条件查询省市级信息
* @param params
* @return
*/
Regions
getRegionsByMap
(
Map
<
String
,
Object
>
params
);
/**
* 根据id查询省市级信息
* @param id
* @return
*/
Regions
getRegionsById
(
@Param
(
"id"
)
Integer
id
);
/**
* 根据条件查询物流公司
* @return
*/
List
<
CourierCompany
>
getCourierCompanyByName
(
Map
<
String
,
Object
>
params
);
}
...
...
com.sibu.orderHelper.integralMall/src/main/resources/mapper/PineappleMapper.xml
查看文件 @
1ba87f7
...
...
@@ -68,9 +68,6 @@
<if
test=
"addressInfo !=null and addressInfo !=''"
>
address_info = #{addressInfo},
</if>
<if
test=
"deliverTime !=null and deliverTime !=''"
>
deliver_time = #{deliverTime},
</if>
<if
test=
"logisticsNumber !=null and logisticsNumber !=''"
>
logistics_number = #{logisticsNumber},
</if>
...
...
@@ -123,9 +120,12 @@
<if
test=
"productId !=null and productId !=''"
>
AND (p.id = #{productId} or p.product_code = #{productId}
</if>
<if
test=
"state !=null and state !=''"
>
<if
test=
"state !=null and state !=''
and state != -1
"
>
AND p.state = #{state}
</if>
<if
test=
"state !=null and state !='' and state == -1"
>
AND p.state IN ('6','7')
</if>
<if
test=
"productName !=null and productName !=''"
>
AND p.state = #{productName}
</if>
...
...
@@ -180,42 +180,42 @@
limit ${PageIndex}, ${PageSize}
</select>
<resultMap
id=
"ordersProduct"
type=
"com.sibu.orderHelper.integral.pineapple.model.OrdersProduct"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"ordersId"
column=
"orders_id"
/>
<result
property=
"ordersSn"
column=
"orders_sn"
/>
<result
property=
"ordersPsn"
column=
"orders_psn"
/>
<result
property=
"sellerId"
column=
"seller_id"
/>
<result
property=
"sellerName"
column=
"seller_name"
/>
<result
property=
"productCateId"
column=
"product_cate_id"
/>
<result
property=
"productId"
column=
"product_id"
/>
<result
property=
"productGoodsId"
column=
"product_goods_id"
/>
<result
property=
"specInfo"
column=
"spec_info"
/>
<result
property=
"productName"
column=
"product_name"
/>
<result
property=
"productSku"
column=
"product_sku"
/>
<result
property=
"packageGroupsId"
column=
"package_groups_id"
/>
<result
property=
"mallGroupsId"
column=
"mall_groups_id"
/>
<result
property=
"giftId"
column=
"gift_id"
/>
<result
property=
"isGift"
column=
"is_gift"
/>
<result
property=
"moneyPrice"
column=
"money_price"
/>
<result
property=
"number"
column=
"number"
/>
<result
property=
"moneyAmount"
column=
"money_amount"
/>
<result
property=
"moneyActSingle"
column=
"money_act_single"
/>
<result
property=
"actSingleId"
column=
"act_single_id"
/>
<result
property=
"actGroupId"
column=
"act_group_id"
/>
<result
property=
"actFlashSaleId"
column=
"act_flash_sale_id"
/>
<result
property=
"actFlashSaleProductId"
column=
"act_flash_sale_product_id"
/>
<result
property=
"actBiddingId"
column=
"act_bidding_id"
/>
<result
property=
"actIntegralId"
column=
"act_integral_id"
/>
<result
property=
"actIntegralNum"
column=
"act_integral_num"
/>
<result
property=
"actIntegralMoney"
column=
"act_integral_money"
/>
<result
property=
"systemRemark"
column=
"system_remark"
/>
<result
property=
"backNumber"
column=
"back_number"
/>
<result
property=
"exchangeNumber"
column=
"exchange_number"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"isEvaluate"
column=
"is_evaluate"
/>
</resultMap>
<resultMap
id=
"ordersProduct"
type=
"com.sibu.orderHelper.integral.pineapple.model.OrdersProduct"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"ordersId"
column=
"orders_id"
/>
<result
property=
"ordersSn"
column=
"orders_sn"
/>
<result
property=
"ordersPsn"
column=
"orders_psn"
/>
<result
property=
"sellerId"
column=
"seller_id"
/>
<result
property=
"sellerName"
column=
"seller_name"
/>
<result
property=
"productCateId"
column=
"product_cate_id"
/>
<result
property=
"productId"
column=
"product_id"
/>
<result
property=
"productGoodsId"
column=
"product_goods_id"
/>
<result
property=
"specInfo"
column=
"spec_info"
/>
<result
property=
"productName"
column=
"product_name"
/>
<result
property=
"productSku"
column=
"product_sku"
/>
<result
property=
"packageGroupsId"
column=
"package_groups_id"
/>
<result
property=
"mallGroupsId"
column=
"mall_groups_id"
/>
<result
property=
"giftId"
column=
"gift_id"
/>
<result
property=
"isGift"
column=
"is_gift"
/>
<result
property=
"moneyPrice"
column=
"money_price"
/>
<result
property=
"number"
column=
"number"
/>
<result
property=
"moneyAmount"
column=
"money_amount"
/>
<result
property=
"moneyActSingle"
column=
"money_act_single"
/>
<result
property=
"actSingleId"
column=
"act_single_id"
/>
<result
property=
"actGroupId"
column=
"act_group_id"
/>
<result
property=
"actFlashSaleId"
column=
"act_flash_sale_id"
/>
<result
property=
"actFlashSaleProductId"
column=
"act_flash_sale_product_id"
/>
<result
property=
"actBiddingId"
column=
"act_bidding_id"
/>
<result
property=
"actIntegralId"
column=
"act_integral_id"
/>
<result
property=
"actIntegralNum"
column=
"act_integral_num"
/>
<result
property=
"actIntegralMoney"
column=
"act_integral_money"
/>
<result
property=
"systemRemark"
column=
"system_remark"
/>
<result
property=
"backNumber"
column=
"back_number"
/>
<result
property=
"exchangeNumber"
column=
"exchange_number"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"isEvaluate"
column=
"is_evaluate"
/>
</resultMap>
<!-- 查询子订单-->
...
...
@@ -223,4 +223,53 @@
SELECT product_sku,id,product_name,spec_info,number,money_price,money_act_single FROM orders_product
WHERE orders_sn = #{ordersSn}
</select>
<!-- 地址实体类-->
<resultMap
id=
"regionsResult"
type=
"com.sibu.orderHelper.integral.pineapple.model.Regions"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"parentId"
column=
"parentId"
/>
<result
property=
"regionName"
column=
"regionName"
/>
<result
property=
"parentPath"
column=
"parentPath"
/>
<result
property=
"firstLetter"
column=
"firstLetter"
/>
<result
property=
"regionType"
column=
"regionType"
/>
<result
property=
"agencyId"
column=
"agencyId"
/>
<result
property=
"shippingId"
column=
"shippingId"
/>
<result
property=
"visible"
column=
"visible"
/>
<result
property=
"rowId"
column=
"rowId"
/>
</resultMap>
<!-- 根据条件查询省市级信息-->
<select
id=
"getRegionsByMap"
parameterType=
"java.util.Map"
resultMap=
"regionsResult"
>
SELECT * FROM regions WHERE regionName LIKE concat('%',#{name},'%') AND regionType = #{regionType}
</select>
<!-- 根据id查询省市级信息-->
<select
id=
"getRegionsById"
parameterType=
"java.lang.Integer"
resultMap=
"regionsResult"
>
select
*
from `regions`
where `id` = #{id}
</select>
<!-- 物流公司实体-->
<resultMap
id=
"courierCompanyResult"
type=
"com.sibu.orderHelper.integral.pineapple.model.CourierCompany"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"state"
column=
"state"
/>
<result
property=
"companyMark"
column=
"company_mark"
/>
<result
property=
"companyName"
column=
"company_name"
/>
<result
property=
"seq"
column=
"seq"
/>
<result
property=
"sellerId"
column=
"seller_id"
/>
<result
property=
"companyType"
column=
"company_type"
/>
<result
property=
"imagePath"
column=
"image_path"
/>
<result
property=
"content"
column=
"content"
/>
</resultMap>
<!-- 根据条件查询物流公司-->
<select
id=
"getCourierCompanyByName"
parameterType=
"java.util.Map"
resultMap=
"courierCompanyResult"
>
select
*
from `courier_company`
where company_name LIKE concat('%',#{name},'%') AND seller_id =#{sellerId}
</select>
</mapper>
\ No newline at end of file
...
...
com.sibu.orderHelper.model/src/main/java/com/sibu/orderHelper/integral/pineapple/enums/EJavaShopOrderStateEnum.java
0 → 100644
查看文件 @
1ba87f7
package
com
.
sibu
.
orderHelper
.
integral
.
pineapple
.
enums
;
import
com.alibaba.druid.util.StringUtils
;
import
com.sibu.orderHelper.enums.PayOrderStatus
;
import
com.sibu.orderHelper.integral.pineapple.constant.PineAppleConst
;
import
org.apache.commons.lang3.EnumUtils
;
import
java.util.List
;
/**
* @author LauKa
* @contact a062431@vip.qq.com
* @date 2018/05/15
* @description 新系统丁订单状态
*/
public
enum
EJavaShopOrderStateEnum
{
WaitPay
(
1
,
"待支付"
),
WaitConfirmed
(
2
,
"待确认"
),
WaitShip
(
3
,
"待发货"
),
HasReceived
(
4
,
"已发货"
),
RefundFail
(
6
,
"交易关闭"
),
Finished
(
5
,
"交易完成"
);
private
int
code
;
// 错误代码
private
String
msg
;
// 错误消息
public
int
getCode
()
{
return
code
;
}
public
String
getMsg
()
{
return
msg
;
}
EJavaShopOrderStateEnum
(
int
code
,
String
msg
)
{
this
.
code
=
code
;
this
.
msg
=
msg
;
}
public
static
EJavaShopOrderStateEnum
valueOf
(
int
code
)
{
// 手写的从int到enum的转换函数
List
<
EJavaShopOrderStateEnum
>
enums
=
EnumUtils
.
getEnumList
(
EJavaShopOrderStateEnum
.
class
);
EJavaShopOrderStateEnum
result
=
enums
.
stream
()
.
filter
(
p
->
p
.
getCode
()
==
code
)
.
findFirst
()
.
orElse
(
EJavaShopOrderStateEnum
.
RefundFail
);
return
result
;
}
public
static
EJavaShopOrderStateEnum
resolve
(
String
code
)
{
List
<
EJavaShopOrderStateEnum
>
enums
=
EnumUtils
.
getEnumList
(
EJavaShopOrderStateEnum
.
class
);
EJavaShopOrderStateEnum
result
=
enums
.
stream
()
.
filter
(
p
->
StringUtils
.
equalsIgnoreCase
(
String
.
valueOf
(
p
.
getCode
()),
code
))
.
findFirst
()
.
orElse
(
EJavaShopOrderStateEnum
.
RefundFail
);
return
result
;
}
}
com.sibu.orderHelper.model/src/main/java/com/sibu/orderHelper/integral/pineapple/model/CourierCompany.java
0 → 100644
查看文件 @
1ba87f7
package
com
.
sibu
.
orderHelper
.
integral
.
pineapple
.
model
;
import
lombok.Data
;
import
lombok.ToString
;
import
java.io.Serializable
;
@Data
@ToString
public
class
CourierCompany
implements
Serializable
{
private
Integer
id
;
private
java
.
util
.
Date
createTime
;
private
Integer
state
;
private
String
companyMark
;
private
String
companyName
;
private
Integer
seq
;
private
String
companyType
;
private
Integer
sellerId
;
}
com.sibu.orderHelper.model/src/main/java/com/sibu/orderHelper/integral/pineapple/model/Regions.java
0 → 100644
查看文件 @
1ba87f7
package
com
.
sibu
.
orderHelper
.
integral
.
pineapple
.
model
;
import
lombok.Data
;
import
lombok.ToString
;
import
java.io.Serializable
;
@Data
@ToString
public
class
Regions
implements
Serializable
{
private
Integer
id
;
private
Integer
parentId
;
private
String
regionName
;
private
String
parentPath
;
private
String
firstLetter
;
private
Integer
regionType
;
private
Integer
agencyId
;
private
Integer
shippingId
;
private
Integer
visible
;
private
String
rowId
;
}
com.sibu.orderHelper.service/src/main/java/com/sibu/orderHelper/integral/service/pineapple/impl/PineappleSendBizServiceImpl.java
查看文件 @
1ba87f7
此文件的差异被折叠,
点击展开。
请
注册
或
登录
后发表评论