| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- package com.goafanti.cognizance.service.impl;
- import java.util.HashMap;
- import java.util.List;
- import java.util.Map;
- import org.apache.commons.lang3.StringUtils;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.stereotype.Service;
- import com.goafanti.cognizance.bo.OrgIntellectualPropertyDetailBo;
- import com.goafanti.cognizance.service.OrgIntellectualPropertyService;
- import com.goafanti.common.dao.OrgIntellectualPropertyMapper;
- import com.goafanti.common.model.OrgIntellectualProperty;
- import com.goafanti.core.mybatis.BaseMybatisDao;
- import com.goafanti.core.mybatis.page.Pagination;
- @Service
- public class OrgIntellectualPropertyServiceImpl extends BaseMybatisDao<OrgIntellectualPropertyMapper>
- implements OrgIntellectualPropertyService {
- @Autowired
- private OrgIntellectualPropertyMapper orgIntellectualPropertyMapper;
- @Override
- public OrgIntellectualProperty insert(OrgIntellectualProperty orgIntellectualProperty) {
- orgIntellectualPropertyMapper.insert(orgIntellectualProperty);
- return orgIntellectualProperty;
- }
- @SuppressWarnings("unchecked")
- @Override
- public Pagination<OrgIntellectualProperty> listIntellectual(Integer pageNo, Integer pageSize, String uid) {
- Map<String, Object> params = new HashMap<>();
-
- if (!StringUtils.isBlank(uid)){
- params.put("uid", uid);
- }
- if (pageNo == null || pageNo < 0) {
- pageNo = 1;
- }
- if (pageSize == null || pageSize < 0) {
- pageSize = 10;
- }
- return (Pagination<OrgIntellectualProperty>) findPage("findOrgIntellectualPropertyListByPage",
- "findOrgIntellectualPropertyCount", params, pageNo, pageSize);
- }
- @Override
- public int delete(String id) {
- return orgIntellectualPropertyMapper.deleteByPrimaryKey(id);
- }
- @Override
- public int deleteByPrimaryKey(List<String> id) {
- return orgIntellectualPropertyMapper.batchDeleteByPrimaryKey(id);
- }
- @Override
- public int updateByPrimaryKeySelective(OrgIntellectualProperty orgIntellectualProperty) {
- return orgIntellectualPropertyMapper.updateByPrimaryKeySelective(orgIntellectualProperty);
- }
- @Override
- public OrgIntellectualProperty selectOrgIntellectualPropertyByPid(String pid) {
- return orgIntellectualPropertyMapper.selectOrgIntellectualPropertyByPid(pid);
- }
- @Override
- public OrgIntellectualProperty selectByPrimaryKey(String id) {
- return orgIntellectualPropertyMapper.selectByPrimaryKey(id);
- }
- @Override
- public OrgIntellectualPropertyDetailBo selectPatentTypeDetail(String id) {
- return orgIntellectualPropertyMapper.selectPatentTypeDetail(id);
- }
- @Override
- public OrgIntellectualPropertyDetailBo selectCopyrightTypeDetail(String id) {
- return orgIntellectualPropertyMapper.selectCopyrightTypeDetail(id);
- }
- }
|