|
@@ -20,10 +20,7 @@ import com.yonge.cooleshow.common.page.PageInfo;
|
|
|
import com.yonge.toolset.utils.date.DateUtil;
|
|
|
import com.yonge.toolset.utils.string.StringUtil;
|
|
|
import com.yonge.toolset.utils.web.WebUtil;
|
|
|
-import io.swagger.annotations.Api;
|
|
|
-import io.swagger.annotations.ApiImplicitParam;
|
|
|
-import io.swagger.annotations.ApiImplicitParams;
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
+import io.swagger.annotations.*;
|
|
|
import org.redisson.api.RedissonClient;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.http.HttpStatus;
|
|
@@ -167,7 +164,7 @@ public class UserOrderController extends BaseController {
|
|
|
try {
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
|
String[] classDateSp = query.getSearchDate().split("-");
|
|
|
- calendar.set(Integer.parseInt(classDateSp[0]), Integer.parseInt(classDateSp[1]), 1, 0, 0, 0);
|
|
|
+ calendar.set(Integer.parseInt(classDateSp[0]), Integer.parseInt(classDateSp[1])-1, 1, 0, 0, 0);
|
|
|
query.setStartTime(calendar.getTime());
|
|
|
query.setEndTime(DateUtil.dayEnd(DateUtil.getLastDayOfMonth(calendar.getTime())));
|
|
|
} catch (Exception e) {
|
|
@@ -181,9 +178,23 @@ public class UserOrderController extends BaseController {
|
|
|
* 查询单条
|
|
|
*/
|
|
|
@GetMapping("/detail/{id}")
|
|
|
- @ApiOperation(value = "详情", notes = "传入id")
|
|
|
+ @ApiOperation(value = "通过id查询详情", notes = "传入id")
|
|
|
public HttpResponseResult<UserOrderVo> detail(@PathVariable("id") Long id) {
|
|
|
- UserOrderVo detail = userOrderService.detailApp(id);
|
|
|
- return succeed();
|
|
|
+ UserOrder param = new UserOrder();
|
|
|
+ param.setId(id);
|
|
|
+ UserOrderVo detail = userOrderService.detailApp(param);
|
|
|
+ return succeed(detail);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询单条
|
|
|
+ */
|
|
|
+ @GetMapping("/detailByOrderNo/{orderNo}")
|
|
|
+ @ApiOperation(value = "通过订单号查询详情", notes = "传入orderNo")
|
|
|
+ public HttpResponseResult<UserOrderVo> detailByOrderNo(@PathVariable("orderNo")String orderNo) {
|
|
|
+ UserOrder param = new UserOrder();
|
|
|
+ param.setOrderNo(orderNo);
|
|
|
+ UserOrderVo detail = userOrderService.detailApp(param);
|
|
|
+ return succeed(detail);
|
|
|
}
|
|
|
}
|