Merge branch 'master' of http://122.51.230.86:3000/dianliang/dl_admin
This commit is contained in:
commit
9deca7721a
@ -1,27 +1,21 @@
|
|||||||
package com.ruoyi.member.controller;
|
package com.ruoyi.member.controller;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import java.util.Arrays;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
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.ruoyi.common.annotation.Log;
|
import com.ruoyi.common.annotation.Log;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
import com.ruoyi.member.domain.MemberApply;
|
import com.ruoyi.member.domain.MemberApply;
|
||||||
import com.ruoyi.member.service.IMemberApplyService;
|
import com.ruoyi.member.service.IMemberApplyService;
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
import com.ruoyi.member.vo.MemberApplyVO;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
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
|
* 通告主认证申请Controller
|
||||||
@ -31,20 +25,27 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/member/apply")
|
@RequestMapping("/member/apply")
|
||||||
public class MemberApplyController extends BaseController
|
public class MemberApplyController extends BaseController {
|
||||||
{
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IMemberApplyService memberApplyService;
|
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')")
|
@PreAuthorize("@ss.hasPermi('member:apply:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public AjaxResult list(MemberApply memberApply)
|
public AjaxResult list(MemberApplyVO memberApply,
|
||||||
{
|
@RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
|
||||||
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||||
List<MemberApply> list = memberApplyService.list();
|
Page<MemberApply> page = new Page<>(pageNum, pageSize);
|
||||||
|
IPage<MemberApplyVO> list = memberApplyService.queryListPage(memberApply, page);
|
||||||
return success(list);
|
return success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,54 +55,41 @@ public class MemberApplyController extends BaseController
|
|||||||
@PreAuthorize("@ss.hasPermi('member:apply:export')")
|
@PreAuthorize("@ss.hasPermi('member:apply:export')")
|
||||||
@Log(title = "通告主认证申请", businessType = BusinessType.EXPORT)
|
@Log(title = "通告主认证申请", businessType = BusinessType.EXPORT)
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, MemberApply memberApply)
|
public void export(HttpServletResponse response, MemberApply memberApply) {
|
||||||
{
|
|
||||||
List<MemberApply> list = memberApplyService.list();
|
List<MemberApply> list = memberApplyService.list();
|
||||||
ExcelUtil<MemberApply> util = new ExcelUtil<MemberApply>(MemberApply.class);
|
ExcelUtil<MemberApply> util = new ExcelUtil<MemberApply>(MemberApply.class);
|
||||||
util.exportExcel(response, list, "通告主认证申请数据");
|
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')")
|
@PreAuthorize("@ss.hasPermi('member:apply:query')")
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
public AjaxResult getInfo(@PathVariable("id") String id) {
|
||||||
{
|
|
||||||
return success(memberApplyService.getById(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));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改通告主认证申请
|
* 审核通告主信息
|
||||||
*/
|
*
|
||||||
|
* @param memberApply {@link MemberApplyVO}
|
||||||
|
* @return com.ruoyi.common.core.domain.AjaxResult
|
||||||
|
* @author PQZ
|
||||||
|
* @date 11:47 2025/3/18
|
||||||
|
**/
|
||||||
@PreAuthorize("@ss.hasPermi('member:apply:edit')")
|
@PreAuthorize("@ss.hasPermi('member:apply:edit')")
|
||||||
@Log(title = "通告主认证申请", businessType = BusinessType.UPDATE)
|
@Log(title = "通告主认证申请", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody MemberApply memberApply)
|
public AjaxResult edit(@RequestBody MemberApplyVO memberApply) {
|
||||||
{
|
memberApplyService.checkMemberApply(memberApply);
|
||||||
return toAjax(memberApplyService.updateById(memberApply));
|
return toAjax(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除通告主认证申请
|
|
||||||
*/
|
|
||||||
@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,9 +1,12 @@
|
|||||||
package com.ruoyi.member.mapper;
|
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.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.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通告主认证申请Mapper接口
|
* 通告主认证申请Mapper接口
|
||||||
@ -12,7 +15,18 @@ import org.apache.ibatis.annotations.Mapper;
|
|||||||
* @date 2025-03-17
|
* @date 2025-03-17
|
||||||
*/
|
*/
|
||||||
@Mapper
|
@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,8 +1,10 @@
|
|||||||
package com.ruoyi.member.service;
|
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.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.ruoyi.member.domain.MemberApply;
|
import com.ruoyi.member.domain.MemberApply;
|
||||||
|
import com.ruoyi.member.vo.MemberApplyVO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通告主认证申请Service接口
|
* 通告主认证申请Service接口
|
||||||
@ -10,7 +12,25 @@ import com.ruoyi.member.domain.MemberApply;
|
|||||||
* @author pqz
|
* @author pqz
|
||||||
* @date 2025-03-17
|
* @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);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核通告主
|
||||||
|
*
|
||||||
|
* @param memberApply {@link MemberApplyVO}
|
||||||
|
* @author PQZ
|
||||||
|
* @date 11:50 2025/3/18
|
||||||
|
**/
|
||||||
|
void checkMemberApply(MemberApplyVO memberApply);
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,13 @@
|
|||||||
package com.ruoyi.member.service.impl;
|
package com.ruoyi.member.service.impl;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
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.common.utils.DateUtils;
|
||||||
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
|
import com.ruoyi.member.vo.MemberApplyVO;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
@ -22,4 +28,36 @@ public class MemberApplyServiceImpl extends ServiceImpl<MemberApplyMapper,Member
|
|||||||
private MemberApplyMapper memberApplyMapper;
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核通告主
|
||||||
|
*
|
||||||
|
* @param memberApply {@link MemberApplyVO}
|
||||||
|
* @author PQZ
|
||||||
|
* @date 11:50 2025/3/18
|
||||||
|
**/
|
||||||
|
@Override
|
||||||
|
public void checkMemberApply(MemberApplyVO memberApply) {
|
||||||
|
//获取当前登录用户id
|
||||||
|
Long userId = SecurityUtils.getUserId();
|
||||||
|
//当前时间
|
||||||
|
Date nowDate = new Date();
|
||||||
|
memberApply.setApprovalUserId(userId);
|
||||||
|
memberApply.setApprovalTime(nowDate);
|
||||||
|
updateById(memberApply);
|
||||||
|
//// TODO: 2025/3/18 审核成功之后更新会员表状态
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -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,19 @@
|
|||||||
<sql id="selectMemberApplyVo">
|
<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
|
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>
|
</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.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>
|
||||||
|
<if test="entity.approvalStatus == 10"> and approval_status != 0</if>
|
||||||
|
<if test="entity.approvalStatus != null and entity.approvalStatus != '' and entity.approvalStatus != 10"> and approval_status = #{entity.approvalStatus}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
@ -4,15 +4,11 @@ import com.baomidou.mybatisplus.annotation.FieldFill;
|
|||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.apache.ibatis.type.JdbcType;
|
import org.apache.ibatis.type.JdbcType;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Entity基类--点亮
|
* Entity基类--点亮
|
||||||
|
Loading…
Reference in New Issue
Block a user