From e13bdef5975744d67e59c4cc42d399a57dab657c Mon Sep 17 00:00:00 2001 From: linlw <linlw@qq.com> Date: Sat, 18 Nov 2017 10:28:15 +0800 Subject: [PATCH 01/10] merge apijson for news & newsCategory --- APIJSON-Java-Server/APIJSON-Idea/pom.xml | 4 +- .../java/apijson/demo/server/Verifier.java | 12 +- .../apijson/demo/server/model/NetsbdNews.java | 146 ++++++++++++++++++ .../demo/server/model/NetsbdNewsCategory.java | 119 ++++++++++++++ .../biao/apijson/server/sql/SQLConfig.java | 6 +- .../src/main/resources/application.properties | 1 + 6 files changed, 278 insertions(+), 10 deletions(-) create mode 100644 APIJSON-Java-Server/APIJSON-Idea/src/main/java/apijson/demo/server/model/NetsbdNews.java create mode 100644 APIJSON-Java-Server/APIJSON-Idea/src/main/java/apijson/demo/server/model/NetsbdNewsCategory.java diff --git a/APIJSON-Java-Server/APIJSON-Idea/pom.xml b/APIJSON-Java-Server/APIJSON-Idea/pom.xml index 3e26692f0..fc2d89108 100755 --- a/APIJSON-Java-Server/APIJSON-Idea/pom.xml +++ b/APIJSON-Java-Server/APIJSON-Idea/pom.xml @@ -5,7 +5,7 @@ <groupId>zuo.biao.apijson.server</groupId> <artifactId>apijson</artifactId> - <version>0.0.1-SNAPSHOT</version> + <version>0.0.3-SNAPSHOT</version> <packaging>jar</packaging> <name>APIJSON(Idea)</name> @@ -21,7 +21,7 @@ <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> - <java.version>1.7</java.version> + <java.version>1.8</java.version> </properties> <dependencies> diff --git a/APIJSON-Java-Server/APIJSON-Idea/src/main/java/apijson/demo/server/Verifier.java b/APIJSON-Java-Server/APIJSON-Idea/src/main/java/apijson/demo/server/Verifier.java index 2cdc02754..f42b69b92 100644 --- a/APIJSON-Java-Server/APIJSON-Idea/src/main/java/apijson/demo/server/Verifier.java +++ b/APIJSON-Java-Server/APIJSON-Idea/src/main/java/apijson/demo/server/Verifier.java @@ -30,16 +30,10 @@ import javax.activation.UnsupportedDataTypeException; import javax.servlet.http.HttpSession; +import apijson.demo.server.model.*; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; -import apijson.demo.server.model.BaseModel; -import apijson.demo.server.model.Comment; -import apijson.demo.server.model.Login; -import apijson.demo.server.model.Moment; -import apijson.demo.server.model.Privacy; -import apijson.demo.server.model.User; -import apijson.demo.server.model.Verify; import zuo.biao.apijson.JSON; import zuo.biao.apijson.JSONResponse; import zuo.biao.apijson.Log; @@ -88,6 +82,10 @@ public class Verifier { ACCESS_MAP.put(Comment.class.getSimpleName(), getAccessMap(Comment.class.getAnnotation(MethodAccess.class))); ACCESS_MAP.put(Verify.class.getSimpleName(), getAccessMap(Verify.class.getAnnotation(MethodAccess.class))); ACCESS_MAP.put(Login.class.getSimpleName(), getAccessMap(Login.class.getAnnotation(MethodAccess.class))); + + ACCESS_MAP.put(NetsbdNews.class.getSimpleName(), getAccessMap(NetsbdNews.class.getAnnotation(MethodAccess.class))); + ACCESS_MAP.put(NetsbdNewsCategory.class.getSimpleName(), getAccessMap(NetsbdNewsCategory.class.getAnnotation(MethodAccess.class))); + } /**获取权限Map,每种操作都只允许对应的角色 diff --git a/APIJSON-Java-Server/APIJSON-Idea/src/main/java/apijson/demo/server/model/NetsbdNews.java b/APIJSON-Java-Server/APIJSON-Idea/src/main/java/apijson/demo/server/model/NetsbdNews.java new file mode 100644 index 000000000..4200cde5e --- /dev/null +++ b/APIJSON-Java-Server/APIJSON-Idea/src/main/java/apijson/demo/server/model/NetsbdNews.java @@ -0,0 +1,146 @@ +/*Copyright ©2016 TommyLemon(https://github.com/TommyLemon/APIJSON) + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License.*/ + +package apijson.demo.server.model; + +import zuo.biao.apijson.MethodAccess; + +import static zuo.biao.apijson.RequestRole.ADMIN; +import static zuo.biao.apijson.RequestRole.UNKNOWN; + +/**用户类 + * @author Lemon + * @see + * <br >POST:post/register/user<pre> +{ + "User":{ + "disallow":"id", + "necessary":"name,phone" + }, + "necessary":"loginPassword,verify" +} + * </pre> + * <br >PUT:<pre> +{ + "User":{ + "disallow":"phone", + "necessary":"id" + } +} + * </pre> + * <br >PUT(User.phone):put/user/phone<pre> +{ + "User":{ + "disallow":"!", + "necessary":"id,phone" + }, + "necessary":"loginPassword,verify" +} + * </pre> + */ +@MethodAccess( + GET = {UNKNOWN}, + POST = {UNKNOWN, ADMIN}, + DELETE = {ADMIN} + ) +public class NetsbdNews extends BaseModel { + private static final long serialVersionUID = 1L; + +// public static final int SEX_MAIL = 0; +// public static final int SEX_FEMALE = 1; +// public static final int SEX_UNKNOWN = 2; + +// private Integer sex; //性别 +// private String head; //头像url +// private String name; //姓名 +// private String tag; //标签 +// private List<String> pictureList; //照片列表 +// private List<Long> contactIdList; //朋友列表 + +// private Long uid; //对应ims_user表中的uid,外键 + private Long cid; //对应ims_netsbd_news_category表中的id,外键 + private Long uid; //对应ims_users表中的id,外键 == 5 (0750kj) + private String title; + private String content; + private String tag; + private Integer ishide; + private Integer sort; + + public Long getUid() { + return uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + public Long getCid() { + return cid; + } + + public void setCid(Long cid) { + this.cid = cid; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + public Integer getIshide() { + return ishide; + } + + public void setIshide(Integer ishide) { + this.ishide = ishide; + } + + public Integer getSort() { + return sort; + } + + public void setSort(Integer sort) { + this.sort = sort; + } + + /**默认构造方法,JSON等解析时必须要有 + */ + public NetsbdNews() { + super(); + } + public NetsbdNews(long id) { + this(); + setId(id); + } + +} diff --git a/APIJSON-Java-Server/APIJSON-Idea/src/main/java/apijson/demo/server/model/NetsbdNewsCategory.java b/APIJSON-Java-Server/APIJSON-Idea/src/main/java/apijson/demo/server/model/NetsbdNewsCategory.java new file mode 100644 index 000000000..fc4af63d0 --- /dev/null +++ b/APIJSON-Java-Server/APIJSON-Idea/src/main/java/apijson/demo/server/model/NetsbdNewsCategory.java @@ -0,0 +1,119 @@ +/*Copyright ©2016 TommyLemon(https://github.com/TommyLemon/APIJSON) + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License.*/ + +package apijson.demo.server.model; + +import zuo.biao.apijson.MethodAccess; + +import static zuo.biao.apijson.RequestRole.ADMIN; +import static zuo.biao.apijson.RequestRole.UNKNOWN; + +/**用户类 + * @author Lemon + * @see + * <br >POST:post/register/user<pre> +{ +"User":{ +"disallow":"id", +"necessary":"name,phone" +}, +"necessary":"loginPassword,verify" +} + * </pre> + * <br >PUT:<pre> +{ +"User":{ +"disallow":"phone", +"necessary":"id" +} +} + * </pre> + * <br >PUT(User.phone):put/user/phone<pre> +{ +"User":{ +"disallow":"!", +"necessary":"id,phone" +}, +"necessary":"loginPassword,verify" +} + * </pre> + */ +@MethodAccess( + GET = {UNKNOWN}, + POST = {UNKNOWN, ADMIN}, + DELETE = {ADMIN} +) +public class NetsbdNewsCategory extends BaseModel { + private static final long serialVersionUID = 1L; + +// public static final int SEX_MAIL = 0; +// public static final int SEX_FEMALE = 1; +// public static final int SEX_UNKNOWN = 2; + +// private Integer sex; //性别 +// private String head; //头像url +// private String name; //姓名 +// private String tag; //标签 +// private List<String> pictureList; //照片列表 +// private List<Long> contactIdList; //朋友列表 + + // private Long uid; //对应ims_user表中的uid,外键 + private Long uid; //对应ims_users表中的id,外键 == 5 (0750kj) + private String name; + private Integer ishide; + private Integer sort; + + public Long getUid() { + return uid; + } + + public void setUid(Long uid) { + this.uid = uid; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Integer getIshide() { + return ishide; + } + + public void setIshide(Integer ishide) { + this.ishide = ishide; + } + + public Integer getSort() { + return sort; + } + + public void setSort(Integer sort) { + this.sort = sort; + } + + /**默认构造方法,JSON等解析时必须要有 + */ + public NetsbdNewsCategory() { + super(); + } + public NetsbdNewsCategory(long id) { + this(); + setId(id); + } + +} diff --git a/APIJSON-Java-Server/APIJSON-Idea/src/main/java/zuo/biao/apijson/server/sql/SQLConfig.java b/APIJSON-Java-Server/APIJSON-Idea/src/main/java/zuo/biao/apijson/server/sql/SQLConfig.java index 8e344c090..6a5e146b3 100755 --- a/APIJSON-Java-Server/APIJSON-Idea/src/main/java/zuo/biao/apijson/server/sql/SQLConfig.java +++ b/APIJSON-Java-Server/APIJSON-Idea/src/main/java/zuo/biao/apijson/server/sql/SQLConfig.java @@ -52,8 +52,10 @@ import com.alibaba.fastjson.annotation.JSONField; import apijson.demo.server.model.BaseModel; -import apijson.demo.server.model.Privacy; import apijson.demo.server.model.User; +import apijson.demo.server.model.Privacy; +import apijson.demo.server.model.NetsbdNews; +import apijson.demo.server.model.NetsbdNewsCategory; import zuo.biao.apijson.Log; import zuo.biao.apijson.RequestMethod; import zuo.biao.apijson.RequestRole; @@ -115,6 +117,8 @@ public class SQLConfig { TABLE_KEY_MAP.put(User.class.getSimpleName(), "apijson_user"); TABLE_KEY_MAP.put(Privacy.class.getSimpleName(), "apijson_privacy"); + TABLE_KEY_MAP.put(NetsbdNews.class.getSimpleName(), "ims_netsbd_news"); + TABLE_KEY_MAP.put(NetsbdNewsCategory.class.getSimpleName(), "ims_netsbd_news_category"); } diff --git a/APIJSON-Java-Server/APIJSON-Idea/src/main/resources/application.properties b/APIJSON-Java-Server/APIJSON-Idea/src/main/resources/application.properties index e69de29bb..78ec26f78 100755 --- a/APIJSON-Java-Server/APIJSON-Idea/src/main/resources/application.properties +++ b/APIJSON-Java-Server/APIJSON-Idea/src/main/resources/application.properties @@ -0,0 +1 @@ +server.port=8118 \ No newline at end of file From 3e37a82e7c279708052066c57d33323a8e81383f Mon Sep 17 00:00:00 2001 From: linlw <linlw@qq.com> Date: Sat, 18 Nov 2017 10:48:15 +0800 Subject: [PATCH 02/10] Merge with my APIJSON news & newsCategory --- .idea/vcs.xml | 6 ++ .idea/workspace.xml | 252 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 258 insertions(+) create mode 100644 .idea/vcs.xml create mode 100644 .idea/workspace.xml diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 000000000..35eb1ddfb --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="VcsDirectoryMappings"> + <mapping directory="" vcs="Git" /> + </component> +</project> \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 000000000..19f416fa9 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,252 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ChangeListManager"> + <list default="true" id="1e1910e0-0989-40a9-bde2-6a91150e4887" name="Default" comment="merge git"> + <change beforePath="" afterPath="$PROJECT_DIR$/.idea/APIJSON.iml" /> + <change beforePath="" afterPath="$PROJECT_DIR$/.idea/modules.xml" /> + </list> + <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> + <option name="TRACKING_ENABLED" value="true" /> + <option name="SHOW_DIALOG" value="false" /> + <option name="HIGHLIGHT_CONFLICTS" value="true" /> + <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> + <option name="LAST_RESOLUTION" value="IGNORE" /> + </component> + <component name="Git.Settings"> + <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> + </component> + <component name="GradleLocalSettings"> + <option name="externalProjectsViewState"> + <projects_view /> + </option> + </component> + <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" /> + <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" /> + <component name="JsGulpfileManager"> + <detection-done>true</detection-done> + <sorting>DEFINITION_ORDER</sorting> + </component> + <component name="ProjectFrameBounds" fullScreen="true"> + <option name="width" value="2560" /> + <option name="height" value="1080" /> + </component> + <component name="ProjectView"> + <navigator currentView="ProjectPane" proportions="" version="1"> + <flattenPackages /> + <showMembers /> + <showModules /> + <showLibraryContents /> + <hideEmptyPackages /> + <abbreviatePackageNames /> + <autoscrollToSource /> + <autoscrollFromSource /> + <sortByType /> + <manualOrder /> + <foldersAlwaysOnTop value="true" /> + </navigator> + <panes> + <pane id="Scope" /> + <pane id="PackagesPane" /> + <pane id="Scratches" /> + <pane id="AndroidView" /> + <pane id="ProjectPane"> + <subPane> + <expand> + <path> + <item name="APIJSON" type="b2602c69:ProjectViewProjectNode" /> + <item name="APIJSON" type="462c0819:PsiDirectoryNode" /> + </path> + <path> + <item name="APIJSON" type="b2602c69:ProjectViewProjectNode" /> + <item name="APIJSON" type="462c0819:PsiDirectoryNode" /> + <item name="APIJSON-Java-Server" type="462c0819:PsiDirectoryNode" /> + </path> + <path> + <item name="APIJSON" type="b2602c69:ProjectViewProjectNode" /> + <item name="APIJSON" type="462c0819:PsiDirectoryNode" /> + <item name="APIJSON-Java-Server" type="462c0819:PsiDirectoryNode" /> + <item name="APIJSON-Idea" type="462c0819:PsiDirectoryNode" /> + </path> + </expand> + <select /> + </subPane> + </pane> + </panes> + </component> + <component name="PropertiesComponent"> + <property name="WebServerToolWindowFactoryState" value="false" /> + <property name="aspect.path.notification.shown" value="true" /> + <property name="last_opened_file_path" value="$PROJECT_DIR$" /> + </component> + <component name="RunDashboard"> + <option name="ruleStates"> + <list> + <RuleState> + <option name="name" value="ConfigurationTypeDashboardGroupingRule" /> + </RuleState> + <RuleState> + <option name="name" value="StatusDashboardGroupingRule" /> + </RuleState> + </list> + </option> + </component> + <component name="RunManager"> + <configuration default="true" type="Applet" factoryName="Applet"> + <option name="WIDTH" value="400" /> + <option name="HEIGHT" value="300" /> + <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" /> + <module /> + </configuration> + <configuration default="true" type="Application" factoryName="Application"> + <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" /> + <option name="MAIN_CLASS_NAME" /> + <option name="VM_PARAMETERS" /> + <option name="PROGRAM_PARAMETERS" /> + <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" /> + <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> + <option name="ALTERNATIVE_JRE_PATH" /> + <option name="ENABLE_SWING_INSPECTOR" value="false" /> + <option name="ENV_VARIABLES" /> + <option name="PASS_PARENT_ENVS" value="true" /> + <module name="" /> + <envs /> + </configuration> + <configuration default="true" type="JUnit" factoryName="JUnit"> + <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" /> + <module name="" /> + <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> + <option name="ALTERNATIVE_JRE_PATH" /> + <option name="PACKAGE_NAME" /> + <option name="MAIN_CLASS_NAME" /> + <option name="METHOD_NAME" /> + <option name="TEST_OBJECT" value="class" /> + <option name="VM_PARAMETERS" value="-ea" /> + <option name="PARAMETERS" /> + <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" /> + <option name="ENV_VARIABLES" /> + <option name="PASS_PARENT_ENVS" value="true" /> + <option name="TEST_SEARCH_SCOPE"> + <value defaultName="singleModule" /> + </option> + <envs /> + <patterns /> + </configuration> + <configuration default="true" type="Remote" factoryName="Remote"> + <option name="USE_SOCKET_TRANSPORT" value="true" /> + <option name="SERVER_MODE" value="false" /> + <option name="SHMEM_ADDRESS" value="javadebug" /> + <option name="HOST" value="localhost" /> + <option name="PORT" value="5005" /> + </configuration> + <configuration default="true" type="TestNG" factoryName="TestNG"> + <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" /> + <module name="" /> + <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" /> + <option name="ALTERNATIVE_JRE_PATH" /> + <option name="SUITE_NAME" /> + <option name="PACKAGE_NAME" /> + <option name="MAIN_CLASS_NAME" /> + <option name="METHOD_NAME" /> + <option name="GROUP_NAME" /> + <option name="TEST_OBJECT" value="CLASS" /> + <option name="VM_PARAMETERS" value="-ea" /> + <option name="PARAMETERS" /> + <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" /> + <option name="OUTPUT_DIRECTORY" /> + <option name="ANNOTATION_TYPE" /> + <option name="ENV_VARIABLES" /> + <option name="PASS_PARENT_ENVS" value="true" /> + <option name="TEST_SEARCH_SCOPE"> + <value defaultName="singleModule" /> + </option> + <option name="USE_DEFAULT_REPORTERS" value="false" /> + <option name="PROPERTIES_FILE" /> + <envs /> + <properties /> + <listeners /> + </configuration> + <configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin"> + <module name="" /> + <option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" /> + <option name="PROGRAM_PARAMETERS" /> + <predefined_log_file id="idea.log" enabled="true" /> + </configuration> + </component> + <component name="ShelveChangesManager" show_recycled="false"> + <option name="remove_strategy" value="false" /> + </component> + <component name="SvnConfiguration"> + <configuration /> + </component> + <component name="TaskManager"> + <task active="true" id="Default" summary="Default task"> + <changelist id="1e1910e0-0989-40a9-bde2-6a91150e4887" name="Default" comment="" /> + <created>1510972163442</created> + <option name="number" value="Default" /> + <option name="presentableId" value="Default" /> + <updated>1510972163442</updated> + <workItem from="1510972164718" duration="350000" /> + </task> + <servers /> + </component> + <component name="TimeTrackingManager"> + <option name="totallyTimeSpent" value="350000" /> + </component> + <component name="ToolWindowManager"> + <frame x="0" y="0" width="2560" height="1080" extended-state="0" /> + <layout> + <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" /> + <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> + <window_info id="Palette	" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" /> + <window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" /> + <window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" /> + <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" /> + <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" /> + <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" /> + <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> + <window_info id="Terminal" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32969216" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" /> + <window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" /> + <window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" /> + <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.24980143" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" /> + <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" /> + <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> + <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> + <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" /> + <window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" /> + <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" /> + <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> + <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> + <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" /> + <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> + <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> + <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> + <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> + </layout> + </component> + <component name="TypeScriptGeneratedFilesManager"> + <option name="version" value="1" /> + </component> + <component name="VcsContentAnnotationSettings"> + <option name="myLimit" value="2678400000" /> + </component> + <component name="XDebuggerManager"> + <breakpoint-manager /> + <watches-manager /> + </component> + <component name="masterDetails"> + <states> + <state key="ProjectJDKs.UI"> + <settings> + <last-edited>1.8</last-edited> + <splitter-proportions> + <option name="proportions"> + <list> + <option value="0.2" /> + </list> + </option> + </splitter-proportions> + </settings> + </state> + </states> + </component> +</project> \ No newline at end of file From 8ac577f8209771b5ea95a45fa3b4515ec3952862 Mon Sep 17 00:00:00 2001 From: TommyLemon <tommylemon@qq.com> Date: Mon, 18 Jun 2018 00:15:29 +0800 Subject: [PATCH 03/10] Update pom.xml --- APIJSON-Java-Server/APIJSON-Idea/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/APIJSON-Java-Server/APIJSON-Idea/pom.xml b/APIJSON-Java-Server/APIJSON-Idea/pom.xml index fc2d89108..3e26692f0 100755 --- a/APIJSON-Java-Server/APIJSON-Idea/pom.xml +++ b/APIJSON-Java-Server/APIJSON-Idea/pom.xml @@ -5,7 +5,7 @@ <groupId>zuo.biao.apijson.server</groupId> <artifactId>apijson</artifactId> - <version>0.0.3-SNAPSHOT</version> + <version>0.0.1-SNAPSHOT</version> <packaging>jar</packaging> <name>APIJSON(Idea)</name> @@ -21,7 +21,7 @@ <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> - <java.version>1.8</java.version> + <java.version>1.7</java.version> </properties> <dependencies> From ed80ae8ae49386d9b3f74bb1edde16a7ed2df229 Mon Sep 17 00:00:00 2001 From: TommyLemon <tommylemon@qq.com> Date: Mon, 18 Jun 2018 00:17:14 +0800 Subject: [PATCH 04/10] Update application.properties --- .../APIJSON-Idea/src/main/resources/application.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/APIJSON-Java-Server/APIJSON-Idea/src/main/resources/application.properties b/APIJSON-Java-Server/APIJSON-Idea/src/main/resources/application.properties index 78ec26f78..8b1378917 100755 --- a/APIJSON-Java-Server/APIJSON-Idea/src/main/resources/application.properties +++ b/APIJSON-Java-Server/APIJSON-Idea/src/main/resources/application.properties @@ -1 +1 @@ -server.port=8118 \ No newline at end of file + From 42aa60f27c3a922cdeff36e9a4f0ab8c39e5a362 Mon Sep 17 00:00:00 2001 From: TommyLemon <tommylemon@qq.com> Date: Mon, 18 Jun 2018 00:18:51 +0800 Subject: [PATCH 05/10] Update SQLConfig.java --- .../src/main/java/zuo/biao/apijson/server/sql/SQLConfig.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/APIJSON-Java-Server/APIJSON-Idea/src/main/java/zuo/biao/apijson/server/sql/SQLConfig.java b/APIJSON-Java-Server/APIJSON-Idea/src/main/java/zuo/biao/apijson/server/sql/SQLConfig.java index 6a5e146b3..4186e137f 100755 --- a/APIJSON-Java-Server/APIJSON-Idea/src/main/java/zuo/biao/apijson/server/sql/SQLConfig.java +++ b/APIJSON-Java-Server/APIJSON-Idea/src/main/java/zuo/biao/apijson/server/sql/SQLConfig.java @@ -54,8 +54,6 @@ import apijson.demo.server.model.BaseModel; import apijson.demo.server.model.User; import apijson.demo.server.model.Privacy; -import apijson.demo.server.model.NetsbdNews; -import apijson.demo.server.model.NetsbdNewsCategory; import zuo.biao.apijson.Log; import zuo.biao.apijson.RequestMethod; import zuo.biao.apijson.RequestRole; @@ -117,8 +115,6 @@ public class SQLConfig { TABLE_KEY_MAP.put(User.class.getSimpleName(), "apijson_user"); TABLE_KEY_MAP.put(Privacy.class.getSimpleName(), "apijson_privacy"); - TABLE_KEY_MAP.put(NetsbdNews.class.getSimpleName(), "ims_netsbd_news"); - TABLE_KEY_MAP.put(NetsbdNewsCategory.class.getSimpleName(), "ims_netsbd_news_category"); } From d2d6220499afd5d5cb9535ee1ce5bd685d53893b Mon Sep 17 00:00:00 2001 From: TommyLemon <tommylemon@qq.com> Date: Mon, 18 Jun 2018 00:19:27 +0800 Subject: [PATCH 06/10] Update SQLConfig.java --- .../src/main/java/zuo/biao/apijson/server/sql/SQLConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/APIJSON-Java-Server/APIJSON-Idea/src/main/java/zuo/biao/apijson/server/sql/SQLConfig.java b/APIJSON-Java-Server/APIJSON-Idea/src/main/java/zuo/biao/apijson/server/sql/SQLConfig.java index 4186e137f..8e344c090 100755 --- a/APIJSON-Java-Server/APIJSON-Idea/src/main/java/zuo/biao/apijson/server/sql/SQLConfig.java +++ b/APIJSON-Java-Server/APIJSON-Idea/src/main/java/zuo/biao/apijson/server/sql/SQLConfig.java @@ -52,8 +52,8 @@ import com.alibaba.fastjson.annotation.JSONField; import apijson.demo.server.model.BaseModel; -import apijson.demo.server.model.User; import apijson.demo.server.model.Privacy; +import apijson.demo.server.model.User; import zuo.biao.apijson.Log; import zuo.biao.apijson.RequestMethod; import zuo.biao.apijson.RequestRole; From e0949bb91bef24da56421313d4969bfe2e0ce8dd Mon Sep 17 00:00:00 2001 From: TommyLemon <tommylemon@qq.com> Date: Mon, 18 Jun 2018 00:21:09 +0800 Subject: [PATCH 07/10] Update Verifier.java --- .../src/main/java/apijson/demo/server/Verifier.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/APIJSON-Java-Server/APIJSON-Idea/src/main/java/apijson/demo/server/Verifier.java b/APIJSON-Java-Server/APIJSON-Idea/src/main/java/apijson/demo/server/Verifier.java index f42b69b92..da6601001 100644 --- a/APIJSON-Java-Server/APIJSON-Idea/src/main/java/apijson/demo/server/Verifier.java +++ b/APIJSON-Java-Server/APIJSON-Idea/src/main/java/apijson/demo/server/Verifier.java @@ -30,10 +30,16 @@ import javax.activation.UnsupportedDataTypeException; import javax.servlet.http.HttpSession; -import apijson.demo.server.model.*; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import apijson.demo.server.model.BaseModel; +import apijson.demo.server.model.Comment; +import apijson.demo.server.model.Login; +import apijson.demo.server.model.Moment; +import apijson.demo.server.model.Privacy; +import apijson.demo.server.model.User; +import apijson.demo.server.model.Verify; import zuo.biao.apijson.JSON; import zuo.biao.apijson.JSONResponse; import zuo.biao.apijson.Log; @@ -83,8 +89,6 @@ public class Verifier { ACCESS_MAP.put(Verify.class.getSimpleName(), getAccessMap(Verify.class.getAnnotation(MethodAccess.class))); ACCESS_MAP.put(Login.class.getSimpleName(), getAccessMap(Login.class.getAnnotation(MethodAccess.class))); - ACCESS_MAP.put(NetsbdNews.class.getSimpleName(), getAccessMap(NetsbdNews.class.getAnnotation(MethodAccess.class))); - ACCESS_MAP.put(NetsbdNewsCategory.class.getSimpleName(), getAccessMap(NetsbdNewsCategory.class.getAnnotation(MethodAccess.class))); } From 8a3d3896a1c60b237eede73d3ae5c6cc6197558c Mon Sep 17 00:00:00 2001 From: TommyLemon <tommylemon@qq.com> Date: Mon, 18 Jun 2018 00:22:00 +0800 Subject: [PATCH 08/10] Update application.properties From 56af51fcba74fffb87a2426ac636d670b16bbd51 Mon Sep 17 00:00:00 2001 From: TommyLemon <tommylemon@qq.com> Date: Mon, 18 Jun 2018 00:22:34 +0800 Subject: [PATCH 09/10] Update application.properties From 854a86bc03e12e78544516a6cc5eb50c990124cc Mon Sep 17 00:00:00 2001 From: TommyLemon <tommylemon@qq.com> Date: Mon, 18 Jun 2018 00:23:58 +0800 Subject: [PATCH 10/10] Update Verifier.java --- .../main/java/apijson/demo/server/Verifier.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/APIJSON-Java-Server/APIJSON-Idea/src/main/java/apijson/demo/server/Verifier.java b/APIJSON-Java-Server/APIJSON-Idea/src/main/java/apijson/demo/server/Verifier.java index da6601001..2cdc02754 100644 --- a/APIJSON-Java-Server/APIJSON-Idea/src/main/java/apijson/demo/server/Verifier.java +++ b/APIJSON-Java-Server/APIJSON-Idea/src/main/java/apijson/demo/server/Verifier.java @@ -33,12 +33,12 @@ import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; -import apijson.demo.server.model.BaseModel; -import apijson.demo.server.model.Comment; -import apijson.demo.server.model.Login; -import apijson.demo.server.model.Moment; -import apijson.demo.server.model.Privacy; -import apijson.demo.server.model.User; +import apijson.demo.server.model.BaseModel; +import apijson.demo.server.model.Comment; +import apijson.demo.server.model.Login; +import apijson.demo.server.model.Moment; +import apijson.demo.server.model.Privacy; +import apijson.demo.server.model.User; import apijson.demo.server.model.Verify; import zuo.biao.apijson.JSON; import zuo.biao.apijson.JSONResponse; @@ -88,8 +88,6 @@ public class Verifier { ACCESS_MAP.put(Comment.class.getSimpleName(), getAccessMap(Comment.class.getAnnotation(MethodAccess.class))); ACCESS_MAP.put(Verify.class.getSimpleName(), getAccessMap(Verify.class.getAnnotation(MethodAccess.class))); ACCESS_MAP.put(Login.class.getSimpleName(), getAccessMap(Login.class.getAnnotation(MethodAccess.class))); - - } /**获取权限Map,每种操作都只允许对应的角色