init
This commit is contained in:
@@ -11,6 +11,7 @@ import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.xq.domain.CardAuthRecord;
|
||||
import com.ruoyi.xq.dto.admin.authRecord.CardAuthRecordAdminVo;
|
||||
import com.ruoyi.xq.service.CardAuthRecordService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -39,8 +40,8 @@ public class CardAuthRecordController extends BaseController {
|
||||
*/
|
||||
@SaCheckPermission("xq:cardAuthRecord:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<CardAuthRecord> list(CardAuthRecord bo, PageQuery pageQuery) {
|
||||
Page<CardAuthRecord> page = cardAuthRecordService.page(pageQuery.build(), Wrappers.lambdaQuery(bo));
|
||||
public TableDataInfo<CardAuthRecordAdminVo> list(CardAuthRecordAdminVo bo, PageQuery pageQuery) {
|
||||
Page<CardAuthRecordAdminVo> page = cardAuthRecordService.pageAdmin(pageQuery, bo);
|
||||
return TableDataInfo.build(page);
|
||||
}
|
||||
|
||||
@@ -75,7 +76,7 @@ public class CardAuthRecordController extends BaseController {
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@RequestBody CardAuthRecord bo) {
|
||||
return toAjax(cardAuthRecordService.updateById(bo));
|
||||
return toAjax(cardAuthRecordService.refreshUserCardByAdmin(bo.getId()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -44,11 +44,11 @@ public class Dynamic implements Serializable {
|
||||
/**
|
||||
* 城市ID
|
||||
*/
|
||||
private Integer cityId;
|
||||
private Integer cityCode;
|
||||
/**
|
||||
* 城市
|
||||
*/
|
||||
private String city;
|
||||
private String cityName;
|
||||
/**
|
||||
* 是否有附件 0 没有 1 有
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.ruoyi.xq.dto.admin.authRecord;
|
||||
|
||||
import com.ruoyi.xq.domain.CardAuthRecord;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class CardAuthRecordAdminVo extends CardAuthRecord implements Serializable {
|
||||
private String nickname;
|
||||
private String mobile;
|
||||
private String avatar;
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
package com.ruoyi.xq.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.xq.domain.CardAuthRecord;
|
||||
import com.ruoyi.xq.dto.admin.authRecord.CardAuthRecordAdminVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 实名认证管理Mapper接口
|
||||
@@ -11,4 +14,5 @@ import com.ruoyi.xq.domain.CardAuthRecord;
|
||||
*/
|
||||
public interface CardAuthRecordMapper extends BaseMapper<CardAuthRecord> {
|
||||
|
||||
Page<CardAuthRecordAdminVo> pageAdmin(@Param("build") Page<Object> build, @Param("bo") CardAuthRecordAdminVo bo);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
package com.ruoyi.xq.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.xq.domain.CardAuthRecord;
|
||||
import com.ruoyi.xq.dto.admin.authRecord.CardAuthRecordAdminVo;
|
||||
import com.ruoyi.xq.dto.common.faceauth.CommitAuthRecordResp;
|
||||
import com.ruoyi.xq.tencent.CreateAuthResp;
|
||||
import com.tencentcloudapi.faceid.v20180301.models.GetDetectInfoEnhancedResponse;
|
||||
@@ -22,4 +25,6 @@ public interface CardAuthRecordService extends IService<CardAuthRecord> {
|
||||
boolean refreshUserCardByAdmin(Long authRecordId);
|
||||
|
||||
boolean updateCardRecordSuccess(CardAuthRecord cardAuthRecord, GetDetectInfoEnhancedResponse detectInfo);
|
||||
|
||||
Page<CardAuthRecordAdminVo> pageAdmin(PageQuery pageQuery, CardAuthRecordAdminVo bo);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,9 @@ package com.ruoyi.xq.service.impl;
|
||||
import cn.hutool.core.codec.Base64;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||
@@ -15,6 +17,7 @@ import com.ruoyi.xq.domain.AuthOrder;
|
||||
import com.ruoyi.xq.domain.CardAuthRecord;
|
||||
import com.ruoyi.xq.domain.UserAuth;
|
||||
import com.ruoyi.xq.domain.UserInfo;
|
||||
import com.ruoyi.xq.dto.admin.authRecord.CardAuthRecordAdminVo;
|
||||
import com.ruoyi.xq.dto.common.faceauth.CommitAuthRecordResp;
|
||||
import com.ruoyi.xq.enums.common.AuditEnum;
|
||||
import com.ruoyi.xq.enums.face.TokenStatusEnum;
|
||||
@@ -238,4 +241,9 @@ public class CardAuthRecordServiceImpl extends ServiceImpl<CardAuthRecordMapper,
|
||||
}
|
||||
return pass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<CardAuthRecordAdminVo> pageAdmin(PageQuery pageQuery, CardAuthRecordAdminVo bo) {
|
||||
return baseMapper.pageAdmin(pageQuery.build(), bo);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,6 +62,8 @@ public class DynamicServiceImpl extends ServiceImpl<DynamicMapper,Dynamic> imple
|
||||
dynamic.setUserId(user.getId());
|
||||
dynamic.setUsercode(user.getUsercode());
|
||||
dynamic.setContent(req.getContent());
|
||||
dynamic.setCityCode(user.getResidenceCityCode());
|
||||
dynamic.setCityName(user.getResidenceCityName());
|
||||
dynamic.setAuditStatus(AuditEnum.AUDITING.getCode());
|
||||
this.save(dynamic);
|
||||
List<String> imagesList = req.getImageList();
|
||||
|
||||
@@ -19,6 +19,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
<select id="pageAdmin" resultType="com.ruoyi.xq.dto.admin.authRecord.CardAuthRecordAdminVo">
|
||||
select t1.*, t2.nickname,t2.mobile,t2.avatar
|
||||
from xq_card_auth_record t1
|
||||
left join xq_user t2 on t1.user_id = t2.id
|
||||
<where>
|
||||
<if test="bo.usercode != null and bo.usercode != ''">
|
||||
and t1.usercode = #{bo.usercode}
|
||||
</if>
|
||||
<if test="bo.nickname != null and bo.nickname != ''">
|
||||
and t2.nickname like concat('%',#{bo.nickname},'%')
|
||||
</if>
|
||||
<if test="bo.mobile != null and bo.mobile != ''">
|
||||
and t2.mobile = #{bo.mobile}
|
||||
</if>
|
||||
<if test="bo.tokenStatus != null">
|
||||
and t1.token_status = #{bo.tokenStatus}
|
||||
</if>
|
||||
<if test="bo.orderNo != null and bo.orderNo != ''">
|
||||
and t1.order_no = #{bo.orderNo}
|
||||
</if>
|
||||
<if test="bo.bizToken != null and bo.bizToken != ''">
|
||||
and t1.biz_token = #{bo.bizToken}
|
||||
</if>
|
||||
</where>
|
||||
order by t1.create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -3,27 +3,9 @@
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.xq.mapper.DynamicMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.xq.domain.Dynamic" id="DynamicResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="usercode" column="usercode"/>
|
||||
<result property="content" column="content"/>
|
||||
<result property="cityId" column="city_id"/>
|
||||
<result property="city" column="city"/>
|
||||
<result property="isAttach" column="is_attach"/>
|
||||
<result property="auditStatus" column="audit_status"/>
|
||||
<result property="auditRemark" column="audit_remark"/>
|
||||
<result property="auditTime" column="audit_time"/>
|
||||
<result property="auditOpId" column="audit_op_id"/>
|
||||
<result property="auditOpName" column="audit_op_name"/>
|
||||
<result property="auditIp" column="audit_ip"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="sort" column="sort"/>
|
||||
</resultMap>
|
||||
<select id="pageApp" resultType="com.ruoyi.xq.dto.app.dynamic.DynamicListVo">
|
||||
select t1.id, t1.content, t1.user_id,t1.create_time as create_time,
|
||||
t2.avatar, t2.nickname, t2.birthday, t2.gender, t2.residence_city_name, t2.education,
|
||||
t2.avatar, t2.nickname, t2.birthday, t2.gender, t1.city_name as residence_city_name, t2.education,
|
||||
t2.profession,ifnull(count(t3.id),0) as star_num
|
||||
from xq_dynamic t1
|
||||
join xq_user t2 on t1.user_id = t2.id
|
||||
@@ -41,7 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
]]>
|
||||
</if>
|
||||
<if test="query.residenceCode != null">
|
||||
and t2.residence_code like concat(#{query.residenceCode},'%')
|
||||
and t1.city_id like concat(#{query.residenceCode},'%')
|
||||
</if>
|
||||
group by t1.id
|
||||
<choose>
|
||||
@@ -70,12 +52,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="bo.auditStatus != null ">
|
||||
and t1.audit_status = #{bo.auditStatus}
|
||||
</if>
|
||||
<if test="bo.cityName != null and bo.cityName != ''">
|
||||
and t1.city_name like concat('%',#{bo.cityName},'%')
|
||||
</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
<select id="currentPage" resultType="com.ruoyi.xq.dto.app.dynamic.MyDynamicListVo">
|
||||
select t1.id, t1.content, t1.user_id,t1.create_time as create_time,t1.audit_status, t1.audit_remark,
|
||||
t2.avatar, t2.nickname, t2.birthday, t2.gender, t2.residence_city_name, t2.education,
|
||||
t2.avatar, t2.nickname, t2.birthday, t2.gender, t1.city_code as residence_city_name, t2.education,
|
||||
t2.profession,ifnull(count(t3.id),0) as star_num
|
||||
from xq_dynamic t1
|
||||
join xq_user t2 on t1.user_id = t2.id
|
||||
|
||||
@@ -22,6 +22,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="bo.residenceCityName != null and bo.residenceCityName != ''">
|
||||
and t1.residence_city_name like concat('%',#{bo.residenceCityName},'%')
|
||||
</if>
|
||||
<if test="bo.tag != null">
|
||||
and t1.tag = #{bo.tag}
|
||||
</if>
|
||||
</where>
|
||||
order by t1.id desc
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user