OrgIntellectualPropertyServiceImpl.java 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. package com.goafanti.cognizance.service.impl;
  2. import java.util.HashMap;
  3. import java.util.List;
  4. import java.util.Map;
  5. import org.apache.commons.lang3.StringUtils;
  6. import org.springframework.beans.factory.annotation.Autowired;
  7. import org.springframework.stereotype.Service;
  8. import com.goafanti.cognizance.bo.OrgIntellectualPropertyDetailBo;
  9. import com.goafanti.cognizance.service.OrgIntellectualPropertyService;
  10. import com.goafanti.common.dao.OrgIntellectualPropertyMapper;
  11. import com.goafanti.common.model.OrgIntellectualProperty;
  12. import com.goafanti.core.mybatis.BaseMybatisDao;
  13. import com.goafanti.core.mybatis.page.Pagination;
  14. @Service
  15. public class OrgIntellectualPropertyServiceImpl extends BaseMybatisDao<OrgIntellectualPropertyMapper>
  16. implements OrgIntellectualPropertyService {
  17. @Autowired
  18. private OrgIntellectualPropertyMapper orgIntellectualPropertyMapper;
  19. @Override
  20. public OrgIntellectualProperty insert(OrgIntellectualProperty orgIntellectualProperty) {
  21. orgIntellectualPropertyMapper.insert(orgIntellectualProperty);
  22. return orgIntellectualProperty;
  23. }
  24. @SuppressWarnings("unchecked")
  25. @Override
  26. public Pagination<OrgIntellectualProperty> listIntellectual(Integer pageNo, Integer pageSize, String uid) {
  27. Map<String, Object> params = new HashMap<>();
  28. if (!StringUtils.isBlank(uid)){
  29. params.put("uid", uid);
  30. }
  31. if (pageNo == null || pageNo < 0) {
  32. pageNo = 1;
  33. }
  34. if (pageSize == null || pageSize < 0) {
  35. pageSize = 10;
  36. }
  37. return (Pagination<OrgIntellectualProperty>) findPage("findOrgIntellectualPropertyListByPage",
  38. "findOrgIntellectualPropertyCount", params, pageNo, pageSize);
  39. }
  40. @Override
  41. public int delete(String id) {
  42. return orgIntellectualPropertyMapper.deleteByPrimaryKey(id);
  43. }
  44. @Override
  45. public int deleteByPrimaryKey(List<String> id) {
  46. return orgIntellectualPropertyMapper.batchDeleteByPrimaryKey(id);
  47. }
  48. @Override
  49. public int updateByPrimaryKeySelective(OrgIntellectualProperty orgIntellectualProperty) {
  50. return orgIntellectualPropertyMapper.updateByPrimaryKeySelective(orgIntellectualProperty);
  51. }
  52. @Override
  53. public OrgIntellectualProperty selectOrgIntellectualPropertyByPid(String pid) {
  54. return orgIntellectualPropertyMapper.selectOrgIntellectualPropertyByPid(pid);
  55. }
  56. @Override
  57. public OrgIntellectualProperty selectByPrimaryKey(String id) {
  58. return orgIntellectualPropertyMapper.selectByPrimaryKey(id);
  59. }
  60. @Override
  61. public OrgIntellectualPropertyDetailBo selectPatentTypeDetail(String id) {
  62. return orgIntellectualPropertyMapper.selectPatentTypeDetail(id);
  63. }
  64. @Override
  65. public OrgIntellectualPropertyDetailBo selectCopyrightTypeDetail(String id) {
  66. return orgIntellectualPropertyMapper.selectCopyrightTypeDetail(id);
  67. }
  68. }