| | |
| | | |
| | | @ApiModelProperty(value = "添加用户id") |
| | | @TableField("create_user_id") |
| | | private Integer createUserId; |
| | | private Long createUserId; |
| | | |
| | | @TableField(exist = false) |
| | | private List<GoodsBargainPriceDetail> goodsBargainPriceDetailList; |
| | |
| | | */ |
| | | @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); |
| | | } |
| | | |
| | |
| | | |
| | | 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> |
| | |
| | | |
| | | @Resource |
| | | private GoodsBargainPriceDetailService goodsBargainPriceDetailService; |
| | | |
| | | @Resource |
| | | private TokenService tokenService; |
| | | |
| | | |
| | | /** |
| | |
| | | .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(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | |
| | | @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); |
| | | } |
| | | |
| | |
| | | */ |
| | | @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)); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | @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); |
| | | } |
| | | |