.........
This commit is contained in:
@@ -1,120 +0,0 @@
|
||||
package top.iletter.modules.baitutools.controller;
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import top.iletter.common.annotation.LogOperation;
|
||||
import top.iletter.common.constant.Constant;
|
||||
import top.iletter.common.page.PageData;
|
||||
import top.iletter.common.utils.ExcelUtils;
|
||||
import top.iletter.common.utils.Result;
|
||||
import top.iletter.common.validator.AssertUtils;
|
||||
import top.iletter.common.validator.ValidatorUtils;
|
||||
import top.iletter.common.validator.group.AddGroup;
|
||||
import top.iletter.common.validator.group.DefaultGroup;
|
||||
import top.iletter.common.validator.group.UpdateGroup;
|
||||
import top.iletter.modules.baitutools.dto.DlRenewalRemindDTO;
|
||||
import top.iletter.modules.baitutools.excel.DlRenewalRemindExcel;
|
||||
import top.iletter.modules.baitutools.service.DlRenewalRemindService;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* 临期续费
|
||||
*
|
||||
* @author dellevin dellevin99@gmail.com
|
||||
* @since 1.0.0 2026-02-04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("baitutools/dlrenewalremind")
|
||||
@Tag(name="临期续费")
|
||||
public class DlRenewalRemindController {
|
||||
private static final Logger log = LoggerFactory.getLogger(DlRenewalRemindController.class);
|
||||
@Autowired
|
||||
private DlRenewalRemindService dlRenewalRemindService;
|
||||
|
||||
@GetMapping("page")
|
||||
@Operation(summary = "分页")
|
||||
@Parameters({
|
||||
@Parameter(name = Constant.PAGE, description = "当前页码,从1开始", in = ParameterIn.QUERY, required = true, ref="int") ,
|
||||
@Parameter(name = Constant.LIMIT, description = "每页显示记录数", in = ParameterIn.QUERY,required = true, ref="int") ,
|
||||
@Parameter(name = Constant.ORDER_FIELD, description = "排序字段", in = ParameterIn.QUERY, ref="String") ,
|
||||
@Parameter(name = Constant.ORDER, description = "排序方式,可选值(asc、desc)", in = ParameterIn.QUERY, ref="String"),
|
||||
@Parameter(name = "名称", description = "名称搜索", in = ParameterIn.QUERY, ref="String")
|
||||
})
|
||||
@RequiresPermissions("baitutools:dlrenewalremind:page")
|
||||
public Result<PageData<DlRenewalRemindDTO>> page(@Parameter(hidden = true) @RequestParam Map<String, Object> params){
|
||||
PageData<DlRenewalRemindDTO> page = dlRenewalRemindService.page(params);
|
||||
|
||||
return new Result<PageData<DlRenewalRemindDTO>>().ok(page);
|
||||
}
|
||||
|
||||
@GetMapping("{id}")
|
||||
@Operation(summary = "信息")
|
||||
@RequiresPermissions("baitutools:dlrenewalremind:info")
|
||||
public Result<DlRenewalRemindDTO> get(@PathVariable("id") Long id){
|
||||
DlRenewalRemindDTO data = dlRenewalRemindService.get(id);
|
||||
|
||||
return new Result<DlRenewalRemindDTO>().ok(data);
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
@Operation(summary = "保存")
|
||||
@LogOperation("保存")
|
||||
@RequiresPermissions("baitutools:dlrenewalremind:save")
|
||||
public Result save(@RequestBody DlRenewalRemindDTO dto){
|
||||
log.info( ">>>>>>>>>"+dto.toString());
|
||||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
|
||||
|
||||
dlRenewalRemindService.save(dto);
|
||||
|
||||
return new Result();
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@Operation(summary = "修改")
|
||||
@LogOperation("修改")
|
||||
@RequiresPermissions("baitutools:dlrenewalremind:update")
|
||||
public Result update(@RequestBody DlRenewalRemindDTO dto){
|
||||
//效验数据
|
||||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
|
||||
|
||||
dlRenewalRemindService.update(dto);
|
||||
|
||||
return new Result();
|
||||
}
|
||||
|
||||
@DeleteMapping
|
||||
@Operation(summary = "删除")
|
||||
@LogOperation("删除")
|
||||
@RequiresPermissions("baitutools:dlrenewalremind:delete")
|
||||
public Result delete(@RequestBody Long[] ids){
|
||||
//效验数据
|
||||
AssertUtils.isArrayEmpty(ids, "id");
|
||||
|
||||
dlRenewalRemindService.delete(ids);
|
||||
|
||||
return new Result();
|
||||
}
|
||||
|
||||
@GetMapping("export")
|
||||
@Operation(summary = "导出")
|
||||
@LogOperation("导出")
|
||||
@RequiresPermissions("baitutools:dlrenewalremind:export")
|
||||
public void export(@Parameter(hidden = true) @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
|
||||
List<DlRenewalRemindDTO> list = dlRenewalRemindService.list(params);
|
||||
|
||||
ExcelUtils.exportExcelToTarget(response, null, "临期续费", list, DlRenewalRemindExcel.class);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
package top.iletter.modules.baitutools.dao;
|
||||
|
||||
import top.iletter.common.dao.BaseDao;
|
||||
import top.iletter.modules.baitutools.entity.DlRenewalRemindEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 临期续费
|
||||
*
|
||||
* @author dellevin dellevin99@gmail.com
|
||||
* @since 1.0.0 2026-02-04
|
||||
*/
|
||||
@Mapper
|
||||
public interface DlRenewalRemindDao extends BaseDao<DlRenewalRemindEntity> {
|
||||
/**
|
||||
* 获取信息
|
||||
* @param params 查询参数 页码: page 每页条数: limit
|
||||
* 排序字段: orderField 升/降序: order 区域代码: regionCode
|
||||
* 页面搜索关键字: keyword 供应商名称: supplierName ...
|
||||
* @return 符合条件的中标信息列表
|
||||
*/
|
||||
List<DlRenewalRemindEntity> getList(Map<String, Object> params);
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
package top.iletter.modules.baitutools.dto;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import io.swagger.v3.oas.annotations.media.SchemaProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 临期续费
|
||||
*
|
||||
* @author dellevin dellevin99@gmail.com
|
||||
* @since 1.0.0 2026-02-04
|
||||
*/
|
||||
@Data
|
||||
@Schema(name = "临期续费")
|
||||
public class DlRenewalRemindDTO implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@SchemaProperty(name = "")
|
||||
private String id;
|
||||
|
||||
@SchemaProperty(name = " 提供商:阿里/腾讯/网易/百度/")
|
||||
private String provider;
|
||||
|
||||
@SchemaProperty(name = "名称")
|
||||
private String name;
|
||||
|
||||
@SchemaProperty(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@SchemaProperty(name = "其他信息json形式")
|
||||
private String otherInfo;
|
||||
|
||||
@SchemaProperty(name = "续费方式1一次性 2月费 3季费 4年费")
|
||||
private String renewalType;
|
||||
|
||||
@SchemaProperty(name = "具体续费日期:每 月/季/年 的XX号 1~31")
|
||||
private String renewalDate;
|
||||
|
||||
@SchemaProperty(name = "到期时间 年-月-日")
|
||||
private Date expireTime;
|
||||
|
||||
@SchemaProperty(name = "预留字段")
|
||||
private String mark1;
|
||||
|
||||
@SchemaProperty(name = "预留字段")
|
||||
private String mark2;
|
||||
|
||||
@SchemaProperty(name = "预留字段")
|
||||
private String mark3;
|
||||
|
||||
@SchemaProperty(name = "")
|
||||
private Date createDate;
|
||||
|
||||
@SchemaProperty(name = "")
|
||||
private String createUser;
|
||||
|
||||
@SchemaProperty(name = "")
|
||||
private Date updateDate;
|
||||
|
||||
@SchemaProperty(name = "")
|
||||
private String updateUser;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
package top.iletter.modules.baitutools.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 临期续费
|
||||
*
|
||||
* @author dellevin dellevin99@gmail.com
|
||||
* @since 1.0.0 2026-02-04
|
||||
*/
|
||||
@Data
|
||||
@TableName("dl_renewal_remind")
|
||||
public class DlRenewalRemindEntity {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String id;
|
||||
/**
|
||||
* 提供商:阿里/腾讯/网易/百度/
|
||||
*/
|
||||
private String provider;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 其他信息json形式
|
||||
*/
|
||||
private String otherInfo;
|
||||
/**
|
||||
* 续费方式
|
||||
|
||||
1一次性
|
||||
2月费
|
||||
3季费
|
||||
4年费
|
||||
*/
|
||||
private String renewalType;
|
||||
/**
|
||||
* 具体续费日期:每 月/季/年 的XX号 1~31
|
||||
*/
|
||||
private String renewalDate;
|
||||
/**
|
||||
* 到期时间 年-月-日
|
||||
*/
|
||||
private Date expireTime;
|
||||
/**
|
||||
* 预留字段
|
||||
*/
|
||||
private String mark1;
|
||||
/**
|
||||
* 预留字段
|
||||
*/
|
||||
private String mark2;
|
||||
/**
|
||||
* 预留字段
|
||||
*/
|
||||
private String mark3;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Date createDate;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String createUser;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Date updateDate;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String updateUser;
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
package top.iletter.modules.baitutools.excel;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
|
||||
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 临期续费
|
||||
*
|
||||
* @author dellevin dellevin99@gmail.com
|
||||
* @since 1.0.0 2026-02-04
|
||||
*/
|
||||
@Data
|
||||
public class DlRenewalRemindExcel {
|
||||
@ExcelProperty(value = "")
|
||||
private String id;
|
||||
@ExcelProperty(value = "提供商:阿里/腾讯/网易/百度/")
|
||||
private String provider;
|
||||
@ExcelProperty(value = "名称")
|
||||
private String name;
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
@ExcelProperty(value = "其他信息json形式")
|
||||
private String otherInfo;
|
||||
@ExcelProperty(value = "续费方式1一次性 2月费 3季费 4年费")
|
||||
private String renewalType;
|
||||
@ExcelProperty(value = "具体续费日期:每 月/季/年 的XX号 1~31")
|
||||
private String renewalDate;
|
||||
@ExcelProperty(value = "到期时间 年-月-日")
|
||||
private Date expireTime;
|
||||
@ExcelProperty(value = "预留字段")
|
||||
private String mark1;
|
||||
@ExcelProperty(value = "预留字段")
|
||||
private String mark2;
|
||||
@ExcelProperty(value = "预留字段")
|
||||
private String mark3;
|
||||
@ExcelProperty(value = "")
|
||||
private Date createDate;
|
||||
@ExcelProperty(value = "")
|
||||
private String createUser;
|
||||
@ExcelProperty(value = "")
|
||||
private Date updateDate;
|
||||
@ExcelProperty(value = "")
|
||||
private String updateUser;
|
||||
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
package top.iletter.modules.baitutools.service;
|
||||
|
||||
import top.iletter.common.service.CrudService;
|
||||
import top.iletter.modules.baitutools.dto.DlRenewalRemindDTO;
|
||||
import top.iletter.modules.baitutools.entity.DlRenewalRemindEntity;
|
||||
|
||||
/**
|
||||
* 临期续费
|
||||
*
|
||||
* @author dellevin dellevin99@gmail.com
|
||||
* @since 1.0.0 2026-02-04
|
||||
*/
|
||||
public interface DlRenewalRemindService extends CrudService<DlRenewalRemindEntity, DlRenewalRemindDTO> {
|
||||
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
package top.iletter.modules.baitutools.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import top.iletter.common.page.PageData;
|
||||
import top.iletter.common.service.impl.CrudServiceImpl;
|
||||
import top.iletter.modules.baitutools.dao.DlRenewalRemindDao;
|
||||
import top.iletter.modules.baitutools.dto.DlRenewalRemindDTO;
|
||||
import top.iletter.modules.baitutools.entity.DlRenewalRemindEntity;
|
||||
import top.iletter.modules.baitutools.service.DlRenewalRemindService;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 临期续费
|
||||
*
|
||||
* @author dellevin dellevin99@gmail.com
|
||||
* @since 1.0.0 2026-02-04
|
||||
*/
|
||||
@Service
|
||||
public class DlRenewalRemindServiceImpl extends CrudServiceImpl<DlRenewalRemindDao, DlRenewalRemindEntity, DlRenewalRemindDTO> implements DlRenewalRemindService {
|
||||
|
||||
@Override
|
||||
public QueryWrapper<DlRenewalRemindEntity> getWrapper(Map<String, Object> params){
|
||||
String id = (String)params.get("id");
|
||||
|
||||
QueryWrapper<DlRenewalRemindEntity> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq(StrUtil.isNotBlank(id), "id", id);
|
||||
|
||||
return wrapper;
|
||||
}
|
||||
@Override
|
||||
public PageData<DlRenewalRemindDTO> page(Map<String, Object> params) {
|
||||
IPage<DlRenewalRemindEntity> page = getPage(params, "create_date", false);
|
||||
|
||||
List<DlRenewalRemindEntity> list = baseDao.getList(params);
|
||||
return getPageData(list, page.getTotal(), DlRenewalRemindDTO.class);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
<?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="top.iletter.modules.baitutools.dao.DlRenewalRemindDao">
|
||||
|
||||
<resultMap type="top.iletter.modules.baitutools.entity.DlRenewalRemindEntity" id="dlRenewalRemindMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="provider" column="provider"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="otherInfo" column="other_info"/>
|
||||
<result property="renewalType" column="renewal_type"/>
|
||||
<result property="renewalDate" column="renewal_date"/>
|
||||
<result property="expireTime" column="expire_time"/>
|
||||
<result property="mark1" column="mark1"/>
|
||||
<result property="mark2" column="mark2"/>
|
||||
<result property="mark3" column="mark3"/>
|
||||
<result property="createDate" column="create_date"/>
|
||||
<result property="createUser" column="create_user"/>
|
||||
<result property="updateDate" column="update_date"/>
|
||||
<result property="updateUser" column="update_user"/>
|
||||
</resultMap>
|
||||
<!-- 获取分页查询 -->
|
||||
<select id="getList" resultType="top.iletter.modules.baitutools.entity.DlRenewalRemindEntity">
|
||||
SELECT * FROM dl_renewal_remind
|
||||
<where>
|
||||
<if test="keywordName != null and keywordName.trim() != ''">
|
||||
AND locate(#{keywordName} , `name` )
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user