| | |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.xzx.gc.common.Result; |
| | | import com.xzx.gc.common.request.BaseController; |
| | | import com.xzx.gc.entity.JhyInfo; |
| | | import com.xzx.gc.model.JsonResult; |
| | | import com.xzx.gc.order.dto.AddJhyOrderDto; |
| | | import com.xzx.gc.order.dto.JhyOrderConfirmDto; |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Slf4j |
| | |
| | | @ApiOperation("下单") |
| | | @PostMapping(value = "/jhy/order/add") |
| | | public Result<String> addJhyOrder(@RequestBody AddJhyOrderDto addJhyOrderDto, HttpServletRequest request) { |
| | | addJhyOrderDto.setUserId(getUserId(request)); |
| | | jhyOrderService.addJhyOrder(addJhyOrderDto); |
| | | return Result.success(); |
| | | // addJhyOrderDto.setUserId(getUserId(request)); |
| | | // jhyOrderService.addJhyOrder(addJhyOrderDto); |
| | | // return Result.success(); |
| | | |
| | | return Result.error("停止下单"); |
| | | } |
| | | |
| | | @ApiOperation("集物员订单列表") |
| | |
| | | } |
| | | |
| | | @ApiOperation("订单状态数量") |
| | | @PostMapping(value = "/orderStatusCnt") |
| | | public JsonResult<Map<Integer, Integer>> orderStatusCnt(HttpServletRequest request) { |
| | | return JsonResult.success(jhyOrderService.orderStatusCount(getUserId(request))); |
| | | @PostMapping(value = "/jhy/order/orderStatusCnt/{type}") |
| | | public JsonResult<Map<Integer, Integer>> orderStatusCnt(@PathVariable("type") Integer type, HttpServletRequest request) { |
| | | return JsonResult.success(jhyOrderService.orderStatusCount(type, getUserId(request))); |
| | | } |
| | | |
| | | @ApiOperation("地址范围是否有集货员") |
| | | @PostMapping(value = "/jhy/order/hasJhy/{addressId}") |
| | | public Result<List<JhyInfo>> hasJhy(@PathVariable("addressId") Long addressId) { |
| | | List<JhyInfo> inRange = jhyOrderService.findJhyInfoInRange(addressId); |
| | | return Result.success(inRange); |
| | | } |
| | | |
| | | } |