Files
nuttyreading-java/src/main/java/com/peanut/modules/book/controller/PayPaymentOrderController.java
2023-09-19 18:24:19 +08:00

91 lines
2.4 KiB
Java

package com.peanut.modules.book.controller;
import java.util.Arrays;
import java.util.Map;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.peanut.modules.book.entity.PayPaymentOrderEntity;
import com.peanut.modules.book.service.PayPaymentOrderService;
import com.peanut.common.utils.PageUtils;
import com.peanut.common.utils.R;
/**
* 充值订单表
*
* @author yl
* @email yl328572838@163.com
* @date 2022-08-29 15:27:44
*/
@RestController
@RequestMapping("book/paypaymentorder")
public class PayPaymentOrderController {
@Autowired
private PayPaymentOrderService payPaymentOrderService;
/**
* 列表
*/
@RequestMapping("/list")
// @RequiresPermissions("book:paypaymentorder:list")
public R list(@RequestParam Map<String, Object> params){
PageUtils page = payPaymentOrderService.queryPage(params);
return R.ok().put("page", page);
}
/**
* 信息
*/
@RequestMapping("/info/{id}")
// @RequiresPermissions("book:paypaymentorder:info")
public R info(@PathVariable("id") Long id){
PayPaymentOrderEntity payPaymentOrder = payPaymentOrderService.getById(id);
return R.ok().put("payPaymentOrder", payPaymentOrder);
}
/**
* 保存
*/
@RequestMapping("/save")
// @RequiresPermissions("book:paypaymentorder:save")
public R save(@RequestBody PayPaymentOrderEntity payPaymentOrder){
payPaymentOrderService.save(payPaymentOrder);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
// @RequiresPermissions("book:paypaymentorder:update")
public R update(@RequestBody PayPaymentOrderEntity payPaymentOrder){
payPaymentOrderService.updateById(payPaymentOrder);
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
// @RequiresPermissions("book:paypaymentorder:delete")
public R delete(@RequestBody Long[] ids){
payPaymentOrderService.removeByIds(Arrays.asList(ids));
return R.ok();
}
}