Authored by csgyoho

no message

... ... @@ -3,5 +3,5 @@ package com.yoho.ufo.dal;
/**
* Created by shengguo.cai on 2018/11/16.
*/
public interface ResourcesContentData {
public interface ResourcesContentDataMapper {
}
... ...
<?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.yoho.ufo.dal.ResourcesContentData">
<mapper namespace="com.yoho.ufo.dal.ResourcesContentDataMapper">
<resultMap id="BaseResultMap" type="com.yoho.ufo.model.resource.ResourcesContentData" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="platform_id" property="platformId" jdbcType="INTEGER" />
... ...
... ... @@ -5,6 +5,7 @@ import com.yoho.ufo.resource.service.IResourceService;
import com.yoho.ufo.service.model.ApiResponse;
import com.yoho.ufo.service.model.PageRequestBO;
import com.yohobuy.ufo.model.resp.ResourceGetBo;
import com.yohobuy.ufo.model.resp.ResourceInfoGetBo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
... ... @@ -34,4 +35,11 @@ public class ResourceController {
List<ResourceGetBo> result = this.resourceService.getResources(req);
return new ApiResponse.ApiResponseBuilder().code(200).data(result).build();
}
@RequestMapping(value = "/getResourceInfo")
public ApiResponse getResourceInfo(Integer id) {
LOGGER.info("enter getResourceInfo,id is {}",id);
List<ResourceInfoGetBo> result = this.resourceService.getResourceInfo(id);
return new ApiResponse.ApiResponseBuilder().code(200).data(result).build();
}
}
... ...
... ... @@ -2,6 +2,7 @@ package com.yoho.ufo.resource.service;
import com.yoho.ufo.service.model.PageRequestBO;
import com.yohobuy.ufo.model.resp.ResourceGetBo;
import com.yohobuy.ufo.model.resp.ResourceInfoGetBo;
import java.util.List;
... ... @@ -10,4 +11,6 @@ import java.util.List;
*/
public interface IResourceService {
List<ResourceGetBo> getResources(PageRequestBO req);
List<ResourceInfoGetBo> getResourceInfo(Integer id);
}
... ...
package com.yoho.ufo.resource.service.impl;
import com.yoho.ufo.dal.ResourcesContentDataMapper;
import com.yoho.ufo.dal.ResourcesContentMapper;
import com.yoho.ufo.dal.ResourcesMapper;
import com.yoho.ufo.model.resource.Resources;
import com.yoho.ufo.resource.service.IResourceService;
import com.yoho.ufo.service.model.PageRequestBO;
import com.yohobuy.ufo.model.resp.ResourceGetBo;
import com.yohobuy.ufo.model.resp.ResourceInfoGetBo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
... ... @@ -21,6 +24,10 @@ public class ResourceServiceImpl implements IResourceService{
private static final Logger LOGGER = LoggerFactory.getLogger(ResourceServiceImpl.class);
@Autowired
private ResourcesMapper resourcesMapper;
@Autowired
private ResourcesContentMapper resourcesContentMapper;
@Autowired
private ResourcesContentDataMapper resourcesContentDataMapper;
@Override
public List<ResourceGetBo> getResources(PageRequestBO req) {
... ... @@ -37,4 +44,11 @@ public class ResourceServiceImpl implements IResourceService{
}
return resourceGetBoList;
}
@Override
public List<ResourceInfoGetBo> getResourceInfo(Integer id) {
LOGGER.info("enter getResourceInfo,id is {}",id);
return null;
}
}
... ...
... ... @@ -43,6 +43,6 @@ datasources:
daos:
- com.yoho.ufo.dal.ResourcesMapper
- com.yoho.ufo.dal.ResourcesContentMapper
- com.yoho.ufo.dal.ResourcesContentData
- com.yoho.ufo.dal.ResourcesContentDataMapper
readOnlyInSlave: true
... ...