Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wwwanlingxiao
mall
Commits
2dd5d939
Commit
2dd5d939
authored
Sep 03, 2018
by
zhh
Browse files
下单接口完成
parent
c9831e02
Changes
18
Expand all
Hide whitespace changes
Inline
Side-by-side
document/pdm/mall.pdb
View file @
2dd5d939
This diff is collapsed.
Click to expand it.
document/pdm/mall.pdm
View file @
2dd5d939
This diff is collapsed.
Click to expand it.
document/sql/mall.sql
View file @
2dd5d939
This diff is collapsed.
Click to expand it.
mall-mbg/src/main/java/com/macro/mall/model/OmsCartItem.java
View file @
2dd5d939
...
...
@@ -111,6 +111,10 @@ public class OmsCartItem implements Serializable {
*/
private
Long
productCategoryId
;
private
String
productBrand
;
private
String
productSn
;
private
static
final
long
serialVersionUID
=
1L
;
public
Long
getId
()
{
...
...
@@ -257,6 +261,22 @@ public class OmsCartItem implements Serializable {
this
.
productCategoryId
=
productCategoryId
;
}
public
String
getProductBrand
()
{
return
productBrand
;
}
public
void
setProductBrand
(
String
productBrand
)
{
this
.
productBrand
=
productBrand
;
}
public
String
getProductSn
()
{
return
productSn
;
}
public
void
setProductSn
(
String
productSn
)
{
this
.
productSn
=
productSn
;
}
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
...
...
@@ -281,6 +301,8 @@ public class OmsCartItem implements Serializable {
sb
.
append
(
", modifyDate="
).
append
(
modifyDate
);
sb
.
append
(
", deleteStatus="
).
append
(
deleteStatus
);
sb
.
append
(
", productCategoryId="
).
append
(
productCategoryId
);
sb
.
append
(
", productBrand="
).
append
(
productBrand
);
sb
.
append
(
", productSn="
).
append
(
productSn
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
...
...
mall-mbg/src/main/java/com/macro/mall/model/OmsCartItemExample.java
View file @
2dd5d939
...
...
@@ -1265,6 +1265,146 @@ public class OmsCartItemExample {
addCriterion
(
"product_category_id not between"
,
value1
,
value2
,
"productCategoryId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProductBrandIsNull
()
{
addCriterion
(
"product_brand is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProductBrandIsNotNull
()
{
addCriterion
(
"product_brand is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProductBrandEqualTo
(
String
value
)
{
addCriterion
(
"product_brand ="
,
value
,
"productBrand"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProductBrandNotEqualTo
(
String
value
)
{
addCriterion
(
"product_brand <>"
,
value
,
"productBrand"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProductBrandGreaterThan
(
String
value
)
{
addCriterion
(
"product_brand >"
,
value
,
"productBrand"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProductBrandGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"product_brand >="
,
value
,
"productBrand"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProductBrandLessThan
(
String
value
)
{
addCriterion
(
"product_brand <"
,
value
,
"productBrand"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProductBrandLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"product_brand <="
,
value
,
"productBrand"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProductBrandLike
(
String
value
)
{
addCriterion
(
"product_brand like"
,
value
,
"productBrand"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProductBrandNotLike
(
String
value
)
{
addCriterion
(
"product_brand not like"
,
value
,
"productBrand"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProductBrandIn
(
List
<
String
>
values
)
{
addCriterion
(
"product_brand in"
,
values
,
"productBrand"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProductBrandNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"product_brand not in"
,
values
,
"productBrand"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProductBrandBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"product_brand between"
,
value1
,
value2
,
"productBrand"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProductBrandNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"product_brand not between"
,
value1
,
value2
,
"productBrand"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProductSnIsNull
()
{
addCriterion
(
"product_sn is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProductSnIsNotNull
()
{
addCriterion
(
"product_sn is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProductSnEqualTo
(
String
value
)
{
addCriterion
(
"product_sn ="
,
value
,
"productSn"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProductSnNotEqualTo
(
String
value
)
{
addCriterion
(
"product_sn <>"
,
value
,
"productSn"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProductSnGreaterThan
(
String
value
)
{
addCriterion
(
"product_sn >"
,
value
,
"productSn"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProductSnGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"product_sn >="
,
value
,
"productSn"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProductSnLessThan
(
String
value
)
{
addCriterion
(
"product_sn <"
,
value
,
"productSn"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProductSnLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"product_sn <="
,
value
,
"productSn"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProductSnLike
(
String
value
)
{
addCriterion
(
"product_sn like"
,
value
,
"productSn"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProductSnNotLike
(
String
value
)
{
addCriterion
(
"product_sn not like"
,
value
,
"productSn"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProductSnIn
(
List
<
String
>
values
)
{
addCriterion
(
"product_sn in"
,
values
,
"productSn"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProductSnNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"product_sn not in"
,
values
,
"productSn"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProductSnBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"product_sn between"
,
value1
,
value2
,
"productSn"
);
return
(
Criteria
)
this
;
}
public
Criteria
andProductSnNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"product_sn not between"
,
value1
,
value2
,
"productSn"
);
return
(
Criteria
)
this
;
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
...
...
mall-mbg/src/main/java/com/macro/mall/model/OmsOrderItem.java
View file @
2dd5d939
...
...
@@ -22,7 +22,7 @@ public class OmsOrderItem implements Serializable {
private
Long
productId
;
private
String
pro
u
dctPic
;
private
String
prod
u
ctPic
;
private
String
productName
;
...
...
@@ -30,21 +30,40 @@ public class OmsOrderItem implements Serializable {
private
String
productSn
;
private
BigDecimal
productAmount
;
/**
* 销售价格
*
* @mbggenerated
*/
private
BigDecimal
productPrice
;
/**
* 购买数量
*
* @mbggenerated
*/
private
Integer
product
Count
;
private
Integer
product
Quantity
;
/**
* 该商品经过优惠后的分解金额
* 商品sku编号
*
* @mbggenerated
*/
private
Long
productSkuId
;
/**
* 商品sku条码
*
* @mbggenerated
*/
private
BigDecimal
productRealAmount
;
private
String
productSkuCode
;
/**
* 商品分类id
*
* @mbggenerated
*/
private
Long
productCategoryId
;
/**
* 商品的销售属性
...
...
@@ -57,6 +76,45 @@ public class OmsOrderItem implements Serializable {
private
String
sp3
;
/**
* 商品促销名称
*
* @mbggenerated
*/
private
String
promotionName
;
/**
* 商品促销分解金额
*
* @mbggenerated
*/
private
BigDecimal
promotionAmount
;
/**
* 优惠券优惠分解金额
*
* @mbggenerated
*/
private
BigDecimal
couponAmount
;
/**
* 积分优惠分解金额
*
* @mbggenerated
*/
private
BigDecimal
integrationAmount
;
/**
* 该商品经过优惠后的分解金额
*
* @mbggenerated
*/
private
BigDecimal
realAmount
;
private
Integer
giftIntegration
;
private
Integer
giftGrowth
;
private
static
final
long
serialVersionUID
=
1L
;
public
Long
getId
()
{
...
...
@@ -91,12 +149,12 @@ public class OmsOrderItem implements Serializable {
this
.
productId
=
productId
;
}
public
String
getPro
u
dctPic
()
{
return
pro
u
dctPic
;
public
String
getProd
u
ctPic
()
{
return
prod
u
ctPic
;
}
public
void
setPro
u
dctPic
(
String
pro
u
dctPic
)
{
this
.
pro
u
dctPic
=
pro
u
dctPic
;
public
void
setProd
u
ctPic
(
String
prod
u
ctPic
)
{
this
.
prod
u
ctPic
=
prod
u
ctPic
;
}
public
String
getProductName
()
{
...
...
@@ -123,28 +181,44 @@ public class OmsOrderItem implements Serializable {
this
.
productSn
=
productSn
;
}
public
BigDecimal
getProductAmount
()
{
return
productAmount
;
public
BigDecimal
getProductPrice
()
{
return
productPrice
;
}
public
void
setProductPrice
(
BigDecimal
productPrice
)
{
this
.
productPrice
=
productPrice
;
}
public
Integer
getProductQuantity
()
{
return
productQuantity
;
}
public
void
setProductQuantity
(
Integer
productQuantity
)
{
this
.
productQuantity
=
productQuantity
;
}
public
Long
getProductSkuId
()
{
return
productSkuId
;
}
public
void
setProduct
Amount
(
BigDecimal
product
Amount
)
{
this
.
product
Amount
=
product
Amount
;
public
void
setProduct
SkuId
(
Long
product
SkuId
)
{
this
.
product
SkuId
=
product
SkuId
;
}
public
Integer
getProduct
Count
()
{
return
product
Count
;
public
String
getProduct
SkuCode
()
{
return
product
SkuCode
;
}
public
void
setProduct
Count
(
Integer
product
Count
)
{
this
.
product
Count
=
product
Count
;
public
void
setProduct
SkuCode
(
String
product
SkuCode
)
{
this
.
product
SkuCode
=
product
SkuCode
;
}
public
BigDecimal
getProduct
RealAmount
()
{
return
product
RealAmount
;
public
Long
getProduct
CategoryId
()
{
return
product
CategoryId
;
}
public
void
setProduct
RealAmount
(
BigDecimal
productRealAmount
)
{
this
.
product
RealAmount
=
productRealAmount
;
public
void
setProduct
CategoryId
(
Long
productCategoryId
)
{
this
.
product
CategoryId
=
productCategoryId
;
}
public
String
getSp1
()
{
...
...
@@ -171,6 +245,62 @@ public class OmsOrderItem implements Serializable {
this
.
sp3
=
sp3
;
}
public
String
getPromotionName
()
{
return
promotionName
;
}
public
void
setPromotionName
(
String
promotionName
)
{
this
.
promotionName
=
promotionName
;
}
public
BigDecimal
getPromotionAmount
()
{
return
promotionAmount
;
}
public
void
setPromotionAmount
(
BigDecimal
promotionAmount
)
{
this
.
promotionAmount
=
promotionAmount
;
}
public
BigDecimal
getCouponAmount
()
{
return
couponAmount
;
}
public
void
setCouponAmount
(
BigDecimal
couponAmount
)
{
this
.
couponAmount
=
couponAmount
;
}
public
BigDecimal
getIntegrationAmount
()
{
return
integrationAmount
;
}
public
void
setIntegrationAmount
(
BigDecimal
integrationAmount
)
{
this
.
integrationAmount
=
integrationAmount
;
}
public
BigDecimal
getRealAmount
()
{
return
realAmount
;
}
public
void
setRealAmount
(
BigDecimal
realAmount
)
{
this
.
realAmount
=
realAmount
;
}
public
Integer
getGiftIntegration
()
{
return
giftIntegration
;
}
public
void
setGiftIntegration
(
Integer
giftIntegration
)
{
this
.
giftIntegration
=
giftIntegration
;
}
public
Integer
getGiftGrowth
()
{
return
giftGrowth
;
}
public
void
setGiftGrowth
(
Integer
giftGrowth
)
{
this
.
giftGrowth
=
giftGrowth
;
}
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
...
...
@@ -181,16 +311,25 @@ public class OmsOrderItem implements Serializable {
sb
.
append
(
", orderId="
).
append
(
orderId
);
sb
.
append
(
", orderSn="
).
append
(
orderSn
);
sb
.
append
(
", productId="
).
append
(
productId
);
sb
.
append
(
", pro
u
dctPic="
).
append
(
pro
u
dctPic
);
sb
.
append
(
", prod
u
ctPic="
).
append
(
prod
u
ctPic
);
sb
.
append
(
", productName="
).
append
(
productName
);
sb
.
append
(
", productBrand="
).
append
(
productBrand
);
sb
.
append
(
", productSn="
).
append
(
productSn
);
sb
.
append
(
", productAmount="
).
append
(
productAmount
);
sb
.
append
(
", productCount="
).
append
(
productCount
);
sb
.
append
(
", productRealAmount="
).
append
(
productRealAmount
);
sb
.
append
(
", productPrice="
).
append
(
productPrice
);
sb
.
append
(
", productQuantity="
).
append
(
productQuantity
);
sb
.
append
(
", productSkuId="
).
append
(
productSkuId
);
sb
.
append
(
", productSkuCode="
).
append
(
productSkuCode
);
sb
.
append
(
", productCategoryId="
).
append
(
productCategoryId
);
sb
.
append
(
", sp1="
).
append
(
sp1
);
sb
.
append
(
", sp2="
).
append
(
sp2
);
sb
.
append
(
", sp3="
).
append
(
sp3
);
sb
.
append
(
", promotionName="
).
append
(
promotionName
);
sb
.
append
(
", promotionAmount="
).
append
(
promotionAmount
);
sb
.
append
(
", couponAmount="
).
append
(
couponAmount
);
sb
.
append
(
", integrationAmount="
).
append
(
integrationAmount
);
sb
.
append
(
", realAmount="
).
append
(
realAmount
);
sb
.
append
(
", giftIntegration="
).
append
(
giftIntegration
);
sb
.
append
(
", giftGrowth="
).
append
(
giftGrowth
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
...
...
mall-mbg/src/main/java/com/macro/mall/model/OmsOrderItemExample.java
View file @
2dd5d939
This diff is collapsed.
Click to expand it.
mall-mbg/src/main/resources/com/macro/mall/mapper/OmsCartItemMapper.xml
View file @
2dd5d939
...
...
@@ -20,6 +20,8 @@
<result
column=
"modify_date"
jdbcType=
"TIMESTAMP"
property=
"modifyDate"
/>
<result
column=
"delete_status"
jdbcType=
"INTEGER"
property=
"deleteStatus"
/>
<result
column=
"product_category_id"
jdbcType=
"BIGINT"
property=
"productCategoryId"
/>
<result
column=
"product_brand"
jdbcType=
"VARCHAR"
property=
"productBrand"
/>
<result
column=
"product_sn"
jdbcType=
"VARCHAR"
property=
"productSn"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where>
...
...
@@ -82,7 +84,7 @@
<sql
id=
"Base_Column_List"
>
id, product_id, product_sku_id, member_id, quantity, price, sp1, sp2, sp3, product_pic,
product_name, product_sub_title, product_sku_code, member_nickname, create_date,
modify_date, delete_status, product_category_id
modify_date, delete_status, product_category_id
, product_brand, product_sn
</sql>
<select
id=
"selectByExample"
parameterType=
"com.macro.mall.model.OmsCartItemExample"
resultMap=
"BaseResultMap"
>
select
...
...
@@ -123,13 +125,15 @@
sp2, sp3, product_pic,
product_name, product_sub_title, product_sku_code,
member_nickname, create_date, modify_date,
delete_status, product_category_id)
delete_status, product_category_id, product_brand,
product_sn)
values (#{productId,jdbcType=BIGINT}, #{productSkuId,jdbcType=BIGINT}, #{memberId,jdbcType=BIGINT},
#{quantity,jdbcType=INTEGER}, #{price,jdbcType=DECIMAL}, #{sp1,jdbcType=VARCHAR},
#{sp2,jdbcType=VARCHAR}, #{sp3,jdbcType=VARCHAR}, #{productPic,jdbcType=VARCHAR},
#{productName,jdbcType=VARCHAR}, #{productSubTitle,jdbcType=VARCHAR}, #{productSkuCode,jdbcType=VARCHAR},
#{memberNickname,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, #{modifyDate,jdbcType=TIMESTAMP},
#{deleteStatus,jdbcType=INTEGER}, #{productCategoryId,jdbcType=BIGINT})
#{deleteStatus,jdbcType=INTEGER}, #{productCategoryId,jdbcType=BIGINT}, #{productBrand,jdbcType=VARCHAR},
#{productSn,jdbcType=VARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.macro.mall.model.OmsCartItem"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
...
...
@@ -188,6 +192,12 @@
<if
test=
"productCategoryId != null"
>
product_category_id,
</if>
<if
test=
"productBrand != null"
>
product_brand,
</if>
<if
test=
"productSn != null"
>
product_sn,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"productId != null"
>
...
...
@@ -241,6 +251,12 @@
<if
test=
"productCategoryId != null"
>
#{productCategoryId,jdbcType=BIGINT},
</if>
<if
test=
"productBrand != null"
>
#{productBrand,jdbcType=VARCHAR},
</if>
<if
test=
"productSn != null"
>
#{productSn,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.macro.mall.model.OmsCartItemExample"
resultType=
"java.lang.Integer"
>
...
...
@@ -306,6 +322,12 @@
<if
test=
"record.productCategoryId != null"
>
product_category_id = #{record.productCategoryId,jdbcType=BIGINT},
</if>
<if
test=
"record.productBrand != null"
>
product_brand = #{record.productBrand,jdbcType=VARCHAR},
</if>
<if
test=
"record.productSn != null"
>
product_sn = #{record.productSn,jdbcType=VARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
...
...
@@ -330,7 +352,9 @@
create_date = #{record.createDate,jdbcType=TIMESTAMP},
modify_date = #{record.modifyDate,jdbcType=TIMESTAMP},
delete_status = #{record.deleteStatus,jdbcType=INTEGER},
product_category_id = #{record.productCategoryId,jdbcType=BIGINT}
product_category_id = #{record.productCategoryId,jdbcType=BIGINT},
product_brand = #{record.productBrand,jdbcType=VARCHAR},
product_sn = #{record.productSn,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
...
...
@@ -389,6 +413,12 @@
<if
test=
"productCategoryId != null"
>
product_category_id = #{productCategoryId,jdbcType=BIGINT},
</if>
<if
test=
"productBrand != null"
>
product_brand = #{productBrand,jdbcType=VARCHAR},
</if>
<if
test=
"productSn != null"
>
product_sn = #{productSn,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
...
...
@@ -410,7 +440,9 @@
create_date = #{createDate,jdbcType=TIMESTAMP},
modify_date = #{modifyDate,jdbcType=TIMESTAMP},
delete_status = #{deleteStatus,jdbcType=INTEGER},
product_category_id = #{productCategoryId,jdbcType=BIGINT}
product_category_id = #{productCategoryId,jdbcType=BIGINT},
product_brand = #{productBrand,jdbcType=VARCHAR},
product_sn = #{productSn,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
mall-mbg/src/main/resources/com/macro/mall/mapper/OmsOrderItemMapper.xml
View file @
2dd5d939
...
...
@@ -6,16 +6,25 @@
<result
column=
"order_id"
jdbcType=
"BIGINT"
property=
"orderId"
/>
<result
column=
"order_sn"
jdbcType=
"VARCHAR"
property=
"orderSn"
/>
<result
column=
"product_id"
jdbcType=
"BIGINT"
property=
"productId"
/>
<result
column=
"pro
u
dct_pic"
jdbcType=
"VARCHAR"
property=
"pro
u
dctPic"
/>
<result
column=
"prod
u
ct_pic"
jdbcType=
"VARCHAR"
property=
"prod
u
ctPic"
/>
<result
column=
"product_name"
jdbcType=
"VARCHAR"
property=
"productName"
/>
<result
column=
"product_brand"
jdbcType=
"VARCHAR"
property=
"productBrand"
/>
<result
column=
"product_sn"
jdbcType=
"VARCHAR"
property=
"productSn"
/>
<result
column=
"product_amount"
jdbcType=
"DECIMAL"
property=
"productAmount"
/>
<result
column=
"product_count"
jdbcType=
"INTEGER"
property=
"productCount"
/>
<result
column=
"product_real_amount"
jdbcType=
"DECIMAL"
property=
"productRealAmount"
/>
<result
column=
"product_price"
jdbcType=
"DECIMAL"
property=
"productPrice"
/>
<result
column=
"product_quantity"
jdbcType=
"INTEGER"
property=
"productQuantity"
/>
<result
column=
"product_sku_id"
jdbcType=
"BIGINT"
property=
"productSkuId"
/>
<result
column=
"product_sku_code"
jdbcType=
"VARCHAR"
property=
"productSkuCode"
/>
<result
column=
"product_category_id"
jdbcType=
"BIGINT"
property=
"productCategoryId"
/>
<result
column=
"sp1"
jdbcType=
"VARCHAR"
property=
"sp1"
/>
<result
column=
"sp2"
jdbcType=
"VARCHAR"
property=
"sp2"
/>
<result
column=
"sp3"
jdbcType=
"VARCHAR"
property=
"sp3"
/>
<result
column=
"promotion_name"
jdbcType=
"VARCHAR"
property=
"promotionName"
/>
<result
column=
"promotion_amount"
jdbcType=
"DECIMAL"
property=
"promotionAmount"
/>
<result
column=
"coupon_amount"
jdbcType=
"DECIMAL"
property=
"couponAmount"
/>
<result
column=
"integration_amount"
jdbcType=
"DECIMAL"
property=
"integrationAmount"
/>
<result
column=
"real_amount"
jdbcType=
"DECIMAL"
property=
"realAmount"
/>
<result
column=
"gift_integration"
jdbcType=
"INTEGER"
property=
"giftIntegration"
/>
<result
column=
"gift_growth"
jdbcType=
"INTEGER"
property=
"giftGrowth"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where>
...
...
@@ -76,8 +85,10 @@
</where>
</sql>
<sql
id=
"Base_Column_List"
>
id, order_id, order_sn, product_id, proudct_pic, product_name, product_brand, product_sn,
product_amount, product_count, product_real_amount, sp1, sp2, sp3
id, order_id, order_sn, product_id, product_pic, product_name, product_brand, product_sn,
product_price, product_quantity, product_sku_id, product_sku_code, product_category_id,
sp1, sp2, sp3, promotion_name, promotion_amount, coupon_amount, integration_amount,
real_amount, gift_integration, gift_growth
</sql>
<select
id=
"selectByExample"
parameterType=
"com.macro.mall.model.OmsOrderItemExample"
resultMap=
"BaseResultMap"
>
select
...
...
@@ -114,15 +125,21 @@
SELECT LAST_INSERT_ID()
</selectKey>
insert into oms_order_item (order_id, order_sn, product_id,
proudct_pic, product_name, product_brand,
product_sn, product_amount, product_count,
product_real_amount, sp1, sp2,
sp3)
product_pic, product_name, product_brand,
product_sn, product_price, product_quantity,
product_sku_id, product_sku_code, product_category_id,
sp1, sp2, sp3, promotion_name,
promotion_amount, coupon_amount, integration_amount,
real_amount, gift_integration, gift_growth
)
values (#{orderId,jdbcType=BIGINT}, #{orderSn,jdbcType=VARCHAR}, #{productId,jdbcType=BIGINT},
#{proudctPic,jdbcType=VARCHAR}, #{productName,jdbcType=VARCHAR}, #{productBrand,jdbcType=VARCHAR},
#{productSn,jdbcType=VARCHAR}, #{productAmount,jdbcType=DECIMAL}, #{productCount,jdbcType=INTEGER},
#{productRealAmount,jdbcType=DECIMAL}, #{sp1,jdbcType=VARCHAR}, #{sp2,jdbcType=VARCHAR},
#{sp3,jdbcType=VARCHAR})
#{productPic,jdbcType=VARCHAR}, #{productName,jdbcType=VARCHAR}, #{productBrand,jdbcType=VARCHAR},
#{productSn,jdbcType=VARCHAR}, #{productPrice,jdbcType=DECIMAL}, #{productQuantity,jdbcType=INTEGER},
#{productSkuId,jdbcType=BIGINT}, #{productSkuCode,jdbcType=VARCHAR}, #{productCategoryId,jdbcType=BIGINT},
#{sp1,jdbcType=VARCHAR}, #{sp2,jdbcType=VARCHAR}, #{sp3,jdbcType=VARCHAR}, #{promotionName,jdbcType=VARCHAR},
#{promotionAmount,jdbcType=DECIMAL}, #{couponAmount,jdbcType=DECIMAL}, #{integrationAmount,jdbcType=DECIMAL},
#{realAmount,jdbcType=DECIMAL}, #{giftIntegration,jdbcType=INTEGER}, #{giftGrowth,jdbcType=INTEGER}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.macro.mall.model.OmsOrderItem"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
...
...
@@ -139,8 +156,8 @@
<if
test=
"productId != null"
>
product_id,
</if>
<if
test=
"pro
u
dctPic != null"
>
pro
u
dct_pic,
<if
test=
"prod
u
ctPic != null"
>
prod
u
ct_pic,
</if>
<if
test=
"productName != null"
>
product_name,
...
...
@@ -151,14 +168,20 @@
<if
test=
"productSn != null"
>
product_sn,
</if>
<if
test=
"product
Amount
!= null"
>
product_
amount
,
<if
test=
"product
Price
!= null"
>
product_
price
,
</if>
<if
test=
"product
Count
!= null"
>
product_
count
,
<if
test=
"product
Quantity
!= null"
>
product_
quantity
,
</if>
<if
test=
"productRealAmount != null"
>
product_real_amount,
<if
test=
"productSkuId != null"
>
product_sku_id,
</if>
<if
test=
"productSkuCode != null"
>
product_sku_code,
</if>
<if
test=
"productCategoryId != null"
>
product_category_id,
</if>
<if
test=
"sp1 != null"
>
sp1,
...
...
@@ -169,6 +192,27 @@
<if
test=
"sp3 != null"
>
sp3,
</if>
<if
test=
"promotionName != null"
>
promotion_name,
</if>
<if
test=
"promotionAmount != null"
>
promotion_amount,
</if>
<if
test=
"couponAmount != null"
>
coupon_amount,
</if>
<if
test=
"integrationAmount != null"
>
integration_amount,
</if>
<if
test=
"realAmount != null"
>
real_amount,
</if>
<if
test=
"giftIntegration != null"
>
gift_integration,
</if>
<if
test=
"giftGrowth != null"
>
gift_growth,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"orderId != null"
>
...
...
@@ -180,8 +224,8 @@
<if
test=
"productId != null"
>
#{productId,jdbcType=BIGINT},
</if>
<if
test=
"pro
u
dctPic != null"
>
#{pro
u
dctPic,jdbcType=VARCHAR},
<if
test=
"prod
u
ctPic != null"
>
#{prod
u
ctPic,jdbcType=VARCHAR},
</if>
<if
test=
"productName != null"
>
#{productName,jdbcType=VARCHAR},
...
...
@@ -192,14 +236,20 @@
<if
test=
"productSn != null"
>
#{productSn,jdbcType=VARCHAR},
</if>
<if
test=
"product
Amount
!= null"
>
#{product
Amount
,jdbcType=DECIMAL},
<if
test=
"product
Price
!= null"
>
#{product
Price
,jdbcType=DECIMAL},
</if>
<if
test=
"product
Count
!= null"
>
#{product
Count
,jdbcType=INTEGER},
<if
test=
"product
Quantity
!= null"
>
#{product
Quantity
,jdbcType=INTEGER},
</if>
<if
test=
"productRealAmount != null"
>
#{productRealAmount,jdbcType=DECIMAL},
<if
test=
"productSkuId != null"
>
#{productSkuId,jdbcType=BIGINT},
</if>
<if
test=
"productSkuCode != null"
>
#{productSkuCode,jdbcType=VARCHAR},
</if>
<if
test=
"productCategoryId != null"
>
#{productCategoryId,jdbcType=BIGINT},
</if>
<if
test=
"sp1 != null"
>
#{sp1,jdbcType=VARCHAR},
...
...
@@ -210,6 +260,27 @@
<if
test=
"sp3 != null"
>
#{sp3,jdbcType=VARCHAR},
</if>
<if
test=
"promotionName != null"
>
#{promotionName,jdbcType=VARCHAR},
</if>
<if
test=
"promotionAmount != null"
>
#{promotionAmount,jdbcType=DECIMAL},
</if>
<if
test=
"couponAmount != null"
>
#{couponAmount,jdbcType=DECIMAL},
</if>
<if
test=
"integrationAmount != null"
>
#{integrationAmount,jdbcType=DECIMAL},
</if>
<if
test=
"realAmount != null"
>
#{realAmount,jdbcType=DECIMAL},
</if>
<if
test=
"giftIntegration != null"
>
#{giftIntegration,jdbcType=INTEGER},
</if>
<if
test=
"giftGrowth != null"
>
#{giftGrowth,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.macro.mall.model.OmsOrderItemExample"
resultType=
"java.lang.Integer"
>
...
...
@@ -233,8 +304,8 @@
<if
test=
"record.productId != null"
>
product_id = #{record.productId,jdbcType=BIGINT},
</if>
<if
test=
"record.pro
u
dctPic != null"
>
pro
u
dct_pic = #{record.pro
u
dctPic,jdbcType=VARCHAR},
<if
test=
"record.prod
u
ctPic != null"
>
prod
u
ct_pic = #{record.prod
u
ctPic,jdbcType=VARCHAR},
</if>
<if
test=
"record.productName != null"
>
product_name = #{record.productName,jdbcType=VARCHAR},
...
...
@@ -245,14 +316,20 @@
<if
test=
"record.productSn != null"
>
product_sn = #{record.productSn,jdbcType=VARCHAR},
</if>
<if
test=
"record.product
Amount
!= null"
>
product_
amount
= #{record.product
Amount
,jdbcType=DECIMAL},
<if
test=
"record.product
Price
!= null"
>
product_
price
= #{record.product
Price
,jdbcType=DECIMAL},
</if>
<if
test=
"record.product
Count
!= null"
>
product_
count
= #{record.product
Count
,jdbcType=INTEGER},
<if
test=
"record.product
Quantity
!= null"
>
product_
quantity
= #{record.product
Quantity
,jdbcType=INTEGER},
</if>
<if
test=
"record.productRealAmount != null"
>
product_real_amount = #{record.productRealAmount,jdbcType=DECIMAL},
<if
test=
"record.productSkuId != null"
>
product_sku_id = #{record.productSkuId,jdbcType=BIGINT},
</if>
<if
test=
"record.productSkuCode != null"
>
product_sku_code = #{record.productSkuCode,jdbcType=VARCHAR},
</if>
<if
test=
"record.productCategoryId != null"
>
product_category_id = #{record.productCategoryId,jdbcType=BIGINT},
</if>
<if
test=
"record.sp1 != null"
>
sp1 = #{record.sp1,jdbcType=VARCHAR},
...
...
@@ -263,6 +340,27 @@
<if
test=
"record.sp3 != null"
>
sp3 = #{record.sp3,jdbcType=VARCHAR},
</if>
<if
test=
"record.promotionName != null"
>
promotion_name = #{record.promotionName,jdbcType=VARCHAR},
</if>
<if
test=
"record.promotionAmount != null"
>
promotion_amount = #{record.promotionAmount,jdbcType=DECIMAL},
</if>
<if
test=
"record.couponAmount != null"
>
coupon_amount = #{record.couponAmount,jdbcType=DECIMAL},
</if>
<if
test=
"record.integrationAmount != null"
>
integration_amount = #{record.integrationAmount,jdbcType=DECIMAL},
</if>
<if
test=
"record.realAmount != null"
>
real_amount = #{record.realAmount,jdbcType=DECIMAL},
</if>
<if
test=
"record.giftIntegration != null"
>
gift_integration = #{record.giftIntegration,jdbcType=INTEGER},
</if>
<if
test=
"record.giftGrowth != null"
>
gift_growth = #{record.giftGrowth,jdbcType=INTEGER},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
...
...
@@ -274,16 +372,25 @@
order_id = #{record.orderId,jdbcType=BIGINT},
order_sn = #{record.orderSn,jdbcType=VARCHAR},
product_id = #{record.productId,jdbcType=BIGINT},
pro
u
dct_pic = #{record.pro
u
dctPic,jdbcType=VARCHAR},
prod
u
ct_pic = #{record.prod
u
ctPic,jdbcType=VARCHAR},
product_name = #{record.productName,jdbcType=VARCHAR},
product_brand = #{record.productBrand,jdbcType=VARCHAR},
product_sn = #{record.productSn,jdbcType=VARCHAR},
product_amount = #{record.productAmount,jdbcType=DECIMAL},
product_count = #{record.productCount,jdbcType=INTEGER},
product_real_amount = #{record.productRealAmount,jdbcType=DECIMAL},
product_price = #{record.productPrice,jdbcType=DECIMAL},
product_quantity = #{record.productQuantity,jdbcType=INTEGER},
product_sku_id = #{record.productSkuId,jdbcType=BIGINT},
product_sku_code = #{record.productSkuCode,jdbcType=VARCHAR},
product_category_id = #{record.productCategoryId,jdbcType=BIGINT},
sp1 = #{record.sp1,jdbcType=VARCHAR},
sp2 = #{record.sp2,jdbcType=VARCHAR},
sp3 = #{record.sp3,jdbcType=VARCHAR}
sp3 = #{record.sp3,jdbcType=VARCHAR},
promotion_name = #{record.promotionName,jdbcType=VARCHAR},
promotion_amount = #{record.promotionAmount,jdbcType=DECIMAL},
coupon_amount = #{record.couponAmount,jdbcType=DECIMAL},
integration_amount = #{record.integrationAmount,jdbcType=DECIMAL},
real_amount = #{record.realAmount,jdbcType=DECIMAL},
gift_integration = #{record.giftIntegration,jdbcType=INTEGER},
gift_growth = #{record.giftGrowth,jdbcType=INTEGER}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
...
...
@@ -300,8 +407,8 @@
<if
test=
"productId != null"
>
product_id = #{productId,jdbcType=BIGINT},
</if>
<if
test=
"pro
u
dctPic != null"
>
pro
u
dct_pic = #{pro
u
dctPic,jdbcType=VARCHAR},
<if
test=
"prod
u
ctPic != null"
>
prod
u
ct_pic = #{prod
u
ctPic,jdbcType=VARCHAR},
</if>
<if
test=
"productName != null"
>
product_name = #{productName,jdbcType=VARCHAR},
...
...
@@ -312,14 +419,20 @@
<if
test=
"productSn != null"
>
product_sn = #{productSn,jdbcType=VARCHAR},
</if>
<if
test=
"product
Amount
!= null"
>
product_
amount
= #{product
Amount
,jdbcType=DECIMAL},
<if
test=
"product
Price
!= null"
>
product_
price
= #{product
Price
,jdbcType=DECIMAL},
</if>
<if
test=
"product
Count
!= null"
>
product_
count
= #{product
Count
,jdbcType=INTEGER},
<if
test=
"product
Quantity
!= null"
>
product_
quantity
= #{product
Quantity
,jdbcType=INTEGER},
</if>
<if
test=
"productRealAmount != null"
>
product_real_amount = #{productRealAmount,jdbcType=DECIMAL},
<if
test=
"productSkuId != null"
>
product_sku_id = #{productSkuId,jdbcType=BIGINT},
</if>
<if
test=
"productSkuCode != null"
>
product_sku_code = #{productSkuCode,jdbcType=VARCHAR},
</if>
<if
test=
"productCategoryId != null"
>
product_category_id = #{productCategoryId,jdbcType=BIGINT},
</if>
<if
test=
"sp1 != null"
>
sp1 = #{sp1,jdbcType=VARCHAR},
...
...
@@ -330,6 +443,27 @@
<if
test=
"sp3 != null"
>
sp3 = #{sp3,jdbcType=VARCHAR},
</if>
<if
test=
"promotionName != null"
>
promotion_name = #{promotionName,jdbcType=VARCHAR},
</if>
<if
test=
"promotionAmount != null"
>
promotion_amount = #{promotionAmount,jdbcType=DECIMAL},
</if>
<if
test=
"couponAmount != null"
>
coupon_amount = #{couponAmount,jdbcType=DECIMAL},
</if>
<if
test=
"integrationAmount != null"
>
integration_amount = #{integrationAmount,jdbcType=DECIMAL},
</if>
<if
test=
"realAmount != null"
>
real_amount = #{realAmount,jdbcType=DECIMAL},
</if>
<if
test=
"giftIntegration != null"
>
gift_integration = #{giftIntegration,jdbcType=INTEGER},
</if>
<if
test=
"giftGrowth != null"
>
gift_growth = #{giftGrowth,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
...
...
@@ -338,16 +472,25 @@
set order_id = #{orderId,jdbcType=BIGINT},
order_sn = #{orderSn,jdbcType=VARCHAR},
product_id = #{productId,jdbcType=BIGINT},
pro
u
dct_pic = #{pro
u
dctPic,jdbcType=VARCHAR},
prod
u
ct_pic = #{prod
u
ctPic,jdbcType=VARCHAR},
product_name = #{productName,jdbcType=VARCHAR},
product_brand = #{productBrand,jdbcType=VARCHAR},
product_sn = #{productSn,jdbcType=VARCHAR},
product_amount = #{productAmount,jdbcType=DECIMAL},
product_count = #{productCount,jdbcType=INTEGER},
product_real_amount = #{productRealAmount,jdbcType=DECIMAL},
product_price = #{productPrice,jdbcType=DECIMAL},
product_quantity = #{productQuantity,jdbcType=INTEGER},
product_sku_id = #{productSkuId,jdbcType=BIGINT},
product_sku_code = #{productSkuCode,jdbcType=VARCHAR},
product_category_id = #{productCategoryId,jdbcType=BIGINT},
sp1 = #{sp1,jdbcType=VARCHAR},
sp2 = #{sp2,jdbcType=VARCHAR},
sp3 = #{sp3,jdbcType=VARCHAR}
sp3 = #{sp3,jdbcType=VARCHAR},
promotion_name = #{promotionName,jdbcType=VARCHAR},
promotion_amount = #{promotionAmount,jdbcType=DECIMAL},
coupon_amount = #{couponAmount,jdbcType=DECIMAL},
integration_amount = #{integrationAmount,jdbcType=DECIMAL},
real_amount = #{realAmount,jdbcType=DECIMAL},
gift_integration = #{giftIntegration,jdbcType=INTEGER},
gift_growth = #{giftGrowth,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
mall-portal/src/main/java/com/macro/mall/portal/dao/PortalOrderItemDao.java
0 → 100644
View file @
2dd5d939
package
com.macro.mall.portal.dao
;
import
com.macro.mall.model.OmsOrderItem
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* 订单商品信息自定义Dao
* Created by macro on 2018/9/3.
*/
public
interface
PortalOrderItemDao
{
int
insertList
(
@Param
(
"list"
)
List
<
OmsOrderItem
>
list
);
}
mall-portal/src/main/java/com/macro/mall/portal/domain/CartPromotionItem.java
View file @
2dd5d939
...
...
@@ -15,6 +15,10 @@ public class CartPromotionItem extends OmsCartItem{
private
BigDecimal
reduceAmount
;
//商品的真实库存(剩余库存-锁定库存)
private
Integer
realStock
;
//购买商品赠送积分
private
Integer
integration
;
//购买商品赠送成长值
private
Integer
growth
;
public
String
getPromotionMessage
()
{
return
promotionMessage
;
}
...
...
@@ -38,4 +42,20 @@ public class CartPromotionItem extends OmsCartItem{
public
void
setRealStock
(
Integer
realStock
)
{
this
.
realStock
=
realStock
;
}
public
Integer
getIntegration
()
{
return
integration
;
}
public
void
setIntegration
(
Integer
integration
)
{
this
.
integration
=
integration
;
}
public
Integer
getGrowth
()
{
return
growth
;
}
public
void
setGrowth
(
Integer
growth
)
{
this
.
growth
=
growth
;
}
}
mall-portal/src/main/java/com/macro/mall/portal/domain/OrderParam.java
View file @
2dd5d939
...
...
@@ -10,7 +10,7 @@ public class OrderParam {
//优惠券id
private
Long
couponId
;
//使用的积分数
private
Integer
useIn
g
egration
;
private
Integer
useIn
t
egration
;
//支付方式
private
Integer
payType
;
...
...
@@ -30,14 +30,6 @@ public class OrderParam {
this
.
couponId
=
couponId
;
}
public
Integer
getUseIngegration
()
{
return
useIngegration
;
}
public
void
setUseIngegration
(
Integer
useIngegration
)
{
this
.
useIngegration
=
useIngegration
;
}
public
Integer
getPayType
()
{
return
payType
;
}
...
...
@@ -45,4 +37,12 @@ public class OrderParam {
public
void
setPayType
(
Integer
payType
)
{
this
.
payType
=
payType
;
}
public
Integer
getUseIntegration
()
{
return
useIntegration
;
}
public
void
setUseIntegration
(
Integer
useIntegration
)
{
this
.
useIntegration
=
useIntegration
;
}
}
mall-portal/src/main/java/com/macro/mall/portal/service/impl/OmsCartItemServiceImpl.java
View file @
2dd5d939
...
...
@@ -15,6 +15,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.StringUtils
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -85,7 +86,11 @@ public class OmsCartItemServiceImpl implements OmsCartItemService {
@Override
public
List
<
CartPromotionItem
>
listPromotion
(
Long
memberId
)
{
List
<
OmsCartItem
>
cartItemList
=
list
(
memberId
);
return
promotionService
.
calcCartPromotion
(
cartItemList
);
List
<
CartPromotionItem
>
cartPromotionItemList
=
new
ArrayList
<>();
if
(!
CollectionUtils
.
isEmpty
(
cartItemList
)){
cartPromotionItemList
=
promotionService
.
calcCartPromotion
(
cartItemList
);
}
return
cartPromotionItemList
;
}
@Override
...
...
mall-portal/src/main/java/com/macro/mall/portal/service/impl/OmsPortalOrderServiceImpl.java
View file @
2dd5d939
This diff is collapsed.
Click to expand it.
mall-portal/src/main/java/com/macro/mall/portal/service/impl/OmsPromotionServiceImpl.java
View file @
2dd5d939
...
...
@@ -11,6 +11,7 @@ import com.macro.mall.portal.service.OmsPromotionService;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
...
...
@@ -49,6 +50,8 @@ public class OmsPromotionServiceImpl implements OmsPromotionService {
BigDecimal
originalPrice
=
skuStock
.
getPrice
();
cartPromotionItem
.
setReduceAmount
(
originalPrice
.
subtract
(
skuStock
.
getPromotionPrice
()));
cartPromotionItem
.
setRealStock
(
skuStock
.
getStock
()-
skuStock
.
getLockStock
());
cartPromotionItem
.
setIntegration
(
promotionProduct
.
getGiftPoint
());
cartPromotionItem
.
setGrowth
(
promotionProduct
.
getGiftGrowth
());
cartPromotionItemList
.
add
(
cartPromotionItem
);
}
}
else
if
(
promotionType
==
3
)
{
...
...
@@ -67,6 +70,8 @@ public class OmsPromotionServiceImpl implements OmsPromotionService {
BigDecimal
reduceAmount
=
originalPrice
.
subtract
(
ladder
.
getDiscount
().
multiply
(
originalPrice
));
cartPromotionItem
.
setReduceAmount
(
reduceAmount
);
cartPromotionItem
.
setRealStock
(
skuStock
.
getStock
()-
skuStock
.
getLockStock
());
cartPromotionItem
.
setIntegration
(
promotionProduct
.
getGiftPoint
());
cartPromotionItem
.
setGrowth
(
promotionProduct
.
getGiftGrowth
());
cartPromotionItemList
.
add
(
cartPromotionItem
);
}
}
else
{
...
...
@@ -88,6 +93,8 @@ public class OmsPromotionServiceImpl implements OmsPromotionService {
BigDecimal
reduceAmount
=
originalPrice
.
divide
(
totalAmount
,
RoundingMode
.
HALF_EVEN
).
multiply
(
fullReduction
.
getReducePrice
());
cartPromotionItem
.
setReduceAmount
(
reduceAmount
);
cartPromotionItem
.
setRealStock
(
skuStock
.
getStock
()-
skuStock
.
getLockStock
());
cartPromotionItem
.
setIntegration
(
promotionProduct
.
getGiftPoint
());
cartPromotionItem
.
setGrowth
(
promotionProduct
.
getGiftGrowth
());
cartPromotionItemList
.
add
(
cartPromotionItem
);
}
}
else
{
...
...
@@ -156,6 +163,8 @@ public class OmsPromotionServiceImpl implements OmsPromotionService {
cartPromotionItem
.
setReduceAmount
(
new
BigDecimal
(
0
));
PmsSkuStock
skuStock
=
getOriginalPrice
(
promotionProduct
,
item
.
getProductSkuId
());
cartPromotionItem
.
setRealStock
(
skuStock
.
getStock
()-
skuStock
.
getLockStock
());
cartPromotionItem
.
setIntegration
(
promotionProduct
.
getGiftPoint
());
cartPromotionItem
.
setGrowth
(
promotionProduct
.
getGiftGrowth
());
cartPromotionItemList
.
add
(
cartPromotionItem
);
}
}
...
...
mall-portal/src/main/resources/dao/PortalOrderItemDao.xml
0 → 100644
View file @
2dd5d939
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.macro.mall.portal.dao.PortalOrderItemDao"
>
<insert
id=
"insertList"
>
insert into oms_order_item (order_id, order_sn, product_id,
product_pic, product_name, product_brand,
product_sn, product_price, product_quantity,
product_sku_id, product_category_id, product_sku_code,
sp1, sp2, sp3, promotion_name,
promotion_amount, coupon_amount, integration_amount,
real_amount) values
<foreach
collection=
"list"
item=
"item"
separator=
","
index=
"index"
>
(#{item.orderId,jdbcType=BIGINT}, #{item.orderSn,jdbcType=VARCHAR}, #{item.productId,jdbcType=BIGINT},
#{item.productPic,jdbcType=VARCHAR}, #{item.productName,jdbcType=VARCHAR}, #{item.productBrand,jdbcType=VARCHAR},
#{item.productSn,jdbcType=VARCHAR}, #{item.productPrice,jdbcType=DECIMAL}, #{item.productQuantity,jdbcType=INTEGER},
#{item.productSkuId,jdbcType=BIGINT}, #{item.productCategoryId,jdbcType=BIGINT}, #{item.productSkuCode,jdbcType=VARCHAR},
#{item.sp1,jdbcType=VARCHAR}, #{item.sp2,jdbcType=VARCHAR}, #{item.sp3,jdbcType=VARCHAR},
#{item.promotionName,jdbcType=VARCHAR},
#{item.promotionAmount,jdbcType=DECIMAL}, #{item.couponAmount,jdbcType=DECIMAL},
#{item.integrationAmount,jdbcType=DECIMAL},
#{item.realAmount,jdbcType=DECIMAL})
</foreach>
</insert>
</mapper>
\ No newline at end of file
mall-portal/src/main/resources/dao/PortalProductDao.xml
View file @
2dd5d939
...
...
@@ -50,10 +50,14 @@
p.id,
p.`name`,
p.promotion_type,
p.gift_growth,
p.gift_point,
sku.id sku_id,
sku.price sku_price,
sku.sku_code sku_sku_code,
sku.promotion_price sku_promotion_price,
sku.stock sku_stock,
sku.lock_stock sku_lock_stock,
ladder.id ladder_id,
ladder.count ladder_count,
ladder.discount ladder_discount,
...
...
mall-portal/src/main/resources/dao/SmsCouponHistoryDao.xml
View file @
2dd5d939
...
...
@@ -31,5 +31,6 @@
LEFT JOIN sms_coupon_product_relation cpr ON cpr.coupon_id = c.id
LEFT JOIN sms_coupon_product_category_relation cpcr ON cpcr.coupon_id = c.id
WHERE ch.member_id = #{memberId}
AND ch.use_status = 0
</select>
</mapper>
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment