Merge branch 'mall-amz' of http://120.27.238.55:7000/r/xc-mall into mall-amz
| | |
| | | |
| | | public interface MallOrderItemMapper extends BaseMapper<MallOrderItem> { |
| | | |
| | | List<MallOrderItem> selectItemByGoodsIdUnCancel(@Param("goodsId") Long goodsId); |
| | | List<MallOrderItem> selectItemByGoodsIdUnCancel(@Param("goodsId") Long goodsId, @Param("memberId") Long memberId); |
| | | } |
| | |
| | | |
| | | // 零撸专区购买 |
| | | 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("无法重复领取同一个商品"); |
| | | } |
| | |
| | | |
| | | @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); |
| | |
| | | private String memberBindPhone; |
| | | |
| | | private String memberEmail; |
| | | |
| | | private Integer carriage; |
| | | } |
| | |
| | | @ApiModelProperty(value = "运费") |
| | | private BigDecimal carriage; |
| | | |
| | | @ApiModelProperty(value = "1-普通商品 2-套餐") |
| | | private Integer isNormal; |
| | | |
| | | @ApiModelProperty(value = "轮播图") |
| | | private List<String> images; |
| | | |
| | |
| | | |
| | | @ApiModelProperty(value = "单价") |
| | | private BigDecimal price; |
| | | |
| | | @ApiModelProperty(value = "1-普通商品 2-套餐") |
| | | private Integer isNormal; |
| | | } |
| | |
| | | <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" /> |
| | |
| | | <result property="cnt" column="cnt" /> |
| | | <result property="price" column="price" /> |
| | | <result property="amount" column="amount" /> |
| | | <result property="isNormal" column="is_normal" /> |
| | | </collection> |
| | | </resultMap> |
| | | |
| | |
| | | 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} |
| | |
| | | <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> |
| | |
| | | {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) { |
| | |
| | | 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; |
| | |
| | | @Autowired |
| | | private IAgentService agentService; |
| | | |
| | | @Autowired |
| | | private IMemberProfitService memberProfitService; |
| | | |
| | | @Test |
| | | public void dynamicProfit() { |
| | | agentService.rankReturnMoney(7L); |
| | | memberProfitService.dynamicProfit(23L); |
| | | } |
| | | } |