|
|
@@ -120,48 +120,25 @@ public class UserArchivesServiceImpl extends BaseMybatisDao< UserArchivesMapper>
|
|
|
*/
|
|
|
@Override
|
|
|
public UserArchives update(UserArchives userArchives) {
|
|
|
- UserArchives use = this.queryById(userArchives.getId());
|
|
|
int count = 0;
|
|
|
if (userArchives.getAppearancePatentCount()!=null){
|
|
|
count+=userArchives.getAppearancePatentCount();
|
|
|
- use.setAppearancePatentCount(userArchives.getAppearancePatentCount());
|
|
|
- }else {
|
|
|
- count+=use.getAppearancePatentCount();
|
|
|
}
|
|
|
if (userArchives.getInventionPatentCount()!=null){
|
|
|
count+=userArchives.getInventionPatentCount();
|
|
|
- use.setInventionPatentCount(userArchives.getInventionPatentCount());
|
|
|
- }else {
|
|
|
- count+=use.getInventionPatentCount();
|
|
|
}
|
|
|
if (userArchives.getUtilityModelCount() !=null){
|
|
|
count+=userArchives.getUtilityModelCount();
|
|
|
- use.setUtilityModelCount(userArchives.getUtilityModelCount());
|
|
|
- }else {
|
|
|
- count+=use.getSoftwareWorksCount();
|
|
|
}
|
|
|
if (userArchives.getOtherCount()!=null){
|
|
|
count+=userArchives.getOtherCount();
|
|
|
- use.setOtherCount(userArchives.getOtherCount());
|
|
|
- }else {
|
|
|
- count+=use.getOtherCount();
|
|
|
}
|
|
|
userArchives.setPatentCount(count);
|
|
|
- use.setPatentCount(count);
|
|
|
- if (userArchives.getFinancialData()!=null){
|
|
|
- use.setFinancialData(userArchives.getFinancialData());
|
|
|
- }
|
|
|
- if (userArchives.getInterviewIdeas()!=null){
|
|
|
- use.setInterviewIdeas(userArchives.getInterviewIdeas());
|
|
|
- }
|
|
|
- if (userArchives.getEarlyCommunication()!=null){
|
|
|
- use.setEarlyCommunication(userArchives.getEarlyCommunication());
|
|
|
- }
|
|
|
if(userArchives.getId()==null){
|
|
|
return insert(userArchives);
|
|
|
}else {
|
|
|
this.userArchivesMapper.update(userArchives);
|
|
|
- return use;
|
|
|
+ return this.queryById(userArchives.getId());
|
|
|
}
|
|
|
}
|
|
|
|