phpcjl
2024-12-11 7acdb59f8d76fc7ca22a087c9adb7881a3ae4675
1.后台管理-商品管理
6个文件已修改
47 ■■■■ 已修改文件
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/GoodsBargainPrice.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsBargainPriceController.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsCategoryController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/GoodsBargainPrice.java
@@ -65,7 +65,7 @@
    @ApiModelProperty(value = "添加用户id")
    @TableField("create_user_id")
    private Integer createUserId;
    private Long createUserId;
    @TableField(exist = false)
    private List<GoodsBargainPriceDetail> goodsBargainPriceDetailList;
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java
@@ -333,11 +333,11 @@
     */
    @GetMapping("/getAppuserPage")
    @ApiOperation(value = "用户列表", tags = {"后台管理"})
    public R<IPage<AppUser>> getAppuserPage(@ApiParam("页码") @RequestParam Integer PageNum,
    public R<IPage<AppUser>> getAppuserPage(@ApiParam("页码") @RequestParam Integer pageNum,
                                  @ApiParam("每一页数据大小") Integer pageSize,
                                  AppUser appUser)
    {
        IPage<AppUser> appuserPage = appUserService.getAppuserPage(PageNum, pageSize, appUser);
        IPage<AppUser> appuserPage = appUserService.getAppuserPage(pageNum, pageSize, appUser);
        return R.ok(appuserPage);
    }
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsBargainPriceController.java
@@ -3,17 +3,20 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.security.service.TokenService;
import com.ruoyi.other.api.domain.GoodsBargainPrice;
import com.ruoyi.other.api.domain.GoodsBargainPriceDetail;
import com.ruoyi.other.api.vo.GetGoodsBargainPrice;
import com.ruoyi.other.service.GoodsBargainPriceDetailService;
import com.ruoyi.other.service.GoodsBargainPriceService;
import com.ruoyi.system.api.model.LoginUser;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
 * <p>
@@ -32,6 +35,9 @@
    
    @Resource
    private GoodsBargainPriceDetailService goodsBargainPriceDetailService;
    @Resource
    private TokenService tokenService;
    
    
    /**
@@ -55,6 +61,29 @@
                .eq(GoodsBargainPriceDetail::getGoodsBargainPriceId, one.getId()).eq(GoodsBargainPriceDetail::getVip, goodsBargainPrice.getVip()));
        return R.ok(detailServiceOne);
    }
    /**
     * 新增
     */
    @PostMapping("/add")
    public R<Void> add(@RequestBody GoodsBargainPrice goodsBargainPrice) {
        LoginUser loginUserApplet = tokenService.getLoginUserApplet();
        goodsBargainPrice.setAuditStatus(0);
        goodsBargainPrice.setCreateUserId(loginUserApplet.getUserid());
        goodsBargainPriceService.save(goodsBargainPrice);
        List<GoodsBargainPriceDetail> goodsBargainPriceDetailList = goodsBargainPrice.getGoodsBargainPriceDetailList();
        if (goodsBargainPriceDetailList == null || goodsBargainPriceDetailList.isEmpty()){
            return R.fail("添加失败");
        }
        for (GoodsBargainPriceDetail goodsBargainPriceDetail : goodsBargainPriceDetailList) {
            goodsBargainPriceDetail.setGoodsBargainPriceId(goodsBargainPrice.getId());
        }
        goodsBargainPriceDetailService.saveBatch(goodsBargainPriceDetailList);
        return R.ok();
    }
    
    
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsCategoryController.java
@@ -55,10 +55,10 @@
    @GetMapping("/getList")
    @ApiOperation(value = "商品分类列表", tags = {"管理后台-商品分类"})
    public R<Page<GoodsCategory>> list(@ApiParam("页码") @RequestParam Integer PageNum,@ApiParam("每一页数据大小") Integer pageSize, GoodsCategory goodsCategory){
    public R<Page<GoodsCategory>> list(@ApiParam("页码") @RequestParam Integer pageNum,@ApiParam("每一页数据大小") Integer pageSize, GoodsCategory goodsCategory){
        Page<GoodsCategory> page = goodsCategoryService.lambdaQuery()
                .like(StringUtils.isNotEmpty(goodsCategory.getName()),GoodsCategory::getName, goodsCategory.getName())
                .page(Page.of(PageNum, pageSize));
                .page(Page.of(pageNum, pageSize));
        return R.ok(page);
    }
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsController.java
@@ -48,10 +48,10 @@
     */
    @GetMapping("/manageGoodsList")
    @ApiOperation(value = "后台管理商品列表", tags = {"管理后台-商品管理-商品列表"})
    public R<IPage<Goods>> manageGoodsList(@ApiParam("页码") @RequestParam Integer PageNum,
    public R<IPage<Goods>> manageGoodsList(,
                                           @ApiParam("每一页数据大小") Integer pageSize,
                                           Goods goods){
        return R.ok(goodsService.getManageGoodsList(new Page<>(PageNum, pageSize), goods));
        return R.ok(goodsService.getManageGoodsList(new Page<>(pageNum, pageSize), goods));
    }
    /**
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java
@@ -111,8 +111,8 @@
    @GetMapping("/list")
    @ApiOperation(value = "门店列表", tags = {"后台管理-门店管理-门店列表"})
    public R<IPage<Shop>> list(@ApiParam("页码") @RequestParam Integer PageNum,@ApiParam("每一页数据大小") Integer pageSize,Shop shop){
        IPage<Shop> shopIPage = shopService.getShopList(PageNum, pageSize, shop);
    public R<IPage<Shop>> list(@ApiParam("页码") @RequestParam Integer pageNum,@ApiParam("每一页数据大小") Integer pageSize,Shop shop){
        IPage<Shop> shopIPage = shopService.getShopList(pageNum, pageSize, shop);
        return R.ok(shopIPage);
    }