员工登录 重复账号问题
This commit is contained in:
@@ -20,4 +20,5 @@ public interface TbPlussShopStaffMapper {
|
|||||||
int updateByPrimaryKey(TbPlussShopStaff record);
|
int updateByPrimaryKey(TbPlussShopStaff record);
|
||||||
|
|
||||||
TbPlussShopStaff selectByAccount(String account);
|
TbPlussShopStaff selectByAccount(String account);
|
||||||
|
TbPlussShopStaff selectByAccountAndShopId(String account,String shopId);
|
||||||
}
|
}
|
||||||
@@ -87,7 +87,7 @@ public class LoginService {
|
|||||||
return Result.fail(CodeEnum.MERCHANTEIXST);
|
return Result.fail(CodeEnum.MERCHANTEIXST);
|
||||||
}
|
}
|
||||||
|
|
||||||
TbPlussShopStaff tbPlussShopStaff = tbPlussShopStaffMapper.selectByAccount(loginReq.getLoginName());
|
TbPlussShopStaff tbPlussShopStaff = tbPlussShopStaffMapper.selectByAccountAndShopId(loginReq.getLoginName(),account.getShopId());
|
||||||
if (ObjectUtil.isEmpty(tbPlussShopStaff)) {
|
if (ObjectUtil.isEmpty(tbPlussShopStaff)) {
|
||||||
return Result.fail(CodeEnum.ACCOUNTEIXST);
|
return Result.fail(CodeEnum.ACCOUNTEIXST);
|
||||||
} else if (!tbPlussShopStaff.getStatus()) {
|
} else if (!tbPlussShopStaff.getStatus()) {
|
||||||
|
|||||||
@@ -202,4 +202,10 @@
|
|||||||
<select id="selectByAccount" resultMap="BaseResultMap">
|
<select id="selectByAccount" resultMap="BaseResultMap">
|
||||||
select * from tb_pluss_shop_staff where account=#{account}
|
select * from tb_pluss_shop_staff where account=#{account}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectByAccountAndShopId" resultMap="BaseResultMap">
|
||||||
|
select * from tb_pluss_shop_staff where account=#{account}
|
||||||
|
<if test="shopId != null and shopId!=''">
|
||||||
|
and shop_id=#{shopId}
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Reference in New Issue
Block a user