区块链日志
This commit is contained in:
@ -0,0 +1,58 @@
|
||||
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 io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
|
||||
@RestController
|
||||
@Api(tags = "供应链+区块链接口调用日志")
|
||||
@RequestMapping("/api/supplyblockchainlog")
|
||||
public class SupplyBlockChainLogController{
|
||||
|
||||
@Resource
|
||||
private ISupplyBlockChainLogService isupplyBlockChainLogService;
|
||||
|
||||
/**
|
||||
* 插入新数据
|
||||
*
|
||||
* @param supplyBlockChainLog
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("插入新数据")
|
||||
@PostMapping("")
|
||||
public BaseResponse<Boolean> insert(@ApiParam(value = "对象数据", required = true) @RequestBody @Valid SupplyBlockChainLog supplyBlockChainLog){
|
||||
supplyBlockChainLog.setId(PropertyUtils.getSnowflakeId());
|
||||
boolean save = isupplyBlockChainLogService.save(supplyBlockChainLog);
|
||||
return BaseResponse.success(save);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询数据
|
||||
*
|
||||
* @param id
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("查询数据")
|
||||
@GetMapping("/{id}")
|
||||
public BaseResponse<SupplyBlockChainLog> get(@ApiParam(value = "主键id", required = true) @PathVariable String id){
|
||||
|
||||
SupplyBlockChainLog supplyBlockChainLog = isupplyBlockChainLogService.getById(id);
|
||||
|
||||
return BaseResponse.success(supplyBlockChainLog);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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.SupplyBlockChainLog;
|
||||
|
||||
/**
|
||||
* @auto.generated
|
||||
*/
|
||||
public interface SupplyBlockChainLogMapper extends BaseMapper<SupplyBlockChainLog> {
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
<?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">
|
||||
<resultMap id="BaseResultMap"
|
||||
type="com.chinaunicom.mall.ebtp.extend.blockchain.entity.SupplyBlockChainLog">
|
||||
<result column="id" jdbcType="BIGINT" property="id"/>
|
||||
<result column="tp_id" jdbcType="VARCHAR" property="tpId"/>
|
||||
<result column="section_id" jdbcType="VARCHAR" property="sectionId"/>
|
||||
<result column="assess_room_id" jdbcType="VARCHAR" property="assessRoomId"/>
|
||||
<result column="turn_id" jdbcType="VARCHAR" property="turnId"/>
|
||||
<result column="param" jdbcType="VARCHAR" property="param"/>
|
||||
<result column="result" jdbcType="VARCHAR" property="result"/>
|
||||
<result column="status" jdbcType="VARCHAR" property="status"/>
|
||||
<result column="create_date" jdbcType="TIMESTAMP" property="createDate"/>
|
||||
</resultMap>
|
||||
|
||||
<!--逻辑删除方法 此方法为代码生成器生成 不允许修改 如有特殊需求 请自行新建SQL语句-->
|
||||
<update id="deleteOff" parameterType="java.lang.Long">
|
||||
update supply_block_chain_log
|
||||
set
|
||||
delete_flag="deleted"
|
||||
where ID=#{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,76 @@
|
||||
package com.chinaunicom.mall.ebtp.extend.blockchain.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 实体类 SupplyBlockChainLog
|
||||
*
|
||||
* @auto.generated
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@ApiModel
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName(value = "supply_block_chain_log", autoResultMap = true)
|
||||
public class SupplyBlockChainLog implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty(value = "")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty(value = "")
|
||||
private String tpId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty(value = "")
|
||||
private String sectionId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty(value = "")
|
||||
private String assessRoomId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty(value = "")
|
||||
private String turnId;
|
||||
|
||||
/**
|
||||
* 传参
|
||||
*/
|
||||
@ApiModelProperty(value = "传参")
|
||||
private String param;
|
||||
|
||||
/**
|
||||
* 返回的结果或异常
|
||||
*/
|
||||
@ApiModelProperty(value = "返回的结果或异常")
|
||||
private String result;
|
||||
|
||||
/**
|
||||
* 0-成功 1-失败
|
||||
*/
|
||||
@ApiModelProperty(value = "0-成功 1-失败")
|
||||
private String status;
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.chinaunicom.mall.ebtp.extend.blockchain.service;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.chinaunicom.mall.ebtp.extend.blockchain.entity.SupplyBlockChainLog;
|
||||
|
||||
/**
|
||||
* 对数据表 supply_block_chain_log 操作的 service
|
||||
* @author Auto create
|
||||
*
|
||||
*/
|
||||
public interface ISupplyBlockChainLogService extends IService<SupplyBlockChainLog> {
|
||||
|
||||
|
||||
|
||||
}
|
@ -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.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