Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
sibu-v-mall
/
sibu-v-mall-third-api
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
764f6bba
由
刘嘉
编写于
2018-05-16 10:49:34 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
菠萝派接口- 添加查询商品方法
1 个父辈
5ae8e917
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
25 行增加
和
7 行删除
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.dao/src/main/java/com/sibu/orderHelper/integral/dao/PineappleDao.java
查看文件 @
764f6bb
...
...
@@ -50,6 +50,13 @@ public interface PineappleDao {
/**
* 根据条件查询商品
* @param params
* @return
*/
DownloadProductBean
getDownloadProductBeanByMap
(
Map
<
String
,
Object
>
params
);
/**
* 根据商品ID获取该商品的所有SKU
* @param productId
* @return
...
...
com.sibu.orderHelper.integralMall/src/main/resources/mapper/PineappleMapper.xml
查看文件 @
764f6bb
...
...
@@ -105,7 +105,7 @@
<!-- 商品下载实体-->
<resultMap
id=
"downloadProductBean"
type=
"com.sibu.orderHelper.integral.model.DownloadProductBean"
>
<result
column=
"id"
property=
"PlatProductID"
/>
<result
column=
"
n
ame"
property=
"name"
/>
<result
column=
"
productN
ame"
property=
"name"
/>
<result
column=
"outerID"
property=
"OuterID"
/>
<result
column=
"price"
property=
"price"
/>
<result
column=
"num"
property=
"num"
/>
...
...
@@ -115,10 +115,10 @@
<!-- 商品下载 -->
<select
id=
"downloadProductListByMap"
parameterType=
"java.util.Map"
resultMap=
"downloadProductBean"
>
SELECT p.id,p.product_code AS outerID,p.name1 AS productName,p.product_stock AS num,p.master_img AS pictureurl,
p.mal
l_pc
_price AS price
p.mal
_mobile
_price AS price
FROM product p WHERE p.seller_id = #{sellerId}
<if
test=
"productId !=null and productId !=''"
>
AND (p.id = #{productId} or p.product_code = #{productId}
AND (p.id = #{productId} or p.product_code = #{productId}
)
</if>
<if
test=
"state !=null and state !='' and state != -1"
>
AND p.state = #{state}
...
...
@@ -127,16 +127,26 @@
AND p.state IN ('6','7')
</if>
<if
test=
"productName !=null and productName !=''"
>
AND p.
state
= #{productName}
AND p.
name1
= #{productName}
</if>
ORDER BY p.im_product_id DESC
limit ${PageIndex}, ${PageSize}
</select>
<!-- 根据条件查询商品 -->
<select
id=
"getDownloadProductBeanByMap"
parameterType=
"java.util.Map"
resultMap=
"downloadProductBean"
>
SELECT p.id,p.product_code AS outerID,p.name1 AS productName,p.product_stock AS num,p.master_img AS pictureurl,
p.mal_mobile_price AS price
FROM product p WHERE p.seller_id = #{sellerId}
<if
test=
"productId !=null and productId !=''"
>
AND p.id = #{productId}
</if>
</select>
<!-- 商品sku实体 -->
<resultMap
id=
"downloadSku"
type=
"com.sibu.orderHelper.integral.model.DownloadProductSkuBean"
>
<result
column=
"skuId"
property=
"SkuID"
/>
<result
column=
"sku
OuterID
"
property=
"skuOuterID"
/>
<result
column=
"sku
Id
"
property=
"skuOuterID"
/>
<result
column=
"skuprice"
property=
"skuprice"
/>
<result
column=
"skuQuantity"
property=
"skuQuantity"
/>
<result
column=
"skuname"
property=
"skuname"
/>
...
...
@@ -145,8 +155,9 @@
<!-- 获取商品sku -->
<select
id=
"downloadSkuByProductId"
resultType=
"java.lang.String"
resultMap=
"downloadSku"
>
select g.sku AS skuId,g.sku AS skuOuterID,g.mall_pc_price AS skuprice,g.product_stock AS skuQuantity,
g.norm_name AS skuname ,g.images AS skupictureurl FROM product_goods g WHERE g.product_id = #{productId}
select g.sku AS skuId,g.mall_mobile_price AS skuprice,g.product_stock AS skuQuantity,
g.norm_name AS skuname ,g.images AS skupictureurl FROM product_goods g
WHERE g.product_id = #{productId}
</select>
<!-- 更新SKU库存-->
...
...
请
注册
或
登录
后发表评论