添加功能
This commit is contained in:
parent
85a283d8db
commit
2fbf2df4c2
|
@ -84,7 +84,7 @@ public class KcErrorreportController extends JeecgController<KcErrorreport, IKcE
|
|||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody KcErrorreport kcErrorreport) {
|
||||
kcErrorreportService.save(kcErrorreport);
|
||||
return Result.OK("添加成功!");
|
||||
return Result.OK("提交报错信息成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -171,4 +171,16 @@ public class KcGongkaikeController extends JeecgController<KcGongkaike, IKcGongk
|
|||
return super.importExcel(request, response, KcGongkaike.class);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping(value = "/getIndexList")
|
||||
public Result<IPage<KcGongkaike>> getIndexList(KcGongkaike kcGongkaike,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<KcGongkaike> queryWrapper = QueryGenerator.initQueryWrapper(kcGongkaike, req.getParameterMap());
|
||||
Page<KcGongkaike> page = new Page<KcGongkaike>(pageNo, pageSize);
|
||||
IPage<KcGongkaike> pageList = kcGongkaikeService.getIndexList(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -4,10 +4,8 @@ import java.io.Serializable;
|
|||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
@ -98,4 +96,7 @@ public class KcGongkaike implements Serializable {
|
|||
@Excel(name = "类别", width = 15)
|
||||
@ApiModelProperty(value = "类别")
|
||||
private java.lang.String hxrlb;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String type;
|
||||
}
|
||||
|
|
|
@ -2,9 +2,14 @@ package org.jeecg.modules.kc.kcGongkaike.mapper;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.kc.kcGongkaike.entity.KcGongkaike;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.jetbrains.annotations.Contract;
|
||||
|
||||
/**
|
||||
* @Description: kc_gongkaike
|
||||
|
@ -14,4 +19,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
*/
|
||||
public interface KcGongkaikeMapper extends BaseMapper<KcGongkaike> {
|
||||
|
||||
IPage<KcGongkaike> getIndexList(Page<KcGongkaike> page, @Param(Constants.WRAPPER) QueryWrapper<KcGongkaike> queryWrapper);
|
||||
}
|
||||
|
|
|
@ -2,4 +2,14 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.jeecg.modules.kc.kcGongkaike.mapper.KcGongkaikeMapper">
|
||||
|
||||
<select id="getIndexList" resultType="org.jeecg.modules.kc.kcGongkaike.entity.KcGongkaike">
|
||||
SELECT * from (
|
||||
SELECT * from (
|
||||
select *,'1' as type from kc_gongkaike where rq >= DATE_FORMAT(now(),'%Y-%m-%d')
|
||||
union
|
||||
select *,'2' as type from kc_gongkaike where rq < DATE_FORMAT(now(),'%Y-%m-%d')
|
||||
) a ORDER BY type asc ,rq asc
|
||||
) a
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
</mapper>
|
|
@ -1,5 +1,8 @@
|
|||
package org.jeecg.modules.kc.kcGongkaike.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.jeecg.modules.kc.kcGongkaike.entity.KcGongkaike;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
|
@ -11,4 +14,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||
*/
|
||||
public interface IKcGongkaikeService extends IService<KcGongkaike> {
|
||||
|
||||
IPage<KcGongkaike> getIndexList(Page<KcGongkaike> page, QueryWrapper<KcGongkaike> queryWrapper);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package org.jeecg.modules.kc.kcGongkaike.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.jeecg.modules.kc.kcGongkaike.entity.KcGongkaike;
|
||||
import org.jeecg.modules.kc.kcGongkaike.mapper.KcGongkaikeMapper;
|
||||
import org.jeecg.modules.kc.kcGongkaike.service.IKcGongkaikeService;
|
||||
|
@ -16,4 +19,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||
@Service
|
||||
public class KcGongkaikeServiceImpl extends ServiceImpl<KcGongkaikeMapper, KcGongkaike> implements IKcGongkaikeService {
|
||||
|
||||
@Override
|
||||
public IPage<KcGongkaike> getIndexList(Page<KcGongkaike> page, QueryWrapper<KcGongkaike> queryWrapper) {
|
||||
return baseMapper.getIndexList(page,queryWrapper);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,7 +112,7 @@ public class KcYuyueController extends JeecgController<KcYuyue, IKcYuyueService>
|
|||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
kcYuyueService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
return Result.OK("取消预约成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue