Commit c82018b9 by 徐高华

活码

parent 87d0aa68
package com.gic.haoban.manage.api.service.hm;
import com.gic.haoban.manage.api.dto.hm.HmLinkDTO;
/**
*
* @ClassName: HmLinkApiService
......@@ -10,4 +12,5 @@ package com.gic.haoban.manage.api.service.hm;
*/
public interface HmLinkApiService {
public HmLinkDTO getByLinkId(Long linkId);
}
......@@ -41,7 +41,7 @@ public interface HmLinkMapper {
* @Return TabHaobanHmLink
* @Throws
*/
public TabHmLink selectByPrimaryKey(Long linkId);
public TabHmLink selectById(Long linkId);
/**
* 通过条件查询
......
......@@ -15,8 +15,7 @@ public class HmLinkServiceImpl implements HmLinkService {
@Override
public TabHmLink getByLinkId(Long linkId) {
// TODO Auto-generated method stub
return null;
return this.linkMapper.selectById(linkId);
}
}
package com.gic.haoban.manage.service.service.out.impl.hm;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gic.commons.util.EntityUtil;
import com.gic.haoban.manage.api.dto.hm.HmLinkDTO;
import com.gic.haoban.manage.api.service.hm.HmLinkApiService;
import com.gic.haoban.manage.service.entity.hm.TabHmLink;
import com.gic.haoban.manage.service.service.hm.HmLinkService;
@Service("hmLinkApiService")
public class HmLinkApiServiceImpl implements HmLinkApiService {
@Autowired
private HmLinkService hmLinkService;
@Override
public HmLinkDTO getByLinkId(Long linkId) {
TabHmLink link = this.hmLinkService.getByLinkId(linkId);
if (null != link) {
return EntityUtil.changeEntityByJSON(HmLinkDTO.class, link);
}
return null;
}
}
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.gic.haoban.manage.api.service.hm.HmLinkApiService;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "classpath:applicationContext-conf.xml" })
public class HmLinkTest {
@Autowired
private HmLinkApiService hmLinkApiService;
@Test
public void test11() {
this.hmLinkApiService.getByLinkId(100L);
}
}
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