看板数据新增api请求方式

master
zpl 3 years ago
parent bab8da36a2
commit bb86c5feb9

@ -0,0 +1,39 @@
package com.foreverwin.mesnac.common.controller;
import com.foreverwin.mesnac.common.service.BoardService;
import com.foreverwin.modular.core.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.Map;
@RestController
@RequestMapping("/BOARD")
public class BoardController {
@Autowired
public BoardService boardService;
@GetMapping("/test")
public R test(String resource, String qty) {
Map<String, Object> result = new HashMap<>();
try {
result.put("RESOURCE", resource);
result.put("SHOP_ORDER", "SO20211011");
result.put("ITEM", "00302354001");
result.put("QTY", 80);
result.put("JJ", 560);
result.put("HJ", 450);
result.put("RCL", 700);
result.put("ZZ", 390);
} catch (Exception e) {
return R.failed(e.getMessage());
}
return R.ok(result);
}
}

@ -0,0 +1,7 @@
package com.foreverwin.mesnac.common.mapper;
import org.springframework.stereotype.Repository;
@Repository
public class BoardMapper {
}

@ -0,0 +1,4 @@
package com.foreverwin.mesnac.common.service;
public interface BoardService {
}

@ -0,0 +1,10 @@
package com.foreverwin.mesnac.common.service.impl;
import com.foreverwin.mesnac.common.service.BoardService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service
@Transactional(rollbackFor = Exception.class)
public class BoardServiceImpl implements BoardService {
}

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.foreverwin.mesnac.common.mapper.BoardMapper">
</mapper>
Loading…
Cancel
Save