package com.fdkankan.platform.test;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fdkankan.common.constant.TbStatus;
import com.fdkankan.platform.agent.entity.Agent;
import com.fdkankan.platform.agent.service.IAgentService;
import com.fdkankan.platform.goods.service.ICameraDetailService;
import com.fdkankan.platform.order.service.IInvoiceService;
import com.fdkankan.platform.user.request.RequestCamera;
import com.fdkankan.platform.user.vo.ResponseCamera;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/send")
public class TestSendController {


    private final String topic ="test_model_order";
    @Autowired
    private IAgentService agentService;

    @Autowired
    private IInvoiceService invoiceService;
    @Autowired
    private ICameraDetailService cameraDetailService;

    @RequestMapping("/test")
    private void sentTest(){
        Agent cameraEntity = new Agent();
        cameraEntity.setId(18L);
//        cameraEntity.setAgentArea("123123");
        cameraEntity.setTbStatus(TbStatus.DELETE.code());
        agentService.updateById(cameraEntity);
//        List<Agent> list = agentService.list();
//        System.out.println(list.toString());
    }
    @RequestMapping("/test1")
    private Page<ResponseCamera> sentTest1(){
        return cameraDetailService.cameraList(new RequestCamera());
    }
}
