| @@ -0,0 +1,42 @@ | |||||
| package com.iformall.controller.market; | |||||
| import com.github.pagehelper.PageInfo; | |||||
| import com.iformall.common.ResultData; | |||||
| import com.iformall.controller.base.BaseController; | |||||
| import com.iformall.domain.po.WxUserResume; | |||||
| import com.iformall.domain.po.base.BaseEntity; | |||||
| import com.iformall.service.WxUserResumeService; | |||||
| import io.swagger.annotations.Api; | |||||
| import io.swagger.annotations.ApiImplicitParam; | |||||
| import io.swagger.annotations.ApiImplicitParams; | |||||
| import io.swagger.annotations.ApiOperation; | |||||
| import org.slf4j.Logger; | |||||
| import org.slf4j.LoggerFactory; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.web.bind.annotation.*; | |||||
| @RestController | |||||
| @RequestMapping("resume") | |||||
| @Api(description = "简历接口") | |||||
| public class WxUserResumeController extends BaseController { | |||||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||||
| @Autowired | |||||
| private WxUserResumeService wxUserResumeService; | |||||
| @ApiOperation("分页列表接口") | |||||
| @GetMapping("list") | |||||
| @ApiImplicitParams({ | |||||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||||
| public ResultData list(@ModelAttribute WxUserResume record, Integer pageNum, Integer pageSize) { | |||||
| if (null == record) record = new WxUserResume(); | |||||
| record.updateTenantInfo(getTenantInfo()); | |||||
| record.setSortColumns(BaseEntity.SortField.Id_DESC); | |||||
| final PageInfo<WxUserResume> page = wxUserResumeService.listAsPage(record, pageNum, pageSize); | |||||
| return new ResultData(page); | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,56 @@ | |||||
| package com.iformall.controller; | |||||
| import com.alibaba.fastjson.JSONArray; | |||||
| import com.iformall.common.ErrorCode; | |||||
| import com.iformall.common.Result; | |||||
| import com.iformall.common.ResultData; | |||||
| import com.iformall.domain.po.SysConfig; | |||||
| import com.iformall.domain.po.WxActivityJoin; | |||||
| import com.iformall.domain.po.WxCUserBasicInfo; | |||||
| import com.iformall.domain.po.WxUserResume; | |||||
| import com.iformall.domain.vo.WxActivityJoinQuestionAnswer; | |||||
| import com.iformall.exception.MallinkException; | |||||
| import com.iformall.service.SysConfigService; | |||||
| import com.iformall.service.WxUserResumeService; | |||||
| import io.swagger.annotations.ApiImplicitParam; | |||||
| import io.swagger.annotations.ApiImplicitParams; | |||||
| import io.swagger.annotations.ApiOperation; | |||||
| import java.util.List; | |||||
| import java.util.stream.Collectors; | |||||
| import org.apache.commons.lang3.StringUtils; | |||||
| import org.slf4j.Logger; | |||||
| import org.slf4j.LoggerFactory; | |||||
| 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.RequestBody; | |||||
| import org.springframework.web.bind.annotation.RequestMapping; | |||||
| import org.springframework.web.bind.annotation.RestController; | |||||
| /** | |||||
| * @author gongbiao | |||||
| */ | |||||
| @RestController | |||||
| @RequestMapping("api/resume") | |||||
| public class WxUserResumeController extends BaseController { | |||||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||||
| @Autowired | |||||
| private WxUserResumeService wxUserResumeService; | |||||
| @ApiOperation("提交简历") | |||||
| @PostMapping("add") | |||||
| public ResultData join(@RequestBody WxUserResume record) { | |||||
| if (record.getUserId() == null || StringUtils.isBlank(record.getUserPhone())) { | |||||
| return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "参数不能为空"); | |||||
| } | |||||
| record.updateTenantInfo(getTenantInfo()); | |||||
| return new ResultData(); | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,39 @@ | |||||
| package com.iformall.domain.po; | |||||
| import com.baomidou.mybatisplus.annotation.TableField; | |||||
| import com.baomidou.mybatisplus.annotation.TableName; | |||||
| import com.iformall.domain.po.base.TenantEntity; | |||||
| import lombok.Data; | |||||
| import lombok.EqualsAndHashCode; | |||||
| import java.util.Date; | |||||
| @TableName(value = "wx_user_resume") | |||||
| @Data | |||||
| @EqualsAndHashCode(callSuper = true) | |||||
| public class WxUserResume extends TenantEntity { | |||||
| protected Long id; | |||||
| @io.swagger.annotations.ApiModelProperty(value="",name="userId") | |||||
| private Long userId; | |||||
| @io.swagger.annotations.ApiModelProperty(value="",name="userPhone") | |||||
| private String userPhone; | |||||
| @io.swagger.annotations.ApiModelProperty(value="",name="userName") | |||||
| private String userName; | |||||
| @io.swagger.annotations.ApiModelProperty(value="",name="filePath") | |||||
| private String filePath; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "", name = "addCount") | |||||
| private String content; | |||||
| @io.swagger.annotations.ApiModelProperty(value="",name="createTime") | |||||
| private Date createTime; | |||||
| @io.swagger.annotations.ApiModelProperty(value="",name="updateTime") | |||||
| private Date updateTime; | |||||
| } | |||||
| @@ -0,0 +1,13 @@ | |||||
| package com.iformall.mapper; | |||||
| import com.iformall.common.CommonMapper; | |||||
| import com.iformall.domain.po.WxGameUserCount; | |||||
| import com.iformall.domain.po.WxUserResume; | |||||
| import java.util.List; | |||||
| public interface WxUserResumeMapper extends CommonMapper<WxUserResume, String> { | |||||
| List<WxUserResume> findList(WxUserResume wxGameUserCount); | |||||
| } | |||||
| @@ -0,0 +1,24 @@ | |||||
| package com.iformall.service; | |||||
| import com.github.pagehelper.PageInfo; | |||||
| import com.iformall.common.ResultData; | |||||
| import com.iformall.domain.po.WxGame; | |||||
| import com.iformall.domain.po.WxGameActionLog; | |||||
| import com.iformall.domain.po.WxGameUserCount; | |||||
| import com.iformall.domain.po.WxUserResume; | |||||
| import com.iformall.domain.po.base.TenantEntity; | |||||
| import com.iformall.domain.vo.WxGameUserActionLogVo; | |||||
| public interface WxUserResumeService { | |||||
| /** | |||||
| * 根据实体查询分页列表 | |||||
| * | |||||
| * @param record | |||||
| * @param pageIndex | |||||
| * @param pageSize | |||||
| * @return | |||||
| */ | |||||
| PageInfo<WxUserResume> listAsPage(WxUserResume record, Integer pageIndex, Integer pageSize); | |||||
| } | |||||
| @@ -0,0 +1,27 @@ | |||||
| package com.iformall.service.impl; | |||||
| import com.github.pagehelper.PageHelper; | |||||
| import com.github.pagehelper.PageInfo; | |||||
| import com.iformall.domain.po.WxUserResume; | |||||
| import com.iformall.mapper.WxUserResumeMapper; | |||||
| import com.iformall.service.WxUserResumeService; | |||||
| import org.slf4j.Logger; | |||||
| import org.slf4j.LoggerFactory; | |||||
| import org.springframework.beans.factory.annotation.Autowired; | |||||
| import org.springframework.stereotype.Service; | |||||
| @Service | |||||
| public class WxUserResumeServiceImpl implements WxUserResumeService { | |||||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||||
| @Autowired | |||||
| WxUserResumeMapper wxUserResumeMapper; | |||||
| @Override | |||||
| public PageInfo<WxUserResume> listAsPage(WxUserResume record, Integer pageIndex, Integer pageSize) { | |||||
| PageInfo<WxUserResume> page = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxUserResumeMapper.findList(record)); | |||||
| return page; | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,63 @@ | |||||
| <?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.iformall.mapper.WxUserResumeMapper"> | |||||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxUserResume"> | |||||
| <id column="id" jdbcType="BIGINT" property="id" /> | |||||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" /> | |||||
| <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId"/> | |||||
| <result column="user_id" jdbcType="BIGINT" property="userId" /> | |||||
| <result column="user_phone" jdbcType="VARCHAR" property="userPhone" /> | |||||
| <result column="user_name" jdbcType="VARCHAR" property="userName" /> | |||||
| <result column="file_path" jdbcType="VARCHAR" property="filePath" /> | |||||
| <result column="content" jdbcType="VARCHAR" property="content" /> | |||||
| <result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> | |||||
| <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> | |||||
| </resultMap> | |||||
| <sql id="allColumns"> | |||||
| `id`,`tenant_id`,`parent_tenant_id`,`user_id`,`user_phone`,`user_name`,`file_path`,`content`,`create_time`,`update_time` | |||||
| </sql> | |||||
| <sql id="dynamicWhereConditions"> | |||||
| where 1 = 1 | |||||
| <if test=" null != id "> | |||||
| and `id` = #{id} | |||||
| </if> | |||||
| <if test=" null != tenantId and '' != tenantId"> | |||||
| and `tenant_id` = #{tenantId} | |||||
| </if> | |||||
| <if test=" null != parentTenantId and '' != parentTenantId"> | |||||
| and `parent_tenant_id` = #{parentTenantId} | |||||
| </if> | |||||
| <if test=" null != userId "> | |||||
| and `user_id` = #{userId} | |||||
| </if> | |||||
| <if test=" null != userPhone and '' != userPhone"> | |||||
| and `user_phone` like concat('%', #{userPhone},'%') | |||||
| </if> | |||||
| <if test=" null != userName and '' != userName"> | |||||
| and `user_name` like concat('%', #{userName},'%') | |||||
| </if> | |||||
| <if test=" null != ids "> | |||||
| and id in | |||||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||||
| #{idItem} | |||||
| </foreach> | |||||
| </if> | |||||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | |||||
| </sql> | |||||
| <select id="findList" parameterType="com.iformall.domain.po.WxUserResume" resultMap="BaseResultMap"> | |||||
| select | |||||
| <include refid="allColumns"/> | |||||
| from wx_user_resume | |||||
| <include refid="dynamicWhereConditions" /> | |||||
| </select> | |||||
| </mapper> | |||||