fix:申请表

dev
wangxy 1 year ago
parent 2846bcdbb1
commit fe82bfde7b

@ -0,0 +1,53 @@
package com.hyp.web.controller.manager;
import cn.hutool.core.convert.Convert;
import com.hyp.common.core.domain.model.LoginUser;
import com.hyp.common.utils.SecurityUtils;
import com.hyp.system.domain.RewApplyInfoList;
import com.hyp.system.domain.dto.ApplyInfoListDTO;
import com.hyp.system.domain.vo.ApplyInfoListVO;
import com.hyp.system.service.RewApplyInfoListService;
import com.hyp.system.service.RewScoreInfoService;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.List;
/**
* packageName com.hyp.web.controller.manager
*
* @author wangxy
* @version JDK 8
* @className RewApplyInfoListManager
* @date 2024/4/11
* @description
*/
@Component
public class ApplyInfoListManager {
@Resource
private RewApplyInfoListService applyInfoListService;
@Resource
private RewScoreInfoService scoreInfoService;
public List<ApplyInfoListVO> selectApplyInfoList(ApplyInfoListDTO applyInfoListDTO){
return applyInfoListService.selectApplyInfoList(applyInfoListDTO);
}
public ApplyInfoListVO getApplyId(String applyType){
LoginUser loginUser = SecurityUtils.getLoginUser();
RewApplyInfoList applyInfoList = new RewApplyInfoList();
applyInfoList.setApplyType(applyType);
applyInfoList.setApplyStatus(0);
applyInfoList.setCreateId(loginUser.getUserId());
applyInfoListService.save(applyInfoList);
return Convert.convert(ApplyInfoListVO.class, applyInfoList);
}
}

@ -1,17 +1,17 @@
package com.hyp.web.controller.reward;
import com.hyp.common.core.controller.BaseController;
import com.hyp.common.core.domain.entity.SysUser;
import com.hyp.common.core.domain.AjaxResult;
import com.hyp.common.core.page.TableDataInfo;
import com.hyp.system.domain.SysNotice;
import com.hyp.system.domain.dto.ApplyInfoListDTO;
import com.hyp.system.domain.vo.ApplyInfoListVO;
import com.hyp.web.controller.manager.ApplyInfoListManager;
import com.hyp.web.controller.manager.SysNoticeManager;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
@ -29,16 +29,35 @@ import java.util.List;
public class ApplyController extends BaseController {
@Autowired
@Resource
private SysNoticeManager sysNoticeManager;
@Resource
private ApplyInfoListManager applyInfoListManager;
@PreAuthorize("@ss.hasPermi('reward:apply:list')")
@GetMapping("/list")
public TableDataInfo list(SysNotice notice) {
public TableDataInfo list(ApplyInfoListDTO applyInfoListDTO) {
startPage();
List<SysNotice> list = sysNoticeManager.selectNoticeList(notice);
List<ApplyInfoListVO> list = applyInfoListManager.selectApplyInfoList(applyInfoListDTO);
return getDataTable(list);
}
/**
* applyId
*/
@PreAuthorize("@ss.hasPermi('reward:apply:add')")
@GetMapping(value = "/getApplyId")
public AjaxResult getApplyId(@RequestParam String applyType)
{
return success(applyInfoListManager.getApplyId(applyType));
}
}

@ -0,0 +1,72 @@
package com.hyp.system.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.util.Date;
import com.hyp.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
*
* @author wangxy
* @TableName rew_apply_info_list
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class RewApplyInfoList extends BaseEntity {
/**
*
*/
@TableId(type = IdType.ASSIGN_UUID)
private String applyId;
/**
*
*/
private String applyName;
/**
*
*/
private String applyType;
/**
*
*/
private Integer isReward;
/**
* 0 123退
*/
private Integer applyStatus;
/**
*
*/
private Date appTime;
/**
* 退
*/
private String applyMsg;
/**
*
*/
private Date authTime;
/**
* id
*/
private Long createId;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
}

@ -0,0 +1,57 @@
package com.hyp.system.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
*
* @TableName rew_file_relation
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class RewFileRelation implements Serializable {
/**
*
*/
@TableId(type = IdType.ASSIGN_UUID)
private String id;
/**
* id
*/
private String applyId;
/**
*
*/
private String fileName;
/**
*
*/
private String fileCode;
/**
*
*/
private String filePath;
/**
*
*/
private String realName;
/**
* 12
*/
private Integer fileState;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
}

@ -0,0 +1,49 @@
package com.hyp.system.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import com.hyp.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
*
* @author wangxy
* @TableName rew_score_info
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class RewScoreInfo extends BaseEntity {
/**
*
*/
@TableId(type = IdType.ASSIGN_UUID)
private String id;
/**
*
*/
private String score;
/**
* id
*/
private String applyId;
/**
* id
*/
private Long createId;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
}

@ -0,0 +1,43 @@
package com.hyp.system.domain.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.hyp.common.core.domain.BaseEntity;
import lombok.Data;
/**
*
* @author wangxy
* @TableName rew_apply_info_list
*/
@Data
public class ApplyInfoListDTO extends BaseEntity {
@TableField(exist = false)
private static final long serialVersionUID = 1L;
/**
*
*/
private String applyName;
/**
*
*/
private String applyType;
/**
* 0 123退
*/
private Integer applyStatus;
/**
* id
*/
private String createId;
}

@ -0,0 +1,72 @@
package com.hyp.system.domain.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.hyp.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.Date;
/**
*
* @author wangxy
* @TableName rew_apply_info_list
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class ApplyInfoListVO extends BaseEntity {
@TableField(exist = false)
private static final long serialVersionUID = 1L;
/**
*
*/
private String applyId;
/**
*
*/
private String applyName;
/**
*
*/
private String applyType;
/**
*
*/
private Integer isReward;
/**
* 0 123退
*/
private Integer applyStatus;
/**
*
*/
private Date appTime;
/**
* 退
*/
private String applyMsg;
/**
*
*/
private Date authTime;
/**
* id
*/
private String createId;
}

@ -0,0 +1,34 @@
package com.hyp.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hyp.system.domain.RewApplyInfoList;
import com.hyp.system.domain.dto.ApplyInfoListDTO;
import com.hyp.system.domain.vo.ApplyInfoListVO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* @author wangxy
* @description rew_apply_info_list()Mapper
* @createDate 2024-04-11 09:11:34
* @Entity generator.domain.RewApplyInfoList
*/
@Mapper
public interface RewApplyInfoListMapper extends BaseMapper<RewApplyInfoList> {
/**
*
*
* @param applyInfoListDTO
* @return java.util.List<com.hyp.system.domain.vo.ApplyInfoListVO>
*/
List<ApplyInfoListVO> selectApplyInfoList(ApplyInfoListDTO applyInfoListDTO);
}

@ -0,0 +1,19 @@
package com.hyp.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hyp.system.domain.RewFileRelation;
/**
* @author 13560
* @description rew_file_relation()Mapper
* @createDate 2024-04-11 09:17:57
* @Entity generator.domain.RewFileRelation
*/
public interface RewFileRelationMapper extends BaseMapper<RewFileRelation> {
}

@ -0,0 +1,19 @@
package com.hyp.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hyp.system.domain.RewScoreInfo;
/**
* @author wangxy
* @description rew_score_info()Mapper
* @createDate 2024-04-11 09:20:53
* @Entity generator.domain.RewScoreInfo
*/
public interface RewScoreInfoMapper extends BaseMapper<RewScoreInfo> {
}

@ -4,12 +4,14 @@ import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hyp.system.domain.SysNotice;
import org.apache.ibatis.annotations.Mapper;
/**
*
*
* @author ruoyi
*/
@Mapper
public interface SysNoticeMapper extends BaseMapper<SysNotice>
{
/**

@ -0,0 +1,27 @@
package com.hyp.system.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hyp.system.domain.RewApplyInfoList;
import com.hyp.system.domain.dto.ApplyInfoListDTO;
import com.hyp.system.domain.vo.ApplyInfoListVO;
import java.util.List;
/**
* @author wangxy
* @description rew_apply_info_list()Service
* @createDate 2024-04-11 09:11:34
*/
public interface RewApplyInfoListService extends IService<RewApplyInfoList> {
/**
*
*
* @param applyInfoListDTO
* @return java.util.List<com.hyp.system.domain.vo.ApplyInfoListVO>
*/
List<ApplyInfoListVO> selectApplyInfoList(ApplyInfoListDTO applyInfoListDTO);
}

@ -0,0 +1,14 @@
package com.hyp.system.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hyp.system.domain.RewFileRelation;
/**
* @author wangxy
* @description rew_file_relation()Service
* @createDate 2024-04-11 09:17:57
*/
public interface RewFileRelationService extends IService<RewFileRelation> {
}

@ -0,0 +1,14 @@
package com.hyp.system.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hyp.system.domain.RewScoreInfo;
/**
* @author wangxy
* @description rew_score_info()Service
* @createDate 2024-04-11 09:20:53
*/
public interface RewScoreInfoService extends IService<RewScoreInfo> {
}

@ -0,0 +1,44 @@
package com.hyp.system.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hyp.system.domain.RewApplyInfoList;
import com.hyp.system.domain.dto.ApplyInfoListDTO;
import com.hyp.system.domain.vo.ApplyInfoListVO;
import com.hyp.system.mapper.RewApplyInfoListMapper;
import com.hyp.system.service.RewApplyInfoListService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
* @author wangxy
* @description rew_apply_info_list()Service
* @createDate 2024-04-11 09:11:34
*/
@Service
public class RewApplyInfoListServiceImpl extends ServiceImpl<RewApplyInfoListMapper, RewApplyInfoList>
implements RewApplyInfoListService {
@Resource
private RewApplyInfoListMapper applyInfoListMapper;
/**
*
*
* @param applyInfoListDTO
* @return java.util.List<com.hyp.system.domain.vo.ApplyInfoListVO>
*/
@Override
public List<ApplyInfoListVO> selectApplyInfoList(ApplyInfoListDTO applyInfoListDTO)
{
return applyInfoListMapper.selectApplyInfoList(applyInfoListDTO);
}
}

@ -0,0 +1,22 @@
package com.hyp.system.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hyp.system.domain.RewFileRelation;
import com.hyp.system.mapper.RewFileRelationMapper;
import com.hyp.system.service.RewFileRelationService;
import org.springframework.stereotype.Service;
/**
* @author wangxy
* @description rew_file_relation()Service
* @createDate 2024-04-11 09:17:57
*/
@Service
public class RewFileRelationServiceImpl extends ServiceImpl<RewFileRelationMapper, RewFileRelation>
implements RewFileRelationService {
}

@ -0,0 +1,22 @@
package com.hyp.system.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hyp.system.domain.RewScoreInfo;
import com.hyp.system.mapper.RewScoreInfoMapper;
import com.hyp.system.service.RewScoreInfoService;
import org.springframework.stereotype.Service;
/**
* @author wangxy
* @description rew_score_info()Service
* @createDate 2024-04-11 09:20:53
*/
@Service
public class RewScoreInfoServiceImpl extends ServiceImpl<RewScoreInfoMapper, RewScoreInfo>
implements RewScoreInfoService {
}

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hyp.system.mapper.RewApplyInfoListMapper">
<resultMap id="BaseResultMap" type="com.hyp.system.domain.RewApplyInfoList">
<id property="applyId" column="apply_id" jdbcType="VARCHAR"/>
<result property="applyName" column="apply_name" jdbcType="VARCHAR"/>
<result property="applyType" column="apply_type" jdbcType="VARCHAR"/>
<result property="isReward" column="is_reward" jdbcType="INTEGER"/>
<result property="applyStatus" column="apply_status" jdbcType="INTEGER"/>
<result property="appTime" column="app_time" jdbcType="TIMESTAMP"/>
<result property="applyMsg" column="apply_msg" jdbcType="VARCHAR"/>
<result property="authTime" column="auth_time" jdbcType="TIMESTAMP"/>
<result property="createId" column="create_id" jdbcType="INTEGER"/>
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
<result property="remark" column="remark" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
apply_id,apply_name,apply_type,
is_reward,apply_status,app_time,
apply_msg,auth_time,create_id,
create_by,create_time,update_by,
update_time,remark
</sql>
<select id="selectApplyInfoList" parameterType="com.hyp.system.domain.dto.ApplyInfoListDTO" resultType="com.hyp.system.domain.vo.ApplyInfoListVO">
select <include refid="Base_Column_List"/>
from rew_apply_info_list t
<trim prefix="where" prefixOverrides="and|or">
<if test="applyName != null and applyName != ''">
and t.apply_name like concat('%',#{applyName},'%')
</if>
<if test="applyType != null and applyType != ''">
and t.apply_type = #{applyType}
</if>
<if test="createId != null">
and t.create_id = #{createId}
</if>
<if test="createBy != null and createBy != ''">
and t.create_by like concat('%',#{createBy},'%')
</if>
<if test="applyStatus != null">
and t.apply_status = #{applyStatus,jdbcType=INTEGER}
</if>
</trim>
order by t.update_time desc
</select>
</mapper>

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hyp.system.mapper.RewFileRelationMapper">
<resultMap id="BaseResultMap" type="com.hyp.system.domain.RewFileRelation">
<id property="id" column="id" jdbcType="VARCHAR"/>
<result property="applyId" column="apply_id" jdbcType="VARCHAR"/>
<result property="fileName" column="file_name" jdbcType="VARCHAR"/>
<result property="fileCode" column="file_code" jdbcType="VARCHAR"/>
<result property="filePath" column="file_path" jdbcType="VARCHAR"/>
<result property="realName" column="real_name" jdbcType="VARCHAR"/>
<result property="fileState" column="file_state" jdbcType="INTEGER"/>
</resultMap>
<sql id="Base_Column_List">
id,apply_id,file_name,
file_code,file_path,real_name,
file_state
</sql>
</mapper>

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hyp.system.mapper.RewScoreInfoMapper">
<resultMap id="BaseResultMap" type="com.hyp.system.domain.RewScoreInfo">
<id property="id" column="id" jdbcType="VARCHAR"/>
<result property="score" column="score" jdbcType="VARCHAR"/>
<result property="applyId" column="apply_id" jdbcType="VARCHAR"/>
<result property="createId" column="create_id" jdbcType="INTEGER"/>
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
<result property="remark" column="remark" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
id,score,apply_id,
create_id,create_by,create_time,
update_by,update_time,remark
</sql>
</mapper>
Loading…
Cancel
Save