UserArchivesInterviewServiceImpl.java 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. package com.goafanti.Interview.service.impl;
  2. import com.goafanti.Interview.bo.UpdateUserBo;
  3. import com.goafanti.Interview.service.UserArchivesInterviewService;
  4. import com.goafanti.common.dao.PublicReleaseMapper;
  5. import com.goafanti.common.dao.UserArchivesInterviewMapper;
  6. import com.goafanti.common.dao.UserArchivesMapper;
  7. import com.goafanti.common.model.UserArchives;
  8. import com.goafanti.common.model.UserArchivesInterview;
  9. import com.goafanti.core.mybatis.BaseMybatisDao;
  10. import com.goafanti.core.mybatis.page.Pagination;
  11. import org.springframework.stereotype.Service;
  12. import javax.annotation.Resource;
  13. import java.util.HashMap;
  14. import java.util.Map;
  15. /**
  16. * 客户档案面谈表(UserArchivesInterview)表服务实现类
  17. *
  18. * @author makejava
  19. * @since 2025-04-10 17:09:23
  20. */
  21. @Service("userArchivesInterviewService")
  22. public class UserArchivesInterviewServiceImpl extends BaseMybatisDao<UserArchivesInterviewMapper> implements UserArchivesInterviewService {
  23. @Resource
  24. private UserArchivesInterviewMapper userArchivesInterviewMapper;
  25. @Resource
  26. private UserArchivesMapper userArchivesMapper;
  27. @Resource
  28. private PublicReleaseMapper publicReleaseMapper;
  29. @Override
  30. public Pagination<UserArchivesInterview> list(UserArchivesInterview userArchivesInterview, Integer pageNo, Integer pageSize) {
  31. Map<String, Object> params = new HashMap<>();
  32. params.put("in", userArchivesInterview);
  33. return (Pagination<UserArchivesInterview>) findPage("findUserArchivesInterviewList",
  34. "findUserArchivesInterviewCount", params, pageNo, pageSize);
  35. }
  36. /**
  37. * 通过ID查询单条数据
  38. *
  39. * @param id 主键
  40. * @return 实例对象
  41. */
  42. @Override
  43. public UserArchivesInterview queryById(Integer id) {
  44. return this.userArchivesInterviewMapper.selectById(id);
  45. }
  46. /**
  47. * 新增数据
  48. *
  49. * @param userArchivesInterview 实例对象
  50. * @return 实例对象
  51. */
  52. @Override
  53. public UserArchivesInterview insert(UserArchivesInterview userArchivesInterview) {
  54. this.userArchivesInterviewMapper.insert(userArchivesInterview);
  55. return userArchivesInterview;
  56. }
  57. /**
  58. * 修改数据
  59. *
  60. * @param userArchivesInterview 实例对象
  61. * @return 实例对象
  62. */
  63. @Override
  64. public UserArchivesInterview update(UserArchivesInterview userArchivesInterview) {
  65. this.userArchivesInterviewMapper.update(userArchivesInterview);
  66. return this.queryById(userArchivesInterview.getId());
  67. }
  68. /**
  69. * 通过主键删除数据
  70. *
  71. * @param id 主键
  72. * @return 是否成功
  73. */
  74. @Override
  75. public boolean deleteById(Integer id) {
  76. return this.userArchivesInterviewMapper.deleteById(id) > 0;
  77. }
  78. @Override
  79. public Object updateUser(UpdateUserBo in) {
  80. //先修改用户档案表
  81. UserArchives update = new UserArchives();
  82. update.setId(in.getId());
  83. update.setPatentCount(in.getPatentCount());
  84. update.setInventionPatentCount(in.getInventionPatentCount());
  85. update.setUtilityModelCount(in.getUtilityModelCount());
  86. update.setAppearancePatentCount(in.getAppearancePatentCount());
  87. update.setSoftwareWorksCount(in.getSoftwareWorksCount());
  88. update.setOtherCount(in.getOtherCount());
  89. update.setCompanyCount(in.getCompanyCount());
  90. update.setSocialSecurityCount(in.getSocialSecurityCount());
  91. update.setExternalInvestCount(in.getExternalInvestCount());
  92. update.setExternalInvestIndustry(in.getExternalInvestIndustry());
  93. update.setExternalInvestName(in.getExternalInvestName());
  94. //第一次面谈时间
  95. // publicReleaseMapper.selectByUid()
  96. // update.setFirstInterviewDate();
  97. userArchivesMapper.update(in);
  98. return null;
  99. }
  100. }