Merge remote-tracking branch 'origin/main-zhb'
This commit is contained in:
@@ -3,6 +3,8 @@ package com.buy507.mall.mapper;
|
|||||||
import com.buy507.mall.model.OmsOrder;
|
import com.buy507.mall.model.OmsOrder;
|
||||||
import com.buy507.mall.model.OmsOrderExample;
|
import com.buy507.mall.model.OmsOrderExample;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.buy507.mall.model.PmsProduct;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
@@ -31,4 +33,4 @@ public interface OmsOrderMapper {
|
|||||||
int updateByPrimaryKey(OmsOrder record);
|
int updateByPrimaryKey(OmsOrder record);
|
||||||
|
|
||||||
|
|
||||||
int selectPointsAreaStatus(@Param("orderSn") String orderSn);}
|
PmsProduct selectPointsAreaStatus(@Param("orderSn") String orderSn);}
|
||||||
@@ -3,6 +3,7 @@ package com.buy507.mall.mapper;
|
|||||||
import com.buy507.mall.model.UmsDevelopmentFund;
|
import com.buy507.mall.model.UmsDevelopmentFund;
|
||||||
import org.apache.ibatis.annotations.Insert;
|
import org.apache.ibatis.annotations.Insert;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
import org.apache.ibatis.annotations.Update;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
@@ -18,29 +19,30 @@ public interface UmsDevelopmentFundMapper {
|
|||||||
* 查询现金总和
|
* 查询现金总和
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Select("SELECT SUM(cash_total) FROM ums_development_fund")
|
@Select("SELECT cash_total FROM ums_development_fund")
|
||||||
BigDecimal getTotalCash();
|
BigDecimal getTotalCash();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询积分总和
|
* 查询积分总和
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Select("SELECT SUM(points_total) FROM ums_development_fund")
|
@Select("SELECT points_total FROM ums_development_fund")
|
||||||
Integer getTotalPoints();
|
Integer getTotalPoints();
|
||||||
|
|
||||||
/**
|
|
||||||
* 发展基金现金流水
|
|
||||||
* @param payAmount
|
|
||||||
*/
|
|
||||||
@Insert("INSERT INTO ums_development_fund (cash_total, updated_at) VALUES (#{payAmount}, NOW())")
|
|
||||||
void insertCash(BigDecimal payAmount);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 发展基金积分流水
|
* 更新积分
|
||||||
* @param rewardPoints
|
* @param fundPoints
|
||||||
*/
|
*/
|
||||||
@Insert("INSERT INTO ums_development_fund (points_total, updated_at) VALUES (#{rewardPoints}, NOW())")
|
@Update("update ums_development_fund set points_total = points_total + #{fundPoints}")
|
||||||
void insertPoints(BigDecimal rewardPoints);
|
void updatePoints(int fundPoints);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新现金
|
||||||
|
* @param fundCash
|
||||||
|
*/
|
||||||
|
@Update("update ums_development_fund set cash_total = cash_total + #{fundCash}")
|
||||||
|
void updateCash(BigDecimal fundCash);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -50,8 +50,7 @@
|
|||||||
<result column="settlement_status" jdbcType="INTEGER" property="settlementStatus" />
|
<result column="settlement_status" jdbcType="INTEGER" property="settlementStatus" />
|
||||||
<result column="settlement_time" jdbcType="TIMESTAMP" property="settlementTime" />
|
<result column="settlement_time" jdbcType="TIMESTAMP" property="settlementTime" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
<sql id="Example_Where_Clause">
|
<sql id="Example_Where_Clause">
|
||||||
<where>
|
<where>
|
||||||
<foreach collection="oredCriteria" item="criteria" separator="or">
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||||||
@@ -875,13 +874,56 @@
|
|||||||
where id = #{id,jdbcType=BIGINT}
|
where id = #{id,jdbcType=BIGINT}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="selectPointsAreaStatus" resultType="int">
|
<select id="selectPointsAreaStatus" resultType="com.buy507.mall.model.PmsProduct">
|
||||||
<![CDATA[
|
SELECT p.id,
|
||||||
SELECT p.points_area_status
|
p.brand_id,
|
||||||
FROM pms_product p
|
p.product_category_id,
|
||||||
JOIN oms_order_item oi ON p.product_sn = oi.product_sn
|
p.feight_template_id,
|
||||||
JOIN oms_order o ON oi.order_sn = o.order_sn
|
p.product_attribute_category_id,
|
||||||
WHERE o.order_sn = #{orderSn}
|
p.name,
|
||||||
]]>
|
p.pic,
|
||||||
|
p.product_sn,
|
||||||
|
p.delete_status,
|
||||||
|
p.publish_status,
|
||||||
|
p.new_status,
|
||||||
|
p.recommand_status,
|
||||||
|
p.verify_status,
|
||||||
|
p.sort,
|
||||||
|
p.sale,
|
||||||
|
p.price,
|
||||||
|
p.promotion_price,
|
||||||
|
p.gift_growth,
|
||||||
|
p.gift_point,
|
||||||
|
p.use_point_limit,
|
||||||
|
p.sub_title,
|
||||||
|
p.description,
|
||||||
|
p.original_price,
|
||||||
|
p.stock,
|
||||||
|
p.low_stock,
|
||||||
|
p.unit,
|
||||||
|
p.weight,
|
||||||
|
p.preview_status,
|
||||||
|
p.service_ids,
|
||||||
|
p.keywords,
|
||||||
|
p.note,
|
||||||
|
p.album_pics,
|
||||||
|
p.detail_title,
|
||||||
|
p.detail_desc,
|
||||||
|
p.detail_html,
|
||||||
|
p.detail_mobile_html,
|
||||||
|
p.promotion_start_time,
|
||||||
|
p.promotion_end_time,
|
||||||
|
p.promotion_per_limit,
|
||||||
|
p.promotion_type,
|
||||||
|
p.brand_name,
|
||||||
|
p.product_category_name,
|
||||||
|
p.distribution_flag,
|
||||||
|
p.vip_status,
|
||||||
|
p.points_area_status,
|
||||||
|
p.points_exchange_status
|
||||||
|
FROM pms_product p
|
||||||
|
JOIN oms_order_item oi ON p.product_sn = oi.product_sn
|
||||||
|
JOIN oms_order o ON oi.order_sn = o.order_sn
|
||||||
|
WHERE o.order_sn = #{orderSn}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user