91 lines
2.3 KiB
Java
91 lines
2.3 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.PayZfbOrderEntity;
|
|
import com.peanut.modules.book.service.PayZfbOrderService;
|
|
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/payzfborder")
|
|
public class PayZfbOrderController {
|
|
@Autowired
|
|
private PayZfbOrderService payZfbOrderService;
|
|
|
|
/**
|
|
* 列表
|
|
*/
|
|
@RequestMapping("/list")
|
|
// @RequiresPermissions("book:payzfborder:list")
|
|
public R list(@RequestParam Map<String, Object> params){
|
|
PageUtils page = payZfbOrderService.queryPage(params);
|
|
|
|
return R.ok().put("page", page);
|
|
}
|
|
|
|
|
|
/**
|
|
* 信息
|
|
*/
|
|
@RequestMapping("/info/{id}")
|
|
// @RequiresPermissions("book:payzfborder:info")
|
|
public R info(@PathVariable("id") Long id){
|
|
PayZfbOrderEntity payZfbOrder = payZfbOrderService.getById(id);
|
|
|
|
return R.ok().put("payZfbOrder", payZfbOrder);
|
|
}
|
|
|
|
/**
|
|
* 保存
|
|
*/
|
|
@RequestMapping("/save")
|
|
// @RequiresPermissions("book:payzfborder:save")
|
|
public R save(@RequestBody PayZfbOrderEntity payZfbOrder){
|
|
payZfbOrderService.save(payZfbOrder);
|
|
|
|
return R.ok();
|
|
}
|
|
|
|
/**
|
|
* 修改
|
|
*/
|
|
@RequestMapping("/update")
|
|
// @RequiresPermissions("book:payzfborder:update")
|
|
public R update(@RequestBody PayZfbOrderEntity payZfbOrder){
|
|
payZfbOrderService.updateById(payZfbOrder);
|
|
|
|
return R.ok();
|
|
}
|
|
|
|
/**
|
|
* 删除
|
|
*/
|
|
@RequestMapping("/delete")
|
|
// @RequiresPermissions("book:payzfborder:delete")
|
|
public R delete(@RequestBody Long[] ids){
|
|
payZfbOrderService.removeByIds(Arrays.asList(ids));
|
|
|
|
return R.ok();
|
|
}
|
|
|
|
}
|