Merge branch 'score-shop' of http://120.27.238.55:7000/r/xzx into score-shop
| | |
| | | @ApiModelProperty(value = "分类ID") |
| | | private Long cateId; |
| | | |
| | | @ApiModelProperty(value = "是否抢购 1-是 2-否") |
| | | private Integer isQg; |
| | | |
| | | @ApiModelProperty(value="页码") |
| | | private int pageNo=1; |
| | | |
| | |
| | | } |
| | | |
| | | if (ScoreGoods.ISQG_YES.equals(data.getIsQg())) { |
| | | Long remain = DateUtil.between(new Date(), data.getQgEndTime(), DateUnit.SECOND, false); |
| | | data.setRemainTime(remain); |
| | | if (new Date().before(data.getQgStartTime())) { |
| | | data.setIsStartQg(2); |
| | | } else { |
| | | data.setIsStartQg(1); |
| | | Long remain = DateUtil.between(new Date(), data.getQgEndTime(), DateUnit.SECOND, false); |
| | | data.setRemainTime(remain); |
| | | } |
| | | } |
| | | return data; |
| | | } |
| | |
| | | if (goods == null || ScoreGoods.ISSALE_NO.equals(goods.getIsSale())) { |
| | | throw new RestException(-3, "商品不存在或已下架"); |
| | | } |
| | | |
| | | if (ScoreGoods.ISQG_YES.equals(goods.getIsQg())) { |
| | | if (new Date().before(goods.getQgStartTime())) { |
| | | throw new RestException(-3, "抢购未开始"); |
| | | } |
| | | |
| | | if (new Date().after(goods.getQgEndTime())) { |
| | | throw new RestException(-3, "抢购已结束"); |
| | | } |
| | | } |
| | | |
| | | AccountInfo accountInfo = accountInfoMapper.selectAccountInfoByUserId(addGoodsOrderDto.getUserId()); |
| | | |
| | | if (accountInfo.getCollectScore() == null) { |
| | |
| | | @ApiModelProperty(value = "是否抢购 1-是 2-否") |
| | | private Integer isQg; |
| | | |
| | | @ApiModelProperty(value = "是否开始抢购 1-是 2-否") |
| | | private Integer isStartQg; |
| | | |
| | | @ApiModelProperty(value = "抢购开始时间") |
| | | private Date qgStartTime; |
| | | |
| | |
| | | <if test="record.id != null and record.id != ''"> |
| | | and a.id=#{record.id} |
| | | </if> |
| | | <if test="record.isQg != null and record.isQg != ''"> |
| | | and a.is_qg=#{record.isQg} and now() > a.qg_end_time |
| | | </if> |
| | | <if test="record.cateId != null and record.cateId != ''"> |
| | | and (a.category_id = #{record.cateId} or a.category in (select id from xzx_score_goods_category where parent_id=#{record.cateId})) |
| | | </if> |