修改bug
This commit is contained in:
parent
48b7ab9cf9
commit
c0bf937175
|
@ -3,6 +3,8 @@ package org.jeecg.modules.kc.kcKetangSuibi.controller;
|
|||
import java.util.Arrays;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.modules.kc.kcKetangSuibi.entity.KcKetangSuibi;
|
||||
|
@ -69,7 +71,16 @@ public class KcKetangSuibiController extends JeecgController<KcKetangSuibi, IKcK
|
|||
// @RequiresPermissions("kc:kc_ketang_suibi:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody KcKetangSuibi kcKetangSuibi) {
|
||||
kcKetangSuibiService.save(kcKetangSuibi);
|
||||
if(StringUtils.isNotBlank(kcKetangSuibi.getKetangbiaoId())){
|
||||
QueryWrapper<KcKetangSuibi> kcKetangSuibiQueryWrapper = new QueryWrapper<>();
|
||||
kcKetangSuibiQueryWrapper.eq("ketangbiao_id",kcKetangSuibi.getKetangbiaoId());
|
||||
kcKetangSuibiQueryWrapper.eq("user_id",kcKetangSuibi.getUserId());
|
||||
kcKetangSuibiService.remove(kcKetangSuibiQueryWrapper);
|
||||
kcKetangSuibiService.save(kcKetangSuibi);
|
||||
}else{
|
||||
kcKetangSuibiService.save(kcKetangSuibi);
|
||||
}
|
||||
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
|
|
|
@ -64,6 +64,9 @@ public class KcKetangSuibi implements Serializable {
|
|||
@Excel(name = "笔记内容", width = 15)
|
||||
@ApiModelProperty(value = "笔记内容")
|
||||
private java.lang.String notes;
|
||||
/**笔记内容*/
|
||||
private java.lang.String title;
|
||||
private java.lang.String sbType;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String kcmc;
|
||||
|
|
|
@ -771,4 +771,20 @@ public class KcKetangbiaoController extends JeecgController<KcKetangbiao, IKcKet
|
|||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
@ApiOperation(value="课堂管理-子表-分页列表查询", notes="课堂管理-子表-分页列表查询")
|
||||
@GetMapping(value = "/getKtsbMorelist")
|
||||
public Result<IPage<KcKetangbiao>> getKtsbMorelist(KcKetangbiao kcKetangbiao,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<KcKetangbiao> queryWrapper = QueryGenerator.initQueryWrapper(kcKetangbiao, req.getParameterMap());
|
||||
queryWrapper.ge(StringUtils.isNotBlank(kcKetangbiao.getStartTime()),"a.create_time",kcKetangbiao.getStartTime());//
|
||||
queryWrapper.le(StringUtils.isNotBlank(kcKetangbiao.getEndTime()),"a.create_time",kcKetangbiao.getEndTime()+" 23:59:59");//
|
||||
queryWrapper.le(StringUtils.isNotBlank(kcKetangbiao.getUserid()),"a.user_id",kcKetangbiao.getUserid());//
|
||||
queryWrapper.orderByDesc("a.create_time");
|
||||
Page<KcKetangbiao> page = new Page<KcKetangbiao>(pageNo, pageSize);
|
||||
IPage<KcKetangbiao> pageList = kcKetangbiaoService.getKtsbMorelist(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -38,10 +38,11 @@ public class KcKetangbiao implements Serializable {
|
|||
// @ApiModelProperty(value = "创建人登录名称")
|
||||
// private java.lang.String createBy;
|
||||
// /**创建日期*/
|
||||
// @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
// @DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
// @ApiModelProperty(value = "创建日期")
|
||||
// private java.util.Date createTime;
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
@TableField(exist = false)
|
||||
private java.util.Date createTime;
|
||||
// /**更新人登录名称*/
|
||||
// @ApiModelProperty(value = "更新人登录名称")
|
||||
// private java.lang.String updateBy;
|
||||
|
@ -300,4 +301,10 @@ public class KcKetangbiao implements Serializable {
|
|||
@TableField(exist = false)
|
||||
private String xspjPjf;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String sbType;
|
||||
@TableField(exist = false)
|
||||
private String title;
|
||||
@TableField(exist = false)
|
||||
private String notes;
|
||||
}
|
||||
|
|
|
@ -56,4 +56,6 @@ public interface KcKetangbiaoMapper extends BaseMapper<KcKetangbiao> {
|
|||
KcKetangbiao getScoreById(KcKetangbiao kcKetangbiao);
|
||||
|
||||
IPage<KcKetangbiao> indexYkktzsPage(Page<KcKetangbiao> page, @Param(Constants.WRAPPER) QueryWrapper<KcKetangbiao> queryWrapper);
|
||||
|
||||
IPage<KcKetangbiao> getKtsbMorelist(Page<KcKetangbiao> page, @Param(Constants.WRAPPER) QueryWrapper<KcKetangbiao> queryWrapper);
|
||||
}
|
||||
|
|
|
@ -557,11 +557,11 @@
|
|||
|
||||
|
||||
<select id="getKtbjList" parameterType="org.jeecg.modules.kc.ktgl.entity.KcKetangbiao" resultType="org.jeecg.modules.kc.ktgl.entity.KcKetangbiao">
|
||||
select b.* from kc_ketang_suibi a
|
||||
select b.*,a.sb_type,a.title,a.notes,a.create_time from kc_ketang_suibi a
|
||||
LEFT JOIN kc_ketangbiao b on a.ketangbiao_id = b.id
|
||||
where a.user_id = #{userid}
|
||||
GROUP BY a.user_id,a.ketangbiao_id
|
||||
ORDER BY a.create_time desc
|
||||
limit 4
|
||||
</select>
|
||||
|
||||
|
||||
|
@ -611,5 +611,11 @@
|
|||
|
||||
</select>
|
||||
|
||||
<select id="getKtsbMorelist" resultType="org.jeecg.modules.kc.ktgl.entity.KcKetangbiao">
|
||||
select b.*,a.sb_type,a.title,a.notes,a.create_time from kc_ketang_suibi a
|
||||
LEFT JOIN kc_ketangbiao b on a.ketangbiao_id = b.id
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
|
@ -58,4 +58,6 @@ public interface IKcKetangbiaoService extends IService<KcKetangbiao> {
|
|||
KcKetangbiao getScoreById(KcKetangbiao kcKetangbiao);
|
||||
|
||||
IPage<KcKetangbiao> indexYkktzsPage(Page<KcKetangbiao> page, QueryWrapper<KcKetangbiao> qw3);
|
||||
|
||||
IPage<KcKetangbiao> getKtsbMorelist(Page<KcKetangbiao> page, QueryWrapper<KcKetangbiao> queryWrapper);
|
||||
}
|
||||
|
|
|
@ -116,4 +116,9 @@ public class KcKetangbiaoServiceImpl extends ServiceImpl<KcKetangbiaoMapper, KcK
|
|||
public IPage<KcKetangbiao> indexYkktzsPage(Page<KcKetangbiao> page, QueryWrapper<KcKetangbiao> qw3) {
|
||||
return baseMapper.indexYkktzsPage(page,qw3);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<KcKetangbiao> getKtsbMorelist(Page<KcKetangbiao> page, QueryWrapper<KcKetangbiao> queryWrapper) {
|
||||
return baseMapper.getKtsbMorelist(page,queryWrapper);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue