FakeOfflineChangeController.java 1.3 KB
package cn.com.glsx.stdinterface.modules.controller;

import cn.com.glsx.stdinterface.api.FakeOfflineChangeClient;
import cn.com.glsx.stdinterface.dto.FakeOfflineChangeFrequentlyDTO;
import cn.com.glsx.stdinterface.modules.service.FakeOfflineChangeService;
import com.glsx.plat.core.web.R;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
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;

/**
 * @author xiangyanlin
 * @date 2022/9/15
 */
@Slf4j
@RestController
@RequestMapping(value = "/fakeOfflineChange")
public class FakeOfflineChangeController implements FakeOfflineChangeClient {

    @Autowired
    private FakeOfflineChangeService fakeOfflineChangeService;

    @PostMapping(value = "/save")
    @Override
    public R<Void> save(@RequestBody FakeOfflineChangeFrequentlyDTO fakeOfflineChangeFrequentlyDTO) {
        fakeOfflineChangeService.save(fakeOfflineChangeFrequentlyDTO);
        return R.ok();
    }

    @PostMapping(value = "/updateStatus")
    @Override
    public R<Void> updateStatus() {
        fakeOfflineChangeService.updateStatus();
        return R.ok();
    }
}