diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/DelCommunitySelfOrganizationFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/DelCommunitySelfOrganizationFormDTO.java new file mode 100644 index 0000000000..67ee078676 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/DelCommunitySelfOrganizationFormDTO.java @@ -0,0 +1,22 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2021/11/19 4:19 下午 + * @DESC + */ +@Data +public class DelCommunitySelfOrganizationFormDTO implements Serializable { + + private static final long serialVersionUID = 789228513283561471L; + + public interface DelCommunitySelfOrganizationForm{} + + @NotBlank(message = "orgId不能为空",groups = DelCommunitySelfOrganizationForm.class) + private String orgId; +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java index f805d75a72..d006f4cc07 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcCommunitySelfOrganizationController.java @@ -31,6 +31,7 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.IcCommunitySelfOrganizationDTO; import com.epmet.dto.form.AddCommunitySelfOrganizationFormDTO; import com.epmet.dto.form.CommunitySelfOrganizationListFormDTO; +import com.epmet.dto.form.DelCommunitySelfOrganizationFormDTO; import com.epmet.dto.form.EditCommunitySelfOrganizationFormDTO; import com.epmet.dto.result.CommunitySelfOrganizationListResultDTO; import com.epmet.excel.IcCommunitySelfOrganizationExcel; @@ -139,4 +140,17 @@ public class IcCommunitySelfOrganizationController { return new Result().ok(icCommunitySelfOrganizationService.communitySelfOrganizationList(tokenDto, formDTO)); } + /** + * @Description 社区自组织删除 + * @param formDTO + * @author zxc + * @date 2021/11/19 4:22 下午 + */ + @PostMapping("delcommunityselforganization") + public Result delCommunitySelfOrganization(@RequestBody DelCommunitySelfOrganizationFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, DelCommunitySelfOrganizationFormDTO.DelCommunitySelfOrganizationForm.class); + icCommunitySelfOrganizationService.delCommunitySelfOrganization(formDTO); + return new Result(); + } + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java index 7de1d51965..273006cd50 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcCommunitySelfOrganizationService.java @@ -23,6 +23,7 @@ import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.IcCommunitySelfOrganizationDTO; import com.epmet.dto.form.AddCommunitySelfOrganizationFormDTO; import com.epmet.dto.form.CommunitySelfOrganizationListFormDTO; +import com.epmet.dto.form.DelCommunitySelfOrganizationFormDTO; import com.epmet.dto.form.EditCommunitySelfOrganizationFormDTO; import com.epmet.dto.result.CommunitySelfOrganizationListResultDTO; import com.epmet.entity.IcCommunitySelfOrganizationEntity; @@ -124,4 +125,13 @@ public interface IcCommunitySelfOrganizationService extends BaseService - + DELETE FROM ic_community_self_organization_personnel WHERE ORG_ID = #{orgId} - + \ No newline at end of file