Skip to content

Commit 2ec115f

Browse files
committed
Server:同步eclipse版至idea版
1 parent b0d210c commit 2ec115f

37 files changed

+1333
-1454
lines changed

APIJSON(Android)/APIJSON(ADT)/APIJSONApp/APIJSONApp/src/apijson/demo/client/view/MomentView.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,7 @@ public void onHttpResponse(int requestCode, String result, Exception e) {
420420
case HTTP_CANCLE_PRAISE:
421421
if (isSucceed) {
422422
data.setIsPraised(requestCode == HTTP_PRAISE);
423+
data.setUserList(null);
423424
bindView(data);
424425
} else {
425426
showShortToast((requestCode == HTTP_PRAISE ? "点赞" : "取消点赞") + "失败,请检查网络后重试");

APIJSON(Server)/APIJSON(Idea)/src/main/java/zuo/biao/apijson/server/model/BaseModel.java renamed to APIJSON(Server)/APIJSON(Idea)/src/main/java/zuo/biao/apijson/BaseModel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
See the License for the specific language governing permissions and
1313
limitations under the License.*/
1414

15-
package zuo.biao.apijson.server.model;
15+
package zuo.biao.apijson;
1616

1717
import java.io.Serializable;
1818
import java.util.Collection;

APIJSON(Server)/APIJSON(Idea)/src/main/java/zuo/biao/apijson/Column.java

Lines changed: 0 additions & 140 deletions
This file was deleted.

APIJSON(Server)/APIJSON(Idea)/src/main/java/zuo/biao/apijson/JSON.java

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@
2121
import com.alibaba.fastjson.parser.Feature;
2222
import com.alibaba.fastjson.serializer.SerializerFeature;
2323

24-
import zuo.biao.apijson.server.Log;
25-
26-
/**阿里json封装类 防止解析时异常
24+
/**阿里FastJSON封装类 防止解析时异常
2725
* @author Lemon
2826
*/
2927
public class JSON {
@@ -34,7 +32,7 @@ public class JSON {
3432
* @return
3533
*/
3634
public static boolean isJsonCorrect(String s) {
37-
Log.i(TAG, "isJsonCorrect <<<< " + s + " >>>>>>>");
35+
// Log.i(TAG, "isJsonCorrect <<<< " + s + " >>>>>>>");
3836
if (s == null
3937
// || s.equals("[]")
4038
// || s.equals("{}")
@@ -171,7 +169,7 @@ public static String toJSONString(Object obj) {
171169
try {
172170
return com.alibaba.fastjson.JSON.toJSONString(obj);
173171
} catch (Exception e) {
174-
Log.i(TAG, "toJSONString catch \n" + e.getMessage());
172+
Log.e(TAG, "toJSONString catch \n" + e.getMessage());
175173
}
176174
return null;
177175
}
@@ -188,7 +186,7 @@ public static String toJSONString(Object obj, SerializerFeature... features) {
188186
try {
189187
return com.alibaba.fastjson.JSON.toJSONString(obj, features);
190188
} catch (Exception e) {
191-
Log.i(TAG, "toJSONString catch \n" + e.getMessage());
189+
Log.e(TAG, "parseArray catch \n" + e.getMessage());
192190
}
193191
return null;
194192
}
@@ -221,9 +219,7 @@ public static boolean isJSONObject(Object obj) {
221219
JSONObject json = parseObject((String) obj);
222220
return json != null && json.isEmpty() == false;
223221
} catch (Exception e) {
224-
//太长 System.out.println(TAG + "select while (rs.next()){ >> i = "
225-
// + i + " try { json = JSON.parse((String) value);"
226-
// + ">> } catch (Exception e) {\n" + e.getMessage());
222+
Log.e(TAG, "isJSONObject catch \n" + e.getMessage());
227223
}
228224
}
229225

@@ -242,14 +238,11 @@ public static boolean isJSONArray(Object obj) {
242238
JSONArray json = parseArray((String) obj);
243239
return json != null && json.isEmpty() == false;
244240
} catch (Exception e) {
245-
//太长 System.out.println(TAG + "select while (rs.next()){ >> i = "
246-
// + i + " try { json = JSON.parse((String) value);"
247-
// + ">> } catch (Exception e) {\n" + e.getMessage());
241+
Log.e(TAG, "isJSONArray catch \n" + e.getMessage());
248242
}
249243
}
250244

251245
return false;
252246
}
253247

254-
255248
}

0 commit comments

Comments
 (0)