显示实名信息

This commit is contained in:
磷叶 2024-11-04 16:49:49 +08:00
parent eb7e4d2b97
commit 492a5ccd97
17 changed files with 56 additions and 37 deletions

View File

@ -21,7 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sa.create_by,
sa.card_info,
sa.is_default,
su.user_name as user_name
if(su.is_real, su.real_name, su.user_name) as user_name
from sm_account sa
left join sm_user su on su.user_id = sa.user_id
</sql>
@ -34,7 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="accountNo != null and accountNo != ''"> and sa.account_no = #{accountNo}</if>
<if test="mobile != null and mobile != ''"> and sa.mobile = #{mobile}</if>
<if test="isDefault != null"> and sa.is_default = #{isDefault}</if>
<if test="userName != null and userName != ''"> and su.user_name like CONCAT('%',#{userName},'%')</if>
<if test="userName != null and userName != ''"> and if(su.is_real, su.real_name, su.user_name) like CONCAT('%',#{userName},'%')</if>
<if test="excludeIds != null and excludeIds.size() > 0">
and sa.account_id not in
<foreach item="item" collection="excludeIds" open="(" separator="," close=")">

View File

@ -72,10 +72,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ss.contact_name as store_contact_name,
ss.contact_mobile as store_contact_mobile,
su.phonenumber as user_mobile,
su.user_name as user_name,
if(su.is_real, su.real_name, su.user_name) as user_name,
su.service_rate as user_service_rate,
su.show_bill_mobile as mch_show_bill_mobile,
sua.user_name as agent_name,
if(sua.is_real, sua.real_name, sua.user_name) as agent_name,
sua.phonenumber as agent_mobile,
sua.agent_service_rate as agent_user_service_rate
<include refid="searchTables"/>
@ -110,7 +110,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="onlineStatus1 != null and onlineStatus1 != ''"> and sd.online_status1 = #{onlineStatus1}</if>
<if test="onlineStatus2 != null and onlineStatus2 != ''"> and sd.online_status2 = #{onlineStatus2}</if>
<if test="status != null and status != ''"> and sd.status = #{status}</if>
<if test="userName != null and userName != ''"> and su.user_name like concat('%', #{userName}, '%')</if>
<if test="userName != null and userName != ''"> and if(su.is_real, su.real_name, su.user_name) like concat('%', #{userName}, '%')</if>
<if test="nickName != null and nickName != ''"> and sd.nick_name like concat('%', #{nickName}, '%')</if>
<if test="userId != null"> and sd.user_id = #{userId}</if>
<if test="storeId != null"> and sd.store_id = #{storeId}</if>
@ -121,7 +121,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="eqDeviceNo != null and eqDeviceNo != ''"> and sd.device_no = #{eqDeviceNo}</if>
<if test="lockUserId != null"> and sd.lock_user_id = #{lockUserId}</if>
<if test="agentId != null "> and agent_id = #{agentId}</if>
<if test="agentName != null and agentName != ''"> and sua.user_name like concat('%', #{agentName}, '%')</if>
<if test="agentName != null and agentName != ''"> and if(sua.is_real, sua.real_name, sua.user_name) like concat('%', #{agentName}, '%')</if>
<if test="serviceMode != null and serviceMode != ''"> and sd.service_mode = #{serviceMode}</if>
<if test="version != null and version != ''"> and sd.version like concat('%', #{version}, '%')</if>
<if test="modelTag != null and modelTag != ''"> and find_in_set(#{modelTag}, sm.tags)</if>

View File

@ -18,7 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
srb.description,
srb.create_time,
srb.received_amount,
su.user_name as user_name,
if(su.is_real, su.real_name, su.user_name) as user_name,
sd.device_name as device_name,
sd.device_no as device_no
from <include refid="selectTables"/>
@ -39,7 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="query.billDate != null "> and date(srb.bill_time) = #{query.billDate}</if>
<if test="query.type != null and query.type != ''"> and srb.type = #{query.type}</if>
<if test="query.status != null and query.status != ''"> and srb.status = #{query.status}</if>
<if test="query.userName != null and query.userName != ''"> and su.user_name like concat('%', #{query.userName}, '%')</if>
<if test="query.userName != null and query.userName != ''"> and if(su.is_real, su.real_name, su.user_name) like concat('%', #{query.userName}, '%')</if>
<if test="query.deviceName != null and query.deviceName != ''"> and sd.device_name like concat('%', #{query.deviceName}, '%')</if>
<if test="query.deviceNo != null and query.deviceNo != ''"> and sd.device_no like concat('%', #{query.deviceNo}, '%')</if>
<if test="query.description != null and query.description != ''"> and srb.description like concat('%', #{query.description}, '%')</if>

View File

@ -17,7 +17,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
srb.amount,
srb.bst_type,
srb.bst_id,
su.user_name as user_name
if(su.is_real, su.real_name, su.user_name) as user_name
from ss_record_balance srb
left join sm_user su on su.user_id = srb.user_id
</sql>
@ -26,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="query.id != null "> and srb.id = #{query.id}</if>
<if test="query.userId != null "> and srb.user_id = #{query.userId}</if>
<if test="query.reason != null and query.reason != ''"> and srb.reason like concat('%', #{query.reason}, '%')</if>
<if test="query.userName != null and query.userName != ''"> and su.user_name like concat('%', #{query.userName}, '%')</if>
<if test="query.userName != null and query.userName != ''"> and if(su.is_real, su.real_name, su.user_name) like concat('%', #{query.userName}, '%')</if>
<if test="query.bstType != null and query.bstType != ''"> and srb.bst_type = #{query.bstType}</if>
<if test="query.bstId != null "> and srb.bst_id = #{query.bstId}</if>
</sql>

View File

@ -47,4 +47,8 @@ public class Risk extends BaseEntity
@ApiModelProperty("实名认证ID")
private Long realNameId;
@Excel(name = "是否允许自行解封")
@ApiModelProperty("是否允许自行解封")
private Boolean unsealSelf;
}

View File

@ -21,8 +21,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
sr.end_time,
sr.create_time,
sr.real_name_id,
sr.unseal_self,
<include refid="isFinished"/> as is_finished,
su.user_name as user_name
if(su.is_real, su.real_name, su.user_name) as user_name
from ss_risk sr
left join sm_user su on su.user_id = sr.user_id
</sql>
@ -35,8 +36,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and find_in_set(#{query.containsType}, sr.type)
</if>
<if test="query.reason != null and query.reason != ''"> and sr.reason like concat('%', #{query.reason}, '%')</if>
<if test="query.userName != null and query.userName != ''"> and su.user_name like concat('%', #{query.userName}, '%')</if>
<if test="query.userName != null and query.userName != ''">
and if(su.is_real, su.real_name, su.user_name) like concat('%', #{query.userName}, '%')
</if>
<if test="query.realNameId != null "> and sr.real_name_id = #{query.realNameId}</if>
<if test="query.unsealSelf != null "> and unseal_self = #{query.unsealSelf}</if>
<if test="query.isFinished != null">
<if test="query.isFinished">and <include refid="isFinished"/></if>
<if test="!query.isFinished">and !<include refid="isFinished"/></if>
@ -64,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="endTime != null">end_time,</if>
<if test="createTime != null">create_time,</if>
<if test="realNameId != null">real_name_id,</if>
<if test="unsealSelf != null">unseal_self,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">#{userId},</if>
@ -72,6 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="endTime != null">#{endTime},</if>
<if test="createTime != null">#{createTime},</if>
<if test="realNameId != null">#{realNameId},</if>
<if test="unsealSelf != null">#{unsealSelf},</if>
</trim>
</insert>
@ -91,6 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<foreach item="item" collection="riskIds" open="(" separator="," close=")">
#{item}
</foreach>
and unseal_self = true
</update>
<sql id="updateColumns">
@ -100,6 +107,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="data.endTime != null">end_time = #{data.endTime},</if>
<if test="data.createTime != null">create_time = #{data.createTime},</if>
<if test="data.realNameId != null">real_name_id = #{data.realNameId},</if>
<if test="data.unsealSelf != null">unseal_self = #{data.unsealSelf},</if>
</sql>
<delete id="deleteRiskByRiskId" parameterType="Long">

View File

@ -11,7 +11,7 @@ import com.ruoyi.ss.risk.domain.RiskQuery;
* @author ruoyi
* @date 2024-10-18
*/
public interface IRiskService
public interface RiskService
{
/**
* 查询风控

View File

@ -12,7 +12,7 @@ import com.ruoyi.ss.risk.mapper.RiskMapper;
import com.ruoyi.ss.risk.domain.Risk;
import com.ruoyi.ss.risk.domain.RiskVO;
import com.ruoyi.ss.risk.domain.RiskQuery;
import com.ruoyi.ss.risk.service.IRiskService;
import com.ruoyi.ss.risk.service.RiskService;
/**
* 风控Service业务层处理
@ -21,7 +21,7 @@ import com.ruoyi.ss.risk.service.IRiskService;
* @date 2024-10-18
*/
@Service
public class RiskServiceImpl implements IRiskService
public class RiskServiceImpl implements RiskService
{
@Autowired
private RiskMapper riskMapper;
@ -119,6 +119,7 @@ public class RiskServiceImpl implements IRiskService
risk.setUserId(userId);
risk.setType(Collections.singletonList(RiskType.WITHDRAW.getType()));
risk.setReason(reason);
risk.setUnsealSelf(true);
return this.insertRisk(risk);
}
}

View File

@ -34,7 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ss.status,
ss.enabled,
ss.use_out_time,
su.user_name as user_name
if(su.is_real, su.real_name, su.user_name) as user_name
from sm_store ss
left join sm_user su on su.user_id = ss.user_id
</sql>
@ -49,7 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="query.address != null and query.address != ''"> and ss.address like concat('%', #{query.address}, '%')</if>
<if test="query.deleted != null "> and ss.deleted = #{query.deleted}</if>
<if test="query.deleted == null "> and ss.deleted = false</if>
<if test="query.userName != null "> and su.user_name like concat('%', #{query.userName}, '%')</if>
<if test="query.userName != null "> and if(su.is_real, su.real_name, su.user_name) like concat('%', #{query.userName}, '%')</if>
<if test="query.status != null "> and ss.status = #{query.status}</if>
<if test="query.enabled != null "> and ss.enabled = #{query.enabled}</if>
<if test="query.useOutTime != null "> and ss.use_out_time = #{query.useOutTime}</if>

View File

@ -36,7 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ss.enabled_voice,
ss.voice_minutes,
if(su.phonenumber is not null, su.phonenumber, su.user_name) as mobile_or_user_name,
su.user_name as user_name
if(su.is_real, su.real_name, su.user_name) as user_name
from <include refid="searchTables"/>
</sql>
@ -62,7 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="enabledLowPowerClose != null "> and ss.enabled_low_power_close = #{enabledLowPowerClose}</if>
<if test="enabledVoice != null "> and ss.enabled_voice = #{enabledVoice}</if>
<if test="userName != null and userName != ''">
and su.user_name like concat('%', #{userName}, '%')
and if(su.is_real, su.real_name, su.user_name) like concat('%', #{userName}, '%')
</if>
<if test="deviceId != null">
and ss.suit_id in (

View File

@ -89,8 +89,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="BaseColumns"/>
if(<include refid="isUsing"/>, true, false) as is_using,
if(<include refid="isFinished"/>, true, false) as is_finished,
su.user_name as user_name,
su1.user_name as mch_name,
if(su.is_real, su.real_name, su.user_name) as user_name,
if(su1.is_real, su1.real_name, su1.user_name) as mch_name,
su1.phonenumber as mch_mobile,
sd.device_no as device_no,
sd.total_electri_quantity as device_total_ele,
@ -110,8 +110,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectWithdrawVo">
select
<include refid="BaseColumns"/>
su.user_name as user_name,
su1.user_name as mch_name,
if(su.is_real, su.real_name, su.user_name) as user_name,
if(su1.is_real, su1.real_name, su1.user_name) as mch_name,
su1.phonenumber as mch_mobile,
su.phonenumber as user_mobile,
sc.name as channel_name
@ -167,8 +167,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="query.deviceId != null "> and stb.device_id = #{query.deviceId}</if>
<if test="query.type != null "> and stb.type = #{query.type} </if>
<if test="query.mchId != null "> and stb.mch_id = #{query.mchId}</if>
<if test="query.userName != null "> and su.user_name like concat('%', #{query.userName}, '%')</if>
<if test="query.mchName != null "> and su1.user_name like concat('%', #{query.mchName}, '%')</if>
<if test="query.userName != null "> and if(su.is_real, su.real_name, su.user_name) like concat('%', #{query.userName}, '%')</if>
<if test="query.mchName != null "> and if(su1.is_real, su1.real_name, su1.user_name) like concat('%', #{query.mchName}, '%')</if>
<if test="query.deviceName != null "> and stb.device_name like concat('%', #{query.deviceName}, '%')</if>
<if test="query.deviceMac != null and query.deviceMac != ''"> and stb.device_mac = #{query.deviceMac}</if>
<if test="query.deviceMac2 != null and query.deviceMac2 != ''"> and stb.device_mac2 = #{query.deviceMac2}</if>

View File

@ -40,7 +40,7 @@ import com.ruoyi.ss.record.time.domain.enums.RecordTimeType;
import com.ruoyi.ss.record.time.service.IRecordTimeService;
import com.ruoyi.ss.record.time.service.RecordTimeConverter;
import com.ruoyi.ss.recordBalance.domain.enums.RecordBalanceBstType;
import com.ruoyi.ss.risk.service.IRiskService;
import com.ruoyi.ss.risk.service.RiskService;
import com.ruoyi.ss.store.domain.StoreVo;
import com.ruoyi.ss.suit.domain.SuitVO;
import com.ruoyi.ss.suit.domain.enums.SuitFeeMode;
@ -166,7 +166,7 @@ public class TransactionBillServiceImpl implements TransactionBillService, After
private ReceiveBillService receiveBillService;
@Autowired
private IRiskService riskService;
private RiskService riskService;
/**
* 查询充值记录

View File

@ -15,7 +15,7 @@ import com.ruoyi.ss.model.domain.enums.ModelTag;
import com.ruoyi.ss.risk.domain.RiskQuery;
import com.ruoyi.ss.risk.domain.RiskVO;
import com.ruoyi.ss.risk.domain.enums.RiskType;
import com.ruoyi.ss.risk.service.IRiskService;
import com.ruoyi.ss.risk.service.RiskService;
import com.ruoyi.ss.store.domain.StoreVo;
import com.ruoyi.ss.store.service.StoreValidator;
import com.ruoyi.ss.suit.domain.SuitVO;
@ -63,7 +63,7 @@ public class TransactionBillValidatorImpl extends BaseValidator implements Trans
private TransactionBillService transactionBillService;
@Autowired
private IRiskService riskService;
private RiskService riskService;
@Override
public ValidateResult preAddOrder(RechargeBO bo) {
@ -347,6 +347,10 @@ public class TransactionBillValidatorImpl extends BaseValidator implements Trans
if (CollectionUtils.isNotEmptyElement(riskList)) {
RiskVO risk = riskList.get(0);
ServiceUtil.assertion(risk == null, "风控信息异常");
if (risk.getUnsealSelf() != null && !risk.getUnsealSelf()) {
throw new ServiceException("您被限制退款,且不允许自行解封:" + risk.getReason());
}
LocalDateTime endTime = risk.getEndTime();
if (endTime == null) {
throw new ServiceException("您被限制退款:" + risk.getReason(), ServiceCode.RISK_REFUND.getCode());

View File

@ -10,7 +10,7 @@ import com.ruoyi.common.utils.collection.CollectionUtils;
import com.ruoyi.ss.risk.domain.RiskQuery;
import com.ruoyi.ss.risk.domain.RiskVO;
import com.ruoyi.ss.risk.domain.enums.RiskType;
import com.ruoyi.ss.risk.service.IRiskService;
import com.ruoyi.ss.risk.service.RiskService;
import com.ruoyi.ss.transactionBill.domain.TransactionBillQuery;
import com.ruoyi.ss.transactionBill.domain.bo.WithdrawBO;
import com.ruoyi.ss.transactionBill.domain.dto.WithdrawDTO;
@ -43,7 +43,7 @@ public class WithdrawValidatorImpl extends BaseValidator implements WithdrawVali
private ISysConfigService sysConfigService;
@Autowired
private IRiskService riskService;
private RiskService riskService;
@Autowired
private RedisCache redisCache;
@ -96,6 +96,9 @@ public class WithdrawValidatorImpl extends BaseValidator implements WithdrawVali
if (CollectionUtils.isNotEmptyElement(riskList)) {
RiskVO risk = riskList.get(0);
ServiceUtil.assertion(risk == null, "风控信息异常");
if (risk.getUnsealSelf() != null && !risk.getUnsealSelf()) {
throw new ServiceException("您被限制提现,且不允许自行解封:" + risk.getReason());
}
LocalDateTime endTime = risk.getEndTime();
if (endTime == null) {
throw new ServiceException("您被限制提现:" + risk.getReason(), ServiceCode.RISK_WITHDRAW.getCode());

View File

@ -35,7 +35,7 @@ import com.ruoyi.ss.recordBalance.service.RecordBalanceService;
import com.ruoyi.ss.risk.domain.Risk;
import com.ruoyi.ss.risk.domain.RiskQuery;
import com.ruoyi.ss.risk.domain.RiskVO;
import com.ruoyi.ss.risk.service.IRiskService;
import com.ruoyi.ss.risk.service.RiskService;
import com.ruoyi.ss.store.domain.StoreQuery;
import com.ruoyi.ss.store.domain.StoreVo;
import com.ruoyi.ss.store.service.StoreService;
@ -112,7 +112,7 @@ public class SmUserServiceImpl implements ISmUserService
private WxAuthService wxAuthService;
@Autowired
private IRiskService riskService;
private RiskService riskService;
@Autowired
private RedisLock redisLock;

View File

@ -19,7 +19,7 @@ import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.ss.risk.domain.Risk;
import com.ruoyi.ss.risk.domain.RiskVO;
import com.ruoyi.ss.risk.domain.RiskQuery;
import com.ruoyi.ss.risk.service.IRiskService;
import com.ruoyi.ss.risk.service.RiskService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
@ -34,7 +34,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
public class RiskController extends BaseController
{
@Autowired
private IRiskService riskService;
private RiskService riskService;
/**
* 查询风控列表

View File

@ -142,8 +142,7 @@ public class SmUserController extends BaseController
@PreAuthorize("@ss.hasPermi('system:smUser:remove')")
@Log(title = "普通用户信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{userIds}")
public AjaxResult remove(@PathVariable List<Long> userIds)
{
public AjaxResult remove(@PathVariable List<Long> userIds) {
return toAjax(smUserService.logicDel(userIds));
}