Authored by csgyoho

no message

@@ -3,5 +3,5 @@ package com.yoho.ufo.dal; @@ -3,5 +3,5 @@ package com.yoho.ufo.dal;
3 /** 3 /**
4 * Created by shengguo.cai on 2018/11/16. 4 * Created by shengguo.cai on 2018/11/16.
5 */ 5 */
6 -public interface ResourcesContentData { 6 +public interface ResourcesContentDataMapper {
7 } 7 }
1 <?xml version="1.0" encoding="UTF-8" ?> 1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > 2 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3 -<mapper namespace="com.yoho.ufo.dal.ResourcesContentData"> 3 +<mapper namespace="com.yoho.ufo.dal.ResourcesContentDataMapper">
4 <resultMap id="BaseResultMap" type="com.yoho.ufo.model.resource.ResourcesContentData" > 4 <resultMap id="BaseResultMap" type="com.yoho.ufo.model.resource.ResourcesContentData" >
5 <id column="id" property="id" jdbcType="INTEGER" /> 5 <id column="id" property="id" jdbcType="INTEGER" />
6 <result column="platform_id" property="platformId" jdbcType="INTEGER" /> 6 <result column="platform_id" property="platformId" jdbcType="INTEGER" />
@@ -5,6 +5,7 @@ import com.yoho.ufo.resource.service.IResourceService; @@ -5,6 +5,7 @@ import com.yoho.ufo.resource.service.IResourceService;
5 import com.yoho.ufo.service.model.ApiResponse; 5 import com.yoho.ufo.service.model.ApiResponse;
6 import com.yoho.ufo.service.model.PageRequestBO; 6 import com.yoho.ufo.service.model.PageRequestBO;
7 import com.yohobuy.ufo.model.resp.ResourceGetBo; 7 import com.yohobuy.ufo.model.resp.ResourceGetBo;
  8 +import com.yohobuy.ufo.model.resp.ResourceInfoGetBo;
8 import org.slf4j.Logger; 9 import org.slf4j.Logger;
9 import org.slf4j.LoggerFactory; 10 import org.slf4j.LoggerFactory;
10 import org.springframework.beans.factory.annotation.Autowired; 11 import org.springframework.beans.factory.annotation.Autowired;
@@ -34,4 +35,11 @@ public class ResourceController { @@ -34,4 +35,11 @@ public class ResourceController {
34 List<ResourceGetBo> result = this.resourceService.getResources(req); 35 List<ResourceGetBo> result = this.resourceService.getResources(req);
35 return new ApiResponse.ApiResponseBuilder().code(200).data(result).build(); 36 return new ApiResponse.ApiResponseBuilder().code(200).data(result).build();
36 } 37 }
  38 +
  39 + @RequestMapping(value = "/getResourceInfo")
  40 + public ApiResponse getResourceInfo(Integer id) {
  41 + LOGGER.info("enter getResourceInfo,id is {}",id);
  42 + List<ResourceInfoGetBo> result = this.resourceService.getResourceInfo(id);
  43 + return new ApiResponse.ApiResponseBuilder().code(200).data(result).build();
  44 + }
37 } 45 }
@@ -2,6 +2,7 @@ package com.yoho.ufo.resource.service; @@ -2,6 +2,7 @@ package com.yoho.ufo.resource.service;
2 2
3 import com.yoho.ufo.service.model.PageRequestBO; 3 import com.yoho.ufo.service.model.PageRequestBO;
4 import com.yohobuy.ufo.model.resp.ResourceGetBo; 4 import com.yohobuy.ufo.model.resp.ResourceGetBo;
  5 +import com.yohobuy.ufo.model.resp.ResourceInfoGetBo;
5 6
6 import java.util.List; 7 import java.util.List;
7 8
@@ -10,4 +11,6 @@ import java.util.List; @@ -10,4 +11,6 @@ import java.util.List;
10 */ 11 */
11 public interface IResourceService { 12 public interface IResourceService {
12 List<ResourceGetBo> getResources(PageRequestBO req); 13 List<ResourceGetBo> getResources(PageRequestBO req);
  14 +
  15 + List<ResourceInfoGetBo> getResourceInfo(Integer id);
13 } 16 }
1 package com.yoho.ufo.resource.service.impl; 1 package com.yoho.ufo.resource.service.impl;
2 2
  3 +import com.yoho.ufo.dal.ResourcesContentDataMapper;
  4 +import com.yoho.ufo.dal.ResourcesContentMapper;
3 import com.yoho.ufo.dal.ResourcesMapper; 5 import com.yoho.ufo.dal.ResourcesMapper;
4 import com.yoho.ufo.model.resource.Resources; 6 import com.yoho.ufo.model.resource.Resources;
5 import com.yoho.ufo.resource.service.IResourceService; 7 import com.yoho.ufo.resource.service.IResourceService;
6 import com.yoho.ufo.service.model.PageRequestBO; 8 import com.yoho.ufo.service.model.PageRequestBO;
7 import com.yohobuy.ufo.model.resp.ResourceGetBo; 9 import com.yohobuy.ufo.model.resp.ResourceGetBo;
  10 +import com.yohobuy.ufo.model.resp.ResourceInfoGetBo;
8 import org.slf4j.Logger; 11 import org.slf4j.Logger;
9 import org.slf4j.LoggerFactory; 12 import org.slf4j.LoggerFactory;
10 import org.springframework.beans.factory.annotation.Autowired; 13 import org.springframework.beans.factory.annotation.Autowired;
@@ -21,6 +24,10 @@ public class ResourceServiceImpl implements IResourceService{ @@ -21,6 +24,10 @@ public class ResourceServiceImpl implements IResourceService{
21 private static final Logger LOGGER = LoggerFactory.getLogger(ResourceServiceImpl.class); 24 private static final Logger LOGGER = LoggerFactory.getLogger(ResourceServiceImpl.class);
22 @Autowired 25 @Autowired
23 private ResourcesMapper resourcesMapper; 26 private ResourcesMapper resourcesMapper;
  27 + @Autowired
  28 + private ResourcesContentMapper resourcesContentMapper;
  29 + @Autowired
  30 + private ResourcesContentDataMapper resourcesContentDataMapper;
24 31
25 @Override 32 @Override
26 public List<ResourceGetBo> getResources(PageRequestBO req) { 33 public List<ResourceGetBo> getResources(PageRequestBO req) {
@@ -37,4 +44,11 @@ public class ResourceServiceImpl implements IResourceService{ @@ -37,4 +44,11 @@ public class ResourceServiceImpl implements IResourceService{
37 } 44 }
38 return resourceGetBoList; 45 return resourceGetBoList;
39 } 46 }
  47 +
  48 + @Override
  49 + public List<ResourceInfoGetBo> getResourceInfo(Integer id) {
  50 + LOGGER.info("enter getResourceInfo,id is {}",id);
  51 +
  52 + return null;
  53 + }
40 } 54 }
@@ -43,6 +43,6 @@ datasources: @@ -43,6 +43,6 @@ datasources:
43 daos: 43 daos:
44 - com.yoho.ufo.dal.ResourcesMapper 44 - com.yoho.ufo.dal.ResourcesMapper
45 - com.yoho.ufo.dal.ResourcesContentMapper 45 - com.yoho.ufo.dal.ResourcesContentMapper
46 - - com.yoho.ufo.dal.ResourcesContentData 46 + - com.yoho.ufo.dal.ResourcesContentDataMapper
47 47
48 readOnlyInSlave: true 48 readOnlyInSlave: true