From 2dd5d93919c423ac442d88395f5a2856f0495e6d Mon Sep 17 00:00:00 2001 From: zhh Date: Mon, 3 Sep 2018 17:12:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8B=E5=8D=95=E6=8E=A5=E5=8F=A3=E5=AE=8C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- document/pdm/mall.pdb | 492 +++++++----- document/pdm/mall.pdm | 512 +++++++----- document/sql/mall.sql | 335 +++++--- .../com/macro/mall/model/OmsCartItem.java | 22 + .../macro/mall/model/OmsCartItemExample.java | 140 ++++ .../com/macro/mall/model/OmsOrderItem.java | 189 ++++- .../macro/mall/model/OmsOrderItemExample.java | 760 +++++++++++++++--- .../macro/mall/mapper/OmsCartItemMapper.xml | 42 +- .../macro/mall/mapper/OmsOrderItemMapper.xml | 255 ++++-- .../mall/portal/dao/PortalOrderItemDao.java | 14 + .../mall/portal/domain/CartPromotionItem.java | 20 + .../macro/mall/portal/domain/OrderParam.java | 18 +- .../service/impl/OmsCartItemServiceImpl.java | 7 +- .../impl/OmsPortalOrderServiceImpl.java | 416 +++++++++- .../service/impl/OmsPromotionServiceImpl.java | 9 + .../main/resources/dao/PortalOrderItemDao.xml | 24 + .../main/resources/dao/PortalProductDao.xml | 4 + .../resources/dao/SmsCouponHistoryDao.xml | 1 + 18 files changed, 2548 insertions(+), 712 deletions(-) create mode 100644 mall-portal/src/main/java/com/macro/mall/portal/dao/PortalOrderItemDao.java create mode 100644 mall-portal/src/main/resources/dao/PortalOrderItemDao.xml diff --git a/document/pdm/mall.pdb b/document/pdm/mall.pdb index 9bafc65..72c0ca0 100644 --- a/document/pdm/mall.pdb +++ b/document/pdm/mall.pdb @@ -1,5 +1,5 @@ - + @@ -7381,9 +7381,10 @@ LABL 0 新宋体,8,N gift_growth 1527561524 zhenghong -1527561569 +1535963779 zhenghong 赠送的成长值 +0 int @@ -7392,9 +7393,10 @@ LABL 0 新宋体,8,N gift_point 1521771016 zhenghong -1521771044 +1535963789 zhenghong 赠送的积分 +0 int @@ -7979,9 +7981,10 @@ LABL 0 新宋体,8,N stock 1521709829 zhenghong -1521709932 +1535619079 zhenghong 库存 +0 int @@ -8071,9 +8074,10 @@ LABL 0 新宋体,8,N lock_stock 1534927865 zhenghong -1534927909 +1535619073 zhenghong 锁定库存 +0 int @@ -14535,7 +14539,7 @@ LABL 0 新宋体,8,N oms_order_item 1522660695 zhenghong -1522724738 +1535938269 zhenghong 订单中所包含的商品 @@ -14587,11 +14591,11 @@ LABL 0 新宋体,8,N 7BDD65C2-224E-413D-AD83-437754569B1C -proudct_pic -proudct_pic +product_pic +product_pic 1522719518 zhenghong -1522719560 +1535696089 zhenghong varchar(500) 500 @@ -14631,41 +14635,63 @@ LABL 0 新宋体,8,N A9EF8281-439D-4D05-BB45-E933E648D979 -product_amount -product_amount +product_price +product_price 1522719571 zhenghong -1522724687 +1535694206 zhenghong +销售价格 decimal(10,2) 10 2 015E8942-52BF-4342-9C4C-1230A266C1C9 -product_count -product_count +product_quantity +product_quantity 1522723168 zhenghong -1522723187 +1535694166 zhenghong 购买数量 int -AD7CAE73-04BF-4BB8-BEFA-E0A7B94BF373 -product_real_amount -product_real_amount -1522724652 +EE8FDF66-7853-4BCE-98D9-40ADC13CC78F +product_sku_id +product_sku_id +1535693972 zhenghong -1522724703 +1535694126 zhenghong -该商品经过优惠后的分解金额 -decimal(10,2) -10 -2 +商品sku编号 +bigint +B13B6661-62F2-461A-B375-7556D6DBE56D +product_sku_code +product_sku_code +1535693972 +zhenghong +1535694135 +zhenghong +商品sku条码 +varchar(50) +50 + + +6B11B4F4-2F88-4DA2-A6C6-B5563F8AB67F +product_category_id +product_category_id +1535938231 +zhenghong +1535938276 +zhenghong +商品分类id +bigint + + 51302EF8-1CD4-43F5-9C02-7920ED857D35 sp1 sp1 @@ -14677,7 +14703,7 @@ LABL 0 新宋体,8,N varchar(100) 100 - + AA056090-3D72-4BAC-A931-CD49C31B9D7E sp2 sp2 @@ -14688,7 +14714,7 @@ LABL 0 新宋体,8,N varchar(100) 100 - + C0CCCE2C-B2C8-44A1-9F6B-771BFE62D760 sp3 sp3 @@ -14699,9 +14725,73 @@ LABL 0 新宋体,8,N varchar(100) 100 + +00A626D1-90DA-4262-8FFB-874691D67C3E +promotion_name +promotion_name +1535694274 +zhenghong +1535694390 +zhenghong +商品促销名称 +varchar(200) +200 + + +FCD8E9C9-7C56-47F0-8FBB-5534EB9B8FDE +promotion_amount +promotion_amount +1535694166 +zhenghong +1535694826 +zhenghong +商品促销分解金额 +decimal(10,2) +10 +2 + + +073E4D15-F6EB-405D-9429-3A2FD362E949 +coupon_amount +coupon_amount +1535694274 +zhenghong +1535694877 +zhenghong +优惠券优惠分解金额 +decimal(10,2) +10 +2 + + +B4781397-191A-42B9-AAF7-D96E7BC3449D +integration_amount +integration_amount +1535694826 +zhenghong +1535694927 +zhenghong +积分优惠分解金额 +decimal(10,2) +10 +2 + + +AD7CAE73-04BF-4BB8-BEFA-E0A7B94BF373 +real_amount +real_amount +1522724652 +zhenghong +1535694701 +zhenghong +该商品经过优惠后的分解金额 +decimal(10,2) +10 +2 + - + 8B728C73-2ED3-4C44-8C64-95692A16EA10 Key_1 Key_1 @@ -14715,7 +14805,7 @@ LABL 0 新宋体,8,N - + @@ -14729,7 +14819,7 @@ LABL 0 新宋体,8,N 订单操作历史记录 - + 46247D13-9B17-44EB-9300-7BA49AC214FB id id @@ -14741,7 +14831,7 @@ LABL 0 新宋体,8,N 1 1 - + CBAA2797-F782-492E-89D8-B87830B4FD86 order_id order_id @@ -14752,7 +14842,7 @@ LABL 0 新宋体,8,N 订单id bigint - + B26D3031-3438-4CAB-BC93-2277F41D2F64 operate_man operate_man @@ -14764,7 +14854,7 @@ LABL 0 新宋体,8,N varchar(100) 100 - + 14B87125-FC24-4D09-982E-F43F618B6C3A create_time create_time @@ -14775,7 +14865,7 @@ LABL 0 新宋体,8,N 操作时间 datetime - + 296A8CF6-1BC8-46E1-846F-25114FF35EEB order_status order_status @@ -14787,7 +14877,7 @@ LABL 0 新宋体,8,N int(1) 1 - + 9F651D4E-088F-4735-ACAD-12ED16C49FDE note note @@ -14801,7 +14891,7 @@ LABL 0 新宋体,8,N - + 50772925-29B2-4E77-A02B-5AB8C229953C Key_1 Key_1 @@ -14810,12 +14900,12 @@ LABL 0 新宋体,8,N 1522725011 zhenghong - + - + @@ -14829,7 +14919,7 @@ LABL 0 新宋体,8,N 订单设置表 - + 03B16432-ECCE-4698-B24A-05554E64C35C id id @@ -14841,7 +14931,7 @@ LABL 0 新宋体,8,N 1 1 - + AC98E6B7-ADDF-43AD-B2F0-6CFE7715E9F1 flash_order_overtime flash_order_overtime @@ -14852,7 +14942,7 @@ LABL 0 新宋体,8,N 秒杀订单超时关闭时间(分) int - + C4E474C5-194A-4B54-8DF1-F37B681DE42B normal_order_overtime normal_order_overtime @@ -14863,7 +14953,7 @@ LABL 0 新宋体,8,N 正常订单超时时间(分) int - + 773FEFCD-F4A3-4D9E-B061-10C12CA1B397 confirm_overtime confirm_overtime @@ -14874,7 +14964,7 @@ LABL 0 新宋体,8,N 发货后自动确认收货时间(天) int - + DD5B89B8-5DC6-4EB1-B916-D76BD75CB0F5 finish_overtime finish_overtime @@ -14885,7 +14975,7 @@ LABL 0 新宋体,8,N 自动完成交易时间,不能申请售后(天) int - + D090D0ED-6A45-445C-ADE3-F1E18734F159 comment_overtime comment_overtime @@ -14898,7 +14988,7 @@ LABL 0 新宋体,8,N - + 7C2ADDA9-1584-4310-A3FE-7F1E18447823 Key_1 Key_1 @@ -14907,12 +14997,12 @@ LABL 0 新宋体,8,N 1522726101 zhenghong - + - + @@ -14926,7 +15016,7 @@ LABL 0 新宋体,8,N 订单退货申请 - + CF99B61C-D0E5-4EB4-BFC6-111A9F3D44E8 id id @@ -14938,7 +15028,7 @@ LABL 0 新宋体,8,N 1 1 - + A6E68B83-006A-468C-A461-C647705E038C order_id order_id @@ -14949,7 +15039,7 @@ LABL 0 新宋体,8,N 订单id bigint - + 8D1F23F9-09FD-416B-8E38-CFDE67721417 company_address_id company_address_id @@ -14959,7 +15049,7 @@ LABL 0 新宋体,8,N zhenghong bigint - + 56ACAE3C-5533-44A1-BA57-602058B6CEF2 order_sn order_sn @@ -14971,7 +15061,7 @@ LABL 0 新宋体,8,N varchar(64) 64 - + F2C78E24-CDB0-4AA7-B6CD-21E55B380E95 create_time create_time @@ -14981,7 +15071,7 @@ LABL 0 新宋体,8,N zhenghong datetime - + 70FBE2CF-BE0D-44DD-8679-39DAA782E1A3 member_username member_username @@ -14992,7 +15082,7 @@ LABL 0 新宋体,8,N varchar(64) 64 - + 7B8A70B3-9FC9-4136-BEC9-D2DF393DB988 return_amount return_amount @@ -15005,7 +15095,7 @@ LABL 0 新宋体,8,N 10 2 - + 4FB9898E-63E4-4B21-B577-504320D3D4F9 return_name return_name @@ -15016,7 +15106,7 @@ LABL 0 新宋体,8,N varchar(100) 100 - + 8ADCC57B-6CA5-4A89-8B5A-6283FE7B3DDF return_phone return_phone @@ -15028,7 +15118,7 @@ LABL 0 新宋体,8,N varchar(100) 100 - + F01CC8D2-508C-424D-BF17-AE42ABE28223 status status @@ -15040,7 +15130,7 @@ LABL 0 新宋体,8,N int(1) 1 - + 65402A2F-A01C-4B4D-9F19-9ACD48637159 handle_time handle_time @@ -15051,7 +15141,7 @@ LABL 0 新宋体,8,N 处理时间 datetime - + AADBD0C8-E8CD-45D6-BDF4-13840EEFA26C product_pic product_pic @@ -15062,7 +15152,7 @@ LABL 0 新宋体,8,N varchar(500) 500 - + B4BB6015-3948-411C-9558-6CAF55CEF04C product_name product_name @@ -15073,7 +15163,7 @@ LABL 0 新宋体,8,N varchar(200) 200 - + D30E609F-3F5C-401C-8690-EEA47B0E6694 brand_name brand_name @@ -15084,7 +15174,7 @@ LABL 0 新宋体,8,N varchar(200) 200 - + 86B4B2F7-9A36-47AC-A3DA-7F45FFF21639 product_attr product_attr @@ -15096,7 +15186,7 @@ LABL 0 新宋体,8,N varchar(500) 500 - + DE661909-8CDC-4C09-A0C1-5587F969523A product_count product_count @@ -15107,7 +15197,7 @@ LABL 0 新宋体,8,N 退货数量 int - + B4DB3A15-7B0F-4C6D-B961-AF2C4CF14D50 reason reason @@ -15119,7 +15209,7 @@ LABL 0 新宋体,8,N varchar(200) 200 - + ECE8A578-4D6B-47EB-BB72-207D9BC93324 description description @@ -15131,7 +15221,7 @@ LABL 0 新宋体,8,N varchar(500) 500 - + E3C2C9CF-D72D-44AA-B1A3-5B5AC1950B63 proof_pics proof_pics @@ -15143,7 +15233,7 @@ LABL 0 新宋体,8,N varchar(1000) 1000 - + 4647C7DC-D2B4-48B7-B5F3-4524FBAAD875 return_post_amount return_post_amount @@ -15156,7 +15246,7 @@ LABL 0 新宋体,8,N 10 2 - + 8361AE87-5DC4-470B-B12E-4A2EF7708701 return_post_status return_post_status @@ -15168,7 +15258,7 @@ LABL 0 新宋体,8,N int(1) 1 - + 3870169D-4A55-444E-9574-19FB829E9CB8 confirm_return_amount confirm_return_amount @@ -15181,7 +15271,7 @@ LABL 0 新宋体,8,N 10 2 - + B16F27C1-DFFA-40F1-83B5-F9DA3BB86FE6 handle_note handle_note @@ -15193,7 +15283,7 @@ LABL 0 新宋体,8,N varchar(500) 500 - + B8982C29-EB0D-4F63-A047-DDEDC91A78C3 handle_man handle_man @@ -15205,7 +15295,7 @@ LABL 0 新宋体,8,N varchar(100) 100 - + 49E217E2-31BF-4F23-8125-62D5920E0B60 receive_man receive_man @@ -15217,7 +15307,7 @@ LABL 0 新宋体,8,N varchar(100) 100 - + 8111E4F5-B8EA-4DCB-B899-A2E4921E6BC2 receive_time receive_time @@ -15227,7 +15317,7 @@ LABL 0 新宋体,8,N zhenghong datetime - + 4C802C73-FB19-4C09-84C3-37E152CA8299 receive_note receive_note @@ -15240,7 +15330,7 @@ LABL 0 新宋体,8,N - + D06B934B-B63D-4DCC-B1C1-62F79744A8AC Key_1 Key_1 @@ -15249,12 +15339,12 @@ LABL 0 新宋体,8,N 1522732939 zhenghong - + - + @@ -15268,7 +15358,7 @@ LABL 0 新宋体,8,N 公司收发货地址表 - + F5A62BE4-F0B9-46C3-8591-5864BB83220D id id @@ -15280,7 +15370,7 @@ LABL 0 新宋体,8,N 1 1 - + 359C7F83-8810-4F75-935C-8099B75676C6 address_name address_name @@ -15292,7 +15382,7 @@ LABL 0 新宋体,8,N varchar(200) 200 - + 5AA8AC8B-9617-4A6F-B898-4206F7CE8169 send_status send_status @@ -15304,7 +15394,7 @@ LABL 0 新宋体,8,N int(1) 1 - + CDF1655B-32CC-4E54-BBE7-5F00549B7722 receive_status receive_status @@ -15316,7 +15406,7 @@ LABL 0 新宋体,8,N int(1) 1 - + F5195500-8663-482B-B587-27789546188C name name @@ -15328,7 +15418,7 @@ LABL 0 新宋体,8,N varchar(64) 64 - + D51012F2-BECB-4E6B-A7E9-5B6AC06D9087 phone phone @@ -15340,7 +15430,7 @@ LABL 0 新宋体,8,N varchar(64) 64 - + 3D2DC8D4-9D56-4E95-8266-052132761CDE province province @@ -15351,7 +15441,7 @@ LABL 0 新宋体,8,N varchar(64) 64 - + 57267BF2-434D-4AEC-8E6B-DDCAA85233F7 city city @@ -15362,7 +15452,7 @@ LABL 0 新宋体,8,N varchar(64) 64 - + F1F15023-139B-4048-8D0C-C9C46884C6E9 region region @@ -15375,7 +15465,7 @@ LABL 0 新宋体,8,N - + 9B8E57D5-D022-48D7-BA87-3214D2DAB1BD Key_1 Key_1 @@ -15384,12 +15474,12 @@ LABL 0 新宋体,8,N 1522745192 zhenghong - + - + @@ -15403,7 +15493,7 @@ LABL 0 新宋体,8,N 退货原因表 - + 8398CF1C-2327-4762-B370-7F7BB681FBE8 id id @@ -15415,7 +15505,7 @@ LABL 0 新宋体,8,N 1 1 - + 7C7CCC5E-FBE6-49A6-A428-95A8A078B4EA name name @@ -15427,7 +15517,7 @@ LABL 0 新宋体,8,N varchar(100) 100 - + 0C284FC4-E892-4BFF-B0AC-AD9BCB8E39D2 sort sort @@ -15437,7 +15527,7 @@ LABL 0 新宋体,8,N zhenghong int - + D0151FA2-84E3-4252-9565-766B748B7AD3 status status @@ -15451,7 +15541,7 @@ LABL 0 新宋体,8,N - + F0009D1F-CC14-45AA-BDB7-F25CFBBFE380 Key_1 Key_1 @@ -15460,12 +15550,12 @@ LABL 0 新宋体,8,N 1533115911 zhenghong - + - + @@ -15474,12 +15564,12 @@ LABL 0 新宋体,8,N oms_cart_item 1533108597 zhenghong -1535530955 +1535696333 zhenghong 购物车表 - + 0496CCD8-F7CC-4DD4-AEE7-919D8EFCD676 id id @@ -15491,7 +15581,7 @@ LABL 0 新宋体,8,N 1 1 - + BC6AB2CA-354D-447A-A466-54980B87F57F product_id product_id @@ -15501,7 +15591,7 @@ LABL 0 新宋体,8,N zhenghong bigint - + 48241AB2-A6B4-48E5-A792-FAB72D97FD42 product_sku_id product_sku_id @@ -15511,7 +15601,7 @@ LABL 0 新宋体,8,N zhenghong bigint - + 70CEB9F6-7F7D-4AB1-BB9D-3667BA109C72 member_id member_id @@ -15521,7 +15611,7 @@ LABL 0 新宋体,8,N zhenghong bigint - + 8B8B68C0-7987-4E2B-9BAD-FF4F3428E03A quantity quantity @@ -15532,7 +15622,7 @@ LABL 0 新宋体,8,N 购买数量 int - + E2A71768-48C5-46B2-82B8-635169BFE66D price price @@ -15545,7 +15635,7 @@ LABL 0 新宋体,8,N 10 2 - + 1EB6341A-F163-4763-8A41-99BB5914189A sp1 sp1 @@ -15557,7 +15647,7 @@ LABL 0 新宋体,8,N varchar(200) 200 - + 10C79639-93BE-48F3-B2A4-98AC7C338882 sp2 sp2 @@ -15569,7 +15659,7 @@ LABL 0 新宋体,8,N varchar(200) 200 - + 629EE7D7-D006-4AB6-8EF9-0B30E4283004 sp3 sp3 @@ -15581,7 +15671,7 @@ LABL 0 新宋体,8,N varchar(200) 200 - + B5A53CF7-C87D-411B-89DF-41888E2722C7 product_pic product_pic @@ -15593,7 +15683,7 @@ LABL 0 新宋体,8,N varchar(1000) 1000 - + E1A4F06D-34AE-4B0C-BCC6-F82BA9D1A76F product_name product_name @@ -15605,7 +15695,29 @@ LABL 0 新宋体,8,N varchar(500) 500 - + +7BBD4FA7-9C75-4ECA-9E08-BBEAC572BCB1 +product_brand +product_brand +1535696251 +zhenghong +1535696298 +zhenghong +varchar(200) +200 + + +11170A56-1C61-4372-9E46-A3C9C587340E +product_sn +product_sn +1535696251 +zhenghong +1535696298 +zhenghong +varchar(200) +200 + + 2D4BFCEF-83F1-4697-8EF7-DCC5D2A9491D product_sub_title product_sub_title @@ -15617,7 +15729,7 @@ LABL 0 新宋体,8,N varchar(500) 500 - + 8A7E5878-BB5E-49F3-BE20-E6986E172BB3 product_sku_code product_sku_code @@ -15629,7 +15741,7 @@ LABL 0 新宋体,8,N varchar(200) 200 - + 23C68713-D38A-4915-96E3-A9762199D386 member_nickname member_nickname @@ -15641,7 +15753,7 @@ LABL 0 新宋体,8,N varchar(500) 500 - + 5675315C-7265-4AC3-88D4-BC1525AC73B7 create_date create_date @@ -15652,7 +15764,7 @@ LABL 0 新宋体,8,N 创建时间 datetime - + 1D877A06-39CD-4A3C-B4A8-059588D13838 modify_date modify_date @@ -15663,7 +15775,7 @@ LABL 0 新宋体,8,N 修改时间 datetime - + 20EF4C13-435F-4C03-B8A9-7E31F1432E21 delete_status delete_status @@ -15676,7 +15788,7 @@ LABL 0 新宋体,8,N int(1) 1 - + 9C9C2AC9-F58B-4D31-BEF4-1D1892931E51 product_category_id product_category_id @@ -15689,7 +15801,7 @@ LABL 0 新宋体,8,N - + 29D735B7-E618-4C13-AF03-3858C68E6BA4 Key_1 Key_1 @@ -15698,12 +15810,12 @@ LABL 0 新宋体,8,N 1533108680 zhenghong - + - + @@ -15729,7 +15841,7 @@ LABL 0 新宋体,8,N - + 5236F74C-2761-4AC4-834A-BECC5D040393 1521706257 zhenghong @@ -15765,7 +15877,7 @@ LABL 0 新宋体,8,N - + 6EE78803-E5F6-4090-B810-7BBF7814F60C 1521710488 zhenghong @@ -15801,7 +15913,7 @@ LABL 0 新宋体,8,N - + 84F722B4-DF57-4BC3-88FD-B249B70D21A7 1521770349 zhenghong @@ -15837,7 +15949,7 @@ LABL 0 新宋体,8,N - + 0309D83E-51C3-4973-A636-9FEB27F4A6B6 1521771362 zhenghong @@ -15873,7 +15985,7 @@ LABL 0 新宋体,8,N - + 7B820697-9FFD-4446-B6DF-F03F4F02FFE3 1521773101 zhenghong @@ -15909,7 +16021,7 @@ LABL 0 新宋体,8,N - + 13DDC5F6-372D-47FF-AAFA-8AEF349E7FA8 1521783613 zhenghong @@ -15945,7 +16057,7 @@ LABL 0 新宋体,8,N - + 31ADEBC6-F176-41A7-8EAA-9AC3B8A253AB 1521791466 zhenghong @@ -15981,7 +16093,7 @@ LABL 0 新宋体,8,N - + F2B169B3-7AC8-4FB1-822D-E1C91DFF6FFD 1521792428 zhenghong @@ -16017,7 +16129,7 @@ LABL 0 新宋体,8,N - + 00AD7B43-F4CA-45D7-86BB-5756B4ED55BD 1521792909 zhenghong @@ -16053,7 +16165,7 @@ LABL 0 新宋体,8,N - + 286E06C6-6FAD-4323-82D9-6FB781153C46 1522045168 zhenghong @@ -16089,7 +16201,7 @@ LABL 0 新宋体,8,N - + A2161167-D453-4661-9BF0-71D8908A6C42 1522046100 zhenghong @@ -16125,7 +16237,7 @@ LABL 0 新宋体,8,N - + E25FF0B6-41E2-4801-8FE9-337EF9B991F7 1522046451 zhenghong @@ -16161,7 +16273,7 @@ LABL 0 新宋体,8,N - + 1E64FE44-48BA-49B0-BDE1-66DA22B89EFF 1522046456 zhenghong @@ -16197,7 +16309,7 @@ LABL 0 新宋体,8,N - + DEE74089-6A6D-4D7E-BADD-76E4D08EFA2D 1522112691 zhenghong @@ -16233,7 +16345,7 @@ LABL 0 新宋体,8,N - + 5D44A212-AD69-4958-BAAF-9E16ED63FC67 1522112694 zhenghong @@ -16269,7 +16381,7 @@ LABL 0 新宋体,8,N - + ECA8F78C-7015-44EB-9CD2-F72634D7F4BD 1522114406 zhenghong @@ -16305,7 +16417,7 @@ LABL 0 新宋体,8,N - + 32BD37D4-4436-4069-9BD1-90CF0B1867E0 1522115961 zhenghong @@ -16341,7 +16453,7 @@ LABL 0 新宋体,8,N - + 1A23B754-71EE-4496-B70F-0A3268C6F651 1522115983 zhenghong @@ -16377,7 +16489,7 @@ LABL 0 新宋体,8,N - + 1C883E67-84F9-4CD0-A4F5-D7CA2BE15DC5 1522118676 zhenghong @@ -16413,7 +16525,7 @@ LABL 0 新宋体,8,N - + 1CE2FCCB-DF37-4C88-99DD-FA8C3EE7A09C 1522119056 zhenghong @@ -16449,7 +16561,7 @@ LABL 0 新宋体,8,N - + 7D8DC4F2-D0A4-4CE9-B03E-44AE166786C0 1522120295 zhenghong @@ -16485,7 +16597,7 @@ LABL 0 新宋体,8,N - + 7CB99F50-753B-4347-B896-1F18D8FE6691 1522138613 zhenghong @@ -16521,7 +16633,7 @@ LABL 0 新宋体,8,N - + EC89DA87-A575-4940-973B-665854268261 1522138618 zhenghong @@ -16557,7 +16669,7 @@ LABL 0 新宋体,8,N - + 8E1A22EC-2246-48C4-A499-3D8A4D264C09 1522138705 zhenghong @@ -16593,7 +16705,7 @@ LABL 0 新宋体,8,N - + 2EA7348D-C8E8-4FCC-8215-01FE3AD58DFB 1522141157 zhenghong @@ -16629,7 +16741,7 @@ LABL 0 新宋体,8,N - + 8B858AAC-D00A-42FE-BEDC-73536876C045 1522141232 zhenghong @@ -16665,7 +16777,7 @@ LABL 0 新宋体,8,N - + FC3A22FE-FD24-4DF0-BAC8-22659D3C8987 1522141317 zhenghong @@ -16701,7 +16813,7 @@ LABL 0 新宋体,8,N - + 14DB9C0C-F9F0-4D4A-B44E-592028F6E75A 1522142006 zhenghong @@ -16737,7 +16849,7 @@ LABL 0 新宋体,8,N - + 15304E84-71AA-40B1-84CB-904384B34B25 1522215975 zhenghong @@ -16773,7 +16885,7 @@ LABL 0 新宋体,8,N - + 457237AD-87EB-4A09-BA9F-36198B10D2FF 1522216015 zhenghong @@ -16809,7 +16921,7 @@ LABL 0 新宋体,8,N - + 3C2E5F27-A07C-4D88-9357-089D36122A25 1522216251 zhenghong @@ -16845,7 +16957,7 @@ LABL 0 新宋体,8,N - + A8FA4798-0F1E-4D96-A254-77F5D71F6BBD 1522216380 zhenghong @@ -16881,7 +16993,7 @@ LABL 0 新宋体,8,N - + 5026171A-4B51-4B83-A113-4051F1E4F415 1522220508 zhenghong @@ -16917,7 +17029,7 @@ LABL 0 新宋体,8,N - + 462222B9-A203-4D60-A353-A168356E3140 1522220546 zhenghong @@ -16953,7 +17065,7 @@ LABL 0 新宋体,8,N - + BD28F911-4F98-4C9D-9171-E99F60476E2A 1522224364 zhenghong @@ -16989,7 +17101,7 @@ LABL 0 新宋体,8,N - + 8D1675C9-7749-4831-A5E6-ACD971AACF57 1522225874 zhenghong @@ -17025,7 +17137,7 @@ LABL 0 新宋体,8,N - + B30347B3-4138-4EA8-A0F5-EF0D9A34E01F 1522226077 zhenghong @@ -17061,7 +17173,7 @@ LABL 0 新宋体,8,N - + 7D29D8DF-7EF1-4F43-928F-DDAC96A23858 1522226272 zhenghong @@ -17097,7 +17209,7 @@ LABL 0 新宋体,8,N - + EB0A7FB4-285A-4D5D-BC1D-E9B299069C1F 1522301998 zhenghong @@ -17133,7 +17245,7 @@ LABL 0 新宋体,8,N - + 942BBD31-85B8-46EA-893C-CB327C86F5BA 1522303390 zhenghong @@ -17169,7 +17281,7 @@ LABL 0 新宋体,8,N - + 1E5174EE-C0B0-4144-98D5-679634DCCAEE 1522303410 zhenghong @@ -17205,7 +17317,7 @@ LABL 0 新宋体,8,N - + BD55704C-3F36-44CC-90E1-143F097FA894 1522304178 zhenghong @@ -17241,7 +17353,7 @@ LABL 0 新宋体,8,N - + 17EC5CAA-580C-493D-9C2D-2EA3E9732A78 1522386868 zhenghong @@ -17277,7 +17389,7 @@ LABL 0 新宋体,8,N - + F469B162-D88C-42A3-B64C-7B2751A4FCE1 1522387461 zhenghong @@ -17313,7 +17425,7 @@ LABL 0 新宋体,8,N - + 1D18BF30-4375-4618-A1C9-6DC998F248E4 1522387526 zhenghong @@ -17349,7 +17461,7 @@ LABL 0 新宋体,8,N - + 183F9969-663E-4842-ABC2-C938F02C05E4 1522389232 zhenghong @@ -17385,7 +17497,7 @@ LABL 0 新宋体,8,N - + AC355266-228D-4333-8E95-D13F2D176DB4 1522390434 zhenghong @@ -17421,7 +17533,7 @@ LABL 0 新宋体,8,N - + 3A358827-AE90-4AC6-80E6-CA340D69F7F2 1522390644 zhenghong @@ -17457,7 +17569,7 @@ LABL 0 新宋体,8,N - + B0F12E0B-F2E6-40A6-AD2B-9FE858AAA8BE 1522391366 zhenghong @@ -17493,7 +17605,7 @@ LABL 0 新宋体,8,N - + F46C48A9-78A1-4C9A-BD75-DE0ED230A76D 1522391379 zhenghong @@ -17529,7 +17641,7 @@ LABL 0 新宋体,8,N - + 711AD4D5-212E-4E3B-BB26-DB79C4BE4E52 1522396648 zhenghong @@ -17565,7 +17677,7 @@ LABL 0 新宋体,8,N - + 094B7BE5-D0AB-4987-8D74-508A27D3117F 1522396864 zhenghong @@ -17601,7 +17713,7 @@ LABL 0 新宋体,8,N - + 8C15D427-62A0-40E7-9B02-84063CC6EB94 1522659209 zhenghong @@ -17637,7 +17749,7 @@ LABL 0 新宋体,8,N - + 043B7E7F-6688-42FD-BECE-3A4CE5A560F2 1522660753 zhenghong @@ -17673,7 +17785,7 @@ LABL 0 新宋体,8,N - + 3592DAA0-2C95-48CF-9359-C157A0E27DC3 1522660820 zhenghong @@ -17709,7 +17821,7 @@ LABL 0 新宋体,8,N - + BEE8D279-8DBF-40B3-899D-5B07570D0AD9 1522721755 zhenghong @@ -17745,7 +17857,7 @@ LABL 0 新宋体,8,N - + F5D0566A-35C3-4451-9C7D-782BC776C53E 1522724329 zhenghong @@ -17781,7 +17893,7 @@ LABL 0 新宋体,8,N - + 3AA8813B-9363-406A-91DF-4AD16E9C3CCA 1522725331 zhenghong @@ -17791,7 +17903,7 @@ LABL 0 新宋体,8,N - + @@ -17817,7 +17929,7 @@ LABL 0 新宋体,8,N - + DD05624A-7E08-4273-9758-C5EDA1A03134 1522733188 zhenghong @@ -17827,7 +17939,7 @@ LABL 0 新宋体,8,N - + @@ -17850,20 +17962,20 @@ LABL 0 新宋体,8,N - + - + EBF8A4B9-24B3-4D18-82FD-D12F847328C6 1522745521 zhenghong 1522745521 zhenghong - + - + @@ -17889,7 +18001,7 @@ LABL 0 新宋体,8,N - + BA7665F0-D173-45C6-AFE8-3C93CF330D79 1533109970 zhenghong @@ -17899,7 +18011,7 @@ LABL 0 新宋体,8,N - + @@ -17925,7 +18037,7 @@ LABL 0 新宋体,8,N - + 521484A5-B9C4-477D-8D45-97F7B15D7854 1533115829 zhenghong @@ -17935,7 +18047,7 @@ LABL 0 新宋体,8,N - + @@ -17961,7 +18073,7 @@ LABL 0 新宋体,8,N - + FCADB7B3-0636-44C7-8AB4-067148971867 1533115896 zhenghong @@ -17971,14 +18083,14 @@ LABL 0 新宋体,8,N - + - + 48492A0F-63AD-4453-B46B-89915CC87545 PUBLIC PUBLIC @@ -17989,7 +18101,7 @@ LABL 0 新宋体,8,N - + 232AA7B8-E743-48F3-9530-102684B229BE MySQL 5.0 MYSQL50 diff --git a/document/pdm/mall.pdm b/document/pdm/mall.pdm index 4ebefb1..b3ababf 100644 --- a/document/pdm/mall.pdm +++ b/document/pdm/mall.pdm @@ -1,5 +1,5 @@ - + @@ -7381,9 +7381,10 @@ LABL 0 新宋体,8,N gift_growth 1527561524 zhenghong -1527561569 +1535963779 zhenghong 赠送的成长值 +0 int @@ -7392,9 +7393,10 @@ LABL 0 新宋体,8,N gift_point 1521771016 zhenghong -1521771044 +1535963789 zhenghong 赠送的积分 +0 int @@ -14537,7 +14539,7 @@ LABL 0 新宋体,8,N oms_order_item 1522660695 zhenghong -1522724738 +1535964259 zhenghong 订单中所包含的商品 @@ -14589,11 +14591,11 @@ LABL 0 新宋体,8,N 7BDD65C2-224E-413D-AD83-437754569B1C -proudct_pic -proudct_pic +product_pic +product_pic 1522719518 zhenghong -1522719560 +1535696089 zhenghong varchar(500) 500 @@ -14633,41 +14635,63 @@ LABL 0 新宋体,8,N A9EF8281-439D-4D05-BB45-E933E648D979 -product_amount -product_amount +product_price +product_price 1522719571 zhenghong -1522724687 +1535694206 zhenghong +销售价格 decimal(10,2) 10 2 015E8942-52BF-4342-9C4C-1230A266C1C9 -product_count -product_count +product_quantity +product_quantity 1522723168 zhenghong -1522723187 +1535694166 zhenghong 购买数量 int -AD7CAE73-04BF-4BB8-BEFA-E0A7B94BF373 -product_real_amount -product_real_amount -1522724652 +EE8FDF66-7853-4BCE-98D9-40ADC13CC78F +product_sku_id +product_sku_id +1535693972 zhenghong -1522724703 +1535694126 zhenghong -该商品经过优惠后的分解金额 -decimal(10,2) -10 -2 +商品sku编号 +bigint +B13B6661-62F2-461A-B375-7556D6DBE56D +product_sku_code +product_sku_code +1535693972 +zhenghong +1535694135 +zhenghong +商品sku条码 +varchar(50) +50 + + +6B11B4F4-2F88-4DA2-A6C6-B5563F8AB67F +product_category_id +product_category_id +1535938231 +zhenghong +1535938276 +zhenghong +商品分类id +bigint + + 51302EF8-1CD4-43F5-9C02-7920ED857D35 sp1 sp1 @@ -14679,7 +14703,7 @@ LABL 0 新宋体,8,N varchar(100) 100 - + AA056090-3D72-4BAC-A931-CD49C31B9D7E sp2 sp2 @@ -14690,7 +14714,7 @@ LABL 0 新宋体,8,N varchar(100) 100 - + C0CCCE2C-B2C8-44A1-9F6B-771BFE62D760 sp3 sp3 @@ -14701,9 +14725,99 @@ LABL 0 新宋体,8,N varchar(100) 100 + +00A626D1-90DA-4262-8FFB-874691D67C3E +promotion_name +promotion_name +1535694274 +zhenghong +1535694390 +zhenghong +商品促销名称 +varchar(200) +200 + + +FCD8E9C9-7C56-47F0-8FBB-5534EB9B8FDE +promotion_amount +promotion_amount +1535694166 +zhenghong +1535694826 +zhenghong +商品促销分解金额 +decimal(10,2) +10 +2 + + +073E4D15-F6EB-405D-9429-3A2FD362E949 +coupon_amount +coupon_amount +1535694274 +zhenghong +1535694877 +zhenghong +优惠券优惠分解金额 +decimal(10,2) +10 +2 + + +B4781397-191A-42B9-AAF7-D96E7BC3449D +integration_amount +integration_amount +1535694826 +zhenghong +1535694927 +zhenghong +积分优惠分解金额 +decimal(10,2) +10 +2 + + +AD7CAE73-04BF-4BB8-BEFA-E0A7B94BF373 +real_amount +real_amount +1522724652 +zhenghong +1535694701 +zhenghong +该商品经过优惠后的分解金额 +decimal(10,2) +10 +2 + + +3FBC2AE3-3000-41C7-B78C-DB7AC7ABDC16 +gift_integration +gift_integration +1535964164 +zhenghong +1535964238 +zhenghong +商品赠送积分 +0 +int +1 + + +C7705A4E-64E8-44A3-B3BE-7A8762E73CFD +gift_growth +gift_growth +1535964164 +zhenghong +1535964251 +zhenghong +商品赠送成长值 +0 +int +1 + - + 8B728C73-2ED3-4C44-8C64-95692A16EA10 Key_1 Key_1 @@ -14717,7 +14831,7 @@ LABL 0 新宋体,8,N - + @@ -14731,7 +14845,7 @@ LABL 0 新宋体,8,N 订单操作历史记录 - + 46247D13-9B17-44EB-9300-7BA49AC214FB id id @@ -14743,7 +14857,7 @@ LABL 0 新宋体,8,N 1 1 - + CBAA2797-F782-492E-89D8-B87830B4FD86 order_id order_id @@ -14754,7 +14868,7 @@ LABL 0 新宋体,8,N 订单id bigint - + B26D3031-3438-4CAB-BC93-2277F41D2F64 operate_man operate_man @@ -14766,7 +14880,7 @@ LABL 0 新宋体,8,N varchar(100) 100 - + 14B87125-FC24-4D09-982E-F43F618B6C3A create_time create_time @@ -14777,7 +14891,7 @@ LABL 0 新宋体,8,N 操作时间 datetime - + 296A8CF6-1BC8-46E1-846F-25114FF35EEB order_status order_status @@ -14789,7 +14903,7 @@ LABL 0 新宋体,8,N int(1) 1 - + 9F651D4E-088F-4735-ACAD-12ED16C49FDE note note @@ -14803,7 +14917,7 @@ LABL 0 新宋体,8,N - + 50772925-29B2-4E77-A02B-5AB8C229953C Key_1 Key_1 @@ -14812,12 +14926,12 @@ LABL 0 新宋体,8,N 1522725011 zhenghong - + - + @@ -14831,7 +14945,7 @@ LABL 0 新宋体,8,N 订单设置表 - + 03B16432-ECCE-4698-B24A-05554E64C35C id id @@ -14843,7 +14957,7 @@ LABL 0 新宋体,8,N 1 1 - + AC98E6B7-ADDF-43AD-B2F0-6CFE7715E9F1 flash_order_overtime flash_order_overtime @@ -14854,7 +14968,7 @@ LABL 0 新宋体,8,N 秒杀订单超时关闭时间(分) int - + C4E474C5-194A-4B54-8DF1-F37B681DE42B normal_order_overtime normal_order_overtime @@ -14865,7 +14979,7 @@ LABL 0 新宋体,8,N 正常订单超时时间(分) int - + 773FEFCD-F4A3-4D9E-B061-10C12CA1B397 confirm_overtime confirm_overtime @@ -14876,7 +14990,7 @@ LABL 0 新宋体,8,N 发货后自动确认收货时间(天) int - + DD5B89B8-5DC6-4EB1-B916-D76BD75CB0F5 finish_overtime finish_overtime @@ -14887,7 +15001,7 @@ LABL 0 新宋体,8,N 自动完成交易时间,不能申请售后(天) int - + D090D0ED-6A45-445C-ADE3-F1E18734F159 comment_overtime comment_overtime @@ -14900,7 +15014,7 @@ LABL 0 新宋体,8,N - + 7C2ADDA9-1584-4310-A3FE-7F1E18447823 Key_1 Key_1 @@ -14909,12 +15023,12 @@ LABL 0 新宋体,8,N 1522726101 zhenghong - + - + @@ -14928,7 +15042,7 @@ LABL 0 新宋体,8,N 订单退货申请 - + CF99B61C-D0E5-4EB4-BFC6-111A9F3D44E8 id id @@ -14940,7 +15054,7 @@ LABL 0 新宋体,8,N 1 1 - + A6E68B83-006A-468C-A461-C647705E038C order_id order_id @@ -14951,7 +15065,7 @@ LABL 0 新宋体,8,N 订单id bigint - + 8D1F23F9-09FD-416B-8E38-CFDE67721417 company_address_id company_address_id @@ -14961,7 +15075,7 @@ LABL 0 新宋体,8,N zhenghong bigint - + 56ACAE3C-5533-44A1-BA57-602058B6CEF2 order_sn order_sn @@ -14973,7 +15087,7 @@ LABL 0 新宋体,8,N varchar(64) 64 - + F2C78E24-CDB0-4AA7-B6CD-21E55B380E95 create_time create_time @@ -14983,7 +15097,7 @@ LABL 0 新宋体,8,N zhenghong datetime - + 70FBE2CF-BE0D-44DD-8679-39DAA782E1A3 member_username member_username @@ -14994,7 +15108,7 @@ LABL 0 新宋体,8,N varchar(64) 64 - + 7B8A70B3-9FC9-4136-BEC9-D2DF393DB988 return_amount return_amount @@ -15007,7 +15121,7 @@ LABL 0 新宋体,8,N 10 2 - + 4FB9898E-63E4-4B21-B577-504320D3D4F9 return_name return_name @@ -15018,7 +15132,7 @@ LABL 0 新宋体,8,N varchar(100) 100 - + 8ADCC57B-6CA5-4A89-8B5A-6283FE7B3DDF return_phone return_phone @@ -15030,7 +15144,7 @@ LABL 0 新宋体,8,N varchar(100) 100 - + F01CC8D2-508C-424D-BF17-AE42ABE28223 status status @@ -15042,7 +15156,7 @@ LABL 0 新宋体,8,N int(1) 1 - + 65402A2F-A01C-4B4D-9F19-9ACD48637159 handle_time handle_time @@ -15053,7 +15167,7 @@ LABL 0 新宋体,8,N 处理时间 datetime - + AADBD0C8-E8CD-45D6-BDF4-13840EEFA26C product_pic product_pic @@ -15064,7 +15178,7 @@ LABL 0 新宋体,8,N varchar(500) 500 - + B4BB6015-3948-411C-9558-6CAF55CEF04C product_name product_name @@ -15075,7 +15189,7 @@ LABL 0 新宋体,8,N varchar(200) 200 - + D30E609F-3F5C-401C-8690-EEA47B0E6694 brand_name brand_name @@ -15086,7 +15200,7 @@ LABL 0 新宋体,8,N varchar(200) 200 - + 86B4B2F7-9A36-47AC-A3DA-7F45FFF21639 product_attr product_attr @@ -15098,7 +15212,7 @@ LABL 0 新宋体,8,N varchar(500) 500 - + DE661909-8CDC-4C09-A0C1-5587F969523A product_count product_count @@ -15109,7 +15223,7 @@ LABL 0 新宋体,8,N 退货数量 int - + B4DB3A15-7B0F-4C6D-B961-AF2C4CF14D50 reason reason @@ -15121,7 +15235,7 @@ LABL 0 新宋体,8,N varchar(200) 200 - + ECE8A578-4D6B-47EB-BB72-207D9BC93324 description description @@ -15133,7 +15247,7 @@ LABL 0 新宋体,8,N varchar(500) 500 - + E3C2C9CF-D72D-44AA-B1A3-5B5AC1950B63 proof_pics proof_pics @@ -15145,7 +15259,7 @@ LABL 0 新宋体,8,N varchar(1000) 1000 - + 4647C7DC-D2B4-48B7-B5F3-4524FBAAD875 return_post_amount return_post_amount @@ -15158,7 +15272,7 @@ LABL 0 新宋体,8,N 10 2 - + 8361AE87-5DC4-470B-B12E-4A2EF7708701 return_post_status return_post_status @@ -15170,7 +15284,7 @@ LABL 0 新宋体,8,N int(1) 1 - + 3870169D-4A55-444E-9574-19FB829E9CB8 confirm_return_amount confirm_return_amount @@ -15183,7 +15297,7 @@ LABL 0 新宋体,8,N 10 2 - + B16F27C1-DFFA-40F1-83B5-F9DA3BB86FE6 handle_note handle_note @@ -15195,7 +15309,7 @@ LABL 0 新宋体,8,N varchar(500) 500 - + B8982C29-EB0D-4F63-A047-DDEDC91A78C3 handle_man handle_man @@ -15207,7 +15321,7 @@ LABL 0 新宋体,8,N varchar(100) 100 - + 49E217E2-31BF-4F23-8125-62D5920E0B60 receive_man receive_man @@ -15219,7 +15333,7 @@ LABL 0 新宋体,8,N varchar(100) 100 - + 8111E4F5-B8EA-4DCB-B899-A2E4921E6BC2 receive_time receive_time @@ -15229,7 +15343,7 @@ LABL 0 新宋体,8,N zhenghong datetime - + 4C802C73-FB19-4C09-84C3-37E152CA8299 receive_note receive_note @@ -15242,7 +15356,7 @@ LABL 0 新宋体,8,N - + D06B934B-B63D-4DCC-B1C1-62F79744A8AC Key_1 Key_1 @@ -15251,12 +15365,12 @@ LABL 0 新宋体,8,N 1522732939 zhenghong - + - + @@ -15270,7 +15384,7 @@ LABL 0 新宋体,8,N 公司收发货地址表 - + F5A62BE4-F0B9-46C3-8591-5864BB83220D id id @@ -15282,7 +15396,7 @@ LABL 0 新宋体,8,N 1 1 - + 359C7F83-8810-4F75-935C-8099B75676C6 address_name address_name @@ -15294,7 +15408,7 @@ LABL 0 新宋体,8,N varchar(200) 200 - + 5AA8AC8B-9617-4A6F-B898-4206F7CE8169 send_status send_status @@ -15306,7 +15420,7 @@ LABL 0 新宋体,8,N int(1) 1 - + CDF1655B-32CC-4E54-BBE7-5F00549B7722 receive_status receive_status @@ -15318,7 +15432,7 @@ LABL 0 新宋体,8,N int(1) 1 - + F5195500-8663-482B-B587-27789546188C name name @@ -15330,7 +15444,7 @@ LABL 0 新宋体,8,N varchar(64) 64 - + D51012F2-BECB-4E6B-A7E9-5B6AC06D9087 phone phone @@ -15342,7 +15456,7 @@ LABL 0 新宋体,8,N varchar(64) 64 - + 3D2DC8D4-9D56-4E95-8266-052132761CDE province province @@ -15353,7 +15467,7 @@ LABL 0 新宋体,8,N varchar(64) 64 - + 57267BF2-434D-4AEC-8E6B-DDCAA85233F7 city city @@ -15364,7 +15478,7 @@ LABL 0 新宋体,8,N varchar(64) 64 - + F1F15023-139B-4048-8D0C-C9C46884C6E9 region region @@ -15377,7 +15491,7 @@ LABL 0 新宋体,8,N - + 9B8E57D5-D022-48D7-BA87-3214D2DAB1BD Key_1 Key_1 @@ -15386,12 +15500,12 @@ LABL 0 新宋体,8,N 1522745192 zhenghong - + - + @@ -15405,7 +15519,7 @@ LABL 0 新宋体,8,N 退货原因表 - + 8398CF1C-2327-4762-B370-7F7BB681FBE8 id id @@ -15417,7 +15531,7 @@ LABL 0 新宋体,8,N 1 1 - + 7C7CCC5E-FBE6-49A6-A428-95A8A078B4EA name name @@ -15429,7 +15543,7 @@ LABL 0 新宋体,8,N varchar(100) 100 - + 0C284FC4-E892-4BFF-B0AC-AD9BCB8E39D2 sort sort @@ -15439,7 +15553,7 @@ LABL 0 新宋体,8,N zhenghong int - + D0151FA2-84E3-4252-9565-766B748B7AD3 status status @@ -15453,7 +15567,7 @@ LABL 0 新宋体,8,N - + F0009D1F-CC14-45AA-BDB7-F25CFBBFE380 Key_1 Key_1 @@ -15462,12 +15576,12 @@ LABL 0 新宋体,8,N 1533115911 zhenghong - + - + @@ -15476,12 +15590,12 @@ LABL 0 新宋体,8,N oms_cart_item 1533108597 zhenghong -1535530955 +1535696333 zhenghong 购物车表 - + 0496CCD8-F7CC-4DD4-AEE7-919D8EFCD676 id id @@ -15493,7 +15607,7 @@ LABL 0 新宋体,8,N 1 1 - + BC6AB2CA-354D-447A-A466-54980B87F57F product_id product_id @@ -15503,7 +15617,7 @@ LABL 0 新宋体,8,N zhenghong bigint - + 48241AB2-A6B4-48E5-A792-FAB72D97FD42 product_sku_id product_sku_id @@ -15513,7 +15627,7 @@ LABL 0 新宋体,8,N zhenghong bigint - + 70CEB9F6-7F7D-4AB1-BB9D-3667BA109C72 member_id member_id @@ -15523,7 +15637,7 @@ LABL 0 新宋体,8,N zhenghong bigint - + 8B8B68C0-7987-4E2B-9BAD-FF4F3428E03A quantity quantity @@ -15534,7 +15648,7 @@ LABL 0 新宋体,8,N 购买数量 int - + E2A71768-48C5-46B2-82B8-635169BFE66D price price @@ -15547,7 +15661,7 @@ LABL 0 新宋体,8,N 10 2 - + 1EB6341A-F163-4763-8A41-99BB5914189A sp1 sp1 @@ -15559,7 +15673,7 @@ LABL 0 新宋体,8,N varchar(200) 200 - + 10C79639-93BE-48F3-B2A4-98AC7C338882 sp2 sp2 @@ -15571,7 +15685,7 @@ LABL 0 新宋体,8,N varchar(200) 200 - + 629EE7D7-D006-4AB6-8EF9-0B30E4283004 sp3 sp3 @@ -15583,7 +15697,7 @@ LABL 0 新宋体,8,N varchar(200) 200 - + B5A53CF7-C87D-411B-89DF-41888E2722C7 product_pic product_pic @@ -15595,7 +15709,7 @@ LABL 0 新宋体,8,N varchar(1000) 1000 - + E1A4F06D-34AE-4B0C-BCC6-F82BA9D1A76F product_name product_name @@ -15607,7 +15721,29 @@ LABL 0 新宋体,8,N varchar(500) 500 - + +7BBD4FA7-9C75-4ECA-9E08-BBEAC572BCB1 +product_brand +product_brand +1535696251 +zhenghong +1535696298 +zhenghong +varchar(200) +200 + + +11170A56-1C61-4372-9E46-A3C9C587340E +product_sn +product_sn +1535696251 +zhenghong +1535696298 +zhenghong +varchar(200) +200 + + 2D4BFCEF-83F1-4697-8EF7-DCC5D2A9491D product_sub_title product_sub_title @@ -15619,7 +15755,7 @@ LABL 0 新宋体,8,N varchar(500) 500 - + 8A7E5878-BB5E-49F3-BE20-E6986E172BB3 product_sku_code product_sku_code @@ -15631,7 +15767,7 @@ LABL 0 新宋体,8,N varchar(200) 200 - + 23C68713-D38A-4915-96E3-A9762199D386 member_nickname member_nickname @@ -15643,7 +15779,7 @@ LABL 0 新宋体,8,N varchar(500) 500 - + 5675315C-7265-4AC3-88D4-BC1525AC73B7 create_date create_date @@ -15654,7 +15790,7 @@ LABL 0 新宋体,8,N 创建时间 datetime - + 1D877A06-39CD-4A3C-B4A8-059588D13838 modify_date modify_date @@ -15665,7 +15801,7 @@ LABL 0 新宋体,8,N 修改时间 datetime - + 20EF4C13-435F-4C03-B8A9-7E31F1432E21 delete_status delete_status @@ -15678,7 +15814,7 @@ LABL 0 新宋体,8,N int(1) 1 - + 9C9C2AC9-F58B-4D31-BEF4-1D1892931E51 product_category_id product_category_id @@ -15691,7 +15827,7 @@ LABL 0 新宋体,8,N - + 29D735B7-E618-4C13-AF03-3858C68E6BA4 Key_1 Key_1 @@ -15700,12 +15836,12 @@ LABL 0 新宋体,8,N 1533108680 zhenghong - + - + @@ -15731,7 +15867,7 @@ LABL 0 新宋体,8,N - + 5236F74C-2761-4AC4-834A-BECC5D040393 1521706257 zhenghong @@ -15767,7 +15903,7 @@ LABL 0 新宋体,8,N - + 6EE78803-E5F6-4090-B810-7BBF7814F60C 1521710488 zhenghong @@ -15803,7 +15939,7 @@ LABL 0 新宋体,8,N - + 84F722B4-DF57-4BC3-88FD-B249B70D21A7 1521770349 zhenghong @@ -15839,7 +15975,7 @@ LABL 0 新宋体,8,N - + 0309D83E-51C3-4973-A636-9FEB27F4A6B6 1521771362 zhenghong @@ -15875,7 +16011,7 @@ LABL 0 新宋体,8,N - + 7B820697-9FFD-4446-B6DF-F03F4F02FFE3 1521773101 zhenghong @@ -15911,7 +16047,7 @@ LABL 0 新宋体,8,N - + 13DDC5F6-372D-47FF-AAFA-8AEF349E7FA8 1521783613 zhenghong @@ -15947,7 +16083,7 @@ LABL 0 新宋体,8,N - + 31ADEBC6-F176-41A7-8EAA-9AC3B8A253AB 1521791466 zhenghong @@ -15983,7 +16119,7 @@ LABL 0 新宋体,8,N - + F2B169B3-7AC8-4FB1-822D-E1C91DFF6FFD 1521792428 zhenghong @@ -16019,7 +16155,7 @@ LABL 0 新宋体,8,N - + 00AD7B43-F4CA-45D7-86BB-5756B4ED55BD 1521792909 zhenghong @@ -16055,7 +16191,7 @@ LABL 0 新宋体,8,N - + 286E06C6-6FAD-4323-82D9-6FB781153C46 1522045168 zhenghong @@ -16091,7 +16227,7 @@ LABL 0 新宋体,8,N - + A2161167-D453-4661-9BF0-71D8908A6C42 1522046100 zhenghong @@ -16127,7 +16263,7 @@ LABL 0 新宋体,8,N - + E25FF0B6-41E2-4801-8FE9-337EF9B991F7 1522046451 zhenghong @@ -16163,7 +16299,7 @@ LABL 0 新宋体,8,N - + 1E64FE44-48BA-49B0-BDE1-66DA22B89EFF 1522046456 zhenghong @@ -16199,7 +16335,7 @@ LABL 0 新宋体,8,N - + DEE74089-6A6D-4D7E-BADD-76E4D08EFA2D 1522112691 zhenghong @@ -16235,7 +16371,7 @@ LABL 0 新宋体,8,N - + 5D44A212-AD69-4958-BAAF-9E16ED63FC67 1522112694 zhenghong @@ -16271,7 +16407,7 @@ LABL 0 新宋体,8,N - + ECA8F78C-7015-44EB-9CD2-F72634D7F4BD 1522114406 zhenghong @@ -16307,7 +16443,7 @@ LABL 0 新宋体,8,N - + 32BD37D4-4436-4069-9BD1-90CF0B1867E0 1522115961 zhenghong @@ -16343,7 +16479,7 @@ LABL 0 新宋体,8,N - + 1A23B754-71EE-4496-B70F-0A3268C6F651 1522115983 zhenghong @@ -16379,7 +16515,7 @@ LABL 0 新宋体,8,N - + 1C883E67-84F9-4CD0-A4F5-D7CA2BE15DC5 1522118676 zhenghong @@ -16415,7 +16551,7 @@ LABL 0 新宋体,8,N - + 1CE2FCCB-DF37-4C88-99DD-FA8C3EE7A09C 1522119056 zhenghong @@ -16451,7 +16587,7 @@ LABL 0 新宋体,8,N - + 7D8DC4F2-D0A4-4CE9-B03E-44AE166786C0 1522120295 zhenghong @@ -16487,7 +16623,7 @@ LABL 0 新宋体,8,N - + 7CB99F50-753B-4347-B896-1F18D8FE6691 1522138613 zhenghong @@ -16523,7 +16659,7 @@ LABL 0 新宋体,8,N - + EC89DA87-A575-4940-973B-665854268261 1522138618 zhenghong @@ -16559,7 +16695,7 @@ LABL 0 新宋体,8,N - + 8E1A22EC-2246-48C4-A499-3D8A4D264C09 1522138705 zhenghong @@ -16595,7 +16731,7 @@ LABL 0 新宋体,8,N - + 2EA7348D-C8E8-4FCC-8215-01FE3AD58DFB 1522141157 zhenghong @@ -16631,7 +16767,7 @@ LABL 0 新宋体,8,N - + 8B858AAC-D00A-42FE-BEDC-73536876C045 1522141232 zhenghong @@ -16667,7 +16803,7 @@ LABL 0 新宋体,8,N - + FC3A22FE-FD24-4DF0-BAC8-22659D3C8987 1522141317 zhenghong @@ -16703,7 +16839,7 @@ LABL 0 新宋体,8,N - + 14DB9C0C-F9F0-4D4A-B44E-592028F6E75A 1522142006 zhenghong @@ -16739,7 +16875,7 @@ LABL 0 新宋体,8,N - + 15304E84-71AA-40B1-84CB-904384B34B25 1522215975 zhenghong @@ -16775,7 +16911,7 @@ LABL 0 新宋体,8,N - + 457237AD-87EB-4A09-BA9F-36198B10D2FF 1522216015 zhenghong @@ -16811,7 +16947,7 @@ LABL 0 新宋体,8,N - + 3C2E5F27-A07C-4D88-9357-089D36122A25 1522216251 zhenghong @@ -16847,7 +16983,7 @@ LABL 0 新宋体,8,N - + A8FA4798-0F1E-4D96-A254-77F5D71F6BBD 1522216380 zhenghong @@ -16883,7 +17019,7 @@ LABL 0 新宋体,8,N - + 5026171A-4B51-4B83-A113-4051F1E4F415 1522220508 zhenghong @@ -16919,7 +17055,7 @@ LABL 0 新宋体,8,N - + 462222B9-A203-4D60-A353-A168356E3140 1522220546 zhenghong @@ -16955,7 +17091,7 @@ LABL 0 新宋体,8,N - + BD28F911-4F98-4C9D-9171-E99F60476E2A 1522224364 zhenghong @@ -16991,7 +17127,7 @@ LABL 0 新宋体,8,N - + 8D1675C9-7749-4831-A5E6-ACD971AACF57 1522225874 zhenghong @@ -17027,7 +17163,7 @@ LABL 0 新宋体,8,N - + B30347B3-4138-4EA8-A0F5-EF0D9A34E01F 1522226077 zhenghong @@ -17063,7 +17199,7 @@ LABL 0 新宋体,8,N - + 7D29D8DF-7EF1-4F43-928F-DDAC96A23858 1522226272 zhenghong @@ -17099,7 +17235,7 @@ LABL 0 新宋体,8,N - + EB0A7FB4-285A-4D5D-BC1D-E9B299069C1F 1522301998 zhenghong @@ -17135,7 +17271,7 @@ LABL 0 新宋体,8,N - + 942BBD31-85B8-46EA-893C-CB327C86F5BA 1522303390 zhenghong @@ -17171,7 +17307,7 @@ LABL 0 新宋体,8,N - + 1E5174EE-C0B0-4144-98D5-679634DCCAEE 1522303410 zhenghong @@ -17207,7 +17343,7 @@ LABL 0 新宋体,8,N - + BD55704C-3F36-44CC-90E1-143F097FA894 1522304178 zhenghong @@ -17243,7 +17379,7 @@ LABL 0 新宋体,8,N - + 17EC5CAA-580C-493D-9C2D-2EA3E9732A78 1522386868 zhenghong @@ -17279,7 +17415,7 @@ LABL 0 新宋体,8,N - + F469B162-D88C-42A3-B64C-7B2751A4FCE1 1522387461 zhenghong @@ -17315,7 +17451,7 @@ LABL 0 新宋体,8,N - + 1D18BF30-4375-4618-A1C9-6DC998F248E4 1522387526 zhenghong @@ -17351,7 +17487,7 @@ LABL 0 新宋体,8,N - + 183F9969-663E-4842-ABC2-C938F02C05E4 1522389232 zhenghong @@ -17387,7 +17523,7 @@ LABL 0 新宋体,8,N - + AC355266-228D-4333-8E95-D13F2D176DB4 1522390434 zhenghong @@ -17423,7 +17559,7 @@ LABL 0 新宋体,8,N - + 3A358827-AE90-4AC6-80E6-CA340D69F7F2 1522390644 zhenghong @@ -17459,7 +17595,7 @@ LABL 0 新宋体,8,N - + B0F12E0B-F2E6-40A6-AD2B-9FE858AAA8BE 1522391366 zhenghong @@ -17495,7 +17631,7 @@ LABL 0 新宋体,8,N - + F46C48A9-78A1-4C9A-BD75-DE0ED230A76D 1522391379 zhenghong @@ -17531,7 +17667,7 @@ LABL 0 新宋体,8,N - + 711AD4D5-212E-4E3B-BB26-DB79C4BE4E52 1522396648 zhenghong @@ -17567,7 +17703,7 @@ LABL 0 新宋体,8,N - + 094B7BE5-D0AB-4987-8D74-508A27D3117F 1522396864 zhenghong @@ -17603,7 +17739,7 @@ LABL 0 新宋体,8,N - + 8C15D427-62A0-40E7-9B02-84063CC6EB94 1522659209 zhenghong @@ -17639,7 +17775,7 @@ LABL 0 新宋体,8,N - + 043B7E7F-6688-42FD-BECE-3A4CE5A560F2 1522660753 zhenghong @@ -17675,7 +17811,7 @@ LABL 0 新宋体,8,N - + 3592DAA0-2C95-48CF-9359-C157A0E27DC3 1522660820 zhenghong @@ -17711,7 +17847,7 @@ LABL 0 新宋体,8,N - + BEE8D279-8DBF-40B3-899D-5B07570D0AD9 1522721755 zhenghong @@ -17747,7 +17883,7 @@ LABL 0 新宋体,8,N - + F5D0566A-35C3-4451-9C7D-782BC776C53E 1522724329 zhenghong @@ -17783,7 +17919,7 @@ LABL 0 新宋体,8,N - + 3AA8813B-9363-406A-91DF-4AD16E9C3CCA 1522725331 zhenghong @@ -17793,7 +17929,7 @@ LABL 0 新宋体,8,N - + @@ -17819,7 +17955,7 @@ LABL 0 新宋体,8,N - + DD05624A-7E08-4273-9758-C5EDA1A03134 1522733188 zhenghong @@ -17829,7 +17965,7 @@ LABL 0 新宋体,8,N - + @@ -17852,20 +17988,20 @@ LABL 0 新宋体,8,N - + - + EBF8A4B9-24B3-4D18-82FD-D12F847328C6 1522745521 zhenghong 1522745521 zhenghong - + - + @@ -17891,7 +18027,7 @@ LABL 0 新宋体,8,N - + BA7665F0-D173-45C6-AFE8-3C93CF330D79 1533109970 zhenghong @@ -17901,7 +18037,7 @@ LABL 0 新宋体,8,N - + @@ -17927,7 +18063,7 @@ LABL 0 新宋体,8,N - + 521484A5-B9C4-477D-8D45-97F7B15D7854 1533115829 zhenghong @@ -17937,7 +18073,7 @@ LABL 0 新宋体,8,N - + @@ -17963,7 +18099,7 @@ LABL 0 新宋体,8,N - + FCADB7B3-0636-44C7-8AB4-067148971867 1533115896 zhenghong @@ -17973,14 +18109,14 @@ LABL 0 新宋体,8,N - + - + 48492A0F-63AD-4453-B46B-89915CC87545 PUBLIC PUBLIC @@ -17991,7 +18127,7 @@ LABL 0 新宋体,8,N - + 232AA7B8-E743-48F3-9530-102684B229BE MySQL 5.0 MYSQL50 diff --git a/document/sql/mall.sql b/document/sql/mall.sql index 043aed7..3fa86d0 100644 --- a/document/sql/mall.sql +++ b/document/sql/mall.sql @@ -10,7 +10,7 @@ Target Server Type : MYSQL Target Server Version : 50719 File Encoding : 65001 -Date: 2018-08-20 13:53:09 +Date: 2018-09-03 17:10:32 */ SET FOREIGN_KEY_CHECKS=0; @@ -198,7 +198,7 @@ CREATE TABLE `cms_subject_product_relation` ( `subject_id` bigint(20) DEFAULT NULL, `product_id` bigint(20) DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8 COMMENT='专题商品关系表'; +) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8 COMMENT='专题商品关系表'; -- ---------------------------- -- Records of cms_subject_product_relation @@ -213,9 +213,9 @@ INSERT INTO `cms_subject_product_relation` VALUES ('7', '1', '22'); INSERT INTO `cms_subject_product_relation` VALUES ('29', '1', '23'); INSERT INTO `cms_subject_product_relation` VALUES ('30', '4', '23'); INSERT INTO `cms_subject_product_relation` VALUES ('31', '5', '23'); -INSERT INTO `cms_subject_product_relation` VALUES ('35', '2', '26'); -INSERT INTO `cms_subject_product_relation` VALUES ('36', '3', '26'); -INSERT INTO `cms_subject_product_relation` VALUES ('37', '6', '26'); +INSERT INTO `cms_subject_product_relation` VALUES ('38', '2', '26'); +INSERT INTO `cms_subject_product_relation` VALUES ('39', '3', '26'); +INSERT INTO `cms_subject_product_relation` VALUES ('40', '6', '26'); -- ---------------------------- -- Table structure for cms_topic @@ -300,18 +300,20 @@ CREATE TABLE `oms_cart_item` ( `create_date` datetime DEFAULT NULL COMMENT '创建时间', `modify_date` datetime DEFAULT NULL COMMENT '修改时间', `delete_status` int(1) DEFAULT '0' COMMENT '是否删除', + `product_category_id` bigint(20) DEFAULT NULL COMMENT '商品分类', + `product_brand` varchar(200) DEFAULT NULL, + `product_sn` varchar(200) DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COMMENT='购物车表'; +) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COMMENT='购物车表'; -- ---------------------------- -- Records of oms_cart_item -- ---------------------------- -INSERT INTO `oms_cart_item` VALUES ('3', '26', null, '1', '4', '3788.00', null, null, null, null, '华为 HUAWEI P20', 'AI智慧全面屏 6GB +64GB 亮黑色 全网通版 移动联通电信4G手机 双卡双待手机 双卡双待', null, 'windir', '2018-08-02 10:23:09', '2018-08-02 10:23:09', '1'); -INSERT INTO `oms_cart_item` VALUES ('4', '26', null, '1', '2', '3788.00', '金色', '16G', null, null, '华为 HUAWEI P20', 'AI智慧全面屏 6GB +64GB 亮黑色 全网通版 移动联通电信4G手机 双卡双待手机 双卡双待', null, 'windir', '2018-08-02 10:23:09', '2018-08-02 10:23:09', '1'); -INSERT INTO `oms_cart_item` VALUES ('5', '27', null, '1', '4', '2699.00', null, null, null, null, '小米8 全面屏游戏智能手机 6GB+64GB 黑色 全网通4G 双卡双待', '骁龙845处理器,红外人脸解锁,AI变焦双摄,AI语音助手小米6X低至1299,点击抢购', null, 'windir', '2018-08-02 10:23:09', '2018-08-02 10:23:09', '0'); -INSERT INTO `oms_cart_item` VALUES ('6', '26', '86', '1', '2', '3788.00', '金色', '16G', null, null, '华为 HUAWEI P20', 'AI智慧全面屏 6GB +64GB 亮黑色 全网通版 移动联通电信4G手机 双卡双待手机 双卡双待', '201806070026001', 'windir', '2018-08-02 10:23:09', '2018-08-02 10:23:09', '1'); -INSERT INTO `oms_cart_item` VALUES ('7', '26', '89', '1', '3', '3788.00', '银色', '32G', null, null, '华为 HUAWEI P20', 'AI智慧全面屏 6GB +64GB 亮黑色 全网通版 移动联通电信4G手机 双卡双待手机 双卡双待', '201806070026004', 'windir', '2018-08-02 10:23:09', '2018-08-02 10:23:09', '1'); -INSERT INTO `oms_cart_item` VALUES ('8', '26', '88', '1', '4', '3788.00', '银色', '16G', null, null, '华为 HUAWEI P20', 'AI智慧全面屏 6GB +64GB 亮黑色 全网通版 移动联通电信4G手机 双卡双待手机 双卡双待', '201806070026003', 'windir', '2018-08-02 10:23:09', '2018-08-02 10:23:09', '0'); +INSERT INTO `oms_cart_item` VALUES ('12', '26', '90', '1', '1', '3788.00', '金色', '16G', null, null, '华为 HUAWEI P20', 'AI智慧全面屏 6GB +64GB 亮黑色 全网通版 移动联通电信4G手机 双卡双待手机 双卡双待', '201806070026001', 'windir', '2018-08-27 16:53:44', null, '0', '19', null, null); +INSERT INTO `oms_cart_item` VALUES ('13', '27', '98', '1', '3', '2699.00', '黑色', '32G', null, null, '小米8', '骁龙845处理器,红外人脸解锁,AI变焦双摄,AI语音助手小米6X低至1299,点击抢购', '201808270027001', 'windir', '2018-08-27 17:11:53', null, '0', '19', null, null); +INSERT INTO `oms_cart_item` VALUES ('14', '28', '102', '1', '1', '649.00', '金色', '16G', null, null, '红米5A', '8天超长待机,137g轻巧机身,高通骁龙处理器小米6X低至1299,点击抢购', '201808270028001', 'windir', '2018-08-27 17:18:02', null, '0', '19', null, null); +INSERT INTO `oms_cart_item` VALUES ('15', '28', '103', '1', '1', '699.00', '金色', '32G', null, null, '红米5A', '8天超长待机,137g轻巧机身,高通骁龙处理器小米6X低至1299,点击抢购', '201808270028001', 'windir', '2018-08-28 10:22:45', null, '0', '19', null, null); +INSERT INTO `oms_cart_item` VALUES ('16', '29', '106', '1', '1', '5499.00', '金色', '32G', null, null, 'Apple iPhone 8 Plus', '【限时限量抢购】Apple产品年中狂欢节,好物尽享,美在智慧!速来 >> 勾选[保障服务][原厂保2年],获得AppleCare+全方位服务计划,原厂延保售后无忧。', '201808270029001', 'windir', '2018-08-28 10:50:50', null, '0', '19', null, null); -- ---------------------------- -- Table structure for oms_company_address @@ -340,12 +342,13 @@ CREATE TABLE `oms_company_address` ( DROP TABLE IF EXISTS `oms_order`; CREATE TABLE `oms_order` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '订单id', - `member_id` bigint(20) DEFAULT NULL, + `member_id` bigint(20) NOT NULL, `coupon_id` bigint(20) DEFAULT NULL, `order_sn` varchar(64) DEFAULT NULL COMMENT '订单编号', `create_time` datetime DEFAULT NULL COMMENT '提交时间', `member_username` varchar(64) DEFAULT NULL COMMENT '用户帐号', `total_amount` decimal(10,2) DEFAULT NULL COMMENT '订单总金额', + `pay_amount` decimal(10,2) DEFAULT NULL COMMENT '应付金额(实际支付金额)', `freight_amount` decimal(10,2) DEFAULT NULL COMMENT '运费金额', `promotion_amount` decimal(10,2) DEFAULT NULL COMMENT '促销优化金额(促销价、满减、阶梯价)', `integration_amount` decimal(10,2) DEFAULT NULL COMMENT '积分抵扣金额', @@ -366,8 +369,8 @@ CREATE TABLE `oms_order` ( `bill_content` varchar(200) DEFAULT NULL COMMENT '发票内容', `bill_receiver_phone` varchar(32) DEFAULT NULL COMMENT '收票人电话', `bill_receiver_email` varchar(64) DEFAULT NULL COMMENT '收票人邮箱', - `receiver_name` varchar(100) DEFAULT NULL COMMENT '收货人姓名', - `receiver_phone` varchar(32) DEFAULT NULL COMMENT '收货人电话', + `receiver_name` varchar(100) NOT NULL COMMENT '收货人姓名', + `receiver_phone` varchar(32) NOT NULL COMMENT '收货人电话', `receiver_post_code` varchar(32) DEFAULT NULL COMMENT '收货人邮编', `receiver_province` varchar(32) DEFAULT NULL COMMENT '省份/直辖市', `receiver_city` varchar(32) DEFAULT NULL COMMENT '城市', @@ -375,12 +378,17 @@ CREATE TABLE `oms_order` ( `receiver_detail_address` varchar(200) DEFAULT NULL COMMENT '详细地址', `note` varchar(500) DEFAULT NULL COMMENT '订单备注', `confirm_status` int(1) DEFAULT NULL COMMENT '确认收货状态:0->未确认;1->已确认', + `delete_status` int(1) NOT NULL DEFAULT '0' COMMENT '删除状态:0->未删除;1->已删除', PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='订单表'; +) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 COMMENT='订单表'; -- ---------------------------- -- Records of oms_order -- ---------------------------- +INSERT INTO `oms_order` VALUES ('12', '1', '2', null, '2018-09-03 16:24:27', 'test', '18732.00', '16377.75', '0.00', '2344.25', '0.00', '10.00', null, '0', '1', '0', '0', null, null, null, '0', null, '单品促销,打折优惠:满3件,打7.50折,满减优惠:满1000.00元,减120.00元,满减优惠:满1000.00元,减120.00元,无优惠', null, null, null, null, null, '大梨', '18033441849', '518000', '广东省', '深圳市', '福田区', '东晓街道', null, '0', '0'); +INSERT INTO `oms_order` VALUES ('13', '1', '2', null, '2018-09-03 16:24:29', 'test', '18732.00', '16377.75', '0.00', '2344.25', '0.00', '10.00', null, '0', '1', '0', '0', null, null, null, '0', null, '单品促销,打折优惠:满3件,打7.50折,满减优惠:满1000.00元,减120.00元,满减优惠:满1000.00元,减120.00元,无优惠', null, null, null, null, null, '大梨', '18033441849', '518000', '广东省', '深圳市', '福田区', '东晓街道', null, '0', '0'); +INSERT INTO `oms_order` VALUES ('14', '1', '2', null, '2018-09-03 16:57:40', 'test', '18732.00', '16377.75', '0.00', '2344.25', '0.00', '10.00', null, '0', '1', '0', '0', null, null, null, '18682', '18682', '单品促销,打折优惠:满3件,打7.50折,满减优惠:满1000.00元,减120.00元,满减优惠:满1000.00元,减120.00元,无优惠', null, null, null, null, null, '大梨', '18033441849', '518000', '广东省', '深圳市', '福田区', '东晓街道', null, '0', '0'); +INSERT INTO `oms_order` VALUES ('15', '1', '2', null, '2018-09-03 17:03:00', 'test', '18732.00', '16377.75', '0.00', '2344.25', '0.00', '10.00', null, '0', '1', '0', '0', null, null, null, '18682', '18682', '单品促销,打折优惠:满3件,打7.50折,满减优惠:满1000.00元,减120.00元,满减优惠:满1000.00元,减120.00元,无优惠', null, null, null, null, null, '大梨', '18033441849', '518000', '广东省', '深圳市', '福田区', '东晓街道', null, '0', '0'); -- ---------------------------- -- Table structure for oms_order_item @@ -391,22 +399,51 @@ CREATE TABLE `oms_order_item` ( `order_id` bigint(20) DEFAULT NULL COMMENT '订单id', `order_sn` varchar(64) DEFAULT NULL COMMENT '订单编号', `product_id` bigint(20) DEFAULT NULL, - `proudct_pic` varchar(500) DEFAULT NULL, + `product_pic` varchar(500) DEFAULT NULL, `product_name` varchar(200) DEFAULT NULL, `product_brand` varchar(200) DEFAULT NULL, `product_sn` varchar(64) DEFAULT NULL, - `product_amount` decimal(10,2) DEFAULT NULL, - `product_count` int(11) DEFAULT NULL COMMENT '购买数量', - `product_real_amount` decimal(10,2) DEFAULT NULL COMMENT '该商品经过优惠后的分解金额', + `product_price` decimal(10,2) DEFAULT NULL COMMENT '销售价格', + `product_quantity` int(11) DEFAULT NULL COMMENT '购买数量', + `product_sku_id` bigint(20) DEFAULT NULL COMMENT '商品sku编号', + `product_sku_code` varchar(50) DEFAULT NULL COMMENT '商品sku条码', + `product_category_id` bigint(20) DEFAULT NULL COMMENT '商品分类id', `sp1` varchar(100) DEFAULT NULL COMMENT '商品的销售属性', `sp2` varchar(100) DEFAULT NULL, `sp3` varchar(100) DEFAULT NULL, + `promotion_name` varchar(200) DEFAULT NULL COMMENT '商品促销名称', + `promotion_amount` decimal(10,2) DEFAULT NULL COMMENT '商品促销分解金额', + `coupon_amount` decimal(10,2) DEFAULT NULL COMMENT '优惠券优惠分解金额', + `integration_amount` decimal(10,2) DEFAULT NULL COMMENT '积分优惠分解金额', + `real_amount` decimal(10,2) DEFAULT NULL COMMENT '该商品经过优惠后的分解金额', + `gift_integration` int(11) DEFAULT '0', + `gift_growth` int(11) DEFAULT '0', PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='订单中所包含的商品'; +) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8 COMMENT='订单中所包含的商品'; -- ---------------------------- -- Records of oms_order_item -- ---------------------------- +INSERT INTO `oms_order_item` VALUES ('21', '12', null, '26', null, '华为 HUAWEI P20', null, null, '3788.00', '1', '90', '201806070026001', '19', null, null, null, '单品促销', '200.00', '2.02', '0.00', '3585.98', '0', '0'); +INSERT INTO `oms_order_item` VALUES ('22', '12', null, '27', null, '小米8', null, null, '2699.00', '3', '98', '201808270027001', '19', null, null, null, '打折优惠:满3件,打7.50折', '674.75', '1.44', '0.00', '2022.81', '0', '0'); +INSERT INTO `oms_order_item` VALUES ('23', '12', null, '28', null, '红米5A', null, null, '649.00', '1', '102', '201808270028001', '19', null, null, null, '满减优惠:满1000.00元,减120.00元', '57.60', '0.35', '0.00', '591.05', '0', '0'); +INSERT INTO `oms_order_item` VALUES ('24', '12', null, '28', null, '红米5A', null, null, '699.00', '1', '103', '201808270028001', '19', null, null, null, '满减优惠:满1000.00元,减120.00元', '62.40', '0.37', '0.00', '636.23', '0', '0'); +INSERT INTO `oms_order_item` VALUES ('25', '12', null, '29', null, 'Apple iPhone 8 Plus', null, null, '5499.00', '1', '106', '201808270029001', '19', null, null, null, '无优惠', '0.00', '2.94', '0.00', '5496.06', '0', '0'); +INSERT INTO `oms_order_item` VALUES ('26', '13', null, '26', null, '华为 HUAWEI P20', null, null, '3788.00', '1', '90', '201806070026001', '19', null, null, null, '单品促销', '200.00', '2.02', '0.00', '3585.98', '0', '0'); +INSERT INTO `oms_order_item` VALUES ('27', '13', null, '27', null, '小米8', null, null, '2699.00', '3', '98', '201808270027001', '19', null, null, null, '打折优惠:满3件,打7.50折', '674.75', '1.44', '0.00', '2022.81', '0', '0'); +INSERT INTO `oms_order_item` VALUES ('28', '13', null, '28', null, '红米5A', null, null, '649.00', '1', '102', '201808270028001', '19', null, null, null, '满减优惠:满1000.00元,减120.00元', '57.60', '0.35', '0.00', '591.05', '0', '0'); +INSERT INTO `oms_order_item` VALUES ('29', '13', null, '28', null, '红米5A', null, null, '699.00', '1', '103', '201808270028001', '19', null, null, null, '满减优惠:满1000.00元,减120.00元', '62.40', '0.37', '0.00', '636.23', '0', '0'); +INSERT INTO `oms_order_item` VALUES ('30', '13', null, '29', null, 'Apple iPhone 8 Plus', null, null, '5499.00', '1', '106', '201808270029001', '19', null, null, null, '无优惠', '0.00', '2.94', '0.00', '5496.06', '0', '0'); +INSERT INTO `oms_order_item` VALUES ('31', '14', null, '26', null, '华为 HUAWEI P20', null, null, '3788.00', '1', '90', '201806070026001', '19', null, null, null, '单品促销', '200.00', '2.02', '0.00', '3585.98', '0', '0'); +INSERT INTO `oms_order_item` VALUES ('32', '14', null, '27', null, '小米8', null, null, '2699.00', '3', '98', '201808270027001', '19', null, null, null, '打折优惠:满3件,打7.50折', '674.75', '1.44', '0.00', '2022.81', '0', '0'); +INSERT INTO `oms_order_item` VALUES ('33', '14', null, '28', null, '红米5A', null, null, '649.00', '1', '102', '201808270028001', '19', null, null, null, '满减优惠:满1000.00元,减120.00元', '57.60', '0.35', '0.00', '591.05', '0', '0'); +INSERT INTO `oms_order_item` VALUES ('34', '14', null, '28', null, '红米5A', null, null, '699.00', '1', '103', '201808270028001', '19', null, null, null, '满减优惠:满1000.00元,减120.00元', '62.40', '0.37', '0.00', '636.23', '0', '0'); +INSERT INTO `oms_order_item` VALUES ('35', '14', null, '29', null, 'Apple iPhone 8 Plus', null, null, '5499.00', '1', '106', '201808270029001', '19', null, null, null, '无优惠', '0.00', '2.94', '0.00', '5496.06', '0', '0'); +INSERT INTO `oms_order_item` VALUES ('36', '15', null, '26', null, '华为 HUAWEI P20', null, null, '3788.00', '1', '90', '201806070026001', '19', null, null, null, '单品促销', '200.00', '2.02', '0.00', '3585.98', '0', '0'); +INSERT INTO `oms_order_item` VALUES ('37', '15', null, '27', null, '小米8', null, null, '2699.00', '3', '98', '201808270027001', '19', null, null, null, '打折优惠:满3件,打7.50折', '674.75', '1.44', '0.00', '2022.81', '0', '0'); +INSERT INTO `oms_order_item` VALUES ('38', '15', null, '28', null, '红米5A', null, null, '649.00', '1', '102', '201808270028001', '19', null, null, null, '满减优惠:满1000.00元,减120.00元', '57.60', '0.35', '0.00', '591.05', '0', '0'); +INSERT INTO `oms_order_item` VALUES ('39', '15', null, '28', null, '红米5A', null, null, '699.00', '1', '103', '201808270028001', '19', null, null, null, '满减优惠:满1000.00元,减120.00元', '62.40', '0.37', '0.00', '636.23', '0', '0'); +INSERT INTO `oms_order_item` VALUES ('40', '15', null, '29', null, 'Apple iPhone 8 Plus', null, null, '5499.00', '1', '106', '201808270029001', '19', null, null, null, '无优惠', '0.00', '2.94', '0.00', '5496.06', '0', '0'); -- ---------------------------- -- Table structure for oms_order_operate_history @@ -643,7 +680,7 @@ CREATE TABLE `pms_member_price` ( `member_price` decimal(10,2) DEFAULT NULL COMMENT '会员价格', `member_level_name` varchar(100) DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=186 DEFAULT CHARSET=utf8 COMMENT='商品会员价格表'; +) ENGINE=InnoDB AUTO_INCREMENT=201 DEFAULT CHARSET=utf8 COMMENT='商品会员价格表'; -- ---------------------------- -- Records of pms_member_price @@ -668,24 +705,12 @@ INSERT INTO `pms_member_price` VALUES ('60', '24', '3', null, null); INSERT INTO `pms_member_price` VALUES ('112', '23', '1', '88.00', '黄金会员'); INSERT INTO `pms_member_price` VALUES ('113', '23', '2', '88.00', '白金会员'); INSERT INTO `pms_member_price` VALUES ('114', '23', '3', '66.00', '钻石会员'); -INSERT INTO `pms_member_price` VALUES ('115', '27', '1', null, '黄金会员'); -INSERT INTO `pms_member_price` VALUES ('116', '27', '2', null, '白金会员'); -INSERT INTO `pms_member_price` VALUES ('117', '27', '3', null, '钻石会员'); -INSERT INTO `pms_member_price` VALUES ('127', '28', '1', null, '黄金会员'); -INSERT INTO `pms_member_price` VALUES ('128', '28', '2', null, '白金会员'); -INSERT INTO `pms_member_price` VALUES ('129', '28', '3', null, '钻石会员'); -INSERT INTO `pms_member_price` VALUES ('130', '29', '1', null, '黄金会员'); -INSERT INTO `pms_member_price` VALUES ('131', '29', '2', null, '白金会员'); -INSERT INTO `pms_member_price` VALUES ('132', '29', '3', null, '钻石会员'); INSERT INTO `pms_member_price` VALUES ('142', '31', '1', null, '黄金会员'); INSERT INTO `pms_member_price` VALUES ('143', '31', '2', null, '白金会员'); INSERT INTO `pms_member_price` VALUES ('144', '31', '3', null, '钻石会员'); INSERT INTO `pms_member_price` VALUES ('148', '32', '1', null, '黄金会员'); INSERT INTO `pms_member_price` VALUES ('149', '32', '2', null, '白金会员'); INSERT INTO `pms_member_price` VALUES ('150', '32', '3', null, '钻石会员'); -INSERT INTO `pms_member_price` VALUES ('151', '26', '1', null, '黄金会员'); -INSERT INTO `pms_member_price` VALUES ('152', '26', '2', null, '白金会员'); -INSERT INTO `pms_member_price` VALUES ('153', '26', '3', null, '钻石会员'); INSERT INTO `pms_member_price` VALUES ('154', '33', '1', null, '黄金会员'); INSERT INTO `pms_member_price` VALUES ('155', '33', '2', null, '白金会员'); INSERT INTO `pms_member_price` VALUES ('156', '33', '3', null, '钻石会员'); @@ -701,6 +726,18 @@ INSERT INTO `pms_member_price` VALUES ('177', '34', '3', null, '钻石会员'); INSERT INTO `pms_member_price` VALUES ('178', '30', '1', null, '黄金会员'); INSERT INTO `pms_member_price` VALUES ('179', '30', '2', null, '白金会员'); INSERT INTO `pms_member_price` VALUES ('180', '30', '3', null, '钻石会员'); +INSERT INTO `pms_member_price` VALUES ('186', '26', '1', null, '黄金会员'); +INSERT INTO `pms_member_price` VALUES ('187', '26', '2', null, '白金会员'); +INSERT INTO `pms_member_price` VALUES ('188', '26', '3', null, '钻石会员'); +INSERT INTO `pms_member_price` VALUES ('192', '27', '1', null, '黄金会员'); +INSERT INTO `pms_member_price` VALUES ('193', '27', '2', null, '白金会员'); +INSERT INTO `pms_member_price` VALUES ('194', '27', '3', null, '钻石会员'); +INSERT INTO `pms_member_price` VALUES ('195', '28', '1', null, '黄金会员'); +INSERT INTO `pms_member_price` VALUES ('196', '28', '2', null, '白金会员'); +INSERT INTO `pms_member_price` VALUES ('197', '28', '3', null, '钻石会员'); +INSERT INTO `pms_member_price` VALUES ('198', '29', '1', null, '黄金会员'); +INSERT INTO `pms_member_price` VALUES ('199', '29', '2', null, '白金会员'); +INSERT INTO `pms_member_price` VALUES ('200', '29', '3', null, '钻石会员'); -- ---------------------------- -- Table structure for pms_product @@ -725,8 +762,8 @@ CREATE TABLE `pms_product` ( `sale` int(11) DEFAULT NULL COMMENT '销量', `price` decimal(10,2) DEFAULT NULL, `promotion_price` decimal(10,2) DEFAULT NULL COMMENT '促销价格', - `gift_growth` int(11) DEFAULT NULL COMMENT '赠送的成长值', - `gift_point` int(11) DEFAULT NULL COMMENT '赠送的积分', + `gift_growth` int(11) DEFAULT '0' COMMENT '赠送的成长值', + `gift_point` int(11) DEFAULT '0' COMMENT '赠送的积分', `use_point_limit` int(11) DEFAULT NULL COMMENT '限制使用的积分数', `sub_title` varchar(255) DEFAULT NULL COMMENT '副标题', `description` text COMMENT '商品描述', @@ -759,28 +796,28 @@ CREATE TABLE `pms_product` ( -- ---------------------------- -- Records of pms_product -- ---------------------------- -INSERT INTO `pms_product` VALUES ('1', '49', '7', '0', '0', '0', '银色星芒刺绣网纱底裤', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180522/web.png', 'No86577', '1', '1', '1', '1', '1', '100', '0', '100.00', null, null, '100', null, '111', '111', '120.00', '100', '20', '件', '1000.00', '0', null, '银色星芒刺绣网纱底裤', '银色星芒刺绣网纱底裤', null, '银色星芒刺绣网纱底裤', '银色星芒刺绣网纱底裤', '银色星芒刺绣网纱底裤', '银色星芒刺绣网纱底裤', null, null, null, null, null, null, '0', '七匹狼', '外套'); -INSERT INTO `pms_product` VALUES ('2', '49', '7', '0', '0', '0', '银色星芒刺绣网纱底裤2', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180522/web.png', 'No86578', '1', '1', '1', '1', '1', '1', '0', '100.00', null, null, '100', null, '111', '111', '120.00', '100', '20', '件', '1000.00', '0', null, '银色星芒刺绣网纱底裤2', '银色星芒刺绣网纱底裤', null, '银色星芒刺绣网纱底裤', '银色星芒刺绣网纱底裤', '

银色星芒刺绣网纱底裤

', '

银色星芒刺绣网纱底裤

', null, null, null, null, null, null, '0', '七匹狼', '外套'); -INSERT INTO `pms_product` VALUES ('3', '1', '7', '0', '0', '0', '银色星芒刺绣网纱底裤3', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180522/web.png', 'No86579', '1', '1', '1', '1', '1', '1', '0', '100.00', null, null, '100', null, '111', '111', '120.00', '100', '20', '件', '1000.00', '0', null, '银色星芒刺绣网纱底裤3', '银色星芒刺绣网纱底裤', null, '银色星芒刺绣网纱底裤', '银色星芒刺绣网纱底裤', '银色星芒刺绣网纱底裤', '银色星芒刺绣网纱底裤', null, null, null, null, null, null, '0', '万和', '外套'); -INSERT INTO `pms_product` VALUES ('4', '1', '7', '0', '0', '0', '银色星芒刺绣网纱底裤4', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180522/web.png', 'No86580', '1', '1', '1', '1', '1', '1', '0', '100.00', null, null, '100', null, '111', '111', '120.00', '100', '20', '件', '1000.00', '0', null, '银色星芒刺绣网纱底裤4', '银色星芒刺绣网纱底裤', null, '银色星芒刺绣网纱底裤', '银色星芒刺绣网纱底裤', '银色星芒刺绣网纱底裤', '银色星芒刺绣网纱底裤', null, null, null, null, null, null, '0', '万和', '外套'); -INSERT INTO `pms_product` VALUES ('5', '1', '7', '0', '0', '0', '银色星芒刺绣网纱底裤5', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180522/web.png', 'No86581', '1', '0', '1', '1', '1', '1', '0', '100.00', null, null, '100', null, '111', '111', '120.00', '100', '20', '件', '1000.00', '0', null, '银色星芒刺绣网纱底裤5', '银色星芒刺绣网纱底裤', null, '银色星芒刺绣网纱底裤', '银色星芒刺绣网纱底裤', '银色星芒刺绣网纱底裤', '银色星芒刺绣网纱底裤', null, null, null, null, null, null, '0', '万和', '外套'); -INSERT INTO `pms_product` VALUES ('6', '1', '7', '0', '0', '0', '银色星芒刺绣网纱底裤6', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180522/web.png', 'No86582', '1', '1', '1', '1', '1', '1', '0', '100.00', null, null, '100', null, '111', '111', '120.00', '100', '20', '件', '1000.00', '0', null, '银色星芒刺绣网纱底裤6', '银色星芒刺绣网纱底裤', null, '银色星芒刺绣网纱底裤', '银色星芒刺绣网纱底裤', '银色星芒刺绣网纱底裤', '银色星芒刺绣网纱底裤', null, null, null, null, null, null, '0', '万和', '外套'); -INSERT INTO `pms_product` VALUES ('7', '1', '7', '0', '1', '0', '女式超柔软拉毛运动开衫', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180522/web.png', 'No86577', '1', '0', '0', '0', '0', '0', '0', '249.00', '0.00', null, '100', '0', '匠心剪裁,垂感质地', '匠心剪裁,垂感质地', '299.00', '100', '0', '件', '0.00', '0', 'string', '女式超柔软拉毛运动开衫', 'string', 'string', 'string', 'string', 'string', 'string', '0.00', '0', '0', '2018-04-26 10:41:03', '2018-04-26 10:41:03', '0', '0', '万和', '外套'); -INSERT INTO `pms_product` VALUES ('8', '1', '7', '0', '1', '0', '女式超柔软拉毛运动开衫1', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180522/web.png', 'No86577', '1', '0', '0', '0', '0', '0', '0', '249.00', '0.00', null, '100', '0', '匠心剪裁,垂感质地', '匠心剪裁,垂感质地', '299.00', '100', '0', '件', '0.00', '0', 'string', '女式超柔软拉毛运动开衫', 'string', 'string', 'string', 'string', 'string', 'string', '0.00', '0', '0', '2018-04-26 10:41:03', '2018-04-26 10:41:03', '0', '0', '万和', '外套'); -INSERT INTO `pms_product` VALUES ('9', '1', '7', '0', '1', '0', '女式超柔软拉毛运动开衫1', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180522/web.png', 'No86577', '1', '0', '0', '0', '0', '0', '0', '249.00', '0.00', null, '100', '0', '匠心剪裁,垂感质地', '匠心剪裁,垂感质地', '299.00', '100', '0', '件', '0.00', '0', 'string', '女式超柔软拉毛运动开衫', 'string', 'string', 'string', 'string', 'string', 'string', '0.00', '0', '0', '2018-04-26 10:41:03', '2018-04-26 10:41:03', '0', '0', '万和', '外套'); -INSERT INTO `pms_product` VALUES ('10', '1', '7', '0', '1', '0', '女式超柔软拉毛运动开衫1', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180522/web.png', 'No86577', '1', '0', '0', '0', '0', '0', '0', '249.00', '0.00', null, '100', '0', '匠心剪裁,垂感质地', '匠心剪裁,垂感质地', '299.00', '100', '0', '件', '0.00', '0', 'string', '女式超柔软拉毛运动开衫', 'string', 'string', 'string', 'string', 'string', 'string', '0.00', '0', '0', '2018-04-26 10:41:03', '2018-04-26 10:41:03', '0', '0', '万和', '外套'); -INSERT INTO `pms_product` VALUES ('11', '1', '7', '0', '1', '0', '女式超柔软拉毛运动开衫1', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180522/web.png', 'No86577', '1', '1', '0', '1', '0', '0', '0', '249.00', '0.00', null, '100', '0', '匠心剪裁,垂感质地', '匠心剪裁,垂感质地', '299.00', '100', '0', '件', '0.00', '0', 'string', '女式超柔软拉毛运动开衫', 'string', 'string', 'string', 'string', 'string', 'string', '0.00', '0', '0', '2018-04-26 10:41:03', '2018-04-26 10:41:03', '0', '0', '万和', '外套'); -INSERT INTO `pms_product` VALUES ('12', '1', '7', '0', '1', '0', '女式超柔软拉毛运动开衫2', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180522/web.png', 'No86577', '1', '1', '0', '1', '0', '0', '0', '249.00', '0.00', null, '100', '0', '匠心剪裁,垂感质地', '匠心剪裁,垂感质地', '299.00', '100', '0', '件', '0.00', '0', 'string', '女式超柔软拉毛运动开衫', 'string', 'string', 'string', 'string', 'string', 'string', '0.00', '0', '0', '2018-04-26 10:41:03', '2018-04-26 10:41:03', '0', '0', '万和', '外套'); -INSERT INTO `pms_product` VALUES ('13', '1', '7', '0', '1', '0', '女式超柔软拉毛运动开衫3', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180522/web.png', 'No86577', '1', '1', '0', '1', '0', '0', '0', '249.00', '0.00', null, '100', '0', '匠心剪裁,垂感质地', '匠心剪裁,垂感质地', '299.00', '100', '0', '件', '0.00', '0', 'string', '女式超柔软拉毛运动开衫', 'string', 'string', 'string', 'string', 'string', 'string', '0.00', '0', '0', '2018-04-26 10:41:03', '2018-04-26 10:41:03', '0', '0', '万和', '外套'); -INSERT INTO `pms_product` VALUES ('14', '1', '7', '0', '1', '0', '女式超柔软拉毛运动开衫3', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180522/web.png', 'No86577', '1', '0', '0', '1', '0', '0', '0', '249.00', '0.00', null, '100', '0', '匠心剪裁,垂感质地', '匠心剪裁,垂感质地', '299.00', '100', '0', '件', '0.00', '0', 'string', '女式超柔软拉毛运动开衫', 'string', 'string', 'string', 'string', 'string', 'string', '0.00', '0', '0', '2018-04-26 10:41:03', '2018-04-26 10:41:03', '0', '0', '万和', '外套'); -INSERT INTO `pms_product` VALUES ('18', '1', '7', '0', '1', '0', '女式超柔软拉毛运动开衫3', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180522/web.png', 'No86577', '1', '0', '0', '1', '0', '0', '0', '249.00', '0.00', null, '100', '0', '匠心剪裁,垂感质地', '匠心剪裁,垂感质地', '299.00', '100', '0', '件', '0.00', '0', 'string', '女式超柔软拉毛运动开衫', 'string', 'string', 'string', 'string', 'string', 'string', '0.00', '0', '0', '2018-04-26 10:41:03', '2018-04-26 10:41:03', '0', '0', '万和', '外套'); +INSERT INTO `pms_product` VALUES ('1', '49', '7', '0', '0', '0', '银色星芒刺绣网纱底裤', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180522/web.png', 'No86577', '1', '1', '1', '1', '1', '100', '0', '100.00', null, '0', '100', null, '111', '111', '120.00', '100', '20', '件', '1000.00', '0', null, '银色星芒刺绣网纱底裤', '银色星芒刺绣网纱底裤', null, '银色星芒刺绣网纱底裤', '银色星芒刺绣网纱底裤', '银色星芒刺绣网纱底裤', '银色星芒刺绣网纱底裤', null, null, null, null, null, null, '0', '七匹狼', '外套'); +INSERT INTO `pms_product` VALUES ('2', '49', '7', '0', '0', '0', '银色星芒刺绣网纱底裤2', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180522/web.png', 'No86578', '1', '1', '1', '1', '1', '1', '0', '100.00', null, '0', '100', null, '111', '111', '120.00', '100', '20', '件', '1000.00', '0', null, '银色星芒刺绣网纱底裤2', '银色星芒刺绣网纱底裤', null, '银色星芒刺绣网纱底裤', '银色星芒刺绣网纱底裤', '

银色星芒刺绣网纱底裤

', '

银色星芒刺绣网纱底裤

', null, null, null, null, null, null, '0', '七匹狼', '外套'); +INSERT INTO `pms_product` VALUES ('3', '1', '7', '0', '0', '0', '银色星芒刺绣网纱底裤3', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180522/web.png', 'No86579', '1', '1', '1', '1', '1', '1', '0', '100.00', null, '0', '100', null, '111', '111', '120.00', '100', '20', '件', '1000.00', '0', null, '银色星芒刺绣网纱底裤3', '银色星芒刺绣网纱底裤', null, '银色星芒刺绣网纱底裤', '银色星芒刺绣网纱底裤', '银色星芒刺绣网纱底裤', '银色星芒刺绣网纱底裤', null, null, null, null, null, null, '0', '万和', '外套'); +INSERT INTO `pms_product` VALUES ('4', '1', '7', '0', '0', '0', '银色星芒刺绣网纱底裤4', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180522/web.png', 'No86580', '1', '1', '1', '1', '1', '1', '0', '100.00', null, '0', '100', null, '111', '111', '120.00', '100', '20', '件', '1000.00', '0', null, '银色星芒刺绣网纱底裤4', '银色星芒刺绣网纱底裤', null, '银色星芒刺绣网纱底裤', '银色星芒刺绣网纱底裤', '银色星芒刺绣网纱底裤', '银色星芒刺绣网纱底裤', null, null, null, null, null, null, '0', '万和', '外套'); +INSERT INTO `pms_product` VALUES ('5', '1', '7', '0', '0', '0', '银色星芒刺绣网纱底裤5', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180522/web.png', 'No86581', '1', '0', '1', '1', '1', '1', '0', '100.00', null, '0', '100', null, '111', '111', '120.00', '100', '20', '件', '1000.00', '0', null, '银色星芒刺绣网纱底裤5', '银色星芒刺绣网纱底裤', null, '银色星芒刺绣网纱底裤', '银色星芒刺绣网纱底裤', '银色星芒刺绣网纱底裤', '银色星芒刺绣网纱底裤', null, null, null, null, null, null, '0', '万和', '外套'); +INSERT INTO `pms_product` VALUES ('6', '1', '7', '0', '0', '0', '银色星芒刺绣网纱底裤6', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180522/web.png', 'No86582', '1', '1', '1', '1', '1', '1', '0', '100.00', null, '0', '100', null, '111', '111', '120.00', '100', '20', '件', '1000.00', '0', null, '银色星芒刺绣网纱底裤6', '银色星芒刺绣网纱底裤', null, '银色星芒刺绣网纱底裤', '银色星芒刺绣网纱底裤', '银色星芒刺绣网纱底裤', '银色星芒刺绣网纱底裤', null, null, null, null, null, null, '0', '万和', '外套'); +INSERT INTO `pms_product` VALUES ('7', '1', '7', '0', '1', '0', '女式超柔软拉毛运动开衫', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180522/web.png', 'No86577', '1', '0', '0', '0', '0', '0', '0', '249.00', '0.00', '0', '100', '0', '匠心剪裁,垂感质地', '匠心剪裁,垂感质地', '299.00', '100', '0', '件', '0.00', '0', 'string', '女式超柔软拉毛运动开衫', 'string', 'string', 'string', 'string', 'string', 'string', '0.00', '0', '0', '2018-04-26 10:41:03', '2018-04-26 10:41:03', '0', '0', '万和', '外套'); +INSERT INTO `pms_product` VALUES ('8', '1', '7', '0', '1', '0', '女式超柔软拉毛运动开衫1', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180522/web.png', 'No86577', '1', '0', '0', '0', '0', '0', '0', '249.00', '0.00', '0', '100', '0', '匠心剪裁,垂感质地', '匠心剪裁,垂感质地', '299.00', '100', '0', '件', '0.00', '0', 'string', '女式超柔软拉毛运动开衫', 'string', 'string', 'string', 'string', 'string', 'string', '0.00', '0', '0', '2018-04-26 10:41:03', '2018-04-26 10:41:03', '0', '0', '万和', '外套'); +INSERT INTO `pms_product` VALUES ('9', '1', '7', '0', '1', '0', '女式超柔软拉毛运动开衫1', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180522/web.png', 'No86577', '1', '0', '0', '0', '0', '0', '0', '249.00', '0.00', '0', '100', '0', '匠心剪裁,垂感质地', '匠心剪裁,垂感质地', '299.00', '100', '0', '件', '0.00', '0', 'string', '女式超柔软拉毛运动开衫', 'string', 'string', 'string', 'string', 'string', 'string', '0.00', '0', '0', '2018-04-26 10:41:03', '2018-04-26 10:41:03', '0', '0', '万和', '外套'); +INSERT INTO `pms_product` VALUES ('10', '1', '7', '0', '1', '0', '女式超柔软拉毛运动开衫1', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180522/web.png', 'No86577', '1', '0', '0', '0', '0', '0', '0', '249.00', '0.00', '0', '100', '0', '匠心剪裁,垂感质地', '匠心剪裁,垂感质地', '299.00', '100', '0', '件', '0.00', '0', 'string', '女式超柔软拉毛运动开衫', 'string', 'string', 'string', 'string', 'string', 'string', '0.00', '0', '0', '2018-04-26 10:41:03', '2018-04-26 10:41:03', '0', '0', '万和', '外套'); +INSERT INTO `pms_product` VALUES ('11', '1', '7', '0', '1', '0', '女式超柔软拉毛运动开衫1', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180522/web.png', 'No86577', '1', '1', '0', '1', '0', '0', '0', '249.00', '0.00', '0', '100', '0', '匠心剪裁,垂感质地', '匠心剪裁,垂感质地', '299.00', '100', '0', '件', '0.00', '0', 'string', '女式超柔软拉毛运动开衫', 'string', 'string', 'string', 'string', 'string', 'string', '0.00', '0', '0', '2018-04-26 10:41:03', '2018-04-26 10:41:03', '0', '0', '万和', '外套'); +INSERT INTO `pms_product` VALUES ('12', '1', '7', '0', '1', '0', '女式超柔软拉毛运动开衫2', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180522/web.png', 'No86577', '1', '1', '0', '1', '0', '0', '0', '249.00', '0.00', '0', '100', '0', '匠心剪裁,垂感质地', '匠心剪裁,垂感质地', '299.00', '100', '0', '件', '0.00', '0', 'string', '女式超柔软拉毛运动开衫', 'string', 'string', 'string', 'string', 'string', 'string', '0.00', '0', '0', '2018-04-26 10:41:03', '2018-04-26 10:41:03', '0', '0', '万和', '外套'); +INSERT INTO `pms_product` VALUES ('13', '1', '7', '0', '1', '0', '女式超柔软拉毛运动开衫3', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180522/web.png', 'No86577', '1', '1', '0', '1', '0', '0', '0', '249.00', '0.00', '0', '100', '0', '匠心剪裁,垂感质地', '匠心剪裁,垂感质地', '299.00', '100', '0', '件', '0.00', '0', 'string', '女式超柔软拉毛运动开衫', 'string', 'string', 'string', 'string', 'string', 'string', '0.00', '0', '0', '2018-04-26 10:41:03', '2018-04-26 10:41:03', '0', '0', '万和', '外套'); +INSERT INTO `pms_product` VALUES ('14', '1', '7', '0', '1', '0', '女式超柔软拉毛运动开衫3', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180522/web.png', 'No86577', '1', '0', '0', '1', '0', '0', '0', '249.00', '0.00', '0', '100', '0', '匠心剪裁,垂感质地', '匠心剪裁,垂感质地', '299.00', '100', '0', '件', '0.00', '0', 'string', '女式超柔软拉毛运动开衫', 'string', 'string', 'string', 'string', 'string', 'string', '0.00', '0', '0', '2018-04-26 10:41:03', '2018-04-26 10:41:03', '0', '0', '万和', '外套'); +INSERT INTO `pms_product` VALUES ('18', '1', '7', '0', '1', '0', '女式超柔软拉毛运动开衫3', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180522/web.png', 'No86577', '1', '0', '0', '1', '0', '0', '0', '249.00', '0.00', '0', '100', '0', '匠心剪裁,垂感质地', '匠心剪裁,垂感质地', '299.00', '100', '0', '件', '0.00', '0', 'string', '女式超柔软拉毛运动开衫', 'string', 'string', 'string', 'string', 'string', 'string', '0.00', '0', '0', '2018-04-26 10:41:03', '2018-04-26 10:41:03', '0', '0', '万和', '外套'); INSERT INTO `pms_product` VALUES ('22', '6', '7', '0', '1', '0', 'test', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180604/1522738681.jpg', '', '1', '1', '0', '0', '0', '0', '0', '0.00', null, '0', '0', '0', 'test', '', '0.00', '0', '0', '', '0.00', '1', '1,2', '', '', '', '', '', '', '', '0.00', '0', '0', null, null, '0', '0', '小米', '外套'); INSERT INTO `pms_product` VALUES ('23', '6', '19', '0', '1', '0', '毛衫测试', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180604/1522738681.jpg', 'NO.1098', '1', '1', '1', '1', '0', '0', '0', '99.00', null, '99', '99', '1000', '毛衫测试11', 'xxx', '109.00', '100', '0', '件', '1000.00', '1', '1,2,3', '毛衫测试', '毛衫测试', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180604/1522738681.jpg,http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180604/1522738681.jpg', '毛衫测试', '毛衫测试', '

', '', '0.00', '0', '0', null, null, '0', '2', '小米', '手机数码'); INSERT INTO `pms_product` VALUES ('24', '6', '7', '0', null, '0', 'xxx', '', '', '1', '0', '0', '0', '0', '0', '0', '0.00', null, '0', '0', '0', 'xxx', '', '0.00', '0', '0', '', '0.00', '0', '', '', '', '', '', '', '', '', '0.00', '0', '0', null, null, '0', '0', '小米', '外套'); -INSERT INTO `pms_product` VALUES ('26', '3', '19', '0', '3', '0', '华为 HUAWEI P20 ', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180607/5ac1bf58Ndefaac16.jpg', '6946605', '0', '1', '1', '1', '0', '100', '0', '3788.00', null, '3788', '3788', '0', 'AI智慧全面屏 6GB +64GB 亮黑色 全网通版 移动联通电信4G手机 双卡双待手机 双卡双待', '', '4288.00', '1000', '0', '件', '0.00', '1', '2,3,1', '', '', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180607/5ab46a3cN616bdc41.jpg,http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180607/5ac1bf5fN2522b9dc.jpg', '', '', '

', '', '0.00', '0', '0', null, null, '0', '0', '华为', '手机数码'); -INSERT INTO `pms_product` VALUES ('27', '6', '19', '0', '3', '0', '小米8 全面屏游戏智能手机 6GB+64GB 黑色 全网通4G 双卡双待', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180615/xiaomi.jpg', '7437788', '0', '1', '1', '1', '0', '0', '0', '2699.00', null, '0', '0', '0', '骁龙845处理器,红外人脸解锁,AI变焦双摄,AI语音助手小米6X低至1299,点击抢购', '小米8 全面屏游戏智能手机 6GB+64GB 黑色 全网通4G 双卡双待', '2699.00', '0', '0', '', '0.00', '0', '', '', '', '', '', '', '

', '', '0.00', '0', '0', null, null, '0', '0', '小米', '手机数码'); -INSERT INTO `pms_product` VALUES ('28', '6', '19', '0', '3', '0', '小米 红米5A 全网通版 3GB+32GB 香槟金 移动联通电信4G手机 双卡双待', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180615/5a9d248cN071f4959.jpg', '7437789', '0', '1', '1', '1', '0', '0', '0', '649.00', null, '0', '0', '0', '8天超长待机,137g轻巧机身,高通骁龙处理器小米6X低至1299,点击抢购', '', '649.00', '0', '0', '', '0.00', '0', '', '', '', '', '', '', '', '', '0.00', '0', '0', null, null, '0', '0', '小米', '手机数码'); -INSERT INTO `pms_product` VALUES ('29', '51', '19', '0', '3', '0', 'Apple iPhone 8 Plus 64GB 红色特别版 移动联通电信4G手机', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180615/5acc5248N6a5f81cd.jpg', '7437799', '0', '1', '1', '0', '0', '0', '0', '5499.00', null, '0', '0', '0', '【限时限量抢购】Apple产品年中狂欢节,好物尽享,美在智慧!速来 >> 勾选[保障服务][原厂保2年],获得AppleCare+全方位服务计划,原厂延保售后无忧。', '', '5499.00', '0', '0', '', '0.00', '0', '', '', '', '', '', '', '', '', '0.00', '0', '0', null, null, '0', '0', '苹果', '手机数码'); +INSERT INTO `pms_product` VALUES ('26', '3', '19', '0', '3', '0', '华为 HUAWEI P20 ', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180607/5ac1bf58Ndefaac16.jpg', '6946605', '0', '1', '1', '1', '0', '100', '0', '3788.00', null, '3788', '3788', '0', 'AI智慧全面屏 6GB +64GB 亮黑色 全网通版 移动联通电信4G手机 双卡双待手机 双卡双待', '', '4288.00', '1000', '0', '件', '0.00', '1', '2,3,1', '', '', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180607/5ab46a3cN616bdc41.jpg,http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180607/5ac1bf5fN2522b9dc.jpg', '', '', '

', '', '0.00', '0', '0', null, null, '0', '1', '华为', '手机数码'); +INSERT INTO `pms_product` VALUES ('27', '6', '19', '0', '3', '0', '小米8 全面屏游戏智能手机 6GB+64GB 黑色 全网通4G 双卡双待', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180615/xiaomi.jpg', '7437788', '0', '1', '1', '1', '0', '0', '0', '2699.00', null, '2699', '2699', '0', '骁龙845处理器,红外人脸解锁,AI变焦双摄,AI语音助手小米6X低至1299,点击抢购', '小米8 全面屏游戏智能手机 6GB+64GB 黑色 全网通4G 双卡双待', '2699.00', '0', '0', '', '0.00', '0', '', '', '', '', '', '', '

', '', '0.00', '0', '0', null, null, '0', '3', '小米', '手机数码'); +INSERT INTO `pms_product` VALUES ('28', '6', '19', '0', '3', '0', '小米 红米5A 全网通版 3GB+32GB 香槟金 移动联通电信4G手机 双卡双待', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180615/5a9d248cN071f4959.jpg', '7437789', '0', '1', '1', '1', '0', '0', '0', '649.00', null, '649', '649', '0', '8天超长待机,137g轻巧机身,高通骁龙处理器小米6X低至1299,点击抢购', '', '649.00', '0', '0', '', '0.00', '0', '', '', '', '', '', '', '', '', '0.00', '0', '0', null, null, '0', '4', '小米', '手机数码'); +INSERT INTO `pms_product` VALUES ('29', '51', '19', '0', '3', '0', 'Apple iPhone 8 Plus 64GB 红色特别版 移动联通电信4G手机', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180615/5acc5248N6a5f81cd.jpg', '7437799', '0', '1', '1', '0', '0', '0', '0', '5499.00', null, '5499', '5499', '0', '【限时限量抢购】Apple产品年中狂欢节,好物尽享,美在智慧!速来 >> 勾选[保障服务][原厂保2年],获得AppleCare+全方位服务计划,原厂延保售后无忧。', '', '5499.00', '0', '0', '', '0.00', '0', '', '', '', '', '', '', '', '', '0.00', '0', '0', null, null, '0', '0', '苹果', '手机数码'); INSERT INTO `pms_product` VALUES ('30', '50', '8', '0', '1', '0', 'HLA海澜之家简约动物印花短袖T恤', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180615/5ad83a4fN6ff67ecd.jpg!cc_350x449.jpg', 'HNTBJ2E042A', '0', '1', '1', '1', '0', '0', '0', '98.00', null, '0', '0', '0', '2018夏季新品微弹舒适新款短T男生 6月6日-6月20日,满300减30,参与互动赢百元礼券,立即分享赢大奖', '', '98.00', '0', '0', '', '0.00', '0', '', '', '', '', '', '', '', '', '0.00', '0', '0', null, null, '0', '0', '海澜之家', 'T恤'); INSERT INTO `pms_product` VALUES ('31', '50', '8', '0', '1', '0', 'HLA海澜之家蓝灰花纹圆领针织布短袖T恤', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180615/5ac98b64N70acd82f.jpg!cc_350x449.jpg', 'HNTBJ2E080A', '0', '1', '0', '0', '0', '0', '0', '98.00', null, '0', '0', '0', '2018夏季新品短袖T恤男HNTBJ2E080A 蓝灰花纹80 175/92A/L80A 蓝灰花纹80 175/92A/L', '', '98.00', '0', '0', '', '0.00', '0', '', '', '', '', '', '', '', '', '0.00', '0', '0', null, null, '0', '0', '海澜之家', 'T恤'); INSERT INTO `pms_product` VALUES ('32', '50', '8', '0', null, '0', 'HLA海澜之家短袖T恤男基础款', 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180615/5a51eb88Na4797877.jpg', 'HNTBJ2E153A', '0', '1', '0', '0', '0', '0', '0', '68.00', null, '0', '0', '0', 'HLA海澜之家短袖T恤男基础款简约圆领HNTBJ2E153A藏青(F3)175/92A(50)', '', '68.00', '0', '0', '', '0.00', '0', '', '', '', '', '', '', '', '', '0.00', '0', '0', null, null, '0', '0', '海澜之家', 'T恤'); @@ -874,7 +911,7 @@ CREATE TABLE `pms_product_attribute_value` ( `product_attribute_id` bigint(20) DEFAULT NULL, `value` varchar(64) DEFAULT NULL COMMENT '手动添加规格或参数的值,参数单值,规格有多个时以逗号隔开', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=203 DEFAULT CHARSET=utf8 COMMENT='存储产品参数信息的表'; +) ENGINE=InnoDB AUTO_INCREMENT=228 DEFAULT CHARSET=utf8 COMMENT='存储产品参数信息的表'; -- ---------------------------- -- Records of pms_product_attribute_value @@ -919,33 +956,36 @@ INSERT INTO `pms_product_attribute_value` VALUES ('144', '2', '18', null); INSERT INTO `pms_product_attribute_value` VALUES ('145', '2', '19', null); INSERT INTO `pms_product_attribute_value` VALUES ('146', '2', '20', null); INSERT INTO `pms_product_attribute_value` VALUES ('147', '2', '21', null); -INSERT INTO `pms_product_attribute_value` VALUES ('148', '27', '45', '5.8'); -INSERT INTO `pms_product_attribute_value` VALUES ('149', '27', '46', '4G'); -INSERT INTO `pms_product_attribute_value` VALUES ('150', '27', '47', 'Android'); -INSERT INTO `pms_product_attribute_value` VALUES ('151', '27', '48', '3000ml'); -INSERT INTO `pms_product_attribute_value` VALUES ('165', '28', '45', '5.0'); -INSERT INTO `pms_product_attribute_value` VALUES ('166', '28', '46', '4G'); -INSERT INTO `pms_product_attribute_value` VALUES ('167', '28', '47', 'Android'); -INSERT INTO `pms_product_attribute_value` VALUES ('168', '28', '48', '2800ml'); -INSERT INTO `pms_product_attribute_value` VALUES ('169', '29', '45', '4.7'); -INSERT INTO `pms_product_attribute_value` VALUES ('170', '29', '46', '4G'); -INSERT INTO `pms_product_attribute_value` VALUES ('171', '29', '47', 'IOS'); -INSERT INTO `pms_product_attribute_value` VALUES ('172', '29', '48', '1960ml'); INSERT INTO `pms_product_attribute_value` VALUES ('183', '31', '24', null); INSERT INTO `pms_product_attribute_value` VALUES ('184', '31', '25', '夏季'); INSERT INTO `pms_product_attribute_value` VALUES ('185', '31', '37', '青年'); INSERT INTO `pms_product_attribute_value` VALUES ('186', '31', '38', '2018年夏'); INSERT INTO `pms_product_attribute_value` VALUES ('187', '31', '39', '短袖'); -INSERT INTO `pms_product_attribute_value` VALUES ('193', '26', '43', '金色,银色'); -INSERT INTO `pms_product_attribute_value` VALUES ('194', '26', '45', '5.0'); -INSERT INTO `pms_product_attribute_value` VALUES ('195', '26', '46', '4G'); -INSERT INTO `pms_product_attribute_value` VALUES ('196', '26', '47', 'Android'); -INSERT INTO `pms_product_attribute_value` VALUES ('197', '26', '48', '3000'); INSERT INTO `pms_product_attribute_value` VALUES ('198', '30', '24', null); INSERT INTO `pms_product_attribute_value` VALUES ('199', '30', '25', '夏季'); INSERT INTO `pms_product_attribute_value` VALUES ('200', '30', '37', '青年'); INSERT INTO `pms_product_attribute_value` VALUES ('201', '30', '38', '2018年夏'); INSERT INTO `pms_product_attribute_value` VALUES ('202', '30', '39', '短袖'); +INSERT INTO `pms_product_attribute_value` VALUES ('203', '26', '43', '金色,银色'); +INSERT INTO `pms_product_attribute_value` VALUES ('204', '26', '45', '5.0'); +INSERT INTO `pms_product_attribute_value` VALUES ('205', '26', '46', '4G'); +INSERT INTO `pms_product_attribute_value` VALUES ('206', '26', '47', 'Android'); +INSERT INTO `pms_product_attribute_value` VALUES ('207', '26', '48', '3000'); +INSERT INTO `pms_product_attribute_value` VALUES ('213', '27', '43', '黑色,蓝色'); +INSERT INTO `pms_product_attribute_value` VALUES ('214', '27', '45', '5.8'); +INSERT INTO `pms_product_attribute_value` VALUES ('215', '27', '46', '4G'); +INSERT INTO `pms_product_attribute_value` VALUES ('216', '27', '47', 'Android'); +INSERT INTO `pms_product_attribute_value` VALUES ('217', '27', '48', '3000ml'); +INSERT INTO `pms_product_attribute_value` VALUES ('218', '28', '43', '金色,银色'); +INSERT INTO `pms_product_attribute_value` VALUES ('219', '28', '45', '5.0'); +INSERT INTO `pms_product_attribute_value` VALUES ('220', '28', '46', '4G'); +INSERT INTO `pms_product_attribute_value` VALUES ('221', '28', '47', 'Android'); +INSERT INTO `pms_product_attribute_value` VALUES ('222', '28', '48', '2800ml'); +INSERT INTO `pms_product_attribute_value` VALUES ('223', '29', '43', '金色,银色'); +INSERT INTO `pms_product_attribute_value` VALUES ('224', '29', '45', '4.7'); +INSERT INTO `pms_product_attribute_value` VALUES ('225', '29', '46', '4G'); +INSERT INTO `pms_product_attribute_value` VALUES ('226', '29', '47', 'IOS'); +INSERT INTO `pms_product_attribute_value` VALUES ('227', '29', '48', '1960ml'); -- ---------------------------- -- Table structure for pms_product_category @@ -1037,7 +1077,7 @@ CREATE TABLE `pms_product_full_reduction` ( `full_price` decimal(10,2) DEFAULT NULL, `reduce_price` decimal(10,2) DEFAULT NULL, PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=57 DEFAULT CHARSET=utf8 COMMENT='产品满减表(只针对同商品)'; +) ENGINE=InnoDB AUTO_INCREMENT=63 DEFAULT CHARSET=utf8 COMMENT='产品满减表(只针对同商品)'; -- ---------------------------- -- Records of pms_product_full_reduction @@ -1056,17 +1096,18 @@ INSERT INTO `pms_product_full_reduction` VALUES ('11', '7', '300.00', '100.00'); INSERT INTO `pms_product_full_reduction` VALUES ('14', '22', '0.00', '0.00'); INSERT INTO `pms_product_full_reduction` VALUES ('16', '24', '0.00', '0.00'); INSERT INTO `pms_product_full_reduction` VALUES ('34', '23', '0.00', '0.00'); -INSERT INTO `pms_product_full_reduction` VALUES ('35', '27', '0.00', '0.00'); -INSERT INTO `pms_product_full_reduction` VALUES ('39', '28', '0.00', '0.00'); -INSERT INTO `pms_product_full_reduction` VALUES ('40', '29', '0.00', '0.00'); INSERT INTO `pms_product_full_reduction` VALUES ('44', '31', '0.00', '0.00'); INSERT INTO `pms_product_full_reduction` VALUES ('46', '32', '0.00', '0.00'); -INSERT INTO `pms_product_full_reduction` VALUES ('47', '26', '0.00', '0.00'); INSERT INTO `pms_product_full_reduction` VALUES ('48', '33', '0.00', '0.00'); INSERT INTO `pms_product_full_reduction` VALUES ('53', '36', '0.00', '0.00'); INSERT INTO `pms_product_full_reduction` VALUES ('54', '35', '0.00', '0.00'); INSERT INTO `pms_product_full_reduction` VALUES ('55', '34', '0.00', '0.00'); INSERT INTO `pms_product_full_reduction` VALUES ('56', '30', '0.00', '0.00'); +INSERT INTO `pms_product_full_reduction` VALUES ('57', '26', '0.00', '0.00'); +INSERT INTO `pms_product_full_reduction` VALUES ('59', '27', '0.00', '0.00'); +INSERT INTO `pms_product_full_reduction` VALUES ('60', '28', '500.00', '50.00'); +INSERT INTO `pms_product_full_reduction` VALUES ('61', '28', '1000.00', '120.00'); +INSERT INTO `pms_product_full_reduction` VALUES ('62', '29', '0.00', '0.00'); -- ---------------------------- -- Table structure for pms_product_ladder @@ -1079,7 +1120,7 @@ CREATE TABLE `pms_product_ladder` ( `discount` decimal(10,2) DEFAULT NULL COMMENT '折扣', `price` decimal(10,2) DEFAULT NULL COMMENT '折后价格', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=61 DEFAULT CHARSET=utf8 COMMENT='产品阶梯价格表(只针对同商品)'; +) ENGINE=InnoDB AUTO_INCREMENT=68 DEFAULT CHARSET=utf8 COMMENT='产品阶梯价格表(只针对同商品)'; -- ---------------------------- -- Records of pms_product_ladder @@ -1098,17 +1139,18 @@ INSERT INTO `pms_product_ladder` VALUES ('15', '7', '5', '0.50', '0.00'); INSERT INTO `pms_product_ladder` VALUES ('18', '22', '0', '0.00', '0.00'); INSERT INTO `pms_product_ladder` VALUES ('20', '24', '0', '0.00', '0.00'); INSERT INTO `pms_product_ladder` VALUES ('38', '23', '0', '0.00', '0.00'); -INSERT INTO `pms_product_ladder` VALUES ('39', '27', '0', '0.00', '0.00'); -INSERT INTO `pms_product_ladder` VALUES ('43', '28', '0', '0.00', '0.00'); -INSERT INTO `pms_product_ladder` VALUES ('44', '29', '0', '0.00', '0.00'); INSERT INTO `pms_product_ladder` VALUES ('48', '31', '0', '0.00', '0.00'); INSERT INTO `pms_product_ladder` VALUES ('50', '32', '0', '0.00', '0.00'); -INSERT INTO `pms_product_ladder` VALUES ('51', '26', '0', '0.00', '0.00'); INSERT INTO `pms_product_ladder` VALUES ('52', '33', '0', '0.00', '0.00'); INSERT INTO `pms_product_ladder` VALUES ('57', '36', '0', '0.00', '0.00'); INSERT INTO `pms_product_ladder` VALUES ('58', '35', '0', '0.00', '0.00'); INSERT INTO `pms_product_ladder` VALUES ('59', '34', '0', '0.00', '0.00'); INSERT INTO `pms_product_ladder` VALUES ('60', '30', '0', '0.00', '0.00'); +INSERT INTO `pms_product_ladder` VALUES ('61', '26', '0', '0.00', '0.00'); +INSERT INTO `pms_product_ladder` VALUES ('64', '27', '2', '0.80', '0.00'); +INSERT INTO `pms_product_ladder` VALUES ('65', '27', '3', '0.75', '0.00'); +INSERT INTO `pms_product_ladder` VALUES ('66', '28', '0', '0.00', '0.00'); +INSERT INTO `pms_product_ladder` VALUES ('67', '29', '0', '0.00', '0.00'); -- ---------------------------- -- Table structure for pms_product_operate_log @@ -1163,40 +1205,54 @@ CREATE TABLE `pms_sku_stock` ( `product_id` bigint(20) DEFAULT NULL, `sku_code` varchar(64) NOT NULL COMMENT 'sku编码', `price` decimal(10,2) DEFAULT NULL, - `stock` int(11) DEFAULT NULL COMMENT '库存', + `stock` int(11) DEFAULT '0' COMMENT '库存', `low_stock` int(11) DEFAULT NULL COMMENT '预警库存', `sp1` varchar(64) DEFAULT NULL COMMENT '销售属性1', `sp2` varchar(64) DEFAULT NULL, `sp3` varchar(64) DEFAULT NULL, `pic` varchar(255) DEFAULT NULL COMMENT '展示图片', `sale` int(11) DEFAULT NULL COMMENT '销量', + `promotion_price` decimal(10,2) DEFAULT NULL COMMENT '单品促销价格', + `lock_stock` int(11) DEFAULT '0' COMMENT '锁定库存', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=90 DEFAULT CHARSET=utf8 COMMENT='sku的库存'; +) ENGINE=InnoDB AUTO_INCREMENT=110 DEFAULT CHARSET=utf8 COMMENT='sku的库存'; -- ---------------------------- -- Records of pms_sku_stock -- ---------------------------- -INSERT INTO `pms_sku_stock` VALUES ('1', '7', 'string', '100.00', '0', '5', 'string', 'string', 'string', 'string', '0'); -INSERT INTO `pms_sku_stock` VALUES ('2', '8', 'string', '100.00', '0', '5', 'string', 'string', 'string', 'string', '0'); -INSERT INTO `pms_sku_stock` VALUES ('3', '9', 'string', '100.00', '0', '5', 'string', 'string', 'string', 'string', '0'); -INSERT INTO `pms_sku_stock` VALUES ('4', '10', 'string', '100.00', '0', '5', 'string', 'string', 'string', 'string', '0'); -INSERT INTO `pms_sku_stock` VALUES ('5', '11', 'string', '100.00', '0', '5', 'string', 'string', 'string', 'string', '0'); -INSERT INTO `pms_sku_stock` VALUES ('6', '12', 'string', '100.00', '0', '5', 'string', 'string', 'string', 'string', '0'); -INSERT INTO `pms_sku_stock` VALUES ('7', '13', 'string', '100.00', '0', '5', 'string', 'string', 'string', 'string', '0'); -INSERT INTO `pms_sku_stock` VALUES ('8', '14', 'string', '100.00', '0', '5', 'string', 'string', 'string', 'string', '0'); -INSERT INTO `pms_sku_stock` VALUES ('9', '18', 'string', '100.00', '0', '5', 'string', 'string', 'string', 'string', '0'); -INSERT INTO `pms_sku_stock` VALUES ('10', '7', 'string', '0.00', '0', '0', 'string', 'string', 'sp3', 'string', '0'); -INSERT INTO `pms_sku_stock` VALUES ('11', '7', 'string', '0.00', '0', '0', 'string', 'string', 'sp33', 'string', '0'); -INSERT INTO `pms_sku_stock` VALUES ('12', '22', '111', '99.00', null, null, 'x', 'M', null, 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180604/1522738681.jpg', null); -INSERT INTO `pms_sku_stock` VALUES ('13', '22', '112', '99.00', null, null, 'xx', 'M', null, 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180604/2018032614134591_20180326141345650 (4).png', null); -INSERT INTO `pms_sku_stock` VALUES ('78', '23', '201806070023001', '99.00', null, null, '米白色', 'M', null, 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180604/1522738681.jpg', null); -INSERT INTO `pms_sku_stock` VALUES ('79', '23', '201806070023002', '99.00', null, null, '米白色', 'X', null, 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180604/1522738681.jpg', null); -INSERT INTO `pms_sku_stock` VALUES ('80', '23', '201806070023003', '99.00', null, null, '浅黄色', 'M', null, 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180604/2017091716493787_20170917164937650 (1).png', null); -INSERT INTO `pms_sku_stock` VALUES ('81', '23', '201806070023004', '99.00', null, null, '浅黄色', 'X', null, 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180604/2017091716493787_20170917164937650 (1).png', null); -INSERT INTO `pms_sku_stock` VALUES ('86', '26', '201806070026001', '3788.00', null, null, '金色', '16G', null, null, null); -INSERT INTO `pms_sku_stock` VALUES ('87', '26', '201806070026002', '3788.00', null, null, '金色', '32G', null, null, null); -INSERT INTO `pms_sku_stock` VALUES ('88', '26', '201806070026003', '3788.00', null, null, '银色', '16G', null, null, null); -INSERT INTO `pms_sku_stock` VALUES ('89', '26', '201806070026004', '3788.00', null, null, '银色', '32G', null, null, null); +INSERT INTO `pms_sku_stock` VALUES ('1', '7', 'string', '100.00', '0', '5', 'string', 'string', 'string', 'string', '0', null, '0'); +INSERT INTO `pms_sku_stock` VALUES ('2', '8', 'string', '100.00', '0', '5', 'string', 'string', 'string', 'string', '0', null, '0'); +INSERT INTO `pms_sku_stock` VALUES ('3', '9', 'string', '100.00', '0', '5', 'string', 'string', 'string', 'string', '0', null, '0'); +INSERT INTO `pms_sku_stock` VALUES ('4', '10', 'string', '100.00', '0', '5', 'string', 'string', 'string', 'string', '0', null, '0'); +INSERT INTO `pms_sku_stock` VALUES ('5', '11', 'string', '100.00', '0', '5', 'string', 'string', 'string', 'string', '0', null, '0'); +INSERT INTO `pms_sku_stock` VALUES ('6', '12', 'string', '100.00', '0', '5', 'string', 'string', 'string', 'string', '0', null, '0'); +INSERT INTO `pms_sku_stock` VALUES ('7', '13', 'string', '100.00', '0', '5', 'string', 'string', 'string', 'string', '0', null, '0'); +INSERT INTO `pms_sku_stock` VALUES ('8', '14', 'string', '100.00', '0', '5', 'string', 'string', 'string', 'string', '0', null, '0'); +INSERT INTO `pms_sku_stock` VALUES ('9', '18', 'string', '100.00', '0', '5', 'string', 'string', 'string', 'string', '0', null, '0'); +INSERT INTO `pms_sku_stock` VALUES ('10', '7', 'string', '0.00', '0', '0', 'string', 'string', 'sp3', 'string', '0', null, '0'); +INSERT INTO `pms_sku_stock` VALUES ('11', '7', 'string', '0.00', '0', '0', 'string', 'string', 'sp33', 'string', '0', null, '0'); +INSERT INTO `pms_sku_stock` VALUES ('12', '22', '111', '99.00', '0', null, 'x', 'M', null, 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180604/1522738681.jpg', null, null, '0'); +INSERT INTO `pms_sku_stock` VALUES ('13', '22', '112', '99.00', '0', null, 'xx', 'M', null, 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180604/2018032614134591_20180326141345650 (4).png', null, null, '0'); +INSERT INTO `pms_sku_stock` VALUES ('78', '23', '201806070023001', '99.00', '0', null, '米白色', 'M', null, 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180604/1522738681.jpg', null, null, '0'); +INSERT INTO `pms_sku_stock` VALUES ('79', '23', '201806070023002', '99.00', '0', null, '米白色', 'X', null, 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180604/1522738681.jpg', null, null, '0'); +INSERT INTO `pms_sku_stock` VALUES ('80', '23', '201806070023003', '99.00', '0', null, '浅黄色', 'M', null, 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180604/2017091716493787_20170917164937650 (1).png', null, null, '0'); +INSERT INTO `pms_sku_stock` VALUES ('81', '23', '201806070023004', '99.00', '0', null, '浅黄色', 'X', null, 'http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180604/2017091716493787_20170917164937650 (1).png', null, null, '0'); +INSERT INTO `pms_sku_stock` VALUES ('90', '26', '201806070026001', '3788.00', '500', null, '金色', '16G', null, null, null, '3588.00', '19'); +INSERT INTO `pms_sku_stock` VALUES ('91', '26', '201806070026002', '3999.00', '500', null, '金色', '32G', null, null, null, '3799.00', '0'); +INSERT INTO `pms_sku_stock` VALUES ('92', '26', '201806070026003', '3788.00', '500', null, '银色', '16G', null, null, null, '3588.00', '0'); +INSERT INTO `pms_sku_stock` VALUES ('93', '26', '201806070026004', '3999.00', '500', null, '银色', '32G', null, null, null, '3799.00', '0'); +INSERT INTO `pms_sku_stock` VALUES ('98', '27', '201808270027001', '2699.00', '100', null, '黑色', '32G', null, null, null, null, '57'); +INSERT INTO `pms_sku_stock` VALUES ('99', '27', '201808270027002', '2999.00', '100', null, '黑色', '64G', null, null, null, null, '0'); +INSERT INTO `pms_sku_stock` VALUES ('100', '27', '201808270027003', '2699.00', '100', null, '蓝色', '32G', null, null, null, null, '0'); +INSERT INTO `pms_sku_stock` VALUES ('101', '27', '201808270027004', '2999.00', '100', null, '蓝色', '64G', null, null, null, null, '0'); +INSERT INTO `pms_sku_stock` VALUES ('102', '28', '201808270028001', '649.00', '100', null, '金色', '16G', null, null, null, null, '19'); +INSERT INTO `pms_sku_stock` VALUES ('103', '28', '201808270028002', '699.00', '100', null, '金色', '32G', null, null, null, null, '19'); +INSERT INTO `pms_sku_stock` VALUES ('104', '28', '201808270028003', '649.00', '100', null, '银色', '16G', null, null, null, null, '0'); +INSERT INTO `pms_sku_stock` VALUES ('105', '28', '201808270028004', '699.00', '100', null, '银色', '32G', null, null, null, null, '0'); +INSERT INTO `pms_sku_stock` VALUES ('106', '29', '201808270029001', '5499.00', '100', null, '金色', '32G', null, null, null, null, '19'); +INSERT INTO `pms_sku_stock` VALUES ('107', '29', '201808270029002', '6299.00', '100', null, '金色', '64G', null, null, null, null, '0'); +INSERT INTO `pms_sku_stock` VALUES ('108', '29', '201808270029003', '5499.00', '100', null, '银色', '32G', null, null, null, null, '0'); +INSERT INTO `pms_sku_stock` VALUES ('109', '29', '201808270029004', '6299.00', '100', null, '银色', '64G', null, null, null, null, '0'); -- ---------------------------- -- Table structure for sms_coupon @@ -1206,7 +1262,7 @@ CREATE TABLE `sms_coupon` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `type` int(1) DEFAULT NULL COMMENT '优惠卷类型;0->全场赠券;1->会员赠券;2->购物赠券;3->注册赠券', `name` varchar(100) DEFAULT NULL, - `platform` varchar(1) DEFAULT NULL COMMENT '使用平台:0->全部;1->移动;2->PC', + `platform` int(1) DEFAULT NULL COMMENT '使用平台:0->全部;1->移动;2->PC', `count` int(11) DEFAULT NULL COMMENT '数量', `amount` decimal(10,2) DEFAULT NULL COMMENT '金额', `per_limit` int(11) DEFAULT NULL COMMENT '每人限领张数', @@ -1217,22 +1273,27 @@ CREATE TABLE `sms_coupon` ( `note` varchar(200) DEFAULT NULL COMMENT '备注', `publish_count` int(11) DEFAULT NULL COMMENT '发行数量', `use_count` int(11) DEFAULT NULL COMMENT '已使用数量', + `receive_count` int(11) DEFAULT NULL COMMENT '领取数量', `enable_time` datetime DEFAULT NULL COMMENT '可以领取的日期', `code` varchar(64) DEFAULT NULL COMMENT '优惠码', `member_level` int(1) DEFAULT NULL COMMENT '可领取的会员类型:0->无限时', PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='优惠卷表'; +) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COMMENT='优惠卷表'; -- ---------------------------- -- Records of sms_coupon -- ---------------------------- +INSERT INTO `sms_coupon` VALUES ('2', '0', '全品类通用券', '0', '99', '10.00', '1', '100.00', '2018-08-27 16:40:47', '2018-09-15 16:40:47', '0', '满100减10', '100', '0', '1', '2018-08-27 16:40:47', null, null); +INSERT INTO `sms_coupon` VALUES ('3', '0', '小米手机专用券', '0', '99', '50.00', '1', '1000.00', '2018-08-27 16:40:47', '2018-09-15 16:40:47', '2', '小米手机专用优惠券', '100', '0', '1', '2018-08-27 16:40:47', null, null); +INSERT INTO `sms_coupon` VALUES ('4', '0', '手机品类专用券', '0', '99', '300.00', '1', '2000.00', '2018-08-27 16:40:47', '2018-09-15 16:40:47', '1', '手机分类专用优惠券', '100', '0', '1', '2018-08-27 16:40:47', null, null); +INSERT INTO `sms_coupon` VALUES ('7', '0', 'T恤分类专用优惠券', '0', '99', '50.00', '1', '500.00', '2018-08-27 16:40:47', '2018-08-15 16:40:47', '1', '满500减50', '100', '0', '1', '2018-08-27 16:40:47', null, null); -- ---------------------------- -- Table structure for sms_coupon_history -- ---------------------------- DROP TABLE IF EXISTS `sms_coupon_history`; CREATE TABLE `sms_coupon_history` ( - `id` bigint(20) NOT NULL, + `id` bigint(20) NOT NULL AUTO_INCREMENT, `coupon_id` bigint(20) DEFAULT NULL, `member_id` bigint(20) DEFAULT NULL, `coupon_code` varchar(64) DEFAULT NULL, @@ -1242,12 +1303,18 @@ CREATE TABLE `sms_coupon_history` ( `use_status` int(1) DEFAULT NULL COMMENT '使用状态:0->未使用;1->已使用;2->已过期', `use_time` datetime DEFAULT NULL COMMENT '使用时间', `order_id` char(10) DEFAULT NULL COMMENT '订单编号', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='优惠券使用、领取历史表'; + PRIMARY KEY (`id`), + KEY `idx_member_id` (`member_id`) USING BTREE, + KEY `idx_coupon_id` (`coupon_id`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='优惠券使用、领取历史表'; -- ---------------------------- -- Records of sms_coupon_history -- ---------------------------- +INSERT INTO `sms_coupon_history` VALUES ('2', '2', '1', null, 'windir', '1', '2018-08-29 14:04:12', '1', '2018-09-03 17:03:00', null); +INSERT INTO `sms_coupon_history` VALUES ('3', '3', '1', null, 'windir', '1', '2018-08-29 14:04:29', '0', null, null); +INSERT INTO `sms_coupon_history` VALUES ('4', '4', '1', null, 'windir', '1', '2018-08-29 14:04:32', '0', null, null); +INSERT INTO `sms_coupon_history` VALUES ('5', '7', '1', null, 'windir', '1', '2018-08-29 14:04:37', '0', null, null); -- ---------------------------- -- Table structure for sms_coupon_product_category_relation @@ -1257,12 +1324,15 @@ CREATE TABLE `sms_coupon_product_category_relation` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `coupon_id` bigint(20) DEFAULT NULL, `product_category_id` bigint(20) DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='优惠券和产品分类关系表'; + PRIMARY KEY (`id`), + KEY `idx_cid_pcid` (`coupon_id`,`product_category_id`) +) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='优惠券和产品分类关系表'; -- ---------------------------- -- Records of sms_coupon_product_category_relation -- ---------------------------- +INSERT INTO `sms_coupon_product_category_relation` VALUES ('1', '4', '19'); +INSERT INTO `sms_coupon_product_category_relation` VALUES ('5', '7', '8'); -- ---------------------------- -- Table structure for sms_coupon_product_relation @@ -1270,14 +1340,17 @@ CREATE TABLE `sms_coupon_product_category_relation` ( DROP TABLE IF EXISTS `sms_coupon_product_relation`; CREATE TABLE `sms_coupon_product_relation` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, - `coupon_id` int(11) DEFAULT NULL, + `coupon_id` bigint(20) DEFAULT NULL, `product_id` bigint(20) DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='优惠券和产品的关系表'; + PRIMARY KEY (`id`), + KEY `idx_cid_pid` (`coupon_id`,`product_id`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='优惠券和产品的关系表'; -- ---------------------------- -- Records of sms_coupon_product_relation -- ---------------------------- +INSERT INTO `sms_coupon_product_relation` VALUES ('1', '3', '27'); +INSERT INTO `sms_coupon_product_relation` VALUES ('2', '3', '28'); -- ---------------------------- -- Table structure for sms_flash_promotion @@ -1457,11 +1530,12 @@ CREATE TABLE `ums_growth_change_history` ( `operate_note` varchar(200) DEFAULT NULL COMMENT '操作备注', `source_type` int(1) DEFAULT NULL COMMENT '积分来源:0->购物;1->管理员修改', PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='成长值变化历史记录表'; +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='成长值变化历史记录表'; -- ---------------------------- -- Records of ums_growth_change_history -- ---------------------------- +INSERT INTO `ums_growth_change_history` VALUES ('1', '1', '2018-08-29 17:16:35', '0', '1000', 'test', '测试使用', '1'); -- ---------------------------- -- Table structure for ums_integration_change_history @@ -1484,21 +1558,22 @@ CREATE TABLE `ums_integration_change_history` ( -- ---------------------------- -- ---------------------------- --- Table structure for ums_intergration_consume_setting +-- Table structure for ums_integration_consume_setting -- ---------------------------- -DROP TABLE IF EXISTS `ums_intergration_consume_setting`; -CREATE TABLE `ums_intergration_consume_setting` ( +DROP TABLE IF EXISTS `ums_integration_consume_setting`; +CREATE TABLE `ums_integration_consume_setting` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `deduction_per_amount` int(11) DEFAULT NULL COMMENT '每一元需要抵扣的积分数量', `max_percent_per_order` int(11) DEFAULT NULL COMMENT '每笔订单最高抵用百分比', `use_unit` int(11) DEFAULT NULL COMMENT '每次使用积分最小单位100', `coupon_status` int(1) DEFAULT NULL COMMENT '是否可以和优惠券同用;0->不可以;1->可以', PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='积分消费设置'; +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='积分消费设置'; -- ---------------------------- --- Records of ums_intergration_consume_setting +-- Records of ums_integration_consume_setting -- ---------------------------- +INSERT INTO `ums_integration_consume_setting` VALUES ('1', '100', '50', '100', '1'); -- ---------------------------- -- Table structure for ums_member @@ -1527,12 +1602,12 @@ CREATE TABLE `ums_member` ( PRIMARY KEY (`id`), UNIQUE KEY `idx_username` (`username`), UNIQUE KEY `idx_phone` (`phone`) -) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='会员表'; +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='会员表'; -- ---------------------------- -- Records of ums_member -- ---------------------------- -INSERT INTO `ums_member` VALUES ('1', '4', 'test', '202cb962ac59075b964b07152d234b70', 'windir', '18061581849', '1', '2018-08-02 10:35:44', null, '1', '2009-06-01', '上海', '学生', 'test', null, null, null, null, null); +INSERT INTO `ums_member` VALUES ('1', '4', 'test', '202cb962ac59075b964b07152d234b70', 'windir', '18061581849', '1', '2018-08-02 10:35:44', null, '1', '2009-06-01', '上海', '学生', 'test', null, '1000', null, null, null); INSERT INTO `ums_member` VALUES ('3', '4', 'test1', '698d51a19d8a121ce581499d7b701668', null, '18061581848', '1', '2018-08-03 16:46:38', null, null, null, null, null, null, null, null, null, null, null); -- ---------------------------- @@ -1622,15 +1697,21 @@ CREATE TABLE `ums_member_receive_address` ( `member_id` bigint(20) DEFAULT NULL, `name` varchar(100) DEFAULT NULL COMMENT '收货人名称', `phone_number` varchar(64) DEFAULT NULL, - `address` varchar(128) DEFAULT NULL COMMENT '收货地址', - `post_code` varchar(100) DEFAULT NULL COMMENT '邮政编码', `default_status` int(1) DEFAULT NULL COMMENT '是否为默认', + `post_code` varchar(100) DEFAULT NULL COMMENT '邮政编码', + `province` varchar(100) DEFAULT NULL COMMENT '省份/直辖市', + `city` varchar(100) DEFAULT NULL COMMENT '城市', + `region` varchar(100) DEFAULT NULL COMMENT '区', + `detail_address` varchar(128) DEFAULT NULL COMMENT '详细地址(街道)', PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='会员收货地址表'; +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='会员收货地址表'; -- ---------------------------- -- Records of ums_member_receive_address -- ---------------------------- +INSERT INTO `ums_member_receive_address` VALUES ('1', '1', '大梨', '18033441849', '0', '518000', '广东省', '深圳市', '南山区', '科兴科学园'); +INSERT INTO `ums_member_receive_address` VALUES ('3', '1', '大梨', '18033441849', '0', '518000', '广东省', '深圳市', '福田区', '清水河街道'); +INSERT INTO `ums_member_receive_address` VALUES ('4', '1', '大梨', '18033441849', '1', '518000', '广东省', '深圳市', '福田区', '东晓街道'); -- ---------------------------- -- Table structure for ums_member_rule_setting diff --git a/mall-mbg/src/main/java/com/macro/mall/model/OmsCartItem.java b/mall-mbg/src/main/java/com/macro/mall/model/OmsCartItem.java index 0852d65..11ef5f8 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/OmsCartItem.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/OmsCartItem.java @@ -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(); diff --git a/mall-mbg/src/main/java/com/macro/mall/model/OmsCartItemExample.java b/mall-mbg/src/main/java/com/macro/mall/model/OmsCartItemExample.java index 54f2b06..30dbb87 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/OmsCartItemExample.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/OmsCartItemExample.java @@ -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 values) { + addCriterion("product_brand in", values, "productBrand"); + return (Criteria) this; + } + + public Criteria andProductBrandNotIn(List 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 values) { + addCriterion("product_sn in", values, "productSn"); + return (Criteria) this; + } + + public Criteria andProductSnNotIn(List 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 { diff --git a/mall-mbg/src/main/java/com/macro/mall/model/OmsOrderItem.java b/mall-mbg/src/main/java/com/macro/mall/model/OmsOrderItem.java index bffb699..1890bc9 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/OmsOrderItem.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/OmsOrderItem.java @@ -22,7 +22,7 @@ public class OmsOrderItem implements Serializable { private Long productId; - private String proudctPic; + private String productPic; 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 productCount; + private Integer productQuantity; /** - * 该商品经过优惠后的分解金额 + * 商品sku编号 * * @mbggenerated */ - private BigDecimal productRealAmount; + private Long productSkuId; + + /** + * 商品sku条码 + * + * @mbggenerated + */ + 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 getProudctPic() { - return proudctPic; + public String getProductPic() { + return productPic; } - public void setProudctPic(String proudctPic) { - this.proudctPic = proudctPic; + public void setProductPic(String productPic) { + this.productPic = productPic; } 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 setProductAmount(BigDecimal productAmount) { - this.productAmount = productAmount; + public void setProductPrice(BigDecimal productPrice) { + this.productPrice = productPrice; } - public Integer getProductCount() { - return productCount; + public Integer getProductQuantity() { + return productQuantity; } - public void setProductCount(Integer productCount) { - this.productCount = productCount; + public void setProductQuantity(Integer productQuantity) { + this.productQuantity = productQuantity; } - public BigDecimal getProductRealAmount() { - return productRealAmount; + public Long getProductSkuId() { + return productSkuId; } - public void setProductRealAmount(BigDecimal productRealAmount) { - this.productRealAmount = productRealAmount; + public void setProductSkuId(Long productSkuId) { + this.productSkuId = productSkuId; + } + + public String getProductSkuCode() { + return productSkuCode; + } + + public void setProductSkuCode(String productSkuCode) { + this.productSkuCode = productSkuCode; + } + + public Long getProductCategoryId() { + return productCategoryId; + } + + public void setProductCategoryId(Long productCategoryId) { + this.productCategoryId = 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(", proudctPic=").append(proudctPic); + sb.append(", productPic=").append(productPic); 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(); diff --git a/mall-mbg/src/main/java/com/macro/mall/model/OmsOrderItemExample.java b/mall-mbg/src/main/java/com/macro/mall/model/OmsOrderItemExample.java index 6b79776..52e2fa2 100644 --- a/mall-mbg/src/main/java/com/macro/mall/model/OmsOrderItemExample.java +++ b/mall-mbg/src/main/java/com/macro/mall/model/OmsOrderItemExample.java @@ -355,73 +355,73 @@ public class OmsOrderItemExample { return (Criteria) this; } - public Criteria andProudctPicIsNull() { - addCriterion("proudct_pic is null"); + public Criteria andProductPicIsNull() { + addCriterion("product_pic is null"); return (Criteria) this; } - public Criteria andProudctPicIsNotNull() { - addCriterion("proudct_pic is not null"); + public Criteria andProductPicIsNotNull() { + addCriterion("product_pic is not null"); return (Criteria) this; } - public Criteria andProudctPicEqualTo(String value) { - addCriterion("proudct_pic =", value, "proudctPic"); + public Criteria andProductPicEqualTo(String value) { + addCriterion("product_pic =", value, "productPic"); return (Criteria) this; } - public Criteria andProudctPicNotEqualTo(String value) { - addCriterion("proudct_pic <>", value, "proudctPic"); + public Criteria andProductPicNotEqualTo(String value) { + addCriterion("product_pic <>", value, "productPic"); return (Criteria) this; } - public Criteria andProudctPicGreaterThan(String value) { - addCriterion("proudct_pic >", value, "proudctPic"); + public Criteria andProductPicGreaterThan(String value) { + addCriterion("product_pic >", value, "productPic"); return (Criteria) this; } - public Criteria andProudctPicGreaterThanOrEqualTo(String value) { - addCriterion("proudct_pic >=", value, "proudctPic"); + public Criteria andProductPicGreaterThanOrEqualTo(String value) { + addCriterion("product_pic >=", value, "productPic"); return (Criteria) this; } - public Criteria andProudctPicLessThan(String value) { - addCriterion("proudct_pic <", value, "proudctPic"); + public Criteria andProductPicLessThan(String value) { + addCriterion("product_pic <", value, "productPic"); return (Criteria) this; } - public Criteria andProudctPicLessThanOrEqualTo(String value) { - addCriterion("proudct_pic <=", value, "proudctPic"); + public Criteria andProductPicLessThanOrEqualTo(String value) { + addCriterion("product_pic <=", value, "productPic"); return (Criteria) this; } - public Criteria andProudctPicLike(String value) { - addCriterion("proudct_pic like", value, "proudctPic"); + public Criteria andProductPicLike(String value) { + addCriterion("product_pic like", value, "productPic"); return (Criteria) this; } - public Criteria andProudctPicNotLike(String value) { - addCriterion("proudct_pic not like", value, "proudctPic"); + public Criteria andProductPicNotLike(String value) { + addCriterion("product_pic not like", value, "productPic"); return (Criteria) this; } - public Criteria andProudctPicIn(List values) { - addCriterion("proudct_pic in", values, "proudctPic"); + public Criteria andProductPicIn(List values) { + addCriterion("product_pic in", values, "productPic"); return (Criteria) this; } - public Criteria andProudctPicNotIn(List values) { - addCriterion("proudct_pic not in", values, "proudctPic"); + public Criteria andProductPicNotIn(List values) { + addCriterion("product_pic not in", values, "productPic"); return (Criteria) this; } - public Criteria andProudctPicBetween(String value1, String value2) { - addCriterion("proudct_pic between", value1, value2, "proudctPic"); + public Criteria andProductPicBetween(String value1, String value2) { + addCriterion("product_pic between", value1, value2, "productPic"); return (Criteria) this; } - public Criteria andProudctPicNotBetween(String value1, String value2) { - addCriterion("proudct_pic not between", value1, value2, "proudctPic"); + public Criteria andProductPicNotBetween(String value1, String value2) { + addCriterion("product_pic not between", value1, value2, "productPic"); return (Criteria) this; } @@ -635,183 +635,313 @@ public class OmsOrderItemExample { return (Criteria) this; } - public Criteria andProductAmountIsNull() { - addCriterion("product_amount is null"); + public Criteria andProductPriceIsNull() { + addCriterion("product_price is null"); return (Criteria) this; } - public Criteria andProductAmountIsNotNull() { - addCriterion("product_amount is not null"); + public Criteria andProductPriceIsNotNull() { + addCriterion("product_price is not null"); return (Criteria) this; } - public Criteria andProductAmountEqualTo(BigDecimal value) { - addCriterion("product_amount =", value, "productAmount"); + public Criteria andProductPriceEqualTo(BigDecimal value) { + addCriterion("product_price =", value, "productPrice"); return (Criteria) this; } - public Criteria andProductAmountNotEqualTo(BigDecimal value) { - addCriterion("product_amount <>", value, "productAmount"); + public Criteria andProductPriceNotEqualTo(BigDecimal value) { + addCriterion("product_price <>", value, "productPrice"); return (Criteria) this; } - public Criteria andProductAmountGreaterThan(BigDecimal value) { - addCriterion("product_amount >", value, "productAmount"); + public Criteria andProductPriceGreaterThan(BigDecimal value) { + addCriterion("product_price >", value, "productPrice"); return (Criteria) this; } - public Criteria andProductAmountGreaterThanOrEqualTo(BigDecimal value) { - addCriterion("product_amount >=", value, "productAmount"); + public Criteria andProductPriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("product_price >=", value, "productPrice"); return (Criteria) this; } - public Criteria andProductAmountLessThan(BigDecimal value) { - addCriterion("product_amount <", value, "productAmount"); + public Criteria andProductPriceLessThan(BigDecimal value) { + addCriterion("product_price <", value, "productPrice"); return (Criteria) this; } - public Criteria andProductAmountLessThanOrEqualTo(BigDecimal value) { - addCriterion("product_amount <=", value, "productAmount"); + public Criteria andProductPriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("product_price <=", value, "productPrice"); return (Criteria) this; } - public Criteria andProductAmountIn(List values) { - addCriterion("product_amount in", values, "productAmount"); + public Criteria andProductPriceIn(List values) { + addCriterion("product_price in", values, "productPrice"); return (Criteria) this; } - public Criteria andProductAmountNotIn(List values) { - addCriterion("product_amount not in", values, "productAmount"); + public Criteria andProductPriceNotIn(List values) { + addCriterion("product_price not in", values, "productPrice"); return (Criteria) this; } - public Criteria andProductAmountBetween(BigDecimal value1, BigDecimal value2) { - addCriterion("product_amount between", value1, value2, "productAmount"); + public Criteria andProductPriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("product_price between", value1, value2, "productPrice"); return (Criteria) this; } - public Criteria andProductAmountNotBetween(BigDecimal value1, BigDecimal value2) { - addCriterion("product_amount not between", value1, value2, "productAmount"); + public Criteria andProductPriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("product_price not between", value1, value2, "productPrice"); return (Criteria) this; } - public Criteria andProductCountIsNull() { - addCriterion("product_count is null"); + public Criteria andProductQuantityIsNull() { + addCriterion("product_quantity is null"); return (Criteria) this; } - public Criteria andProductCountIsNotNull() { - addCriterion("product_count is not null"); + public Criteria andProductQuantityIsNotNull() { + addCriterion("product_quantity is not null"); return (Criteria) this; } - public Criteria andProductCountEqualTo(Integer value) { - addCriterion("product_count =", value, "productCount"); + public Criteria andProductQuantityEqualTo(Integer value) { + addCriterion("product_quantity =", value, "productQuantity"); return (Criteria) this; } - public Criteria andProductCountNotEqualTo(Integer value) { - addCriterion("product_count <>", value, "productCount"); + public Criteria andProductQuantityNotEqualTo(Integer value) { + addCriterion("product_quantity <>", value, "productQuantity"); return (Criteria) this; } - public Criteria andProductCountGreaterThan(Integer value) { - addCriterion("product_count >", value, "productCount"); + public Criteria andProductQuantityGreaterThan(Integer value) { + addCriterion("product_quantity >", value, "productQuantity"); return (Criteria) this; } - public Criteria andProductCountGreaterThanOrEqualTo(Integer value) { - addCriterion("product_count >=", value, "productCount"); + public Criteria andProductQuantityGreaterThanOrEqualTo(Integer value) { + addCriterion("product_quantity >=", value, "productQuantity"); return (Criteria) this; } - public Criteria andProductCountLessThan(Integer value) { - addCriterion("product_count <", value, "productCount"); + public Criteria andProductQuantityLessThan(Integer value) { + addCriterion("product_quantity <", value, "productQuantity"); return (Criteria) this; } - public Criteria andProductCountLessThanOrEqualTo(Integer value) { - addCriterion("product_count <=", value, "productCount"); + public Criteria andProductQuantityLessThanOrEqualTo(Integer value) { + addCriterion("product_quantity <=", value, "productQuantity"); return (Criteria) this; } - public Criteria andProductCountIn(List values) { - addCriterion("product_count in", values, "productCount"); + public Criteria andProductQuantityIn(List values) { + addCriterion("product_quantity in", values, "productQuantity"); return (Criteria) this; } - public Criteria andProductCountNotIn(List values) { - addCriterion("product_count not in", values, "productCount"); + public Criteria andProductQuantityNotIn(List values) { + addCriterion("product_quantity not in", values, "productQuantity"); return (Criteria) this; } - public Criteria andProductCountBetween(Integer value1, Integer value2) { - addCriterion("product_count between", value1, value2, "productCount"); + public Criteria andProductQuantityBetween(Integer value1, Integer value2) { + addCriterion("product_quantity between", value1, value2, "productQuantity"); return (Criteria) this; } - public Criteria andProductCountNotBetween(Integer value1, Integer value2) { - addCriterion("product_count not between", value1, value2, "productCount"); + public Criteria andProductQuantityNotBetween(Integer value1, Integer value2) { + addCriterion("product_quantity not between", value1, value2, "productQuantity"); return (Criteria) this; } - public Criteria andProductRealAmountIsNull() { - addCriterion("product_real_amount is null"); + public Criteria andProductSkuIdIsNull() { + addCriterion("product_sku_id is null"); return (Criteria) this; } - public Criteria andProductRealAmountIsNotNull() { - addCriterion("product_real_amount is not null"); + public Criteria andProductSkuIdIsNotNull() { + addCriterion("product_sku_id is not null"); return (Criteria) this; } - public Criteria andProductRealAmountEqualTo(BigDecimal value) { - addCriterion("product_real_amount =", value, "productRealAmount"); + public Criteria andProductSkuIdEqualTo(Long value) { + addCriterion("product_sku_id =", value, "productSkuId"); return (Criteria) this; } - public Criteria andProductRealAmountNotEqualTo(BigDecimal value) { - addCriterion("product_real_amount <>", value, "productRealAmount"); + public Criteria andProductSkuIdNotEqualTo(Long value) { + addCriterion("product_sku_id <>", value, "productSkuId"); return (Criteria) this; } - public Criteria andProductRealAmountGreaterThan(BigDecimal value) { - addCriterion("product_real_amount >", value, "productRealAmount"); + public Criteria andProductSkuIdGreaterThan(Long value) { + addCriterion("product_sku_id >", value, "productSkuId"); return (Criteria) this; } - public Criteria andProductRealAmountGreaterThanOrEqualTo(BigDecimal value) { - addCriterion("product_real_amount >=", value, "productRealAmount"); + public Criteria andProductSkuIdGreaterThanOrEqualTo(Long value) { + addCriterion("product_sku_id >=", value, "productSkuId"); return (Criteria) this; } - public Criteria andProductRealAmountLessThan(BigDecimal value) { - addCriterion("product_real_amount <", value, "productRealAmount"); + public Criteria andProductSkuIdLessThan(Long value) { + addCriterion("product_sku_id <", value, "productSkuId"); return (Criteria) this; } - public Criteria andProductRealAmountLessThanOrEqualTo(BigDecimal value) { - addCriterion("product_real_amount <=", value, "productRealAmount"); + public Criteria andProductSkuIdLessThanOrEqualTo(Long value) { + addCriterion("product_sku_id <=", value, "productSkuId"); return (Criteria) this; } - public Criteria andProductRealAmountIn(List values) { - addCriterion("product_real_amount in", values, "productRealAmount"); + public Criteria andProductSkuIdIn(List values) { + addCriterion("product_sku_id in", values, "productSkuId"); return (Criteria) this; } - public Criteria andProductRealAmountNotIn(List values) { - addCriterion("product_real_amount not in", values, "productRealAmount"); + public Criteria andProductSkuIdNotIn(List values) { + addCriterion("product_sku_id not in", values, "productSkuId"); return (Criteria) this; } - public Criteria andProductRealAmountBetween(BigDecimal value1, BigDecimal value2) { - addCriterion("product_real_amount between", value1, value2, "productRealAmount"); + public Criteria andProductSkuIdBetween(Long value1, Long value2) { + addCriterion("product_sku_id between", value1, value2, "productSkuId"); return (Criteria) this; } - public Criteria andProductRealAmountNotBetween(BigDecimal value1, BigDecimal value2) { - addCriterion("product_real_amount not between", value1, value2, "productRealAmount"); + public Criteria andProductSkuIdNotBetween(Long value1, Long value2) { + addCriterion("product_sku_id not between", value1, value2, "productSkuId"); + return (Criteria) this; + } + + public Criteria andProductSkuCodeIsNull() { + addCriterion("product_sku_code is null"); + return (Criteria) this; + } + + public Criteria andProductSkuCodeIsNotNull() { + addCriterion("product_sku_code is not null"); + return (Criteria) this; + } + + public Criteria andProductSkuCodeEqualTo(String value) { + addCriterion("product_sku_code =", value, "productSkuCode"); + return (Criteria) this; + } + + public Criteria andProductSkuCodeNotEqualTo(String value) { + addCriterion("product_sku_code <>", value, "productSkuCode"); + return (Criteria) this; + } + + public Criteria andProductSkuCodeGreaterThan(String value) { + addCriterion("product_sku_code >", value, "productSkuCode"); + return (Criteria) this; + } + + public Criteria andProductSkuCodeGreaterThanOrEqualTo(String value) { + addCriterion("product_sku_code >=", value, "productSkuCode"); + return (Criteria) this; + } + + public Criteria andProductSkuCodeLessThan(String value) { + addCriterion("product_sku_code <", value, "productSkuCode"); + return (Criteria) this; + } + + public Criteria andProductSkuCodeLessThanOrEqualTo(String value) { + addCriterion("product_sku_code <=", value, "productSkuCode"); + return (Criteria) this; + } + + public Criteria andProductSkuCodeLike(String value) { + addCriterion("product_sku_code like", value, "productSkuCode"); + return (Criteria) this; + } + + public Criteria andProductSkuCodeNotLike(String value) { + addCriterion("product_sku_code not like", value, "productSkuCode"); + return (Criteria) this; + } + + public Criteria andProductSkuCodeIn(List values) { + addCriterion("product_sku_code in", values, "productSkuCode"); + return (Criteria) this; + } + + public Criteria andProductSkuCodeNotIn(List values) { + addCriterion("product_sku_code not in", values, "productSkuCode"); + return (Criteria) this; + } + + public Criteria andProductSkuCodeBetween(String value1, String value2) { + addCriterion("product_sku_code between", value1, value2, "productSkuCode"); + return (Criteria) this; + } + + public Criteria andProductSkuCodeNotBetween(String value1, String value2) { + addCriterion("product_sku_code not between", value1, value2, "productSkuCode"); + return (Criteria) this; + } + + public Criteria andProductCategoryIdIsNull() { + addCriterion("product_category_id is null"); + return (Criteria) this; + } + + public Criteria andProductCategoryIdIsNotNull() { + addCriterion("product_category_id is not null"); + return (Criteria) this; + } + + public Criteria andProductCategoryIdEqualTo(Long value) { + addCriterion("product_category_id =", value, "productCategoryId"); + return (Criteria) this; + } + + public Criteria andProductCategoryIdNotEqualTo(Long value) { + addCriterion("product_category_id <>", value, "productCategoryId"); + return (Criteria) this; + } + + public Criteria andProductCategoryIdGreaterThan(Long value) { + addCriterion("product_category_id >", value, "productCategoryId"); + return (Criteria) this; + } + + public Criteria andProductCategoryIdGreaterThanOrEqualTo(Long value) { + addCriterion("product_category_id >=", value, "productCategoryId"); + return (Criteria) this; + } + + public Criteria andProductCategoryIdLessThan(Long value) { + addCriterion("product_category_id <", value, "productCategoryId"); + return (Criteria) this; + } + + public Criteria andProductCategoryIdLessThanOrEqualTo(Long value) { + addCriterion("product_category_id <=", value, "productCategoryId"); + return (Criteria) this; + } + + public Criteria andProductCategoryIdIn(List values) { + addCriterion("product_category_id in", values, "productCategoryId"); + return (Criteria) this; + } + + public Criteria andProductCategoryIdNotIn(List values) { + addCriterion("product_category_id not in", values, "productCategoryId"); + return (Criteria) this; + } + + public Criteria andProductCategoryIdBetween(Long value1, Long value2) { + addCriterion("product_category_id between", value1, value2, "productCategoryId"); + return (Criteria) this; + } + + public Criteria andProductCategoryIdNotBetween(Long value1, Long value2) { + addCriterion("product_category_id not between", value1, value2, "productCategoryId"); return (Criteria) this; } @@ -1024,6 +1154,436 @@ public class OmsOrderItemExample { addCriterion("sp3 not between", value1, value2, "sp3"); return (Criteria) this; } + + public Criteria andPromotionNameIsNull() { + addCriterion("promotion_name is null"); + return (Criteria) this; + } + + public Criteria andPromotionNameIsNotNull() { + addCriterion("promotion_name is not null"); + return (Criteria) this; + } + + public Criteria andPromotionNameEqualTo(String value) { + addCriterion("promotion_name =", value, "promotionName"); + return (Criteria) this; + } + + public Criteria andPromotionNameNotEqualTo(String value) { + addCriterion("promotion_name <>", value, "promotionName"); + return (Criteria) this; + } + + public Criteria andPromotionNameGreaterThan(String value) { + addCriterion("promotion_name >", value, "promotionName"); + return (Criteria) this; + } + + public Criteria andPromotionNameGreaterThanOrEqualTo(String value) { + addCriterion("promotion_name >=", value, "promotionName"); + return (Criteria) this; + } + + public Criteria andPromotionNameLessThan(String value) { + addCriterion("promotion_name <", value, "promotionName"); + return (Criteria) this; + } + + public Criteria andPromotionNameLessThanOrEqualTo(String value) { + addCriterion("promotion_name <=", value, "promotionName"); + return (Criteria) this; + } + + public Criteria andPromotionNameLike(String value) { + addCriterion("promotion_name like", value, "promotionName"); + return (Criteria) this; + } + + public Criteria andPromotionNameNotLike(String value) { + addCriterion("promotion_name not like", value, "promotionName"); + return (Criteria) this; + } + + public Criteria andPromotionNameIn(List values) { + addCriterion("promotion_name in", values, "promotionName"); + return (Criteria) this; + } + + public Criteria andPromotionNameNotIn(List values) { + addCriterion("promotion_name not in", values, "promotionName"); + return (Criteria) this; + } + + public Criteria andPromotionNameBetween(String value1, String value2) { + addCriterion("promotion_name between", value1, value2, "promotionName"); + return (Criteria) this; + } + + public Criteria andPromotionNameNotBetween(String value1, String value2) { + addCriterion("promotion_name not between", value1, value2, "promotionName"); + return (Criteria) this; + } + + public Criteria andPromotionAmountIsNull() { + addCriterion("promotion_amount is null"); + return (Criteria) this; + } + + public Criteria andPromotionAmountIsNotNull() { + addCriterion("promotion_amount is not null"); + return (Criteria) this; + } + + public Criteria andPromotionAmountEqualTo(BigDecimal value) { + addCriterion("promotion_amount =", value, "promotionAmount"); + return (Criteria) this; + } + + public Criteria andPromotionAmountNotEqualTo(BigDecimal value) { + addCriterion("promotion_amount <>", value, "promotionAmount"); + return (Criteria) this; + } + + public Criteria andPromotionAmountGreaterThan(BigDecimal value) { + addCriterion("promotion_amount >", value, "promotionAmount"); + return (Criteria) this; + } + + public Criteria andPromotionAmountGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("promotion_amount >=", value, "promotionAmount"); + return (Criteria) this; + } + + public Criteria andPromotionAmountLessThan(BigDecimal value) { + addCriterion("promotion_amount <", value, "promotionAmount"); + return (Criteria) this; + } + + public Criteria andPromotionAmountLessThanOrEqualTo(BigDecimal value) { + addCriterion("promotion_amount <=", value, "promotionAmount"); + return (Criteria) this; + } + + public Criteria andPromotionAmountIn(List values) { + addCriterion("promotion_amount in", values, "promotionAmount"); + return (Criteria) this; + } + + public Criteria andPromotionAmountNotIn(List values) { + addCriterion("promotion_amount not in", values, "promotionAmount"); + return (Criteria) this; + } + + public Criteria andPromotionAmountBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("promotion_amount between", value1, value2, "promotionAmount"); + return (Criteria) this; + } + + public Criteria andPromotionAmountNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("promotion_amount not between", value1, value2, "promotionAmount"); + return (Criteria) this; + } + + public Criteria andCouponAmountIsNull() { + addCriterion("coupon_amount is null"); + return (Criteria) this; + } + + public Criteria andCouponAmountIsNotNull() { + addCriterion("coupon_amount is not null"); + return (Criteria) this; + } + + public Criteria andCouponAmountEqualTo(BigDecimal value) { + addCriterion("coupon_amount =", value, "couponAmount"); + return (Criteria) this; + } + + public Criteria andCouponAmountNotEqualTo(BigDecimal value) { + addCriterion("coupon_amount <>", value, "couponAmount"); + return (Criteria) this; + } + + public Criteria andCouponAmountGreaterThan(BigDecimal value) { + addCriterion("coupon_amount >", value, "couponAmount"); + return (Criteria) this; + } + + public Criteria andCouponAmountGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("coupon_amount >=", value, "couponAmount"); + return (Criteria) this; + } + + public Criteria andCouponAmountLessThan(BigDecimal value) { + addCriterion("coupon_amount <", value, "couponAmount"); + return (Criteria) this; + } + + public Criteria andCouponAmountLessThanOrEqualTo(BigDecimal value) { + addCriterion("coupon_amount <=", value, "couponAmount"); + return (Criteria) this; + } + + public Criteria andCouponAmountIn(List values) { + addCriterion("coupon_amount in", values, "couponAmount"); + return (Criteria) this; + } + + public Criteria andCouponAmountNotIn(List values) { + addCriterion("coupon_amount not in", values, "couponAmount"); + return (Criteria) this; + } + + public Criteria andCouponAmountBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("coupon_amount between", value1, value2, "couponAmount"); + return (Criteria) this; + } + + public Criteria andCouponAmountNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("coupon_amount not between", value1, value2, "couponAmount"); + return (Criteria) this; + } + + public Criteria andIntegrationAmountIsNull() { + addCriterion("integration_amount is null"); + return (Criteria) this; + } + + public Criteria andIntegrationAmountIsNotNull() { + addCriterion("integration_amount is not null"); + return (Criteria) this; + } + + public Criteria andIntegrationAmountEqualTo(BigDecimal value) { + addCriterion("integration_amount =", value, "integrationAmount"); + return (Criteria) this; + } + + public Criteria andIntegrationAmountNotEqualTo(BigDecimal value) { + addCriterion("integration_amount <>", value, "integrationAmount"); + return (Criteria) this; + } + + public Criteria andIntegrationAmountGreaterThan(BigDecimal value) { + addCriterion("integration_amount >", value, "integrationAmount"); + return (Criteria) this; + } + + public Criteria andIntegrationAmountGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("integration_amount >=", value, "integrationAmount"); + return (Criteria) this; + } + + public Criteria andIntegrationAmountLessThan(BigDecimal value) { + addCriterion("integration_amount <", value, "integrationAmount"); + return (Criteria) this; + } + + public Criteria andIntegrationAmountLessThanOrEqualTo(BigDecimal value) { + addCriterion("integration_amount <=", value, "integrationAmount"); + return (Criteria) this; + } + + public Criteria andIntegrationAmountIn(List values) { + addCriterion("integration_amount in", values, "integrationAmount"); + return (Criteria) this; + } + + public Criteria andIntegrationAmountNotIn(List values) { + addCriterion("integration_amount not in", values, "integrationAmount"); + return (Criteria) this; + } + + public Criteria andIntegrationAmountBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("integration_amount between", value1, value2, "integrationAmount"); + return (Criteria) this; + } + + public Criteria andIntegrationAmountNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("integration_amount not between", value1, value2, "integrationAmount"); + return (Criteria) this; + } + + public Criteria andRealAmountIsNull() { + addCriterion("real_amount is null"); + return (Criteria) this; + } + + public Criteria andRealAmountIsNotNull() { + addCriterion("real_amount is not null"); + return (Criteria) this; + } + + public Criteria andRealAmountEqualTo(BigDecimal value) { + addCriterion("real_amount =", value, "realAmount"); + return (Criteria) this; + } + + public Criteria andRealAmountNotEqualTo(BigDecimal value) { + addCriterion("real_amount <>", value, "realAmount"); + return (Criteria) this; + } + + public Criteria andRealAmountGreaterThan(BigDecimal value) { + addCriterion("real_amount >", value, "realAmount"); + return (Criteria) this; + } + + public Criteria andRealAmountGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("real_amount >=", value, "realAmount"); + return (Criteria) this; + } + + public Criteria andRealAmountLessThan(BigDecimal value) { + addCriterion("real_amount <", value, "realAmount"); + return (Criteria) this; + } + + public Criteria andRealAmountLessThanOrEqualTo(BigDecimal value) { + addCriterion("real_amount <=", value, "realAmount"); + return (Criteria) this; + } + + public Criteria andRealAmountIn(List values) { + addCriterion("real_amount in", values, "realAmount"); + return (Criteria) this; + } + + public Criteria andRealAmountNotIn(List values) { + addCriterion("real_amount not in", values, "realAmount"); + return (Criteria) this; + } + + public Criteria andRealAmountBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("real_amount between", value1, value2, "realAmount"); + return (Criteria) this; + } + + public Criteria andRealAmountNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("real_amount not between", value1, value2, "realAmount"); + return (Criteria) this; + } + + public Criteria andGiftIntegrationIsNull() { + addCriterion("gift_integration is null"); + return (Criteria) this; + } + + public Criteria andGiftIntegrationIsNotNull() { + addCriterion("gift_integration is not null"); + return (Criteria) this; + } + + public Criteria andGiftIntegrationEqualTo(Integer value) { + addCriterion("gift_integration =", value, "giftIntegration"); + return (Criteria) this; + } + + public Criteria andGiftIntegrationNotEqualTo(Integer value) { + addCriterion("gift_integration <>", value, "giftIntegration"); + return (Criteria) this; + } + + public Criteria andGiftIntegrationGreaterThan(Integer value) { + addCriterion("gift_integration >", value, "giftIntegration"); + return (Criteria) this; + } + + public Criteria andGiftIntegrationGreaterThanOrEqualTo(Integer value) { + addCriterion("gift_integration >=", value, "giftIntegration"); + return (Criteria) this; + } + + public Criteria andGiftIntegrationLessThan(Integer value) { + addCriterion("gift_integration <", value, "giftIntegration"); + return (Criteria) this; + } + + public Criteria andGiftIntegrationLessThanOrEqualTo(Integer value) { + addCriterion("gift_integration <=", value, "giftIntegration"); + return (Criteria) this; + } + + public Criteria andGiftIntegrationIn(List values) { + addCriterion("gift_integration in", values, "giftIntegration"); + return (Criteria) this; + } + + public Criteria andGiftIntegrationNotIn(List values) { + addCriterion("gift_integration not in", values, "giftIntegration"); + return (Criteria) this; + } + + public Criteria andGiftIntegrationBetween(Integer value1, Integer value2) { + addCriterion("gift_integration between", value1, value2, "giftIntegration"); + return (Criteria) this; + } + + public Criteria andGiftIntegrationNotBetween(Integer value1, Integer value2) { + addCriterion("gift_integration not between", value1, value2, "giftIntegration"); + return (Criteria) this; + } + + public Criteria andGiftGrowthIsNull() { + addCriterion("gift_growth is null"); + return (Criteria) this; + } + + public Criteria andGiftGrowthIsNotNull() { + addCriterion("gift_growth is not null"); + return (Criteria) this; + } + + public Criteria andGiftGrowthEqualTo(Integer value) { + addCriterion("gift_growth =", value, "giftGrowth"); + return (Criteria) this; + } + + public Criteria andGiftGrowthNotEqualTo(Integer value) { + addCriterion("gift_growth <>", value, "giftGrowth"); + return (Criteria) this; + } + + public Criteria andGiftGrowthGreaterThan(Integer value) { + addCriterion("gift_growth >", value, "giftGrowth"); + return (Criteria) this; + } + + public Criteria andGiftGrowthGreaterThanOrEqualTo(Integer value) { + addCriterion("gift_growth >=", value, "giftGrowth"); + return (Criteria) this; + } + + public Criteria andGiftGrowthLessThan(Integer value) { + addCriterion("gift_growth <", value, "giftGrowth"); + return (Criteria) this; + } + + public Criteria andGiftGrowthLessThanOrEqualTo(Integer value) { + addCriterion("gift_growth <=", value, "giftGrowth"); + return (Criteria) this; + } + + public Criteria andGiftGrowthIn(List values) { + addCriterion("gift_growth in", values, "giftGrowth"); + return (Criteria) this; + } + + public Criteria andGiftGrowthNotIn(List values) { + addCriterion("gift_growth not in", values, "giftGrowth"); + return (Criteria) this; + } + + public Criteria andGiftGrowthBetween(Integer value1, Integer value2) { + addCriterion("gift_growth between", value1, value2, "giftGrowth"); + return (Criteria) this; + } + + public Criteria andGiftGrowthNotBetween(Integer value1, Integer value2) { + addCriterion("gift_growth not between", value1, value2, "giftGrowth"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsCartItemMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsCartItemMapper.xml index f2145f6..e1c29d3 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsCartItemMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsCartItemMapper.xml @@ -20,6 +20,8 @@ + + @@ -82,7 +84,7 @@ 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 @@ -306,6 +322,12 @@ product_category_id = #{record.productCategoryId,jdbcType=BIGINT}, + + product_brand = #{record.productBrand,jdbcType=VARCHAR}, + + + product_sn = #{record.productSn,jdbcType=VARCHAR}, + @@ -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} @@ -389,6 +413,12 @@ product_category_id = #{productCategoryId,jdbcType=BIGINT}, + + product_brand = #{productBrand,jdbcType=VARCHAR}, + + + product_sn = #{productSn,jdbcType=VARCHAR}, + where id = #{id,jdbcType=BIGINT} @@ -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} \ No newline at end of file diff --git a/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsOrderItemMapper.xml b/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsOrderItemMapper.xml index fa834e4..b53d64b 100644 --- a/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsOrderItemMapper.xml +++ b/mall-mbg/src/main/resources/com/macro/mall/mapper/OmsOrderItemMapper.xml @@ -6,16 +6,25 @@ - + - - - + + + + + + + + + + + + @@ -76,8 +85,10 @@ - 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 @@ -233,8 +304,8 @@ product_id = #{record.productId,jdbcType=BIGINT}, - - proudct_pic = #{record.proudctPic,jdbcType=VARCHAR}, + + product_pic = #{record.productPic,jdbcType=VARCHAR}, product_name = #{record.productName,jdbcType=VARCHAR}, @@ -245,14 +316,20 @@ product_sn = #{record.productSn,jdbcType=VARCHAR}, - - product_amount = #{record.productAmount,jdbcType=DECIMAL}, + + product_price = #{record.productPrice,jdbcType=DECIMAL}, - - product_count = #{record.productCount,jdbcType=INTEGER}, + + product_quantity = #{record.productQuantity,jdbcType=INTEGER}, - - product_real_amount = #{record.productRealAmount,jdbcType=DECIMAL}, + + 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}, @@ -263,6 +340,27 @@ 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}, + @@ -274,16 +372,25 @@ order_id = #{record.orderId,jdbcType=BIGINT}, order_sn = #{record.orderSn,jdbcType=VARCHAR}, product_id = #{record.productId,jdbcType=BIGINT}, - proudct_pic = #{record.proudctPic,jdbcType=VARCHAR}, + product_pic = #{record.productPic,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} @@ -300,8 +407,8 @@ product_id = #{productId,jdbcType=BIGINT}, - - proudct_pic = #{proudctPic,jdbcType=VARCHAR}, + + product_pic = #{productPic,jdbcType=VARCHAR}, product_name = #{productName,jdbcType=VARCHAR}, @@ -312,14 +419,20 @@ product_sn = #{productSn,jdbcType=VARCHAR}, - - product_amount = #{productAmount,jdbcType=DECIMAL}, + + product_price = #{productPrice,jdbcType=DECIMAL}, - - product_count = #{productCount,jdbcType=INTEGER}, + + product_quantity = #{productQuantity,jdbcType=INTEGER}, - - product_real_amount = #{productRealAmount,jdbcType=DECIMAL}, + + product_sku_id = #{productSkuId,jdbcType=BIGINT}, + + + product_sku_code = #{productSkuCode,jdbcType=VARCHAR}, + + + product_category_id = #{productCategoryId,jdbcType=BIGINT}, sp1 = #{sp1,jdbcType=VARCHAR}, @@ -330,6 +443,27 @@ 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} @@ -338,16 +472,25 @@ set order_id = #{orderId,jdbcType=BIGINT}, order_sn = #{orderSn,jdbcType=VARCHAR}, product_id = #{productId,jdbcType=BIGINT}, - proudct_pic = #{proudctPic,jdbcType=VARCHAR}, + product_pic = #{productPic,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} \ No newline at end of file diff --git a/mall-portal/src/main/java/com/macro/mall/portal/dao/PortalOrderItemDao.java b/mall-portal/src/main/java/com/macro/mall/portal/dao/PortalOrderItemDao.java new file mode 100644 index 0000000..22dbfed --- /dev/null +++ b/mall-portal/src/main/java/com/macro/mall/portal/dao/PortalOrderItemDao.java @@ -0,0 +1,14 @@ +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 list); +} diff --git a/mall-portal/src/main/java/com/macro/mall/portal/domain/CartPromotionItem.java b/mall-portal/src/main/java/com/macro/mall/portal/domain/CartPromotionItem.java index 5596b18..57aad9d 100644 --- a/mall-portal/src/main/java/com/macro/mall/portal/domain/CartPromotionItem.java +++ b/mall-portal/src/main/java/com/macro/mall/portal/domain/CartPromotionItem.java @@ -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; + } } diff --git a/mall-portal/src/main/java/com/macro/mall/portal/domain/OrderParam.java b/mall-portal/src/main/java/com/macro/mall/portal/domain/OrderParam.java index 3ba2fea..c5abbd8 100644 --- a/mall-portal/src/main/java/com/macro/mall/portal/domain/OrderParam.java +++ b/mall-portal/src/main/java/com/macro/mall/portal/domain/OrderParam.java @@ -10,7 +10,7 @@ public class OrderParam { //优惠券id private Long couponId; //使用的积分数 - private Integer useIngegration; + private Integer useIntegration; //支付方式 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; + } } diff --git a/mall-portal/src/main/java/com/macro/mall/portal/service/impl/OmsCartItemServiceImpl.java b/mall-portal/src/main/java/com/macro/mall/portal/service/impl/OmsCartItemServiceImpl.java index 10d5447..2806855 100644 --- a/mall-portal/src/main/java/com/macro/mall/portal/service/impl/OmsCartItemServiceImpl.java +++ b/mall-portal/src/main/java/com/macro/mall/portal/service/impl/OmsCartItemServiceImpl.java @@ -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 listPromotion(Long memberId) { List cartItemList = list(memberId); - return promotionService.calcCartPromotion(cartItemList); + List cartPromotionItemList = new ArrayList<>(); + if(!CollectionUtils.isEmpty(cartItemList)){ + cartPromotionItemList = promotionService.calcCartPromotion(cartItemList); + } + return cartPromotionItemList; } @Override diff --git a/mall-portal/src/main/java/com/macro/mall/portal/service/impl/OmsPortalOrderServiceImpl.java b/mall-portal/src/main/java/com/macro/mall/portal/service/impl/OmsPortalOrderServiceImpl.java index 9038305..e70e7b6 100644 --- a/mall-portal/src/main/java/com/macro/mall/portal/service/impl/OmsPortalOrderServiceImpl.java +++ b/mall-portal/src/main/java/com/macro/mall/portal/service/impl/OmsPortalOrderServiceImpl.java @@ -1,15 +1,21 @@ package com.macro.mall.portal.service.impl; +import com.macro.mall.mapper.OmsOrderMapper; import com.macro.mall.mapper.PmsSkuStockMapper; +import com.macro.mall.mapper.SmsCouponHistoryMapper; import com.macro.mall.mapper.UmsIntegrationConsumeSettingMapper; import com.macro.mall.model.*; +import com.macro.mall.portal.dao.PortalOrderItemDao; +import com.macro.mall.portal.dao.SmsCouponHistoryDao; import com.macro.mall.portal.domain.*; import com.macro.mall.portal.service.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; import java.math.BigDecimal; -import java.util.List; +import java.math.RoundingMode; +import java.util.*; /** * 前台订单管理Service @@ -29,6 +35,15 @@ public class OmsPortalOrderServiceImpl implements OmsPortalOrderService { private UmsIntegrationConsumeSettingMapper integrationConsumeSettingMapper; @Autowired private PmsSkuStockMapper skuStockMapper; + @Autowired + private SmsCouponHistoryDao couponHistoryDao; + @Autowired + private OmsOrderMapper orderMapper; + @Autowired + private PortalOrderItemDao orderItemDao; + @Autowired + private SmsCouponHistoryMapper couponHistoryMapper; + @Override public ConfirmOrderResult generateConfirmOrder() { ConfirmOrderResult result = new ConfirmOrderResult(); @@ -55,32 +70,411 @@ public class OmsPortalOrderServiceImpl implements OmsPortalOrderService { @Override public CommonResult generateOrder(OrderParam orderParam) { + List orderItemList = new ArrayList<>(); //获取购物车及优惠信息 UmsMember currentMember = memberService.getCurrentMember(); List cartPromotionItemList = cartItemService.listPromotion(currentMember.getId()); + for (CartPromotionItem cartPromotionItem : cartPromotionItemList) { + //生成下单商品信息 + OmsOrderItem orderItem = new OmsOrderItem(); + orderItem.setProductId(cartPromotionItem.getProductId()); + orderItem.setProductName(cartPromotionItem.getProductName()); + orderItem.setProductPic(cartPromotionItem.getProductPic()); + orderItem.setProductBrand(cartPromotionItem.getProductBrand()); + orderItem.setProductSn(cartPromotionItem.getProductSn()); + orderItem.setProductPrice(cartPromotionItem.getPrice()); + orderItem.setProductQuantity(cartPromotionItem.getQuantity()); + orderItem.setProductSkuId(cartPromotionItem.getProductSkuId()); + orderItem.setProductSkuCode(cartPromotionItem.getProductSkuCode()); + orderItem.setProductCategoryId(cartPromotionItem.getProductCategoryId()); + orderItem.setPromotionAmount(cartPromotionItem.getReduceAmount()); + orderItem.setPromotionName(cartPromotionItem.getPromotionMessage()); + orderItem.setGiftIntegration(cartPromotionItem.getIntegration()); + orderItem.setGiftGrowth(cartPromotionItem.getGrowth()); + orderItemList.add(orderItem); + } //判断购物车中商品是否都有库存 - if(!hasStock(cartPromotionItemList)){ + if (!hasStock(cartPromotionItemList)) { return new CommonResult().failed("库存不足,无法下单"); } - //判断优惠券是否可用 - //可用情况下分摊到可用商品中 - //判断积分是否可用 - //可用情况下分摊到可用商品中 + //判断使用使用了优惠券 + if (orderParam.getCouponId() == null) { + //不用优惠券 + for (OmsOrderItem orderItem : orderItemList) { + orderItem.setCouponAmount(new BigDecimal(0)); + } + } else { + //使用优惠券 + SmsCouponHistoryDetail couponHistoryDetail = getUseCoupon(cartPromotionItemList, orderParam.getCouponId()); + if (couponHistoryDetail == null) { + return new CommonResult().failed("该优惠券不可用"); + } + //对下单商品的优惠券进行处理 + handleCouponAmount(orderItemList, couponHistoryDetail); + } + //判断是否使用积分 + if (orderParam.getUseIntegration() == null) { + //不使用积分 + for (OmsOrderItem orderItem : orderItemList) { + orderItem.setIntegrationAmount(new BigDecimal(0)); + } + } else { + //使用积分 + BigDecimal totalAmount = calcTotalAmount(orderItemList); + BigDecimal integrationAmount = getUseIntegrationAmount(orderParam.getUseIntegration(), totalAmount, currentMember, orderParam.getCouponId() != null); + if (integrationAmount.compareTo(new BigDecimal(0)) == 0) { + return new CommonResult().failed("积分不可用"); + } else { + //可用情况下分摊到可用商品中 + for (OmsOrderItem orderItem : orderItemList) { + BigDecimal perAmount = orderItem.getProductPrice().divide(totalAmount, 3,RoundingMode.HALF_EVEN).multiply(integrationAmount); + orderItem.setIntegrationAmount(perAmount); + } + } + } + //计算order_item的实付金额 + handleRealAmount(orderItemList); //进行库存锁定 lockStock(cartPromotionItemList); - //计算运费 //根据商品合计、运费、活动优惠、优惠券、积分计算应付金额 + OmsOrder order = new OmsOrder(); + order.setTotalAmount(calcTotalAmount(orderItemList)); + order.setFreightAmount(new BigDecimal(0)); + order.setPromotionAmount(calcPromotionAmount(orderItemList)); + order.setPromotionInfo(getOrderPromotionInfo(orderItemList)); + if (orderParam.getCouponId() == null) { + order.setCouponAmount(new BigDecimal(0)); + } else { + order.setCouponId(orderParam.getCouponId()); + order.setCouponAmount(calcCouponAmount(orderItemList)); + } + if (orderParam.getUseIntegration() == null) { + order.setIntegration(0); + order.setIntegrationAmount(new BigDecimal(0)); + } else { + order.setIntegration(orderParam.getUseIntegration()); + order.setIntegrationAmount(calcIntegrationAmount(orderItemList)); + } + order.setPayAmount(calcPayAmount(order)); //转化为订单信息并插入数据库 + order.setMemberId(currentMember.getId()); + order.setCreateTime(new Date()); + order.setMemberUsername(currentMember.getUsername()); + //支付方式:0->未支付;1->支付宝;2->微信 + order.setPayType(orderParam.getPayType()); + //订单来源:0->PC订单;1->app订单 + order.setSourceType(1); + //订单状态:0->待付款;1->待发货;2->已发货;3->已完成;4->已关闭;5->无效订单 + order.setStatus(0); + //订单类型:0->正常订单;1->秒杀订单 + order.setOrderType(0); + //收货人信息:姓名、电话、邮编、地址 + UmsMemberReceiveAddress address = memberReceiveAddressService.getItem(orderParam.getMemberReceiveAddressId()); + order.setReceiverName(address.getName()); + order.setReceiverPhone(address.getPhoneNumber()); + order.setReceiverPostCode(address.getPostCode()); + order.setReceiverProvince(address.getProvince()); + order.setReceiverCity(address.getCity()); + order.setReceiverRegion(address.getRegion()); + order.setReceiverDetailAddress(address.getDetailAddress()); + //0->未确认;1->已确认 + order.setConfirmStatus(0); + order.setDeleteStatus(0); + //计算赠送积分 + order.setIntegration(calcGifIntegration(orderItemList)); + //计算赠送成长值 + order.setGrowth(calcGiftGrowth(orderItemList)); + // TODO: 2018/9/3 order_sn,bill_*,delivery_* + //插入order表和order_item表 + orderMapper.insert(order); + for (OmsOrderItem orderItem : orderItemList) { + orderItem.setOrderId(order.getId()); + } + orderItemDao.insertList(orderItemList); + //更新优惠券使用状态 + updateCouponStatus(orderParam.getCouponId(),currentMember); + //删除购物车中的下单商品 + deleteCartItemList(cartPromotionItemList,currentMember); + Map result = new HashMap<>(); + result.put("order",order); + result.put("orderItemList",orderItemList); + return new CommonResult().success("下单成功", result); + } + + /** + * 删除下单商品的购物车信息 + */ + private void deleteCartItemList(List cartPromotionItemList, UmsMember currentMember) { + List ids = new ArrayList<>(); + for (CartPromotionItem cartPromotionItem : cartPromotionItemList) { + ids.add(cartPromotionItem.getId()); + } + cartItemService.delete(currentMember.getId(),ids); + } + + /** + * 计算该订单赠送的成长值 + */ + private Integer calcGiftGrowth(List orderItemList) { + Integer sum=0; + for (OmsOrderItem orderItem : orderItemList) { + sum=sum+orderItem.getGiftGrowth()*orderItem.getProductQuantity(); + } + return sum; + } + + /** + * 计算该订单赠送的积分 + */ + private Integer calcGifIntegration(List orderItemList) { + int sum=0; + for (OmsOrderItem orderItem : orderItemList) { + sum+=orderItem.getGiftIntegration()*orderItem.getProductQuantity(); + } + return sum; + } + + /** + * 更新sms_coupon_history的可用信息 + * @param couponId 优惠券id + * @param currentMember 当前会员 + */ + private void updateCouponStatus(Long couponId, UmsMember currentMember) { + SmsCouponHistory record = new SmsCouponHistory(); + record.setUseStatus(1); + //查询第一张未使用优惠券 + SmsCouponHistoryExample example = new SmsCouponHistoryExample(); + example.createCriteria().andMemberIdEqualTo(currentMember.getId()) + .andCouponIdEqualTo(couponId).andUseStatusEqualTo(0); + List couponHistoryList = couponHistoryMapper.selectByExample(example); + if(!CollectionUtils.isEmpty(couponHistoryList)){ + SmsCouponHistory couponHistory = couponHistoryList.get(0); + couponHistory.setUseTime(new Date()); + couponHistory.setUseStatus(1); + couponHistoryMapper.updateByPrimaryKeySelective(couponHistory); + } + } + + private void handleRealAmount(List orderItemList) { + for (OmsOrderItem orderItem : orderItemList) { + //原价-促销价格-优惠券抵扣-积分抵扣 + BigDecimal realAmount = orderItem.getProductPrice() + .subtract(orderItem.getPromotionAmount()) + .subtract(orderItem.getCouponAmount()) + .subtract(orderItem.getIntegrationAmount()); + orderItem.setRealAmount(realAmount); + } + } + + /** + * 获取订单促销信息 + */ + private String getOrderPromotionInfo(List orderItemList) { + StringBuilder sb = new StringBuilder(); + for (OmsOrderItem orderItem : orderItemList) { + sb.append(orderItem.getPromotionName()); + sb.append(","); + } + String result = sb.toString(); + if (result.endsWith(",")) { + result = result.substring(0, result.length() - 1); + } + return result; + } + + /** + * 计算订单应付金额 + */ + private BigDecimal calcPayAmount(OmsOrder order) { + //总金额+运费-促销优惠-优惠券优惠-积分抵扣 + BigDecimal payAmount = order.getTotalAmount() + .add(order.getFreightAmount()) + .subtract(order.getPromotionAmount()) + .subtract(order.getCouponAmount()) + .subtract(order.getIntegrationAmount()); + return payAmount; + } + + /** + * 计算订单优惠券金额 + */ + private BigDecimal calcIntegrationAmount(List orderItemList) { + BigDecimal integrationAmount = new BigDecimal(0); + for (OmsOrderItem orderItem : orderItemList) { + if (orderItem.getIntegrationAmount() != null) { + integrationAmount = integrationAmount.add(orderItem.getIntegrationAmount().multiply(new BigDecimal(orderItem.getProductQuantity()))); + } + } + return integrationAmount; + } + + /** + * 计算订单优惠券金额 + */ + private BigDecimal calcCouponAmount(List orderItemList) { + BigDecimal couponAmount = new BigDecimal(0); + for (OmsOrderItem orderItem : orderItemList) { + if (orderItem.getCouponAmount() != null) { + couponAmount = couponAmount.add(orderItem.getCouponAmount().multiply(new BigDecimal(orderItem.getProductQuantity()))); + } + } + return couponAmount; + } + + /** + * 计算订单活动优惠 + */ + private BigDecimal calcPromotionAmount(List orderItemList) { + BigDecimal promotionAmount = new BigDecimal(0); + for (OmsOrderItem orderItem : orderItemList) { + if (orderItem.getPromotionAmount() != null) { + promotionAmount = promotionAmount.add(orderItem.getPromotionAmount().multiply(new BigDecimal(orderItem.getProductQuantity()))); + } + } + return promotionAmount; + } + + /** + * 获取可用积分抵扣金额 + * + * @param useIntegration 使用的积分数量 + * @param totalAmount 订单总金额 + * @param currentMember 使用的用户 + * @param hasCoupon 是否已经使用优惠券 + */ + private BigDecimal getUseIntegrationAmount(Integer useIntegration, BigDecimal totalAmount, UmsMember currentMember, boolean hasCoupon) { + BigDecimal zeroAmount = new BigDecimal(0); + //判断用户是否有这么多积分 + if (useIntegration.compareTo(currentMember.getIntegration()) > 0) { + return zeroAmount; + } + //根据积分使用规则判断使用可用 + //是否可用于优惠券共用 + UmsIntegrationConsumeSetting integrationConsumeSetting = integrationConsumeSettingMapper.selectByPrimaryKey(1L); + if (hasCoupon && integrationConsumeSetting.getCouponStatus().equals(0)) { + //不可与优惠券共用 + return zeroAmount; + } + //是否达到最低使用积分门槛 + if (useIntegration.compareTo(integrationConsumeSetting.getUseUnit()) < 0) { + return zeroAmount; + } + //是否超过订单抵用最高百分比 + BigDecimal integrationAmount = new BigDecimal(useIntegration).divide(new BigDecimal(integrationConsumeSetting.getUseUnit()), 2,RoundingMode.HALF_EVEN); + BigDecimal maxPercent = new BigDecimal(integrationConsumeSetting.getMaxPercentPerOrder()).divide(new BigDecimal(100), 2, RoundingMode.HALF_EVEN); + if (integrationAmount.compareTo(totalAmount.multiply(maxPercent)) > 0) { + return zeroAmount; + } + return integrationAmount; + } + + /** + * 对优惠券优惠进行处理 + * + * @param orderItemList order_item列表 + * @param couponHistoryDetail 可用优惠券详情 + */ + private void handleCouponAmount(List orderItemList, SmsCouponHistoryDetail couponHistoryDetail) { + SmsCoupon coupon = couponHistoryDetail.getCoupon(); + if (coupon.getUseType().equals(0)) { + //全场通用 + calcPerCouponAmount(orderItemList, coupon); + } else if (coupon.getUseType().equals(1)) { + //指定分类 + List couponOrderItemList = getCouponOrderItemByRelation(couponHistoryDetail, orderItemList, 0); + calcPerCouponAmount(couponOrderItemList, coupon); + } else if (coupon.getUseType().equals(2)) { + //指定商品 + List couponOrderItemList = getCouponOrderItemByRelation(couponHistoryDetail, orderItemList, 1); + calcPerCouponAmount(couponOrderItemList, coupon); + } + } + + /** + * 对每个下单商品进行优惠券金额分摊的计算 + * + * @param orderItemList 可用优惠券的下单商品商品 + */ + private void calcPerCouponAmount(List orderItemList, SmsCoupon coupon) { + BigDecimal totalAmount = calcTotalAmount(orderItemList); + for (OmsOrderItem orderItem : orderItemList) { + //(商品价格/可用商品总价)*优惠券面额 + BigDecimal couponAmount = orderItem.getProductPrice().divide(totalAmount, 3, RoundingMode.HALF_EVEN).multiply(coupon.getAmount()); + orderItem.setCouponAmount(couponAmount); + } + } + + /** + * 获取与优惠券有关系的下单商品 + * + * @param couponHistoryDetail 优惠券详情 + * @param orderItemList 下单商品 + * @param type 使用关系类型:0->相关分类;1->指定商品 + */ + private List getCouponOrderItemByRelation(SmsCouponHistoryDetail couponHistoryDetail, List orderItemList, int type) { + List result = new ArrayList<>(); + if (type == 0) { + List categoryIdList = new ArrayList<>(); + for (SmsCouponProductCategoryRelation productCategoryRelation : couponHistoryDetail.getCategoryRelationList()) { + categoryIdList.add(productCategoryRelation.getProductCategoryId()); + } + for (OmsOrderItem orderItem : orderItemList) { + if (categoryIdList.contains(orderItem.getProductCategoryId())) { + result.add(orderItem); + } else { + orderItem.setCouponAmount(new BigDecimal(0)); + } + } + } else if (type == 1) { + List productIdList = new ArrayList<>(); + for (SmsCouponProductRelation productRelation : couponHistoryDetail.getProductRelationList()) { + productIdList.add(productRelation.getProductId()); + } + for (OmsOrderItem orderItem : orderItemList) { + if (productIdList.contains(orderItem.getProductId())) { + result.add(orderItem); + } else { + orderItem.setCouponAmount(new BigDecimal(0)); + } + } + } + return result; + } + + /** + * 获取该用户可以使用的优惠券 + * + * @param cartPromotionItemList 购物车优惠列表 + * @param couponId 使用优惠券id + */ + private SmsCouponHistoryDetail getUseCoupon(List cartPromotionItemList, Long couponId) { + List couponHistoryDetailList = memberCouponService.listCart(cartPromotionItemList, 1); + for (SmsCouponHistoryDetail couponHistoryDetail : couponHistoryDetailList) { + if (couponHistoryDetail.getCoupon().getId().equals(couponId)) { + return couponHistoryDetail; + } + } return null; } + /** + * 计算总金额 + */ + private BigDecimal calcTotalAmount(List orderItemList) { + BigDecimal totalAmount = new BigDecimal("0"); + for (OmsOrderItem item : orderItemList) { + totalAmount = totalAmount.add(item.getProductPrice().multiply(new BigDecimal(item.getProductQuantity()))); + } + return totalAmount; + } + /** * 锁定下单商品的所有库存 */ private void lockStock(List cartPromotionItemList) { for (CartPromotionItem cartPromotionItem : cartPromotionItemList) { PmsSkuStock skuStock = skuStockMapper.selectByPrimaryKey(cartPromotionItem.getProductSkuId()); - skuStock.setLockStock(skuStock.getStock()+cartPromotionItem.getQuantity()); + skuStock.setLockStock(skuStock.getLockStock() + cartPromotionItem.getQuantity()); skuStockMapper.updateByPrimaryKeySelective(skuStock); } } @@ -90,7 +484,7 @@ public class OmsPortalOrderServiceImpl implements OmsPortalOrderService { */ private boolean hasStock(List cartPromotionItemList) { for (CartPromotionItem cartPromotionItem : cartPromotionItemList) { - if(cartPromotionItem.getRealStock()<=0){ + if (cartPromotionItem.getRealStock() <= 0) { return false; } } @@ -106,8 +500,8 @@ public class OmsPortalOrderServiceImpl implements OmsPortalOrderService { BigDecimal totalAmount = new BigDecimal("0"); BigDecimal promotionAmount = new BigDecimal("0"); for (CartPromotionItem cartPromotionItem : cartPromotionItemList) { - totalAmount=totalAmount.add(cartPromotionItem.getPrice().multiply(new BigDecimal(cartPromotionItem.getQuantity()))); - promotionAmount=promotionAmount.add(cartPromotionItem.getReduceAmount().multiply(new BigDecimal(cartPromotionItem.getQuantity()))); + totalAmount = totalAmount.add(cartPromotionItem.getPrice().multiply(new BigDecimal(cartPromotionItem.getQuantity()))); + promotionAmount = promotionAmount.add(cartPromotionItem.getReduceAmount().multiply(new BigDecimal(cartPromotionItem.getQuantity()))); } calcAmount.setTotalAmount(totalAmount); calcAmount.setPromotionAmount(promotionAmount); diff --git a/mall-portal/src/main/java/com/macro/mall/portal/service/impl/OmsPromotionServiceImpl.java b/mall-portal/src/main/java/com/macro/mall/portal/service/impl/OmsPromotionServiceImpl.java index 73b3623..fe099dc 100644 --- a/mall-portal/src/main/java/com/macro/mall/portal/service/impl/OmsPromotionServiceImpl.java +++ b/mall-portal/src/main/java/com/macro/mall/portal/service/impl/OmsPromotionServiceImpl.java @@ -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); } } diff --git a/mall-portal/src/main/resources/dao/PortalOrderItemDao.xml b/mall-portal/src/main/resources/dao/PortalOrderItemDao.xml new file mode 100644 index 0000000..7646017 --- /dev/null +++ b/mall-portal/src/main/resources/dao/PortalOrderItemDao.xml @@ -0,0 +1,24 @@ + + + + + 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 + + (#{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}) + + + \ No newline at end of file diff --git a/mall-portal/src/main/resources/dao/PortalProductDao.xml b/mall-portal/src/main/resources/dao/PortalProductDao.xml index 1e35d5a..4a4bfd3 100644 --- a/mall-portal/src/main/resources/dao/PortalProductDao.xml +++ b/mall-portal/src/main/resources/dao/PortalProductDao.xml @@ -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, diff --git a/mall-portal/src/main/resources/dao/SmsCouponHistoryDao.xml b/mall-portal/src/main/resources/dao/SmsCouponHistoryDao.xml index 040eb76..895f22f 100644 --- a/mall-portal/src/main/resources/dao/SmsCouponHistoryDao.xml +++ b/mall-portal/src/main/resources/dao/SmsCouponHistoryDao.xml @@ -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 \ No newline at end of file