---
title: "Discussion on \"Refactor: status to  statuses using mybatis\" | Hashnode"
description: "Discussion on \"Refactor: status to  statuses using mybatis\". Before:\n<if test=\"status  == 0\"> and t.status =  0 and  t.status1 = 1 </if>\n<if test=\"status  == 1\"> and t.status =  0 and  t.status2 = 2 </if>\n<if test =\"status != 2\"> and t.status2 != 2 </if>\n\nAfter:\n<if test=\"statuses != null and statuses.size() >..."
url: "https://hashnode.com/posts/refactor-status-to-statuses-using-mybatis/67682d103141bbf62ea5bfeb"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Refactor: status to statuses using mybatis](https://crazyrunsnail.hashnode.dev/refactor-status-to-statuses-using-mybatis?utm_source=hashnode&utm_medium=feed)

Before: <if test="status == 0"> and t.status = 0 and t.status1 = 1 </if> <if test="status == 1"> and t.status = 0 and t.status2 = 2 </if> <if test ="status != 2"> and t.status2 != 2 </if> After: <if test="statuses != null and statuses.size() >...

Dec 22, 2024 · 1 min read · crazyrunsnail.hashnode.dev  
Updated Jan 22, 2025  
Read the article

-   [#java](https://hashnode.com/tag/java)
-   [#mybatis](https://hashnode.com/tag/mybatis)
-   [#refactoring](https://hashnode.com/tag/refactoring)
-   [#orm](https://hashnode.com/tag/orm)

## Written by

[FENG JUNYUAN](https://hashnode.com/@crazyrunsnail)

@crazyrunsnail

  
[View profile](https://hashnode.com/@crazyrunsnail)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
