|  |  |  | 
|---|
|  |  |  | import com.doumee.core.annotation.LoginRequired; | 
|---|
|  |  |  | import com.doumee.core.annotation.trace.Trace; | 
|---|
|  |  |  | import com.doumee.core.model.ApiResponse; | 
|---|
|  |  |  | import com.doumee.core.model.PageData; | 
|---|
|  |  |  | import com.doumee.core.model.PageWrap; | 
|---|
|  |  |  | import com.doumee.dao.business.model.IdentityInfo; | 
|---|
|  |  |  | import com.doumee.dao.business.model.Member; | 
|---|
|  |  |  | import com.doumee.dao.business.model.Orders; | 
|---|
|  |  |  | import com.doumee.dao.dto.CommentDTO; | 
|---|
|  |  |  | import com.doumee.dao.dto.ConfirmUpdOrderDTO; | 
|---|
|  |  |  | import com.doumee.dao.dto.DoneOrderDTO; | 
|---|
|  |  |  | import com.doumee.dao.dto.UpdOrderDataDTO; | 
|---|
|  |  |  | 
|---|
|  |  |  | import io.swagger.annotations.ApiImplicitParams; | 
|---|
|  |  |  | import io.swagger.annotations.ApiOperation; | 
|---|
|  |  |  | import lombok.extern.slf4j.Slf4j; | 
|---|
|  |  |  | import org.apache.shiro.authz.annotation.RequiresPermissions; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @LoginRequired | 
|---|
|  |  |  | @ApiOperation(value = "完成订单 - 发单方", notes = "小程序端") | 
|---|
|  |  |  | @GetMapping("/doneOrder") | 
|---|
|  |  |  | @PostMapping("/doneOrder") | 
|---|
|  |  |  | @ApiImplicitParams({ | 
|---|
|  |  |  | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true), | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @LoginRequired | 
|---|
|  |  |  | @ApiOperation(value = "订单评价 - 发单方", notes = "小程序端") | 
|---|
|  |  |  | @PostMapping("/comment") | 
|---|
|  |  |  | @ApiImplicitParams({ | 
|---|
|  |  |  | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true), | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | public ApiResponse comment(@RequestBody CommentDTO commentDTO) { | 
|---|
|  |  |  | commentDTO.setMember(this.getMemberResponse()); | 
|---|
|  |  |  | ordersService.comment(commentDTO); | 
|---|
|  |  |  | return  ApiResponse.success("操作成功"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @LoginRequired | 
|---|
|  |  |  | @ApiOperation("分页查询") | 
|---|
|  |  |  | @PostMapping("/page") | 
|---|
|  |  |  | public ApiResponse<PageData<Orders>> findPage (@RequestBody PageWrap<Orders> pageWrap) { | 
|---|
|  |  |  | pageWrap.getModel().setMember(this.getMemberResponse()); | 
|---|
|  |  |  | return ApiResponse.success(ordersService.findPageForMini(pageWrap)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @LoginRequired | 
|---|
|  |  |  | @ApiOperation(value = "订单详情", notes = "小程序端") | 
|---|
|  |  |  | @GetMapping("/getDetail") | 
|---|
|  |  |  | @ApiImplicitParams({ | 
|---|
|  |  |  | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true), | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | public ApiResponse<Orders> getDetail(@RequestParam Integer orderId) { | 
|---|
|  |  |  | return  ApiResponse.success("操作成功",ordersService.getDetail(orderId,this.getMemberResponse().getUseIdentity())); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|