区块链日志
This commit is contained in:
@ -3,8 +3,8 @@ package com.chinaunicom.mall.ebtp.extend.blockchain.controller;
|
||||
|
||||
import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse;
|
||||
import com.chinaunicom.mall.ebtp.common.util.PropertyUtils;
|
||||
import com.chinaunicom.mall.ebtp.extend.blockchain.entity.SupplyBlockChainLog;
|
||||
import com.chinaunicom.mall.ebtp.extend.blockchain.service.ISupplyBlockChainLogService;
|
||||
import com.chinaunicom.mall.ebtp.extend.blockchain.entity.BlockChainLog;
|
||||
import com.chinaunicom.mall.ebtp.extend.blockchain.service.IBlockChainLogService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
@ -15,24 +15,24 @@ import javax.validation.Valid;
|
||||
|
||||
@RestController
|
||||
@Api(tags = "供应链+区块链接口调用日志")
|
||||
@RequestMapping("/v1/supplyblockchainlog")
|
||||
public class SupplyBlockChainLogController{
|
||||
@RequestMapping("/v1/blockchainlog")
|
||||
public class BlockChainLogController {
|
||||
|
||||
@Resource
|
||||
private ISupplyBlockChainLogService isupplyBlockChainLogService;
|
||||
private IBlockChainLogService iBlockChainLogService;
|
||||
|
||||
/**
|
||||
* 插入新数据
|
||||
*
|
||||
* @param supplyBlockChainLog
|
||||
* @param blockChainLog
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("插入新数据")
|
||||
@PostMapping("")
|
||||
public BaseResponse<Boolean> insert(@ApiParam(value = "对象数据", required = true) @RequestBody @Valid SupplyBlockChainLog supplyBlockChainLog){
|
||||
supplyBlockChainLog.setId(PropertyUtils.getSnowflakeId());
|
||||
boolean save = isupplyBlockChainLogService.save(supplyBlockChainLog);
|
||||
public BaseResponse<Boolean> insert(@ApiParam(value = "对象数据", required = true) @RequestBody @Valid BlockChainLog blockChainLog){
|
||||
blockChainLog.setId(PropertyUtils.getSnowflakeId());
|
||||
boolean save = iBlockChainLogService.save(blockChainLog);
|
||||
return BaseResponse.success(save);
|
||||
}
|
||||
|
||||
@ -47,11 +47,11 @@ public class SupplyBlockChainLogController{
|
||||
*/
|
||||
@ApiOperation("查询数据")
|
||||
@GetMapping("/{id}")
|
||||
public BaseResponse<SupplyBlockChainLog> get(@ApiParam(value = "主键id", required = true) @PathVariable String id){
|
||||
public BaseResponse<BlockChainLog> get(@ApiParam(value = "主键id", required = true) @PathVariable String id){
|
||||
|
||||
SupplyBlockChainLog supplyBlockChainLog = isupplyBlockChainLogService.getById(id);
|
||||
BlockChainLog blockChainLog = iBlockChainLogService.getById(id);
|
||||
|
||||
return BaseResponse.success(supplyBlockChainLog);
|
||||
return BaseResponse.success(blockChainLog);
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,13 @@
|
||||
package com.chinaunicom.mall.ebtp.extend.blockchain.dao;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.chinaunicom.mall.ebtp.extend.blockchain.entity.BlockChainLog;
|
||||
|
||||
/**
|
||||
* @auto.generated
|
||||
*/
|
||||
public interface BlockChainLogMapper extends BaseMapper<BlockChainLog> {
|
||||
|
||||
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package com.chinaunicom.mall.ebtp.extend.blockchain.dao;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.chinaunicom.mall.ebtp.extend.blockchain.entity.SupplyBlockChainLog;
|
||||
|
||||
/**
|
||||
* @auto.generated
|
||||
*/
|
||||
public interface SupplyBlockChainLogMapper extends BaseMapper<SupplyBlockChainLog> {
|
||||
|
||||
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.chinaunicom.mall.ebtp.extend.blockchain.dao.SupplyBlockChainLogMapper">
|
||||
<mapper namespace="com.chinaunicom.mall.ebtp.extend.blockchain.dao.BlockChainLogMapper">
|
||||
<resultMap id="BaseResultMap"
|
||||
type="com.chinaunicom.mall.ebtp.extend.blockchain.entity.SupplyBlockChainLog">
|
||||
type="com.chinaunicom.mall.ebtp.extend.blockchain.entity.BlockChainLog">
|
||||
<result column="id" jdbcType="BIGINT" property="id"/>
|
||||
<result column="tp_id" jdbcType="VARCHAR" property="tpId"/>
|
||||
<result column="section_id" jdbcType="VARCHAR" property="sectionId"/>
|
@ -10,7 +10,7 @@ import lombok.experimental.Accessors;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 实体类 SupplyBlockChainLog
|
||||
* 实体类 BlockChainLog
|
||||
*
|
||||
* @auto.generated
|
||||
*/
|
||||
@ -18,8 +18,8 @@ import java.io.Serializable;
|
||||
@Accessors(chain = true)
|
||||
@ApiModel
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName(value = "supply_block_chain_log", autoResultMap = true)
|
||||
public class SupplyBlockChainLog implements Serializable {
|
||||
@TableName(value = "block_chain_log", autoResultMap = true)
|
||||
public class BlockChainLog implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
@ -2,14 +2,14 @@ package com.chinaunicom.mall.ebtp.extend.blockchain.service;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.chinaunicom.mall.ebtp.extend.blockchain.entity.SupplyBlockChainLog;
|
||||
import com.chinaunicom.mall.ebtp.extend.blockchain.entity.BlockChainLog;
|
||||
|
||||
/**
|
||||
* 对数据表 supply_block_chain_log 操作的 service
|
||||
* @author Auto create
|
||||
*
|
||||
*/
|
||||
public interface ISupplyBlockChainLogService extends IService<SupplyBlockChainLog> {
|
||||
public interface IBlockChainLogService extends IService<BlockChainLog> {
|
||||
|
||||
|
||||
|
@ -0,0 +1,17 @@
|
||||
package com.chinaunicom.mall.ebtp.extend.blockchain.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.chinaunicom.mall.ebtp.extend.blockchain.dao.BlockChainLogMapper;
|
||||
import com.chinaunicom.mall.ebtp.extend.blockchain.entity.BlockChainLog;
|
||||
import com.chinaunicom.mall.ebtp.extend.blockchain.service.IBlockChainLogService;
|
||||
import org.springframework.stereotype.Service;
|
||||
/**
|
||||
* 对数据表 supply_block_chain_log 操作的 serviceImpl
|
||||
* blockchain
|
||||
*
|
||||
*/
|
||||
@Service
|
||||
public class BlockChainLogServiceImpl extends ServiceImpl<BlockChainLogMapper, BlockChainLog> implements IBlockChainLogService {
|
||||
|
||||
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
package com.chinaunicom.mall.ebtp.extend.blockchain.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.chinaunicom.mall.ebtp.extend.blockchain.dao.SupplyBlockChainLogMapper;
|
||||
import com.chinaunicom.mall.ebtp.extend.blockchain.entity.SupplyBlockChainLog;
|
||||
import com.chinaunicom.mall.ebtp.extend.blockchain.service.ISupplyBlockChainLogService;
|
||||
import org.springframework.stereotype.Service;
|
||||
/**
|
||||
* 对数据表 supply_block_chain_log 操作的 serviceImpl
|
||||
* blockchain
|
||||
*
|
||||
*/
|
||||
@Service
|
||||
public class SupplyBlockChainLogServiceImpl extends ServiceImpl<SupplyBlockChainLogMapper, SupplyBlockChainLog> implements ISupplyBlockChainLogService {
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user