| | |
| | | */ |
| | | package org.springblade.modules.house.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.house.entity.UserHouseLabelEntity; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.house.entity.HouseholdLabelEntity; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 住户-标签 自定义新增或修改 |
| | | * @param householdLabel |
| | | * @return |
| | | */ |
| | | @PostMapping("/saveOrUpdateHouseholdLabel") |
| | | @ApiOperation(value = "自定义新增或修改", notes = "传入householdLabel") |
| | | public R saveOrUpdateHouseholdLabel(@Valid @RequestBody HouseholdLabelEntity householdLabel) { |
| | | return R.status(householdLabelService.saveOrUpdateHouseholdLabel(householdLabel)); |
| | | } |
| | | |
| | | /** |
| | | * 住户-标签 删除 |
| | | */ |
| | | @PostMapping("/remove") |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 住户-标签 自定义删除 |
| | | */ |
| | | @PostMapping("/removeHouseholdLabel") |
| | | public R removeHouseholdLabel(@RequestBody HouseholdLabelEntity householdLabel) { |
| | | QueryWrapper<HouseholdLabelEntity> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("household_id",householdLabel.getHouseholdId()) |
| | | .eq("label_id",householdLabel.getLabelId()); |
| | | // 返回 |
| | | return R.status(householdLabelService.remove(wrapper)); |
| | | } |
| | | |
| | | |
| | | } |