大屏项目初始化
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
package com.mini.mybigscreen.biz.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.mini.mybigscreen.Model.Result;
|
||||
import com.mini.mybigscreen.biz.domain.IndexInfo;
|
||||
import com.mini.mybigscreen.biz.service.IndexInfoService;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 首页指标数据表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author gaoxq
|
||||
* @since 2026-03-02
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/biz/indexInfo")
|
||||
public class IndexInfoController {
|
||||
|
||||
|
||||
@Resource
|
||||
private IndexInfoService infoService;
|
||||
|
||||
|
||||
@GetMapping("list")
|
||||
public Result<?> getList(String indexCode) {
|
||||
QueryWrapper<IndexInfo> query = new QueryWrapper<>();
|
||||
query.eq(StrUtil.isNotBlank(indexCode), "index_code", indexCode)
|
||||
.orderByAsc("sort");
|
||||
return Result.success(infoService.list(query));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.mini.mybigscreen.Model.Result;
|
||||
import com.mini.mybigscreen.biz.domain.ItemInfo;
|
||||
import com.mini.mybigscreen.biz.service.ItemInfoService;
|
||||
import com.mini.mybigscreen.utils.DateUtil;
|
||||
import com.mini.mybigscreen.utils.DateUtils;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -35,7 +35,7 @@ public class ItemInfoController {
|
||||
QueryWrapper<ItemInfo> query = new QueryWrapper<>();
|
||||
query.eq("item_code", itemCode)
|
||||
.eq(StrUtil.isNotBlank(reqParam), "req_param", reqParam)
|
||||
.eq("ym", DateUtil.dsValue())
|
||||
.eq("ym", DateUtils.dsValue())
|
||||
;
|
||||
return Result.success(infoService.list(query));
|
||||
}
|
||||
|
||||
87
src/main/java/com/mini/mybigscreen/biz/domain/IndexInfo.java
Normal file
87
src/main/java/com/mini/mybigscreen/biz/domain/IndexInfo.java
Normal file
@@ -0,0 +1,87 @@
|
||||
package com.mini.mybigscreen.biz.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 首页指标数据表
|
||||
* </p>
|
||||
*
|
||||
* @author gaoxq
|
||||
* @since 2026-03-02
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("biz_index_info")
|
||||
public class IndexInfo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 模块名称
|
||||
*/
|
||||
@TableField("module")
|
||||
private String module;
|
||||
|
||||
/**
|
||||
* 模块编码
|
||||
*/
|
||||
@TableField("module_code")
|
||||
private String moduleCode;
|
||||
|
||||
/**
|
||||
* 说明描述
|
||||
*/
|
||||
@TableField("title")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 数值
|
||||
*/
|
||||
@TableField("value")
|
||||
private BigDecimal value;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@TableField("label")
|
||||
private String label;
|
||||
|
||||
/**
|
||||
* 图片路径
|
||||
*/
|
||||
@TableField("icon_img")
|
||||
private String iconImg;
|
||||
|
||||
/**
|
||||
* 图标颜色
|
||||
*/
|
||||
@TableField("icon_filter")
|
||||
private String iconFilter;
|
||||
|
||||
/**
|
||||
* 序号
|
||||
*/
|
||||
@TableField("sort")
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 指标编号
|
||||
*/
|
||||
@TableField("index_code")
|
||||
private String indexCode;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mini.mybigscreen.biz.mapper;
|
||||
|
||||
import com.mini.mybigscreen.biz.domain.IndexInfo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 首页指标数据表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author gaoxq
|
||||
* @since 2026-03-02
|
||||
*/
|
||||
public interface IndexInfoMapper extends BaseMapper<IndexInfo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mini.mybigscreen.biz.service;
|
||||
|
||||
import com.mini.mybigscreen.biz.domain.IndexInfo;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 首页指标数据表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author gaoxq
|
||||
* @since 2026-03-02
|
||||
*/
|
||||
public interface IndexInfoService extends IService<IndexInfo> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.mini.mybigscreen.biz.service.impl;
|
||||
|
||||
import com.mini.mybigscreen.biz.domain.IndexInfo;
|
||||
import com.mini.mybigscreen.biz.mapper.IndexInfoMapper;
|
||||
import com.mini.mybigscreen.biz.service.IndexInfoService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 首页指标数据表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author gaoxq
|
||||
* @since 2026-03-02
|
||||
*/
|
||||
@Service
|
||||
public class IndexInfoServiceImpl extends ServiceImpl<IndexInfoMapper, IndexInfo> implements IndexInfoService {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user