|
@@ -954,7 +954,8 @@ public class PageServiceImpl implements PageService {
|
|
|
public Boolean setCouponsLogo(Integer userId, Integer productId, Integer source) {
|
|
|
boolean couponsLogo = false;
|
|
|
ProductDetailVo product = pageMapper.getProductDetails(productId);
|
|
|
- List<CouponVo> couponList = pageMapper.findAllCoupon(userId);
|
|
|
+ Date registerTime = couponMapper.findUserRegisterTime(userId);
|
|
|
+ List<CouponVo> couponList = pageMapper.findAllCoupon(userId, registerTime);
|
|
|
if (couponList != null && couponList.size() > 0) {
|
|
|
for (CouponVo coupon : couponList) {
|
|
|
if (coupon.getCouponType() == 4 || coupon.getCouponType() == 2) {
|
|
@@ -1127,7 +1128,7 @@ public class PageServiceImpl implements PageService {
|
|
|
String ossName = archiveFile.getOssName();
|
|
|
// 设置URL过期时间为1个小时
|
|
|
Date expiration = new Date(System.currentTimeMillis() + 3600L * 1000);
|
|
|
- SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+ /*SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
try {
|
|
|
Date dateOne = format.parse("2021-06-01 00:00:00");
|
|
|
Date dateTwo = format.parse("2021-09-17 18:00:00");
|
|
@@ -1138,8 +1139,8 @@ public class PageServiceImpl implements PageService {
|
|
|
}
|
|
|
} catch (ParseException e) {
|
|
|
log.info("格式化时间错误", e);
|
|
|
- }
|
|
|
- String url = ossClient.generatePresignedUrl(bucketName, ossName, expiration).toString();
|
|
|
+ }*/
|
|
|
+ String url = ossClient.generatePresignedUrl(bucketName, active + "/archiveFile/" + ossName, expiration).toString();
|
|
|
ossClient.shutdown();
|
|
|
return url;
|
|
|
}
|