liuc27 / backUp3

1 stars 0 forks source link

fix bug of mysql connection end failed. #18

Closed plxmbh closed 8 years ago

plxmbh commented 8 years ago

fix bug of mysql connection end failed. check account and oauthSource before insert User.

delete this branch after merge please.

zhengliyi commented 8 years ago

修正点(updateUser、getUser)について確認しました。 ロジック的にはOKですが、但し、以下について手が空いたら直した方が良いかと思います。

  1. insertUser時、oauthSourceが必須項目なので、247~251のif処理が要らないと思います。

     (どうせelseに行けないので、そのままでも大丈夫ですが。。。)

       if (objUser.oauthSource != undefined) {
           whereSql += " AND oauthSource=" + '"' + objUser.oauthSource + '"';
       } else {
           whereSql += ' AND oauthSource="local"';
       }

  2. テーブル定義で、oauthSourceはNOTNULLにした方が良いと思います。

以上です。お疲れ様です。