提交 cd3358fa authored 作者: 133's avatar 133

[用户] [清退] [专管员统计] 代码提交

上级 c3a13f17
package com.tykj.dev.blockcha.controller;
import com.google.common.collect.ImmutableMap;
import com.tykj.dev.blockcha.subject.service.BlockChainUtil;
import com.tykj.dev.blockcha.subject.service.impl.HexUtil;
import com.tykj.dev.config.GlobalMap;
import com.tykj.dev.config.swagger.AutoDocument;
import com.tykj.dev.misc.base.ResultObj;
import com.tykj.dev.misc.base.StatusEnum;
import com.tykj.dev.misc.utils.JacksonUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.http.ResponseEntity;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.function.Function;
import static com.tykj.dev.misc.base.BusinessEnum.CONFIRM_CHECK_DETAIL;
import static com.tykj.dev.misc.base.BusinessEnum.CONFIRM_CHECK_STAT;
import static com.tykj.dev.misc.base.StatusEnum.*;
import static java.util.stream.Collectors.*;
/**
* @author dengdiyi
......@@ -59,35 +40,30 @@ public class BlockchaController {
@ApiOperation(value = "添加")
@GetMapping(value = "/sendHash/{index}/{code}/{content}")
public ResponseEntity sendHash(@PathVariable Integer index,@PathVariable Integer code,@PathVariable String content){
// content= HexUtil.string2HexUTF8(content);
return ResponseEntity.ok(blockChainUtil.sendHash(index,code,""));
}
@ApiOperation(value = "hash追加")
@GetMapping(value = "/sendHash3/{index}/{id}/{content}")
public ResponseEntity sendHash23(@PathVariable Integer index,@PathVariable String id,@PathVariable String content){
// content= HexUtil.string2HexUTF8(content);
return ResponseEntity.ok(blockChainUtil.appendHash(index,content,id));
}
@ApiOperation(value = "文本添加")
@GetMapping(value = "/sendHash1/{index}/{code}/{content}")
public ResponseEntity sendHash1(@PathVariable Integer index,@PathVariable Integer code,@PathVariable String content){
// content= HexUtil.string2HexUTF8(content);
return ResponseEntity.ok(blockChainUtil.sendText(index,code,"{21312987398798127398791jjjasjdh000asdsadasdsadasdd21312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd287398127938712987398217938719287398127983791287398712987398127938712987398127983798126398126398621983681276387126783621876387126873621876387216387162873687126387216873612786387126873612873678126378216836213//asdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd287398127938712987398217938719287398127983791287398712987398127938712987398127983798126398126398621983681276387126783621876387126873621876387216387162873687126387216873612786387126873612873678126378216836213"+content+"21312987398798127398791jjjasjdh000asdsadasdsadasdd21312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasdd21312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasdd21312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasdd21312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasdd21312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasdd21312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd28739812793871298739821793871928739812798379128739871298739812793871298739812798379812639812639862198368127638712678362187638712687362187638721638716287368712638721687361278638712687361287367812637821683621321312987398798127398791jjjasjdh000asdsadasdsadasddasdsadsadasdasdasjhdjsgahjdghsaghdgashgdjhasgjdhgasjhdgajshd287398127938712987398217938719287398127983791287398712987398127938712987398127983798126398126398621983681276387126783621876387126873621876387216387162873687126387216873612786387126873612873678126378216836213"));
}
@ApiOperation(value = "文本最佳添加")
@GetMapping(value = "/sendHash2/{index}/{id}/{content}")
public ResponseEntity sendHash2(@PathVariable Integer index,@PathVariable String id,@PathVariable String content){
// content= HexUtil.string2HexUTF8(content);
return ResponseEntity.ok(blockChainUtil.appendText(index,content,id));
}
@ApiOperation(value = "key and id")
@GetMapping(value = "/sendHash5/{key}/{id}")
public ResponseEntity sendHash5(@PathVariable String key,@PathVariable String id){
// content= HexUtil.string2HexUTF8(content);
return ResponseEntity.ok(blockChainUtil.verifyText1(id,key));
}
......
......@@ -27,17 +27,17 @@ import java.util.UUID;
@Component
public class BlockChainUtilImpl implements BlockChainUtil {
private String SECRET_KEY = "3mdeM1dw2FfHrd5h6WAuhB3WYdDG6ZAgz96CcM1nzxbiYA8QaaZHW75Je9xKixTTD2rwujyb1gVUNPYm5W6FPZQ8";
private String SECRET_ID = "3yXRRiL9xsLfbt2kv7qRH2so6ChJX3rFkay7Njcsxfbp";
// private String SECRET_KEY = "3mdeM1dw2FfHrd5h6WAuhB3WYdDG6ZAgz96CcM1nzxbiYA8QaaZHW75Je9xKixTTD2rwujyb1gVUNPYm5W6FPZQ8";
// private String SECRET_ID = "3yXRRiL9xsLfbt2kv7qRH2so6ChJX3rFkay7Njcsxfbp";
//测试环境
// public String SECRET_KEY;
// public String SECRET_ID;
//测试环境
// public String SECRET_KEY = "3RJWStDCXN7mqJyZAB8rF59f87arGShdk9aKyDN3wKbzq9JnaXom1Hpe6mHT1k2yx9zfE7VFWidqwuxyT7DtPjCs";
// public String SECRET_ID = "JAjQyTZdR8bmbHaU6iiFGvrCuUik4cG4U4ostk8KKrbS";
public String SECRET_KEY = "3RJWStDCXN7mqJyZAB8rF59f87arGShdk9aKyDN3wKbzq9JnaXom1Hpe6mHT1k2yx9zfE7VFWidqwuxyT7DtPjCs";
public String SECRET_ID = "JAjQyTZdR8bmbHaU6iiFGvrCuUik4cG4U4ostk8KKrbS";
private final static String BLOCK_CHAIN_URL = "http://10.153.4.12:8076";
private final static String BLOCK_CHAIN_URL = "http://192.168.0.80:8076";
private final static String BLOCK_CHAIN_URL2 = "http://10.153.8.10:8076";
private final static String BLOCK_CHAIN_URL3 = "http://10.153.8.11:8076";
private final static String BLOCK_CHAIN_URL4 = "http://10.153.110.10:8076";
......@@ -341,6 +341,7 @@ public class BlockChainUtilImpl implements BlockChainUtil {
request.put("recordID", recordId);
String s = ApiSignatureUtil.getApiSignature(request, SECRET_KEY);
request.put("apiSignature", s);
return new RestTemplate().postForObject(
BLOCK_CHAIN_URL + BcUrl.APPEND_HASH,
request,
......
......@@ -1674,26 +1674,20 @@ public class SendBackServiceImpl implements SendBackService {
private SendBackBill saveSendBackBill(SendBackBill sendBackBill){
SendBackBill sendBackBill1 = sendBackBillEntityDao.save(sendBackBill);
if (sendBackBill1.getRecordId()==null || sendBackBill1.getRecordId().equals("")){
BcHash bcHash=blockChainUtil.sendHash(1000,JacksonUtil.toJSon(sendBackBill1));
sendBackBill1.setRecordId(bcHash.getData().getRecordID());
return sendBackBillEntityDao.save(sendBackBill1);
}else {
blockChainUtil.appendHash(JacksonUtil.toJSon(sendBackBill1),sendBackBill1.getRecordId());
sendBackBillEntityDao.save(sendBackBill1);
return sendBackBill1;
}
}
private SendBackBillDetail saveSendBackBillDetail(SendBackBillDetail sendBackBillDetail){
SendBackBillDetail sendBackBillDetail1 = sendBackBillDetailEntityDao.save(sendBackBillDetail);
if (sendBackBillDetail1.getRecordId()==null || sendBackBillDetail1.getRecordId().equals("")){
BcHash bcHash=blockChainUtil.sendHash(1000,JacksonUtil.toJSon(sendBackBillDetail1));
sendBackBillDetail1.setRecordId(bcHash.getData().getRecordID());
return sendBackBillDetailEntityDao.save(sendBackBillDetail1);
}else {
blockChainUtil.appendHash(JacksonUtil.toJSon(sendBackBillDetail1),sendBackBillDetail1.getRecordId());
sendBackBillDetailEntityDao.save(sendBackBillDetail1);
return sendBackBillDetail1;
}
}
}
......@@ -457,14 +457,10 @@ public class TrainJobController {
private TrainUser saveTrainUser(TrainUser trainUser){
TrainUser trainUser1 = trainUserDao.save(trainUser);
if (trainUser1.getRecordId()==null || trainUser1.getRecordId().equals("")){
BcHash bcHash=blockChainUtil.sendHash(1000,JacksonUtil.toJSon(trainUser1));
trainUser1.setRecordId(bcHash.getData().getRecordID());
return trainUserDao.save(trainUser1);
}else {
blockChainUtil.appendHash(JacksonUtil.toJSon(trainUser1),trainUser1.getRecordId());
trainUserDao.save(trainUser1);
return trainUser1;
}
}
}
......@@ -66,14 +66,11 @@ public class TrainThemeServiceImpl implements TrainThemeService {
@Override
public TrainTheme save(TrainTheme trainTheme) {
TrainTheme trainTheme1 = trainThemeDao.save(trainTheme);
if (trainTheme1.getRecordId()==null || trainTheme1.getRecordId().equals("")){
BcHash bcHash=blockChainUtil.sendHash(1000,JacksonUtil.toJSon(trainTheme1));
trainTheme1.setRecordId(bcHash.getData().getRecordID());
return trainThemeDao.save(trainTheme1);
}else {
blockChainUtil.appendHash(JacksonUtil.toJSon(trainTheme1),trainTheme1.getRecordId());
trainThemeDao.save(trainTheme1);
return trainTheme1;
}
}
@Override
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论