parent
8c4ce3d92c
commit
7596dd8281
@ -0,0 +1,97 @@ |
||||
package com.bweb.controller; |
||||
|
||||
import com.github.pagehelper.PageHelper; |
||||
import com.github.pagehelper.PageInfo; |
||||
import com.hai.common.exception.ErrorCode; |
||||
import com.hai.common.exception.ErrorHelp; |
||||
import com.hai.common.exception.SysCode; |
||||
import com.hai.common.security.SessionObject; |
||||
import com.hai.common.security.UserCenter; |
||||
import com.hai.common.utils.DateUtil; |
||||
import com.hai.common.utils.IDGenerator; |
||||
import com.hai.common.utils.ResponseMsgUtil; |
||||
import com.hai.entity.HighChildOrder; |
||||
import com.hai.entity.HighOrder; |
||||
import com.hai.model.HighCouponModel; |
||||
import com.hai.model.HighUserModel; |
||||
import com.hai.model.ResponseData; |
||||
import com.hai.service.HighCouponCodeService; |
||||
import com.hai.service.HighCouponService; |
||||
import com.hai.service.HighOrderService; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import org.slf4j.Logger; |
||||
import org.slf4j.LoggerFactory; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Controller; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import javax.annotation.Resource; |
||||
import javax.servlet.http.HttpServletRequest; |
||||
import java.math.BigDecimal; |
||||
import java.util.Date; |
||||
import java.util.HashMap; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @Auther: 袁野 |
||||
* @Description: |
||||
* @Date: 2021/3/26 23:08 |
||||
*/ |
||||
@Controller |
||||
@RequestMapping(value = "/highOrder") |
||||
@Api(value = "订单接口") |
||||
public class HighOrderController { |
||||
|
||||
private static Logger log = LoggerFactory.getLogger(HighMerchantStoreController.class); |
||||
|
||||
@Autowired |
||||
private UserCenter userCenter; |
||||
|
||||
@Resource |
||||
private HighOrderService highOrderService; |
||||
|
||||
@Resource |
||||
private HighCouponService highCouponService; |
||||
|
||||
@Resource |
||||
private HighCouponCodeService highCouponCodeService; |
||||
|
||||
|
||||
|
||||
@RequestMapping(value = "/getOrderById", method = RequestMethod.GET) |
||||
@ResponseBody |
||||
@ApiOperation(value = "根据id查询订单详情") |
||||
public ResponseData getOrderById(@RequestParam(name = "orderId", required = true) Long orderId) { |
||||
try { |
||||
|
||||
return ResponseMsgUtil.success(highOrderService.getOrderById(orderId)); |
||||
|
||||
} catch (Exception e) { |
||||
log.error("HighOrderController --> getOrderById() error!", e); |
||||
return ResponseMsgUtil.exception(e); |
||||
} |
||||
} |
||||
|
||||
|
||||
@RequestMapping(value = "/getOrderList", method = RequestMethod.GET) |
||||
@ResponseBody |
||||
@ApiOperation(value = "获取用户订单") |
||||
public ResponseData getUserOrderList(@RequestParam(name = "pageNum", required = true) Integer pageNum, |
||||
@RequestParam(name = "pageSize", required = true) Integer pageSize, |
||||
HttpServletRequest request) { |
||||
try { |
||||
|
||||
|
||||
|
||||
Map<String,Object> map = new HashMap<>(); |
||||
|
||||
PageHelper.startPage(pageNum,pageSize); |
||||
return ResponseMsgUtil.success(new PageInfo<>(highCouponService.getCouponList(map))); |
||||
|
||||
} catch (Exception e) { |
||||
log.error("HighOrderController --> getUserOrderList() error!", e); |
||||
return ResponseMsgUtil.exception(e); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,11 @@ |
||||
package com.hai.service; |
||||
|
||||
/** |
||||
* @ClassName: HighAgentService |
||||
* @Description: 代理商管理 |
||||
* @author: 袁野 |
||||
* @date: 2021/03/26 18:20 |
||||
* @Copyright: 2021 www.high.com Inc. All rights reserved. |
||||
*/ |
||||
public interface HighAgentService { |
||||
} |
Loading…
Reference in new issue