xiaoyong931011
2022-06-08 d43ba88a830642d3351f907cfc59313b9e318e0e
Merge branch 'mall-amz' of http://120.27.238.55:7000/r/xc-mall into mall-amz
11 files modified
30 ■■■■ changed files
src/main/java/cc/mrbird/febs/mall/mapper/MallOrderItemMapper.java 2 ●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java 2 ●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/mall/service/impl/ScoreServiceImpl.java 4 ●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/mall/vo/AdminMallOrderInfoVo.java 2 ●●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/mall/vo/MallGoodsDetailsVo.java 3 ●●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/mall/vo/OrderItemVo.java 3 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/modules/MallGoodsMapper.xml 1 ●●●● patch | view | raw | blame | history
src/main/resources/mapper/modules/MallOrderInfoMapper.xml 4 ●●● patch | view | raw | blame | history
src/main/resources/mapper/modules/MallOrderItemMapper.xml 2 ●●● patch | view | raw | blame | history
src/main/resources/templates/febs/views/modules/order/orderList.html 1 ●●●● patch | view | raw | blame | history
src/test/java/cc/mrbird/febs/ProfitTest.java 6 ●●●● patch | view | raw | blame | history
src/main/java/cc/mrbird/febs/mall/mapper/MallOrderItemMapper.java
@@ -8,5 +8,5 @@
public interface MallOrderItemMapper extends BaseMapper<MallOrderItem> {
    List<MallOrderItem> selectItemByGoodsIdUnCancel(@Param("goodsId") Long goodsId);
    List<MallOrderItem> selectItemByGoodsIdUnCancel(@Param("goodsId") Long goodsId, @Param("memberId") Long memberId);
}
src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java
@@ -131,7 +131,7 @@
                // 零撸专区购买
                if (new BigDecimal(mallGoods.getPresentPrice()).compareTo(BigDecimal.ZERO) == 0) {
                    List<MallOrderItem> items = mallOrderItemMapper.selectItemByGoodsIdUnCancel(mallGoods.getId());
                    List<MallOrderItem> items = mallOrderItemMapper.selectItemByGoodsIdUnCancel(mallGoods.getId(), member.getId());
                    if (CollUtil.isNotEmpty(items)) {
                        throw new FebsException("无法重复领取同一个商品");
                    }
src/main/java/cc/mrbird/febs/mall/service/impl/ScoreServiceImpl.java
@@ -72,6 +72,10 @@
    @Override
    public MallScoreSignRecord judgeScoreIsContinuity(MallScoreSignRecord mallScoreSignRecord) {
        if (mallScoreSignRecord.getSignTime() == null) {
            return mallScoreSignRecord;
        }
        // 若最新签到日期,与当天相差大于一天,则更新数据库(避免定时器更新失败)
        if (DateUtil.betweenDay(mallScoreSignRecord.getSignTime(), new Date(), true) > 1 || mallScoreSignRecord.getTotalCnt() == 7) {
            mallScoreSignRecord.setTotalCnt(0);
src/main/java/cc/mrbird/febs/mall/vo/AdminMallOrderInfoVo.java
@@ -69,4 +69,6 @@
    private String memberBindPhone;
    private String memberEmail;
    private Integer carriage;
}
src/main/java/cc/mrbird/febs/mall/vo/MallGoodsDetailsVo.java
@@ -57,6 +57,9 @@
    @ApiModelProperty(value = "运费")
    private BigDecimal carriage;
    @ApiModelProperty(value = "1-普通商品 2-套餐")
    private Integer isNormal;
    @ApiModelProperty(value = "轮播图")
    private List<String> images;
src/main/java/cc/mrbird/febs/mall/vo/OrderItemVo.java
@@ -35,4 +35,7 @@
    @ApiModelProperty(value = "单价")
    private BigDecimal price;
    @ApiModelProperty(value = "1-普通商品 2-套餐")
    private Integer isNormal;
}
src/main/resources/mapper/modules/MallGoodsMapper.xml
@@ -20,6 +20,7 @@
        <result property="goodsType" column="goods_type" />
        <result property="hasCarriage" column="has_carriage" />
        <result property="carriage" column="carriage" />
        <result property="isNormal" column="is_normal" />
        <collection property="styles" ofType="cc.mrbird.febs.mall.entity.MallGoodsStyle">
            <id property="id" column="style_id" />
            <result property="name" column="style_name" />
src/main/resources/mapper/modules/MallOrderInfoMapper.xml
@@ -111,6 +111,7 @@
            <result property="cnt" column="cnt" />
            <result property="price" column="price" />
            <result property="amount" column="amount" />
            <result property="isNormal" column="is_normal" />
        </collection>
    </resultMap>
@@ -167,7 +168,8 @@
            b.sku_image,
            b.cnt,
            b.price,
            b.amount
            b.amount,
            b.is_normal
        from mall_order_info a
             inner join mall_order_item b on a.id=b.order_id
        where a.id=#{id}
src/main/resources/mapper/modules/MallOrderItemMapper.xml
@@ -5,7 +5,7 @@
    <select id="selectItemByGoodsIdUnCancel" resultType="cc.mrbird.febs.mall.entity.MallOrderItem">
        select a.* from mall_order_item a
            inner join mall_order_info b on a.order_id=b.ID and b.status in (1,2,3,4)
        where a.goods_id=#{goodsId}
        where a.goods_id=#{goodsId} and b.member_id=#{memberId}
    </select>
</mapper>
src/main/resources/templates/febs/views/modules/order/orderList.html
@@ -203,6 +203,7 @@
                        {field: 'memberPhone', title: '账号', minWidth: 120,align:'left'},
                        {field: 'memberBindPhone', title: '联系方式', minWidth: 120,align:'left'},
                        {field: 'amount', title: '订单金额', minWidth: 120,align:'left'},
                        {field: 'carriage', title: '运费', minWidth: 120,align:'left'},
                        {field: 'orderTime', title: '下单时间', minWidth: 200,align:'left'},
                        {field: 'status', title: '状态',
                            templet: function (d) {
src/test/java/cc/mrbird/febs/ProfitTest.java
@@ -1,6 +1,7 @@
package cc.mrbird.febs;
import cc.mrbird.febs.mall.service.IAgentService;
import cc.mrbird.febs.mall.service.IMemberProfitService;
import cc.mrbird.febs.rabbit.consumer.AgentConsumer;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
@@ -19,8 +20,11 @@
    @Autowired
    private IAgentService agentService;
    @Autowired
    private IMemberProfitService memberProfitService;
    @Test
    public void dynamicProfit() {
        agentService.rankReturnMoney(7L);
        memberProfitService.dynamicProfit(23L);
    }
}