提交 935092f4 authored 作者: 孙于凯's avatar 孙于凯

feat:新增学会学术表的敏感存储

上级 642847b2
package com.tykj.sjc.controller; package com.tykj.sjc.controller;
import com.tykj.sjc.service.SjcAcademicianService; import com.tykj.sjc.service.*;
import com.tykj.sjc.service.SjcDcExpertService;
import com.tykj.sjc.service.SjcLearnMemberService;
import com.tykj.sjc.service.SjcScienceTechnologyService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -30,6 +27,8 @@ public class QkhController { ...@@ -30,6 +27,8 @@ public class QkhController {
@Resource @Resource
private SjcScienceTechnologyService sjcScienceTechnologyService; private SjcScienceTechnologyService sjcScienceTechnologyService;
@Resource
private SjcActivityService sjcActivityService;
@GetMapping("/saveDcExpert") @GetMapping("/saveDcExpert")
@ApiOperation("专家信息存储") @ApiOperation("专家信息存储")
...@@ -49,6 +48,11 @@ public class QkhController { ...@@ -49,6 +48,11 @@ public class QkhController {
sjcScienceTechnologyService.saveScienceTechnology(); sjcScienceTechnologyService.saveScienceTechnology();
} }
@GetMapping("/saveActivity")
@ApiOperation("学会学术活动信息存储")
public void saveActivity(){
sjcActivityService.saveActivity();
}
@GetMapping("/saveAll") @GetMapping("/saveAll")
@ApiOperation("青科汇数据仓所有数据存储") @ApiOperation("青科汇数据仓所有数据存储")
...@@ -59,6 +63,8 @@ public class QkhController { ...@@ -59,6 +63,8 @@ public class QkhController {
log.info("科技工作者信息存储完成"); log.info("科技工作者信息存储完成");
sjcScienceTechnologyService.saveScienceTechnology(); sjcScienceTechnologyService.saveScienceTechnology();
log.info("青年科技工作者信息存储完成"); log.info("青年科技工作者信息存储完成");
sjcActivityService.saveActivity();
log.info("学会学术活动信息存储完成");
log.info("数据仓存储完成"); log.info("数据仓存储完成");
} }
} }
package com.tykj.sjc.mapper;
import com.tykj.sjc.qkh_entity.SjcActivity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.mapstruct.Mapper;
/**
* @author tykj
* @description 针对表【sjc_activity】的数据库操作Mapper
* @createDate 2023-11-17 17:27:48
* @Entity com.tykj.sjc.qkh_entity.SjcActivity
*/
@Mapper
public interface SjcActivityMapper extends BaseMapper<SjcActivity> {
}
package com.tykj.sjc.qkh_entity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
*
* @TableName sjc_activity
*/
public class SjcActivity implements Serializable {
/**
*
*/
private Integer id;
/**
*
*/
private Date createTime;
/**
*
*/
private Integer createUserId;
/**
*
*/
private Integer deleteTag;
/**
*
*/
private Date updateTime;
/**
*
*/
private Integer updateUserId;
/**
* 地址
*/
private String address;
/**
* 活动内容
*/
private String content;
/**
*
*/
private Date endTime;
/**
*
*/
private Integer learnId;
/**
* 学会名称
*/
private String learnName;
/**
*
*/
private Integer limitNum;
/**
*
*/
private String picUrl;
/**
*
*/
private Date registrationEndTime;
/**
*
*/
private Date registrationStartTime;
/**
*
*/
private Date startTime;
/**
* 活动标题
*/
private String title;
/**
*
*/
private Integer type;
/**
*
*/
private String unitName;
/**
*
*/
private String eleganceContent;
/**
*
*/
private String eleganceTitle;
/**
*
*/
private String contacts;
/**
*
*/
private Integer audit;
/**
*
*/
private Integer checkInRange;
/**
*
*/
private BigDecimal latitude;
/**
*
*/
private BigDecimal longitude;
/**
*
*/
private Integer availableNum;
/**
*
*/
private String expertStr;
/**
*
*/
private String eleganceTime;
/**
*
*/
private Integer activityLevel;
/**
*
*/
private Integer activityType;
/**
*
*/
private String coverUrl;
/**
*
*/
private String coverRegion;
/**
*
*/
private Integer putState;
/**
* 敏感字段随机值
*/
private String randomId;
private static final long serialVersionUID = 1L;
/**
*
*/
public Integer getId() {
return id;
}
/**
*
*/
public void setId(Integer id) {
this.id = id;
}
/**
*
*/
public Date getCreateTime() {
return createTime;
}
/**
*
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
*
*/
public Integer getCreateUserId() {
return createUserId;
}
/**
*
*/
public void setCreateUserId(Integer createUserId) {
this.createUserId = createUserId;
}
/**
*
*/
public Integer getDeleteTag() {
return deleteTag;
}
/**
*
*/
public void setDeleteTag(Integer deleteTag) {
this.deleteTag = deleteTag;
}
/**
*
*/
public Date getUpdateTime() {
return updateTime;
}
/**
*
*/
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
/**
*
*/
public Integer getUpdateUserId() {
return updateUserId;
}
/**
*
*/
public void setUpdateUserId(Integer updateUserId) {
this.updateUserId = updateUserId;
}
/**
* 地址
*/
public String getAddress() {
return address;
}
/**
* 地址
*/
public void setAddress(String address) {
this.address = address;
}
/**
* 活动内容
*/
public String getContent() {
return content;
}
/**
* 活动内容
*/
public void setContent(String content) {
this.content = content;
}
/**
*
*/
public Date getEndTime() {
return endTime;
}
/**
*
*/
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
/**
*
*/
public Integer getLearnId() {
return learnId;
}
/**
*
*/
public void setLearnId(Integer learnId) {
this.learnId = learnId;
}
/**
* 学会名称
*/
public String getLearnName() {
return learnName;
}
/**
* 学会名称
*/
public void setLearnName(String learnName) {
this.learnName = learnName;
}
/**
*
*/
public Integer getLimitNum() {
return limitNum;
}
/**
*
*/
public void setLimitNum(Integer limitNum) {
this.limitNum = limitNum;
}
/**
*
*/
public String getPicUrl() {
return picUrl;
}
/**
*
*/
public void setPicUrl(String picUrl) {
this.picUrl = picUrl;
}
/**
*
*/
public Date getRegistrationEndTime() {
return registrationEndTime;
}
/**
*
*/
public void setRegistrationEndTime(Date registrationEndTime) {
this.registrationEndTime = registrationEndTime;
}
/**
*
*/
public Date getRegistrationStartTime() {
return registrationStartTime;
}
/**
*
*/
public void setRegistrationStartTime(Date registrationStartTime) {
this.registrationStartTime = registrationStartTime;
}
/**
*
*/
public Date getStartTime() {
return startTime;
}
/**
*
*/
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
/**
* 活动标题
*/
public String getTitle() {
return title;
}
/**
* 活动标题
*/
public void setTitle(String title) {
this.title = title;
}
/**
*
*/
public Integer getType() {
return type;
}
/**
*
*/
public void setType(Integer type) {
this.type = type;
}
/**
*
*/
public String getUnitName() {
return unitName;
}
/**
*
*/
public void setUnitName(String unitName) {
this.unitName = unitName;
}
/**
*
*/
public String getEleganceContent() {
return eleganceContent;
}
/**
*
*/
public void setEleganceContent(String eleganceContent) {
this.eleganceContent = eleganceContent;
}
/**
*
*/
public String getEleganceTitle() {
return eleganceTitle;
}
/**
*
*/
public void setEleganceTitle(String eleganceTitle) {
this.eleganceTitle = eleganceTitle;
}
/**
*
*/
public String getContacts() {
return contacts;
}
/**
*
*/
public void setContacts(String contacts) {
this.contacts = contacts;
}
/**
*
*/
public Integer getAudit() {
return audit;
}
/**
*
*/
public void setAudit(Integer audit) {
this.audit = audit;
}
/**
*
*/
public Integer getCheckInRange() {
return checkInRange;
}
/**
*
*/
public void setCheckInRange(Integer checkInRange) {
this.checkInRange = checkInRange;
}
/**
*
*/
public BigDecimal getLatitude() {
return latitude;
}
/**
*
*/
public void setLatitude(BigDecimal latitude) {
this.latitude = latitude;
}
/**
*
*/
public BigDecimal getLongitude() {
return longitude;
}
/**
*
*/
public void setLongitude(BigDecimal longitude) {
this.longitude = longitude;
}
/**
*
*/
public Integer getAvailableNum() {
return availableNum;
}
/**
*
*/
public void setAvailableNum(Integer availableNum) {
this.availableNum = availableNum;
}
/**
*
*/
public String getExpertStr() {
return expertStr;
}
/**
*
*/
public void setExpertStr(String expertStr) {
this.expertStr = expertStr;
}
/**
*
*/
public String getEleganceTime() {
return eleganceTime;
}
/**
*
*/
public void setEleganceTime(String eleganceTime) {
this.eleganceTime = eleganceTime;
}
/**
*
*/
public Integer getActivityLevel() {
return activityLevel;
}
/**
*
*/
public void setActivityLevel(Integer activityLevel) {
this.activityLevel = activityLevel;
}
/**
*
*/
public Integer getActivityType() {
return activityType;
}
/**
*
*/
public void setActivityType(Integer activityType) {
this.activityType = activityType;
}
/**
*
*/
public String getCoverUrl() {
return coverUrl;
}
/**
*
*/
public void setCoverUrl(String coverUrl) {
this.coverUrl = coverUrl;
}
/**
*
*/
public String getCoverRegion() {
return coverRegion;
}
/**
*
*/
public void setCoverRegion(String coverRegion) {
this.coverRegion = coverRegion;
}
/**
*
*/
public Integer getPutState() {
return putState;
}
/**
*
*/
public void setPutState(Integer putState) {
this.putState = putState;
}
/**
* 敏感字段随机值
*/
public String getRandomId() {
return randomId;
}
/**
* 敏感字段随机值
*/
public void setRandomId(String randomId) {
this.randomId = randomId;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
SjcActivity other = (SjcActivity) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getCreateUserId() == null ? other.getCreateUserId() == null : this.getCreateUserId().equals(other.getCreateUserId()))
&& (this.getDeleteTag() == null ? other.getDeleteTag() == null : this.getDeleteTag().equals(other.getDeleteTag()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (this.getUpdateUserId() == null ? other.getUpdateUserId() == null : this.getUpdateUserId().equals(other.getUpdateUserId()))
&& (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
&& (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()))
&& (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime()))
&& (this.getLearnId() == null ? other.getLearnId() == null : this.getLearnId().equals(other.getLearnId()))
&& (this.getLearnName() == null ? other.getLearnName() == null : this.getLearnName().equals(other.getLearnName()))
&& (this.getLimitNum() == null ? other.getLimitNum() == null : this.getLimitNum().equals(other.getLimitNum()))
&& (this.getPicUrl() == null ? other.getPicUrl() == null : this.getPicUrl().equals(other.getPicUrl()))
&& (this.getRegistrationEndTime() == null ? other.getRegistrationEndTime() == null : this.getRegistrationEndTime().equals(other.getRegistrationEndTime()))
&& (this.getRegistrationStartTime() == null ? other.getRegistrationStartTime() == null : this.getRegistrationStartTime().equals(other.getRegistrationStartTime()))
&& (this.getStartTime() == null ? other.getStartTime() == null : this.getStartTime().equals(other.getStartTime()))
&& (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
&& (this.getUnitName() == null ? other.getUnitName() == null : this.getUnitName().equals(other.getUnitName()))
&& (this.getEleganceContent() == null ? other.getEleganceContent() == null : this.getEleganceContent().equals(other.getEleganceContent()))
&& (this.getEleganceTitle() == null ? other.getEleganceTitle() == null : this.getEleganceTitle().equals(other.getEleganceTitle()))
&& (this.getContacts() == null ? other.getContacts() == null : this.getContacts().equals(other.getContacts()))
&& (this.getAudit() == null ? other.getAudit() == null : this.getAudit().equals(other.getAudit()))
&& (this.getCheckInRange() == null ? other.getCheckInRange() == null : this.getCheckInRange().equals(other.getCheckInRange()))
&& (this.getLatitude() == null ? other.getLatitude() == null : this.getLatitude().equals(other.getLatitude()))
&& (this.getLongitude() == null ? other.getLongitude() == null : this.getLongitude().equals(other.getLongitude()))
&& (this.getAvailableNum() == null ? other.getAvailableNum() == null : this.getAvailableNum().equals(other.getAvailableNum()))
&& (this.getExpertStr() == null ? other.getExpertStr() == null : this.getExpertStr().equals(other.getExpertStr()))
&& (this.getEleganceTime() == null ? other.getEleganceTime() == null : this.getEleganceTime().equals(other.getEleganceTime()))
&& (this.getActivityLevel() == null ? other.getActivityLevel() == null : this.getActivityLevel().equals(other.getActivityLevel()))
&& (this.getActivityType() == null ? other.getActivityType() == null : this.getActivityType().equals(other.getActivityType()))
&& (this.getCoverUrl() == null ? other.getCoverUrl() == null : this.getCoverUrl().equals(other.getCoverUrl()))
&& (this.getCoverRegion() == null ? other.getCoverRegion() == null : this.getCoverRegion().equals(other.getCoverRegion()))
&& (this.getPutState() == null ? other.getPutState() == null : this.getPutState().equals(other.getPutState()))
&& (this.getRandomId() == null ? other.getRandomId() == null : this.getRandomId().equals(other.getRandomId()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getCreateUserId() == null) ? 0 : getCreateUserId().hashCode());
result = prime * result + ((getDeleteTag() == null) ? 0 : getDeleteTag().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getUpdateUserId() == null) ? 0 : getUpdateUserId().hashCode());
result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
result = prime * result + ((getLearnId() == null) ? 0 : getLearnId().hashCode());
result = prime * result + ((getLearnName() == null) ? 0 : getLearnName().hashCode());
result = prime * result + ((getLimitNum() == null) ? 0 : getLimitNum().hashCode());
result = prime * result + ((getPicUrl() == null) ? 0 : getPicUrl().hashCode());
result = prime * result + ((getRegistrationEndTime() == null) ? 0 : getRegistrationEndTime().hashCode());
result = prime * result + ((getRegistrationStartTime() == null) ? 0 : getRegistrationStartTime().hashCode());
result = prime * result + ((getStartTime() == null) ? 0 : getStartTime().hashCode());
result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
result = prime * result + ((getUnitName() == null) ? 0 : getUnitName().hashCode());
result = prime * result + ((getEleganceContent() == null) ? 0 : getEleganceContent().hashCode());
result = prime * result + ((getEleganceTitle() == null) ? 0 : getEleganceTitle().hashCode());
result = prime * result + ((getContacts() == null) ? 0 : getContacts().hashCode());
result = prime * result + ((getAudit() == null) ? 0 : getAudit().hashCode());
result = prime * result + ((getCheckInRange() == null) ? 0 : getCheckInRange().hashCode());
result = prime * result + ((getLatitude() == null) ? 0 : getLatitude().hashCode());
result = prime * result + ((getLongitude() == null) ? 0 : getLongitude().hashCode());
result = prime * result + ((getAvailableNum() == null) ? 0 : getAvailableNum().hashCode());
result = prime * result + ((getExpertStr() == null) ? 0 : getExpertStr().hashCode());
result = prime * result + ((getEleganceTime() == null) ? 0 : getEleganceTime().hashCode());
result = prime * result + ((getActivityLevel() == null) ? 0 : getActivityLevel().hashCode());
result = prime * result + ((getActivityType() == null) ? 0 : getActivityType().hashCode());
result = prime * result + ((getCoverUrl() == null) ? 0 : getCoverUrl().hashCode());
result = prime * result + ((getCoverRegion() == null) ? 0 : getCoverRegion().hashCode());
result = prime * result + ((getPutState() == null) ? 0 : getPutState().hashCode());
result = prime * result + ((getRandomId() == null) ? 0 : getRandomId().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", createTime=").append(createTime);
sb.append(", createUserId=").append(createUserId);
sb.append(", deleteTag=").append(deleteTag);
sb.append(", updateTime=").append(updateTime);
sb.append(", updateUserId=").append(updateUserId);
sb.append(", address=").append(address);
sb.append(", content=").append(content);
sb.append(", endTime=").append(endTime);
sb.append(", learnId=").append(learnId);
sb.append(", learnName=").append(learnName);
sb.append(", limitNum=").append(limitNum);
sb.append(", picUrl=").append(picUrl);
sb.append(", registrationEndTime=").append(registrationEndTime);
sb.append(", registrationStartTime=").append(registrationStartTime);
sb.append(", startTime=").append(startTime);
sb.append(", title=").append(title);
sb.append(", type=").append(type);
sb.append(", unitName=").append(unitName);
sb.append(", eleganceContent=").append(eleganceContent);
sb.append(", eleganceTitle=").append(eleganceTitle);
sb.append(", contacts=").append(contacts);
sb.append(", audit=").append(audit);
sb.append(", checkInRange=").append(checkInRange);
sb.append(", latitude=").append(latitude);
sb.append(", longitude=").append(longitude);
sb.append(", availableNum=").append(availableNum);
sb.append(", expertStr=").append(expertStr);
sb.append(", eleganceTime=").append(eleganceTime);
sb.append(", activityLevel=").append(activityLevel);
sb.append(", activityType=").append(activityType);
sb.append(", coverUrl=").append(coverUrl);
sb.append(", coverRegion=").append(coverRegion);
sb.append(", putState=").append(putState);
sb.append(", randomId=").append(randomId);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
package com.tykj.sjc.service;
import com.tykj.sjc.qkh_entity.SjcActivity;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @author tykj
* @description 针对表【sjc_activity】的数据库操作Service
* @createDate 2023-11-17 17:27:48
*/
public interface SjcActivityService extends IService<SjcActivity> {
void saveActivity();
}
package com.tykj.sjc.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.tykj.sjc.mapper.SjcAcademicianMapper;
import com.tykj.sjc.qkh_entity.SjcAcademician;
import com.tykj.sjc.qkh_entity.SjcActivity;
import com.tykj.sjc.service.SjcActivityService;
import com.tykj.sjc.mapper.SjcActivityMapper;
import com.tykj.sjc.util.BillDTO;
import com.tykj.sjc.util.BillRemote;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
/**
* @author tykj
* @description 针对表【sjc_activity】的数据库操作Service实现
* @createDate 2023-11-17 17:27:48
*/
@Service
@Slf4j
public class SjcActivityServiceImpl extends ServiceImpl<SjcActivityMapper, SjcActivity>
implements SjcActivityService{
@Resource
private SjcActivityMapper sjcActivityMapper;
@Resource
private BillRemote billRemote;
@Override
@Transactional
public void saveActivity() {
List<SjcActivity> sjcActivityList = sjcActivityMapper.selectList(null);
List<SjcActivity> rs=new ArrayList<>();
for (SjcActivity sjcActivity : sjcActivityList) {
BillDTO build = BillDTO.builder()
.s1(sjcActivity.getContacts())
.build();
String randomId = billRemote.sendSaveBill(build);
sjcActivity.setRandomId(randomId);
rs.add(sjcActivity);
}
updateBatchById(rs);
log.info("院士信息存储了{}条数据",rs.size());
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论