添加功能
This commit is contained in:
parent
58be92defa
commit
24d28ecef9
|
@ -67,9 +67,8 @@ public class KcErrorreportController extends JeecgController<KcErrorreport, IKcE
|
|||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<KcErrorreport> queryWrapper = QueryGenerator.initQueryWrapper(kcErrorreport, req.getParameterMap());
|
||||
Page<KcErrorreport> page = new Page<KcErrorreport>(pageNo, pageSize);
|
||||
IPage<KcErrorreport> pageList = kcErrorreportService.page(page, queryWrapper);
|
||||
IPage<KcErrorreport> pageList = kcErrorreportService.selectPageList(page, kcErrorreport);
|
||||
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;
|
||||
|
@ -97,9 +95,34 @@ public class KcErrorreport implements Serializable {
|
|||
/**是否出镜,0-出镜,1-不出镜*/
|
||||
@Excel(name = "是否出镜,0-出镜,1-不出镜", width = 15)
|
||||
@ApiModelProperty(value = "是否出镜,0-出镜,1-不出镜")
|
||||
@Dict(dicCode = "sfcj")
|
||||
private java.lang.Integer sfcj;
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private java.lang.String college;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String kcmc;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String kkdw;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String ktskrq;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String hh;
|
||||
@TableField(exist = false)
|
||||
@Dict(dicCode = "sfcj")
|
||||
private java.lang.String ktbsfcj;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String startTime;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String endTime;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String szdw;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -2,6 +2,8 @@ package org.jeecg.modules.kc.kcErrorreport.mapper;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.kc.kcErrorreport.entity.KcErrorreport;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
@ -14,4 +16,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
*/
|
||||
public interface KcErrorreportMapper extends BaseMapper<KcErrorreport> {
|
||||
|
||||
IPage<KcErrorreport> selectPageList(Page<KcErrorreport> page, KcErrorreport kcErrorreport);
|
||||
}
|
||||
|
|
|
@ -2,4 +2,37 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.jeecg.modules.kc.kcErrorreport.mapper.KcErrorreportMapper">
|
||||
|
||||
|
||||
<select id="selectPageList" resultType="org.jeecg.modules.kc.kcErrorreport.entity.KcErrorreport">
|
||||
SELECT
|
||||
er.*,
|
||||
cu.college,
|
||||
kc.kcmc,
|
||||
kc.kkdw,
|
||||
kc.skrq AS ktskrq,
|
||||
kc.hh,
|
||||
kc.sfcj AS ktbsfcj
|
||||
|
||||
FROM
|
||||
kc_errorreport er,
|
||||
kc_ketangbiao kc,
|
||||
kc_casusers cu
|
||||
WHERE
|
||||
kc.kechengbiaoid = er.kechengbiaoid
|
||||
AND kc.skrq = IFNULL( er.skrq, SUBSTR( reportstime, 1, 10 ) )
|
||||
AND er.userid = cu.USER
|
||||
<if test="kcErrorreport.optionsradios != null and kcErrorreport.optionsradios !='' ">
|
||||
AND er.optionsradios = #{kcErrorreport.optionsradios}
|
||||
</if>
|
||||
<if test="kcErrorreport.kkdw != null and kcErrorreport.kkdw !='' ">
|
||||
AND kc.kkdw = #{kcErrorreport.kkdw}
|
||||
</if>
|
||||
<if test="kcErrorreport.startTime != null and kcErrorreport.startTime !='' ">
|
||||
AND SUBSTR( reportstime, 1, 10 ) >= #{kcErrorreport.startTime}
|
||||
</if>
|
||||
<if test="kcErrorreport.endTime != null and kcErrorreport.endTime !='' ">
|
||||
AND SUBSTR( reportstime, 1, 10 ) <= #{kcErrorreport.endTime}
|
||||
</if>
|
||||
ORDER BY reportstatus, reportstime DESC
|
||||
</select>
|
||||
</mapper>
|
|
@ -1,5 +1,7 @@
|
|||
package org.jeecg.modules.kc.kcErrorreport.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.jeecg.modules.kc.kcErrorreport.entity.KcErrorreport;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
|
@ -11,4 +13,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||
*/
|
||||
public interface IKcErrorreportService extends IService<KcErrorreport> {
|
||||
|
||||
IPage<KcErrorreport> selectPageList(Page<KcErrorreport> page, KcErrorreport kcErrorreport);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package org.jeecg.modules.kc.kcErrorreport.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.jeecg.modules.kc.kcErrorreport.entity.KcErrorreport;
|
||||
import org.jeecg.modules.kc.kcErrorreport.mapper.KcErrorreportMapper;
|
||||
import org.jeecg.modules.kc.kcErrorreport.service.IKcErrorreportService;
|
||||
|
@ -16,4 +18,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||
@Service
|
||||
public class KcErrorreportServiceImpl extends ServiceImpl<KcErrorreportMapper, KcErrorreport> implements IKcErrorreportService {
|
||||
|
||||
@Override
|
||||
public IPage<KcErrorreport> selectPageList(Page<KcErrorreport> page, KcErrorreport kcErrorreport) {
|
||||
return baseMapper.selectPageList(page,kcErrorreport);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -97,6 +97,14 @@ public class KcGongkaike implements Serializable {
|
|||
@ApiModelProperty(value = "类别")
|
||||
private java.lang.String hxrlb;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "图片名称2")
|
||||
private java.lang.String tpmc2;
|
||||
|
||||
@ApiModelProperty(value = "图片名称3")
|
||||
private java.lang.String tpmc3;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private String type;
|
||||
}
|
||||
|
|
|
@ -12,4 +12,5 @@
|
|||
) a
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -81,7 +81,6 @@ public class KcNoticeController extends JeecgController<KcNotice, IKcNoticeServi
|
|||
*/
|
||||
@AutoLog(value = "kc_notice-添加")
|
||||
@ApiOperation(value="kc_notice-添加", notes="kc_notice-添加")
|
||||
@RequiresPermissions("kcNotice:kc_notice:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody KcNotice kcNotice) {
|
||||
kcNoticeService.save(kcNotice);
|
||||
|
@ -96,7 +95,6 @@ public class KcNoticeController extends JeecgController<KcNotice, IKcNoticeServi
|
|||
*/
|
||||
@AutoLog(value = "kc_notice-编辑")
|
||||
@ApiOperation(value="kc_notice-编辑", notes="kc_notice-编辑")
|
||||
@RequiresPermissions("kcNotice:kc_notice:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody KcNotice kcNotice) {
|
||||
kcNoticeService.updateById(kcNotice);
|
||||
|
@ -111,7 +109,6 @@ public class KcNoticeController extends JeecgController<KcNotice, IKcNoticeServi
|
|||
*/
|
||||
@AutoLog(value = "kc_notice-通过id删除")
|
||||
@ApiOperation(value="kc_notice-通过id删除", notes="kc_notice-通过id删除")
|
||||
@RequiresPermissions("kcNotice:kc_notice:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
kcNoticeService.removeById(id);
|
||||
|
@ -126,7 +123,6 @@ public class KcNoticeController extends JeecgController<KcNotice, IKcNoticeServi
|
|||
*/
|
||||
@AutoLog(value = "kc_notice-批量删除")
|
||||
@ApiOperation(value="kc_notice-批量删除", notes="kc_notice-批量删除")
|
||||
@RequiresPermissions("kcNotice:kc_notice:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.kcNoticeService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
|
|
|
@ -44,12 +44,12 @@ public class KcNotice implements Serializable {
|
|||
@Excel(name = "类型 0:外部链接 1:富文本 ", width = 15, dicCode = "ntype")
|
||||
@Dict(dicCode = "ntype")
|
||||
@ApiModelProperty(value = "类型 0:外部链接 1:富文本 ")
|
||||
private java.lang.Integer ntype;
|
||||
private java.lang.String ntype;
|
||||
/**状态 0:不可用 1:可用*/
|
||||
@Excel(name = "状态 0:不可用 1:可用", width = 15, dicCode = "nstatus")
|
||||
@Dict(dicCode = "nstatus")
|
||||
@ApiModelProperty(value = "状态 0:不可用 1:可用")
|
||||
private java.lang.Integer nstatus;
|
||||
private java.lang.String nstatus;
|
||||
/**内容*/
|
||||
@Excel(name = "内容", width = 15)
|
||||
private transient java.lang.String ncontentString;
|
||||
|
@ -84,14 +84,14 @@ public class KcNotice implements Serializable {
|
|||
@ApiModelProperty(value = "链接")
|
||||
private java.lang.String nlink;
|
||||
/**发布日期*/
|
||||
@Excel(name = "发布日期", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "发布日期", width = 20, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "发布日期")
|
||||
private java.util.Date ndate;
|
||||
/**是否置顶0:否 1:置顶*/
|
||||
@Excel(name = "是否置顶0:否 1:置顶", width = 15, dicCode = "ontop")
|
||||
@Dict(dicCode = "ontop")
|
||||
@ApiModelProperty(value = "是否置顶0:否 1:置顶")
|
||||
private java.lang.Integer ontop;
|
||||
private java.lang.String ontop;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue