Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop into feature/pg
This commit is contained in:
@@ -160,4 +160,9 @@ public class TradeDTO implements Serializable {
|
||||
}
|
||||
return skuList;
|
||||
}
|
||||
|
||||
public void removeCoupon() {
|
||||
this.canUseCoupons = new ArrayList<>();
|
||||
this.cantUseCoupons = new ArrayList<>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,8 +57,12 @@ public class CouponRender implements CartRenderStep {
|
||||
* @param tradeDTO 交易dto
|
||||
*/
|
||||
private void renderCouponRule(TradeDTO tradeDTO) {
|
||||
// 清除之前的优惠券
|
||||
tradeDTO.removeCoupon();
|
||||
|
||||
List<MemberCoupon> memberCouponList = memberCouponService.getMemberCoupons(tradeDTO.getMemberId());
|
||||
|
||||
//获取最新优惠券
|
||||
memberCouponList = memberCouponList.stream()
|
||||
.filter(item -> item.getStartTime().before(new Date()) && item.getEndTime().after(new Date()))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
@@ -53,7 +53,7 @@ public interface ArticleService extends IService<Article> {
|
||||
Article updateArticle(Article article);
|
||||
|
||||
/**
|
||||
* 删除文章
|
||||
* 删除文章--id
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
@@ -87,4 +87,12 @@ public interface ArticleService extends IService<Article> {
|
||||
*/
|
||||
@CacheEvict(key = "#id")
|
||||
Boolean updateArticleStatus(String id, boolean status);
|
||||
|
||||
/**
|
||||
* 修改文章--文章类型修改
|
||||
* @param article
|
||||
* @return
|
||||
*/
|
||||
@CacheEvict(key = "#article.type")
|
||||
Article updateArticleType(Article article);
|
||||
}
|
||||
@@ -91,4 +91,12 @@ public class ArticleServiceImpl extends ServiceImpl<ArticleMapper, Article> impl
|
||||
article.setOpenStatus(status);
|
||||
return this.updateById(article);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Article updateArticleType(Article article) {
|
||||
Article oldArticle = this.getById(article.getId());
|
||||
BeanUtil.copyProperties(article, oldArticle);
|
||||
this.updateById(oldArticle);
|
||||
return oldArticle;
|
||||
}
|
||||
}
|
||||
@@ -122,7 +122,9 @@ public class SmsUtilAliImplService implements SmsUtil, AliSmsUtil {
|
||||
//如果是测试模式 默认验证码 6个1
|
||||
if (systemSettingProperties.getIsTestModel()) {
|
||||
code = "111111";
|
||||
log.info("测试模式 - 接收手机:{},验证码:{}",mobile,code);
|
||||
} else {
|
||||
log.info("接收手机:{},验证码:{}",mobile,code);
|
||||
//发送短信
|
||||
this.sendSmsCode(smsSetting.getSignName(), mobile, params, templateCode);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user