package com.ruoyi.mall.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.mall.domain.MallOrderPost;
import com.ruoyi.mall.service.IMallOrderPostService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * 邮费设置
 */
@RestController
@RequestMapping("/mall/MallOrderPost")
public class MallOrderPostController extends BaseController {

    @Resource
    private IMallOrderPostService mallOrderPostService;

    /**
     * 查询邮费设置
     * @return
     */
    @GetMapping
    public AjaxResult selectMallOrderPostById(){
        return AjaxResult.success(mallOrderPostService.selectMallOrderPostById());
    }

    /**
     * 修改邮费设置
     */
    @PutMapping
    public AjaxResult editMallOrderPost(@RequestBody MallOrderPost mallOrderPost)
    {
        return toAjax(mallOrderPostService.updateMallOrderPost(mallOrderPost));
    }


}
