|
|
@ -24,9 +24,7 @@ import org.springframework.web.bind.annotation.RequestParam; |
|
|
|
import org.springframework.web.bind.annotation.ResponseBody; |
|
|
|
import org.springframework.web.bind.annotation.ResponseBody; |
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
import javax.annotation.Resource; |
|
|
|
import java.math.BigDecimal; |
|
|
|
|
|
|
|
import java.util.*; |
|
|
|
import java.util.*; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* |
|
|
|
* |
|
|
@ -50,7 +48,6 @@ public class HighActivityController { |
|
|
|
@ApiOperation(value = "根据卡券查询活动信息") |
|
|
|
@ApiOperation(value = "根据卡券查询活动信息") |
|
|
|
public ResponseData getActivityByCoupon(@RequestParam(name = "couponId", required = true) Long couponId) { |
|
|
|
public ResponseData getActivityByCoupon(@RequestParam(name = "couponId", required = true) Long couponId) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
|
|
|
|
// 查询活动
|
|
|
|
// 查询活动
|
|
|
|
Map<String, Object> activity = highActivityInfoService.getNewActivityByCouponId(couponId); |
|
|
|
Map<String, Object> activity = highActivityInfoService.getNewActivityByCouponId(couponId); |
|
|
|
if (activity != null) { |
|
|
|
if (activity != null) { |
|
|
@ -59,7 +56,6 @@ public class HighActivityController { |
|
|
|
map.put("activityAward", highActivityAwardService.getListByActivityId(MapUtils.getLong(activity, "id"))); |
|
|
|
map.put("activityAward", highActivityAwardService.getListByActivityId(MapUtils.getLong(activity, "id"))); |
|
|
|
return ResponseMsgUtil.success(map); |
|
|
|
return ResponseMsgUtil.success(map); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return ResponseMsgUtil.success(null); |
|
|
|
return ResponseMsgUtil.success(null); |
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
@ -67,4 +63,24 @@ public class HighActivityController { |
|
|
|
return ResponseMsgUtil.exception(e); |
|
|
|
return ResponseMsgUtil.exception(e); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/getDetail",method = RequestMethod.GET) |
|
|
|
|
|
|
|
@ResponseBody |
|
|
|
|
|
|
|
@ApiOperation(value = "查询活动详情") |
|
|
|
|
|
|
|
public ResponseData getDetail(@RequestParam(name = "activityId", required = true) Long activityId) { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
// 查询活动
|
|
|
|
|
|
|
|
HighActivityInfo detail = highActivityInfoService.getDetailById(activityId); |
|
|
|
|
|
|
|
if (detail != null) { |
|
|
|
|
|
|
|
Map<String,Object> map = new HashMap<>(); |
|
|
|
|
|
|
|
map.put("activityInfo", detail); |
|
|
|
|
|
|
|
map.put("activityAward", highActivityAwardService.getListByActivityId(detail.getId())); |
|
|
|
|
|
|
|
return ResponseMsgUtil.success(map); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return ResponseMsgUtil.success(null); |
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
log.error("HighActivityController -> getDetail() error!",e); |
|
|
|
|
|
|
|
return ResponseMsgUtil.exception(e); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|