1
This commit is contained in:
parent
24a670e9e7
commit
fbd33edd18
@ -1,50 +1,51 @@
|
||||
package com.ruoyi.member.controller;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
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.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.member.domain.MemberApply;
|
||||
import com.ruoyi.member.service.IMemberApplyService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.member.vo.MemberApplyVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 通告主认证申请Controller
|
||||
*
|
||||
*
|
||||
* @author pqz
|
||||
* @date 2025-03-17
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/member/apply")
|
||||
public class MemberApplyController extends BaseController
|
||||
{
|
||||
public class MemberApplyController extends BaseController {
|
||||
@Autowired
|
||||
private IMemberApplyService memberApplyService;
|
||||
|
||||
/**
|
||||
* 查询通告主认证申请列表
|
||||
*/
|
||||
* 通告主认证申请列表查询
|
||||
*
|
||||
* @param memberApply {@link MemberApplyVO}
|
||||
* @param pageNum 分页参数
|
||||
* @param pageSize 分页参数
|
||||
* @return com.ruoyi.common.core.domain.AjaxResult
|
||||
* @author PQZ
|
||||
* @date 9:50 2025/3/18
|
||||
**/
|
||||
@PreAuthorize("@ss.hasPermi('member:apply:list')")
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list(MemberApply memberApply)
|
||||
{
|
||||
|
||||
List<MemberApply> list = memberApplyService.list();
|
||||
public AjaxResult list(MemberApplyVO memberApply,
|
||||
@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||
Page<MemberApply> page = new Page<>(pageNum, pageSize);
|
||||
IPage<MemberApplyVO> list = memberApplyService.queryListPage(memberApply, page);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
@ -54,33 +55,27 @@ public class MemberApplyController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('member:apply:export')")
|
||||
@Log(title = "通告主认证申请", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, MemberApply memberApply)
|
||||
{
|
||||
public void export(HttpServletResponse response, MemberApply memberApply) {
|
||||
List<MemberApply> list = memberApplyService.list();
|
||||
ExcelUtil<MemberApply> util = new ExcelUtil<MemberApply>(MemberApply.class);
|
||||
util.exportExcel(response, list, "通告主认证申请数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取通告主认证申请详细信息
|
||||
*/
|
||||
* 获取通告主认证详细信息
|
||||
*
|
||||
* @param id 通告主认证表id
|
||||
* @return com.ruoyi.common.core.domain.AjaxResult
|
||||
* @author PQZ
|
||||
* @date 9:57 2025/3/18
|
||||
**/
|
||||
@PreAuthorize("@ss.hasPermi('member:apply:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
public AjaxResult getInfo(@PathVariable("id") String id) {
|
||||
return success(memberApplyService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增通告主认证申请
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('member:apply:add')")
|
||||
@Log(title = "通告主认证申请", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody MemberApply memberApply)
|
||||
{
|
||||
return toAjax(memberApplyService.save(memberApply));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改通告主认证申请
|
||||
@ -88,20 +83,8 @@ public class MemberApplyController extends BaseController
|
||||
@PreAuthorize("@ss.hasPermi('member:apply:edit')")
|
||||
@Log(title = "通告主认证申请", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody MemberApply memberApply)
|
||||
{
|
||||
public AjaxResult edit(@RequestBody MemberApply memberApply) {
|
||||
return toAjax(memberApplyService.updateById(memberApply));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除通告主认证申请
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('member:apply:remove')")
|
||||
@Log(title = "通告主认证申请", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
List<String> list = new ArrayList<>(Arrays.asList(ids));
|
||||
return toAjax(memberApplyService.removeByIds(list));
|
||||
}
|
||||
}
|
||||
|
@ -1,18 +1,32 @@
|
||||
package com.ruoyi.member.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.member.domain.MemberApply;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.member.domain.MemberApply;
|
||||
import com.ruoyi.member.vo.MemberApplyVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 通告主认证申请Mapper接口
|
||||
*
|
||||
*
|
||||
* @author pqz
|
||||
* @date 2025-03-17
|
||||
*/
|
||||
@Mapper
|
||||
public interface MemberApplyMapper extends BaseMapper<MemberApply>
|
||||
{
|
||||
public interface MemberApplyMapper extends BaseMapper<MemberApply> {
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询认证信息
|
||||
*
|
||||
* @param entity {@link MemberApplyVO}
|
||||
* @param page 分页参数
|
||||
* @return com.baomidou.mybatisplus.core.metadata.IPage<com.ruoyi.member.vo.MemberApplyVO>
|
||||
* @author PQZ
|
||||
* @date 9:54 2025/3/18
|
||||
**/
|
||||
IPage<MemberApplyVO> queryListPage(@Param("entity") MemberApplyVO entity, Page<MemberApply> page);
|
||||
|
||||
}
|
||||
|
@ -1,16 +1,27 @@
|
||||
package com.ruoyi.member.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ruoyi.member.domain.MemberApply;
|
||||
import com.ruoyi.member.vo.MemberApplyVO;
|
||||
|
||||
/**
|
||||
* 通告主认证申请Service接口
|
||||
*
|
||||
*
|
||||
* @author pqz
|
||||
* @date 2025-03-17
|
||||
*/
|
||||
public interface IMemberApplyService extends IService<MemberApply>
|
||||
{
|
||||
public interface IMemberApplyService extends IService<MemberApply> {
|
||||
|
||||
/**
|
||||
* 通告主认证申请列表查询
|
||||
*
|
||||
* @param memberApply {@link MemberApplyVO}
|
||||
* @param page 分页参数
|
||||
* @return com.baomidou.mybatisplus.core.metadata.IPage<com.ruoyi.member.domain.MemberApply>
|
||||
* @author PQZ
|
||||
* @date 9:53 2025/3/18
|
||||
**/
|
||||
IPage<MemberApplyVO> queryListPage(MemberApplyVO memberApply, Page<MemberApply> page);
|
||||
}
|
||||
|
@ -1,7 +1,11 @@
|
||||
package com.ruoyi.member.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.member.vo.MemberApplyVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@ -22,4 +26,17 @@ public class MemberApplyServiceImpl extends ServiceImpl<MemberApplyMapper,Member
|
||||
private MemberApplyMapper memberApplyMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 通告主认证申请列表查询
|
||||
*
|
||||
* @param memberApply {@link MemberApplyVO}
|
||||
* @param page 分页参数
|
||||
* @return com.baomidou.mybatisplus.core.metadata.IPage<com.ruoyi.member.domain.MemberApply>
|
||||
* @author PQZ
|
||||
* @date 9:53 2025/3/18
|
||||
**/
|
||||
@Override
|
||||
public IPage<MemberApplyVO> queryListPage(MemberApplyVO memberApply, Page<MemberApply> page) {
|
||||
return memberApplyMapper.queryListPage(memberApply,page);
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,14 @@
|
||||
package com.ruoyi.member.vo;
|
||||
|
||||
import com.ruoyi.member.domain.MemberApply;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class MemberApplyVO extends MemberApply {
|
||||
/**申请时间段起*/
|
||||
Date startTime;
|
||||
/**申请时间段止*/
|
||||
Date endTime;
|
||||
}
|
@ -26,6 +26,17 @@
|
||||
<sql id="selectMemberApplyVo">
|
||||
select id, user_id, nickname, identity_type, content, remark, images, approval_status, approval_user_id, approval_time, approval_remark, creator, create_time, updater, update_time, del_flag from dl_member_apply
|
||||
</sql>
|
||||
<select id="queryListPage" parameterType="MemberApply" resultMap="MemberApplyResult">
|
||||
<include refid="selectMemberApplyVo"/>
|
||||
<where>
|
||||
del_flag=0
|
||||
<if test="entity.nickname != null and entity.nickname != ''"> and nickname like concat('%', #{entity.nickname}, '%')</if>
|
||||
<if test="entity.identityType != null and entity.identityType != ''"> and identity_type = #{entity.identityType}</if>
|
||||
<if test="entity.approvalStatus != null and entity.approvalStatus != ''"> and approval_status = #{entity.approvalStatus}</if>
|
||||
<if test="entity.approvalTime != null "> and approval_time = #{entity.approvalTime}</if>
|
||||
<if test="entity.startTime != null and entity.endTime != null"> and create_time between #{entity.startTime} and #{entity.endTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue
Block a user