判断序列号是否被别人绑定了

master
382696293@qq.com 2 years ago
parent a85061927d
commit c305734a7a

@ -84,6 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select count(1) from wx_user_instrument select count(1) from wx_user_instrument
<where> <where>
<if test="userId != null "> and user_id != #{userId}</if> <if test="userId != null "> and user_id != #{userId}</if>
<if test="serial != null and serial != ''"> and serial = #{serial}</if>
<if test="instrumentId != null "> and instrument_id = #{instrumentId}</if> <if test="instrumentId != null "> and instrument_id = #{instrumentId}</if>
<if test="bindingStatus != null "> and binding_status = #{bindingStatus}</if> <if test="bindingStatus != null "> and binding_status = #{bindingStatus}</if>
<if test="status != null "> and status = #{status}</if> <if test="status != null "> and status = #{status}</if>

@ -199,7 +199,7 @@ public class WxInstrumentServiceImpl implements IWxInstrumentService {
/* 2.2.1、判断序列号是否被别人绑定了 */ /* 2.2.1、判断序列号是否被别人绑定了 */
WxUserInstrument query = new WxUserInstrument(); WxUserInstrument query = new WxUserInstrument();
query.setUserId(wxUserMember.getId()); query.setUserId(wxUserMember.getId());
query.setInstrumentId(wxInstrumentSerial.getInstrumentId()); query.setSerial(serial);
query.setStatus(Status.OK.getCode().longValue()); query.setStatus(Status.OK.getCode().longValue());
query.setBindingStatus(BindingStatusEnums.BINDED.getCode()); query.setBindingStatus(BindingStatusEnums.BINDED.getCode());
Integer num = wxUserInstrumentMapper.selectUiByInstrumentId(query); Integer num = wxUserInstrumentMapper.selectUiByInstrumentId(query);

Loading…
Cancel
Save