| | |
| | | package cn.gistack.sm.log.service.impl; |
| | | |
| | | import cn.gistack.pwd.dto.CBCResultDTO; |
| | | import cn.gistack.pwd.fegin.IPwdClient; |
| | | import cn.gistack.sm.log.entity.SmLogManage; |
| | | import cn.gistack.sm.log.mapper.SmLogManageMapper; |
| | | import cn.gistack.sm.log.service.ISmLogManageService; |
| | |
| | | import cn.gistack.sm.log.vo.AppStatisticsVO; |
| | | import cn.gistack.sm.log.vo.SmLogManageVO; |
| | | import cn.gistack.system.user.feign.IUserClient; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.mp.base.BaseServiceImpl; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | |
| | | @AllArgsConstructor |
| | | public class ISmLogManageServiceImpl extends BaseServiceImpl<SmLogManageMapper, SmLogManage> implements ISmLogManageService { |
| | | private IUserClient userClient; |
| | | private IPwdClient pwdClient; |
| | | |
| | | @Override |
| | | public AppStatisticsVO getAppStatistics(AppStatisticsVO appStatisticsVO) { |
| | |
| | | public IPage<SmLogManageVO> selectPage(IPage<SmLogManageVO> page, SmLogManageVO smLogManage) { |
| | | return page.setRecords(baseMapper.selectMyPage(page,smLogManage)); |
| | | } |
| | | |
| | | @Override |
| | | public boolean save(SmLogManage entity) { |
| | | |
| | | String message = JSONObject.toJSONString(entity); |
| | | R<CBCResultDTO> cbcResultDTOR = pwdClient.getCBCMacEncipher(message); |
| | | |
| | | //保存加密字段 |
| | | String maced = cbcResultDTOR.getData().getMaced(); |
| | | String keyIndex = cbcResultDTOR.getData().getKeyIndex(); |
| | | String sm4iv = cbcResultDTOR.getData().getSm4IV(); |
| | | entity.setMaced(maced); |
| | | entity.setKeyindexs(keyIndex); |
| | | entity.setSm4iv(sm4iv); |
| | | |
| | | return super.save(entity); |
| | | } |
| | | } |