parent
eab4298725
commit
d92c052b7b
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Palette2">
|
||||
<group name="Swing">
|
||||
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
||||
</item>
|
||||
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
|
||||
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
||||
<initial-values>
|
||||
<property name="text" value="Button" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="RadioButton" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="CheckBox" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="Label" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
||||
<preferred-size width="-1" height="20" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
||||
</item>
|
||||
</group>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,312 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ArtifactsWorkspaceSettings">
|
||||
<artifacts-to-build>
|
||||
<artifact name="sxdx8.3:war exploded" />
|
||||
</artifacts-to-build>
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="bc447574-1ada-4019-a07a-0b2bbf156e37" name="默认更改列表" comment="" />
|
||||
<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="FileTemplateManagerImpl">
|
||||
<option name="RECENT_TEMPLATES">
|
||||
<list>
|
||||
<option value="AnnotationType" />
|
||||
<option value="Jsp File" />
|
||||
<option value="Interface" />
|
||||
<option value="Class" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="HighlightingSettingsPerFile">
|
||||
<setting file="file://$PROJECT_DIR$/src/main/webapp/WEB-INF/web.xml" root0="SKIP_INSPECTION" />
|
||||
</component>
|
||||
<component name="LogFilters">
|
||||
<option name="FILTER_ERRORS" value="false" />
|
||||
<option name="FILTER_WARNINGS" value="false" />
|
||||
<option name="FILTER_INFO" value="true" />
|
||||
<option name="FILTER_DEBUG" value="true" />
|
||||
<option name="CUSTOM_FILTER" />
|
||||
</component>
|
||||
<component name="MavenImportPreferences">
|
||||
<option name="generalSettings">
|
||||
<MavenGeneralSettings>
|
||||
<option name="localRepository" value="C:\JavaWeb_tool\repository" />
|
||||
<option name="mavenHome" value="C:/JavaWeb_tool/apache-maven-3.6.3" />
|
||||
<option name="userSettingsFile" value="C:\JavaWeb_tool\apache-maven-3.6.3\conf\settings.xml" />
|
||||
</MavenGeneralSettings>
|
||||
</option>
|
||||
<option name="importingSettings">
|
||||
<MavenImportingSettings>
|
||||
<option name="importAutomatically" value="true" />
|
||||
</MavenImportingSettings>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectId" id="1fZsgOGRetQh96YduT5ghJdM7CN" />
|
||||
<component name="ProjectViewState">
|
||||
<option name="showExcludedFiles" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
|
||||
<property name="WebServerToolWindowFactoryState" value="false" />
|
||||
<property name="aspect.path.notification.shown" value="true" />
|
||||
<property name="last_opened_file_path" value="D:/Program Files (x86)/bookstore-backstage" />
|
||||
<property name="settings.editor.selected.configurable" value="spring" />
|
||||
</component>
|
||||
<component name="RecentsManager">
|
||||
<key name="CreateClassDialog.RecentsKey">
|
||||
<recent name="com.test" />
|
||||
<recent name="com.test.controller" />
|
||||
</key>
|
||||
<key name="CopyClassDialog.RECENTS_KEY">
|
||||
<recent name="com.test.utils" />
|
||||
<recent name="com.test.config" />
|
||||
</key>
|
||||
<key name="MoveFile.RECENT_KEYS">
|
||||
<recent name="D:\暑期实训\sxdx8.3\src\main\webapp" />
|
||||
<recent name="D:\暑期实训\sxdx8.3\src\main\webapp\WEB-INF" />
|
||||
<recent name="D:\暑期实训\sxdx8.3\src\main\webapp\WEB-INF\jsp" />
|
||||
</key>
|
||||
</component>
|
||||
<component name="RunDashboard">
|
||||
<option name="excludedTypes">
|
||||
<set>
|
||||
<option value="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
<component name="RunManager" selected="Tomcat Server.text">
|
||||
<configuration name="PutLink" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
|
||||
<option name="MAIN_CLASS_NAME" value="com.test.PutLink" />
|
||||
<module name="sxdx8.3" />
|
||||
<extension name="coverage">
|
||||
<pattern>
|
||||
<option name="PATTERN" value="com.test.*" />
|
||||
<option name="ENABLED" value="true" />
|
||||
</pattern>
|
||||
</extension>
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="generate,-e" type="MavenRunConfiguration" factoryName="Maven">
|
||||
<MavenSettings>
|
||||
<option name="myGeneralSettings" />
|
||||
<option name="myRunnerSettings" />
|
||||
<option name="myRunnerParameters">
|
||||
<MavenRunnerParameters>
|
||||
<option name="profiles">
|
||||
<set />
|
||||
</option>
|
||||
<option name="goals">
|
||||
<list>
|
||||
<option value="mybatis-generator:generate" />
|
||||
<option value="-e" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="pomFileName" />
|
||||
<option name="profilesMap">
|
||||
<map />
|
||||
</option>
|
||||
<option name="resolveToWorkspace" value="false" />
|
||||
<option name="workingDirPath" value="$PROJECT_DIR$" />
|
||||
</MavenRunnerParameters>
|
||||
</option>
|
||||
</MavenSettings>
|
||||
<method v="2" />
|
||||
</configuration>
|
||||
<configuration name="text" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="Local" temporary="true" APPLICATION_SERVER_NAME="Tomcat 8.5.511" ALTERNATIVE_JRE_ENABLED="false">
|
||||
<option name="OPEN_IN_BROWSER_URL" value="http://localhost:8089/products/selectAll" />
|
||||
<deployment>
|
||||
<artifact name="sxdx8.3:war exploded">
|
||||
<settings>
|
||||
<option name="CONTEXT_PATH" value="" />
|
||||
</settings>
|
||||
</artifact>
|
||||
</deployment>
|
||||
<server-settings>
|
||||
<option name="BASE_DIRECTORY_NAME" value="text_jsp_sxdx8_3_3" />
|
||||
<option name="HTTP_PORT" value="8089" />
|
||||
</server-settings>
|
||||
<predefined_log_file enabled="true" id="Tomcat" />
|
||||
<predefined_log_file enabled="true" id="Tomcat Catalina" />
|
||||
<predefined_log_file id="Tomcat Manager" />
|
||||
<predefined_log_file id="Tomcat Host Manager" />
|
||||
<predefined_log_file id="Tomcat Localhost Access" />
|
||||
<RunnerSettings RunnerId="Debug">
|
||||
<option name="DEBUG_PORT" value="53385" />
|
||||
</RunnerSettings>
|
||||
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Cover">
|
||||
<option name="USE_ENV_VARIABLES" value="true" />
|
||||
<STARTUP>
|
||||
<option name="USE_DEFAULT" value="true" />
|
||||
<option name="SCRIPT" value="" />
|
||||
<option name="VM_PARAMETERS" value="" />
|
||||
<option name="PROGRAM_PARAMETERS" value="" />
|
||||
</STARTUP>
|
||||
<SHUTDOWN>
|
||||
<option name="USE_DEFAULT" value="true" />
|
||||
<option name="SCRIPT" value="" />
|
||||
<option name="VM_PARAMETERS" value="" />
|
||||
<option name="PROGRAM_PARAMETERS" value="" />
|
||||
</SHUTDOWN>
|
||||
</ConfigurationWrapper>
|
||||
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Debug">
|
||||
<option name="USE_ENV_VARIABLES" value="true" />
|
||||
<STARTUP>
|
||||
<option name="USE_DEFAULT" value="true" />
|
||||
<option name="SCRIPT" value="" />
|
||||
<option name="VM_PARAMETERS" value="" />
|
||||
<option name="PROGRAM_PARAMETERS" value="" />
|
||||
</STARTUP>
|
||||
<SHUTDOWN>
|
||||
<option name="USE_DEFAULT" value="true" />
|
||||
<option name="SCRIPT" value="" />
|
||||
<option name="VM_PARAMETERS" value="" />
|
||||
<option name="PROGRAM_PARAMETERS" value="" />
|
||||
</SHUTDOWN>
|
||||
</ConfigurationWrapper>
|
||||
<ConfigurationWrapper VM_VAR="JAVA_OPTS" RunnerId="Run">
|
||||
<option name="USE_ENV_VARIABLES" value="true" />
|
||||
<STARTUP>
|
||||
<option name="USE_DEFAULT" value="true" />
|
||||
<option name="SCRIPT" value="" />
|
||||
<option name="VM_PARAMETERS" value="" />
|
||||
<option name="PROGRAM_PARAMETERS" value="" />
|
||||
</STARTUP>
|
||||
<SHUTDOWN>
|
||||
<option name="USE_DEFAULT" value="true" />
|
||||
<option name="SCRIPT" value="" />
|
||||
<option name="VM_PARAMETERS" value="" />
|
||||
<option name="PROGRAM_PARAMETERS" value="" />
|
||||
</SHUTDOWN>
|
||||
</ConfigurationWrapper>
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
<option name="BuildArtifacts" enabled="true">
|
||||
<artifact name="sxdx8.3:war exploded" />
|
||||
</option>
|
||||
</method>
|
||||
</configuration>
|
||||
<list>
|
||||
<item itemvalue="Application.PutLink" />
|
||||
<item itemvalue="Maven.generate,-e" />
|
||||
<item itemvalue="Tomcat Server.text" />
|
||||
</list>
|
||||
<recent_temporary>
|
||||
<list>
|
||||
<item itemvalue="Tomcat Server.text" />
|
||||
<item itemvalue="Application.PutLink" />
|
||||
</list>
|
||||
</recent_temporary>
|
||||
</component>
|
||||
<component name="ServiceViewManager">
|
||||
<option name="viewStates">
|
||||
<list>
|
||||
<serviceView>
|
||||
<option name="contentProportion" value="0.17358804" />
|
||||
<treeState>
|
||||
<expand />
|
||||
<select />
|
||||
</treeState>
|
||||
</serviceView>
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="SvnConfiguration">
|
||||
<configuration />
|
||||
</component>
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
<changelist id="bc447574-1ada-4019-a07a-0b2bbf156e37" name="默认更改列表" comment="" />
|
||||
<created>1596437059545</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1596437059545</updated>
|
||||
<workItem from="1596437064029" duration="18096000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
<option name="version" value="1" />
|
||||
</component>
|
||||
<component name="WindowStateProjectService">
|
||||
<state x="191" y="0" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1596450038703">
|
||||
<screen x="0" y="0" width="1280" height="680" />
|
||||
</state>
|
||||
<state x="191" y="0" key="#com.intellij.execution.impl.EditConfigurationsDialog/0.0.1280.680@0.0.1280.680" timestamp="1596450038703" />
|
||||
<state x="765" y="51" key="#com.intellij.ide.util.MemberChooser" timestamp="1596454112495">
|
||||
<screen x="0" y="0" width="1280" height="680" />
|
||||
</state>
|
||||
<state x="765" y="51" key="#com.intellij.ide.util.MemberChooser/0.0.1280.680@0.0.1280.680" timestamp="1596454112495" />
|
||||
<state x="690" y="89" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog" timestamp="1596442908923">
|
||||
<screen x="0" y="0" width="1280" height="680" />
|
||||
</state>
|
||||
<state x="690" y="89" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog/0.0.1280.680@0.0.1280.680" timestamp="1596442908923" />
|
||||
<state x="740" y="102" key="FileChooserDialogImpl" timestamp="1596442063154">
|
||||
<screen x="0" y="0" width="1280" height="680" />
|
||||
</state>
|
||||
<state x="740" y="102" key="FileChooserDialogImpl/0.0.1280.680@0.0.1280.680" timestamp="1596442063154" />
|
||||
<state width="1233" height="202" key="GridCell.Tab.0.bottom" timestamp="1596455664744">
|
||||
<screen x="0" y="0" width="1280" height="680" />
|
||||
</state>
|
||||
<state width="1233" height="202" key="GridCell.Tab.0.bottom/0.0.1280.680@0.0.1280.680" timestamp="1596455664744" />
|
||||
<state width="1233" height="202" key="GridCell.Tab.0.center" timestamp="1596455664744">
|
||||
<screen x="0" y="0" width="1280" height="680" />
|
||||
</state>
|
||||
<state width="1233" height="202" key="GridCell.Tab.0.center/0.0.1280.680@0.0.1280.680" timestamp="1596455664744" />
|
||||
<state width="1233" height="202" key="GridCell.Tab.0.left" timestamp="1596455664744">
|
||||
<screen x="0" y="0" width="1280" height="680" />
|
||||
</state>
|
||||
<state width="1233" height="202" key="GridCell.Tab.0.left/0.0.1280.680@0.0.1280.680" timestamp="1596455664744" />
|
||||
<state width="1233" height="202" key="GridCell.Tab.0.right" timestamp="1596455664744">
|
||||
<screen x="0" y="0" width="1280" height="680" />
|
||||
</state>
|
||||
<state width="1233" height="202" key="GridCell.Tab.0.right/0.0.1280.680@0.0.1280.680" timestamp="1596455664744" />
|
||||
<state width="1233" height="202" key="GridCell.Tab.1.bottom" timestamp="1596455664744">
|
||||
<screen x="0" y="0" width="1280" height="680" />
|
||||
</state>
|
||||
<state width="1233" height="202" key="GridCell.Tab.1.bottom/0.0.1280.680@0.0.1280.680" timestamp="1596455664744" />
|
||||
<state width="1233" height="202" key="GridCell.Tab.1.center" timestamp="1596455664744">
|
||||
<screen x="0" y="0" width="1280" height="680" />
|
||||
</state>
|
||||
<state width="1233" height="202" key="GridCell.Tab.1.center/0.0.1280.680@0.0.1280.680" timestamp="1596455664744" />
|
||||
<state width="1233" height="202" key="GridCell.Tab.1.left" timestamp="1596455664744">
|
||||
<screen x="0" y="0" width="1280" height="680" />
|
||||
</state>
|
||||
<state width="1233" height="202" key="GridCell.Tab.1.left/0.0.1280.680@0.0.1280.680" timestamp="1596455664744" />
|
||||
<state width="1233" height="202" key="GridCell.Tab.1.right" timestamp="1596455664744">
|
||||
<screen x="0" y="0" width="1280" height="680" />
|
||||
</state>
|
||||
<state width="1233" height="202" key="GridCell.Tab.1.right/0.0.1280.680@0.0.1280.680" timestamp="1596455664744" />
|
||||
<state width="1233" height="202" key="GridCell.Tab.2.bottom" timestamp="1596455664745">
|
||||
<screen x="0" y="0" width="1280" height="680" />
|
||||
</state>
|
||||
<state width="1233" height="202" key="GridCell.Tab.2.bottom/0.0.1280.680@0.0.1280.680" timestamp="1596455664745" />
|
||||
<state width="1233" height="202" key="GridCell.Tab.2.center" timestamp="1596455664745">
|
||||
<screen x="0" y="0" width="1280" height="680" />
|
||||
</state>
|
||||
<state width="1233" height="202" key="GridCell.Tab.2.center/0.0.1280.680@0.0.1280.680" timestamp="1596455664745" />
|
||||
<state width="1233" height="202" key="GridCell.Tab.2.left" timestamp="1596455664745">
|
||||
<screen x="0" y="0" width="1280" height="680" />
|
||||
</state>
|
||||
<state width="1233" height="202" key="GridCell.Tab.2.left/0.0.1280.680@0.0.1280.680" timestamp="1596455664745" />
|
||||
<state width="1233" height="202" key="GridCell.Tab.2.right" timestamp="1596455664745">
|
||||
<screen x="0" y="0" width="1280" height="680" />
|
||||
</state>
|
||||
<state width="1233" height="202" key="GridCell.Tab.2.right/0.0.1280.680@0.0.1280.680" timestamp="1596455664745" />
|
||||
<state x="329" y="0" key="Maven.ArtifactSearchDialog" timestamp="1596454847178">
|
||||
<screen x="0" y="0" width="1280" height="680" />
|
||||
</state>
|
||||
<state x="329" y="0" key="Maven.ArtifactSearchDialog/0.0.1280.680@0.0.1280.680" timestamp="1596454847178" />
|
||||
<state x="318" y="0" key="SettingsEditor" timestamp="1596439488154">
|
||||
<screen x="0" y="0" width="1280" height="680" />
|
||||
</state>
|
||||
<state x="318" y="0" key="SettingsEditor/0.0.1280.680@0.0.1280.680" timestamp="1596439488154" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,31 @@
|
||||
package com.test.controller;
|
||||
|
||||
import com.test.po.*;
|
||||
import com.test.service.AdminsService;
|
||||
import com.test.service.ProductsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/admins")
|
||||
public class AdminsController {
|
||||
|
||||
@Autowired
|
||||
private AdminsService adminsService;
|
||||
|
||||
@RequestMapping(value = "selectAll",method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public List<Admins> selectData(){
|
||||
List<Admins> adminsList = adminsService.selectByExample(new AdminsExample());
|
||||
return adminsList;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "findById/{id}",method = RequestMethod.GET)
|
||||
public Admins findById(@PathVariable("id")Integer id){
|
||||
return adminsService.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.test.controller;
|
||||
|
||||
import com.test.dao.CartMapper;
|
||||
import com.test.po.Admins;
|
||||
import com.test.po.AdminsExample;
|
||||
import com.test.po.Cart;
|
||||
import com.test.po.CartExample;
|
||||
import com.test.service.CartService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/cart")
|
||||
public class CartController {
|
||||
|
||||
@Autowired
|
||||
private CartService cartService;
|
||||
|
||||
@RequestMapping(value = "selectAll",method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public List<Cart> selectData(){
|
||||
List<Cart> cartList = cartService.selectByExample(new CartExample());
|
||||
return cartList;
|
||||
}
|
||||
@RequestMapping(value = "findById/{id}",method = RequestMethod.GET)
|
||||
public Cart findById(@PathVariable("id")Integer id){
|
||||
return cartService.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.test.controller;
|
||||
|
||||
import com.test.dao.CategoryMapper;
|
||||
import com.test.po.*;
|
||||
import com.test.service.CategoryService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/category")
|
||||
public class CategoryController {
|
||||
|
||||
@Autowired
|
||||
private CategoryService categoryService;
|
||||
|
||||
@RequestMapping(value = "selectAll",method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public List<Category> selectData(){
|
||||
|
||||
List<Category> categoryList = categoryService.selectByExample(new CategoryExample());
|
||||
|
||||
return categoryList;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "findById/{id}",method = RequestMethod.GET)
|
||||
public Category findById(@PathVariable("id")Integer id){
|
||||
return categoryService.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.test.controller;
|
||||
|
||||
import com.test.po.Category;
|
||||
import com.test.po.Products;
|
||||
import com.test.po.ProductsExample;
|
||||
import com.test.service.ProductsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/products")
|
||||
public class ProductsController {
|
||||
|
||||
@Autowired
|
||||
private ProductsService productsService;
|
||||
|
||||
@RequestMapping(value = "selectAll",method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public List<Products> selectData(){
|
||||
|
||||
List<Products> productsList = productsService.selectByExample(new ProductsExample());
|
||||
|
||||
return productsList;
|
||||
}
|
||||
@RequestMapping(value = "findById/{id}",method = RequestMethod.GET)
|
||||
public Products findById(@PathVariable("id")Integer id){
|
||||
return productsService.selectByPrimaryKey(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
package com.test.controller;
|
||||
|
||||
import com.github.pagehelper.Page;
|
||||
import com.test.po.Products;
|
||||
import com.test.po.ProductsExample;
|
||||
import com.test.po.User;
|
||||
import com.test.po.UserExample;
|
||||
import com.test.service.ProductsService;
|
||||
import com.test.service.UserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/user")
|
||||
public class UserController {
|
||||
@Autowired
|
||||
private UserService userService;
|
||||
|
||||
@RequestMapping(value = "selectAll",method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public List<User> selectData(){
|
||||
|
||||
List<User> userList = userService.selectByExample(new UserExample());
|
||||
|
||||
return userList;
|
||||
}
|
||||
|
||||
// @RequestMapping(value = "/findAll/{page}/{size}",method = RequestMethod.GET)
|
||||
// public Page<User> findAll(@PathVariable("page") Integer page, @PathVariable("size") Integer size){
|
||||
// PageRequest request = PageRequest.of(page,size);
|
||||
// return userRepository.findAll(request);
|
||||
// }
|
||||
|
||||
@RequestMapping(value = "findById/{id}",method = RequestMethod.GET)
|
||||
public User findById(@PathVariable("id")Integer id){
|
||||
return userService.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "save",method = RequestMethod.POST)
|
||||
public String save(@RequestBody User user){
|
||||
int insert = 0;
|
||||
insert= userService.insert(user);
|
||||
if(insert != 0){
|
||||
return "success";
|
||||
}else{
|
||||
return "error";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.test.dao;
|
||||
|
||||
import com.test.po.Admins;
|
||||
import com.test.po.AdminsExample;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface AdminsMapper {
|
||||
int deleteByPrimaryKey(Integer adminid);
|
||||
|
||||
int insert(Admins record);
|
||||
|
||||
int insertSelective(Admins record);
|
||||
|
||||
List<Admins> selectByExample(AdminsExample example);
|
||||
|
||||
Admins selectByPrimaryKey(Integer adminid);
|
||||
|
||||
int updateByPrimaryKeySelective(Admins record);
|
||||
|
||||
int updateByPrimaryKey(Admins record);
|
||||
}
|
@ -0,0 +1,149 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.test.dao.AdminsMapper" >
|
||||
<resultMap id="BaseResultMap" type="com.test.po.Admins" >
|
||||
<id column="adminid" property="adminid" jdbcType="INTEGER" />
|
||||
<result column="adminname" property="adminname" jdbcType="VARCHAR" />
|
||||
<result column="adminpwd" property="adminpwd" jdbcType="VARCHAR" />
|
||||
<result column="status" property="status" jdbcType="VARCHAR" />
|
||||
<result column="remark" property="remark" jdbcType="VARCHAR" />
|
||||
<result column="admindate" property="admindate" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause" >
|
||||
<where >
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or" >
|
||||
<if test="criteria.valid" >
|
||||
<trim prefix="(" suffix=")" prefixOverrides="and" >
|
||||
<foreach collection="criteria.criteria" item="criterion" >
|
||||
<choose >
|
||||
<when test="criterion.noValue" >
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue" >
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue" >
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue" >
|
||||
and ${criterion.condition}
|
||||
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List" >
|
||||
adminid, adminname, adminpwd, status, remark, admindate
|
||||
</sql>
|
||||
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.test.po.AdminsExample" >
|
||||
select
|
||||
<if test="distinct" >
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from admins
|
||||
<if test="_parameter != null" >
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null" >
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from admins
|
||||
where adminid = #{adminid,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
||||
delete from admins
|
||||
where adminid = #{adminid,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.test.po.Admins" >
|
||||
insert into admins (adminid, adminname, adminpwd,
|
||||
status, remark, admindate
|
||||
)
|
||||
values (#{adminid,jdbcType=INTEGER}, #{adminname,jdbcType=VARCHAR}, #{adminpwd,jdbcType=VARCHAR},
|
||||
#{status,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{admindate,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.test.po.Admins" >
|
||||
insert into admins
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="adminid != null" >
|
||||
adminid,
|
||||
</if>
|
||||
<if test="adminname != null" >
|
||||
adminname,
|
||||
</if>
|
||||
<if test="adminpwd != null" >
|
||||
adminpwd,
|
||||
</if>
|
||||
<if test="status != null" >
|
||||
status,
|
||||
</if>
|
||||
<if test="remark != null" >
|
||||
remark,
|
||||
</if>
|
||||
<if test="admindate != null" >
|
||||
admindate,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="adminid != null" >
|
||||
#{adminid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="adminname != null" >
|
||||
#{adminname,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="adminpwd != null" >
|
||||
#{adminpwd,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null" >
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remark != null" >
|
||||
#{remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="admindate != null" >
|
||||
#{admindate,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.test.po.Admins" >
|
||||
update admins
|
||||
<set >
|
||||
<if test="adminname != null" >
|
||||
adminname = #{adminname,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="adminpwd != null" >
|
||||
adminpwd = #{adminpwd,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null" >
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remark != null" >
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="admindate != null" >
|
||||
admindate = #{admindate,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where adminid = #{adminid,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.test.po.Admins" >
|
||||
update admins
|
||||
set adminname = #{adminname,jdbcType=VARCHAR},
|
||||
adminpwd = #{adminpwd,jdbcType=VARCHAR},
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
admindate = #{admindate,jdbcType=VARCHAR}
|
||||
where adminid = #{adminid,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,21 @@
|
||||
package com.test.dao;
|
||||
|
||||
import com.test.po.Cart;
|
||||
import com.test.po.CartExample;
|
||||
import java.util.List;
|
||||
|
||||
public interface CartMapper {
|
||||
int deleteByPrimaryKey(Integer carid);
|
||||
|
||||
int insert(Cart record);
|
||||
|
||||
int insertSelective(Cart record);
|
||||
|
||||
List<Cart> selectByExample(CartExample example);
|
||||
|
||||
Cart selectByPrimaryKey(Integer carid);
|
||||
|
||||
int updateByPrimaryKeySelective(Cart record);
|
||||
|
||||
int updateByPrimaryKey(Cart record);
|
||||
}
|
@ -0,0 +1,160 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.test.dao.CartMapper" >
|
||||
<resultMap id="BaseResultMap" type="com.test.po.Cart" >
|
||||
<id column="carid" property="carid" jdbcType="INTEGER" />
|
||||
<result column="pid" property="pid" jdbcType="INTEGER" />
|
||||
<result column="pname" property="pname" jdbcType="VARCHAR" />
|
||||
<result column="count" property="count" jdbcType="INTEGER" />
|
||||
<result column="imgurl" property="imgurl" jdbcType="VARCHAR" />
|
||||
<result column="uid" property="uid" jdbcType="INTEGER" />
|
||||
<result column="price" property="price" jdbcType="DOUBLE" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause" >
|
||||
<where >
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or" >
|
||||
<if test="criteria.valid" >
|
||||
<trim prefix="(" suffix=")" prefixOverrides="and" >
|
||||
<foreach collection="criteria.criteria" item="criterion" >
|
||||
<choose >
|
||||
<when test="criterion.noValue" >
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue" >
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue" >
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue" >
|
||||
and ${criterion.condition}
|
||||
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List" >
|
||||
carid, pid, pname, count, imgurl, uid, price
|
||||
</sql>
|
||||
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.test.po.CartExample" >
|
||||
select
|
||||
<if test="distinct" >
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from cart
|
||||
<if test="_parameter != null" >
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null" >
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from cart
|
||||
where carid = #{carid,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
||||
delete from cart
|
||||
where carid = #{carid,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.test.po.Cart" >
|
||||
insert into cart (carid, pid, pname,
|
||||
count, imgurl, uid,
|
||||
price)
|
||||
values (#{carid,jdbcType=INTEGER}, #{pid,jdbcType=INTEGER}, #{pname,jdbcType=VARCHAR},
|
||||
#{count,jdbcType=INTEGER}, #{imgurl,jdbcType=VARCHAR}, #{uid,jdbcType=INTEGER},
|
||||
#{price,jdbcType=DOUBLE})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.test.po.Cart" >
|
||||
insert into cart
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="carid != null" >
|
||||
carid,
|
||||
</if>
|
||||
<if test="pid != null" >
|
||||
pid,
|
||||
</if>
|
||||
<if test="pname != null" >
|
||||
pname,
|
||||
</if>
|
||||
<if test="count != null" >
|
||||
count,
|
||||
</if>
|
||||
<if test="imgurl != null" >
|
||||
imgurl,
|
||||
</if>
|
||||
<if test="uid != null" >
|
||||
uid,
|
||||
</if>
|
||||
<if test="price != null" >
|
||||
price,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="carid != null" >
|
||||
#{carid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="pid != null" >
|
||||
#{pid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="pname != null" >
|
||||
#{pname,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="count != null" >
|
||||
#{count,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="imgurl != null" >
|
||||
#{imgurl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="uid != null" >
|
||||
#{uid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="price != null" >
|
||||
#{price,jdbcType=DOUBLE},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.test.po.Cart" >
|
||||
update cart
|
||||
<set >
|
||||
<if test="pid != null" >
|
||||
pid = #{pid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="pname != null" >
|
||||
pname = #{pname,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="count != null" >
|
||||
count = #{count,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="imgurl != null" >
|
||||
imgurl = #{imgurl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="uid != null" >
|
||||
uid = #{uid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="price != null" >
|
||||
price = #{price,jdbcType=DOUBLE},
|
||||
</if>
|
||||
</set>
|
||||
where carid = #{carid,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.test.po.Cart" >
|
||||
update cart
|
||||
set pid = #{pid,jdbcType=INTEGER},
|
||||
pname = #{pname,jdbcType=VARCHAR},
|
||||
count = #{count,jdbcType=INTEGER},
|
||||
imgurl = #{imgurl,jdbcType=VARCHAR},
|
||||
uid = #{uid,jdbcType=INTEGER},
|
||||
price = #{price,jdbcType=DOUBLE}
|
||||
where carid = #{carid,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,21 @@
|
||||
package com.test.dao;
|
||||
|
||||
import com.test.po.Category;
|
||||
import com.test.po.CategoryExample;
|
||||
import java.util.List;
|
||||
|
||||
public interface CategoryMapper {
|
||||
int deleteByPrimaryKey(Integer cid);
|
||||
|
||||
int insert(Category record);
|
||||
|
||||
int insertSelective(Category record);
|
||||
|
||||
List<Category> selectByExample(CategoryExample example);
|
||||
|
||||
Category selectByPrimaryKey(Integer cid);
|
||||
|
||||
int updateByPrimaryKeySelective(Category record);
|
||||
|
||||
int updateByPrimaryKey(Category record);
|
||||
}
|
@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.test.dao.CategoryMapper" >
|
||||
<resultMap id="BaseResultMap" type="com.test.po.Category" >
|
||||
<id column="cid" property="cid" jdbcType="INTEGER" />
|
||||
<result column="cname" property="cname" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause" >
|
||||
<where >
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or" >
|
||||
<if test="criteria.valid" >
|
||||
<trim prefix="(" suffix=")" prefixOverrides="and" >
|
||||
<foreach collection="criteria.criteria" item="criterion" >
|
||||
<choose >
|
||||
<when test="criterion.noValue" >
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue" >
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue" >
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue" >
|
||||
and ${criterion.condition}
|
||||
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List" >
|
||||
cid, cname
|
||||
</sql>
|
||||
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.test.po.CategoryExample" >
|
||||
select
|
||||
<if test="distinct" >
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from category
|
||||
<if test="_parameter != null" >
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null" >
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from category
|
||||
where cid = #{cid,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
||||
delete from category
|
||||
where cid = #{cid,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.test.po.Category" >
|
||||
insert into category (cid, cname)
|
||||
values (#{cid,jdbcType=INTEGER}, #{cname,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.test.po.Category" >
|
||||
insert into category
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="cid != null" >
|
||||
cid,
|
||||
</if>
|
||||
<if test="cname != null" >
|
||||
cname,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="cid != null" >
|
||||
#{cid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="cname != null" >
|
||||
#{cname,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.test.po.Category" >
|
||||
update category
|
||||
<set >
|
||||
<if test="cname != null" >
|
||||
cname = #{cname,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where cid = #{cid,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.test.po.Category" >
|
||||
update category
|
||||
set cname = #{cname,jdbcType=VARCHAR}
|
||||
where cid = #{cid,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,21 @@
|
||||
package com.test.dao;
|
||||
|
||||
import com.test.po.Products;
|
||||
import com.test.po.ProductsExample;
|
||||
import java.util.List;
|
||||
|
||||
public interface ProductsMapper {
|
||||
int deleteByPrimaryKey(Integer pid);
|
||||
|
||||
int insert(Products record);
|
||||
|
||||
int insertSelective(Products record);
|
||||
|
||||
List<Products> selectByExample(ProductsExample example);
|
||||
|
||||
Products selectByPrimaryKey(Integer pid);
|
||||
|
||||
int updateByPrimaryKeySelective(Products record);
|
||||
|
||||
int updateByPrimaryKey(Products record);
|
||||
}
|
@ -0,0 +1,147 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.test.dao.ProductsMapper" >
|
||||
<resultMap id="BaseResultMap" type="com.test.po.Products" >
|
||||
<id column="pid" property="pid" jdbcType="INTEGER" />
|
||||
<result column="pname" property="pname" jdbcType="VARCHAR" />
|
||||
<result column="price" property="price" jdbcType="DOUBLE" />
|
||||
<result column="imgurl" property="imgurl" jdbcType="VARCHAR" />
|
||||
<result column="pdesc" property="pdesc" jdbcType="VARCHAR" />
|
||||
<result column="cid" property="cid" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause" >
|
||||
<where >
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or" >
|
||||
<if test="criteria.valid" >
|
||||
<trim prefix="(" suffix=")" prefixOverrides="and" >
|
||||
<foreach collection="criteria.criteria" item="criterion" >
|
||||
<choose >
|
||||
<when test="criterion.noValue" >
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue" >
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue" >
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue" >
|
||||
and ${criterion.condition}
|
||||
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List" >
|
||||
pid, pname, price, imgurl, pdesc, cid
|
||||
</sql>
|
||||
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.test.po.ProductsExample" >
|
||||
select
|
||||
<if test="distinct" >
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from products
|
||||
<if test="_parameter != null" >
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null" >
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from products
|
||||
where pid = #{pid,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
||||
delete from products
|
||||
where pid = #{pid,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.test.po.Products" >
|
||||
insert into products (pid, pname, price,
|
||||
imgurl, pdesc, cid)
|
||||
values (#{pid,jdbcType=INTEGER}, #{pname,jdbcType=VARCHAR}, #{price,jdbcType=DOUBLE},
|
||||
#{imgurl,jdbcType=VARCHAR}, #{pdesc,jdbcType=VARCHAR}, #{cid,jdbcType=INTEGER})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.test.po.Products" >
|
||||
insert into products
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="pid != null" >
|
||||
pid,
|
||||
</if>
|
||||
<if test="pname != null" >
|
||||
pname,
|
||||
</if>
|
||||
<if test="price != null" >
|
||||
price,
|
||||
</if>
|
||||
<if test="imgurl != null" >
|
||||
imgurl,
|
||||
</if>
|
||||
<if test="pdesc != null" >
|
||||
pdesc,
|
||||
</if>
|
||||
<if test="cid != null" >
|
||||
cid,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="pid != null" >
|
||||
#{pid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="pname != null" >
|
||||
#{pname,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="price != null" >
|
||||
#{price,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="imgurl != null" >
|
||||
#{imgurl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="pdesc != null" >
|
||||
#{pdesc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cid != null" >
|
||||
#{cid,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.test.po.Products" >
|
||||
update products
|
||||
<set >
|
||||
<if test="pname != null" >
|
||||
pname = #{pname,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="price != null" >
|
||||
price = #{price,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="imgurl != null" >
|
||||
imgurl = #{imgurl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="pdesc != null" >
|
||||
pdesc = #{pdesc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cid != null" >
|
||||
cid = #{cid,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where pid = #{pid,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.test.po.Products" >
|
||||
update products
|
||||
set pname = #{pname,jdbcType=VARCHAR},
|
||||
price = #{price,jdbcType=DOUBLE},
|
||||
imgurl = #{imgurl,jdbcType=VARCHAR},
|
||||
pdesc = #{pdesc,jdbcType=VARCHAR},
|
||||
cid = #{cid,jdbcType=INTEGER}
|
||||
where pid = #{pid,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,21 @@
|
||||
package com.test.dao;
|
||||
|
||||
import com.test.po.User;
|
||||
import com.test.po.UserExample;
|
||||
import java.util.List;
|
||||
|
||||
public interface UserMapper {
|
||||
int deleteByPrimaryKey(Integer uid);
|
||||
|
||||
int insert(User record);
|
||||
|
||||
int insertSelective(User record);
|
||||
|
||||
List<User> selectByExample(UserExample example);
|
||||
|
||||
User selectByPrimaryKey(Integer uid);
|
||||
|
||||
int updateByPrimaryKeySelective(User record);
|
||||
|
||||
int updateByPrimaryKey(User record);
|
||||
}
|
@ -0,0 +1,147 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.test.dao.UserMapper" >
|
||||
<resultMap id="BaseResultMap" type="com.test.po.User" >
|
||||
<id column="uid" property="uid" jdbcType="INTEGER" />
|
||||
<result column="name" property="name" jdbcType="CHAR" />
|
||||
<result column="password" property="password" jdbcType="CHAR" />
|
||||
<result column="username" property="username" jdbcType="CHAR" />
|
||||
<result column="email" property="email" jdbcType="CHAR" />
|
||||
<result column="phone" property="phone" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause" >
|
||||
<where >
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or" >
|
||||
<if test="criteria.valid" >
|
||||
<trim prefix="(" suffix=")" prefixOverrides="and" >
|
||||
<foreach collection="criteria.criteria" item="criterion" >
|
||||
<choose >
|
||||
<when test="criterion.noValue" >
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue" >
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue" >
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue" >
|
||||
and ${criterion.condition}
|
||||
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List" >
|
||||
uid, name, password, username, email, phone
|
||||
</sql>
|
||||
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.test.po.UserExample" >
|
||||
select
|
||||
<if test="distinct" >
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from user
|
||||
<if test="_parameter != null" >
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null" >
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from user
|
||||
where uid = #{uid,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
||||
delete from user
|
||||
where uid = #{uid,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.test.po.User" >
|
||||
insert into user (uid, name, password,
|
||||
username, email, phone)
|
||||
values (#{uid,jdbcType=INTEGER}, #{name,jdbcType=CHAR}, #{password,jdbcType=CHAR},
|
||||
#{username,jdbcType=CHAR}, #{email,jdbcType=CHAR}, #{phone,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.test.po.User" >
|
||||
insert into user
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="uid != null" >
|
||||
uid,
|
||||
</if>
|
||||
<if test="name != null" >
|
||||
name,
|
||||
</if>
|
||||
<if test="password != null" >
|
||||
password,
|
||||
</if>
|
||||
<if test="username != null" >
|
||||
username,
|
||||
</if>
|
||||
<if test="email != null" >
|
||||
email,
|
||||
</if>
|
||||
<if test="phone != null" >
|
||||
phone,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="uid != null" >
|
||||
#{uid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="name != null" >
|
||||
#{name,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="password != null" >
|
||||
#{password,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="username != null" >
|
||||
#{username,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="email != null" >
|
||||
#{email,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="phone != null" >
|
||||
#{phone,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.test.po.User" >
|
||||
update user
|
||||
<set >
|
||||
<if test="name != null" >
|
||||
name = #{name,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="password != null" >
|
||||
password = #{password,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="username != null" >
|
||||
username = #{username,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="email != null" >
|
||||
email = #{email,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="phone != null" >
|
||||
phone = #{phone,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where uid = #{uid,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.test.po.User" >
|
||||
update user
|
||||
set name = #{name,jdbcType=CHAR},
|
||||
password = #{password,jdbcType=CHAR},
|
||||
username = #{username,jdbcType=CHAR},
|
||||
email = #{email,jdbcType=CHAR},
|
||||
phone = #{phone,jdbcType=VARCHAR}
|
||||
where uid = #{uid,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
@ -0,0 +1,75 @@
|
||||
package com.test.po;
|
||||
|
||||
public class Admins {
|
||||
private Integer adminid;
|
||||
|
||||
private String adminname;
|
||||
|
||||
private String adminpwd;
|
||||
|
||||
private String status;
|
||||
|
||||
private String remark;
|
||||
|
||||
private String admindate;
|
||||
|
||||
public Integer getAdminid() {
|
||||
return adminid;
|
||||
}
|
||||
|
||||
public void setAdminid(Integer adminid) {
|
||||
this.adminid = adminid;
|
||||
}
|
||||
|
||||
public String getAdminname() {
|
||||
return adminname;
|
||||
}
|
||||
|
||||
public void setAdminname(String adminname) {
|
||||
this.adminname = adminname == null ? null : adminname.trim();
|
||||
}
|
||||
|
||||
public String getAdminpwd() {
|
||||
return adminpwd;
|
||||
}
|
||||
|
||||
public void setAdminpwd(String adminpwd) {
|
||||
this.adminpwd = adminpwd == null ? null : adminpwd.trim();
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status == null ? null : status.trim();
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark == null ? null : remark.trim();
|
||||
}
|
||||
|
||||
public String getAdmindate() {
|
||||
return admindate;
|
||||
}
|
||||
|
||||
public void setAdmindate(String admindate) {
|
||||
this.admindate = admindate == null ? null : admindate.trim();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Admins{" +
|
||||
"adminid=" + adminid +
|
||||
", adminname='" + adminname + '\'' +
|
||||
", adminpwd='" + adminpwd + '\'' +
|
||||
", status='" + status + '\'' +
|
||||
", remark='" + remark + '\'' +
|
||||
", admindate='" + admindate + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,610 @@
|
||||
package com.test.po;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class AdminsExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public AdminsExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<Criterion>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andAdminidIsNull() {
|
||||
addCriterion("adminid is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminidIsNotNull() {
|
||||
addCriterion("adminid is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminidEqualTo(Integer value) {
|
||||
addCriterion("adminid =", value, "adminid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminidNotEqualTo(Integer value) {
|
||||
addCriterion("adminid <>", value, "adminid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminidGreaterThan(Integer value) {
|
||||
addCriterion("adminid >", value, "adminid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminidGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("adminid >=", value, "adminid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminidLessThan(Integer value) {
|
||||
addCriterion("adminid <", value, "adminid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminidLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("adminid <=", value, "adminid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminidIn(List<Integer> values) {
|
||||
addCriterion("adminid in", values, "adminid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminidNotIn(List<Integer> values) {
|
||||
addCriterion("adminid not in", values, "adminid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminidBetween(Integer value1, Integer value2) {
|
||||
addCriterion("adminid between", value1, value2, "adminid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminidNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("adminid not between", value1, value2, "adminid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminnameIsNull() {
|
||||
addCriterion("adminname is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminnameIsNotNull() {
|
||||
addCriterion("adminname is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminnameEqualTo(String value) {
|
||||
addCriterion("adminname =", value, "adminname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminnameNotEqualTo(String value) {
|
||||
addCriterion("adminname <>", value, "adminname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminnameGreaterThan(String value) {
|
||||
addCriterion("adminname >", value, "adminname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminnameGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("adminname >=", value, "adminname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminnameLessThan(String value) {
|
||||
addCriterion("adminname <", value, "adminname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminnameLessThanOrEqualTo(String value) {
|
||||
addCriterion("adminname <=", value, "adminname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminnameLike(String value) {
|
||||
addCriterion("adminname like", value, "adminname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminnameNotLike(String value) {
|
||||
addCriterion("adminname not like", value, "adminname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminnameIn(List<String> values) {
|
||||
addCriterion("adminname in", values, "adminname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminnameNotIn(List<String> values) {
|
||||
addCriterion("adminname not in", values, "adminname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminnameBetween(String value1, String value2) {
|
||||
addCriterion("adminname between", value1, value2, "adminname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminnameNotBetween(String value1, String value2) {
|
||||
addCriterion("adminname not between", value1, value2, "adminname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminpwdIsNull() {
|
||||
addCriterion("adminpwd is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminpwdIsNotNull() {
|
||||
addCriterion("adminpwd is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminpwdEqualTo(String value) {
|
||||
addCriterion("adminpwd =", value, "adminpwd");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminpwdNotEqualTo(String value) {
|
||||
addCriterion("adminpwd <>", value, "adminpwd");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminpwdGreaterThan(String value) {
|
||||
addCriterion("adminpwd >", value, "adminpwd");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminpwdGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("adminpwd >=", value, "adminpwd");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminpwdLessThan(String value) {
|
||||
addCriterion("adminpwd <", value, "adminpwd");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminpwdLessThanOrEqualTo(String value) {
|
||||
addCriterion("adminpwd <=", value, "adminpwd");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminpwdLike(String value) {
|
||||
addCriterion("adminpwd like", value, "adminpwd");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminpwdNotLike(String value) {
|
||||
addCriterion("adminpwd not like", value, "adminpwd");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminpwdIn(List<String> values) {
|
||||
addCriterion("adminpwd in", values, "adminpwd");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminpwdNotIn(List<String> values) {
|
||||
addCriterion("adminpwd not in", values, "adminpwd");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminpwdBetween(String value1, String value2) {
|
||||
addCriterion("adminpwd between", value1, value2, "adminpwd");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdminpwdNotBetween(String value1, String value2) {
|
||||
addCriterion("adminpwd not between", value1, value2, "adminpwd");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIsNull() {
|
||||
addCriterion("status is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIsNotNull() {
|
||||
addCriterion("status is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusEqualTo(String value) {
|
||||
addCriterion("status =", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotEqualTo(String value) {
|
||||
addCriterion("status <>", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusGreaterThan(String value) {
|
||||
addCriterion("status >", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("status >=", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusLessThan(String value) {
|
||||
addCriterion("status <", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusLessThanOrEqualTo(String value) {
|
||||
addCriterion("status <=", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusLike(String value) {
|
||||
addCriterion("status like", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotLike(String value) {
|
||||
addCriterion("status not like", value, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusIn(List<String> values) {
|
||||
addCriterion("status in", values, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotIn(List<String> values) {
|
||||
addCriterion("status not in", values, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusBetween(String value1, String value2) {
|
||||
addCriterion("status between", value1, value2, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andStatusNotBetween(String value1, String value2) {
|
||||
addCriterion("status not between", value1, value2, "status");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRemarkIsNull() {
|
||||
addCriterion("remark is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRemarkIsNotNull() {
|
||||
addCriterion("remark is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRemarkEqualTo(String value) {
|
||||
addCriterion("remark =", value, "remark");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRemarkNotEqualTo(String value) {
|
||||
addCriterion("remark <>", value, "remark");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRemarkGreaterThan(String value) {
|
||||
addCriterion("remark >", value, "remark");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRemarkGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("remark >=", value, "remark");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRemarkLessThan(String value) {
|
||||
addCriterion("remark <", value, "remark");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRemarkLessThanOrEqualTo(String value) {
|
||||
addCriterion("remark <=", value, "remark");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRemarkLike(String value) {
|
||||
addCriterion("remark like", value, "remark");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRemarkNotLike(String value) {
|
||||
addCriterion("remark not like", value, "remark");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRemarkIn(List<String> values) {
|
||||
addCriterion("remark in", values, "remark");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRemarkNotIn(List<String> values) {
|
||||
addCriterion("remark not in", values, "remark");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRemarkBetween(String value1, String value2) {
|
||||
addCriterion("remark between", value1, value2, "remark");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andRemarkNotBetween(String value1, String value2) {
|
||||
addCriterion("remark not between", value1, value2, "remark");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdmindateIsNull() {
|
||||
addCriterion("admindate is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdmindateIsNotNull() {
|
||||
addCriterion("admindate is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdmindateEqualTo(String value) {
|
||||
addCriterion("admindate =", value, "admindate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdmindateNotEqualTo(String value) {
|
||||
addCriterion("admindate <>", value, "admindate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdmindateGreaterThan(String value) {
|
||||
addCriterion("admindate >", value, "admindate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdmindateGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("admindate >=", value, "admindate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdmindateLessThan(String value) {
|
||||
addCriterion("admindate <", value, "admindate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdmindateLessThanOrEqualTo(String value) {
|
||||
addCriterion("admindate <=", value, "admindate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdmindateLike(String value) {
|
||||
addCriterion("admindate like", value, "admindate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdmindateNotLike(String value) {
|
||||
addCriterion("admindate not like", value, "admindate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdmindateIn(List<String> values) {
|
||||
addCriterion("admindate in", values, "admindate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdmindateNotIn(List<String> values) {
|
||||
addCriterion("admindate not in", values, "admindate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdmindateBetween(String value1, String value2) {
|
||||
addCriterion("admindate between", value1, value2, "admindate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andAdmindateNotBetween(String value1, String value2) {
|
||||
addCriterion("admindate not between", value1, value2, "admindate");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,86 @@
|
||||
package com.test.po;
|
||||
|
||||
public class Cart {
|
||||
private Integer carid;
|
||||
|
||||
private Integer pid;
|
||||
|
||||
private String pname;
|
||||
|
||||
private Integer count;
|
||||
|
||||
private String imgurl;
|
||||
|
||||
private Integer uid;
|
||||
|
||||
private Double price;
|
||||
|
||||
public Integer getCarid() {
|
||||
return carid;
|
||||
}
|
||||
|
||||
public void setCarid(Integer carid) {
|
||||
this.carid = carid;
|
||||
}
|
||||
|
||||
public Integer getPid() {
|
||||
return pid;
|
||||
}
|
||||
|
||||
public void setPid(Integer pid) {
|
||||
this.pid = pid;
|
||||
}
|
||||
|
||||
public String getPname() {
|
||||
return pname;
|
||||
}
|
||||
|
||||
public void setPname(String pname) {
|
||||
this.pname = pname == null ? null : pname.trim();
|
||||
}
|
||||
|
||||
public Integer getCount() {
|
||||
return count;
|
||||
}
|
||||
|
||||
public void setCount(Integer count) {
|
||||
this.count = count;
|
||||
}
|
||||
|
||||
public String getImgurl() {
|
||||
return imgurl;
|
||||
}
|
||||
|
||||
public void setImgurl(String imgurl) {
|
||||
this.imgurl = imgurl == null ? null : imgurl.trim();
|
||||
}
|
||||
|
||||
public Integer getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(Integer uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public Double getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(Double price) {
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Cart{" +
|
||||
"carid=" + carid +
|
||||
", pid=" + pid +
|
||||
", pname='" + pname + '\'' +
|
||||
", count=" + count +
|
||||
", imgurl='" + imgurl + '\'' +
|
||||
", uid=" + uid +
|
||||
", price=" + price +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,640 @@
|
||||
package com.test.po;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class CartExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public CartExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<Criterion>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andCaridIsNull() {
|
||||
addCriterion("carid is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaridIsNotNull() {
|
||||
addCriterion("carid is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaridEqualTo(Integer value) {
|
||||
addCriterion("carid =", value, "carid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaridNotEqualTo(Integer value) {
|
||||
addCriterion("carid <>", value, "carid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaridGreaterThan(Integer value) {
|
||||
addCriterion("carid >", value, "carid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaridGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("carid >=", value, "carid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaridLessThan(Integer value) {
|
||||
addCriterion("carid <", value, "carid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaridLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("carid <=", value, "carid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaridIn(List<Integer> values) {
|
||||
addCriterion("carid in", values, "carid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaridNotIn(List<Integer> values) {
|
||||
addCriterion("carid not in", values, "carid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaridBetween(Integer value1, Integer value2) {
|
||||
addCriterion("carid between", value1, value2, "carid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCaridNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("carid not between", value1, value2, "carid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidIsNull() {
|
||||
addCriterion("pid is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidIsNotNull() {
|
||||
addCriterion("pid is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidEqualTo(Integer value) {
|
||||
addCriterion("pid =", value, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidNotEqualTo(Integer value) {
|
||||
addCriterion("pid <>", value, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidGreaterThan(Integer value) {
|
||||
addCriterion("pid >", value, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("pid >=", value, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidLessThan(Integer value) {
|
||||
addCriterion("pid <", value, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("pid <=", value, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidIn(List<Integer> values) {
|
||||
addCriterion("pid in", values, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidNotIn(List<Integer> values) {
|
||||
addCriterion("pid not in", values, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidBetween(Integer value1, Integer value2) {
|
||||
addCriterion("pid between", value1, value2, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("pid not between", value1, value2, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPnameIsNull() {
|
||||
addCriterion("pname is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPnameIsNotNull() {
|
||||
addCriterion("pname is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPnameEqualTo(String value) {
|
||||
addCriterion("pname =", value, "pname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPnameNotEqualTo(String value) {
|
||||
addCriterion("pname <>", value, "pname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPnameGreaterThan(String value) {
|
||||
addCriterion("pname >", value, "pname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPnameGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("pname >=", value, "pname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPnameLessThan(String value) {
|
||||
addCriterion("pname <", value, "pname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPnameLessThanOrEqualTo(String value) {
|
||||
addCriterion("pname <=", value, "pname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPnameLike(String value) {
|
||||
addCriterion("pname like", value, "pname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPnameNotLike(String value) {
|
||||
addCriterion("pname not like", value, "pname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPnameIn(List<String> values) {
|
||||
addCriterion("pname in", values, "pname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPnameNotIn(List<String> values) {
|
||||
addCriterion("pname not in", values, "pname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPnameBetween(String value1, String value2) {
|
||||
addCriterion("pname between", value1, value2, "pname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPnameNotBetween(String value1, String value2) {
|
||||
addCriterion("pname not between", value1, value2, "pname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCountIsNull() {
|
||||
addCriterion("count is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCountIsNotNull() {
|
||||
addCriterion("count is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCountEqualTo(Integer value) {
|
||||
addCriterion("count =", value, "count");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCountNotEqualTo(Integer value) {
|
||||
addCriterion("count <>", value, "count");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCountGreaterThan(Integer value) {
|
||||
addCriterion("count >", value, "count");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCountGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("count >=", value, "count");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCountLessThan(Integer value) {
|
||||
addCriterion("count <", value, "count");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCountLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("count <=", value, "count");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCountIn(List<Integer> values) {
|
||||
addCriterion("count in", values, "count");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCountNotIn(List<Integer> values) {
|
||||
addCriterion("count not in", values, "count");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCountBetween(Integer value1, Integer value2) {
|
||||
addCriterion("count between", value1, value2, "count");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCountNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("count not between", value1, value2, "count");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andImgurlIsNull() {
|
||||
addCriterion("imgurl is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andImgurlIsNotNull() {
|
||||
addCriterion("imgurl is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andImgurlEqualTo(String value) {
|
||||
addCriterion("imgurl =", value, "imgurl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andImgurlNotEqualTo(String value) {
|
||||
addCriterion("imgurl <>", value, "imgurl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andImgurlGreaterThan(String value) {
|
||||
addCriterion("imgurl >", value, "imgurl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andImgurlGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("imgurl >=", value, "imgurl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andImgurlLessThan(String value) {
|
||||
addCriterion("imgurl <", value, "imgurl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andImgurlLessThanOrEqualTo(String value) {
|
||||
addCriterion("imgurl <=", value, "imgurl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andImgurlLike(String value) {
|
||||
addCriterion("imgurl like", value, "imgurl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andImgurlNotLike(String value) {
|
||||
addCriterion("imgurl not like", value, "imgurl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andImgurlIn(List<String> values) {
|
||||
addCriterion("imgurl in", values, "imgurl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andImgurlNotIn(List<String> values) {
|
||||
addCriterion("imgurl not in", values, "imgurl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andImgurlBetween(String value1, String value2) {
|
||||
addCriterion("imgurl between", value1, value2, "imgurl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andImgurlNotBetween(String value1, String value2) {
|
||||
addCriterion("imgurl not between", value1, value2, "imgurl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidIsNull() {
|
||||
addCriterion("uid is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidIsNotNull() {
|
||||
addCriterion("uid is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidEqualTo(Integer value) {
|
||||
addCriterion("uid =", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidNotEqualTo(Integer value) {
|
||||
addCriterion("uid <>", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidGreaterThan(Integer value) {
|
||||
addCriterion("uid >", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("uid >=", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidLessThan(Integer value) {
|
||||
addCriterion("uid <", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("uid <=", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidIn(List<Integer> values) {
|
||||
addCriterion("uid in", values, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidNotIn(List<Integer> values) {
|
||||
addCriterion("uid not in", values, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidBetween(Integer value1, Integer value2) {
|
||||
addCriterion("uid between", value1, value2, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("uid not between", value1, value2, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceIsNull() {
|
||||
addCriterion("price is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceIsNotNull() {
|
||||
addCriterion("price is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceEqualTo(Double value) {
|
||||
addCriterion("price =", value, "price");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceNotEqualTo(Double value) {
|
||||
addCriterion("price <>", value, "price");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceGreaterThan(Double value) {
|
||||
addCriterion("price >", value, "price");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceGreaterThanOrEqualTo(Double value) {
|
||||
addCriterion("price >=", value, "price");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceLessThan(Double value) {
|
||||
addCriterion("price <", value, "price");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceLessThanOrEqualTo(Double value) {
|
||||
addCriterion("price <=", value, "price");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceIn(List<Double> values) {
|
||||
addCriterion("price in", values, "price");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceNotIn(List<Double> values) {
|
||||
addCriterion("price not in", values, "price");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceBetween(Double value1, Double value2) {
|
||||
addCriterion("price between", value1, value2, "price");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceNotBetween(Double value1, Double value2) {
|
||||
addCriterion("price not between", value1, value2, "price");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.test.po;
|
||||
|
||||
public class Category {
|
||||
private Integer cid;
|
||||
|
||||
private String cname;
|
||||
|
||||
public Integer getCid() {
|
||||
return cid;
|
||||
}
|
||||
|
||||
public void setCid(Integer cid) {
|
||||
this.cid = cid;
|
||||
}
|
||||
|
||||
public String getCname() {
|
||||
return cname;
|
||||
}
|
||||
|
||||
public void setCname(String cname) {
|
||||
this.cname = cname == null ? null : cname.trim();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Category{" +
|
||||
"cid=" + cid +
|
||||
", cname='" + cname + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,330 @@
|
||||
package com.test.po;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class CategoryExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public CategoryExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<Criterion>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andCidIsNull() {
|
||||
addCriterion("cid is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCidIsNotNull() {
|
||||
addCriterion("cid is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCidEqualTo(Integer value) {
|
||||
addCriterion("cid =", value, "cid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCidNotEqualTo(Integer value) {
|
||||
addCriterion("cid <>", value, "cid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCidGreaterThan(Integer value) {
|
||||
addCriterion("cid >", value, "cid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCidGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("cid >=", value, "cid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCidLessThan(Integer value) {
|
||||
addCriterion("cid <", value, "cid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCidLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("cid <=", value, "cid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCidIn(List<Integer> values) {
|
||||
addCriterion("cid in", values, "cid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCidNotIn(List<Integer> values) {
|
||||
addCriterion("cid not in", values, "cid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCidBetween(Integer value1, Integer value2) {
|
||||
addCriterion("cid between", value1, value2, "cid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCidNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("cid not between", value1, value2, "cid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCnameIsNull() {
|
||||
addCriterion("cname is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCnameIsNotNull() {
|
||||
addCriterion("cname is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCnameEqualTo(String value) {
|
||||
addCriterion("cname =", value, "cname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCnameNotEqualTo(String value) {
|
||||
addCriterion("cname <>", value, "cname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCnameGreaterThan(String value) {
|
||||
addCriterion("cname >", value, "cname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCnameGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("cname >=", value, "cname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCnameLessThan(String value) {
|
||||
addCriterion("cname <", value, "cname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCnameLessThanOrEqualTo(String value) {
|
||||
addCriterion("cname <=", value, "cname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCnameLike(String value) {
|
||||
addCriterion("cname like", value, "cname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCnameNotLike(String value) {
|
||||
addCriterion("cname not like", value, "cname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCnameIn(List<String> values) {
|
||||
addCriterion("cname in", values, "cname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCnameNotIn(List<String> values) {
|
||||
addCriterion("cname not in", values, "cname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCnameBetween(String value1, String value2) {
|
||||
addCriterion("cname between", value1, value2, "cname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCnameNotBetween(String value1, String value2) {
|
||||
addCriterion("cname not between", value1, value2, "cname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,87 @@
|
||||
package com.test.po;
|
||||
|
||||
public class Products {
|
||||
private Integer pid;
|
||||
|
||||
private String pname;
|
||||
|
||||
private Double price;
|
||||
|
||||
private String imgurl;
|
||||
|
||||
private String pdesc;
|
||||
|
||||
private Integer cid;
|
||||
|
||||
public Products() {
|
||||
}
|
||||
|
||||
public Products(Integer pid, String pname, Double price, String imgurl, String pdesc, Integer cid) {
|
||||
this.pid = pid;
|
||||
this.pname = pname;
|
||||
this.price = price;
|
||||
this.imgurl = imgurl;
|
||||
this.pdesc = pdesc;
|
||||
this.cid = cid;
|
||||
}
|
||||
|
||||
public Integer getPid() {
|
||||
return pid;
|
||||
}
|
||||
|
||||
public void setPid(Integer pid) {
|
||||
this.pid = pid;
|
||||
}
|
||||
|
||||
public String getPname() {
|
||||
return pname;
|
||||
}
|
||||
|
||||
public void setPname(String pname) {
|
||||
this.pname = pname == null ? null : pname.trim();
|
||||
}
|
||||
|
||||
public Double getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(Double price) {
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public String getImgurl() {
|
||||
return imgurl;
|
||||
}
|
||||
|
||||
public void setImgurl(String imgurl) {
|
||||
this.imgurl = imgurl == null ? null : imgurl.trim();
|
||||
}
|
||||
|
||||
public String getPdesc() {
|
||||
return pdesc;
|
||||
}
|
||||
|
||||
public void setPdesc(String pdesc) {
|
||||
this.pdesc = pdesc == null ? null : pdesc.trim();
|
||||
}
|
||||
|
||||
public Integer getCid() {
|
||||
return cid;
|
||||
}
|
||||
|
||||
public void setCid(Integer cid) {
|
||||
this.cid = cid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Products{" +
|
||||
"pid=" + pid +
|
||||
", pname='" + pname + '\'' +
|
||||
", price=" + price +
|
||||
", imgurl='" + imgurl + '\'' +
|
||||
", pdesc='" + pdesc + '\'' +
|
||||
", cid=" + cid +
|
||||
'}';
|
||||
}
|
||||
}
|
@ -0,0 +1,590 @@
|
||||
package com.test.po;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ProductsExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public ProductsExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<Criterion>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andPidIsNull() {
|
||||
addCriterion("pid is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidIsNotNull() {
|
||||
addCriterion("pid is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidEqualTo(Integer value) {
|
||||
addCriterion("pid =", value, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidNotEqualTo(Integer value) {
|
||||
addCriterion("pid <>", value, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidGreaterThan(Integer value) {
|
||||
addCriterion("pid >", value, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("pid >=", value, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidLessThan(Integer value) {
|
||||
addCriterion("pid <", value, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("pid <=", value, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidIn(List<Integer> values) {
|
||||
addCriterion("pid in", values, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidNotIn(List<Integer> values) {
|
||||
addCriterion("pid not in", values, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidBetween(Integer value1, Integer value2) {
|
||||
addCriterion("pid between", value1, value2, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPidNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("pid not between", value1, value2, "pid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPnameIsNull() {
|
||||
addCriterion("pname is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPnameIsNotNull() {
|
||||
addCriterion("pname is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPnameEqualTo(String value) {
|
||||
addCriterion("pname =", value, "pname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPnameNotEqualTo(String value) {
|
||||
addCriterion("pname <>", value, "pname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPnameGreaterThan(String value) {
|
||||
addCriterion("pname >", value, "pname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPnameGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("pname >=", value, "pname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPnameLessThan(String value) {
|
||||
addCriterion("pname <", value, "pname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPnameLessThanOrEqualTo(String value) {
|
||||
addCriterion("pname <=", value, "pname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPnameLike(String value) {
|
||||
addCriterion("pname like", value, "pname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPnameNotLike(String value) {
|
||||
addCriterion("pname not like", value, "pname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPnameIn(List<String> values) {
|
||||
addCriterion("pname in", values, "pname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPnameNotIn(List<String> values) {
|
||||
addCriterion("pname not in", values, "pname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPnameBetween(String value1, String value2) {
|
||||
addCriterion("pname between", value1, value2, "pname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPnameNotBetween(String value1, String value2) {
|
||||
addCriterion("pname not between", value1, value2, "pname");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceIsNull() {
|
||||
addCriterion("price is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceIsNotNull() {
|
||||
addCriterion("price is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceEqualTo(Double value) {
|
||||
addCriterion("price =", value, "price");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceNotEqualTo(Double value) {
|
||||
addCriterion("price <>", value, "price");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceGreaterThan(Double value) {
|
||||
addCriterion("price >", value, "price");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceGreaterThanOrEqualTo(Double value) {
|
||||
addCriterion("price >=", value, "price");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceLessThan(Double value) {
|
||||
addCriterion("price <", value, "price");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceLessThanOrEqualTo(Double value) {
|
||||
addCriterion("price <=", value, "price");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceIn(List<Double> values) {
|
||||
addCriterion("price in", values, "price");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceNotIn(List<Double> values) {
|
||||
addCriterion("price not in", values, "price");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceBetween(Double value1, Double value2) {
|
||||
addCriterion("price between", value1, value2, "price");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPriceNotBetween(Double value1, Double value2) {
|
||||
addCriterion("price not between", value1, value2, "price");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andImgurlIsNull() {
|
||||
addCriterion("imgurl is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andImgurlIsNotNull() {
|
||||
addCriterion("imgurl is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andImgurlEqualTo(String value) {
|
||||
addCriterion("imgurl =", value, "imgurl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andImgurlNotEqualTo(String value) {
|
||||
addCriterion("imgurl <>", value, "imgurl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andImgurlGreaterThan(String value) {
|
||||
addCriterion("imgurl >", value, "imgurl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andImgurlGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("imgurl >=", value, "imgurl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andImgurlLessThan(String value) {
|
||||
addCriterion("imgurl <", value, "imgurl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andImgurlLessThanOrEqualTo(String value) {
|
||||
addCriterion("imgurl <=", value, "imgurl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andImgurlLike(String value) {
|
||||
addCriterion("imgurl like", value, "imgurl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andImgurlNotLike(String value) {
|
||||
addCriterion("imgurl not like", value, "imgurl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andImgurlIn(List<String> values) {
|
||||
addCriterion("imgurl in", values, "imgurl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andImgurlNotIn(List<String> values) {
|
||||
addCriterion("imgurl not in", values, "imgurl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andImgurlBetween(String value1, String value2) {
|
||||
addCriterion("imgurl between", value1, value2, "imgurl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andImgurlNotBetween(String value1, String value2) {
|
||||
addCriterion("imgurl not between", value1, value2, "imgurl");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPdescIsNull() {
|
||||
addCriterion("pdesc is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPdescIsNotNull() {
|
||||
addCriterion("pdesc is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPdescEqualTo(String value) {
|
||||
addCriterion("pdesc =", value, "pdesc");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPdescNotEqualTo(String value) {
|
||||
addCriterion("pdesc <>", value, "pdesc");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPdescGreaterThan(String value) {
|
||||
addCriterion("pdesc >", value, "pdesc");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPdescGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("pdesc >=", value, "pdesc");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPdescLessThan(String value) {
|
||||
addCriterion("pdesc <", value, "pdesc");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPdescLessThanOrEqualTo(String value) {
|
||||
addCriterion("pdesc <=", value, "pdesc");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPdescLike(String value) {
|
||||
addCriterion("pdesc like", value, "pdesc");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPdescNotLike(String value) {
|
||||
addCriterion("pdesc not like", value, "pdesc");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPdescIn(List<String> values) {
|
||||
addCriterion("pdesc in", values, "pdesc");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPdescNotIn(List<String> values) {
|
||||
addCriterion("pdesc not in", values, "pdesc");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPdescBetween(String value1, String value2) {
|
||||
addCriterion("pdesc between", value1, value2, "pdesc");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPdescNotBetween(String value1, String value2) {
|
||||
addCriterion("pdesc not between", value1, value2, "pdesc");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCidIsNull() {
|
||||
addCriterion("cid is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCidIsNotNull() {
|
||||
addCriterion("cid is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCidEqualTo(Integer value) {
|
||||
addCriterion("cid =", value, "cid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCidNotEqualTo(Integer value) {
|
||||
addCriterion("cid <>", value, "cid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCidGreaterThan(Integer value) {
|
||||
addCriterion("cid >", value, "cid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCidGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("cid >=", value, "cid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCidLessThan(Integer value) {
|
||||
addCriterion("cid <", value, "cid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCidLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("cid <=", value, "cid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCidIn(List<Integer> values) {
|
||||
addCriterion("cid in", values, "cid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCidNotIn(List<Integer> values) {
|
||||
addCriterion("cid not in", values, "cid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCidBetween(Integer value1, Integer value2) {
|
||||
addCriterion("cid between", value1, value2, "cid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andCidNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("cid not between", value1, value2, "cid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,610 @@
|
||||
package com.test.po;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class UserExample {
|
||||
protected String orderByClause;
|
||||
|
||||
protected boolean distinct;
|
||||
|
||||
protected List<Criteria> oredCriteria;
|
||||
|
||||
public UserExample() {
|
||||
oredCriteria = new ArrayList<Criteria>();
|
||||
}
|
||||
|
||||
public void setOrderByClause(String orderByClause) {
|
||||
this.orderByClause = orderByClause;
|
||||
}
|
||||
|
||||
public String getOrderByClause() {
|
||||
return orderByClause;
|
||||
}
|
||||
|
||||
public void setDistinct(boolean distinct) {
|
||||
this.distinct = distinct;
|
||||
}
|
||||
|
||||
public boolean isDistinct() {
|
||||
return distinct;
|
||||
}
|
||||
|
||||
public List<Criteria> getOredCriteria() {
|
||||
return oredCriteria;
|
||||
}
|
||||
|
||||
public void or(Criteria criteria) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
|
||||
public Criteria or() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
oredCriteria.add(criteria);
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public Criteria createCriteria() {
|
||||
Criteria criteria = createCriteriaInternal();
|
||||
if (oredCriteria.size() == 0) {
|
||||
oredCriteria.add(criteria);
|
||||
}
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected Criteria createCriteriaInternal() {
|
||||
Criteria criteria = new Criteria();
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
oredCriteria.clear();
|
||||
orderByClause = null;
|
||||
distinct = false;
|
||||
}
|
||||
|
||||
protected abstract static class GeneratedCriteria {
|
||||
protected List<Criterion> criteria;
|
||||
|
||||
protected GeneratedCriteria() {
|
||||
super();
|
||||
criteria = new ArrayList<Criterion>();
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return criteria.size() > 0;
|
||||
}
|
||||
|
||||
public List<Criterion> getAllCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
public List<Criterion> getCriteria() {
|
||||
return criteria;
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition) {
|
||||
if (condition == null) {
|
||||
throw new RuntimeException("Value for condition cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value, String property) {
|
||||
if (value == null) {
|
||||
throw new RuntimeException("Value for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value));
|
||||
}
|
||||
|
||||
protected void addCriterion(String condition, Object value1, Object value2, String property) {
|
||||
if (value1 == null || value2 == null) {
|
||||
throw new RuntimeException("Between values for " + property + " cannot be null");
|
||||
}
|
||||
criteria.add(new Criterion(condition, value1, value2));
|
||||
}
|
||||
|
||||
public Criteria andUidIsNull() {
|
||||
addCriterion("uid is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidIsNotNull() {
|
||||
addCriterion("uid is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidEqualTo(Integer value) {
|
||||
addCriterion("uid =", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidNotEqualTo(Integer value) {
|
||||
addCriterion("uid <>", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidGreaterThan(Integer value) {
|
||||
addCriterion("uid >", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidGreaterThanOrEqualTo(Integer value) {
|
||||
addCriterion("uid >=", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidLessThan(Integer value) {
|
||||
addCriterion("uid <", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidLessThanOrEqualTo(Integer value) {
|
||||
addCriterion("uid <=", value, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidIn(List<Integer> values) {
|
||||
addCriterion("uid in", values, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidNotIn(List<Integer> values) {
|
||||
addCriterion("uid not in", values, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidBetween(Integer value1, Integer value2) {
|
||||
addCriterion("uid between", value1, value2, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUidNotBetween(Integer value1, Integer value2) {
|
||||
addCriterion("uid not between", value1, value2, "uid");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIsNull() {
|
||||
addCriterion("name is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIsNotNull() {
|
||||
addCriterion("name is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameEqualTo(String value) {
|
||||
addCriterion("name =", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotEqualTo(String value) {
|
||||
addCriterion("name <>", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameGreaterThan(String value) {
|
||||
addCriterion("name >", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("name >=", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLessThan(String value) {
|
||||
addCriterion("name <", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLessThanOrEqualTo(String value) {
|
||||
addCriterion("name <=", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameLike(String value) {
|
||||
addCriterion("name like", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotLike(String value) {
|
||||
addCriterion("name not like", value, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameIn(List<String> values) {
|
||||
addCriterion("name in", values, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotIn(List<String> values) {
|
||||
addCriterion("name not in", values, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameBetween(String value1, String value2) {
|
||||
addCriterion("name between", value1, value2, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNameNotBetween(String value1, String value2) {
|
||||
addCriterion("name not between", value1, value2, "name");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordIsNull() {
|
||||
addCriterion("password is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordIsNotNull() {
|
||||
addCriterion("password is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordEqualTo(String value) {
|
||||
addCriterion("password =", value, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordNotEqualTo(String value) {
|
||||
addCriterion("password <>", value, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordGreaterThan(String value) {
|
||||
addCriterion("password >", value, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("password >=", value, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordLessThan(String value) {
|
||||
addCriterion("password <", value, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordLessThanOrEqualTo(String value) {
|
||||
addCriterion("password <=", value, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordLike(String value) {
|
||||
addCriterion("password like", value, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordNotLike(String value) {
|
||||
addCriterion("password not like", value, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordIn(List<String> values) {
|
||||
addCriterion("password in", values, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordNotIn(List<String> values) {
|
||||
addCriterion("password not in", values, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordBetween(String value1, String value2) {
|
||||
addCriterion("password between", value1, value2, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPasswordNotBetween(String value1, String value2) {
|
||||
addCriterion("password not between", value1, value2, "password");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUsernameIsNull() {
|
||||
addCriterion("username is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUsernameIsNotNull() {
|
||||
addCriterion("username is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUsernameEqualTo(String value) {
|
||||
addCriterion("username =", value, "username");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUsernameNotEqualTo(String value) {
|
||||
addCriterion("username <>", value, "username");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUsernameGreaterThan(String value) {
|
||||
addCriterion("username >", value, "username");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUsernameGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("username >=", value, "username");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUsernameLessThan(String value) {
|
||||
addCriterion("username <", value, "username");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUsernameLessThanOrEqualTo(String value) {
|
||||
addCriterion("username <=", value, "username");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUsernameLike(String value) {
|
||||
addCriterion("username like", value, "username");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUsernameNotLike(String value) {
|
||||
addCriterion("username not like", value, "username");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUsernameIn(List<String> values) {
|
||||
addCriterion("username in", values, "username");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUsernameNotIn(List<String> values) {
|
||||
addCriterion("username not in", values, "username");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUsernameBetween(String value1, String value2) {
|
||||
addCriterion("username between", value1, value2, "username");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andUsernameNotBetween(String value1, String value2) {
|
||||
addCriterion("username not between", value1, value2, "username");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEmailIsNull() {
|
||||
addCriterion("email is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEmailIsNotNull() {
|
||||
addCriterion("email is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEmailEqualTo(String value) {
|
||||
addCriterion("email =", value, "email");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEmailNotEqualTo(String value) {
|
||||
addCriterion("email <>", value, "email");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEmailGreaterThan(String value) {
|
||||
addCriterion("email >", value, "email");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEmailGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("email >=", value, "email");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEmailLessThan(String value) {
|
||||
addCriterion("email <", value, "email");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEmailLessThanOrEqualTo(String value) {
|
||||
addCriterion("email <=", value, "email");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEmailLike(String value) {
|
||||
addCriterion("email like", value, "email");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEmailNotLike(String value) {
|
||||
addCriterion("email not like", value, "email");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEmailIn(List<String> values) {
|
||||
addCriterion("email in", values, "email");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEmailNotIn(List<String> values) {
|
||||
addCriterion("email not in", values, "email");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEmailBetween(String value1, String value2) {
|
||||
addCriterion("email between", value1, value2, "email");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andEmailNotBetween(String value1, String value2) {
|
||||
addCriterion("email not between", value1, value2, "email");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPhoneIsNull() {
|
||||
addCriterion("phone is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPhoneIsNotNull() {
|
||||
addCriterion("phone is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPhoneEqualTo(String value) {
|
||||
addCriterion("phone =", value, "phone");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPhoneNotEqualTo(String value) {
|
||||
addCriterion("phone <>", value, "phone");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPhoneGreaterThan(String value) {
|
||||
addCriterion("phone >", value, "phone");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPhoneGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("phone >=", value, "phone");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPhoneLessThan(String value) {
|
||||
addCriterion("phone <", value, "phone");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPhoneLessThanOrEqualTo(String value) {
|
||||
addCriterion("phone <=", value, "phone");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPhoneLike(String value) {
|
||||
addCriterion("phone like", value, "phone");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPhoneNotLike(String value) {
|
||||
addCriterion("phone not like", value, "phone");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPhoneIn(List<String> values) {
|
||||
addCriterion("phone in", values, "phone");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPhoneNotIn(List<String> values) {
|
||||
addCriterion("phone not in", values, "phone");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPhoneBetween(String value1, String value2) {
|
||||
addCriterion("phone between", value1, value2, "phone");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andPhoneNotBetween(String value1, String value2) {
|
||||
addCriterion("phone not between", value1, value2, "phone");
|
||||
return (Criteria) this;
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criteria extends GeneratedCriteria {
|
||||
|
||||
protected Criteria() {
|
||||
super();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Criterion {
|
||||
private String condition;
|
||||
|
||||
private Object value;
|
||||
|
||||
private Object secondValue;
|
||||
|
||||
private boolean noValue;
|
||||
|
||||
private boolean singleValue;
|
||||
|
||||
private boolean betweenValue;
|
||||
|
||||
private boolean listValue;
|
||||
|
||||
private String typeHandler;
|
||||
|
||||
public String getCondition() {
|
||||
return condition;
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public Object getSecondValue() {
|
||||
return secondValue;
|
||||
}
|
||||
|
||||
public boolean isNoValue() {
|
||||
return noValue;
|
||||
}
|
||||
|
||||
public boolean isSingleValue() {
|
||||
return singleValue;
|
||||
}
|
||||
|
||||
public boolean isBetweenValue() {
|
||||
return betweenValue;
|
||||
}
|
||||
|
||||
public boolean isListValue() {
|
||||
return listValue;
|
||||
}
|
||||
|
||||
public String getTypeHandler() {
|
||||
return typeHandler;
|
||||
}
|
||||
|
||||
protected Criterion(String condition) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.typeHandler = null;
|
||||
this.noValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.typeHandler = typeHandler;
|
||||
if (value instanceof List<?>) {
|
||||
this.listValue = true;
|
||||
} else {
|
||||
this.singleValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value) {
|
||||
this(condition, value, null);
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
|
||||
super();
|
||||
this.condition = condition;
|
||||
this.value = value;
|
||||
this.secondValue = secondValue;
|
||||
this.typeHandler = typeHandler;
|
||||
this.betweenValue = true;
|
||||
}
|
||||
|
||||
protected Criterion(String condition, Object value, Object secondValue) {
|
||||
this(condition, value, secondValue, null);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.test.service;
|
||||
|
||||
import com.test.po.Admins;
|
||||
import com.test.po.AdminsExample;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface AdminsService {
|
||||
int deleteByPrimaryKey(Integer adminid);
|
||||
|
||||
int insert(Admins record);
|
||||
|
||||
int insertSelective(Admins record);
|
||||
|
||||
List<Admins> selectByExample(AdminsExample example);
|
||||
|
||||
Admins selectByPrimaryKey(Integer adminid);
|
||||
|
||||
int updateByPrimaryKeySelective(Admins record);
|
||||
|
||||
int updateByPrimaryKey(Admins record);
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.test.service;
|
||||
|
||||
import com.test.po.Cart;
|
||||
import com.test.po.CartExample;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface CartService {
|
||||
int deleteByPrimaryKey(Integer carid);
|
||||
|
||||
int insert(Cart record);
|
||||
|
||||
int insertSelective(Cart record);
|
||||
|
||||
List<Cart> selectByExample(CartExample example);
|
||||
|
||||
Cart selectByPrimaryKey(Integer carid);
|
||||
|
||||
int updateByPrimaryKeySelective(Cart record);
|
||||
|
||||
int updateByPrimaryKey(Cart record);
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.test.service;
|
||||
|
||||
import com.test.po.Category;
|
||||
import com.test.po.CategoryExample;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface CategoryService {
|
||||
int deleteByPrimaryKey(Integer cid);
|
||||
|
||||
int insert(Category record);
|
||||
|
||||
int insertSelective(Category record);
|
||||
|
||||
List<Category> selectByExample(CategoryExample example);
|
||||
|
||||
Category selectByPrimaryKey(Integer cid);
|
||||
|
||||
int updateByPrimaryKeySelective(Category record);
|
||||
|
||||
int updateByPrimaryKey(Category record);
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.test.service;
|
||||
|
||||
import com.test.po.Products;
|
||||
import com.test.po.ProductsExample;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ProductsService {
|
||||
int deleteByPrimaryKey(Integer pid);
|
||||
|
||||
int insert(Products record);
|
||||
|
||||
int insertSelective(Products record);
|
||||
|
||||
List<Products> selectByExample(ProductsExample example);
|
||||
|
||||
Products selectByPrimaryKey(Integer pid);
|
||||
|
||||
int updateByPrimaryKeySelective(Products record);
|
||||
|
||||
int updateByPrimaryKey(Products record);
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.test.service;
|
||||
|
||||
import com.test.po.User;
|
||||
import com.test.po.UserExample;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface UserService {
|
||||
int deleteByPrimaryKey(Integer uid);
|
||||
|
||||
int insert(User record);
|
||||
|
||||
int insertSelective(User record);
|
||||
|
||||
List<User> selectByExample(UserExample example);
|
||||
|
||||
User selectByPrimaryKey(Integer uid);
|
||||
|
||||
int updateByPrimaryKeySelective(User record);
|
||||
|
||||
int updateByPrimaryKey(User record);
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package com.test.service.impl;
|
||||
|
||||
import com.test.dao.AdminsMapper;
|
||||
import com.test.po.Admins;
|
||||
import com.test.po.AdminsExample;
|
||||
import com.test.service.AdminsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Transactional
|
||||
@Service
|
||||
public class AdminsServiceImpl implements AdminsService {
|
||||
|
||||
@Autowired
|
||||
private AdminsMapper adminsMapper;
|
||||
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Integer adminid) {
|
||||
return adminsMapper.deleteByPrimaryKey(adminid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(Admins record) {
|
||||
return adminsMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(Admins record) {
|
||||
return adminsMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Admins> selectByExample(AdminsExample example) {
|
||||
return adminsMapper.selectByExample(new AdminsExample());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Admins selectByPrimaryKey(Integer adminid) {
|
||||
return adminsMapper.selectByPrimaryKey(adminid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(Admins record) {
|
||||
return adminsMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(Admins record) {
|
||||
return adminsMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package com.test.service.impl;
|
||||
|
||||
import com.test.dao.CartMapper;
|
||||
import com.test.po.Cart;
|
||||
import com.test.po.CartExample;
|
||||
import com.test.service.CartService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Transactional
|
||||
@Service
|
||||
public class CartServiceImpl implements CartService {
|
||||
|
||||
@Autowired
|
||||
private CartMapper cartMapper;
|
||||
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Integer carid) {
|
||||
return cartMapper.deleteByPrimaryKey(carid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(Cart record) {
|
||||
return cartMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(Cart record) {
|
||||
return cartMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Cart> selectByExample(CartExample example) {
|
||||
return cartMapper.selectByExample(new CartExample());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Cart selectByPrimaryKey(Integer carid) {
|
||||
return cartMapper.selectByPrimaryKey(carid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(Cart record) {
|
||||
return cartMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(Cart record) {
|
||||
return cartMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package com.test.service.impl;
|
||||
|
||||
import com.test.dao.CategoryMapper;
|
||||
import com.test.po.Category;
|
||||
import com.test.po.CategoryExample;
|
||||
import com.test.service.CategoryService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Transactional
|
||||
@Service
|
||||
public class CategoryServiceImpl implements CategoryService {
|
||||
|
||||
@Autowired
|
||||
private CategoryMapper categoryMapper;
|
||||
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Integer cid) {
|
||||
return categoryMapper.deleteByPrimaryKey(cid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(Category record) {
|
||||
return categoryMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(Category record) {
|
||||
return categoryMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Category> selectByExample(CategoryExample example) {
|
||||
return categoryMapper.selectByExample(new CategoryExample());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Category selectByPrimaryKey(Integer cid) {
|
||||
return categoryMapper.selectByPrimaryKey(cid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(Category record) {
|
||||
return categoryMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(Category record) {
|
||||
return categoryMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package com.test.service.impl;
|
||||
|
||||
import com.test.dao.ProductsMapper;
|
||||
import com.test.po.Products;
|
||||
import com.test.po.ProductsExample;
|
||||
import com.test.service.ProductsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Transactional
|
||||
@Service
|
||||
public class ProductsServiceImpl implements ProductsService {
|
||||
|
||||
@Autowired
|
||||
private ProductsMapper productsMapper;
|
||||
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Integer pid) {
|
||||
return productsMapper.deleteByPrimaryKey(pid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(Products record) {
|
||||
return productsMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(Products record) {
|
||||
return productsMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Products> selectByExample(ProductsExample example) {
|
||||
return productsMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Products selectByPrimaryKey(Integer pid) {
|
||||
return productsMapper.selectByPrimaryKey(pid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(Products record) {
|
||||
return productsMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(Products record) {
|
||||
return productsMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
package com.test.service.impl;
|
||||
|
||||
import com.test.dao.UserMapper;
|
||||
import com.test.po.User;
|
||||
import com.test.po.UserExample;
|
||||
import com.test.service.UserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Transactional
|
||||
@Service
|
||||
public class UserServiceImpl implements UserService {
|
||||
|
||||
@Autowired
|
||||
private UserMapper userMapper;
|
||||
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Integer uid) {
|
||||
return userMapper.deleteByPrimaryKey(uid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(User record) {
|
||||
return userMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(User record) {
|
||||
return userMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<User> selectByExample(UserExample example) {
|
||||
return userMapper.selectByExample(new UserExample());
|
||||
}
|
||||
|
||||
@Override
|
||||
public User selectByPrimaryKey(Integer uid) {
|
||||
return userMapper.selectByPrimaryKey(uid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(User record) {
|
||||
return userMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(User record) {
|
||||
return userMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.test.utils;
|
||||
|
||||
import org.springframework.core.convert.converter.Converter;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
public class DateConverter implements Converter<String, Date> {
|
||||
@Override
|
||||
public Date convert(String date) {
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
||||
dateFormat.setLenient(false);
|
||||
if (date!=null){
|
||||
try {
|
||||
return dateFormat.parse(date);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.test.utils;
|
||||
|
||||
import org.aspectj.lang.annotation.After;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
import org.aspectj.lang.annotation.Before;
|
||||
import org.aspectj.lang.annotation.Pointcut;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Aspect
|
||||
@Component
|
||||
public class Logging {
|
||||
|
||||
@Pointcut("execution(public * com.test.service..*.*(..))")
|
||||
public void mythod() {
|
||||
}
|
||||
|
||||
@Before("mythod()")
|
||||
public void before(){
|
||||
System.out.println("日志开始");
|
||||
}
|
||||
@After("mythod()")
|
||||
public void after(){
|
||||
System.out.println("日志结束");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:tx="http://www.springframework.org/schema/tx"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd
|
||||
http://www.springframework.org/schema/tx
|
||||
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
|
||||
http://www.springframework.org/schema/aop
|
||||
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
">
|
||||
<!-- 1.引入db.properties -->
|
||||
<context:property-placeholder location="classpath:db.properties" />
|
||||
<!-- 2.开启spring ioc注解及扫描 -->
|
||||
<context:annotation-config />
|
||||
<context:component-scan base-package="com.test" />
|
||||
<!--3.开启aop注解-->
|
||||
<aop:aspectj-autoproxy/>
|
||||
<!-- 4.配置连接池 druid -->
|
||||
<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource"
|
||||
init-method="init" destroy-method="close">
|
||||
<property name="url" value="${jdbc_url}" />
|
||||
<property name="username" value="${jdbc_username}" />
|
||||
<property name="password" value="${jdbc_password}" />
|
||||
<!-- 数据源初始化自动创建10个连接 -->
|
||||
<property name="initialSize" value="10" />
|
||||
<property name="maxActive" value="20" />
|
||||
<property name="minIdle" value="0" />
|
||||
</bean>
|
||||
<!-- 5.配置sqlsessionfactroy -->
|
||||
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
|
||||
<!-- 5.1配置数据源 -->
|
||||
<property name="dataSource" ref="dataSource" />
|
||||
<!-- 5.2加载mapper文件 -->
|
||||
<property name="mapperLocations" value="classpath:com/test/dao/*.xml" />
|
||||
<property name="typeAliasesPackage" value="com.test.po" />
|
||||
<!--5.3 分页工具pagehelper的配置-->
|
||||
<property name="plugins">
|
||||
<array>
|
||||
<bean class="com.github.pagehelper.PageInterceptor">
|
||||
<property name="properties">
|
||||
<value>
|
||||
helperDialect=mysql
|
||||
reasonable=true
|
||||
</value>
|
||||
</property>
|
||||
</bean>
|
||||
</array>
|
||||
</property>
|
||||
</bean>
|
||||
<!-- 6.配置扫描器dao层接口 -->
|
||||
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
|
||||
<!--6.1 将映射文件与接口建立关联 -->
|
||||
<property name="basePackage" value="com.test.dao" />
|
||||
<!-- 6.2此处配置的是value 防止读取不到db.properties配置文件中的信息 -->
|
||||
<property name="sqlSessionFactoryBeanName" value="sqlSessionFactory" />
|
||||
</bean>
|
||||
<!-- 7.配置事务 -->
|
||||
<bean id="transactionManager"
|
||||
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
|
||||
<property name="dataSource" ref="dataSource" />
|
||||
</bean>
|
||||
<!-- 7开启事务的注解 -->
|
||||
<tx:annotation-driven transaction-manager="transactionManager" />
|
||||
</beans>
|
||||
|
@ -0,0 +1,4 @@
|
||||
jdbc_driver=com.mysql.jdbc.Driver
|
||||
jdbc_url=jdbc:mysql://127.0.0.1:3306/summer?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=UTC
|
||||
jdbc_username=root
|
||||
jdbc_password=HW0612hw
|
@ -1,11 +1,15 @@
|
||||
### jibie mudidi ###
|
||||
### 级别,目的地 ###
|
||||
log4j.rootLogger=debug, stdout,logfile
|
||||
### kongzhitai ###
|
||||
### 控制台 ###
|
||||
log4j.appender.stdout.charset=utf-8
|
||||
log4j.appender.stdout.encoding=utf-8
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.Target=System.err
|
||||
log4j.appender.stdout.layout=org.apache.log4j.SimpleLayout
|
||||
### wenjian ###
|
||||
|
||||
### 文件 ###
|
||||
|
||||
log4j.appender.logfile=org.apache.log4j.FileAppender
|
||||
log4j.appender.logfile.File=jbit.log
|
||||
log4j.appender.logfile.File=log4j.log
|
||||
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.logfile.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %l %F %p %m%n
|
||||
log4j.appender.logfile.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %l %F %p %m%n
|
@ -0,0 +1,16 @@
|
||||
<%--
|
||||
Created by IntelliJ IDEA.
|
||||
User: PH
|
||||
Date: 2020/8/3
|
||||
Time: 17:56
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
|
||||
<html>
|
||||
<head>
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
${productsList}
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,9 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
|
||||
<html>
|
||||
<body>
|
||||
<h2>1234</h2>
|
||||
</body>
|
||||
<script>
|
||||
window.location.href="/toIndex.do";
|
||||
</script>
|
||||
</html>
|
Binary file not shown.
@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:tx="http://www.springframework.org/schema/tx"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="
|
||||
http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-3.0.xsd
|
||||
http://www.springframework.org/schema/tx
|
||||
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
|
||||
http://www.springframework.org/schema/aop
|
||||
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
||||
">
|
||||
<!-- 1.引入db.properties -->
|
||||
<context:property-placeholder location="classpath:db.properties" />
|
||||
<!-- 2.开启spring ioc注解及扫描 -->
|
||||
<context:annotation-config />
|
||||
<context:component-scan base-package="com.test" />
|
||||
<!--3.开启aop注解-->
|
||||
<aop:aspectj-autoproxy/>
|
||||
<!-- 4.配置连接池 druid -->
|
||||
<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource"
|
||||
init-method="init" destroy-method="close">
|
||||
<property name="url" value="${jdbc_url}" />
|
||||
<property name="username" value="${jdbc_username}" />
|
||||
<property name="password" value="${jdbc_password}" />
|
||||
<!-- 数据源初始化自动创建10个连接 -->
|
||||
<property name="initialSize" value="10" />
|
||||
<property name="maxActive" value="20" />
|
||||
<property name="minIdle" value="0" />
|
||||
</bean>
|
||||
<!-- 5.配置sqlsessionfactroy -->
|
||||
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
|
||||
<!-- 5.1配置数据源 -->
|
||||
<property name="dataSource" ref="dataSource" />
|
||||
<!-- 5.2加载mapper文件 -->
|
||||
<property name="mapperLocations" value="classpath:com/test/dao/*.xml" />
|
||||
<property name="typeAliasesPackage" value="com.test.po" />
|
||||
<!--5.3 分页工具pagehelper的配置-->
|
||||
<property name="plugins">
|
||||
<array>
|
||||
<bean class="com.github.pagehelper.PageInterceptor">
|
||||
<property name="properties">
|
||||
<value>
|
||||
helperDialect=mysql
|
||||
reasonable=true
|
||||
</value>
|
||||
</property>
|
||||
</bean>
|
||||
</array>
|
||||
</property>
|
||||
</bean>
|
||||
<!-- 6.配置扫描器dao层接口 -->
|
||||
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
|
||||
<!--6.1 将映射文件与接口建立关联 -->
|
||||
<property name="basePackage" value="com.test.dao" />
|
||||
<!-- 6.2此处配置的是value 防止读取不到db.properties配置文件中的信息 -->
|
||||
<property name="sqlSessionFactoryBeanName" value="sqlSessionFactory" />
|
||||
</bean>
|
||||
<!-- 7.配置事务 -->
|
||||
<bean id="transactionManager"
|
||||
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
|
||||
<property name="dataSource" ref="dataSource" />
|
||||
</bean>
|
||||
<!-- 7开启事务的注解 -->
|
||||
<tx:annotation-driven transaction-manager="transactionManager" />
|
||||
</beans>
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,149 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.test.dao.AdminsMapper" >
|
||||
<resultMap id="BaseResultMap" type="com.test.po.Admins" >
|
||||
<id column="adminid" property="adminid" jdbcType="INTEGER" />
|
||||
<result column="adminname" property="adminname" jdbcType="VARCHAR" />
|
||||
<result column="adminpwd" property="adminpwd" jdbcType="VARCHAR" />
|
||||
<result column="status" property="status" jdbcType="VARCHAR" />
|
||||
<result column="remark" property="remark" jdbcType="VARCHAR" />
|
||||
<result column="admindate" property="admindate" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause" >
|
||||
<where >
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or" >
|
||||
<if test="criteria.valid" >
|
||||
<trim prefix="(" suffix=")" prefixOverrides="and" >
|
||||
<foreach collection="criteria.criteria" item="criterion" >
|
||||
<choose >
|
||||
<when test="criterion.noValue" >
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue" >
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue" >
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue" >
|
||||
and ${criterion.condition}
|
||||
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List" >
|
||||
adminid, adminname, adminpwd, status, remark, admindate
|
||||
</sql>
|
||||
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.test.po.AdminsExample" >
|
||||
select
|
||||
<if test="distinct" >
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from admins
|
||||
<if test="_parameter != null" >
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null" >
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from admins
|
||||
where adminid = #{adminid,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
||||
delete from admins
|
||||
where adminid = #{adminid,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.test.po.Admins" >
|
||||
insert into admins (adminid, adminname, adminpwd,
|
||||
status, remark, admindate
|
||||
)
|
||||
values (#{adminid,jdbcType=INTEGER}, #{adminname,jdbcType=VARCHAR}, #{adminpwd,jdbcType=VARCHAR},
|
||||
#{status,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{admindate,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.test.po.Admins" >
|
||||
insert into admins
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="adminid != null" >
|
||||
adminid,
|
||||
</if>
|
||||
<if test="adminname != null" >
|
||||
adminname,
|
||||
</if>
|
||||
<if test="adminpwd != null" >
|
||||
adminpwd,
|
||||
</if>
|
||||
<if test="status != null" >
|
||||
status,
|
||||
</if>
|
||||
<if test="remark != null" >
|
||||
remark,
|
||||
</if>
|
||||
<if test="admindate != null" >
|
||||
admindate,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="adminid != null" >
|
||||
#{adminid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="adminname != null" >
|
||||
#{adminname,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="adminpwd != null" >
|
||||
#{adminpwd,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null" >
|
||||
#{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remark != null" >
|
||||
#{remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="admindate != null" >
|
||||
#{admindate,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.test.po.Admins" >
|
||||
update admins
|
||||
<set >
|
||||
<if test="adminname != null" >
|
||||
adminname = #{adminname,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="adminpwd != null" >
|
||||
adminpwd = #{adminpwd,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="status != null" >
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remark != null" >
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="admindate != null" >
|
||||
admindate = #{admindate,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where adminid = #{adminid,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.test.po.Admins" >
|
||||
update admins
|
||||
set adminname = #{adminname,jdbcType=VARCHAR},
|
||||
adminpwd = #{adminpwd,jdbcType=VARCHAR},
|
||||
status = #{status,jdbcType=VARCHAR},
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
admindate = #{admindate,jdbcType=VARCHAR}
|
||||
where adminid = #{adminid,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
Binary file not shown.
@ -0,0 +1,160 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.test.dao.CartMapper" >
|
||||
<resultMap id="BaseResultMap" type="com.test.po.Cart" >
|
||||
<id column="carid" property="carid" jdbcType="INTEGER" />
|
||||
<result column="pid" property="pid" jdbcType="INTEGER" />
|
||||
<result column="pname" property="pname" jdbcType="VARCHAR" />
|
||||
<result column="count" property="count" jdbcType="INTEGER" />
|
||||
<result column="imgurl" property="imgurl" jdbcType="VARCHAR" />
|
||||
<result column="uid" property="uid" jdbcType="INTEGER" />
|
||||
<result column="price" property="price" jdbcType="DOUBLE" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause" >
|
||||
<where >
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or" >
|
||||
<if test="criteria.valid" >
|
||||
<trim prefix="(" suffix=")" prefixOverrides="and" >
|
||||
<foreach collection="criteria.criteria" item="criterion" >
|
||||
<choose >
|
||||
<when test="criterion.noValue" >
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue" >
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue" >
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue" >
|
||||
and ${criterion.condition}
|
||||
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List" >
|
||||
carid, pid, pname, count, imgurl, uid, price
|
||||
</sql>
|
||||
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.test.po.CartExample" >
|
||||
select
|
||||
<if test="distinct" >
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from cart
|
||||
<if test="_parameter != null" >
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null" >
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from cart
|
||||
where carid = #{carid,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
||||
delete from cart
|
||||
where carid = #{carid,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.test.po.Cart" >
|
||||
insert into cart (carid, pid, pname,
|
||||
count, imgurl, uid,
|
||||
price)
|
||||
values (#{carid,jdbcType=INTEGER}, #{pid,jdbcType=INTEGER}, #{pname,jdbcType=VARCHAR},
|
||||
#{count,jdbcType=INTEGER}, #{imgurl,jdbcType=VARCHAR}, #{uid,jdbcType=INTEGER},
|
||||
#{price,jdbcType=DOUBLE})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.test.po.Cart" >
|
||||
insert into cart
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="carid != null" >
|
||||
carid,
|
||||
</if>
|
||||
<if test="pid != null" >
|
||||
pid,
|
||||
</if>
|
||||
<if test="pname != null" >
|
||||
pname,
|
||||
</if>
|
||||
<if test="count != null" >
|
||||
count,
|
||||
</if>
|
||||
<if test="imgurl != null" >
|
||||
imgurl,
|
||||
</if>
|
||||
<if test="uid != null" >
|
||||
uid,
|
||||
</if>
|
||||
<if test="price != null" >
|
||||
price,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="carid != null" >
|
||||
#{carid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="pid != null" >
|
||||
#{pid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="pname != null" >
|
||||
#{pname,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="count != null" >
|
||||
#{count,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="imgurl != null" >
|
||||
#{imgurl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="uid != null" >
|
||||
#{uid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="price != null" >
|
||||
#{price,jdbcType=DOUBLE},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.test.po.Cart" >
|
||||
update cart
|
||||
<set >
|
||||
<if test="pid != null" >
|
||||
pid = #{pid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="pname != null" >
|
||||
pname = #{pname,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="count != null" >
|
||||
count = #{count,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="imgurl != null" >
|
||||
imgurl = #{imgurl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="uid != null" >
|
||||
uid = #{uid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="price != null" >
|
||||
price = #{price,jdbcType=DOUBLE},
|
||||
</if>
|
||||
</set>
|
||||
where carid = #{carid,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.test.po.Cart" >
|
||||
update cart
|
||||
set pid = #{pid,jdbcType=INTEGER},
|
||||
pname = #{pname,jdbcType=VARCHAR},
|
||||
count = #{count,jdbcType=INTEGER},
|
||||
imgurl = #{imgurl,jdbcType=VARCHAR},
|
||||
uid = #{uid,jdbcType=INTEGER},
|
||||
price = #{price,jdbcType=DOUBLE}
|
||||
where carid = #{carid,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
Binary file not shown.
@ -0,0 +1,101 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.test.dao.CategoryMapper" >
|
||||
<resultMap id="BaseResultMap" type="com.test.po.Category" >
|
||||
<id column="cid" property="cid" jdbcType="INTEGER" />
|
||||
<result column="cname" property="cname" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause" >
|
||||
<where >
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or" >
|
||||
<if test="criteria.valid" >
|
||||
<trim prefix="(" suffix=")" prefixOverrides="and" >
|
||||
<foreach collection="criteria.criteria" item="criterion" >
|
||||
<choose >
|
||||
<when test="criterion.noValue" >
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue" >
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue" >
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue" >
|
||||
and ${criterion.condition}
|
||||
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List" >
|
||||
cid, cname
|
||||
</sql>
|
||||
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.test.po.CategoryExample" >
|
||||
select
|
||||
<if test="distinct" >
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from category
|
||||
<if test="_parameter != null" >
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null" >
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from category
|
||||
where cid = #{cid,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
||||
delete from category
|
||||
where cid = #{cid,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.test.po.Category" >
|
||||
insert into category (cid, cname)
|
||||
values (#{cid,jdbcType=INTEGER}, #{cname,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.test.po.Category" >
|
||||
insert into category
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="cid != null" >
|
||||
cid,
|
||||
</if>
|
||||
<if test="cname != null" >
|
||||
cname,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="cid != null" >
|
||||
#{cid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="cname != null" >
|
||||
#{cname,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.test.po.Category" >
|
||||
update category
|
||||
<set >
|
||||
<if test="cname != null" >
|
||||
cname = #{cname,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where cid = #{cid,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.test.po.Category" >
|
||||
update category
|
||||
set cname = #{cname,jdbcType=VARCHAR}
|
||||
where cid = #{cid,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
Binary file not shown.
@ -0,0 +1,147 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.test.dao.ProductsMapper" >
|
||||
<resultMap id="BaseResultMap" type="com.test.po.Products" >
|
||||
<id column="pid" property="pid" jdbcType="INTEGER" />
|
||||
<result column="pname" property="pname" jdbcType="VARCHAR" />
|
||||
<result column="price" property="price" jdbcType="DOUBLE" />
|
||||
<result column="imgurl" property="imgurl" jdbcType="VARCHAR" />
|
||||
<result column="pdesc" property="pdesc" jdbcType="VARCHAR" />
|
||||
<result column="cid" property="cid" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause" >
|
||||
<where >
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or" >
|
||||
<if test="criteria.valid" >
|
||||
<trim prefix="(" suffix=")" prefixOverrides="and" >
|
||||
<foreach collection="criteria.criteria" item="criterion" >
|
||||
<choose >
|
||||
<when test="criterion.noValue" >
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue" >
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue" >
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue" >
|
||||
and ${criterion.condition}
|
||||
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List" >
|
||||
pid, pname, price, imgurl, pdesc, cid
|
||||
</sql>
|
||||
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.test.po.ProductsExample" >
|
||||
select
|
||||
<if test="distinct" >
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from products
|
||||
<if test="_parameter != null" >
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null" >
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from products
|
||||
where pid = #{pid,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
||||
delete from products
|
||||
where pid = #{pid,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.test.po.Products" >
|
||||
insert into products (pid, pname, price,
|
||||
imgurl, pdesc, cid)
|
||||
values (#{pid,jdbcType=INTEGER}, #{pname,jdbcType=VARCHAR}, #{price,jdbcType=DOUBLE},
|
||||
#{imgurl,jdbcType=VARCHAR}, #{pdesc,jdbcType=VARCHAR}, #{cid,jdbcType=INTEGER})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.test.po.Products" >
|
||||
insert into products
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="pid != null" >
|
||||
pid,
|
||||
</if>
|
||||
<if test="pname != null" >
|
||||
pname,
|
||||
</if>
|
||||
<if test="price != null" >
|
||||
price,
|
||||
</if>
|
||||
<if test="imgurl != null" >
|
||||
imgurl,
|
||||
</if>
|
||||
<if test="pdesc != null" >
|
||||
pdesc,
|
||||
</if>
|
||||
<if test="cid != null" >
|
||||
cid,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="pid != null" >
|
||||
#{pid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="pname != null" >
|
||||
#{pname,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="price != null" >
|
||||
#{price,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="imgurl != null" >
|
||||
#{imgurl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="pdesc != null" >
|
||||
#{pdesc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cid != null" >
|
||||
#{cid,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.test.po.Products" >
|
||||
update products
|
||||
<set >
|
||||
<if test="pname != null" >
|
||||
pname = #{pname,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="price != null" >
|
||||
price = #{price,jdbcType=DOUBLE},
|
||||
</if>
|
||||
<if test="imgurl != null" >
|
||||
imgurl = #{imgurl,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="pdesc != null" >
|
||||
pdesc = #{pdesc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cid != null" >
|
||||
cid = #{cid,jdbcType=INTEGER},
|
||||
</if>
|
||||
</set>
|
||||
where pid = #{pid,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.test.po.Products" >
|
||||
update products
|
||||
set pname = #{pname,jdbcType=VARCHAR},
|
||||
price = #{price,jdbcType=DOUBLE},
|
||||
imgurl = #{imgurl,jdbcType=VARCHAR},
|
||||
pdesc = #{pdesc,jdbcType=VARCHAR},
|
||||
cid = #{cid,jdbcType=INTEGER}
|
||||
where pid = #{pid,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
Binary file not shown.
@ -0,0 +1,147 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.test.dao.UserMapper" >
|
||||
<resultMap id="BaseResultMap" type="com.test.po.User" >
|
||||
<id column="uid" property="uid" jdbcType="INTEGER" />
|
||||
<result column="name" property="name" jdbcType="CHAR" />
|
||||
<result column="password" property="password" jdbcType="CHAR" />
|
||||
<result column="username" property="username" jdbcType="CHAR" />
|
||||
<result column="email" property="email" jdbcType="CHAR" />
|
||||
<result column="phone" property="phone" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<sql id="Example_Where_Clause" >
|
||||
<where >
|
||||
<foreach collection="oredCriteria" item="criteria" separator="or" >
|
||||
<if test="criteria.valid" >
|
||||
<trim prefix="(" suffix=")" prefixOverrides="and" >
|
||||
<foreach collection="criteria.criteria" item="criterion" >
|
||||
<choose >
|
||||
<when test="criterion.noValue" >
|
||||
and ${criterion.condition}
|
||||
</when>
|
||||
<when test="criterion.singleValue" >
|
||||
and ${criterion.condition} #{criterion.value}
|
||||
</when>
|
||||
<when test="criterion.betweenValue" >
|
||||
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||||
</when>
|
||||
<when test="criterion.listValue" >
|
||||
and ${criterion.condition}
|
||||
<foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
|
||||
#{listItem}
|
||||
</foreach>
|
||||
</when>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
</if>
|
||||
</foreach>
|
||||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List" >
|
||||
uid, name, password, username, email, phone
|
||||
</sql>
|
||||
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.test.po.UserExample" >
|
||||
select
|
||||
<if test="distinct" >
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from user
|
||||
<if test="_parameter != null" >
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null" >
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from user
|
||||
where uid = #{uid,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
||||
delete from user
|
||||
where uid = #{uid,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.test.po.User" >
|
||||
insert into user (uid, name, password,
|
||||
username, email, phone)
|
||||
values (#{uid,jdbcType=INTEGER}, #{name,jdbcType=CHAR}, #{password,jdbcType=CHAR},
|
||||
#{username,jdbcType=CHAR}, #{email,jdbcType=CHAR}, #{phone,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.test.po.User" >
|
||||
insert into user
|
||||
<trim prefix="(" suffix=")" suffixOverrides="," >
|
||||
<if test="uid != null" >
|
||||
uid,
|
||||
</if>
|
||||
<if test="name != null" >
|
||||
name,
|
||||
</if>
|
||||
<if test="password != null" >
|
||||
password,
|
||||
</if>
|
||||
<if test="username != null" >
|
||||
username,
|
||||
</if>
|
||||
<if test="email != null" >
|
||||
email,
|
||||
</if>
|
||||
<if test="phone != null" >
|
||||
phone,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
||||
<if test="uid != null" >
|
||||
#{uid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="name != null" >
|
||||
#{name,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="password != null" >
|
||||
#{password,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="username != null" >
|
||||
#{username,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="email != null" >
|
||||
#{email,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="phone != null" >
|
||||
#{phone,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.test.po.User" >
|
||||
update user
|
||||
<set >
|
||||
<if test="name != null" >
|
||||
name = #{name,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="password != null" >
|
||||
password = #{password,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="username != null" >
|
||||
username = #{username,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="email != null" >
|
||||
email = #{email,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="phone != null" >
|
||||
phone = #{phone,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where uid = #{uid,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.test.po.User" >
|
||||
update user
|
||||
set name = #{name,jdbcType=CHAR},
|
||||
password = #{password,jdbcType=CHAR},
|
||||
username = #{username,jdbcType=CHAR},
|
||||
email = #{email,jdbcType=CHAR},
|
||||
phone = #{phone,jdbcType=VARCHAR}
|
||||
where uid = #{uid,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue