publish 0.8.8
This commit is contained in:
@@ -18,6 +18,7 @@ import com.tiesheng.message.pojos.MessageReqResp;
|
||||
import com.tiesheng.message.service.TieshengMessageConfigurer;
|
||||
import com.tiesheng.util.ServletKit;
|
||||
import com.tiesheng.util.config.Ip2regionConfig;
|
||||
import com.tiesheng.util.exception.ApiException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -51,40 +52,36 @@ public class CoreLogService extends TsServiceBase<CoreLogOperationMapper, CoreLo
|
||||
public CoreLogProcessMapper getCoreLogProcessMapper() {
|
||||
return coreLogProcessMapper;
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// 操作日志
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/**
|
||||
* 添加空的过程 返回id 用于更新
|
||||
*
|
||||
* @param title 标题
|
||||
* @param type 类型 import-导入,sync-同步
|
||||
* @param total 总数
|
||||
*/
|
||||
public String addProcess() {
|
||||
public CoreLogProcess addProcess(String title, String type, Integer total) {
|
||||
CoreLogProcess coreLogProcess = new CoreLogProcess();
|
||||
coreLogProcess.setTitle(title);
|
||||
coreLogProcess.setTotal(total);
|
||||
coreLogProcess.setType(type);
|
||||
coreLogProcessMapper.insert(coreLogProcess);
|
||||
return coreLogProcess.getId();
|
||||
return coreLogProcess;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新过程
|
||||
*
|
||||
* @param id 过程id
|
||||
* @param title 过程标题/说明
|
||||
* @param total 总数
|
||||
* @param successNum 成功数
|
||||
* @param failNum 失败数
|
||||
* @param type 类型(import-导出,sync-同步)
|
||||
* @param status 状态(0-未完成,1-完成)
|
||||
* @param coreLogProcess 过程对象
|
||||
*/
|
||||
public void upProcess(String id, String title, Integer total, Integer successNum, Integer failNum, String type, Integer status) {
|
||||
CoreLogProcess coreLogProcess = new CoreLogProcess();
|
||||
coreLogProcess.setId(id);
|
||||
coreLogProcess.setTitle(title);
|
||||
coreLogProcess.setTotal(total);
|
||||
coreLogProcess.setSuccessNum(successNum);
|
||||
coreLogProcess.setFailNum(failNum);
|
||||
coreLogProcess.setType(type);
|
||||
coreLogProcess.setStatus(status);
|
||||
public void upProcess(CoreLogProcess coreLogProcess) {
|
||||
if (coreLogProcess == null || coreLogProcess.getId().isEmpty()) {
|
||||
throw new ApiException("更新过程id不能为空");
|
||||
}
|
||||
coreLogProcessMapper.updateById(coreLogProcess);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user