package com.pj.api.pushfee.oa; import cn.hutool.json.JSONUtil; import com.pj.project.tb_business.TbBusinessService; import com.pj.utils.sg.AjaxJson; import lombok.extern.slf4j.Slf4j; import org.springframework.http.MediaType; 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; import javax.annotation.Resource; @RequestMapping("oa") @RestController @Slf4j public class OaJudgeController { @Resource private TbBusinessService tbBusinessService; @PostMapping(value = "approveCallback", consumes = MediaType.APPLICATION_JSON_VALUE, produces = {"application/json; charset=UTF-8"}) public AjaxJson approveCallback(@RequestBody String req) { log.info("oa审批回调:{}", req); CallbackBO callbackBO=JSONUtil.toBean(req,CallbackBO.class); tbBusinessService.approveCallback(callbackBO); return AjaxJson.getSuccess(); } }