Commit d3ac3728 by 雷紫添

添加缺失的字段

parent 68b961f2
...@@ -7,7 +7,9 @@ import com.founder.service.XxcxService; ...@@ -7,7 +7,9 @@ import com.founder.service.XxcxService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
...@@ -15,7 +17,7 @@ import java.util.ArrayList; ...@@ -15,7 +17,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
@RestController @RestController
@RequestMapping("/xxcx") @RequestMapping(value="/xxcx",produces = "application/json; charset=utf-8")
public class XxcxController { public class XxcxController {
@Value("${xxcx.author}") @Value("${xxcx.author}")
...@@ -23,9 +25,9 @@ public class XxcxController { ...@@ -23,9 +25,9 @@ public class XxcxController {
@Autowired @Autowired
private XxcxService xxcxService; private XxcxService xxcxService;
@ResponseBody
@RequestMapping("/ajxxcx") @RequestMapping("/ajxxcx")
public Result queryAsjxx(String asjbh,String zjhm){ public Result queryAsjxx(@RequestBody TbStAsjView tbStAsjView ){
Result reslt = new Result(); Result reslt = new Result();
HttpServletRequest request = IpADdress.getRequest(); HttpServletRequest request = IpADdress.getRequest();
...@@ -36,15 +38,15 @@ public class XxcxController { ...@@ -36,15 +38,15 @@ public class XxcxController {
reslt.setStatus("fail"); reslt.setStatus("fail");
return reslt; return reslt;
} }
TbStAsjView tbStAsjView1=new TbStAsjView();
List<TbStAsjView> tbStAsjList = new ArrayList<>();
try { try {
tbStAsjList = xxcxService.queryTbStAsj(asjbh,zjhm);
reslt.setData(tbStAsjList); tbStAsjView1 = xxcxService.queryTbStAsjByAsjbh(tbStAsjView.getAsjbh());
reslt.setData(tbStAsjView1 );
reslt.setMsg("案件信息查询成功"); reslt.setMsg("案件信息查询成功");
reslt.setStatus("success"); reslt.setStatus("success");
} catch (Exception e) { } catch (Exception e) {
reslt.setData(tbStAsjList); reslt.setData(tbStAsjView1);
reslt.setMsg("案件信息查询失败\n"+e.getMessage()); reslt.setMsg("案件信息查询失败\n"+e.getMessage());
reslt.setStatus("error"); reslt.setStatus("error");
e.printStackTrace(); e.printStackTrace();
......
...@@ -7,4 +7,5 @@ import java.util.List; ...@@ -7,4 +7,5 @@ import java.util.List;
public interface XxcxService { public interface XxcxService {
public List<TbStAsjView> queryTbStAsj(String asjbh,String sfzh); public List<TbStAsjView> queryTbStAsj(String asjbh,String sfzh);
public TbStAsjView queryTbStAsjByAsjbh(String asjbh);
} }
...@@ -27,8 +27,8 @@ public class XxcxServiceImpl implements XxcxService { ...@@ -27,8 +27,8 @@ public class XxcxServiceImpl implements XxcxService {
} }
return tbStAsjViews; return tbStAsjViews;
} }
@Override
private TbStAsjView queryTbStAsjByAsjbh(String asjbh){ public TbStAsjView queryTbStAsjByAsjbh(String asjbh){
TbStAsjView tbStAsjView = null; TbStAsjView tbStAsjView = null;
TbStAsj tbStAsj = xxcxDao.queryTbStAsjByAsjbh(asjbh); TbStAsj tbStAsj = xxcxDao.queryTbStAsjByAsjbh(asjbh);
if(tbStAsj!=null){ if(tbStAsj!=null){
......
...@@ -26,4 +26,4 @@ ssdw: 140000000000 ...@@ -26,4 +26,4 @@ ssdw: 140000000000
server: server:
port: 9061 port: 9061
xxcx: xxcx:
author: 9b6c45cfcf3a4a629e3ed90fa3e5d058 author: Basic 9b6c45cfcf3a4a629e3ed90fa3e5d058
<?xml version="1.0" encoding="UTF-8" ?> <?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"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper> <mapper namespace="com.founder.dao.XxcxDao">
<select id="queryTbStAsjByAsjbh" parameterType="string" resultType="com.founder.model.TbStAsj"> <select id="queryTbStAsjByAsjbh" parameterType="string" resultType="com.founder.model.TbStAsj">
select ASJBH as asjbh, select ASJBH as asjbh,
JJBH as jjbh, JJBH as jjbh,
...@@ -210,4 +210,4 @@ ...@@ -210,4 +210,4 @@
and xxsc_pdbz = '0' and xxsc_pdbz = '0'
and ASJBH = #{asjbh , jdbcType=VARCHAR } and ASJBH = #{asjbh , jdbcType=VARCHAR }
</select> </select>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment