Commit 0805330c authored by ms-dev's avatar ms-dev

4.5.8更新

parent f66a5583
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry including="**/*.java" kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
/target/
......@@ -25,11 +25,6 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
<triggers>full,incremental,</triggers>
......@@ -40,6 +35,11 @@
</dictionary>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
......
eclipse.preferences.version=1
encoding//src/main/webapp/manager/page.html=UTF-8
encoding/<project>=UTF-8
encoding//src/test/java=UTF-8
......@@ -4,11 +4,10 @@
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/test/java"/>
<dependent-module deploy-path="/" handle="module:/overlay/var/M2_REPO/net/mingsoft/ms-mdiy/1.0.1-SNAPSHOT/ms-mdiy-1.0.1-SNAPSHOT.war?unpackFolder=target/m2e-wtp/overlays&amp;includes=**/**&amp;excludes=META-INF/MANIFEST.MF">
<dependent-module deploy-path="/" handle="module:/overlay/var/M2_REPO/net/mingsoft/ms-mdiy/1.0.2-SNAPSHOT/ms-mdiy-1.0.2-SNAPSHOT.war?unpackFolder=target/m2e-wtp/overlays&amp;includes=**/**&amp;excludes=META-INF/MANIFEST.MF">
<dependency-type>consumes</dependency-type>
</dependent-module>
<dependent-module deploy-path="/" handle="module:/overlay/var/M2_REPO/net/mingsoft/ms-basic/1.0.2-SNAPSHOT/ms-basic-1.0.2-SNAPSHOT.war?unpackFolder=target/m2e-wtp/overlays&amp;includes=**/**&amp;excludes=META-INF/MANIFEST.MF">
<dependent-module deploy-path="/" handle="module:/overlay/var/M2_REPO/net/mingsoft/ms-basic/1.0.3-SNAPSHOT/ms-basic-1.0.3-SNAPSHOT.war?unpackFolder=target/m2e-wtp/overlays&amp;includes=**/**&amp;excludes=META-INF/MANIFEST.MF">
<dependency-type>consumes</dependency-type>
</dependent-module>
<dependent-module deploy-path="/" handle="module:/overlay/slf/?includes=**/**&amp;excludes=META-INF/MANIFEST.MF">
......
#铭飞MCMS内容管理系统完整开源版J2EE代码
当前版本:4.5.7<br/>
当前版本:4.5.8<br/>
铭飞MS官网:http://ms.mingsoft.net<br/>
官网同时提供一键运行版本下载,请步移官网....<br/>
QQ交流群号1:221335098<br/>
......
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Log4J Log Messages</title>
<style type="text/css">
<!--
body, table {font-family: arial,sans-serif; font-size: x-small;}
th {background: #336699; color: #FFFFFF; text-align: left;}
-->
</style>
</head>
<body bgcolor="#FFFFFF" topmargin="6" leftmargin="6">
<hr size="1" noshade>
Log session start time Mon Jun 27 15:12:50 CST 2016<br>
<br>
<table cellspacing="0" cellpadding="4" border="1" bordercolor="#224466" width="100%">
<tr>
<th>Time</th>
<th>Thread</th>
<th>Level</th>
<th>Category</th>
<th>File:Line</th>
<th>Message</th>
</tr>
<tr>
<td>0</td>
<td title="main thread">main</td>
<td title="Level"><font color="#993300"><strong>ERROR</strong></font></td>
<td title="org.springframework.web.context.ContextLoader category">org.springframework.web.context.ContextLoader</td>
<td>ContextLoader.java:331</td>
<td title="Message">Context initialization failed</td>
</tr>
<tr><td bgcolor="#993300" style="color:White; font-size : xx-small;" colspan="6">org.springframework.beans.factory.BeanDefinitionStoreException: Failed to load bean class: com.mingsoft.cms.action.DedeAction; nested exception is java.io.FileNotFoundException: class path resource [com/mingsoft/basic/action/BaseAction.class] cannot be opened because it does not exist
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:162)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:299)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:243)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:254)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:94)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:609)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:782)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:424)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:774)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:249)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1242)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.eclipse.jetty.server.Server.doStart(Server.java:282)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at net.sourceforge.eclipsejetty.starter.embedded.JettyEmbeddedAdapter.start(JettyEmbeddedAdapter.java:67)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at net.sourceforge.eclipsejetty.starter.common.AbstractJettyLauncherMain.launch(AbstractJettyLauncherMain.java:84)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at net.sourceforge.eclipsejetty.starter.embedded.JettyEmbeddedLauncherMain.main(JettyEmbeddedLauncherMain.java:42)
<br>&nbsp;&nbsp;&nbsp;&nbsp;Caused by: java.io.FileNotFoundException: class path resource [com/mingsoft/basic/action/BaseAction.class] cannot be opened because it does not exist
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:172)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.core.type.classreading.SimpleMetadataReader.&lt;init&gt;(SimpleMetadataReader.java:50)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:82)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:102)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:77)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.context.annotation.ConfigurationClassParser.asSourceClass(ConfigurationClassParser.java:563)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.context.annotation.ConfigurationClassParser$SourceClass.getSuperClass(ConfigurationClassParser.java:726)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:287)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:218)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:176)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:158)
<br>&nbsp;&nbsp;&nbsp;&nbsp; ... 23 more
</td></tr>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Log4J Log Messages</title>
<style type="text/css">
<!--
body, table {font-family: arial,sans-serif; font-size: x-small;}
th {background: #336699; color: #FFFFFF; text-align: left;}
-->
</style>
</head>
<body bgcolor="#FFFFFF" topmargin="6" leftmargin="6">
<hr size="1" noshade>
Log session start time Mon Jun 27 15:12:50 CST 2016<br>
<br>
<table cellspacing="0" cellpadding="4" border="1" bordercolor="#224466" width="100%">
<tr>
<th>Time</th>
<th>Thread</th>
<th>Level</th>
<th>Category</th>
<th>File:Line</th>
<th>Message</th>
</tr>
<tr>
<td>0</td>
<td title="main thread">main</td>
<td title="Level"><font color="#993300"><strong>ERROR</strong></font></td>
<td title="org.springframework.web.context.ContextLoader category">org.springframework.web.context.ContextLoader</td>
<td>ContextLoader.java:331</td>
<td title="Message">Context initialization failed</td>
</tr>
<tr><td bgcolor="#993300" style="color:White; font-size : xx-small;" colspan="6">org.springframework.beans.factory.BeanDefinitionStoreException: Failed to load bean class: com.mingsoft.cms.action.DedeAction; nested exception is java.io.FileNotFoundException: class path resource [com/mingsoft/basic/action/BaseAction.class] cannot be opened because it does not exist
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:162)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:299)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:243)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:254)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:94)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:609)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:782)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:424)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:774)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:249)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1242)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:717)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.eclipse.jetty.server.Server.doStart(Server.java:282)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at net.sourceforge.eclipsejetty.starter.embedded.JettyEmbeddedAdapter.start(JettyEmbeddedAdapter.java:67)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at net.sourceforge.eclipsejetty.starter.common.AbstractJettyLauncherMain.launch(AbstractJettyLauncherMain.java:84)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at net.sourceforge.eclipsejetty.starter.embedded.JettyEmbeddedLauncherMain.main(JettyEmbeddedLauncherMain.java:42)
<br>&nbsp;&nbsp;&nbsp;&nbsp;Caused by: java.io.FileNotFoundException: class path resource [com/mingsoft/basic/action/BaseAction.class] cannot be opened because it does not exist
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:172)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.core.type.classreading.SimpleMetadataReader.&lt;init&gt;(SimpleMetadataReader.java:50)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:82)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:102)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:77)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.context.annotation.ConfigurationClassParser.asSourceClass(ConfigurationClassParser.java:563)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.context.annotation.ConfigurationClassParser$SourceClass.getSuperClass(ConfigurationClassParser.java:726)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:287)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:218)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:176)
<br>&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:158)
<br>&nbsp;&nbsp;&nbsp;&nbsp; ... 23 more
</td></tr>
......@@ -4,7 +4,7 @@
<groupId>com.mingsoft</groupId>
<artifactId>mcms</artifactId>
<packaging>war</packaging>
<version>4.5.7</version>
<version>4.5.8</version>
<name>铭飞MCMS开源系统</name>
<url>http://ms.ming-soft.com</url>
<repositories>
......@@ -33,13 +33,13 @@
</repositories>
<properties>
<ms.util.version>1.0.0</ms.util.version>
<ms.base.version>1.0.0</ms.base.version>
<ms.base.version>1.0.2-SNAPSHOT</ms.base.version>
<ms.proxy.version>1.0.0</ms.proxy.version>
<ms.parser.version>1.0.0</ms.parser.version>
<ms.ueditor.version>1.0.0-SNAPSHOT</ms.ueditor.version>
<shiro-freemarker-tags.version>0.2-SNAPSHOT</shiro-freemarker-tags.version>
<ms.basic.version>1.0.2-SNAPSHOT</ms.basic.version>
<ms.mdiy.version>1.0.1-SNAPSHOT</ms.mdiy.version>
<ms.basic.version>1.0.3-SNAPSHOT</ms.basic.version>
<ms.mdiy.version>1.0.2-SNAPSHOT</ms.mdiy.version>
</properties>
<dependencies>
<!-- MAVEN源码加载 -->
......
......@@ -69,7 +69,7 @@ import com.mingsoft.util.StringUtil;
* </p>
*/
@Controller
@RequestMapping("/manager/cms/column")
@RequestMapping("/${managerPath}/cms/column")
public class ColumnAction extends BaseAction {
/**
......@@ -110,7 +110,7 @@ public class ColumnAction extends BaseAction {
model.addAttribute("column",new ColumnEntity());
model.addAttribute("listColumn", JSONObject.toJSON(list).toString());
model.addAttribute("listCm", listCm);
return Const.VIEW+"/cms/column/column";
return view("/cms/column/column");
}
/**
......@@ -287,7 +287,7 @@ public class ColumnAction extends BaseAction {
}
model.addAttribute("columnSuper", columnSuper);
model.addAttribute("listColumn", JSONObject.toJSON(list).toString());
return Const.VIEW+"/cms/column/column";
return view("/cms/column/column");
}
/**
......@@ -315,7 +315,7 @@ public class ColumnAction extends BaseAction {
//栏目链接标签拼接字符串
request.setAttribute("columnRegexConstant", IParserRegexConstant.HTML_SAVE_PATH+File.separator+websiteId);
request.setAttribute("listColumn", JSONArray.toJSONString(list));
return Const.VIEW+"/cms/column/column_list";
return view("/cms/column/column_list");
}
/**
......
......@@ -68,7 +68,7 @@ import com.mingsoft.util.StringUtil;
* </p>
*/
@Controller
@RequestMapping("/manager/cms/dede")
@RequestMapping("/${managerPath}/cms/dede")
public class DedeAction extends BaseAction {
/**
......@@ -112,7 +112,7 @@ public class DedeAction extends BaseAction {
// 获取本地栏目
List<ColumnEntity> localColumnList = columnBiz.queryColumnListByWebsiteId(managerSession.getBasicId());
model.addAttribute("localColumnList", JSONArray.toJSONString(localColumnList));
return Const.VIEW+"/cms/dede/dede";
return view("/cms/dede/dede");
}
/**
......
......@@ -40,6 +40,8 @@ import com.mingsoft.util.proxy.Header;
import com.mingsoft.util.proxy.Proxy;
import com.mingsoft.util.proxy.Result;
import net.mingsoft.basic.util.BasicUtil;
/**
*
* <p>
......@@ -76,7 +78,7 @@ import com.mingsoft.util.proxy.Result;
* </p>
*/
@Controller("cmsGenerater")
@RequestMapping("/manager/cms/generate")
@RequestMapping("/${managerPath}/cms/generate")
@Scope("request")
public class GeneraterAction extends BaseAction {
......@@ -117,7 +119,7 @@ public class GeneraterAction extends BaseAction {
*/
@RequestMapping("/all")
public String all() {
return Const.VIEW+"/cms/generate/generate_all";
return view("/cms/generate/generate_all");
}
......@@ -128,7 +130,7 @@ public class GeneraterAction extends BaseAction {
*/
@RequestMapping("/index")
public String index() {
return Const.VIEW+"/cms/generate/generate_index";
return view("/cms/generate/generate_index");
}
/**
......@@ -199,18 +201,17 @@ public class GeneraterAction extends BaseAction {
@ResponseBody
public boolean genernateColumn(HttpServletRequest request, HttpServletResponse response, @PathVariable int columnId) {
// 获取站点id
int appId = getManagerBySession(request).getBasicId();
AppEntity app = (AppEntity) appBiz.getEntity(appId);
AppEntity app = BasicUtil.getApp();
String mobileStyle = app.getAppMobileStyle(); // 手机端模版
String url = app.getAppHostUrl() + File.separator + IParserRegexConstant.HTML_SAVE_PATH + File.separator + app.getAppId();
// 站点生成后保存的html地址
String generatePath = getRealPath(request, IParserRegexConstant.HTML_SAVE_PATH) + File.separator + appId + File.separator;
String generatePath = getRealPath(request, IParserRegexConstant.HTML_SAVE_PATH) + File.separator + app.getAppId() + File.separator;
FileUtil.createFolder(generatePath);
// 网站风格物理路径
String tmpPath = getRealPath(request, IParserRegexConstant.REGEX_SAVE_TEMPLATE) + File.separator + appId + File.separator + app.getAppStyle();
String tmpPath = getRealPath(request, IParserRegexConstant.REGEX_SAVE_TEMPLATE) + File.separator + app.getAppId() + File.separator + app.getAppStyle();
List<ColumnEntity> columns = new ArrayList<ColumnEntity>();
// 如果栏目id小于0则更新所有的栏目,否则只更新选中的栏目
Integer modelId = modelBiz.getEntityByModelCode(ModelCode.CMS_COLUMN).getModelId(); // 查询当前模块编号
int modelId = BasicUtil.getModelCodeId(ModelCode.CMS_COLUMN); // 查询当前模块编号
if (columnId > 0) {
List<CategoryEntity> categorys = columnBiz.queryChildrenCategory(columnId, app.getAppId(),modelId);
for (CategoryEntity c : categorys) {
......@@ -382,7 +383,7 @@ public class GeneraterAction extends BaseAction {
model.addAttribute("now", new Date());
model.addAttribute("list", JSONArray.toJSONString(list));
return Const.VIEW+"/cms/generate/generate_article";
return view("/cms/generate/generate_article");
}
/**
......@@ -393,7 +394,7 @@ public class GeneraterAction extends BaseAction {
@RequestMapping("/product")
public String product(HttpServletRequest request) {
request.setAttribute("now", new Date());
return Const.VIEW+"/cms/generate/generate_product";
return view("/cms/generate/generate_product");
}
/**
......@@ -734,7 +735,7 @@ public class GeneraterAction extends BaseAction {
//获取所有的内容管理栏目
List<ColumnEntity> list = columnBiz.queryAll(websiteId,modelId);
model.addAttribute("list", JSONArray.toJSONString(list));
return Const.VIEW+"/cms/generate/generate_column";
return view("/cms/generate/generate_column");
}
/**
......
......@@ -21,7 +21,6 @@ import com.mingsoft.basic.action.BaseAction;
import com.mingsoft.base.entity.ListJson;
import com.mingsoft.cms.biz.IArticleBiz;
import com.mingsoft.basic.biz.IColumnBiz;
import com.mingsoft.cms.constant.e.CookieEnum;
import com.mingsoft.mdiy.biz.IContentModelBiz;
import com.mingsoft.mdiy.biz.IContentModelFieldBiz;
import com.mingsoft.basic.constant.e.CookieConstEnum;
......@@ -111,7 +110,6 @@ public class ArticleAction extends BaseAction {
// 判断内容模型的值
if (contentModel != null) {
this.outJson(response, this.getResString("err"));
Map where = new HashMap();
// 压入basicId字段的值
where.put("basicId", basicId);
......@@ -129,42 +127,6 @@ public class ArticleAction extends BaseAction {
this.outJson(response, JSONObject.toJSONStringWithDateFormat(article, "yyyy-MM-dd hh:mm:ss"));
}
/**
* 更新文章点击数
*
* @param basicId
* 文章编号
* <dt><span class="strong">返回</span></dt><br/>
* {code:"模块编码",<br/>
* result:"true|false",<br/>
* resultMsg:"错误信息",<br/>
* resultData:"成功会返回最新点击数"<br/>
* }
*/
@RequestMapping(value = "/{basicId}/hit", method = RequestMethod.POST)
@ResponseBody
public void hit(@PathVariable int basicId, HttpServletRequest request, HttpServletResponse response) {
if (basicId <= 0) {
this.outJson(response, false);
}
// 获取文章实体
ArticleEntity article = articleBiz.getById(basicId);
// 判断文章是否存在
if (article == null) {
this.outJson(response, false);
}
// 判断该文章是否是改应用下
if (article.getArticleWebId() != this.getAppId(request)) {
this.outJson(response, false);
}
String str = this.getCookie(request, CookieEnum.BASIC_HIT);
if (StringUtil.isBlank(str) || Integer.parseInt(str) != basicId) {
// 更新点击量
articleBiz.updateHit(basicId, article.getBasicHit() + 1);
this.setCookie(request, response, CookieEnum.BASIC_HIT, basicId);
this.outJson(response, null, true, "", String.valueOf(article.getBasicHit() + 1));
}
}
/**
* 文章列表信息
......
......@@ -43,6 +43,7 @@ import com.mingsoft.util.StringUtil;
@RequestMapping("/mcms")
public class MCmsAction extends com.mingsoft.mdiy.action.BaseAction{
/**
* 替换时间的字符
*/
......@@ -68,9 +69,9 @@ public class MCmsAction extends com.mingsoft.mdiy.action.BaseAction{
@RequestMapping("/{diy}.do")
@ExceptionHandler(java.lang.NullPointerException.class)
public void diy(@PathVariable(value = "diy") String diy, HttpServletRequest req, HttpServletResponse resp) {
String content = this.generaterPage(diy,cmsParser,req);
String content = this.generaterPage("mcms/" + diy,cmsParser,req);
if (StringUtil.isBlank(content)) {
this.outString(resp, this.getResString("err"));
this.outString(resp, this.getResString("err.not.exist","mcms/"+diy));
return;
}
//增加时间
......
......@@ -20,4 +20,5 @@ public final class Const {
*/
public static final ResourceBundle ARTICLE_ATTRIBUTE_RESOURCE = ResourceBundle.getBundle("com.mingsoft.cms.resources.article_attribute");
public static final String LOGIN_URL = "login_url";
}
\ No newline at end of file
package com.mingsoft.cms.constant.e;
import com.mingsoft.base.constant.e.BaseCookieEnum;
/**
* cookie枚举类
* @author 王天培QQ:78750478
* @version
* 版本号:100-000-000<br/>
* 创建日期:2012-03-15<br/>
* 历史修订:<br/>
*/
public enum CookieEnum implements BaseCookieEnum{
/**
* QQ登录保存当前用户点击地址的session
*/
BASIC_HIT("basic_hit");
/**
* 设置CookieConst的常量
* @param attr 常量
*/
CookieEnum(String attr) {
this.attr = attr;
}
private String attr;
/**
* 返回该CookieConst常量的字符串表示
* @return 字符串
*/
@Override
public String toString() {
// TODO Auto-generated method stub
return attr;
}
}
......@@ -24,7 +24,6 @@ import com.mingsoft.cms.parser.impl.ArticleContentParser;
import com.mingsoft.cms.parser.impl.ArticleDateParser;
import com.mingsoft.cms.parser.impl.ArticleDescripParser;
import com.mingsoft.cms.parser.impl.ArticleHistoryParser;
import com.mingsoft.cms.parser.impl.ArticleHitParser;
import com.mingsoft.cms.parser.impl.ArticleIdParser;
import com.mingsoft.cms.parser.impl.ArticleKeywordParser;
import com.mingsoft.cms.parser.impl.ArticleLinkParser;
......@@ -36,6 +35,7 @@ import com.mingsoft.cms.parser.impl.ArticleTypeLinkParser;
import com.mingsoft.cms.parser.impl.ArticleTypeTitleParser;
import com.mingsoft.cms.parser.impl.ChannelParser;
import com.mingsoft.cms.parser.impl.ColumnParser;
import com.mingsoft.cms.parser.impl.HitParser;
import com.mingsoft.mdiy.biz.IContentModelBiz;
import com.mingsoft.mdiy.biz.IContentModelFieldBiz;
import com.mingsoft.mdiy.entity.ContentModelEntity;
......@@ -50,6 +50,8 @@ import com.mingsoft.parser.impl.general.PageParser;
import com.mingsoft.util.PageUtil;
import com.mingsoft.util.StringUtil;
import net.mingsoft.basic.util.BasicUtil;
/**
* 替换标签类
*
......@@ -184,6 +186,9 @@ public class CmsParser extends IGeneralParser {
if (o instanceof ArticleEntity) { //显示文章内容的时候必须存在
article = (ArticleEntity)o;
}
if (o instanceof AppEntity) { //显示文章内容的时候必须存在
app = (AppEntity)o;
}
if (o instanceof PageUtil) { //显示 文章搜索的时候必须存在
page = (PageUtil)o;
}
......@@ -211,12 +216,16 @@ public class CmsParser extends IGeneralParser {
}
String isPaging = property.get(ListParser.LIST_ISPAGING);
if (!StringUtil.isBlank(isPaging) && isPaging.equals("true")) {
List<Integer> columnIds = new ArrayList<Integer>();
int[] columnIds = null;
if(column!=null){
// 取出当前栏目下的子栏目Id
if (column.getCategoryId() != 0) {
columnIds = columnBiz.queryChildIdsByColumnId(column.getCategoryId(), app.getAppId());
columnIds.add(column.getCategoryId());
int[] _columnIds = columnBiz.queryChildIdsByColumnId(column.getCategoryId(), app.getAppId());
columnIds = new int [_columnIds.length+1];
if (_columnIds.length>0) {
System.arraycopy(_columnIds, 0, columnIds, 0, _columnIds.length-1);
}
columnIds[_columnIds.length] = column.getCategoryId();
}
}
// 列表每页显示的数量
......@@ -226,7 +235,8 @@ public class CmsParser extends IGeneralParser {
// 显示文章的形式noflag属性
String noFlag = property.get(ListParser.LIST_NOFLAG);
// 数据库中该栏目下文章的总数
int articleCount = articleBiz.getCountByColumnId(website.getAppId(), columnIds, flag, noFlag);
;
int articleCount = articleBiz.count(website.getAppId(), columnIds, flag, noFlag, null);
// 当用户知道的显示数量小于0或大于文章实际总数时
if (size <= 0 || size > articleCount) {
size = articleCount;
......@@ -261,7 +271,6 @@ public class CmsParser extends IGeneralParser {
Map<String, String> property = ListParser.listProperty(super.htmlContent, false);
// 取当前标签下的栏目ID
int columnId = StringUtil.string2Int(property.get(ListParser.LIST_TYPEID));
List<Integer> columnIds = new ArrayList<Integer>();
// 列表每页显示的数量
int size = StringUtil.string2Int(property.get(ListParser.LIST_SIZE));
// 显示文章的形式flag属性
......@@ -272,9 +281,15 @@ public class CmsParser extends IGeneralParser {
String orderBy = property.get(ListParser.LIST_ORDERBY);
String order = property.get(ListParser.LIST_ORDER);
// 取出当前栏目下的子栏目Id
int[] columnIds = null;
if (columnId != 0) {
columnIds = columnBiz.queryChildIdsByColumnId(columnId, app.getAppId());
columnIds.add(columnId);
int[] _columnIds = columnBiz.queryChildIdsByColumnId(columnId, app.getAppId());
columnIds = new int[_columnIds.length+1];
if (_columnIds.length>0) {
System.arraycopy(_columnIds, 0, columnIds, 0, _columnIds.length);
}
columnIds[_columnIds.length]=columnId;
} else {
columnId = this.curColumnId;
columnIds = columnBiz.queryChildrenCategoryIds(columnId, app.getAppId(),modelId);
......@@ -295,11 +310,13 @@ public class CmsParser extends IGeneralParser {
order = "desc";
}
// 从数据库取出文章列表数组
List<ArticleEntity> listArticles = articleBiz.queryList(app.getAppId(), columnIds, flag, noFlag, 0, size, orderBy, order.equals("desc") ? true : false);
BasicUtil.startPage(0,size,false);
List<ArticleEntity> listArticles = articleBiz.query(app.getAppId(), columnIds, flag, noFlag,orderBy, order.equals("desc") ? true : false,null);
BasicUtil.endPage(listArticles);
// 替换列表标签
htmlContent = new com.mingsoft.cms.parser.impl.ListParser(htmlContent, listArticles, this.getWebsiteUrl(), property, false, fieldBiz, contentBiz).parse();
htmlContent = new com.mingsoft.cms.parser.impl.ListParser(app,htmlContent, listArticles, this.getWebsiteUrl(), property, false, fieldBiz, contentBiz).parse();
}else{
htmlContent = new com.mingsoft.cms.parser.impl.ListParser(htmlContent, null, this.getWebsiteUrl(), property, false, fieldBiz, contentBiz).parse();
htmlContent = new com.mingsoft.cms.parser.impl.ListParser(app,htmlContent, null, this.getWebsiteUrl(), property, false, fieldBiz, contentBiz).parse();
}
}
return htmlContent;
......@@ -339,7 +356,7 @@ public class CmsParser extends IGeneralParser {
htmlContent = new ArticleTitleParser(htmlContent, article.getBasicTitle()).parse();
// 替换文章点击数标签: {ms:field.hit/}
htmlContent = new ArticleHitParser(htmlContent, article.getBasicHit()+"").parse();
htmlContent = new HitParser(htmlContent,"<script type='text/javascript' src='"+app.getAppHostUrl()+"/basic/"+article.getBasicId()+"/hit.do' ></script>").parse();
// 替换文章id标签: {ms:field.id/}
htmlContent = new ArticleIdParser(htmlContent, article.getBasicId() + "").parse();
......@@ -584,10 +601,15 @@ public class CmsParser extends IGeneralParser {
}
String isPaging = property.get(ListParser.LIST_ISPAGING);
if (isPaging != null && isPaging.equals("true")) {
List<Integer> columnIds = new ArrayList<Integer>();
int[] columnIds = null;
if (column!=null) {
this.curColumnId = column.getCategoryId();
columnIds = columnBiz.queryChildrenCategoryIds(curColumnId, app.getAppId(),modelId);
int[] _columnIds = columnBiz.queryChildrenCategoryIds(curColumnId, app.getAppId(),modelId);
columnIds = new int[_columnIds.length+1];
if (_columnIds.length>0) {
System.arraycopy(_columnIds, 0, columnIds, 0, _columnIds.length);
}
columnIds[_columnIds.length]=curColumnId;
// 取出当前栏目下的子栏目Id
// 列表每页显示的数量
int size = StringUtil.string2Int(property.get(ListParser.LIST_SIZE));
......@@ -598,7 +620,6 @@ public class CmsParser extends IGeneralParser {
// 排序
String orderBy = property.get(ListParser.LIST_ORDERBY);
String order = property.get(ListParser.LIST_ORDER);
columnIds.add(curColumnId);
// 数据库中该栏目下文章的总数
int articleCount = articleBiz.getCountByColumnId(app.getAppId(), columnIds, flag, noFlag);
// 如果没有指定文章每页显示数量则显示所有数量
......@@ -616,12 +637,14 @@ public class CmsParser extends IGeneralParser {
if (StringUtil.isBlank(order)) {
order = "desc";
}
BasicUtil.startPage(page.getPageNo(),page.getPageSize(),false);
// 从数据库取出文章列表数组
List<ArticleEntity> listArticles = articleBiz.queryList(this.app.getAppId(), columnIds, flag, noFlag, (page.getPageNo() * page.getPageSize()), page.getPageSize(), orderBy, order.equals("desc") ? true : false);
List<ArticleEntity> listArticles = articleBiz.query(this.app.getAppId(), columnIds, flag, noFlag, orderBy, order.equals("desc") ? true : false,null);
// 替换列表标签
htmlContent = new com.mingsoft.cms.parser.impl.ListParser(htmlContent, listArticles, this.getWebsiteUrl(), property, true, fieldBiz, contentBiz).parse();
htmlContent = new com.mingsoft.cms.parser.impl.ListParser(app,htmlContent, listArticles, this.getWebsiteUrl(), property, true, fieldBiz, contentBiz).parse();
}else{
htmlContent = new com.mingsoft.cms.parser.impl.ListParser(htmlContent, null, this.getWebsiteUrl(), property, true, fieldBiz, contentBiz).parse();
htmlContent = new com.mingsoft.cms.parser.impl.ListParser(app,htmlContent, null, this.getWebsiteUrl(), property, true, fieldBiz, contentBiz).parse();
}
}
}
......@@ -675,7 +698,7 @@ public class CmsParser extends IGeneralParser {
order = "desc";
}
// 替换列表标签
htmlContent = new com.mingsoft.cms.parser.impl.ListParser(htmlContent, listArticles, this.getWebsiteUrl(), property, true, fieldBiz, contentBiz).parse();
htmlContent = new com.mingsoft.cms.parser.impl.ListParser(app,htmlContent, listArticles, this.getWebsiteUrl(), property, true, fieldBiz, contentBiz).parse();
}
}
return htmlContent;
......
......@@ -9,19 +9,20 @@ import com.mingsoft.parser.IParser;
* 技术支持:景德镇铭飞科技
* 官网:www.ming-soft.com
*/
public class ArticleHitParser extends IParser {
public class HitParser extends IParser {
/**
* 文章标题标签
*/
private final static String ARTICLE_HIT_FIELD="\\{ms:field.hit/\\}";
/**
* 构造标签的属性
* @param htmlContent原HTML代码
* @param newContent替换的内容
*/
public ArticleHitParser(String htmlContent,String newContent){
public HitParser(String htmlContent,String newContent){
super.htmlCotent = htmlContent;
super.newCotent = newContent;
}
......
......@@ -10,6 +10,7 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import com.mingsoft.base.entity.BaseEntity;
import com.mingsoft.basic.entity.AppEntity;
import com.mingsoft.basic.entity.ColumnEntity;
import com.mingsoft.cms.constant.e.ColumnTypeEnum;
import com.mingsoft.cms.entity.ArticleEntity;
......@@ -41,10 +42,13 @@ import com.mingsoft.util.StringUtil;
* [field.typeid/]:分类编号,文章所属分类的编号,<br/>
* [field.typelink/]:分类连接,点击连接连接到当前分类的列表,<br/>
* [field.link/]:内容链接,点击显示文章具体的内容地址,<br/>
* [field.hit/]:信息点击预览数,<br/>
*
* @author 成卫雄 QQ:330216230 技术支持:景德镇铭飞科技 官网:www.ming-soft.com
*/
public class ListParser extends com.mingsoft.mdiy.parser.ListParser {
protected static final String FIELD_HIT = "\\[field.hit/\\]";
/**
* 新增字段业务层
......@@ -54,6 +58,8 @@ public class ListParser extends com.mingsoft.mdiy.parser.ListParser {
protected IContentModelBiz contentBiz;
protected AppEntity app;
/**
* 列表解析构造,
*
......@@ -68,7 +74,8 @@ public class ListParser extends com.mingsoft.mdiy.parser.ListParser {
* @param listProperty
*  当前标签属性
*/
public ListParser(String htmlCotent, List<ArticleEntity> articles,String websiteUrl, Map<String, String> listProperty, boolean isPaging,IContentModelFieldBiz fieldBiz,IContentModelBiz contentBiz) {
public ListParser(AppEntity app,String htmlCotent, List<ArticleEntity> articles,String websiteUrl, Map<String, String> listProperty, boolean isPaging,IContentModelFieldBiz fieldBiz,IContentModelBiz contentBiz) {
this.app = app;
String tabTmpContent = "";
if (isPaging) {
// 在HTML模版中标记出要用内容替换的标签
......@@ -84,6 +91,7 @@ public class ListParser extends com.mingsoft.mdiy.parser.ListParser {
super.htmlCotent = tabTmpContent;
}
/**
......@@ -132,6 +140,8 @@ public class ListParser extends com.mingsoft.mdiy.parser.ListParser {
htmlList = tabContent(htmlList, StringUtil.null2String(article.getArticleAuthor()),AUTHOR_FIELD_LIST);
// 文章来源。
htmlList = tabContent(htmlList, StringUtil.null2String(article.getArticleSource()),SOURCE_FIELD_LIST);
// 文章来源。
htmlList = tabContent(htmlList, "<script src='"+app.getAppHostUrl()+"/basic/"+article.getBasicId()+"/hit.do?isShow=true'></script>",FIELD_HIT);
// 文章发布时间(非必填),
htmlList = new DateParser(htmlList,article.getBasicDateTime()).parse();//tabContent(htmlList, date(article.getBasicUpdateTime(), htmlList),DATE_FIELD_LIST);
......
......@@ -42,7 +42,7 @@ import com.mingsoft.people.entity.PeopleEntity;
* </p>
*/
@Controller
@RequestMapping("/manager/people")
@RequestMapping("/${managerPath}/people")
public class PeopleAction extends BaseAction{
/**
......
......@@ -54,7 +54,7 @@ import com.mingsoft.util.StringUtil;
* </p>
*/
@Controller
@RequestMapping("/manager/people/student")
@RequestMapping("/${managerPath}/people/student")
public class PeopleStudentAction extends BaseAction{
/**
......@@ -97,7 +97,7 @@ public class PeopleStudentAction extends BaseAction{
List<PeopleStudentEntity> listPeopleStudent = this.peopleStudentBiz.queryByMap(appId, page,map);
mode.addAttribute("listPeopleStudent", listPeopleStudent);
mode.addAttribute("page", page);
return Const.VIEW+"/people/student/people_student_list";
return view("/people/student/people_student_list");
}
/**
......@@ -130,7 +130,7 @@ public class PeopleStudentAction extends BaseAction{
//获取用户实体信息
PeopleStudentEntity peopleStudent = peopleStudentBiz.getPeopleStudent(peopleId);
request.setAttribute("peopleStudent", peopleStudent);
return Const.VIEW+"/people/student/people_student";
return view("/people/student/people_student");
}
@RequestMapping("/update")
......
......@@ -26,6 +26,8 @@ import com.mingsoft.people.entity.PeopleUserEntity;
import com.mingsoft.util.PageUtil;
import com.mingsoft.util.StringUtil;
import net.mingsoft.basic.util.BasicUtil;
/**
*
* <p>
......@@ -53,7 +55,7 @@ import com.mingsoft.util.StringUtil;
*/
@Controller
@RequestMapping("/manager/people/user")
@RequestMapping("/${managerPath}/people/user")
public class PeopleUserAction extends BaseAction{
/**
......@@ -76,27 +78,19 @@ public class PeopleUserAction extends BaseAction{
* @return
*/
@RequestMapping("/list")
public String list(ModelMap mode,HttpServletRequest request,HttpServletResponse response){
//获取应用ID
public String list(PeopleEntity people,ModelMap mode,HttpServletRequest request,HttpServletResponse response){
int appId = this.getAppId(request);
int pageNo = this.getInt(request, "pageNo", 1);
Map map = assemblyRequestMap(request);
//查询用户总数
//int peopleCount = this.peopleBiz.queryCountByAppId(appId);
int peopleCount = this.peopleBiz.getCountByAppIdAndMap(appId, map);
map.put("pageNo", null);
//页面链接地址
String pageUrl = getUrl(request)+"/manager/people/user/list.do";
pageUrl= StringUtil.buildUrl(pageUrl, map);
//分页通用类
PageUtil page=new PageUtil(pageNo,20,peopleCount,pageUrl);
//获取用户列表
List<PeopleEntity> listPeople = this.peopleBiz.queryByAppIdAndMap(appId,map, page);
//List<PeopleEntity> listPeople = this.peopleBiz.queryPageListByAppId(appId,page);
mode.addAttribute("listPeople", listPeople);
mode.addAttribute("page", page);
this.setCookie(request, response,CookieConstEnum.BACK_COOKIE, pageUrl);
return Const.VIEW+"/people/user/people_user_list";
BasicUtil.startPage();
Map where = BasicUtil.assemblyRequestMap();
Object peopleDateTimeWhere = where.get("peopleDateTimeWhere");
if (!StringUtil.isBlank(peopleDateTimeWhere) ) {
where.put("peopleDateStartTime", peopleDateTimeWhere.toString().split("至")[0]);
where.put("peopleDateEndTime", peopleDateTimeWhere.toString().split("至")[1]);
}
List<PeopleEntity> listPeople = this.peopleBiz.query(appId,where);
BasicUtil.endPage(listPeople);
request.setAttribute("listPeople", listPeople);
return view("/people/user/people_user_list");
}
/**
......@@ -108,7 +102,7 @@ public class PeopleUserAction extends BaseAction{
int appId = this.getAppId(request);
model.addAttribute("appId", appId);
model.addAttribute("peopleUser",new PeopleUserEntity());
return Const.VIEW+"/people/user/people_user";
return view("/people/user/people_user");
}
......@@ -163,8 +157,6 @@ public class PeopleUserAction extends BaseAction{
//如果不存在则进行保存操作
if(oldPeopleUser!=null && oldPeopleUser.getPeopleUserPeopleId()==0){
this.peopleUserBiz.saveEntity(peopleUser);
this.outJson(response, ModelCode.PEOPLE_USER,true,cookieUrl);
return;
}
//判断用户密码是否为空,如果不为空则进行密码的更新
if(!StringUtil.isBlank(StringUtil.Md5(peopleUser.getPeoplePassword()))){
......@@ -172,7 +164,7 @@ public class PeopleUserAction extends BaseAction{
peopleUser.setPeoplePassword(StringUtil.Md5(peopleUser.getPeoplePassword()));
}
//存在则进行更新操作
this.peopleUserBiz.updatePeopleUser(peopleUser);;
this.peopleUserBiz.updatePeople(peopleUser);;
//返回更新成功
this.outJson(response, ModelCode.PEOPLE_USER,true,cookieUrl);
}
......@@ -213,7 +205,7 @@ public class PeopleUserAction extends BaseAction{
int appId = this.getAppId(request);
mode.addAttribute("appId", appId);
mode.addAttribute("peopleUser", peopleUser);
return Const.VIEW+"/people/user/people_user";
return view("/people/user/people_user");
}
/**
......
......@@ -47,6 +47,7 @@ public class PeopleAction extends BaseAction {
* @param people
* 用户信息<br/>
* <i>people参数包含字段信息参考:</i><br/>
* peopleOldPassword 用户旧密码<br/>
* peoplePassword 用户新密码<br/>
* <dt><span class="strong">返回</span></dt><br/>
* {code:"错误编码",<br/>
......@@ -64,16 +65,30 @@ public class PeopleAction extends BaseAction {
this.getResString("err.empty", this.getResString("people.password")));
return;
}
if (StringUtil.isBlank(people.getPeopleOldPassword())) {
// 用户或密码不能为空
this.outJson(response, ModelCode.PEOPLE, false,
this.getResString("err.empty", this.getResString("people.old.password")));
return;
}
// 验证新密码的长度
if (StringUtil.checkLength(people.getPeoplePassword(), 6, 30)) {
if (!StringUtil.checkLength(people.getPeoplePassword(), 6, 30)) {
this.outJson(response, ModelCode.PEOPLE, false,
this.getResString("err.length", this.getResString("people.password"), "6", "20"));
return;
}
// 获取用户session
PeopleEntity _people = this.getPeopleBySession(request);
PeopleEntity curPeople = peopleBiz.getByPeople(_people, this.getAppId(request));
if (!curPeople.getPeoplePassword().equals(StringUtil.Md5(people.getPeopleOldPassword()))) {
// 用户或密码不能为空
this.outJson(response, ModelCode.PEOPLE, false,
this.getResString("err.error", this.getResString("people.password")));
return;
}
// 将用户输入的原始密码用MD5加密再和数据库中的进行比对
String peoplePassWord = StringUtil.Md5(people.getPeoplePassword(), Const.UTF8);
// 执行修改
......@@ -227,7 +242,7 @@ public class PeopleAction extends BaseAction {
*
* @param key
*/
@RequestMapping("/{diy}")
@RequestMapping(value="/{diy}",method=RequestMethod.GET)
public void diy(@PathVariable(value = "diy") String diy, HttpServletRequest req, HttpServletResponse resp) {
String content = this.generaterPage("people/" + diy, peopleParser, req);
this.outString(resp, content);
......
......@@ -74,7 +74,7 @@ public class PeopleAction extends BaseAction {
}
/**
* 验证用户名、手机号、邮箱是否可用,同一时间只能判断一种,优先用户名称 <br/>
* 验证用户名、手机号、邮箱是否可用,同一时间只能判断一种,优先用户名称 ,只验证已绑定的用户,建议独立使用<br/>
*
* @param people
* 用户信息<br/>
......@@ -235,9 +235,10 @@ public class PeopleAction extends BaseAction {
}
/**
* 用户名、邮箱、手机号验证<br/>
* 用户名、邮箱、手机号验证 ,用户重置密码必须使用该接口<br/>
* 适用场景:?<br/>
* 1、用户注册是对用户名、邮箱或手机号唯一性判断 2、用户取回密码是判断账号是否存在
* 1、用户注册是对用户名、邮箱或手机号唯一性判断
* 2、用户取回密码是判断账号是否存在
*
* @param people
* 用户信息<br/>
......@@ -305,7 +306,7 @@ public class PeopleAction extends BaseAction {
@ResponseBody
public void register(@ModelAttribute PeopleEntity people, HttpServletRequest request,
HttpServletResponse response) {
LOG.debug("people register");
// 验证码验证 验证码不为null 或 验证码不相等
if (!checkRandCode(request)) {
this.outJson(response, null, false, this.getResString("err.error", this.getResString("rand.code")));
......@@ -346,10 +347,24 @@ public class PeopleAction extends BaseAction {
if (!StringUtil.isBlank(people.getPeoplePhone())) {// 验证手机号
PeopleEntity peoplePhone = this.peopleBiz.getEntityByUserName(people.getPeoplePhone(), appId);
if (peoplePhone != null && peoplePhone.getPeoplePhoneCheck() == PeopleEnum.PHONE_CHECK.toInt()) {
if (peoplePhone != null && peoplePhone.getPeoplePhoneCheck() == PeopleEnum.PHONE_CHECK.toInt()) { // 已存在
this.outJson(response, ModelCode.PEOPLE_REGISTER, false,
this.getResString("err.exist", this.getResString("people.phone")));
return;
} else {
Object obj = this.getSession(request, SessionConstEnum.SEND_CODE_SESSION);
if (obj != null) {
PeopleEntity _people = (PeopleEntity) obj;
if (_people.getPeoplePhone().equals(people.getPeoplePhone())) {
if (_people.getPeopleCode().equals(people.getPeopleCode())) {
people.setPeoplePhoneCheck(PeopleEnum.PHONE_CHECK);
} else {
this.outJson(response, ModelCode.PEOPLE_REGISTER, false,
this.getResString("err.error", this.getResString("people.code")));
return;
}
}
}
}
}
......@@ -359,6 +374,20 @@ public class PeopleAction extends BaseAction {
this.outJson(response, ModelCode.PEOPLE_REGISTER, false,
this.getResString("err.exist", this.getResString("people.mail")));
return;
} else {
Object obj = this.getSession(request, SessionConstEnum.SEND_CODE_SESSION);
if (obj != null) {
PeopleEntity _people = (PeopleEntity) obj;
if (_people.getPeopleMail().equals(people.getPeopleMail())) {
if (_people.getPeopleCode().equals(people.getPeopleCode())) {
people.setPeoplePhoneCheck(PeopleEnum.MAIL_CHECK);
} else {
this.outJson(response, ModelCode.PEOPLE_REGISTER, false,
this.getResString("err.error", this.getResString("people.mail")));
return;
}
}
}
}
}
......@@ -381,6 +410,7 @@ public class PeopleAction extends BaseAction {
this.peopleBiz.saveEntity(people);
this.outJson(response, ModelCode.PEOPLE_REGISTER, true,
this.getResString("success", this.getResString("people.register")));
LOG.debug("people register ok");
}
/**
......@@ -410,12 +440,14 @@ public class PeopleAction extends BaseAction {
this.outJson(response, null, false, this.getResString("err.error", this.getResString("rand.code")));
return;
}
// 验证新密码的长度
if (StringUtil.checkLength(people.getPeoplePassword(), 3, 12)) {
this.outJson(response, ModelCode.PEOPLE, false,
this.getResString("err.error", this.getResString("people.password")));
return;
}
PeopleEntity _people = (PeopleEntity) this.getSession(request, SessionConstEnum.PEOPLE_RESET_PASSWORD_SESSION);
if (_people == null) {
......@@ -476,6 +508,13 @@ public class PeopleAction extends BaseAction {
* 接收地址,只能是邮箱或手机号,邮箱需要使用邮箱插件,手机号需要短信插件
* @param modelCode
* 对应邮件插件的模块编号
* @param thrid
* 默认sendcloud
* @param rand_code
* 图片验证码 如果isSession=true rand_code为必填项
* @param isSession
* true启用session保存code,false 关联用户信息,true一般是当用户手机还不存在系统中时使用,
*
* <dt><span class="strong">返回</span></dt><br/>
* {result:"true|false"}<br/>
*/
......@@ -484,13 +523,8 @@ public class PeopleAction extends BaseAction {
public void sendCode(HttpServletRequest request, HttpServletResponse response) {
String receive = request.getParameter("receive");
String modelCode = request.getParameter("modelCode");
// 通过邮箱地址和应用id得到用户实体
PeopleEntity people = peopleBiz.getEntityByMailOrPhone(receive, this.getAppId(request));
if (people == null) {
this.outJson(response, ModelCode.PEOPLE, false,
this.getResString("err.not.exist", this.getResString("people.mail")));
return;
}
String thrid = request.getParameter("thrid");
boolean isSession = this.getBoolean(request, "isSession");
if (StringUtil.isBlank(receive)) {
this.outJson(response, ModelCode.PEOPLE, false, this.getResString("err.empty", "receive"));
......@@ -501,20 +535,70 @@ public class PeopleAction extends BaseAction {
return;
}
String peopleCode = StringUtil.randomNumber(6);
// 将生成的验证码加入用户实体
people.setPeopleCode(peopleCode);
// 将当前时间转换为时间戳格式保存进people表
people.setPeopleCodeSendDate(DateUtil.dateToTimestamp(new Date()));
// 更新该实体
this.peopleBiz.updateEntity(people);
// 解密得到的模块编码
String _modelCode = this.encryptByAES(request, modelCode);
Map params = new HashMap();
params.put("modelCode", _modelCode);
params.put("receive", receive);
params.put("thrid", thrid); // 使用第三方平台发送,确保用户能收到
params.put("content", "{code:'" + peopleCode + "'}");
if (isSession) { // 启用session
if (!this.checkRandCode(request)) {
this.outJson(response, ModelCode.PEOPLE, false,
this.getResString("err.error", this.getResString("rand.code")));
return;
}
Object obj = this.getSession(request, SessionConstEnum.SEND_CODE_SESSION);
if (obj != null) {
PeopleEntity p = (PeopleEntity) obj;
if (DateUtil.diffSec(new DateUtil(), new DateUtil(p.getPeopleCodeSendDate().getTime())) == 60) {
this.outJson(response, ModelCode.PEOPLE, false, this.getResString("people.code.time.error"));
return;
}
}
PeopleEntity _people = new PeopleEntity();
_people.setPeopleCode(peopleCode);
_people.setPeopleCodeSendDate(DateUtil.dateToTimestamp(new Date()));
if (StringUtil.isMobile(receive)) {
_people.setPeoplePhone(receive);
} else {
_people.setPeopleMail(receive);
}
this.setSession(request, SessionConstEnum.SEND_CODE_SESSION, _people);
if (StringUtil.isMobile(receive)) {
Result rs = Proxy.post(this.getUrl(request) + "/sms/send.do", null, params, Const.UTF8);
this.outJson(response, rs.getContent());
} else if (StringUtil.isEmail(receive)) {
Result rs = Proxy.post(this.getUrl(request) + "/mail/send.do", null, params, Const.UTF8);
String re = rs.getContent();
LOG.debug("send mail" + receive + ":content " + peopleCode + " " + re);
this.outJson(response, re);
}
return;
}
// 通过邮箱地址和应用id得到用户实体
PeopleEntity people = peopleBiz.getEntityByMailOrPhone(receive, this.getAppId(request));
if (people == null) {
this.outJson(response, ModelCode.PEOPLE, false,
this.getResString("err.not.exist", this.getResString("people")));
return;
}
if (people.getPeopleUser() != null) {
params.put("content",
"{code:'" + peopleCode + "',userName:'" + people.getPeopleUser().getPeopleUserNickName() + "'}");
}
// 将生成的验证码加入用户实体
people.setPeopleCode(peopleCode);
// 将当前时间转换为时间戳格式保存进people表
people.setPeopleCodeSendDate(DateUtil.dateToTimestamp(new Date()));
// 更新该实体
this.peopleBiz.updateEntity(people);
if (StringUtil.isMobile(receive)) {
Result rs = Proxy.post(this.getUrl(request) + "/sms/send.do", null, params, Const.UTF8);
......@@ -539,8 +623,8 @@ public class PeopleAction extends BaseAction {
* {result:"true|false"}<br/>
*/
@RequestMapping(value = "/checkSendCode", method = RequestMethod.POST)
public void checkSendCode( HttpServletRequest request, HttpServletResponse response) {
String code = request.getParameter("code");
public void checkSendCode(HttpServletRequest request, HttpServletResponse response) {
String code = request.getParameter("code");
String receive = request.getParameter("receive");
// 验证码
if (StringUtil.isBlank(code)) {
......@@ -552,7 +636,7 @@ public class PeopleAction extends BaseAction {
// 根据邮箱地址查找用户实体
PeopleEntity peopleEntity = this.peopleBiz.getEntityByMailOrPhone(receive, this.getAppId(request));
//如果用户已经绑定过邮箱直接返回错误
// 如果用户已经绑定过邮箱直接返回错误
if (peopleEntity.getPeoplePhoneCheck() == PeopleEnum.MAIL_CHECK.toInt()) {
this.outJson(response, ModelCode.PEOPLE, false);
return;
......
......@@ -2,10 +2,11 @@ package com.mingsoft.people.aop;
import javax.servlet.http.HttpServletRequest;
import com.mingsoft.base.entity.SessionEntity;
import com.mingsoft.people.constant.e.SessionConstEnum;
import net.mingsoft.basic.util.BasicUtil;
/**
* bbs切面基础方法
*
......@@ -24,6 +25,7 @@ public abstract class BaseAop extends com.mingsoft.basic.aop.BaseAop {
* HttpServletRequest对象
* @return 返回获取到的用户session,获取不到返回nul
*/
@Deprecated
protected SessionEntity getPeopleBySession(HttpServletRequest request) {
// 传入用户请求,读取用户的session || super,调用父类的protected属性的getSession方法
Object obj = this.getSession(request, SessionConstEnum.PEOPLE_SESSION);
......@@ -33,5 +35,22 @@ public abstract class BaseAop extends com.mingsoft.basic.aop.BaseAop {
}
return null;
}
/**
* 读取用户sessoin
*
* @param request
* HttpServletRequest对象
* @return 返回获取到的用户session,获取不到返回nul
*/
protected SessionEntity getPeopleBySession() {
// 传入用户请求,读取用户的session || super,调用父类的protected属性的getSession方法
Object obj = BasicUtil.getSession(SessionConstEnum.PEOPLE_SESSION);
if (obj != null) {
// 返回用户的所有信息
return (SessionEntity) obj;
}
return null;
}
}
/**
The MIT License (MIT) * Copyright (c) 2016 铭飞科技
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.mingsoft.people.biz;
import com.mingsoft.base.biz.IBaseBiz;
import com.mingsoft.util.*;
import java.util.*;
import com.mingsoft.people.entity.BasicPeopleEntity;
/**
* 通用用户与信息一对多表业务
* @author 铭飞开发团队
* @version
* 版本号:1.0.0<br/>
* 创建日期:<br/>
* 历史修订:<br/>
*/
public interface IBasicPeopleBiz extends IBaseBiz {
/**
* 查询
* @param basicPeople 通用用户与信息一对多表
* @return
*/
List query(BasicPeopleEntity basicPeople);
void saveBasicPeople(BasicPeopleEntity basicPeople);
void deleteBasicPeople(BasicPeopleEntity basicPeople);
}
\ No newline at end of file
......@@ -47,47 +47,41 @@ import com.mingsoft.util.PageUtil;
public interface IPeopleBiz extends IBaseBiz{
/**
* 用户有子类添加
* @param entity 用户实体
* @return 用户ID
* 根据用户ID删除用户实体,用于有子类的删除操作
* @param id 用户ID
*/
public int savePeople(PeopleEntity people);
public void deletePeople(int id);
/**
* 根据用户ID进行用户实体的更新,用于有子类的更新操作
* @param entity 用户实体
*/
public void updatePeople(PeopleEntity people);
/**
* 根据用户ID删除用户实体,用于有子类的删除操作
* @param id 用户ID
* 批量删除用户
* @param peopleIds 用户id集合
*/
public void deletePeople(int id);
public void deletePeople(int[] peopleIds);
/**
* 根据用户用户名查询用户实体</br>
* @param userName 用户名(注:手机号,邮箱,用户名称都可作为用户名登录)
* @param appId 应用Id
* @return 查询到的用户实体
* 更具用户实体获取用户信息,
* @param people 用户实体,可以设置用户名、用户邮箱、用户手机号
* @param appId 应用id
* @return 用户实体
*/
public PeopleEntity getEntityByUserName(String userName,int appId);
PeopleEntity getByPeople(PeopleEntity people,int appId);
/**
* 根据AppId查询用户列表并进行分页
* @param appId 应用Id
* @param page 分页
* @return 用户集合
* 根据应用id和其他查询条件查询用户总数
* @param appId 应用id
* @param whereMap 其他查询条件 key:字段属性名 value:字段属性值
* @return 用户总数
*/
public List<PeopleEntity> queryPageListByAppId(int appId,PageUtil page);
int getCountByAppIdAndMap(int appId,Map whereMap);
/**
* 根据应用ID查询用户总数
* @param appId 应用ID
* 根据注册时间和应用id查询总数
* @param peopleDateTime
* @param appId 应用id
* @return 用户总数
*/
public int queryCountByAppId(int appId);
public int getCountByDate(String peopleDateTime,Integer appId);
/**
* 根据用户名(帐号,手机,邮箱)和验证码查询用户信息开始
......@@ -99,49 +93,69 @@ public interface IPeopleBiz extends IBaseBiz{
public PeopleEntity getEntityByCode(String userName,String peopleCode,int appId);
/**
* 根据注册时间和应用id查询总数
* @param peopleDateTime
* @param appId 应用id
* @return 用户总数
* 根据用户用户名查询用户实体</br>
* @param userName 用户名(注:手机号,邮箱)
* @param appId 应用Id
* @return 查询到的用户实体
*/
public int getCountByDate(String peopleDateTime,Integer appId);
PeopleEntity getEntityByMailOrPhone(String userName,int appId);
/**
* 批量删除用户
* @param peopleIds 用户id集合
* 根据用户用户名查询用户实体</br>
* @param userName 用户名(注:手机号,邮箱,用户名称都可作为用户名登录)
* @param appId 应用Id
* @return 查询到的用户实体
*/
public void deletePeople(int[] peopleIds);
public PeopleEntity getEntityByUserName(String userName,int appId);
/**
* 根据应用id和其他查询条件查询用户列表信息
* @param appId 应用id
* @param whereMap 其他查询条件 key:字段属性名 value:字段属性值
* @return 用户列表信息
*
*/
@Deprecated
public List<PeopleEntity> queryByAppIdAndMap(int appId,Map whereMap,PageUtil page);
/**
* 根据应用id和其他查询条件查询用户总数
* @param appId 应用id
* @param whereMap 其他查询条件 key:字段属性名 value:字段属性值
* @return 用户总数
* 用户查询
* @param appId 应用编号
* @param people 用户
* @return
*/
int getCountByAppIdAndMap(int appId,Map whereMap);
public List<PeopleEntity> query(int appId,Map where);
/**
* 更具用户实体获取用户信息
* @param people 用户实体,可以设置用户名、用户邮箱、用户手机号
* @param appId 应用id
* @return 用户实体
* 根据应用ID查询用户总数
* @param appId 应用ID
* @return 用户总数
*/
PeopleEntity getByPeople(PeopleEntity people,int appId);
@Deprecated
public int queryCountByAppId(int appId);
/**
* 根据用户用户名查询用户实体</br>
* @param userName 用户名(注:手机号,邮箱)
* 根据AppId查询用户列表并进行分页
* @param appId 应用Id
* @return 查询到的用户实体
* @param page 分页
* @return 用户集合
*/
PeopleEntity getEntityByMailOrPhone(String userName,int appId);
@Deprecated
public List<PeopleEntity> queryPageListByAppId(int appId,PageUtil page);
/**
* 用户有子类添加
* @param entity 用户实体
* @return 用户ID
*/
public int savePeople(PeopleEntity people);
/**
* 根据用户ID进行用户实体的更新,用于有子类的更新操作
* @param entity 用户实体
*/
public void updatePeople(PeopleEntity people);
}
......@@ -49,7 +49,7 @@ public interface IPeopleUserBiz extends IPeopleBiz {
public int savePeopleUser(PeopleUserEntity peopleEntity);
/**
* 更新用户信息</br>
* 更新用户信息,</br>
* 只能在有子类时调用</br>
* @param peopleEntity 用户信息
*/
......
/**
The MIT License (MIT) * Copyright (c) 2016 铭飞科技
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.mingsoft.people.biz.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mingsoft.base.biz.impl.BaseBizImpl;
import com.mingsoft.base.dao.IBaseDao;
import com.mingsoft.util.*;
import java.util.*;
import com.mingsoft.people.entity.BasicPeopleEntity;
import com.mingsoft.people.biz.IBasicPeopleBiz;
import com.mingsoft.people.dao.IBasicPeopleDao;
/**
* 通用用户与信息一对多表管理持久化层
* @author 铭飞开发团队
* @version
* 版本号:1.0.0<br/>
* 创建日期:<br/>
* 历史修订:<br/>
*/
@Service("basicPeopleBizImpl")
public class BasicPeopleBizImpl extends BaseBizImpl implements IBasicPeopleBiz {
@Autowired
private IBasicPeopleDao basicPeopleDao;
@Override
protected IBaseDao getDao() {
// TODO Auto-generated method stub
return basicPeopleDao;
}
@Override
public List query(BasicPeopleEntity basicPeople) {
return basicPeopleDao.query(basicPeople);
}
@Override
public void saveBasicPeople(BasicPeopleEntity basicPeople) {
// TODO Auto-generated method stub
basicPeople.setBpDatetime(new Date());
basicPeopleDao.saveEntity(basicPeople);
saveEntity(basicPeople);
}
@Override
public void deleteBasicPeople(BasicPeopleEntity basicPeople) {
// TODO Auto-generated method stub
basicPeopleDao.deleteByEntity(basicPeople);
deleteEntity(basicPeople);
}
}
\ No newline at end of file
......@@ -169,6 +169,12 @@ public class PeopleBizImpl extends BaseBizImpl implements IPeopleBiz{
return peopleDao.getEntityByMailOrPhone(userName, appId);
}
@Override
public List<PeopleEntity> query(int appId, Map where) {
// TODO Auto-generated method stub
return peopleDao.query(appId,where);
}
......
......@@ -6,7 +6,11 @@ public enum CookieConstEnum implements BaseCookieEnum {
/**
* 用户的cookie
*/
PEOPLE_COOKIE("people_cookie");
PEOPLE_COOKIE("people_cookie"),
/**
* 用户登录地址
*/
PEOPLE_LOGIN_URL("people_login_url");
/**
* 设置session常量
......
......@@ -35,7 +35,12 @@ public enum SessionConstEnum implements BaseSessionEnum {
/**
* 用户更改手机号码的session
*/
PEOPEL_SET_PHONE_SESSION("people_set_phone_seesion");
PEOPEL_SET_PHONE_SESSION("people_set_phone_seesion"),
/**
* 用户发送验证码
*/
SEND_CODE_SESSION("send_code_seesion");
/**
* 设置session常量
......
/**
The MIT License (MIT) * Copyright (c) 2016 铭飞科技
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package com.mingsoft.people.dao;
import com.mingsoft.base.dao.IBaseDao;
import com.mingsoft.util.*;
import java.util.*;
import com.mingsoft.people.entity.BasicPeopleEntity;
/**
* 通用用户与信息一对多表持久层
* @author 铭飞开发团队
* @version
* 版本号:1.0.0<br/>
* 创建日期:<br/>
* 历史修订:<br/>
*/
public interface IBasicPeopleDao extends IBaseDao {
/**
* 查询
* @param basicPeople 通用用户与信息一对多表
* @return
*/
List query(BasicPeopleEntity basicPeople);
}
\ No newline at end of file
<?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.mingsoft.people.dao.IBasicPeopleDao">
<resultMap id="resultMap" type="com.mingsoft.people.entity.BasicPeopleEntity">
<result column="bp_id" property="bpId" /><!--信息编号 -->
<result column="bp_basic_id" property="bpBasicId" /><!--信息编号 -->
<result column="bp_people_id" property="bpPeopleId" /><!--用户编号 -->
<result column="bp_datetime" property="bpDatetime" /><!--创建时间 -->
</resultMap>
<!--保存 -->
<insert id="saveEntity" keyProperty="bpId" keyColumn="bp_id" useGeneratedKeys="true">
insert into basic_people
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="bpBasicId != null">bp_basic_id,</if>
<if test="bpPeopleId != null">bp_people_id,</if>
<if test="bpDatetime != null">bp_datetime,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="bpBasicId != null">#{bpBasicId},</if>
<if test="bpPeopleId != null">#{bpPeopleId},</if>
<if test="bpDatetime != null">#{bpDatetime},</if>
</trim>
</insert>
<insert id="deleteByEntity">
delete from basic_people
<where>
1=1
<if test="bpBasicId &gt; 0 ">
AND bp_basic_id=#{bpBasicId}
</if>
<if test="bpPeopleId &gt; 0 ">
AND bp_people_id=#{bpPeopleId}
</if>
</where>
</insert>
<!--条件查询 -->
<select id="query" resultMap="resultMap">
select * from basic_people
<where>
<if test="bpBasicId != null"> and bp_basic_id=#{bpBasicId} </if>
<if test="bpPeopleId != null"> and bp_people_id=#{bpPeopleId} </if>
<if test="bpDatetime != null"> and bp_datetime=#{bpDatetime} </if>
</where>
order by desc
</select>
</mapper>
\ No newline at end of file
......@@ -18,6 +18,7 @@
<result column="pa_province" property="peopleAddressProvince"/><!--收货人所在的省 -->
<result column="pa_city" property="peopleAddressCity"/><!--收货人所在的市 -->
<result column="pa_district" property="peopleAddressDistrict"/><!--收货人所在区 -->
<result column="pa_street" property="peopleAddressStreet"/><!--街道 -->
<result column="pa_address" property="peopleAddressAddress"/><!--收货人的详细收货地址-->
<result column="pa_mail" property="peopleAddressMail"/><!--收货人邮箱-->
<result column="pa_phone" property="peopleAddressPhone"/><!--收货人手机-->
......@@ -36,6 +37,7 @@
<if test="peopleAddressCity != null">pa_city,</if>
<if test="peopleAddressDistrict != null">pa_district,</if>
<if test="peopleAddressAddress != null">pa_address,</if>
<if test="peopleAddressStreet != null">pa_street,</if>
<if test="peopleAddressMail != null">pa_mail,</if>
<if test="peopleAddressPhone != null">pa_phone,</if>
<if test="peopleAddressDefault != null">pa_default,</if>
......@@ -48,6 +50,7 @@
<if test="peopleAddressCity != null">#{peopleAddressCity},</if>
<if test="peopleAddressDistrict != null">#{peopleAddressDistrict},</if>
<if test="peopleAddressAddress != null">#{peopleAddressAddress},</if>
<if test="peopleAddressStreet != null">#{peopleAddressStreet},</if>
<if test="peopleAddressMail != null">#{peopleAddressMail},</if>
<if test="peopleAddressPhone != null">#{peopleAddressPhone},</if>
<if test="peopleAddressDefault != null">#{peopleAddressDefault},</if>
......@@ -65,6 +68,7 @@
<if test="peopleAddressCity != null">pa_city=#{peopleAddressCity},</if>
<if test="peopleAddressDistrict != null">pa_district=#{peopleAddressDistrict},</if>
<if test="peopleAddressAddress != null">pa_address=#{peopleAddressAddress},</if>
<if test="peopleAddressStreet != null">pa_street=#{peopleAddressStreet},</if>
<if test="peopleAddressMail != null">pa_mail=#{peopleAddressMail},</if>
<if test="peopleAddressPhone != null">pa_phone=#{peopleAddressPhone},</if>
<if test="peopleAddressDefault != null">pa_default=#{peopleAddressDefault},</if>
......
......@@ -126,4 +126,13 @@ public interface IPeopleDao extends IBaseDao {
* @return 用户总数
*/
int getCountByAppIdAndMap(@Param("appId")int appId,@Param("whereMap")Map whereMap);
/**
* 用户查询
* @param appId 应用编号
* @param where 查询条件
* @return
*/
public List<PeopleEntity> query(@Param("appId")int appId, @Param("where")Map where);
}
......@@ -5,12 +5,12 @@
<!-- 表字段开始-->
<sql id="column_list">
PU.PU_PEOPLE_ID,PU.PU_REAL_NAME,PU.PU_ADDRESS,PU.PU_ICON,PU.PU_CARD,
PU.PU_NICKNAME,PU.PU_SEX,PU.PU_BIRTHDAY,PU.PU_APP_ID
PU.PU_NICKNAME,PU.PU_SEX,PU.PU_BIRTHDAY,PU.PU_APP_ID,PU.PU_PROVINCE,PU.PU_CITY,PU.PU_DISTRICT,PU.PU_STREET
</sql>
<sql id="column_people_list">
PU.PU_PEOPLE_ID,PU.PU_REAL_NAME,PU.PU_ADDRESS,PU.PU_ICON,PU.PU_NICKNAME,PU.PU_SEX,PU.PU_BIRTHDAY,PU.PU_APP_ID,PU.PU_CARD,
P.PEOPLE_ID,P.PEOPLE_PHONE,P.PEOPLE_NAME,P.PEOPLE_PASSWORD,P.PEOPLE_DATETIME,P.PEOPLE_APP_ID,P.PEOPLE_MAIL,P.PEOPLE_PHONECHECK,P.PEOPLE_MAILLCHECK
PU.PU_PEOPLE_ID,PU.PU_REAL_NAME,PU.PU_ADDRESS,PU.PU_ICON,PU.PU_NICKNAME,PU.PU_SEX,PU.PU_BIRTHDAY,PU.PU_APP_ID,PU.PU_CARD,PU.PU_PROVINCE,PU.PU_CITY,PU.PU_DISTRICT,PU.PU_STREET,
P.PEOPLE_ID,P.PEOPLE_STATE,P.PEOPLE_PHONE,P.PEOPLE_NAME,P.PEOPLE_PASSWORD,P.PEOPLE_DATETIME,P.PEOPLE_APP_ID,P.PEOPLE_MAIL,P.PEOPLE_PHONECHECK,P.PEOPLE_MAILLCHECK
</sql>
<!-- 表字段结束 -->
......@@ -25,6 +25,11 @@
<result column="PU_BIRTHDAY" property="peopleUserBirthday"/><!-- 用户生日 -->
<result column="PU_APP_ID" property="peopleUserAppId"/><!-- 用户应用ID -->
<result column="PU_CARD" property="peopleUserCard"/><!-- 用户身份证号码 -->
<result column="PU_PROVINCE" property="peopleUserProvince"/><!-- 省 -->
<result column="PU_CITY" property="peopleUserCity"/><!-- 市 -->
<result column="PU_DISTRICT" property="peopleUserDistrict"/><!-- 区县 -->
<result column="PU_STREET" property="peopleUserStreet"/><!-- 街道&镇 -->
<result column="PEOPLE_ID" property="peopleId"/><!-- 将实体的ID属性与表的ID字段对接 -->
<result column="PEOPLE_PHONE" property="peoplePhone"/><!-- 将实体的peoplePhone属性与表的peoplePhone字段对接 -->
<result column="PEOPLE_NAME" property="peopleName"/><!-- 将实体的peopleName属性与表的peopleName字段对接 -->
......@@ -32,8 +37,6 @@
<result column="PEOPLE_DATETIME" property="peopleDateTime"/><!-- 将实体的peopleDateTime属性与表的peopleDateTime字段对接 -->
<result column="PEOPLE_APP_ID" property="peopleAppId"/><!-- 用户所属的应用ID -->
<result column="PEOPLE_MAIL" property="peopleMail"/><!-- 用户邮箱 -->
<result column="PEOPLE_MAILLCHECK" property="peopleMailCheck"/><!-- 用户邮箱 -->
<result column="PEOPLE_PHONECHECK" property="peoplePhoneCheck"/><!-- 用户邮箱 -->
</resultMap>
<!-- 将实体属性与表字段对接结束 -->
......@@ -50,6 +53,10 @@
<if test="peopleUserBirthday != null">PU_BIRTHDAY,</if>
<if test="peopleUserAppId != null">PU_APP_ID,</if>
<if test="peopleUserCard != null">PU_CARD,</if>
<if test="peopleUserProvince != null">PU_PROVINCE,</if>
<if test="peopleUserCity != null">PU_CITY,</if>
<if test="peopleUserDistrict != null">PU_DISTRICT,</if>
<if test="peopleUserStreet != null">PU_STREET,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="peopleId != null">#{peopleId},</if>
......@@ -61,6 +68,10 @@
<if test="peopleUserBirthday != null">#{peopleUserBirthday},</if>
<if test="peopleUserAppId != null">#{peopleUserAppId},</if>
<if test="peopleUserCard != null">#{peopleUserCard},</if>
<if test="peopleUserProvince != null">#{peopleUserProvince},</if>
<if test="peopleUserCity != null">#{peopleUserCity},</if>
<if test="peopleUserDistrict != null">#{peopleUserDistrict},</if>
<if test="peopleUserStreet != null">#{peopleUserStreet},</if>
</trim>
</insert>
<!-- 新增用户信息结束 -->
......@@ -69,7 +80,6 @@
<update id="updateEntity" parameterType="com.mingsoft.base.entity.BaseEntity">
update people_user
<set>
<if test="peopleId != null">PU_PEOPLE_ID=#{peopleId},</if>
<if test="peopleUserRealName != null">PU_REAL_NAME=#{peopleUserRealName},</if>
<if test="peopleUserAddress != null">PU_ADDRESS=#{peopleUserAddress},</if>
<if test="peopleUserIcon != null">PU_ICON=#{peopleUserIcon},</if>
......@@ -77,6 +87,10 @@
<if test="peopleUserSex != null">PU_SEX=#{peopleUserSex},</if>
<if test="peopleUserBirthday != null">PU_BIRTHDAY=#{peopleUserBirthday},</if>
<if test="peopleUserCard != null">PU_CARD=#{peopleUserCard},</if>
<if test="peopleUserProvince != null">PU_PROVINCE=#{peopleUserProvince},</if>
<if test="peopleUserCity != null">PU_CITY=#{peopleUserCity},</if>
<if test="peopleUserDistrict != null">PU_DISTRICT=#{peopleUserDistrict},</if>
<if test="peopleUserStreet != null">PU_STREET=#{peopleUserStreet},</if>
</set>
where PU_PEOPLE_ID = #{peopleId}
</update>
......
......@@ -44,6 +44,11 @@ public class PeopleAddressEntity extends BaseEntity{
*/
String peopleAddressDistrict;
/**
* 街道
*/
private int peopleAddressStreet;
/**
* 收货人的详细收货地址
*/
......@@ -168,6 +173,14 @@ public class PeopleAddressEntity extends BaseEntity{
public void setPeopleAddressAppId(int peopleAddressAppId) {
this.peopleAddressAppId = peopleAddressAppId;
}
public int getPeopleAddressStreet() {
return peopleAddressStreet;
}
public void setPeopleAddressStreet(int peopleAddressStreet) {
this.peopleAddressStreet = peopleAddressStreet;
}
......
#----------\u7528\u6237\u6a21\u5757-------
if (isSession) {
}#----------\u7528\u6237\u6a21\u5757-------
people = \u7528\u6237
people.username = \u7528\u6237\u540d
people.name = \u7528\u6237\u540d
people.password = \u5bc6\u7801
people.old.password = \u65e7\u5bc6\u7801
people.phone = \u624b\u673a\u53f7
people.mail = \u90ae\u7bb1
people.login = \u767b\u9646
......@@ -10,6 +13,7 @@ people.register= \u6ce8\u518c
people.get.password=\u53d6\u56de\u5bc6\u7801
people.set.phone=\u66f4\u6539\u624b\u673a\u53f7\u7801
people.code=\u9a8c\u8bc1\u7801
people.code.time.error=\u9a8c\u8bc1\u7801\u53d1\u9001\u9891\u7e41
people.card=\u8eab\u4efd\u8bc1\u53f7\u7801
#---------------\u6ce8\u518c\u7528\u6237\u65f6\u90ae\u7bb1\u53d1\u9001\u5185\u5bb9-----
......@@ -41,6 +45,7 @@ peopleCode=\u968f\u673a\u7801
#\u4ee5\u4e0b\u6587\u4ef6\u4f1a\u5e9f\u9664
......
package net.mingsoft.people.action;
public class BaseAction extends com.mingsoft.people.action.BaseAction{
}
driverClassName=com.mysql.jdbc.Driver
validationQuery=SELECT 1
jdbc_url=jdbc\:mysql\://localhost\:3306/db-mcms-open?useUnicode\=true&characterEncoding\=UTF-8&zeroDateTimeBehavior\=convertToNull
jdbc_username=root
jdbc_password=root
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment