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.springframework.stereotype.Repository;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -20,6 +21,7 @@ import java.util.stream.Collectors;
@Repository
public class TeamAreaMappingDAO {
@Resource
private TeamAreaMappingMapper teamAreaMappingMapper;
public void batchInsert(Long teamId,List<Long> cityId){

View File

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

View File

@@ -85,6 +85,7 @@ public class DecorationHandleServiceImpl implements DecorationHandleService {
}
teamConfigDO.setDeleted(1);
teamAreaMappingDAO.deletedByTeamId(teamId);
decorationTeamConfigDAO.updateTeam(teamConfigDO);
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.request.decoration.AddTeamRequest;
import com.cool.store.request.decoration.UpdateTeamRequest;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.DecorationHandleService;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
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.RestController;
@@ -32,27 +34,27 @@ public class DecorationAllocationController {
@PostMapping("/addTeam")
@ApiOperation("添加团队")
public Boolean addTeam(AddTeamRequest request){
return decorationHandleService.addTeam(request);
public ResponseResult<Boolean> addTeam(@RequestBody AddTeamRequest request){
return ResponseResult.success(decorationHandleService.addTeam(request));
}
@PostMapping("/update")
@ApiOperation("修改团队")
public Boolean update(UpdateTeamRequest request){
return decorationHandleService.update(request);
public ResponseResult<Boolean> update(@RequestBody UpdateTeamRequest request){
return ResponseResult.success(decorationHandleService.update(request));
}
@PostMapping("/deleteByTeamId")
@ApiOperation("删除团队")
public Boolean deleteByTeamId(Long teamId){
return decorationHandleService.deleteByTeamId(teamId);
public ResponseResult<Boolean> deleteByTeamId(Long teamId){
return ResponseResult.success(decorationHandleService.deleteByTeamId(teamId));
}
@PostMapping("/listByCondition")
@ApiOperation("查询团队")
public PageInfo<DecorationTeamDTO> listByCondition(PageBasicInfo pageBasicInfo){
return decorationHandleService.listByCondition(pageBasicInfo);
public ResponseResult<PageInfo<DecorationTeamDTO>> listByCondition(@RequestBody PageBasicInfo pageBasicInfo){
return ResponseResult.success(decorationHandleService.listByCondition(pageBasicInfo));
}