|
@@ -17,6 +17,7 @@ import com.fuzamei.mapperInterface.ReceivingClerkMapper;
|
|
|
import com.fuzamei.mapperInterface.UserMapper;
|
|
|
import com.fuzamei.service.PlannerService;
|
|
|
import com.fuzamei.util.blockchain.BlockChainUtil;
|
|
|
+import com.fuzamei.util.blockchain.ProtobufBean;
|
|
|
@Service
|
|
|
public class PlannerServiceImpl implements PlannerService{
|
|
|
@Autowired
|
|
@@ -69,10 +70,12 @@ public class PlannerServiceImpl implements PlannerService{
|
|
|
pp.setOperationTime(currentTime);//操作时间
|
|
|
pp.setHash(hash);//操作hash
|
|
|
userMapper.insertOperationHistory(pp);//插入到操作记录表去
|
|
|
-
|
|
|
- boolean flag = blockChainUtil.sendBlockChain(pp.getSign());//发送签名直接转发到区块链
|
|
|
+ ProtobufBean protobufBean = blockChainUtil.getProtobufBean(pp.getSign());
|
|
|
+ String result = blockChainUtil.sendPostParam(protobufBean);
|
|
|
+ boolean flag = blockChainUtil.vilaResult(result);
|
|
|
+// boolean flag = blockChainUtil.sendBlockChain(pp.getSign());//发送签名直接转发到区块链
|
|
|
if(!flag) {
|
|
|
- throw new RuntimeException("区块链操作失败");
|
|
|
+ throw new RuntimeException("区块链操作失败:"+result);
|
|
|
}
|
|
|
|
|
|
}
|