mirror of
https://gitee.com/youlaitech/youlai-mall.git
synced 2024-12-22 12:48:59 +08:00
refactor: 实体类重命名调整
This commit is contained in:
parent
3b26e68ef3
commit
fca5519faf
@ -40,8 +40,8 @@ public class OmsOrderController {
|
||||
|
||||
@ApiOperation("订单分页列表")
|
||||
@GetMapping
|
||||
public PageResult listOrdersWithPage(OrderPageQuery queryParams) {
|
||||
IPage<OmsOrder> result = orderService.listOrdersWithPage(queryParams);
|
||||
public PageResult listOrderPages(OrderPageQuery queryParams) {
|
||||
IPage<OmsOrder> result = orderService.listOrderPages(queryParams);
|
||||
return PageResult.success(result);
|
||||
}
|
||||
|
||||
|
@ -35,8 +35,8 @@ public class OrderController {
|
||||
|
||||
@ApiOperation("分页列表")
|
||||
@GetMapping
|
||||
public PageResult listOrdersWithPage(OrderPageQuery queryParams) {
|
||||
IPage<OmsOrder> result = orderService.listOrdersWithPage(queryParams);
|
||||
public PageResult listOrderPages(OrderPageQuery queryParams) {
|
||||
IPage<OmsOrder> result = orderService.listOrderPages(queryParams);
|
||||
return PageResult.success(result);
|
||||
}
|
||||
|
||||
|
@ -25,5 +25,5 @@ public interface OrderMapper extends BaseMapper<OmsOrder> {
|
||||
* @param queryParams
|
||||
* @return
|
||||
*/
|
||||
List<OmsOrder> listOrdersWithPage(Page<OmsOrder> page, OrderPageQuery queryParams);
|
||||
List<OmsOrder> listOrderPages(Page<OmsOrder> page, OrderPageQuery queryParams);
|
||||
}
|
||||
|
@ -53,7 +53,9 @@ public class OrderPageVO {
|
||||
|
||||
private Integer count;
|
||||
|
||||
private Long total_amount;
|
||||
private Long totalAmount;
|
||||
|
||||
private String spuName;
|
||||
|
||||
}
|
||||
|
||||
|
@ -76,6 +76,6 @@ public interface IOrderService extends IService<OmsOrder> {
|
||||
* @param queryParams
|
||||
* @return
|
||||
*/
|
||||
IPage<OmsOrder> listOrdersWithPage(OrderPageQuery queryParams);
|
||||
IPage<OmsOrder> listOrderPages(OrderPageQuery queryParams);
|
||||
}
|
||||
|
||||
|
@ -102,9 +102,9 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, OmsOrder> impleme
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public IPage<OmsOrder> listOrdersWithPage(OrderPageQuery queryParams) {
|
||||
public IPage<OmsOrder> listOrderPages(OrderPageQuery queryParams) {
|
||||
Page<OmsOrder> page = new Page<>(queryParams.getPageNum(), queryParams.getPageSize());
|
||||
List<OmsOrder> list = this.baseMapper.listOrdersWithPage(page, queryParams);
|
||||
List<OmsOrder> list = this.baseMapper.listOrderPages(page, queryParams);
|
||||
page.setRecords(list);
|
||||
return page;
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ import com.youlai.common.result.PageResult;
|
||||
import com.youlai.common.result.Result;
|
||||
import com.youlai.mall.pms.pojo.dto.admin.GoodsFormDTO;
|
||||
import com.youlai.mall.pms.pojo.entity.PmsSpu;
|
||||
import com.youlai.mall.pms.pojo.vo.admin.GoodsDetailVO;
|
||||
import com.youlai.mall.pms.pojo.vo.PmsGoodsDetailVO;
|
||||
import com.youlai.mall.pms.service.IPmsSpuService;
|
||||
import io.swagger.annotations.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
@ -47,7 +47,7 @@ public class GoodsController {
|
||||
public Result detail(
|
||||
@ApiParam("商品ID") @PathVariable Long id
|
||||
) {
|
||||
GoodsDetailVO goodsDetail = iPmsSpuService.getGoodsById(id);
|
||||
PmsGoodsDetailVO goodsDetail = iPmsSpuService.getGoodsById(id);
|
||||
return Result.success(goodsDetail);
|
||||
}
|
||||
|
||||
@ -75,7 +75,9 @@ public class GoodsController {
|
||||
public Result delete(
|
||||
@ApiParam("id集合,以英文逗号(,)分隔") @PathVariable String ids
|
||||
) {
|
||||
boolean result = iPmsSpuService.removeByGoodsIds(Arrays.asList(ids.split(",")).stream().map(id -> Long.parseLong(id)).collect(Collectors.toList()));
|
||||
boolean result = iPmsSpuService.removeByGoodsIds(Arrays.asList(ids.split(","))
|
||||
.stream().map(id -> Long.parseLong(id))
|
||||
.collect(Collectors.toList()));
|
||||
return Result.judge(result);
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,7 @@ import com.youlai.mall.pms.pojo.entity.PmsSpu;
|
||||
import com.youlai.mall.pms.pojo.query.SpuPageQuery;
|
||||
import com.youlai.mall.pms.pojo.vo.GoodsDetailVO;
|
||||
import com.youlai.mall.pms.pojo.vo.GoodsPageVO;
|
||||
import com.youlai.mall.pms.pojo.vo.PmsGoodsDetailVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -42,7 +43,7 @@ public interface IPmsSpuService extends IService<PmsSpu> {
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
com.youlai.mall.pms.pojo.vo.admin.GoodsDetailVO getGoodsById(Long id);
|
||||
PmsGoodsDetailVO getGoodsById(Long id);
|
||||
|
||||
|
||||
IPage<PmsSpu> list(Page<PmsSpu> page, String name,Long categoryId);
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.youlai.mall.pms.service.impl;
|
||||
|
||||
import com.youlai.mall.pms.pojo.vo.admin.GoodsDetailVO;
|
||||
import com.youlai.mall.pms.pojo.vo.PmsGoodsDetailVO;
|
||||
import com.youlai.mall.pms.service.IPmsSpuService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@ -20,7 +20,7 @@ class PmsSpuServiceImplTest {
|
||||
|
||||
@Test
|
||||
void getGoodsById() {
|
||||
GoodsDetailVO goodsDetail = iPmsSpuService.getGoodsById(1l);
|
||||
PmsGoodsDetailVO goodsDetail = iPmsSpuService.getGoodsById(1l);
|
||||
log.info(goodsDetail.toString());
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user