Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
sibu-v-mall
/
sibu-v-mall-third-api
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
89909241
由
刘嘉
编写于
2018-04-13 16:32:29 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
菠萝派接口-订单下载,传商品条形码不传商户ID,商品下载根据产品编号或条形码查询
1 个父辈
a4a10d2e
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
51 行增加
和
1 行删除
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/reponse/DoingOrder1DetailResponse.java
com.sibu.orderHelper.service/src/main/java/com/sibu/orderHelper/integral/service/pineapple/converter/PlatformOrderItemToPineAppleOrderItemConverter.java
com.sibu.orderHelper.service/src/main/java/com/sibu/orderHelper/integral/service/pineapple/impl/GetOrderBizServiceImpl.java
com.sibu.orderHelper.dao/src/main/java/com/sibu/orderHelper/integral/dao/PineappleDao.java
查看文件 @
8990924
...
...
@@ -152,4 +152,6 @@ public interface PineappleDao {
IMDoingOrderBean
getOrderListByMap
(
Map
<
String
,
Object
>
params
)
throws
Exception
;
IMProductBean
getIMProductBeanById
(
@Param
(
"productId"
)
String
productId
)
throws
Exception
;
}
...
...
com.sibu.orderHelper.integralMall/src/main/resources/mapper/PineappleMapper.xml
查看文件 @
8990924
...
...
@@ -132,6 +132,7 @@
<result
column=
"market_price"
property=
"marketPrice"
/>
<result
column=
"product_type"
property=
"productType"
/>
<result
column=
"is_show"
property=
"isShow"
/>
<result
column=
"bar_code"
property=
"barCode"
/>
<result
column=
"is_open_spec"
property=
"isOpenSpec"
/>
<result
column=
"spec"
property=
"spec"
/>
<result
column=
"mini_purchase_number"
property=
"miniPurchaseNumber"
/>
...
...
@@ -168,7 +169,7 @@
and p.is_show = 1
</if>
<if
test=
"productId !=null and productId !=''"
>
AND
p.im_product_id =#{productId}
AND
(p.im_product_id =#{productId} OR p.bar_code =#{productId})
</if>
<if
test=
"productName !=null and productName !=''"
>
AND p.name =#{productName}
...
...
@@ -297,6 +298,15 @@
AND s.supplier_id = #{supplierId}
</select>
<select
id=
"getIMProductBeanById"
parameterType=
"java.lang.String"
resultMap=
"listAPIIMProduct"
>
SELECT
<include
refid=
"Base_Product_Column"
/>
,imp.bar_code
FROM
im_product imp
WHERE imp.im_product_id = #{productId}
</select>
<update
id=
"updateProductInventory"
parameterType=
"com.sibu.orderHelper.integral.model.IMProductInventory"
>
update im_product_inventory set stock_num=#{stockNum} where im_product_id=#{imProductId}
</update>
...
...
com.sibu.orderHelper.model/src/main/java/com/sibu/orderHelper/integral/reponse/DoingOrder1DetailResponse.java
查看文件 @
8990924
...
...
@@ -60,6 +60,16 @@ public class DoingOrder1DetailResponse implements Serializable {
private
BigDecimal
deductionLineVbPrice
;
private
String
barCode
;
public
String
getBarCode
()
{
return
barCode
;
}
public
void
setBarCode
(
String
barCode
)
{
this
.
barCode
=
barCode
;
}
public
Integer
getRefundOperateTypeCode
()
{
if
(
refundOperateTypeEnum
!=
null
)
{
return
refundOperateTypeEnum
.
getCode
();
...
...
com.sibu.orderHelper.service/src/main/java/com/sibu/orderHelper/integral/service/pineapple/converter/PlatformOrderItemToPineAppleOrderItemConverter.java
查看文件 @
8990924
package
com
.
sibu
.
orderHelper
.
integral
.
service
.
pineapple
.
converter
;
import
com.sibu.orderHelper.common.util.StringUtil
;
import
com.sibu.orderHelper.integral.pineapple.enums.OrderStatusEnum
;
import
com.sibu.orderHelper.integral.pineapple.exception.BizException
;
import
com.sibu.orderHelper.integral.pineapple.response.OrderGoodResponse
;
...
...
@@ -54,6 +55,9 @@ public class PlatformOrderItemToPineAppleOrderItemConverter implements Converter
}
private
String
convertAndCheckProductId
(
DoingOrder1DetailResponse
source
)
{
if
(
StringUtil
.
isNotBlank
(
source
.
getBarCode
())){
return
source
.
getBarCode
();
}
if
(
StringUtils
.
isNotBlank
(
source
.
getSkuId
()))
{
return
source
.
getSkuId
();
}
...
...
com.sibu.orderHelper.service/src/main/java/com/sibu/orderHelper/integral/service/pineapple/impl/GetOrderBizServiceImpl.java
查看文件 @
8990924
...
...
@@ -3,8 +3,11 @@ package com.sibu.orderHelper.integral.service.pineapple.impl;
import
com.sibu.orderHelper.common.constants.AppConstants
;
import
com.sibu.orderHelper.common.database.DBContextHolder
;
import
com.sibu.orderHelper.common.strategy.DbUtil
;
import
com.sibu.orderHelper.common.util.StringUtil
;
import
com.sibu.orderHelper.integral.dao.IMDoingOrderDao
;
import
com.sibu.orderHelper.integral.dao.PineappleDao
;
import
com.sibu.orderHelper.integral.model.IMDoingOrderBean
;
import
com.sibu.orderHelper.integral.model.IMProductBean
;
import
com.sibu.orderHelper.integral.model.IMSupplier
;
import
com.sibu.orderHelper.integral.pineapple.constant.PineAppleConst
;
import
com.sibu.orderHelper.integral.pineapple.exception.BizException
;
...
...
@@ -14,6 +17,7 @@ import com.sibu.orderHelper.integral.pineapple.request.GetOrderRequest;
import
com.sibu.orderHelper.integral.pineapple.response.BaseResponse
;
import
com.sibu.orderHelper.integral.pineapple.response.GetOrderResponse
;
import
com.sibu.orderHelper.integral.pineapple.response.OrderResponse
;
import
com.sibu.orderHelper.integral.reponse.DoingOrder1DetailResponse
;
import
com.sibu.orderHelper.integral.reponse.DoingOrderDetailResponse
;
import
com.sibu.orderHelper.integral.service.IIMDoingOrderService
;
import
com.sibu.orderHelper.integral.service.impl.IMDoingOrderService
;
...
...
@@ -48,6 +52,9 @@ public class GetOrderBizServiceImpl extends AbstractBizService<GetOrderRequest>
@Autowired
private
PlatformOrderToPineAppleOrderConverter
platformOrderToPineAppleOrderConverter
;
@Resource
PineappleDao
pineappleDao
;
@Override
public
BaseResponse
call
(
CallRequest
<
GetOrderRequest
>
callRequest
)
{
if
(
StringUtils
.
isNotBlank
(
callRequest
.
getBizModel
().
getPlatOrderNo
()))
{
...
...
@@ -68,6 +75,9 @@ public class GetOrderBizServiceImpl extends AbstractBizService<GetOrderRequest>
DoingOrderDetailResponse
order
=
null
;
try
{
order
=
iimDoingOrderService
.
getIMOrderDetailByOrderCode
(
callRequest
.
getBizModel
().
getPlatOrderNo
());
if
(
order
!=
null
)
{
this
.
getBarCode
(
order
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"获取订单数据业务异常"
,
e
);
throw
new
BizException
(
"获取订单数据业务异常"
,
e
);
...
...
@@ -89,6 +99,17 @@ public class GetOrderBizServiceImpl extends AbstractBizService<GetOrderRequest>
return
this
.
platformOrderToPineAppleOrderConverter
.
convert
(
order
);
}
public
DoingOrderDetailResponse
getBarCode
(
DoingOrderDetailResponse
source
)
throws
Exception
{
for
(
DoingOrder1DetailResponse
entity:
source
.
getOrder1s
()){
IMProductBean
product
=
pineappleDao
.
getIMProductBeanById
(
entity
.
getProductId
());
if
(
StringUtil
.
isNotBlank
(
product
.
getBarCode
())){
entity
.
setBarCode
(
product
.
getBarCode
());
}
}
return
source
;
}
private
BaseResponse
findList
(
CallRequest
<
GetOrderRequest
>
callRequest
)
{
List
<
IMDoingOrderBean
>
list
=
new
ArrayList
<
IMDoingOrderBean
>();
//默认获取订单数量值
...
...
@@ -146,6 +167,9 @@ public class GetOrderBizServiceImpl extends AbstractBizService<GetOrderRequest>
DoingOrderDetailResponse
order
=
null
;
try
{
order
=
iimDoingOrderService
.
getIMOrderDetailByOrderCode
(
p
.
getOrderCode
());
if
(!
StringUtil
.
isNull
(
order
)){
this
.
getBarCode
(
order
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"获取订单数据业务异常"
,
e
);
throw
new
BizException
(
"获取订单数据业务异常"
,
e
);
...
...
请
注册
或
登录
后发表评论