| | |
| | | shopCartBillVo.setBillCouponTotal(shopCartBillVo.getBillCouponTotal().add(shopCartVo.getCouponPrice())); |
| | | } |
| | | } |
| | | |
| | | |
| | | for (ShopShoppingCart shopCart : shopCartVo.getCartList()) { |
| | | if (shopCart.getIsSelected() == 1) { |
| | | selectCount += shopCart.getCartNumber(); |
| | |
| | | public class ShopOrderDetails extends EntityDTO{ |
| | | @Extend |
| | | private static final long serialVersionUID = 1L; |
| | | /** |
| | | *支付方式-直接购买 |
| | | */ |
| | | public static final int PAYTYPE_MICRO = 1; |
| | | /** |
| | | *支付方式-积分兑换 |
| | | */ |
| | | public static final int PAYTYPE_SCORE=2; |
| | | |
| | | |
| | | /** |
| | |
| | | * 数量 |
| | | */ |
| | | private Integer count; |
| | | /** |
| | | * 支付方式1 直接购买 2,积分兑换 |
| | | */ |
| | | private Integer payType; |
| | | |
| | | |
| | | /** |
| | |
| | | this.price = price; |
| | | } |
| | | |
| | | public Integer getPayType() { |
| | | return payType; |
| | | } |
| | | |
| | | public void setPayType(Integer payType) { |
| | | this.payType = payType; |
| | | } |
| | | |
| | | public Integer getCount() { |
| | | return count; |
| | | } |
| | |
| | | @Extend |
| | | private static final long serialVersionUID = 1L; |
| | | /** |
| | | *购物车类型-微商城 |
| | | *购物车类型-直接购买 |
| | | */ |
| | | public static final int CAR_TYPE_MICRO =1; |
| | | /** |
| | | *购物车类型-积分商城 |
| | | *购物车类型-积分兑换 |
| | | */ |
| | | public static final int CAR_TYPE_SCORE=2; |
| | | |
| | |
| | | * 用户是否选中 1选中 2未选中 |
| | | */ |
| | | private Integer isSelected; |
| | | |
| | | /** |
| | | * 购物车类型 1直接支付 2积分兑换 |
| | | */ |
| | | private Integer cartType; |
| | | |
| | | |
| | | |
| | |
| | | return shopCoupons; |
| | | } |
| | | |
| | | public Integer getCartType() { |
| | | return cartType; |
| | | } |
| | | |
| | | public void setCartType(Integer cartType) { |
| | | this.cartType = cartType; |
| | | } |
| | | } |
| | |
| | | ADD COLUMN `able_sales` int(2) NULL COMMENT '是否为分销产品1是2不是' AFTER `score_category_id`, |
| | | ADD COLUMN `able_score_pay` int(2) NULL COMMENT '是否可用积分支付1是2不是' AFTER `able_sales`; |
| | | |
| | | ALTER TABLE `shop_shopping_cart` |
| | | ADD COLUMN `cart_type` int(2) NOT NULL COMMENT '购物车类型 1微商城 2积分商城' AFTER `company_id`; |
| | | ALTER TABLE `shop_sku` |
| | | ADD COLUMN `pay_type` int(2) NULL COMMENT '支付方式1 直接购买 2,积分兑换' AFTER `score_count`; |
| | | |
| | | update shop_product set able_score_pay=1; |
| | | update shop_product set able_sales=2; |
| | | |
| | |
| | | <result property="sTitle" column="s_title" /> |
| | | <result property="discountExplain" column="discount_explain" /> |
| | | <result property="discountAmount" column="discount_amount" /> |
| | | <result property="payType" column="pay_type" /> |
| | | </resultMap> |
| | | |
| | | <!-- 定义ShopOrderDetails 的复杂map --> |
| | |
| | | <result property="sTitle" column="s_title" /> |
| | | <result property="discountExplain" column="discount_explain" /> |
| | | <result property="discountAmount" column="discount_amount" /> |
| | | <result property="payType" column="pay_type" /> |
| | | <!--产品信息--> |
| | | <association property="shopProduct" column="p_id" |
| | | select="com.matrix.system.shopXcx.dao.ShopProductDao.selectById"/> |
| | |
| | | select="selectProductionEnterpriseByPid"/> |
| | | </resultMap> |
| | | |
| | | <!--查询产品生产企业--> |
| | | <select id="selectProductionEnterpriseByPid" resultType="java.lang.String"> |
| | | select ifnull(param_value, '') from shop_product_param_ref |
| | | where p_id = ${pId} and param_name = '生产企业' |
| | | </select> |
| | | |
| | | <!-- 字段sql --> |
| | | <sql id="columns"> |
| | |
| | | total_price, |
| | | s_title, |
| | | discount_explain, |
| | | discount_amount |
| | | discount_amount, |
| | | pay_type |
| | | </sql> |
| | | |
| | | <!-- 属性sql --> |
| | |
| | | #{item.totalPrice}, |
| | | #{item.sTitle}, |
| | | #{item.discountExplain}, |
| | | #{item.discountAmount} |
| | | #{item.discountAmount}, |
| | | #{item.payType} |
| | | </sql> |
| | | |
| | | <!-- where sql --> |
| | |
| | | <if test="(record.discountAmount!=null and record.discountAmount!='') or (record.discountAmount!='' and record.discountAmount==0) "> |
| | | and discount_amount = #{record.discountAmount} |
| | | </if> |
| | | <if test="(record.payType!=null and record.payType!='') or (record.payType!='' and record.payType==0) "> |
| | | and pay_type = #{record.payType} |
| | | </if> |
| | | </if> |
| | | |
| | | </sql> |
| | |
| | | <result property="isSelected" column="isSelected" /> |
| | | <result property="shopId" column="shop_id" /> |
| | | <result property="companyId" column="company_id" /> |
| | | <result property="cartType" column="cart_type" /> |
| | | </resultMap> |
| | | |
| | | |
| | |
| | | <result property="isSelected" column="isSelected" /> |
| | | <result property="shopId" column="shop_id" /> |
| | | <result property="companyId" column="company_id" /> |
| | | <result property="cartType" column="cart_type" /> |
| | | |
| | | </resultMap> |
| | | |
| | |
| | | cart_number, |
| | | isSelected, |
| | | shop_id, |
| | | company_id |
| | | company_id, |
| | | cart_type |
| | | |
| | | </sql> |
| | | |
| | |
| | | #{item.cartNumber}, |
| | | #{item.isSelected}, |
| | | #{item.shopId}, |
| | | #{item.companyId} |
| | | #{item.companyId}, |
| | | #{item.cartType} |
| | | |
| | | </sql> |
| | | |
| | |
| | | p.img_mobile, |
| | | p.img_pc, |
| | | u.nick_name, |
| | | s.NAME |
| | | s.NAME, |
| | | c.cart_type, |
| | | from shop_shopping_cart c |
| | | LEFT JOIN shop_product p ON c.cart_product_id = p.id |
| | | LEFT JOIN shop_sku s ON c.cart_sku_id = s.id |
| | |
| | | p.img_pc, |
| | | p.buy_limit, |
| | | s.NAME, |
| | | s.stock |
| | | s.stock, |
| | | c.cart_type |
| | | from shop_shopping_cart c |
| | | LEFT JOIN shop_product p ON c.cart_product_id = p.id |
| | | LEFT JOIN shop_sku s ON c.cart_sku_id = s.id |