|
|
|
@ -9,15 +9,13 @@ import com.hai.common.exception.SysCode; |
|
|
|
|
import com.hai.common.security.SessionObject; |
|
|
|
|
import com.hai.common.security.UserCenter; |
|
|
|
|
import com.hai.common.utils.ResponseMsgUtil; |
|
|
|
|
import com.hai.entity.HighDiscount; |
|
|
|
|
import com.hai.entity.HighDiscountAgentCode; |
|
|
|
|
import com.hai.entity.HighDiscountCouponRel; |
|
|
|
|
import com.hai.entity.HighDiscountUserRel; |
|
|
|
|
import com.hai.entity.*; |
|
|
|
|
import com.hai.model.HighUserModel; |
|
|
|
|
import com.hai.model.ResponseData; |
|
|
|
|
import com.hai.service.HighDiscountAgentCodeService; |
|
|
|
|
import com.hai.service.HighDiscountCouponRelService; |
|
|
|
|
import com.hai.service.HighDiscountUserRelService; |
|
|
|
|
import com.hai.service.HighOpenApiService; |
|
|
|
|
import io.swagger.annotations.Api; |
|
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
|
import org.slf4j.Logger; |
|
|
|
@ -56,6 +54,9 @@ public class HighUserDiscountController { |
|
|
|
|
@Resource |
|
|
|
|
private HighDiscountCouponRelService highDiscountCouponRelService; |
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
private HighOpenApiService highOpenApiService; |
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/receiveDiscount",method = RequestMethod.POST) |
|
|
|
|
@ResponseBody |
|
|
|
|
@ApiOperation(value = "用户领取优惠券") |
|
|
|
@ -163,4 +164,33 @@ public class HighUserDiscountController { |
|
|
|
|
return ResponseMsgUtil.exception(e); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/getUserOrderPreList", method = RequestMethod.GET) |
|
|
|
|
@ResponseBody |
|
|
|
|
@ApiOperation(value = "获取用户预约订单") |
|
|
|
|
public ResponseData getUserOrderPreList(@RequestParam(name = "usingAttribution", required = false) Integer usingAttribution, |
|
|
|
|
@RequestParam(name = "year", required = false) String year, |
|
|
|
|
HttpServletRequest request) { |
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
// 用户
|
|
|
|
|
SessionObject sessionObject = userCenter.getSessionObject(request); |
|
|
|
|
HighUserModel userInfoModel = (HighUserModel) sessionObject.getObject(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Map<String,Object> map = new HashMap<>(); |
|
|
|
|
map.put("userId", userInfoModel.getHighUser().getId()); |
|
|
|
|
map.put("usingAttribution", usingAttribution); |
|
|
|
|
if (year != null) { |
|
|
|
|
map.put("createTimeS", year + "-01-01 00:00:00"); |
|
|
|
|
map.put("createTimeE", year + "-12-31 23:59:59"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return ResponseMsgUtil.success(highOpenApiService.getUserCouponsList(map)); |
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
log.error("HighOrderController --> getUserPreOrderList() error!", e); |
|
|
|
|
return ResponseMsgUtil.exception(e); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|