fix 标签管理

This commit is contained in:
lijiarao
2023-08-21 17:52:34 +08:00
parent de612316c8
commit bf0b68397e
3 changed files with 12 additions and 14 deletions
@@ -155,7 +155,7 @@ public class LawsAreaController extends JeroController<LawsArea, ILawsAreaServic
*/ */
@AutoLog(value = "区域管理表-通过id删除") @AutoLog(value = "区域管理表-通过id删除")
@ApiOperation(value="区域管理表-通过id删除", notes="区域管理表-通过id删除") @ApiOperation(value="区域管理表-通过id删除", notes="区域管理表-通过id删除")
@GetMapping(value = "/delete") @PostMapping(value = "/delete")
@RequiresPermissions("area:delete") @RequiresPermissions("area:delete")
public Result<?> delete(@RequestBody Map<String, String> map) { public Result<?> delete(@RequestBody Map<String, String> map) {
if(!map.containsKey("id") || StringUtils.isEmpty(map.get("id"))){ if(!map.containsKey("id") || StringUtils.isEmpty(map.get("id"))){
@@ -184,7 +184,7 @@ public class LawsAreaController extends JeroController<LawsArea, ILawsAreaServic
*/ */
@AutoLog(value = "区域管理表-批量删除") @AutoLog(value = "区域管理表-批量删除")
@ApiOperation(value="区域管理表-批量删除", notes="区域管理表-批量删除") @ApiOperation(value="区域管理表-批量删除", notes="区域管理表-批量删除")
@GetMapping(value = "/deleteBatch") @PostMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestBody Map<String, String> map) { public Result<?> deleteBatch(@RequestBody Map<String, String> map) {
if(!map.containsKey("ids") || StringUtils.isEmpty(map.get("ids"))){ if(!map.containsKey("ids") || StringUtils.isEmpty(map.get("ids"))){
return Result.error("请选择数据!"); return Result.error("请选择数据!");
@@ -56,11 +56,10 @@ public class LawsTagController extends JeroController<LawsTag, ILawsTagService>
@ApiOperation(value="标签管理-分页列表查询", notes="标签管理-分页列表查询") @ApiOperation(value="标签管理-分页列表查询", notes="标签管理-分页列表查询")
@RequiresPermissions("tag:page") @RequiresPermissions("tag:page")
@GetMapping(value = "/page") @GetMapping(value = "/page")
public Result<?> queryPageList(@RequestBody LawsTag lawsTag, public Result<?> queryPageList(LawsTag lawsTag,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) { HttpServletRequest req) {
IPage<LawsTag> pageList= lawsTagService.queryPageList(lawsTag, pageNo, pageSize, req); IPage<LawsTag> pageList= lawsTagService.queryPageList(lawsTag, pageNo, pageSize, req);
return Result.OK(pageList); return Result.OK(pageList);
} }
@@ -70,13 +69,13 @@ public class LawsTagController extends JeroController<LawsTag, ILawsTagService>
* *
* @return * @return
*/ */
@AutoLog(value = "标签管理-列表查询") //@AutoLog(value = "标签管理-列表查询")
@ApiOperation(value="标签管理-列表查询", notes="标签管理-列表查询") //@ApiOperation(value="标签管理-列表查询", notes="标签管理-列表查询")
@GetMapping(value = "/list") //@GetMapping(value = "/list")
public Result<List<LawsTag>> queryList(LawsArea lawsArea) { //public Result<List<LawsTag>> queryList(LawsArea lawsArea) {
List<LawsTag> list = lawsTagService.queryList(lawsArea); // List<LawsTag> list = lawsTagService.queryList(lawsArea);
return Result.OK(list); // return Result.OK(list);
} //}
/** /**
* 添加 * 添加
@@ -317,9 +317,8 @@ public class ILawsTagServiceImpl extends ServiceImpl<LawsTagMapper, LawsTag> imp
*/ */
@Override @Override
public List<LawsTag> queryList(LawsArea lawsArea) { public List<LawsTag> queryList(LawsArea lawsArea) {
UpdateWrapper<LawsTag> updateWrapper=new UpdateWrapper<>(); QueryWrapper<LawsTag> updateWrapper=new QueryWrapper<>();
updateWrapper.set("area_id", lawsArea.getId()); updateWrapper.eq("is_model", lawsArea.getIsModel());
updateWrapper.set("is_model", lawsArea.getIsModel());
return list(updateWrapper); return list(updateWrapper);
} }