邀请活动不在时间范围内
This commit is contained in:
@@ -33,7 +33,7 @@ public class TbShopShareController {
|
||||
*/
|
||||
@GetMapping("getByShopId")
|
||||
public Result queryById(@RequestParam Integer shopId) {
|
||||
return Result.successWithData(tbShopShareService.queryByShopId(shopId));
|
||||
return tbShopShareService.queryByShopId(shopId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.chaozhanggui.system.cashierservice.service;
|
||||
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbShopShare;
|
||||
import com.chaozhanggui.system.cashierservice.sign.Result;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
|
||||
@@ -18,7 +19,7 @@ public interface TbShopShareService {
|
||||
* @param shopId 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
TbShopShare queryByShopId(Integer shopId);
|
||||
Result queryByShopId(Integer shopId);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.chaozhanggui.system.cashierservice.dao.TbShopShareMapper;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbShopCoupon;
|
||||
import com.chaozhanggui.system.cashierservice.entity.TbShopShare;
|
||||
import com.chaozhanggui.system.cashierservice.service.TbShopShareService;
|
||||
import com.chaozhanggui.system.cashierservice.sign.Result;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
@@ -33,7 +34,7 @@ public class TbShopShareServiceImpl implements TbShopShareService {
|
||||
|
||||
|
||||
@Override
|
||||
public TbShopShare queryByShopId(Integer shopId) {
|
||||
public Result queryByShopId(Integer shopId) {
|
||||
TbShopShare tbShopShare = tbShopShareMapper.queryByShopId(shopId);
|
||||
if (tbShopShare != null) {
|
||||
if (CollectionUtil.isNotEmpty(tbShopShare.getNewCoupons())) {
|
||||
@@ -77,8 +78,10 @@ public class TbShopShareServiceImpl implements TbShopShareService {
|
||||
}
|
||||
}
|
||||
}
|
||||
return Result.successWithData(tbShopShare);
|
||||
}else {
|
||||
return Result.fail("邀请活动不在时间范围内");
|
||||
}
|
||||
return tbShopShare;
|
||||
}
|
||||
|
||||
private String setCouponInfo(TbShopCoupon tbShopCoupon) {
|
||||
|
||||
Reference in New Issue
Block a user