diff --git a/fastbee-open-api/src/main/java/com/fastbee/data/controller/userRecharge/NgInformationVillageKeeperController.java b/fastbee-open-api/src/main/java/com/fastbee/data/controller/userRecharge/NgInformationVillageKeeperController.java new file mode 100644 index 0000000..504fb16 --- /dev/null +++ b/fastbee-open-api/src/main/java/com/fastbee/data/controller/userRecharge/NgInformationVillageKeeperController.java @@ -0,0 +1,110 @@ +package com.fastbee.data.controller.userRecharge; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.fastbee.common.annotation.Log; +import com.fastbee.common.core.controller.BaseController; +import com.fastbee.common.core.domain.AjaxResult; +import com.fastbee.common.enums.BusinessType; +import com.fastbee.rechargecard.domain.NgInformationVillageKeeper; +import com.fastbee.rechargecard.service.INgInformationVillageKeeperService; +import com.fastbee.common.utils.poi.ExcelUtil; +import com.fastbee.common.core.page.TableDataInfo; + +/** + * 村官员信息Controller + * + * @author kerwincui + * @date 2024-12-19 + */ +@RestController +@RequestMapping("/rechargecard/keeper") +@Api(tags = "村官员信息") +public class NgInformationVillageKeeperController extends BaseController +{ + @Autowired + private INgInformationVillageKeeperService ngInformationVillageKeeperService; + +/** + * 查询村官员信息列表 + */ +@PreAuthorize("@ss.hasPermi('rechargecard:keeper:list')") +@GetMapping("/list") +@ApiOperation("查询村官员信息列表") + public TableDataInfo list(NgInformationVillageKeeper ngInformationVillageKeeper) + { + startPage(); + List list = ngInformationVillageKeeperService.selectNgInformationVillageKeeperList(ngInformationVillageKeeper); + return getDataTable(list); + } + + /** + * 导出村官员信息列表 + */ + @ApiOperation("导出村官员信息列表") + @PreAuthorize("@ss.hasPermi('rechargecard:keeper:export')") + @PostMapping("/export") + public void export(HttpServletResponse response, NgInformationVillageKeeper ngInformationVillageKeeper) + { + List list = ngInformationVillageKeeperService.selectNgInformationVillageKeeperList(ngInformationVillageKeeper); + ExcelUtil util = new ExcelUtil(NgInformationVillageKeeper.class); + util.exportExcel(response, list, "村官员信息数据"); + } + + /** + * 获取村官员信息详细信息 + */ + @PreAuthorize("@ss.hasPermi('rechargecard:keeper:query')") + @GetMapping(value = "/{villageKeeperId}") + @ApiOperation("获取村官员信息详细信息") + public AjaxResult getInfo(@PathVariable("villageKeeperId") Long villageKeeperId) + { + return success(ngInformationVillageKeeperService.selectNgInformationVillageKeeperByVillageKeeperId(villageKeeperId)); + } + + /** + * 新增村官员信息 + */ + @PreAuthorize("@ss.hasPermi('rechargecard:keeper:add')") + @PostMapping + @ApiOperation("新增村官员信息") + public AjaxResult add(@RequestBody NgInformationVillageKeeper ngInformationVillageKeeper) + { + return toAjax(ngInformationVillageKeeperService.insertNgInformationVillageKeeper(ngInformationVillageKeeper)); + } + + /** + * 修改村官员信息 + */ + @PreAuthorize("@ss.hasPermi('rechargecard:keeper:edit')") + @PutMapping + @ApiOperation("修改村官员信息") + public AjaxResult edit(@RequestBody NgInformationVillageKeeper ngInformationVillageKeeper) + { + return toAjax(ngInformationVillageKeeperService.updateNgInformationVillageKeeper(ngInformationVillageKeeper)); + } + + /** + * 删除村官员信息 + */ + @PreAuthorize("@ss.hasPermi('rechargecard:keeper:remove')") + @DeleteMapping("/{villageKeeperIds}") + @ApiOperation("删除村官员信息") + public AjaxResult remove(@PathVariable Long[] villageKeeperIds) + { + return toAjax(ngInformationVillageKeeperService.deleteNgInformationVillageKeeperByVillageKeeperIds(villageKeeperIds)); + } +} diff --git a/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/NgInformationVillageKeeper.java b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/NgInformationVillageKeeper.java new file mode 100644 index 0000000..4ee826d --- /dev/null +++ b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/domain/NgInformationVillageKeeper.java @@ -0,0 +1,88 @@ +package com.fastbee.rechargecard.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.fastbee.common.annotation.Excel; +import com.fastbee.common.core.domain.BaseEntity; + +/** + * 村官员信息对象 ng_Information_village_keeper + * + * @author kerwincui + * @date 2024-12-19 + */ +@ApiModel(value = "NgInformationVillageKeeper",description = "村官员信息 ng_Information_village_keeper") +@Data +@EqualsAndHashCode(callSuper = true) +public class NgInformationVillageKeeper extends BaseEntity + { +private static final long serialVersionUID = 1L; + + /** 主键 */ + @Excel(name = "主键") + @ApiModelProperty("主键") + private Long villageKeeperId; + + /** 村官员编号 */ + @Excel(name = "村官员编号") + @ApiModelProperty("村官员编号") + private String officialId; + + /** 姓名 */ + @Excel(name = "姓名") + @ApiModelProperty("姓名") + private String name; + + /** 职位 */ + @Excel(name = "职位") + @ApiModelProperty("职位") + private String position; + + /** 所属区域 */ + @Excel(name = "所属区域") + @ApiModelProperty("所属区域") + private String belongingRegion; + + /** 性别 */ + @Excel(name = "性别") + @ApiModelProperty("性别") + private String gender; + + /** 年龄 */ + @Excel(name = "年龄") + @ApiModelProperty("年龄") + private Long age; + + /** 党派 */ + @Excel(name = "党派") + @ApiModelProperty("党派") + private String partyMembership; + + /** 联系方式 */ + @Excel(name = "联系方式") + @ApiModelProperty("联系方式") + private String contactInformation; + + /** 任职日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "任职日期", width = 30, dateFormat = "yyyy-MM-dd") + @ApiModelProperty("任职日期") + private Date appointmentDate; + + /** 教育背景 */ + @Excel(name = "教育背景") + @ApiModelProperty("教育背景") + private String educationBackground; + + /** 工作经历 */ + @Excel(name = "工作经历") + @ApiModelProperty("工作经历") + private String workExperience; + +} diff --git a/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/mapper/NgInformationVillageKeeperMapper.java b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/mapper/NgInformationVillageKeeperMapper.java new file mode 100644 index 0000000..631e30d --- /dev/null +++ b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/mapper/NgInformationVillageKeeperMapper.java @@ -0,0 +1,63 @@ +package com.fastbee.rechargecard.mapper; + +import java.util.List; +import com.fastbee.rechargecard.domain.NgInformationVillageKeeper; +import org.apache.ibatis.annotations.Mapper; + +/** + * 村官员信息Mapper接口 + * + * @author kerwincui + * @date 2024-12-19 + */ +@Mapper +public interface NgInformationVillageKeeperMapper +{ + /** + * 查询村官员信息 + * + * @param villageKeeperId 村官员信息主键 + * @return 村官员信息 + */ + public NgInformationVillageKeeper selectNgInformationVillageKeeperByVillageKeeperId(Long villageKeeperId); + + /** + * 查询村官员信息列表 + * + * @param ngInformationVillageKeeper 村官员信息 + * @return 村官员信息集合 + */ + public List selectNgInformationVillageKeeperList(NgInformationVillageKeeper ngInformationVillageKeeper); + + /** + * 新增村官员信息 + * + * @param ngInformationVillageKeeper 村官员信息 + * @return 结果 + */ + public int insertNgInformationVillageKeeper(NgInformationVillageKeeper ngInformationVillageKeeper); + + /** + * 修改村官员信息 + * + * @param ngInformationVillageKeeper 村官员信息 + * @return 结果 + */ + public int updateNgInformationVillageKeeper(NgInformationVillageKeeper ngInformationVillageKeeper); + + /** + * 删除村官员信息 + * + * @param villageKeeperId 村官员信息主键 + * @return 结果 + */ + public int deleteNgInformationVillageKeeperByVillageKeeperId(Long villageKeeperId); + + /** + * 批量删除村官员信息 + * + * @param villageKeeperIds 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteNgInformationVillageKeeperByVillageKeeperIds(Long[] villageKeeperIds); +} diff --git a/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/INgInformationVillageKeeperService.java b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/INgInformationVillageKeeperService.java new file mode 100644 index 0000000..e4d39e9 --- /dev/null +++ b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/INgInformationVillageKeeperService.java @@ -0,0 +1,61 @@ +package com.fastbee.rechargecard.service; + +import java.util.List; +import com.fastbee.rechargecard.domain.NgInformationVillageKeeper; + +/** + * 村官员信息Service接口 + * + * @author kerwincui + * @date 2024-12-19 + */ +public interface INgInformationVillageKeeperService +{ + /** + * 查询村官员信息 + * + * @param villageKeeperId 村官员信息主键 + * @return 村官员信息 + */ + public NgInformationVillageKeeper selectNgInformationVillageKeeperByVillageKeeperId(Long villageKeeperId); + + /** + * 查询村官员信息列表 + * + * @param ngInformationVillageKeeper 村官员信息 + * @return 村官员信息集合 + */ + public List selectNgInformationVillageKeeperList(NgInformationVillageKeeper ngInformationVillageKeeper); + + /** + * 新增村官员信息 + * + * @param ngInformationVillageKeeper 村官员信息 + * @return 结果 + */ + public int insertNgInformationVillageKeeper(NgInformationVillageKeeper ngInformationVillageKeeper); + + /** + * 修改村官员信息 + * + * @param ngInformationVillageKeeper 村官员信息 + * @return 结果 + */ + public int updateNgInformationVillageKeeper(NgInformationVillageKeeper ngInformationVillageKeeper); + + /** + * 批量删除村官员信息 + * + * @param villageKeeperIds 需要删除的村官员信息主键集合 + * @return 结果 + */ + public int deleteNgInformationVillageKeeperByVillageKeeperIds(Long[] villageKeeperIds); + + /** + * 删除村官员信息信息 + * + * @param villageKeeperId 村官员信息主键 + * @return 结果 + */ + public int deleteNgInformationVillageKeeperByVillageKeeperId(Long villageKeeperId); +} diff --git a/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/impl/NgInformationVillageKeeperServiceImpl.java b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/impl/NgInformationVillageKeeperServiceImpl.java new file mode 100644 index 0000000..271d86a --- /dev/null +++ b/fastbee-service/fastbee-rechargecard-service/src/main/java/com/fastbee/rechargecard/service/impl/NgInformationVillageKeeperServiceImpl.java @@ -0,0 +1,96 @@ +package com.fastbee.rechargecard.service.impl; + +import java.util.List; +import com.fastbee.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.fastbee.rechargecard.mapper.NgInformationVillageKeeperMapper; +import com.fastbee.rechargecard.domain.NgInformationVillageKeeper; +import com.fastbee.rechargecard.service.INgInformationVillageKeeperService; + +/** + * 村官员信息Service业务层处理 + * + * @author kerwincui + * @date 2024-12-19 + */ +@Service +public class NgInformationVillageKeeperServiceImpl implements INgInformationVillageKeeperService +{ + @Autowired + private NgInformationVillageKeeperMapper ngInformationVillageKeeperMapper; + + /** + * 查询村官员信息 + * + * @param villageKeeperId 村官员信息主键 + * @return 村官员信息 + */ + @Override + public NgInformationVillageKeeper selectNgInformationVillageKeeperByVillageKeeperId(Long villageKeeperId) + { + return ngInformationVillageKeeperMapper.selectNgInformationVillageKeeperByVillageKeeperId(villageKeeperId); + } + + /** + * 查询村官员信息列表 + * + * @param ngInformationVillageKeeper 村官员信息 + * @return 村官员信息 + */ + @Override + public List selectNgInformationVillageKeeperList(NgInformationVillageKeeper ngInformationVillageKeeper) + { + return ngInformationVillageKeeperMapper.selectNgInformationVillageKeeperList(ngInformationVillageKeeper); + } + + /** + * 新增村官员信息 + * + * @param ngInformationVillageKeeper 村官员信息 + * @return 结果 + */ + @Override + public int insertNgInformationVillageKeeper(NgInformationVillageKeeper ngInformationVillageKeeper) + { + ngInformationVillageKeeper.setCreateTime(DateUtils.getNowDate()); + return ngInformationVillageKeeperMapper.insertNgInformationVillageKeeper(ngInformationVillageKeeper); + } + + /** + * 修改村官员信息 + * + * @param ngInformationVillageKeeper 村官员信息 + * @return 结果 + */ + @Override + public int updateNgInformationVillageKeeper(NgInformationVillageKeeper ngInformationVillageKeeper) + { + ngInformationVillageKeeper.setUpdateTime(DateUtils.getNowDate()); + return ngInformationVillageKeeperMapper.updateNgInformationVillageKeeper(ngInformationVillageKeeper); + } + + /** + * 批量删除村官员信息 + * + * @param villageKeeperIds 需要删除的村官员信息主键 + * @return 结果 + */ + @Override + public int deleteNgInformationVillageKeeperByVillageKeeperIds(Long[] villageKeeperIds) + { + return ngInformationVillageKeeperMapper.deleteNgInformationVillageKeeperByVillageKeeperIds(villageKeeperIds); + } + + /** + * 删除村官员信息信息 + * + * @param villageKeeperId 村官员信息主键 + * @return 结果 + */ + @Override + public int deleteNgInformationVillageKeeperByVillageKeeperId(Long villageKeeperId) + { + return ngInformationVillageKeeperMapper.deleteNgInformationVillageKeeperByVillageKeeperId(villageKeeperId); + } +} diff --git a/fastbee-service/fastbee-rechargecard-service/src/main/resources/mapper/rechargecard/NgInformationVillageKeeperMapper.xml b/fastbee-service/fastbee-rechargecard-service/src/main/resources/mapper/rechargecard/NgInformationVillageKeeperMapper.xml new file mode 100644 index 0000000..99e880a --- /dev/null +++ b/fastbee-service/fastbee-rechargecard-service/src/main/resources/mapper/rechargecard/NgInformationVillageKeeperMapper.xml @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + select village_keeper_id, official_id, name, position, belonging_region, gender, age, party_membership, contact_information, appointment_date, education_background, work_experience, remark, create_time, update_time, create_by, update_by from ng_Information_village_keeper + + + + + + + + insert into ng_Information_village_keeper + + village_keeper_id, + official_id, + name, + position, + belonging_region, + gender, + age, + party_membership, + contact_information, + appointment_date, + education_background, + work_experience, + remark, + create_time, + update_time, + create_by, + update_by, + + + #{villageKeeperId}, + #{officialId}, + #{name}, + #{position}, + #{belongingRegion}, + #{gender}, + #{age}, + #{partyMembership}, + #{contactInformation}, + #{appointmentDate}, + #{educationBackground}, + #{workExperience}, + #{remark}, + #{createTime}, + #{updateTime}, + #{createBy}, + #{updateBy}, + + + + + update ng_Information_village_keeper + + official_id = #{officialId}, + name = #{name}, + position = #{position}, + belonging_region = #{belongingRegion}, + gender = #{gender}, + age = #{age}, + party_membership = #{partyMembership}, + contact_information = #{contactInformation}, + appointment_date = #{appointmentDate}, + education_background = #{educationBackground}, + work_experience = #{workExperience}, + remark = #{remark}, + create_time = #{createTime}, + update_time = #{updateTime}, + create_by = #{createBy}, + update_by = #{updateBy}, + + where village_keeper_id = #{villageKeeperId} + + + + delete from ng_Information_village_keeper where village_keeper_id = #{villageKeeperId} + + + + delete from ng_Information_village_keeper where village_keeper_id in + + #{villageKeeperId} + + + \ No newline at end of file