package com.peanut.modules.master.controller; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.github.yulichang.wrapper.MPJLambdaWrapper; import com.peanut.common.utils.PageUtils; import com.peanut.common.utils.R; import com.peanut.modules.book.service.ShopStoreService; import com.peanut.modules.common.entity.PayPaymentOrderEntity; import com.peanut.modules.common.entity.ShopStore; import com.peanut.modules.master.service.PayPaymentOrderService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.Arrays; import java.util.Map; /** * 充值订单表 */ @Slf4j @RestController("masterPayPaymentOrder") @RequestMapping("master/payPaymentOrder") public class PayPaymentOrderController { @Autowired private PayPaymentOrderService payPaymentOrderService; /** * 列表 */ @RequestMapping("/list") public R list(@RequestParam Map params){ PageUtils page = payPaymentOrderService.queryPage(params); return R.ok().put("page", page); } /** * 信息 */ @RequestMapping("/info/{id}") public R info(@PathVariable("id") Long id){ PayPaymentOrderEntity payPaymentOrder = payPaymentOrderService.getById(id); return R.ok().put("payPaymentOrder", payPaymentOrder); } /** * 保存 */ @RequestMapping("/save") public R save(@RequestBody PayPaymentOrderEntity payPaymentOrder){ payPaymentOrderService.save(payPaymentOrder); return R.ok(); } /** * 修改 */ @RequestMapping("/update") public R update(@RequestBody PayPaymentOrderEntity payPaymentOrder){ payPaymentOrderService.updateById(payPaymentOrder); return R.ok(); } /** * 删除 */ @RequestMapping("/delete") public R delete(@RequestBody Long[] ids){ payPaymentOrderService.removeByIds(Arrays.asList(ids)); return R.ok(); } }