Commit 1a257a74 authored by 赵啸非's avatar 赵啸非

修改热门词汇

parent 59f206e0
Pipeline #2422 canceled with stages
package com.mortals.xhx.module.matter.service.impl;
import com.mortals.xhx.base.system.upload.service.UploadService;
import com.mortals.xhx.common.utils.WordUtil;
import com.mortals.xhx.module.matter.model.MatterDatumEntity;
import com.mortals.xhx.module.matter.service.MatterDatumService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
......@@ -20,10 +22,18 @@ import com.mortals.xhx.module.matter.service.MatterDatumPrintService;
@Service("matterDatumPrintService")
public class MatterDatumPrintServiceImpl extends AbstractCRUDServiceImpl<MatterDatumPrintDao, MatterDatumPrintEntity, Long> implements MatterDatumPrintService {
@Autowired
private UploadService uploadService;
@Value("${upload.path}")
private String filePath;
@Override
protected void saveBefore(MatterDatumPrintEntity entity, Context context) throws AppException {
// MatterDatumEntity matterDatumEntity = matterDatumService.get(entity.getMaterialId());
Integer pageByDoc = WordUtil.getPageByDoc(entity.getDocPath());
String rootPath = this.filePath.endsWith("/") ? this.filePath : this.filePath + "/";
Integer pageByDoc = WordUtil.getPageByDoc(rootPath+entity.getDocPath());
entity.setPage(pageByDoc);
super.saveBefore(entity, context);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment