feat:团队

This commit is contained in:
苏竹红
2025-10-31 09:58:04 +08:00
parent ec73dad33e
commit 45a53a5607
4 changed files with 15 additions and 10 deletions

View File

@@ -7,6 +7,7 @@ import com.cool.store.mapper.decoration.TeamAreaMappingMapper;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import javax.annotation.Resource;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@@ -20,6 +21,7 @@ import java.util.stream.Collectors;
@Repository @Repository
public class TeamAreaMappingDAO { public class TeamAreaMappingDAO {
@Resource
private TeamAreaMappingMapper teamAreaMappingMapper; private TeamAreaMappingMapper teamAreaMappingMapper;
public void batchInsert(Long teamId,List<Long> cityId){ public void batchInsert(Long teamId,List<Long> cityId){

View File

@@ -21,7 +21,7 @@
t.team_code, t.team_code,
t.use_system t.use_system
from from
zxjp_decoration_team_config zxjp_decoration_team_config t
where deleted = 0 where t.deleted = 0
</select> </select>
</mapper> </mapper>

View File

@@ -85,6 +85,7 @@ public class DecorationHandleServiceImpl implements DecorationHandleService {
} }
teamConfigDO.setDeleted(1); teamConfigDO.setDeleted(1);
teamAreaMappingDAO.deletedByTeamId(teamId); teamAreaMappingDAO.deletedByTeamId(teamId);
decorationTeamConfigDAO.updateTeam(teamConfigDO);
return Boolean.TRUE; return Boolean.TRUE;
} }

View File

@@ -4,12 +4,14 @@ import com.cool.store.common.PageBasicInfo;
import com.cool.store.dto.decoration.DecorationTeamDTO; import com.cool.store.dto.decoration.DecorationTeamDTO;
import com.cool.store.request.decoration.AddTeamRequest; import com.cool.store.request.decoration.AddTeamRequest;
import com.cool.store.request.decoration.UpdateTeamRequest; import com.cool.store.request.decoration.UpdateTeamRequest;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.DecorationHandleService; import com.cool.store.service.DecorationHandleService;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
@@ -32,27 +34,27 @@ public class DecorationAllocationController {
@PostMapping("/addTeam") @PostMapping("/addTeam")
@ApiOperation("添加团队") @ApiOperation("添加团队")
public Boolean addTeam(AddTeamRequest request){ public ResponseResult<Boolean> addTeam(@RequestBody AddTeamRequest request){
return decorationHandleService.addTeam(request); return ResponseResult.success(decorationHandleService.addTeam(request));
} }
@PostMapping("/update") @PostMapping("/update")
@ApiOperation("修改团队") @ApiOperation("修改团队")
public Boolean update(UpdateTeamRequest request){ public ResponseResult<Boolean> update(@RequestBody UpdateTeamRequest request){
return decorationHandleService.update(request); return ResponseResult.success(decorationHandleService.update(request));
} }
@PostMapping("/deleteByTeamId") @PostMapping("/deleteByTeamId")
@ApiOperation("删除团队") @ApiOperation("删除团队")
public Boolean deleteByTeamId(Long teamId){ public ResponseResult<Boolean> deleteByTeamId(Long teamId){
return decorationHandleService.deleteByTeamId(teamId); return ResponseResult.success(decorationHandleService.deleteByTeamId(teamId));
} }
@PostMapping("/listByCondition") @PostMapping("/listByCondition")
@ApiOperation("查询团队") @ApiOperation("查询团队")
public PageInfo<DecorationTeamDTO> listByCondition(PageBasicInfo pageBasicInfo){ public ResponseResult<PageInfo<DecorationTeamDTO>> listByCondition(@RequestBody PageBasicInfo pageBasicInfo){
return decorationHandleService.listByCondition(pageBasicInfo); return ResponseResult.success(decorationHandleService.listByCondition(pageBasicInfo));
} }