Commit 0a1f07ae authored by wanmin@bu2.cn's avatar wanmin@bu2.cn

区块链配置实体

parent 2ca285d8
/**
* Copyright (c) 2021 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
package com.roo.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 区块链配置
*
* @author momin 460363410@qq.com
* @since 1.0 2021-07-02
*/
@Data
@ApiModel(value = "区块链配置")
public class BlockChainDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "ID主键")
private Long id;
@ApiModelProperty(value = "主链标识")
private String code;
@ApiModelProperty(value = "名称")
private String name;
@ApiModelProperty(value = "英文名全称")
private String nameEn;
@ApiModelProperty(value = "图标")
private String icon;
@ApiModelProperty(value = "排序,最小靠前")
private Integer sort;
@ApiModelProperty(value = "是否启用")
private Boolean isEnabled;
@ApiModelProperty(value = "创建时间")
private Date createDate;
@ApiModelProperty(value = "更新时间")
private Date updateDate;
}
\ No newline at end of file
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2021 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2019 人人开源 All rights reserved.
* Copyright (c) 2019 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2021 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2019 人人开源 All rights reserved.
* Copyright (c) 2019 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2020 人人开源 All rights reserved.
* Copyright (c) 2020 All rights reserved.
* <p>
*
* <p>
......
/**
* Copyright (c) 2019 人人开源 All rights reserved.
* Copyright (c) 2019 All rights reserved.
* <p>
*
* <p>
......
/**
* Copyright (c) 2019 人人开源 All rights reserved.
* Copyright (c) 2019 All rights reserved.
* <p>
*
* <p>
......
/**
* Copyright (c) 2019 人人开源 All rights reserved.
* Copyright (c) 2019 All rights reserved.
* <p>
*
* <p>
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2016-2020 人人开源 All rights reserved.
* Copyright (c) 2016-2020 All rights reserved.
* <p>
*
* <p>
......
/**
* Copyright (c) 2016-2020 人人开源 All rights reserved.
* Copyright (c) 2016-2020 All rights reserved.
* <p>
*
* <p>
......
/**
* Copyright (c) 2016-2020 人人开源 All rights reserved.
* Copyright (c) 2016-2020 All rights reserved.
* <p>
*
* <p>
......
/**
* Copyright (c) 2019 人人开源 All rights reserved.
* Copyright (c) 2019 All rights reserved.
* <p>
*
* <p>
......
/**
* Copyright (c) 2019 人人开源 All rights reserved.
* Copyright (c) 2019 All rights reserved.
* <p>
*
* <p>
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2016-2020 人人开源 All rights reserved.
* Copyright (c) 2016-2020 All rights reserved.
* <p>
*
* <p>
......
/**
* Copyright (c) 2016-2020 人人开源 All rights reserved.
* Copyright (c) 2016-2020 All rights reserved.
* <p>
*
* <p>
......
/**
* Copyright (c) 2016-2020 人人开源 All rights reserved.
* Copyright (c) 2016-2020 All rights reserved.
* <p>
*
* <p>
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
* <p>
*
* <p>
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2021 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2020 人人开源 All rights reserved.
* Copyright (c) 2020 All rights reserved.
* <p>
*
* <p>
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2021 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2021 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
* <p>
*
* <p>
......
/**
* Copyright (c) 2021 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
package com.roo.controller;
import com.roo.commons.log.annotation.LogOperation;
import com.roo.commons.tools.constant.Constant;
import com.roo.commons.tools.page.PageData;
import com.roo.commons.tools.utils.Result;
import com.roo.commons.tools.utils.ExcelUtils;
import com.roo.commons.tools.validator.AssertUtils;
import com.roo.commons.tools.validator.ValidatorUtils;
import com.roo.commons.tools.validator.group.AddGroup;
import com.roo.commons.tools.validator.group.DefaultGroup;
import com.roo.commons.tools.validator.group.UpdateGroup;
import com.roo.dto.BlockChainDTO;
import com.roo.excel.BlockChainExcel;
import com.roo.service.BlockChainService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 区块链配置
*
* @author momin 460363410@qq.com
* @since 1.0 2021-07-02
*/
@RestController
@RequestMapping("blockchain")
@Api(tags="区块链配置")
public class BlockChainController {
@Autowired
private BlockChainService blockChainService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
@PreAuthorize("hasAuthority('roowallet:blockchain:page')")
public Result<PageData<BlockChainDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<BlockChainDTO> page = blockChainService.page(params);
return new Result<PageData<BlockChainDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
@PreAuthorize("hasAuthority('roowallet:blockchain:info')")
public Result<BlockChainDTO> get(@PathVariable("id") Long id){
BlockChainDTO data = blockChainService.get(id);
return new Result<BlockChainDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
@LogOperation("保存")
@PreAuthorize("hasAuthority('roowallet:blockchain:save')")
public Result save(@RequestBody BlockChainDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
blockChainService.save(dto);
return new Result();
}
@PutMapping
@ApiOperation("修改")
@LogOperation("修改")
@PreAuthorize("hasAuthority('roowallet:blockchain:update')")
public Result update(@RequestBody BlockChainDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
blockChainService.update(dto);
return new Result();
}
@DeleteMapping
@ApiOperation("删除")
@LogOperation("删除")
@PreAuthorize("hasAuthority('roowallet:blockchain:delete')")
public Result delete(@RequestBody Long[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
blockChainService.delete(ids);
return new Result();
}
@GetMapping("export")
@ApiOperation("导出")
@LogOperation("导出")
@PreAuthorize("hasAuthority('roowallet:blockchain:export')")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<BlockChainDTO> list = blockChainService.list(params);
ExcelUtils.exportExcelToTarget(response, null, "区块链配置", list, BlockChainExcel.class);
}
}
\ No newline at end of file
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2021 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2019 人人开源 All rights reserved.
* Copyright (c) 2019 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2021 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2019 人人开源 All rights reserved.
* Copyright (c) 2019 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2021 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
package com.roo.dao;
import com.roo.commons.mybatis.dao.BaseDao;
import com.roo.entity.BlockChainEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 区块链配置
*
* @author momin 460363410@qq.com
* @since 1.0 2021-07-02
*/
@Mapper
public interface BlockChainDao extends BaseDao<BlockChainEntity> {
}
\ No newline at end of file
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2021 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2019 人人开源 All rights reserved.
* Copyright (c) 2019 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2019 人人开源 All rights reserved.
* Copyright (c) 2019 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2021 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2019 人人开源 All rights reserved.
* Copyright (c) 2019 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2021 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2020 人人开源 All rights reserved.
* Copyright (c) 2020 All rights reserved.
* <p>
*
* <p>
......
/**
* Copyright (c) 2021 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
package com.roo.entity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.baomidou.mybatisplus.annotation.*;
import java.util.Date;
/**
* 区块链配置
*
* @author momin 460363410@qq.com
* @since 1.0 2021-07-02
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("t_block_chain")
public class BlockChainEntity {
private static final long serialVersionUID = 1L;
/**
* ID主键
*/
@TableId
private Long id;
/**
* 主链标识
*/
private String code;
/**
* 名称
*/
private String name;
/**
* 英文名全称
*/
private String nameEn;
/**
* 图标
*/
private String icon;
/**
* 排序,最小靠前
*/
private Integer sort;
/**
* 是否启用
*/
private Boolean isEnabled;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
private Date createDate;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateDate;
}
\ No newline at end of file
/**
* Copyright (c) 2019 人人开源 All rights reserved.
* Copyright (c) 2019 All rights reserved.
* <p>
*
* <p>
......
/**
* Copyright (c) 2019 人人开源 All rights reserved.
* Copyright (c) 2019 All rights reserved.
* <p>
*
* <p>
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2021 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
/**
* Copyright (c) 2018 人人开源 All rights reserved.
* Copyright (c) 2021 All rights reserved.
*
*
*
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment