├── member-site ├── src │ └── main │ │ └── webapp │ │ ├── index.jsp │ │ └── WEB-INF │ │ └── web.xml └── pom.xml ├── member-api-server ├── src │ ├── main │ │ ├── webapp │ │ │ ├── index.jsp │ │ │ └── WEB-INF │ │ │ │ └── web.xml │ │ ├── resources │ │ │ ├── config.properties │ │ │ ├── log4j.xml │ │ │ ├── applicationContext-dubbo.xml │ │ │ ├── applicationContext.xml │ │ │ └── log4j.dtd │ │ └── java │ │ │ └── com │ │ │ └── cl │ │ │ └── member │ │ │ ├── api │ │ │ └── impl │ │ │ │ └── MemberBaseApiServiceImpl.java │ │ │ └── utils │ │ │ └── SpringContextHolder.java │ └── test │ │ ├── resources │ │ ├── config.properties │ │ └── applicationContext-test.xml │ │ └── java │ │ └── com │ │ └── cl │ │ └── member │ │ └── api │ │ └── impl │ │ └── test │ │ └── MemberBaseApiServiceImplTest.java └── pom.xml ├── member-server ├── src │ └── main │ │ ├── webapp │ │ ├── index.html │ │ ├── WEB-INF │ │ │ ├── ftl │ │ │ │ ├── footer.ftl │ │ │ │ ├── sidebar.ftl │ │ │ │ ├── header.ftl │ │ │ │ ├── modifypasswordform.ftl │ │ │ │ └── main.ftl │ │ │ ├── springmvc-servlet.xml │ │ │ └── web.xml │ │ └── scripts │ │ │ └── custom │ │ │ └── cl.js │ │ ├── resources │ │ ├── config.properties │ │ ├── cas-member.xml │ │ ├── applicationContext-dubbo.xml │ │ ├── log4j.xml │ │ ├── applicationContext.xml │ │ └── log4j.dtd │ │ └── java │ │ └── com │ │ └── cl │ │ └── member │ │ ├── utils │ │ ├── ConstantUtil.java │ │ ├── ConfigUtil.java │ │ ├── SessionUtil.java │ │ ├── SpringContextHolder.java │ │ ├── JsonUtil.java │ │ └── ReflectionUtil.java │ │ ├── interceptor │ │ └── MemberInterceptor.java │ │ └── controller │ │ └── IndexController.java └── pom.xml ├── member-api ├── src │ └── main │ │ └── java │ │ └── com │ │ └── cl │ │ └── member │ │ └── api │ │ └── IMemberBaseApiService.java └── pom.xml ├── member-data ├── src │ └── main │ │ ├── java │ │ └── com │ │ │ └── cl │ │ │ └── member │ │ │ └── mapper │ │ │ ├── member │ │ │ ├── MemberMapper.java │ │ │ ├── MemberLogMapper.java │ │ │ ├── MemberMoneyIOMapper.java │ │ │ ├── MemberScoreIOMapper.java │ │ │ ├── MemberConsigneeMapper.java │ │ │ ├── MemberProcessLogMapper.java │ │ │ └── CommodityCommentMapper.java │ │ │ └── base │ │ │ └── DictionaryMapper.java │ │ └── resources │ │ └── com │ │ └── cl │ │ └── member │ │ └── mapper │ │ ├── base │ │ └── DictionaryMapper.xml │ │ └── member │ │ ├── MemberLogMapper.xml │ │ ├── MemberProcessLogMapper.xml │ │ ├── MemberScoreIOMapper.xml │ │ ├── CommodityCommentMapper.xml │ │ ├── MemberMoneyIOMapper.xml │ │ ├── MemberConsigneeMapper.xml │ │ └── MemberMapper.xml └── pom.xml ├── member-model ├── pom.xml └── src │ └── main │ └── java │ └── com │ └── cl │ └── member │ └── model │ ├── base │ └── Dictionary.java │ └── member │ ├── MemberLog.java │ ├── MemberProcessLog.java │ ├── MemberScoreIO.java │ ├── CommodityComment.java │ ├── MemberMoneyIO.java │ ├── MemberConsignee.java │ └── Member.java ├── .gitignore ├── README.md ├── member-schedule └── pom.xml ├── init_member_privilege.sql ├── init_member.sql ├── pom.xml ├── config_member.xml └── create_member.sql /member-site/src/main/webapp/index.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Hello World!

4 | 5 | 6 | -------------------------------------------------------------------------------- /member-api-server/src/main/webapp/index.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Hello World!

4 | 5 | 6 | -------------------------------------------------------------------------------- /member-api-server/src/main/resources/config.properties: -------------------------------------------------------------------------------- 1 | #ZooKeeper 2 | dubbo.registry.address=127.0.0.1:2181 3 | dubbo.registry.address.client=127.0.0.1:2181 -------------------------------------------------------------------------------- /member-api-server/src/test/resources/config.properties: -------------------------------------------------------------------------------- 1 | #ZooKeeper 2 | dubbo.registry.address=127.0.0.1:2181 3 | dubbo.registry.address.client=127.0.0.1:2181 -------------------------------------------------------------------------------- /member-server/src/main/webapp/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /member-api/src/main/java/com/cl/member/api/IMemberBaseApiService.java: -------------------------------------------------------------------------------- 1 | package com.cl.member.api; 2 | 3 | import com.cl.member.model.base.Dictionary;; 4 | 5 | public interface IMemberBaseApiService { 6 | 7 | Dictionary getDictionaryById(Integer id); 8 | } 9 | -------------------------------------------------------------------------------- /member-site/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | Archetype Created Web Application 7 | 8 | -------------------------------------------------------------------------------- /member-api-server/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | Archetype Created Web Application 7 | 8 | -------------------------------------------------------------------------------- /member-server/src/main/webapp/WEB-INF/ftl/footer.ftl: -------------------------------------------------------------------------------- 1 | 2 | 12 | -------------------------------------------------------------------------------- /member-server/src/main/resources/config.properties: -------------------------------------------------------------------------------- 1 | #CAS authentication address 2 | cas.server.url=http://127.0.0.1:8080/cas 3 | cas.service.url=http://127.0.0.1:10012/member-server 4 | 5 | #Base Path 6 | web.basepath=http://127.0.0.1:10012/member-server 7 | #Inc File Path 8 | inc.basepath=http://127.0.0.1/privilege_inc 9 | 10 | #ZooKeeper 11 | dubbo.registry.address=127.0.0.1:2181 12 | dubbo.registry.address.client=127.0.0.1:2181 -------------------------------------------------------------------------------- /member-server/src/main/java/com/cl/member/utils/ConstantUtil.java: -------------------------------------------------------------------------------- 1 | package com.cl.member.utils; 2 | 3 | public class ConstantUtil { 4 | 5 | public static final String Fail = "fail"; 6 | 7 | public static final String Success = "success"; 8 | 9 | public static final String Exists = "exists"; 10 | 11 | public static final String EmptyJsonObject = "{}"; 12 | 13 | public static final String DefaultMd5Password = "63a9f0ea7bb98050796b649e85481845"; //root 14 | } 15 | -------------------------------------------------------------------------------- /member-data/src/main/java/com/cl/member/mapper/member/MemberMapper.java: -------------------------------------------------------------------------------- 1 | package com.cl.member.mapper.member; 2 | 3 | import com.cl.member.model.member.Member; 4 | 5 | public interface MemberMapper { 6 | int deleteByPrimaryKey(Integer id); 7 | 8 | int insert(Member record); 9 | 10 | int insertSelective(Member record); 11 | 12 | Member selectByPrimaryKey(Integer id); 13 | 14 | int updateByPrimaryKeySelective(Member record); 15 | 16 | int updateByPrimaryKey(Member record); 17 | } -------------------------------------------------------------------------------- /member-model/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | cl 5 | member 6 | 1.0.0-SNAPSHOT 7 | 8 | member-model 9 | member-model 10 | jar 11 | -------------------------------------------------------------------------------- /member-data/src/main/java/com/cl/member/mapper/base/DictionaryMapper.java: -------------------------------------------------------------------------------- 1 | package com.cl.member.mapper.base; 2 | 3 | import com.cl.member.model.base.Dictionary; 4 | 5 | public interface DictionaryMapper { 6 | int deleteByPrimaryKey(Integer id); 7 | 8 | int insert(Dictionary record); 9 | 10 | int insertSelective(Dictionary record); 11 | 12 | Dictionary selectByPrimaryKey(Integer id); 13 | 14 | int updateByPrimaryKeySelective(Dictionary record); 15 | 16 | int updateByPrimaryKey(Dictionary record); 17 | } -------------------------------------------------------------------------------- /member-data/src/main/java/com/cl/member/mapper/member/MemberLogMapper.java: -------------------------------------------------------------------------------- 1 | package com.cl.member.mapper.member; 2 | 3 | import com.cl.member.model.member.MemberLog; 4 | 5 | public interface MemberLogMapper { 6 | int deleteByPrimaryKey(Integer id); 7 | 8 | int insert(MemberLog record); 9 | 10 | int insertSelective(MemberLog record); 11 | 12 | MemberLog selectByPrimaryKey(Integer id); 13 | 14 | int updateByPrimaryKeySelective(MemberLog record); 15 | 16 | int updateByPrimaryKey(MemberLog record); 17 | } -------------------------------------------------------------------------------- /member-data/src/main/java/com/cl/member/mapper/member/MemberMoneyIOMapper.java: -------------------------------------------------------------------------------- 1 | package com.cl.member.mapper.member; 2 | 3 | import com.cl.member.model.member.MemberMoneyIO; 4 | 5 | public interface MemberMoneyIOMapper { 6 | int deleteByPrimaryKey(Integer id); 7 | 8 | int insert(MemberMoneyIO record); 9 | 10 | int insertSelective(MemberMoneyIO record); 11 | 12 | MemberMoneyIO selectByPrimaryKey(Integer id); 13 | 14 | int updateByPrimaryKeySelective(MemberMoneyIO record); 15 | 16 | int updateByPrimaryKey(MemberMoneyIO record); 17 | } -------------------------------------------------------------------------------- /member-data/src/main/java/com/cl/member/mapper/member/MemberScoreIOMapper.java: -------------------------------------------------------------------------------- 1 | package com.cl.member.mapper.member; 2 | 3 | import com.cl.member.model.member.MemberScoreIO; 4 | 5 | public interface MemberScoreIOMapper { 6 | int deleteByPrimaryKey(Integer id); 7 | 8 | int insert(MemberScoreIO record); 9 | 10 | int insertSelective(MemberScoreIO record); 11 | 12 | MemberScoreIO selectByPrimaryKey(Integer id); 13 | 14 | int updateByPrimaryKeySelective(MemberScoreIO record); 15 | 16 | int updateByPrimaryKey(MemberScoreIO record); 17 | } -------------------------------------------------------------------------------- /member-data/src/main/java/com/cl/member/mapper/member/MemberConsigneeMapper.java: -------------------------------------------------------------------------------- 1 | package com.cl.member.mapper.member; 2 | 3 | import com.cl.member.model.member.MemberConsignee; 4 | 5 | public interface MemberConsigneeMapper { 6 | int deleteByPrimaryKey(Integer id); 7 | 8 | int insert(MemberConsignee record); 9 | 10 | int insertSelective(MemberConsignee record); 11 | 12 | MemberConsignee selectByPrimaryKey(Integer id); 13 | 14 | int updateByPrimaryKeySelective(MemberConsignee record); 15 | 16 | int updateByPrimaryKey(MemberConsignee record); 17 | } -------------------------------------------------------------------------------- /member-data/src/main/java/com/cl/member/mapper/member/MemberProcessLogMapper.java: -------------------------------------------------------------------------------- 1 | package com.cl.member.mapper.member; 2 | 3 | import com.cl.member.model.member.MemberProcessLog; 4 | 5 | public interface MemberProcessLogMapper { 6 | int deleteByPrimaryKey(Integer id); 7 | 8 | int insert(MemberProcessLog record); 9 | 10 | int insertSelective(MemberProcessLog record); 11 | 12 | MemberProcessLog selectByPrimaryKey(Integer id); 13 | 14 | int updateByPrimaryKeySelective(MemberProcessLog record); 15 | 16 | int updateByPrimaryKey(MemberProcessLog record); 17 | } -------------------------------------------------------------------------------- /member-data/src/main/java/com/cl/member/mapper/member/CommodityCommentMapper.java: -------------------------------------------------------------------------------- 1 | package com.cl.member.mapper.member; 2 | 3 | import com.cl.member.model.member.CommodityComment; 4 | 5 | public interface CommodityCommentMapper { 6 | int deleteByPrimaryKey(Integer id); 7 | 8 | int insert(CommodityCommentMapper record); 9 | 10 | int insertSelective(CommodityComment record); 11 | 12 | CommodityComment selectByPrimaryKey(Integer id); 13 | 14 | int updateByPrimaryKeySelective(CommodityComment record); 15 | 16 | int updateByPrimaryKey(CommodityComment record); 17 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.class 2 | 3 | # Mobile Tools for Java (J2ME) 4 | .mtj.tmp/ 5 | 6 | # Package Files # 7 | *.jar 8 | *.war 9 | *.ear 10 | 11 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 12 | hs_err_pid* 13 | 14 | # Ignore all logfiles and tempfiles. 15 | .project 16 | /*/.project 17 | 18 | .classpath 19 | /*/.classpath 20 | 21 | .settings 22 | /*/.settings 23 | /*/.settings/* 24 | 25 | target 26 | /*/target 27 | /*/target/* 28 | 29 | .DS_Store 30 | 31 | .svn 32 | .svn/* 33 | 34 | .idea 35 | .idea/* 36 | 37 | Thumbs.db 38 | 39 | *.log 40 | *.out 41 | -------------------------------------------------------------------------------- /member-api-server/src/main/java/com/cl/member/api/impl/MemberBaseApiServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.cl.member.api.impl; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.stereotype.Service; 5 | 6 | import com.cl.member.api.IMemberBaseApiService; 7 | import com.cl.member.mapper.base.DictionaryMapper; 8 | import com.cl.member.model.base.Dictionary; 9 | 10 | 11 | 12 | @Service 13 | public class MemberBaseApiServiceImpl implements IMemberBaseApiService { 14 | 15 | @Autowired 16 | private DictionaryMapper dictionaryMapper; 17 | 18 | @Override 19 | public Dictionary getDictionaryById(Integer id) { 20 | return dictionaryMapper.selectByPrimaryKey(id); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /member-api/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | cl 7 | member 8 | 1.0.0-SNAPSHOT 9 | 10 | member-api 11 | member-api 12 | jar 13 | 14 | 15 | 16 | 17 | cl 18 | member-model 19 | 1.0.0-SNAPSHOT 20 | 21 | 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | cl-member 2 | ================== 3 | 4 | 会员管理系统 5 | 6 | 7 | 一、前置项目依赖 8 | 9 | https://github.com/pumadong/cl-privilege 10 | 11 | 二、项目说明 12 | 13 | 会员中心,这个系统,包含网站中的会员中心,后台的会员管理功能,提供给其他系统的会员API,以及会员相关的自动化任务。 14 | 15 | 计划实现的会员中心功能单元如下: 16 | 17 | member-api-server:会员接口,对接其他系统 18 | 19 | member-schedule:会员自动化处理任务,比如:转有效、转无效等 20 | 21 | member-server:会员管理界面 22 | 23 | member-site:网站会员中心 24 | 25 | 三、mybatis-generator 26 | 27 | ORM框架采用MyBatis,为了提高开发效率,先根据数据库表单结构自动生成Model和MyBatis相关类,生成命令如下: 28 | 29 | java -jar mybatis-generator-core-1.3.1.jar -configfile config_member.xml -overwrite 30 | 31 | 生成时需要把mybatis-generator-core-1.3.1.jar、mysql-connector-java-5.1.24-bin.jar、config_member.xml放到一个目录下,生成的相关类和XML会放置到CreateResult文件夹下面。 32 | 33 | jar下载地址:http://pan.baidu.com/s/1qW98L0C -------------------------------------------------------------------------------- /member-schedule/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | cl 7 | member 8 | 1.0.0-SNAPSHOT 9 | 10 | member-schedule 11 | member-schedule 12 | jar 13 | 14 | 15 | 16 | 17 | cl 18 | member-model 19 | 1.0.0-SNAPSHOT 20 | 21 | 22 | -------------------------------------------------------------------------------- /member-server/src/main/webapp/WEB-INF/ftl/sidebar.ftl: -------------------------------------------------------------------------------- 1 | 2 |
3 | 24 |
25 | -------------------------------------------------------------------------------- /member-server/src/main/java/com/cl/member/utils/ConfigUtil.java: -------------------------------------------------------------------------------- 1 | package com.cl.member.utils; 2 | 3 | import org.springframework.beans.factory.annotation.Value; 4 | import org.springframework.stereotype.Component; 5 | 6 | @Component 7 | public class ConfigUtil { 8 | 9 | private @Value("${cas.server.url}")String casServerUrl; 10 | private @Value("${cas.service.url}")String casServiceUrl; 11 | private @Value("${web.basepath}")String basePath; 12 | private @Value("${inc.basepath}")String incBasePath; 13 | 14 | public String getCasServerUrl() { 15 | return casServerUrl; 16 | } 17 | 18 | public String getCasServiceUrl() { 19 | return casServiceUrl; 20 | } 21 | 22 | public String getBasePath() { 23 | return basePath; 24 | } 25 | 26 | public String getIncBasePath() { 27 | return incBasePath; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /init_member_privilege.sql: -------------------------------------------------------------------------------- 1 | delete from `p_module` where name='会员中心'; 2 | INSERT INTO `p_module`(id,name,flag,url,sort_no,create_person,create_date,update_person,update_date) 3 | VALUES 4 | (6,'会员中心','m','http://127.0.0.1:10011/member-server',60,'system',NOW(),'system',NOW()) 5 | ; 6 | 7 | 8 | delete from `p_resource` where module_flag='m'; 9 | INSERT INTO `p_resource`(id,name,url,remark,parent_id,structure,sort_no,module_flag,create_person,create_date,update_person,update_date) 10 | VALUES 11 | (300,'会员管理','','',0,'s-1',1,'m','system',NOW(),'system',NOW()), 12 | 13 | 14 | (311,'数据字典','/controller/dictionary/list.do','',300,'s-1-1',1,'m','system',NOW(),'system',NOW()), 15 | (312,'会员管理','/controller/member/list.do','',300,'s-1-2',2,'m','system',NOW(),'system',NOW()), 16 | (313,'会员监控','/controller/member/monitor.do','',300,'s-1-2',3,'m','system',NOW(),'system',NOW()) 17 | 18 | ; -------------------------------------------------------------------------------- /member-server/src/main/java/com/cl/member/utils/SessionUtil.java: -------------------------------------------------------------------------------- 1 | package com.cl.member.utils; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | import javax.servlet.http.HttpSession; 5 | 6 | import com.cl.privilege.model.User; 7 | 8 | 9 | public class SessionUtil { 10 | 11 | /** 12 | * 系统登录用户名 13 | */ 14 | public static final String SessionSystemLoginUserName = "SessionSystemLoginUserName"; 15 | 16 | /** 17 | * 清空session 18 | */ 19 | public static final void clearSession(HttpServletRequest request) 20 | { 21 | HttpSession session = request.getSession(); 22 | 23 | session.removeAttribute(SessionUtil.SessionSystemLoginUserName); 24 | 25 | session.invalidate();//非必须,单点登出接收到服务器消息时,会自动销毁session 26 | } 27 | 28 | /** 29 | * 返回session中的用户对象 30 | * @param request 31 | * @return 32 | */ 33 | public static final User getSessionUser(HttpServletRequest request) 34 | { 35 | return (User) request.getSession().getAttribute(SessionUtil.SessionSystemLoginUserName); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /member-data/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | 4 | cl 5 | member 6 | 1.0.0-SNAPSHOT 7 | 8 | member-data 9 | member-data 10 | jar 11 | 12 | 13 | 14 | 15 | cl 16 | member-model 17 | 1.0.0-SNAPSHOT 18 | 19 | 20 | 21 | org.mybatis 22 | mybatis 23 | 3.2.3 24 | 25 | 26 | org.mybatis 27 | mybatis-spring 28 | 1.2.0 29 | 30 | 31 | -------------------------------------------------------------------------------- /init_member.sql: -------------------------------------------------------------------------------- 1 | #数据初始化-会员字典表 2 | truncate table m_dictionary; 3 | 4 | insert into `m_dictionary`(`group`,`code`,`name`,sort_no,create_person,create_date) 5 | values 6 | ('source_type',1,'网站注册',1,'system',now()), 7 | ('source_type',2,'某某活动',2,'system',now()), 8 | 9 | ('level_type',1,'普通会员',1,'system',now()), 10 | ('level_type',2,'VIP会员',2,'system',now()), 11 | ('level_type',3,'SVIP会员',3,'system',now()), 12 | 13 | ('size_type',1,'合适',1,'system',now()), 14 | ('size_type',2,'偏大',2,'system',now()), 15 | ('size_type',3,'偏小',3,'system',now()), 16 | 17 | ('size_type',-1,'已删除',-1,'system',now()), 18 | 19 | ('member_log_type',1,'注册',1,'system',now()), 20 | ('member_log_type',2,'登录',2,'system',now()), 21 | ('member_log_type',3,'修改基本信息',3,'system',now()), 22 | 23 | ('member_precess_log_type',1,'会员升级',1,'system',now()), 24 | ('member_precess_log_type',2,'会员降级',2,'system',now()), 25 | 26 | ('money_type',1,'退换货入库退款',1,'system',now()), 27 | ('money_type',2,'支付扣款',2,'system',now()), 28 | 29 | ('score_type',1,'注册成功送积分',1,'system',now()), 30 | ('score_type',2,'验证Email送积分',2,'system',now()), 31 | ('score_type',3,'验证手机送积分',3,'system',now()), 32 | ('score_type',4,'抽奖消费积分',4,'system',now()), 33 | ('score_type',5,'支付成功送积分',5,'system',now()) 34 | ; 35 | -------------------------------------------------------------------------------- /member-api-server/src/test/java/com/cl/member/api/impl/test/MemberBaseApiServiceImplTest.java: -------------------------------------------------------------------------------- 1 | package com.cl.member.api.impl.test; 2 | 3 | import org.junit.After; 4 | import org.junit.Before; 5 | import org.junit.BeforeClass; 6 | import org.junit.Test; 7 | import org.springframework.context.support.ClassPathXmlApplicationContext; 8 | 9 | import com.cl.member.api.impl.MemberBaseApiServiceImpl; 10 | import com.cl.member.model.base.Dictionary; 11 | 12 | public class MemberBaseApiServiceImplTest { 13 | 14 | private static MemberBaseApiServiceImpl service; 15 | 16 | @BeforeClass 17 | public static void setUpBeforeClass() throws Exception { 18 | ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext-test.xml"); 19 | service = (MemberBaseApiServiceImpl)ctx.getBean("memberBaseApiServiceImpl"); 20 | ctx.close(); 21 | } 22 | 23 | @Before 24 | public void setUp() throws Exception { 25 | } 26 | 27 | @After 28 | public void tearDown() throws Exception { 29 | } 30 | 31 | @Test 32 | public void getDictionaryById() { 33 | Dictionary dictionary = service.getDictionaryById(1); 34 | if(dictionary == null) 35 | { 36 | System.out.println("dictionary is null"); 37 | } else { 38 | System.out.println(dictionary.getName()); 39 | } 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /member-server/src/main/resources/cas-member.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 14 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /member-server/src/main/resources/applicationContext-dubbo.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | Dubbo provider配置 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 24 | 25 | -------------------------------------------------------------------------------- /member-api-server/src/main/java/com/cl/member/utils/SpringContextHolder.java: -------------------------------------------------------------------------------- 1 | package com.cl.member.utils; 2 | 3 | 4 | import org.springframework.context.ApplicationContext; 5 | import org.springframework.context.ApplicationContextAware; 6 | 7 | public class SpringContextHolder implements ApplicationContextAware { 8 | 9 | private static ApplicationContext applicationContext; 10 | 11 | public void setApplicationContext(ApplicationContext ac) 12 | { 13 | applicationContext = ac; 14 | } 15 | 16 | public static ApplicationContext getApplicationContext() 17 | { 18 | checkApplicationContext(); 19 | return applicationContext; 20 | } 21 | 22 | @SuppressWarnings("unchecked") 23 | public static T getBean(String name) 24 | { 25 | checkApplicationContext(); 26 | return (T) applicationContext.getBean(name); 27 | } 28 | 29 | public static T getBean(Class requiredType) 30 | { 31 | checkApplicationContext(); 32 | return applicationContext.getBean(requiredType); 33 | } 34 | 35 | public static void cleanApplicationContext() 36 | { 37 | applicationContext = null; 38 | } 39 | 40 | private static void checkApplicationContext() { 41 | if (applicationContext == null) 42 | throw new IllegalStateException("applicaitonContext未注入,请在applicationContext.xml中定义SpringContextHolder"); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /member-server/src/main/java/com/cl/member/utils/SpringContextHolder.java: -------------------------------------------------------------------------------- 1 | package com.cl.member.utils; 2 | 3 | 4 | import org.springframework.context.ApplicationContext; 5 | import org.springframework.context.ApplicationContextAware; 6 | 7 | public class SpringContextHolder implements ApplicationContextAware { 8 | 9 | private static ApplicationContext applicationContext; 10 | 11 | public void setApplicationContext(ApplicationContext ac) 12 | { 13 | applicationContext = ac; 14 | } 15 | 16 | public static ApplicationContext getApplicationContext() 17 | { 18 | checkApplicationContext(); 19 | return applicationContext; 20 | } 21 | 22 | @SuppressWarnings("unchecked") 23 | public static T getBean(String name) 24 | { 25 | checkApplicationContext(); 26 | return (T) applicationContext.getBean(name); 27 | } 28 | 29 | public static T getBean(Class requiredType) 30 | { 31 | checkApplicationContext(); 32 | return applicationContext.getBean(requiredType); 33 | } 34 | 35 | public static void cleanApplicationContext() 36 | { 37 | applicationContext = null; 38 | } 39 | 40 | private static void checkApplicationContext() { 41 | if (applicationContext == null) 42 | throw new IllegalStateException("applicaitonContext未注入,请在applicationContext.xml中定义SpringContextHolder"); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /member-server/src/main/resources/log4j.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /member-api-server/src/main/resources/log4j.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | cl 5 | member 6 | 1.0.0-SNAPSHOT 7 | pom 8 | member 9 | http://maven.apache.org 10 | 11 | 12 | member-model 13 | member-api 14 | member-data 15 | member-api-server 16 | member-server 17 | member-schedule 18 | member-site 19 | 20 | 21 | 22 | 23 | junit 24 | junit 25 | 4.11 26 | test 27 | 28 | 29 | 30 | 31 | 32 | releases 33 | Cl Releases 34 | http://192.168.1.11:8081/nexus/content/repositories/releases 35 | 36 | 37 | snapshots 38 | Cl Snapshots 39 | http://192.168.1.11:8081/nexus/content/repositories/snapshots 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /member-model/src/main/java/com/cl/member/model/base/Dictionary.java: -------------------------------------------------------------------------------- 1 | package com.cl.member.model.base; 2 | 3 | import java.util.Date; 4 | 5 | public class Dictionary { 6 | private Integer id; 7 | 8 | private String group; 9 | 10 | private String code; 11 | 12 | private String name; 13 | 14 | private Integer sortNo; 15 | 16 | private String createPerson; 17 | 18 | private Date createDate; 19 | 20 | public Integer getId() { 21 | return id; 22 | } 23 | 24 | public void setId(Integer id) { 25 | this.id = id; 26 | } 27 | 28 | public String getGroup() { 29 | return group; 30 | } 31 | 32 | public void setGroup(String group) { 33 | this.group = group; 34 | } 35 | 36 | public String getCode() { 37 | return code; 38 | } 39 | 40 | public void setCode(String code) { 41 | this.code = code; 42 | } 43 | 44 | public String getName() { 45 | return name; 46 | } 47 | 48 | public void setName(String name) { 49 | this.name = name; 50 | } 51 | 52 | public Integer getSortNo() { 53 | return sortNo; 54 | } 55 | 56 | public void setSortNo(Integer sortNo) { 57 | this.sortNo = sortNo; 58 | } 59 | 60 | public String getCreatePerson() { 61 | return createPerson; 62 | } 63 | 64 | public void setCreatePerson(String createPerson) { 65 | this.createPerson = createPerson; 66 | } 67 | 68 | public Date getCreateDate() { 69 | return createDate; 70 | } 71 | 72 | public void setCreateDate(Date createDate) { 73 | this.createDate = createDate; 74 | } 75 | } -------------------------------------------------------------------------------- /member-model/src/main/java/com/cl/member/model/member/MemberLog.java: -------------------------------------------------------------------------------- 1 | package com.cl.member.model.member; 2 | 3 | import java.util.Date; 4 | 5 | public class MemberLog { 6 | private Integer id; 7 | 8 | private Integer memberId; 9 | 10 | private Byte logTypeId; 11 | 12 | private String logContent; 13 | 14 | private String createPerson; 15 | 16 | private Date createDate; 17 | 18 | private String createIp; 19 | 20 | public Integer getId() { 21 | return id; 22 | } 23 | 24 | public void setId(Integer id) { 25 | this.id = id; 26 | } 27 | 28 | public Integer getMemberId() { 29 | return memberId; 30 | } 31 | 32 | public void setMemberId(Integer memberId) { 33 | this.memberId = memberId; 34 | } 35 | 36 | public Byte getLogTypeId() { 37 | return logTypeId; 38 | } 39 | 40 | public void setLogTypeId(Byte logTypeId) { 41 | this.logTypeId = logTypeId; 42 | } 43 | 44 | public String getLogContent() { 45 | return logContent; 46 | } 47 | 48 | public void setLogContent(String logContent) { 49 | this.logContent = logContent; 50 | } 51 | 52 | public String getCreatePerson() { 53 | return createPerson; 54 | } 55 | 56 | public void setCreatePerson(String createPerson) { 57 | this.createPerson = createPerson; 58 | } 59 | 60 | public Date getCreateDate() { 61 | return createDate; 62 | } 63 | 64 | public void setCreateDate(Date createDate) { 65 | this.createDate = createDate; 66 | } 67 | 68 | public String getCreateIp() { 69 | return createIp; 70 | } 71 | 72 | public void setCreateIp(String createIp) { 73 | this.createIp = createIp; 74 | } 75 | } -------------------------------------------------------------------------------- /member-model/src/main/java/com/cl/member/model/member/MemberProcessLog.java: -------------------------------------------------------------------------------- 1 | package com.cl.member.model.member; 2 | 3 | import java.util.Date; 4 | 5 | public class MemberProcessLog { 6 | private Integer id; 7 | 8 | private Integer memberId; 9 | 10 | private Byte logTypeId; 11 | 12 | private String logContent; 13 | 14 | private String createPerson; 15 | 16 | private Date createDate; 17 | 18 | private String createIp; 19 | 20 | public Integer getId() { 21 | return id; 22 | } 23 | 24 | public void setId(Integer id) { 25 | this.id = id; 26 | } 27 | 28 | public Integer getMemberId() { 29 | return memberId; 30 | } 31 | 32 | public void setMemberId(Integer memberId) { 33 | this.memberId = memberId; 34 | } 35 | 36 | public Byte getLogTypeId() { 37 | return logTypeId; 38 | } 39 | 40 | public void setLogTypeId(Byte logTypeId) { 41 | this.logTypeId = logTypeId; 42 | } 43 | 44 | public String getLogContent() { 45 | return logContent; 46 | } 47 | 48 | public void setLogContent(String logContent) { 49 | this.logContent = logContent; 50 | } 51 | 52 | public String getCreatePerson() { 53 | return createPerson; 54 | } 55 | 56 | public void setCreatePerson(String createPerson) { 57 | this.createPerson = createPerson; 58 | } 59 | 60 | public Date getCreateDate() { 61 | return createDate; 62 | } 63 | 64 | public void setCreateDate(Date createDate) { 65 | this.createDate = createDate; 66 | } 67 | 68 | public String getCreateIp() { 69 | return createIp; 70 | } 71 | 72 | public void setCreateIp(String createIp) { 73 | this.createIp = createIp; 74 | } 75 | } -------------------------------------------------------------------------------- /member-api-server/src/main/resources/applicationContext-dubbo.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | Dubbo provider配置 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 24 | 25 | 26 | 27 | 28 | 29 | 31 | 32 | -------------------------------------------------------------------------------- /member-server/src/main/java/com/cl/member/interceptor/MemberInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.cl.member.interceptor; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | import javax.servlet.http.HttpServletResponse; 5 | 6 | import org.jasig.cas.client.util.AssertionHolder; 7 | import org.jasig.cas.client.validation.Assertion; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; 10 | 11 | import com.cl.privilege.api.IPrivilegeBaseApiService; 12 | import com.cl.privilege.model.User; 13 | import com.cl.member.utils.ConfigUtil; 14 | import com.cl.member.utils.SessionUtil; 15 | 16 | 17 | 18 | /** 19 | * 拦截指定path,进行权限验证,及用户的本地session过期后,重新进行赋值 20 | */ 21 | public class MemberInterceptor extends HandlerInterceptorAdapter { 22 | 23 | @Autowired 24 | private ConfigUtil configUtil; 25 | @Autowired 26 | private IPrivilegeBaseApiService privilegeBaseApiService; 27 | 28 | @Override 29 | public boolean preHandle(HttpServletRequest request,HttpServletResponse response, Object handler) throws Exception { 30 | 31 | Assertion assertion=AssertionHolder.getAssertion(); 32 | 33 | //实际cas-client-core中org.jasig.cas.client.authentication.AuthenticationFilter已经进行了单点登录认证,这里主要是为了获得用户信息 34 | if(assertion==null 35 | || assertion.getPrincipal()==null 36 | || assertion.getPrincipal().getName()==null) 37 | { 38 | //没有登录,跳转到没有登录页面 39 | response.sendRedirect(configUtil.getCasServerUrl()); 40 | return false; 41 | } 42 | 43 | User user = SessionUtil.getSessionUser(request); 44 | 45 | if(user == null) 46 | { 47 | //存储Session:用户登录名 48 | user = privilegeBaseApiService.getUserByUsername(assertion.getPrincipal().getName()); 49 | request.getSession().setAttribute(SessionUtil.SessionSystemLoginUserName,user); 50 | } 51 | 52 | //判断权限,没有权限,进入没有权限页面 53 | 54 | return true; 55 | 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /member-server/src/main/webapp/WEB-INF/ftl/header.ftl: -------------------------------------------------------------------------------- 1 | 2 | 50 | -------------------------------------------------------------------------------- /member-server/src/main/webapp/WEB-INF/ftl/modifypasswordform.ftl: -------------------------------------------------------------------------------- 1 | 5 | 6 | 49 | 50 | 54 | 55 | -------------------------------------------------------------------------------- /member-server/src/main/java/com/cl/member/utils/JsonUtil.java: -------------------------------------------------------------------------------- 1 | package com.cl.member.utils; 2 | 3 | import java.lang.reflect.Field; 4 | import java.util.Collection; 5 | 6 | 7 | public class JsonUtil { 8 | 9 | public static StringBuffer convertObj2json(Collection cs) { 10 | 11 | StringBuffer sbf = new StringBuffer(); 12 | 13 | if (null == cs || 0 == cs.toArray().length){ 14 | 15 | return sbf.append("[").append("]"); 16 | } 17 | 18 | Object[] ls = cs.toArray(); 19 | int size = ls.length; 20 | 21 | sbf.append("["); 22 | if (0 == size) 23 | return new StringBuffer("[]"); 24 | for (int k = 0; k < size; k++) { 25 | Object o = ls[k]; 26 | 27 | sbf.append(convertObj2json(o)); 28 | 29 | if (k < size - 1) 30 | sbf.append(", "); 31 | } 32 | 33 | return sbf.append("]"); 34 | 35 | } 36 | 37 | public static StringBuffer convertObj2json(Object o) { 38 | 39 | StringBuffer sbf = new StringBuffer(); 40 | if (null == o) 41 | return sbf; 42 | 43 | sbf.append("{"); 44 | Class classType = o.getClass(); 45 | Field[] fields = classType.getDeclaredFields(); 46 | 47 | int length = fields.length; 48 | 49 | for (int i = 0; i < length; i++) { 50 | 51 | String fieldName = fields[i].getName(); 52 | Class clazzType = fields[i].getType(); 53 | Package package1 = clazzType.getPackage(); 54 | Object fo = ReflectionUtil.getFieldValue(o, fieldName); 55 | 56 | if (!(fo instanceof Collection) 57 | && (clazzType.isPrimitive() || null == package1 58 | || package1.getName().equals("java.lang") || package1 59 | .getName().equals("java.util"))) { 60 | sbf.append("\"").append(fieldName).append("\":\"").append(fo) 61 | .append("\""); 62 | } else if (!(fo instanceof Collection)) { 63 | sbf.append("\"").append(fieldName).append("\":").append( 64 | convertObj2json(fo)); 65 | } 66 | 67 | if (fo instanceof Collection) { 68 | 69 | sbf.append("\"").append(fieldName).append("\":").append( 70 | convertObj2json((Collection) fo)); 71 | 72 | } 73 | 74 | if (i < length - 1) 75 | sbf.append(", "); 76 | 77 | } 78 | 79 | return sbf.append("}"); 80 | } 81 | 82 | } -------------------------------------------------------------------------------- /member-server/src/main/webapp/WEB-INF/springmvc-servlet.xml: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 32 | 33 | 34 | text/plain;charset=UTF-8 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /member-model/src/main/java/com/cl/member/model/member/MemberScoreIO.java: -------------------------------------------------------------------------------- 1 | package com.cl.member.model.member; 2 | 3 | import java.math.BigDecimal; 4 | import java.util.Date; 5 | 6 | public class MemberScoreIO { 7 | private Integer id; 8 | 9 | private Integer memberId; 10 | 11 | private String formCode; 12 | 13 | private Byte scoreTypeId; 14 | 15 | private BigDecimal operateScore; 16 | 17 | private BigDecimal beforeScore; 18 | 19 | private BigDecimal afterScore; 20 | 21 | private String remark; 22 | 23 | private String createPerson; 24 | 25 | private Date createDate; 26 | 27 | private String createIp; 28 | 29 | public Integer getId() { 30 | return id; 31 | } 32 | 33 | public void setId(Integer id) { 34 | this.id = id; 35 | } 36 | 37 | public Integer getMemberId() { 38 | return memberId; 39 | } 40 | 41 | public void setMemberId(Integer memberId) { 42 | this.memberId = memberId; 43 | } 44 | 45 | public String getFormCode() { 46 | return formCode; 47 | } 48 | 49 | public void setFormCode(String formCode) { 50 | this.formCode = formCode; 51 | } 52 | 53 | public Byte getScoreTypeId() { 54 | return scoreTypeId; 55 | } 56 | 57 | public void setScoreTypeId(Byte scoreTypeId) { 58 | this.scoreTypeId = scoreTypeId; 59 | } 60 | 61 | public BigDecimal getOperateScore() { 62 | return operateScore; 63 | } 64 | 65 | public void setOperateScore(BigDecimal operateScore) { 66 | this.operateScore = operateScore; 67 | } 68 | 69 | public BigDecimal getBeforeScore() { 70 | return beforeScore; 71 | } 72 | 73 | public void setBeforeScore(BigDecimal beforeScore) { 74 | this.beforeScore = beforeScore; 75 | } 76 | 77 | public BigDecimal getAfterScore() { 78 | return afterScore; 79 | } 80 | 81 | public void setAfterScore(BigDecimal afterScore) { 82 | this.afterScore = afterScore; 83 | } 84 | 85 | public String getRemark() { 86 | return remark; 87 | } 88 | 89 | public void setRemark(String remark) { 90 | this.remark = remark; 91 | } 92 | 93 | public String getCreatePerson() { 94 | return createPerson; 95 | } 96 | 97 | public void setCreatePerson(String createPerson) { 98 | this.createPerson = createPerson; 99 | } 100 | 101 | public Date getCreateDate() { 102 | return createDate; 103 | } 104 | 105 | public void setCreateDate(Date createDate) { 106 | this.createDate = createDate; 107 | } 108 | 109 | public String getCreateIp() { 110 | return createIp; 111 | } 112 | 113 | public void setCreateIp(String createIp) { 114 | this.createIp = createIp; 115 | } 116 | } -------------------------------------------------------------------------------- /member-model/src/main/java/com/cl/member/model/member/CommodityComment.java: -------------------------------------------------------------------------------- 1 | package com.cl.member.model.member; 2 | 3 | import java.util.Date; 4 | 5 | public class CommodityComment { 6 | private Integer id; 7 | 8 | private String no; 9 | 10 | private Integer memberId; 11 | 12 | private Byte score; 13 | 14 | private Byte sizeTypeId; 15 | 16 | private String remark; 17 | 18 | private String reply; 19 | 20 | private Byte status; 21 | 22 | private String createPerson; 23 | 24 | private Date createDate; 25 | 26 | private String updatePerson; 27 | 28 | private Date updateDate; 29 | 30 | public Integer getId() { 31 | return id; 32 | } 33 | 34 | public void setId(Integer id) { 35 | this.id = id; 36 | } 37 | 38 | public String getNo() { 39 | return no; 40 | } 41 | 42 | public void setNo(String no) { 43 | this.no = no; 44 | } 45 | 46 | public Integer getMemberId() { 47 | return memberId; 48 | } 49 | 50 | public void setMemberId(Integer memberId) { 51 | this.memberId = memberId; 52 | } 53 | 54 | public Byte getScore() { 55 | return score; 56 | } 57 | 58 | public void setScore(Byte score) { 59 | this.score = score; 60 | } 61 | 62 | public Byte getSizeTypeId() { 63 | return sizeTypeId; 64 | } 65 | 66 | public void setSizeTypeId(Byte sizeTypeId) { 67 | this.sizeTypeId = sizeTypeId; 68 | } 69 | 70 | public String getRemark() { 71 | return remark; 72 | } 73 | 74 | public void setRemark(String remark) { 75 | this.remark = remark; 76 | } 77 | 78 | public String getReply() { 79 | return reply; 80 | } 81 | 82 | public void setReply(String reply) { 83 | this.reply = reply; 84 | } 85 | 86 | public Byte getStatus() { 87 | return status; 88 | } 89 | 90 | public void setStatus(Byte status) { 91 | this.status = status; 92 | } 93 | 94 | public String getCreatePerson() { 95 | return createPerson; 96 | } 97 | 98 | public void setCreatePerson(String createPerson) { 99 | this.createPerson = createPerson; 100 | } 101 | 102 | public Date getCreateDate() { 103 | return createDate; 104 | } 105 | 106 | public void setCreateDate(Date createDate) { 107 | this.createDate = createDate; 108 | } 109 | 110 | public String getUpdatePerson() { 111 | return updatePerson; 112 | } 113 | 114 | public void setUpdatePerson(String updatePerson) { 115 | this.updatePerson = updatePerson; 116 | } 117 | 118 | public Date getUpdateDate() { 119 | return updateDate; 120 | } 121 | 122 | public void setUpdateDate(Date updateDate) { 123 | this.updateDate = updateDate; 124 | } 125 | } -------------------------------------------------------------------------------- /member-server/src/main/java/com/cl/member/controller/IndexController.java: -------------------------------------------------------------------------------- 1 | package com.cl.member.controller; 2 | 3 | import java.util.Calendar; 4 | import java.util.Date; 5 | 6 | import javax.servlet.http.HttpServletRequest; 7 | 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Controller; 10 | import org.springframework.ui.ModelMap; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.ResponseBody; 13 | 14 | import com.cl.member.utils.ConfigUtil; 15 | import com.cl.member.utils.ConstantUtil; 16 | import com.cl.member.utils.SessionUtil; 17 | import com.cl.member.utils.StringUtil; 18 | import com.cl.privilege.api.IPrivilegeBaseApiService; 19 | import com.cl.privilege.model.User; 20 | 21 | 22 | 23 | /** 24 | *主界面及登录验证相关的控制器 25 | */ 26 | 27 | @Controller 28 | @RequestMapping("/controller") 29 | public class IndexController { 30 | 31 | @Autowired 32 | private IPrivilegeBaseApiService privilegeBaseApiService; 33 | @Autowired 34 | private ConfigUtil configUtil; 35 | 36 | @RequestMapping("/main") 37 | public String main(String visitedModule,HttpServletRequest request,ModelMap map) { 38 | 39 | visitedModule = "m"; 40 | 41 | //初始化用户、菜单 42 | User user = SessionUtil.getSessionUser(request); 43 | String menus = privilegeBaseApiService.getModuleTree(user.getId(),visitedModule,""); 44 | map.put("user", user); 45 | map.put("menus", menus); 46 | 47 | int hours = Calendar.getInstance().get(Calendar.HOUR_OF_DAY); 48 | map.put("hours", hours); 49 | 50 | return "main.ftl"; 51 | } 52 | 53 | @RequestMapping("/logout") 54 | public String logout(HttpServletRequest request) throws Exception 55 | { 56 | SessionUtil.clearSession(request); 57 | //被拦截器拦截处理 58 | return "redirect:" + configUtil.getCasServerUrl()+"/logout?service=" + configUtil.getCasServiceUrl(); 59 | } 60 | 61 | @RequestMapping("/modifypasswordform") 62 | public String modifypasswordform(HttpServletRequest request) throws Exception 63 | { 64 | return "modifypasswordform.ftl"; 65 | } 66 | 67 | @ResponseBody 68 | @RequestMapping("/modifypassword") 69 | public String modifypassword(String oldpassword,String password,HttpServletRequest request) throws Exception 70 | { 71 | if(StringUtil.isStrEmpty(oldpassword) || StringUtil.isStrEmpty(password)) return ConstantUtil.Fail; 72 | //初始化用户、菜单 73 | User user = SessionUtil.getSessionUser(request); 74 | if(!user.getPassword().equals(StringUtil.makeMD5(oldpassword))) return ConstantUtil.Fail; 75 | User newUser = new User(); 76 | newUser.setId(user.getId()); 77 | newUser.setPassword(StringUtil.makeMD5(password)); 78 | newUser.setUpdateDate(new Date()); 79 | newUser.setUpdatePerson(user.getUsername()); 80 | privilegeBaseApiService.updateUserById(newUser); 81 | 82 | //更新session 83 | user.setPassword(newUser.getPassword()); 84 | request.getSession().setAttribute(SessionUtil.SessionSystemLoginUserName,user); 85 | 86 | return ConstantUtil.Success; 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /member-model/src/main/java/com/cl/member/model/member/MemberMoneyIO.java: -------------------------------------------------------------------------------- 1 | package com.cl.member.model.member; 2 | 3 | import java.math.BigDecimal; 4 | import java.util.Date; 5 | 6 | public class MemberMoneyIO { 7 | private Integer id; 8 | 9 | private Integer memberId; 10 | 11 | private String formCode; 12 | 13 | private String refundCode; 14 | 15 | private Byte moneyTypeId; 16 | 17 | private BigDecimal operateMoney; 18 | 19 | private BigDecimal beforeMoney; 20 | 21 | private BigDecimal afterMoney; 22 | 23 | private String remark; 24 | 25 | private String createPerson; 26 | 27 | private Date createDate; 28 | 29 | private String createIp; 30 | 31 | public Integer getId() { 32 | return id; 33 | } 34 | 35 | public void setId(Integer id) { 36 | this.id = id; 37 | } 38 | 39 | public Integer getMemberId() { 40 | return memberId; 41 | } 42 | 43 | public void setMemberId(Integer memberId) { 44 | this.memberId = memberId; 45 | } 46 | 47 | public String getFormCode() { 48 | return formCode; 49 | } 50 | 51 | public void setFormCode(String formCode) { 52 | this.formCode = formCode; 53 | } 54 | 55 | public String getRefundCode() { 56 | return refundCode; 57 | } 58 | 59 | public void setRefundCode(String refundCode) { 60 | this.refundCode = refundCode; 61 | } 62 | 63 | public Byte getMoneyTypeId() { 64 | return moneyTypeId; 65 | } 66 | 67 | public void setMoneyTypeId(Byte moneyTypeId) { 68 | this.moneyTypeId = moneyTypeId; 69 | } 70 | 71 | public BigDecimal getOperateMoney() { 72 | return operateMoney; 73 | } 74 | 75 | public void setOperateMoney(BigDecimal operateMoney) { 76 | this.operateMoney = operateMoney; 77 | } 78 | 79 | public BigDecimal getBeforeMoney() { 80 | return beforeMoney; 81 | } 82 | 83 | public void setBeforeMoney(BigDecimal beforeMoney) { 84 | this.beforeMoney = beforeMoney; 85 | } 86 | 87 | public BigDecimal getAfterMoney() { 88 | return afterMoney; 89 | } 90 | 91 | public void setAfterMoney(BigDecimal afterMoney) { 92 | this.afterMoney = afterMoney; 93 | } 94 | 95 | public String getRemark() { 96 | return remark; 97 | } 98 | 99 | public void setRemark(String remark) { 100 | this.remark = remark; 101 | } 102 | 103 | public String getCreatePerson() { 104 | return createPerson; 105 | } 106 | 107 | public void setCreatePerson(String createPerson) { 108 | this.createPerson = createPerson; 109 | } 110 | 111 | public Date getCreateDate() { 112 | return createDate; 113 | } 114 | 115 | public void setCreateDate(Date createDate) { 116 | this.createDate = createDate; 117 | } 118 | 119 | public String getCreateIp() { 120 | return createIp; 121 | } 122 | 123 | public void setCreateIp(String createIp) { 124 | this.createIp = createIp; 125 | } 126 | } -------------------------------------------------------------------------------- /member-model/src/main/java/com/cl/member/model/member/MemberConsignee.java: -------------------------------------------------------------------------------- 1 | package com.cl.member.model.member; 2 | 3 | import java.util.Date; 4 | 5 | public class MemberConsignee { 6 | private Integer id; 7 | 8 | private Integer memberId; 9 | 10 | private String province; 11 | 12 | private String city; 13 | 14 | private String area; 15 | 16 | private String address; 17 | 18 | private String postcode; 19 | 20 | private String consignee; 21 | 22 | private String telephone; 23 | 24 | private String mobile; 25 | 26 | private String email; 27 | 28 | private Boolean isDelete; 29 | 30 | private String createPerson; 31 | 32 | private Date createDate; 33 | 34 | private String updatePerson; 35 | 36 | private Date updateDate; 37 | 38 | public Integer getId() { 39 | return id; 40 | } 41 | 42 | public void setId(Integer id) { 43 | this.id = id; 44 | } 45 | 46 | public Integer getMemberId() { 47 | return memberId; 48 | } 49 | 50 | public void setMemberId(Integer memberId) { 51 | this.memberId = memberId; 52 | } 53 | 54 | public String getProvince() { 55 | return province; 56 | } 57 | 58 | public void setProvince(String province) { 59 | this.province = province; 60 | } 61 | 62 | public String getCity() { 63 | return city; 64 | } 65 | 66 | public void setCity(String city) { 67 | this.city = city; 68 | } 69 | 70 | public String getArea() { 71 | return area; 72 | } 73 | 74 | public void setArea(String area) { 75 | this.area = area; 76 | } 77 | 78 | public String getAddress() { 79 | return address; 80 | } 81 | 82 | public void setAddress(String address) { 83 | this.address = address; 84 | } 85 | 86 | public String getPostcode() { 87 | return postcode; 88 | } 89 | 90 | public void setPostcode(String postcode) { 91 | this.postcode = postcode; 92 | } 93 | 94 | public String getConsignee() { 95 | return consignee; 96 | } 97 | 98 | public void setConsignee(String consignee) { 99 | this.consignee = consignee; 100 | } 101 | 102 | public String getTelephone() { 103 | return telephone; 104 | } 105 | 106 | public void setTelephone(String telephone) { 107 | this.telephone = telephone; 108 | } 109 | 110 | public String getMobile() { 111 | return mobile; 112 | } 113 | 114 | public void setMobile(String mobile) { 115 | this.mobile = mobile; 116 | } 117 | 118 | public String getEmail() { 119 | return email; 120 | } 121 | 122 | public void setEmail(String email) { 123 | this.email = email; 124 | } 125 | 126 | public Boolean getIsDelete() { 127 | return isDelete; 128 | } 129 | 130 | public void setIsDelete(Boolean isDelete) { 131 | this.isDelete = isDelete; 132 | } 133 | 134 | public String getCreatePerson() { 135 | return createPerson; 136 | } 137 | 138 | public void setCreatePerson(String createPerson) { 139 | this.createPerson = createPerson; 140 | } 141 | 142 | public Date getCreateDate() { 143 | return createDate; 144 | } 145 | 146 | public void setCreateDate(Date createDate) { 147 | this.createDate = createDate; 148 | } 149 | 150 | public String getUpdatePerson() { 151 | return updatePerson; 152 | } 153 | 154 | public void setUpdatePerson(String updatePerson) { 155 | this.updatePerson = updatePerson; 156 | } 157 | 158 | public Date getUpdateDate() { 159 | return updateDate; 160 | } 161 | 162 | public void setUpdateDate(Date updateDate) { 163 | this.updateDate = updateDate; 164 | } 165 | } -------------------------------------------------------------------------------- /member-api-server/src/test/resources/applicationContext-test.xml: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | Spring公共配置 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | classpath*:/config.properties 48 | 49 | file:/d:/conf/cl/member-api-server/*.properties 50 | 51 | file:/etc/conf/cl/member-api-server/*.properties 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /config_member.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 | 61 | 62 | -------------------------------------------------------------------------------- /member-api-server/src/main/resources/applicationContext.xml: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | Spring公共配置 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | classpath*:/config.properties 48 | 49 | file:/d:/conf/cl/member-api-server/*.properties 50 | 51 | file:/etc/conf/cl/member-api-server/*.properties 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /member-data/src/main/resources/com/cl/member/mapper/base/DictionaryMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | id, `group`, code, name, sort_no, create_person, create_date 15 | 16 | 22 | 23 | delete from m_dictionary 24 | where id = #{id,jdbcType=INTEGER} 25 | 26 | 27 | insert into m_dictionary (id, 'group', code, 28 | name, sort_no, create_person, 29 | create_date) 30 | values (#{id,jdbcType=INTEGER}, #{'group',jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, 31 | #{name,jdbcType=VARCHAR}, #{sortNo,jdbcType=INTEGER}, #{createPerson,jdbcType=VARCHAR}, 32 | #{createDate,jdbcType=TIMESTAMP}) 33 | 34 | 35 | insert into m_dictionary 36 | 37 | 38 | id, 39 | 40 | 41 | 'group', 42 | 43 | 44 | code, 45 | 46 | 47 | name, 48 | 49 | 50 | sort_no, 51 | 52 | 53 | create_person, 54 | 55 | 56 | create_date, 57 | 58 | 59 | 60 | 61 | #{id,jdbcType=INTEGER}, 62 | 63 | 64 | #{'group',jdbcType=VARCHAR}, 65 | 66 | 67 | #{code,jdbcType=VARCHAR}, 68 | 69 | 70 | #{name,jdbcType=VARCHAR}, 71 | 72 | 73 | #{sortNo,jdbcType=INTEGER}, 74 | 75 | 76 | #{createPerson,jdbcType=VARCHAR}, 77 | 78 | 79 | #{createDate,jdbcType=TIMESTAMP}, 80 | 81 | 82 | 83 | 84 | update m_dictionary 85 | 86 | 87 | 'group' = #{'group',jdbcType=VARCHAR}, 88 | 89 | 90 | code = #{code,jdbcType=VARCHAR}, 91 | 92 | 93 | name = #{name,jdbcType=VARCHAR}, 94 | 95 | 96 | sort_no = #{sortNo,jdbcType=INTEGER}, 97 | 98 | 99 | create_person = #{createPerson,jdbcType=VARCHAR}, 100 | 101 | 102 | create_date = #{createDate,jdbcType=TIMESTAMP}, 103 | 104 | 105 | where id = #{id,jdbcType=INTEGER} 106 | 107 | 108 | update m_dictionary 109 | set 'group' = #{'group',jdbcType=VARCHAR}, 110 | code = #{code,jdbcType=VARCHAR}, 111 | name = #{name,jdbcType=VARCHAR}, 112 | sort_no = #{sortNo,jdbcType=INTEGER}, 113 | create_person = #{createPerson,jdbcType=VARCHAR}, 114 | create_date = #{createDate,jdbcType=TIMESTAMP} 115 | where id = #{id,jdbcType=INTEGER} 116 | 117 | -------------------------------------------------------------------------------- /member-api-server/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | cl 7 | member 8 | 1.0.0-SNAPSHOT 9 | 10 | member-api-server 11 | member-api-server 12 | war 13 | 14 | 15 | UTF-8 16 | 4.0.6.RELEASE 17 | 18 | 19 | 20 | 21 | 22 | cl 23 | member-data 24 | 1.0.0-SNAPSHOT 25 | 26 | 27 | cl 28 | member-api 29 | 1.0.0-SNAPSHOT 30 | 31 | 32 | 33 | org.jasig.cas.client 34 | cas-client-core 35 | 3.2.1-SNAPSHOT 36 | 37 | 38 | 39 | log4j 40 | log4j 41 | 1.2.16 42 | 43 | 44 | org.slf4j 45 | slf4j-api 46 | 1.6.1 47 | 48 | 49 | org.slf4j 50 | slf4j-log4j12 51 | 1.6.1 52 | 53 | 54 | 55 | org.springframework 56 | spring-core 57 | ${spring.version} 58 | 59 | 60 | org.springframework 61 | spring-beans 62 | ${spring.version} 63 | 64 | 65 | org.springframework 66 | spring-context 67 | ${spring.version} 68 | 69 | 70 | org.springframework 71 | spring-context-support 72 | ${spring.version} 73 | 74 | 75 | org.springframework 76 | spring-web 77 | ${spring.version} 78 | 79 | 80 | org.springframework 81 | spring-webmvc 82 | ${spring.version} 83 | 84 | 85 | org.springframework 86 | spring-aspects 87 | ${spring.version} 88 | 89 | 90 | org.springframework 91 | spring-jdbc 92 | ${spring.version} 93 | 94 | 95 | org.springframework.data 96 | spring-data-redis 97 | 1.3.1.RELEASE 98 | 99 | 100 | 101 | com.alibaba 102 | dubbo 103 | 2.5.3 104 | 105 | 106 | org.springframework 107 | spring 108 | 109 | 110 | netty 111 | org.jboss.netty 112 | 113 | 114 | 115 | 116 | com.github.sgroschupf 117 | zkclient 118 | 0.1 119 | 120 | 121 | 122 | com.caucho 123 | hessian 124 | 4.0.7 125 | 126 | 127 | 128 | mysql 129 | mysql-connector-java 130 | test 131 | 5.1.14 132 | 133 | 134 | -------------------------------------------------------------------------------- /member-server/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | Cl Member Manage Server 7 | 8 | webAppRootKey 9 | member-server.root 10 | 11 | 12 | contextConfigLocation 13 | 14 | classpath*:/applicationContext*.xml 15 | classpath*:/cas-member.xml 16 | 17 | 18 | 19 | log4jConfigLocation 20 | /WEB-INF/classes/log4j.xml 21 | 22 | 23 | spring.profiles.default 24 | dev 25 | 26 | 27 | 28 | 29 | encodingFilter 30 | org.springframework.web.filter.CharacterEncodingFilter 31 | 32 | encoding 33 | UTF-8 34 | 35 | 36 | forceEncoding 37 | true 38 | 39 | 40 | 41 | encodingFilter 42 | *.do 43 | 44 | 45 | 46 | 47 | org.jasig.cas.client.session.SingleSignOutHttpSessionListener 48 | 49 | 50 | CAS Single Sign Out Filter 51 | org.jasig.cas.client.session.SingleSignOutFilter 52 | 53 | 54 | CAS Single Sign Out Filter 55 | /controller/* 56 | 57 | 58 | 59 | 60 | 61 | CAS Authentication Filter 62 | org.springframework.web.filter.DelegatingFilterProxy 63 | 64 | targetBeanName 65 | casAuthenticationFilter 66 | 67 | 68 | 69 | CAS Authentication Filter 70 | /controller/* 71 | 72 | 73 | CAS Validation Filter 74 | org.springframework.web.filter.DelegatingFilterProxy 75 | 76 | targetBeanName 77 | casTicketValidationFilter 78 | 79 | 80 | 81 | CAS Validation Filter 82 | /controller/* 83 | 84 | 85 | 86 | 87 | CAS Assertion Thread Local Filter 88 | org.jasig.cas.client.util.AssertionThreadLocalFilter 89 | 90 | 91 | CAS Assertion Thread Local Filter 92 | /controller/* 93 | 94 | 95 | 96 | 97 | 98 | org.springframework.web.context.ContextLoaderListener 99 | 100 | 101 | 102 | 103 | springmvc 104 | org.springframework.web.servlet.DispatcherServlet 105 | 1 106 | 107 | 108 | springmvc 109 | *.do 110 | 111 | 112 | 113 | csv 114 | application/octet-stream 115 | 116 | 117 | 118 | index.html 119 | index.jsp 120 | 121 | 122 | -------------------------------------------------------------------------------- /member-data/src/main/resources/com/cl/member/mapper/member/MemberLogMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | id, member_id, log_type_id, log_content, create_person, create_date, create_ip 15 | 16 | 22 | 23 | delete from m_member_log 24 | where id = #{id,jdbcType=INTEGER} 25 | 26 | 27 | insert into m_member_log (id, member_id, log_type_id, 28 | log_content, create_person, create_date, 29 | create_ip) 30 | values (#{id,jdbcType=INTEGER}, #{memberId,jdbcType=INTEGER}, #{logTypeId,jdbcType=TINYINT}, 31 | #{logContent,jdbcType=VARCHAR}, #{createPerson,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, 32 | #{createIp,jdbcType=VARCHAR}) 33 | 34 | 35 | insert into m_member_log 36 | 37 | 38 | id, 39 | 40 | 41 | member_id, 42 | 43 | 44 | log_type_id, 45 | 46 | 47 | log_content, 48 | 49 | 50 | create_person, 51 | 52 | 53 | create_date, 54 | 55 | 56 | create_ip, 57 | 58 | 59 | 60 | 61 | #{id,jdbcType=INTEGER}, 62 | 63 | 64 | #{memberId,jdbcType=INTEGER}, 65 | 66 | 67 | #{logTypeId,jdbcType=TINYINT}, 68 | 69 | 70 | #{logContent,jdbcType=VARCHAR}, 71 | 72 | 73 | #{createPerson,jdbcType=VARCHAR}, 74 | 75 | 76 | #{createDate,jdbcType=TIMESTAMP}, 77 | 78 | 79 | #{createIp,jdbcType=VARCHAR}, 80 | 81 | 82 | 83 | 84 | update m_member_log 85 | 86 | 87 | member_id = #{memberId,jdbcType=INTEGER}, 88 | 89 | 90 | log_type_id = #{logTypeId,jdbcType=TINYINT}, 91 | 92 | 93 | log_content = #{logContent,jdbcType=VARCHAR}, 94 | 95 | 96 | create_person = #{createPerson,jdbcType=VARCHAR}, 97 | 98 | 99 | create_date = #{createDate,jdbcType=TIMESTAMP}, 100 | 101 | 102 | create_ip = #{createIp,jdbcType=VARCHAR}, 103 | 104 | 105 | where id = #{id,jdbcType=INTEGER} 106 | 107 | 108 | update m_member_log 109 | set member_id = #{memberId,jdbcType=INTEGER}, 110 | log_type_id = #{logTypeId,jdbcType=TINYINT}, 111 | log_content = #{logContent,jdbcType=VARCHAR}, 112 | create_person = #{createPerson,jdbcType=VARCHAR}, 113 | create_date = #{createDate,jdbcType=TIMESTAMP}, 114 | create_ip = #{createIp,jdbcType=VARCHAR} 115 | where id = #{id,jdbcType=INTEGER} 116 | 117 | -------------------------------------------------------------------------------- /member-data/src/main/resources/com/cl/member/mapper/member/MemberProcessLogMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | id, member_id, log_type_id, log_content, create_person, create_date, create_ip 15 | 16 | 22 | 23 | delete from m_member_process_log 24 | where id = #{id,jdbcType=INTEGER} 25 | 26 | 27 | insert into m_member_process_log (id, member_id, log_type_id, 28 | log_content, create_person, create_date, 29 | create_ip) 30 | values (#{id,jdbcType=INTEGER}, #{memberId,jdbcType=INTEGER}, #{logTypeId,jdbcType=TINYINT}, 31 | #{logContent,jdbcType=VARCHAR}, #{createPerson,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, 32 | #{createIp,jdbcType=VARCHAR}) 33 | 34 | 35 | insert into m_member_process_log 36 | 37 | 38 | id, 39 | 40 | 41 | member_id, 42 | 43 | 44 | log_type_id, 45 | 46 | 47 | log_content, 48 | 49 | 50 | create_person, 51 | 52 | 53 | create_date, 54 | 55 | 56 | create_ip, 57 | 58 | 59 | 60 | 61 | #{id,jdbcType=INTEGER}, 62 | 63 | 64 | #{memberId,jdbcType=INTEGER}, 65 | 66 | 67 | #{logTypeId,jdbcType=TINYINT}, 68 | 69 | 70 | #{logContent,jdbcType=VARCHAR}, 71 | 72 | 73 | #{createPerson,jdbcType=VARCHAR}, 74 | 75 | 76 | #{createDate,jdbcType=TIMESTAMP}, 77 | 78 | 79 | #{createIp,jdbcType=VARCHAR}, 80 | 81 | 82 | 83 | 84 | update m_member_process_log 85 | 86 | 87 | member_id = #{memberId,jdbcType=INTEGER}, 88 | 89 | 90 | log_type_id = #{logTypeId,jdbcType=TINYINT}, 91 | 92 | 93 | log_content = #{logContent,jdbcType=VARCHAR}, 94 | 95 | 96 | create_person = #{createPerson,jdbcType=VARCHAR}, 97 | 98 | 99 | create_date = #{createDate,jdbcType=TIMESTAMP}, 100 | 101 | 102 | create_ip = #{createIp,jdbcType=VARCHAR}, 103 | 104 | 105 | where id = #{id,jdbcType=INTEGER} 106 | 107 | 108 | update m_member_process_log 109 | set member_id = #{memberId,jdbcType=INTEGER}, 110 | log_type_id = #{logTypeId,jdbcType=TINYINT}, 111 | log_content = #{logContent,jdbcType=VARCHAR}, 112 | create_person = #{createPerson,jdbcType=VARCHAR}, 113 | create_date = #{createDate,jdbcType=TIMESTAMP}, 114 | create_ip = #{createIp,jdbcType=VARCHAR} 115 | where id = #{id,jdbcType=INTEGER} 116 | 117 | -------------------------------------------------------------------------------- /member-site/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | cl 7 | member 8 | 1.0.0-SNAPSHOT 9 | 10 | member-site 11 | member-site 12 | war 13 | 14 | 15 | UTF-8 16 | 4.0.6.RELEASE 17 | 18 | 19 | 20 | 21 | 22 | cl 23 | privilege-api 24 | 1.0.0-SNAPSHOT 25 | 26 | 27 | cl 28 | member-data 29 | 1.0.0-SNAPSHOT 30 | 31 | 32 | cl 33 | member-api 34 | 1.0.0-SNAPSHOT 35 | 36 | 37 | 38 | org.jasig.cas.client 39 | cas-client-core 40 | 3.2.1-SNAPSHOT 41 | 42 | 43 | 44 | log4j 45 | log4j 46 | 1.2.16 47 | 48 | 49 | org.slf4j 50 | slf4j-api 51 | 1.6.1 52 | 53 | 54 | org.slf4j 55 | slf4j-log4j12 56 | 1.6.1 57 | 58 | 59 | 60 | org.springframework 61 | spring-core 62 | ${spring.version} 63 | 64 | 65 | org.springframework 66 | spring-beans 67 | ${spring.version} 68 | 69 | 70 | org.springframework 71 | spring-context 72 | ${spring.version} 73 | 74 | 75 | org.springframework 76 | spring-context-support 77 | ${spring.version} 78 | 79 | 80 | org.springframework 81 | spring-web 82 | ${spring.version} 83 | 84 | 85 | org.springframework 86 | spring-webmvc 87 | ${spring.version} 88 | 89 | 90 | org.springframework 91 | spring-aspects 92 | ${spring.version} 93 | 94 | 95 | org.springframework 96 | spring-jdbc 97 | ${spring.version} 98 | 99 | 100 | org.springframework.data 101 | spring-data-redis 102 | 1.3.1.RELEASE 103 | 104 | 105 | 106 | com.alibaba 107 | dubbo 108 | 2.5.3 109 | 110 | 111 | org.springframework 112 | spring 113 | 114 | 115 | netty 116 | org.jboss.netty 117 | 118 | 119 | 120 | 121 | com.github.sgroschupf 122 | zkclient 123 | 0.1 124 | 125 | 126 | 127 | com.caucho 128 | hessian 129 | 4.0.7 130 | 131 | 132 | 133 | org.freemarker 134 | freemarker 135 | 2.3.16 136 | 137 | 138 | 139 | javax.servlet 140 | servlet-api 141 | 2.5 142 | provided 143 | 144 | 145 | jstl 146 | jstl 147 | 1.1.2 148 | 149 | 150 | 151 | commons-beanutils 152 | commons-beanutils 153 | 1.8.3 154 | 155 | 156 | commons-lang 157 | commons-lang 158 | 2.5 159 | 160 | 161 | -------------------------------------------------------------------------------- /member-server/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | cl 7 | member 8 | 1.0.0-SNAPSHOT 9 | 10 | member-server 11 | member-server 12 | war 13 | 14 | 15 | UTF-8 16 | 4.0.6.RELEASE 17 | 18 | 19 | 20 | 21 | 22 | cl 23 | privilege-api 24 | 1.0.0-SNAPSHOT 25 | 26 | 27 | cl 28 | member-data 29 | 1.0.0-SNAPSHOT 30 | 31 | 32 | cl 33 | member-api 34 | 1.0.0-SNAPSHOT 35 | 36 | 37 | 38 | org.jasig.cas.client 39 | cas-client-core 40 | 3.2.1-SNAPSHOT 41 | 42 | 43 | 44 | log4j 45 | log4j 46 | 1.2.16 47 | 48 | 49 | org.slf4j 50 | slf4j-api 51 | 1.6.1 52 | 53 | 54 | org.slf4j 55 | slf4j-log4j12 56 | 1.6.1 57 | 58 | 59 | 60 | org.springframework 61 | spring-core 62 | ${spring.version} 63 | 64 | 65 | org.springframework 66 | spring-beans 67 | ${spring.version} 68 | 69 | 70 | org.springframework 71 | spring-context 72 | ${spring.version} 73 | 74 | 75 | org.springframework 76 | spring-context-support 77 | ${spring.version} 78 | 79 | 80 | org.springframework 81 | spring-web 82 | ${spring.version} 83 | 84 | 85 | org.springframework 86 | spring-webmvc 87 | ${spring.version} 88 | 89 | 90 | org.springframework 91 | spring-aspects 92 | ${spring.version} 93 | 94 | 95 | org.springframework 96 | spring-jdbc 97 | ${spring.version} 98 | 99 | 100 | org.springframework.data 101 | spring-data-redis 102 | 1.3.1.RELEASE 103 | 104 | 105 | 106 | com.alibaba 107 | dubbo 108 | 2.5.3 109 | 110 | 111 | org.springframework 112 | spring 113 | 114 | 115 | netty 116 | org.jboss.netty 117 | 118 | 119 | 120 | 121 | com.github.sgroschupf 122 | zkclient 123 | 0.1 124 | 125 | 126 | 127 | com.caucho 128 | hessian 129 | 4.0.7 130 | 131 | 132 | 133 | org.freemarker 134 | freemarker 135 | 2.3.16 136 | 137 | 138 | 139 | javax.servlet 140 | servlet-api 141 | 2.5 142 | provided 143 | 144 | 145 | jstl 146 | jstl 147 | 1.1.2 148 | 149 | 150 | 151 | commons-beanutils 152 | commons-beanutils 153 | 1.8.3 154 | 155 | 156 | commons-lang 157 | commons-lang 158 | 2.5 159 | 160 | 161 | -------------------------------------------------------------------------------- /member-model/src/main/java/com/cl/member/model/member/Member.java: -------------------------------------------------------------------------------- 1 | package com.cl.member.model.member; 2 | 3 | import java.math.BigDecimal; 4 | import java.util.Date; 5 | 6 | public class Member { 7 | private Integer id; 8 | 9 | private String username; 10 | 11 | private String password; 12 | 13 | private String realname; 14 | 15 | private String province; 16 | 17 | private String city; 18 | 19 | private String area; 20 | 21 | private String address; 22 | 23 | private String postcode; 24 | 25 | private String telephone; 26 | 27 | private String mobile; 28 | 29 | private String email; 30 | 31 | private String gender; 32 | 33 | private String question; 34 | 35 | private String answer; 36 | 37 | private Byte sourceTypeId; 38 | 39 | private Byte levelTypeId; 40 | 41 | private BigDecimal accountMoney; 42 | 43 | private BigDecimal accountScore; 44 | 45 | private Boolean isLock; 46 | 47 | private Boolean isBlack; 48 | 49 | private String createPerson; 50 | 51 | private Date createDate; 52 | 53 | private String updatePerson; 54 | 55 | private Date updateDate; 56 | 57 | public Integer getId() { 58 | return id; 59 | } 60 | 61 | public void setId(Integer id) { 62 | this.id = id; 63 | } 64 | 65 | public String getUsername() { 66 | return username; 67 | } 68 | 69 | public void setUsername(String username) { 70 | this.username = username; 71 | } 72 | 73 | public String getPassword() { 74 | return password; 75 | } 76 | 77 | public void setPassword(String password) { 78 | this.password = password; 79 | } 80 | 81 | public String getRealname() { 82 | return realname; 83 | } 84 | 85 | public void setRealname(String realname) { 86 | this.realname = realname; 87 | } 88 | 89 | public String getProvince() { 90 | return province; 91 | } 92 | 93 | public void setProvince(String province) { 94 | this.province = province; 95 | } 96 | 97 | public String getCity() { 98 | return city; 99 | } 100 | 101 | public void setCity(String city) { 102 | this.city = city; 103 | } 104 | 105 | public String getArea() { 106 | return area; 107 | } 108 | 109 | public void setArea(String area) { 110 | this.area = area; 111 | } 112 | 113 | public String getAddress() { 114 | return address; 115 | } 116 | 117 | public void setAddress(String address) { 118 | this.address = address; 119 | } 120 | 121 | public String getPostcode() { 122 | return postcode; 123 | } 124 | 125 | public void setPostcode(String postcode) { 126 | this.postcode = postcode; 127 | } 128 | 129 | public String getTelephone() { 130 | return telephone; 131 | } 132 | 133 | public void setTelephone(String telephone) { 134 | this.telephone = telephone; 135 | } 136 | 137 | public String getMobile() { 138 | return mobile; 139 | } 140 | 141 | public void setMobile(String mobile) { 142 | this.mobile = mobile; 143 | } 144 | 145 | public String getEmail() { 146 | return email; 147 | } 148 | 149 | public void setEmail(String email) { 150 | this.email = email; 151 | } 152 | 153 | public String getGender() { 154 | return gender; 155 | } 156 | 157 | public void setGender(String gender) { 158 | this.gender = gender; 159 | } 160 | 161 | public String getQuestion() { 162 | return question; 163 | } 164 | 165 | public void setQuestion(String question) { 166 | this.question = question; 167 | } 168 | 169 | public String getAnswer() { 170 | return answer; 171 | } 172 | 173 | public void setAnswer(String answer) { 174 | this.answer = answer; 175 | } 176 | 177 | public Byte getSourceTypeId() { 178 | return sourceTypeId; 179 | } 180 | 181 | public void setSourceTypeId(Byte sourceTypeId) { 182 | this.sourceTypeId = sourceTypeId; 183 | } 184 | 185 | public Byte getLevelTypeId() { 186 | return levelTypeId; 187 | } 188 | 189 | public void setLevelTypeId(Byte levelTypeId) { 190 | this.levelTypeId = levelTypeId; 191 | } 192 | 193 | public BigDecimal getAccountMoney() { 194 | return accountMoney; 195 | } 196 | 197 | public void setAccountMoney(BigDecimal accountMoney) { 198 | this.accountMoney = accountMoney; 199 | } 200 | 201 | public BigDecimal getAccountScore() { 202 | return accountScore; 203 | } 204 | 205 | public void setAccountScore(BigDecimal accountScore) { 206 | this.accountScore = accountScore; 207 | } 208 | 209 | public Boolean getIsLock() { 210 | return isLock; 211 | } 212 | 213 | public void setIsLock(Boolean isLock) { 214 | this.isLock = isLock; 215 | } 216 | 217 | public Boolean getIsBlack() { 218 | return isBlack; 219 | } 220 | 221 | public void setIsBlack(Boolean isBlack) { 222 | this.isBlack = isBlack; 223 | } 224 | 225 | public String getCreatePerson() { 226 | return createPerson; 227 | } 228 | 229 | public void setCreatePerson(String createPerson) { 230 | this.createPerson = createPerson; 231 | } 232 | 233 | public Date getCreateDate() { 234 | return createDate; 235 | } 236 | 237 | public void setCreateDate(Date createDate) { 238 | this.createDate = createDate; 239 | } 240 | 241 | public String getUpdatePerson() { 242 | return updatePerson; 243 | } 244 | 245 | public void setUpdatePerson(String updatePerson) { 246 | this.updatePerson = updatePerson; 247 | } 248 | 249 | public Date getUpdateDate() { 250 | return updateDate; 251 | } 252 | 253 | public void setUpdateDate(Date updateDate) { 254 | this.updateDate = updateDate; 255 | } 256 | } -------------------------------------------------------------------------------- /member-server/src/main/resources/applicationContext.xml: -------------------------------------------------------------------------------- 1 | 2 | 21 | 22 | Spring公共配置 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | classpath*:/config.properties 48 | 49 | file:/d:/conf/cl/member-server/*.properties 50 | 51 | file:/etc/conf/cl/member-server/*.properties 52 | 53 | 54 | 55 | 56 | 57 | 59 | 60 | 61 | 62 | 63 | 64 | 0 65 | zh_CN 66 | UTF-8 67 | UTF-8 68 | rethrow 69 | #.## 70 | yyyy-MM-dd 71 | HH:mm:ss 72 | yyyy-MM-dd HH:mm:ss 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | -------------------------------------------------------------------------------- /member-server/src/main/webapp/scripts/custom/cl.js: -------------------------------------------------------------------------------- 1 | var Cl = function() { 2 | return { 3 | action: "", 4 | selected: {}, 5 | tableName: "datatable_cl", 6 | modalName: "modal_cl", 7 | formName: "form_cl", 8 | treeName: "tree_cl", 9 | ajaxRequest: function (url,reqParam,callback) { 10 | $.ajax({ 11 | type: 'POST', 12 | url: url, 13 | data: reqParam, 14 | cache: false, 15 | success: callback 16 | }); 17 | }, 18 | refreshDataTable: function(name) { 19 | var oTable = $('#'+name).dataTable(); 20 | oTable.fnDraw(); 21 | }, 22 | updateDataRow: function(tableName,id,idindex,url) { 23 | var data={ 24 | "id":id 25 | }; 26 | Cl.ajaxRequest(url,data,function(result){ 27 | if(!result) return ; 28 | //result = result.replace(/(^\s*)|(\s*$)/g,''); 29 | var oTable = $('#'+tableName).dataTable(); 30 | var nNodes = oTable.fnGetNodes(); 31 | for(var i=0;i' + 61 | '
' + 62 | '
' + 63 | '
' + 64 | ''; 65 | $.fn.modalmanager.defaults.resize = true; 66 | $("
").appendTo($('body')); 67 | }, 68 | showModalWindow: function(modalName,url) { 69 | var $modal = $('#'+modalName); 70 | $('body').modalmanager('loading'); 71 | setTimeout(function(){ 72 | $modal.load(url, '', function(){ 73 | $modal.modal(); 74 | }); 75 | }, 1000); 76 | }, 77 | hideModalWindow: function(modalDiv) { 78 | var $modal = $('#'+modalDiv); 79 | $modal.modal("hide") 80 | }, 81 | initModifyPassword: function(url) 82 | { 83 | var handleValidation = function() { 84 | // for more info visit the official plugin documentation: 85 | // http://docs.jquery.com/Plugins/Validation 86 | var form1 = $('#form_cl_mp'); 87 | var error1 = $('.alert-danger', form1); 88 | var success1 = $('.alert-success', form1); 89 | form1.validate({ 90 | errorElement: 'span', //default input error message container 91 | errorClass: 'help-block', // default input error message class 92 | focusInvalid: false, // do not focus the last invalid input 93 | ignore: "", 94 | rules: { 95 | oldpassword: { 96 | minlength: 2, 97 | required: true 98 | }, 99 | password: { 100 | minlength: 2, 101 | required: true 102 | }, 103 | confirmpassword: { 104 | minlength: 2, 105 | required: true, 106 | equalTo: "#password" 107 | } 108 | }, 109 | invalidHandler: function (event, validator) { //display error alert on form submit 110 | success1.hide(); 111 | error1.show(); 112 | App.scrollTo(error1, -200); 113 | }, 114 | highlight: function (element) { // hightlight error inputs 115 | $(element) 116 | .closest('.form-group').addClass('has-error'); // set error class to the control group 117 | }, 118 | unhighlight: function (element) { // revert the change done by hightlight 119 | $(element) 120 | .closest('.form-group').removeClass('has-error'); // set error class to the control group 121 | }, 122 | success: function (label) { 123 | label 124 | .closest('.form-group').removeClass('has-error'); // set success class to the control group 125 | }, 126 | submitHandler: function (form) { 127 | modify(); 128 | } 129 | }); 130 | } 131 | var handleWysihtml5 = function() { 132 | if (!jQuery().wysihtml5) { 133 | return; 134 | } 135 | if ($('.wysihtml5').size() > 0) { 136 | $('.wysihtml5').wysihtml5({ 137 | "stylesheets": ["http://127.0.0.1/privilege_inc/assets/plugins/bootstrap-wysihtml5/wysiwyg-color.css"] 138 | }); 139 | } 140 | } 141 | var modify = function() { 142 | var data={ 143 | "oldpassword":$("#oldpassword").val(), 144 | "password": $("#password").val() 145 | }; 146 | Cl.ajaxRequest(url,data,function(result){ 147 | if(!result) return ; 148 | result = result.replace(/(^\s*)|(\s*$)/g,''); 149 | if(result == "success"){ 150 | alert("修改成功"); 151 | Cl.hideModalWindow(Cl.modalName); 152 | } else { 153 | alert("旧密码输入错误"); 154 | return ; 155 | } 156 | }); 157 | } 158 | 159 | handleWysihtml5(); 160 | handleValidation(); 161 | } 162 | }; 163 | }(); -------------------------------------------------------------------------------- /member-server/src/main/webapp/WEB-INF/ftl/main.ftl: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 创力 | 会员中心 - 主页 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | <#include "header.ftl" > 48 | 49 |
50 |
51 | 52 | 53 |
54 | 55 | <#include "sidebar.ftl" > 56 | 57 | 58 |
59 |
60 | 61 |
62 |
63 | 64 |

65 | 会员中心 66 |

67 | 81 | 82 |
83 |
84 | 85 | 86 |
87 |
88 |
89 |
90 |
91 | 会员中心 92 |
93 |
94 |
95 | <#if hours?? && (hours < 12 && hours >= 5 ) > 96 | 上午好! 97 | <#elseif hours?? && (hours >= 12 && hours < 18 )> 98 | 下午好! 99 | <#else> 100 | 晚上好! 101 | 102 | ${user.fullname?default("")} 103 |
104 |
105 |
106 |
107 | 108 |
109 |
110 | 111 |
112 | 113 | 114 | <#include "footer.ftl" > 115 | 116 | 117 | 118 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 146 | 147 | 148 | 149 | 150 | -------------------------------------------------------------------------------- /member-data/src/main/resources/com/cl/member/mapper/member/MemberScoreIOMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | id, member_id, form_code, score_type_id, operate_score, before_score, after_score, 19 | remark, create_person, create_date, create_ip 20 | 21 | 27 | 28 | delete from m_member_score_io 29 | where id = #{id,jdbcType=INTEGER} 30 | 31 | 32 | insert into m_member_score_io (id, member_id, form_code, 33 | score_type_id, operate_score, before_score, 34 | after_score, remark, create_person, 35 | create_date, create_ip) 36 | values (#{id,jdbcType=INTEGER}, #{memberId,jdbcType=INTEGER}, #{formCode,jdbcType=VARCHAR}, 37 | #{scoreTypeId,jdbcType=TINYINT}, #{operateScore,jdbcType=DECIMAL}, #{beforeScore,jdbcType=DECIMAL}, 38 | #{afterScore,jdbcType=DECIMAL}, #{remark,jdbcType=VARCHAR}, #{createPerson,jdbcType=VARCHAR}, 39 | #{createDate,jdbcType=TIMESTAMP}, #{createIp,jdbcType=VARCHAR}) 40 | 41 | 42 | insert into m_member_score_io 43 | 44 | 45 | id, 46 | 47 | 48 | member_id, 49 | 50 | 51 | form_code, 52 | 53 | 54 | score_type_id, 55 | 56 | 57 | operate_score, 58 | 59 | 60 | before_score, 61 | 62 | 63 | after_score, 64 | 65 | 66 | remark, 67 | 68 | 69 | create_person, 70 | 71 | 72 | create_date, 73 | 74 | 75 | create_ip, 76 | 77 | 78 | 79 | 80 | #{id,jdbcType=INTEGER}, 81 | 82 | 83 | #{memberId,jdbcType=INTEGER}, 84 | 85 | 86 | #{formCode,jdbcType=VARCHAR}, 87 | 88 | 89 | #{scoreTypeId,jdbcType=TINYINT}, 90 | 91 | 92 | #{operateScore,jdbcType=DECIMAL}, 93 | 94 | 95 | #{beforeScore,jdbcType=DECIMAL}, 96 | 97 | 98 | #{afterScore,jdbcType=DECIMAL}, 99 | 100 | 101 | #{remark,jdbcType=VARCHAR}, 102 | 103 | 104 | #{createPerson,jdbcType=VARCHAR}, 105 | 106 | 107 | #{createDate,jdbcType=TIMESTAMP}, 108 | 109 | 110 | #{createIp,jdbcType=VARCHAR}, 111 | 112 | 113 | 114 | 115 | update m_member_score_io 116 | 117 | 118 | member_id = #{memberId,jdbcType=INTEGER}, 119 | 120 | 121 | form_code = #{formCode,jdbcType=VARCHAR}, 122 | 123 | 124 | score_type_id = #{scoreTypeId,jdbcType=TINYINT}, 125 | 126 | 127 | operate_score = #{operateScore,jdbcType=DECIMAL}, 128 | 129 | 130 | before_score = #{beforeScore,jdbcType=DECIMAL}, 131 | 132 | 133 | after_score = #{afterScore,jdbcType=DECIMAL}, 134 | 135 | 136 | remark = #{remark,jdbcType=VARCHAR}, 137 | 138 | 139 | create_person = #{createPerson,jdbcType=VARCHAR}, 140 | 141 | 142 | create_date = #{createDate,jdbcType=TIMESTAMP}, 143 | 144 | 145 | create_ip = #{createIp,jdbcType=VARCHAR}, 146 | 147 | 148 | where id = #{id,jdbcType=INTEGER} 149 | 150 | 151 | update m_member_score_io 152 | set member_id = #{memberId,jdbcType=INTEGER}, 153 | form_code = #{formCode,jdbcType=VARCHAR}, 154 | score_type_id = #{scoreTypeId,jdbcType=TINYINT}, 155 | operate_score = #{operateScore,jdbcType=DECIMAL}, 156 | before_score = #{beforeScore,jdbcType=DECIMAL}, 157 | after_score = #{afterScore,jdbcType=DECIMAL}, 158 | remark = #{remark,jdbcType=VARCHAR}, 159 | create_person = #{createPerson,jdbcType=VARCHAR}, 160 | create_date = #{createDate,jdbcType=TIMESTAMP}, 161 | create_ip = #{createIp,jdbcType=VARCHAR} 162 | where id = #{id,jdbcType=INTEGER} 163 | 164 | -------------------------------------------------------------------------------- /member-data/src/main/resources/com/cl/member/mapper/member/CommodityCommentMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | id, no, member_id, score, size_type_id, remark, reply, status, create_person, create_date, 20 | update_person, update_date 21 | 22 | 28 | 29 | delete from m_commodity_comment 30 | where id = #{id,jdbcType=INTEGER} 31 | 32 | 33 | insert into m_commodity_comment (id, no, member_id, 34 | score, size_type_id, remark, 35 | reply, status, create_person, 36 | create_date, update_person, update_date 37 | ) 38 | values (#{id,jdbcType=INTEGER}, #{no,jdbcType=VARCHAR}, #{memberId,jdbcType=INTEGER}, 39 | #{score,jdbcType=TINYINT}, #{sizeTypeId,jdbcType=TINYINT}, #{remark,jdbcType=VARCHAR}, 40 | #{reply,jdbcType=VARCHAR}, #{status,jdbcType=TINYINT}, #{createPerson,jdbcType=VARCHAR}, 41 | #{createDate,jdbcType=TIMESTAMP}, #{updatePerson,jdbcType=VARCHAR}, #{updateDate,jdbcType=TIMESTAMP} 42 | ) 43 | 44 | 45 | insert into m_commodity_comment 46 | 47 | 48 | id, 49 | 50 | 51 | no, 52 | 53 | 54 | member_id, 55 | 56 | 57 | score, 58 | 59 | 60 | size_type_id, 61 | 62 | 63 | remark, 64 | 65 | 66 | reply, 67 | 68 | 69 | status, 70 | 71 | 72 | create_person, 73 | 74 | 75 | create_date, 76 | 77 | 78 | update_person, 79 | 80 | 81 | update_date, 82 | 83 | 84 | 85 | 86 | #{id,jdbcType=INTEGER}, 87 | 88 | 89 | #{no,jdbcType=VARCHAR}, 90 | 91 | 92 | #{memberId,jdbcType=INTEGER}, 93 | 94 | 95 | #{score,jdbcType=TINYINT}, 96 | 97 | 98 | #{sizeTypeId,jdbcType=TINYINT}, 99 | 100 | 101 | #{remark,jdbcType=VARCHAR}, 102 | 103 | 104 | #{reply,jdbcType=VARCHAR}, 105 | 106 | 107 | #{status,jdbcType=TINYINT}, 108 | 109 | 110 | #{createPerson,jdbcType=VARCHAR}, 111 | 112 | 113 | #{createDate,jdbcType=TIMESTAMP}, 114 | 115 | 116 | #{updatePerson,jdbcType=VARCHAR}, 117 | 118 | 119 | #{updateDate,jdbcType=TIMESTAMP}, 120 | 121 | 122 | 123 | 124 | update m_commodity_comment 125 | 126 | 127 | no = #{no,jdbcType=VARCHAR}, 128 | 129 | 130 | member_id = #{memberId,jdbcType=INTEGER}, 131 | 132 | 133 | score = #{score,jdbcType=TINYINT}, 134 | 135 | 136 | size_type_id = #{sizeTypeId,jdbcType=TINYINT}, 137 | 138 | 139 | remark = #{remark,jdbcType=VARCHAR}, 140 | 141 | 142 | reply = #{reply,jdbcType=VARCHAR}, 143 | 144 | 145 | status = #{status,jdbcType=TINYINT}, 146 | 147 | 148 | create_person = #{createPerson,jdbcType=VARCHAR}, 149 | 150 | 151 | create_date = #{createDate,jdbcType=TIMESTAMP}, 152 | 153 | 154 | update_person = #{updatePerson,jdbcType=VARCHAR}, 155 | 156 | 157 | update_date = #{updateDate,jdbcType=TIMESTAMP}, 158 | 159 | 160 | where id = #{id,jdbcType=INTEGER} 161 | 162 | 163 | update m_commodity_comment 164 | set no = #{no,jdbcType=VARCHAR}, 165 | member_id = #{memberId,jdbcType=INTEGER}, 166 | score = #{score,jdbcType=TINYINT}, 167 | size_type_id = #{sizeTypeId,jdbcType=TINYINT}, 168 | remark = #{remark,jdbcType=VARCHAR}, 169 | reply = #{reply,jdbcType=VARCHAR}, 170 | status = #{status,jdbcType=TINYINT}, 171 | create_person = #{createPerson,jdbcType=VARCHAR}, 172 | create_date = #{createDate,jdbcType=TIMESTAMP}, 173 | update_person = #{updatePerson,jdbcType=VARCHAR}, 174 | update_date = #{updateDate,jdbcType=TIMESTAMP} 175 | where id = #{id,jdbcType=INTEGER} 176 | 177 | -------------------------------------------------------------------------------- /member-data/src/main/resources/com/cl/member/mapper/member/MemberMoneyIOMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | id, member_id, form_code, refund_code, money_type_id, operate_money, before_money, 20 | after_money, remark, create_person, create_date, create_ip 21 | 22 | 28 | 29 | delete from m_member_money_io 30 | where id = #{id,jdbcType=INTEGER} 31 | 32 | 33 | insert into m_member_money_io (id, member_id, form_code, 34 | refund_code, money_type_id, operate_money, 35 | before_money, after_money, remark, 36 | create_person, create_date, create_ip 37 | ) 38 | values (#{id,jdbcType=INTEGER}, #{memberId,jdbcType=INTEGER}, #{formCode,jdbcType=VARCHAR}, 39 | #{refundCode,jdbcType=VARCHAR}, #{moneyTypeId,jdbcType=TINYINT}, #{operateMoney,jdbcType=DECIMAL}, 40 | #{beforeMoney,jdbcType=DECIMAL}, #{afterMoney,jdbcType=DECIMAL}, #{remark,jdbcType=VARCHAR}, 41 | #{createPerson,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, #{createIp,jdbcType=VARCHAR} 42 | ) 43 | 44 | 45 | insert into m_member_money_io 46 | 47 | 48 | id, 49 | 50 | 51 | member_id, 52 | 53 | 54 | form_code, 55 | 56 | 57 | refund_code, 58 | 59 | 60 | money_type_id, 61 | 62 | 63 | operate_money, 64 | 65 | 66 | before_money, 67 | 68 | 69 | after_money, 70 | 71 | 72 | remark, 73 | 74 | 75 | create_person, 76 | 77 | 78 | create_date, 79 | 80 | 81 | create_ip, 82 | 83 | 84 | 85 | 86 | #{id,jdbcType=INTEGER}, 87 | 88 | 89 | #{memberId,jdbcType=INTEGER}, 90 | 91 | 92 | #{formCode,jdbcType=VARCHAR}, 93 | 94 | 95 | #{refundCode,jdbcType=VARCHAR}, 96 | 97 | 98 | #{moneyTypeId,jdbcType=TINYINT}, 99 | 100 | 101 | #{operateMoney,jdbcType=DECIMAL}, 102 | 103 | 104 | #{beforeMoney,jdbcType=DECIMAL}, 105 | 106 | 107 | #{afterMoney,jdbcType=DECIMAL}, 108 | 109 | 110 | #{remark,jdbcType=VARCHAR}, 111 | 112 | 113 | #{createPerson,jdbcType=VARCHAR}, 114 | 115 | 116 | #{createDate,jdbcType=TIMESTAMP}, 117 | 118 | 119 | #{createIp,jdbcType=VARCHAR}, 120 | 121 | 122 | 123 | 124 | update m_member_money_io 125 | 126 | 127 | member_id = #{memberId,jdbcType=INTEGER}, 128 | 129 | 130 | form_code = #{formCode,jdbcType=VARCHAR}, 131 | 132 | 133 | refund_code = #{refundCode,jdbcType=VARCHAR}, 134 | 135 | 136 | money_type_id = #{moneyTypeId,jdbcType=TINYINT}, 137 | 138 | 139 | operate_money = #{operateMoney,jdbcType=DECIMAL}, 140 | 141 | 142 | before_money = #{beforeMoney,jdbcType=DECIMAL}, 143 | 144 | 145 | after_money = #{afterMoney,jdbcType=DECIMAL}, 146 | 147 | 148 | remark = #{remark,jdbcType=VARCHAR}, 149 | 150 | 151 | create_person = #{createPerson,jdbcType=VARCHAR}, 152 | 153 | 154 | create_date = #{createDate,jdbcType=TIMESTAMP}, 155 | 156 | 157 | create_ip = #{createIp,jdbcType=VARCHAR}, 158 | 159 | 160 | where id = #{id,jdbcType=INTEGER} 161 | 162 | 163 | update m_member_money_io 164 | set member_id = #{memberId,jdbcType=INTEGER}, 165 | form_code = #{formCode,jdbcType=VARCHAR}, 166 | refund_code = #{refundCode,jdbcType=VARCHAR}, 167 | money_type_id = #{moneyTypeId,jdbcType=TINYINT}, 168 | operate_money = #{operateMoney,jdbcType=DECIMAL}, 169 | before_money = #{beforeMoney,jdbcType=DECIMAL}, 170 | after_money = #{afterMoney,jdbcType=DECIMAL}, 171 | remark = #{remark,jdbcType=VARCHAR}, 172 | create_person = #{createPerson,jdbcType=VARCHAR}, 173 | create_date = #{createDate,jdbcType=TIMESTAMP}, 174 | create_ip = #{createIp,jdbcType=VARCHAR} 175 | where id = #{id,jdbcType=INTEGER} 176 | 177 | -------------------------------------------------------------------------------- /member-api-server/src/main/resources/log4j.dtd: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 22 | 23 | 26 | 27 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 50 | 51 | 52 | 53 | 54 | 55 | 59 | 60 | 62 | 63 | 66 | 67 | 68 | 69 | 70 | 71 | 74 | 78 | 79 | 80 | 83 | 84 | 85 | 88 | 89 | 90 | 91 | 92 | 93 | 96 | 97 | 98 | 99 | 100 | 103 | 104 | 105 | 109 | 110 | 111 | 112 | 113 | 117 | 118 | 119 | 120 | 124 | 125 | 126 | 127 | 128 | 129 | 134 | 135 | 136 | 137 | 138 | 143 | 144 | 145 | 146 | 148 | 149 | 150 | 152 | 153 | 154 | 157 | 158 | 159 | 160 | 164 | 165 | 166 | 169 | 170 | 171 | 174 | 175 | 176 | 180 | 181 | 182 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 203 | 204 | 205 | 206 | 208 | 209 | 210 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 230 | 231 | 232 | 233 | 234 | 238 | -------------------------------------------------------------------------------- /member-server/src/main/resources/log4j.dtd: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 22 | 23 | 26 | 27 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 50 | 51 | 52 | 53 | 54 | 55 | 59 | 60 | 62 | 63 | 66 | 67 | 68 | 69 | 70 | 71 | 74 | 78 | 79 | 80 | 83 | 84 | 85 | 88 | 89 | 90 | 91 | 92 | 93 | 96 | 97 | 98 | 99 | 100 | 103 | 104 | 105 | 109 | 110 | 111 | 112 | 113 | 117 | 118 | 119 | 120 | 124 | 125 | 126 | 127 | 128 | 129 | 134 | 135 | 136 | 137 | 138 | 143 | 144 | 145 | 146 | 148 | 149 | 150 | 152 | 153 | 154 | 157 | 158 | 159 | 160 | 164 | 165 | 166 | 169 | 170 | 171 | 174 | 175 | 176 | 180 | 181 | 182 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 203 | 204 | 205 | 206 | 208 | 209 | 210 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 230 | 231 | 232 | 233 | 234 | 238 | -------------------------------------------------------------------------------- /member-server/src/main/java/com/cl/member/utils/ReflectionUtil.java: -------------------------------------------------------------------------------- 1 | package com.cl.member.utils; 2 | 3 | import java.lang.reflect.Field; 4 | import java.lang.reflect.InvocationTargetException; 5 | import java.lang.reflect.Method; 6 | import java.lang.reflect.Modifier; 7 | import java.lang.reflect.ParameterizedType; 8 | import java.lang.reflect.Type; 9 | import java.util.ArrayList; 10 | import java.util.Collection; 11 | import java.util.Date; 12 | import java.util.Iterator; 13 | import java.util.List; 14 | 15 | import org.apache.commons.beanutils.ConvertUtils; 16 | import org.apache.commons.beanutils.PropertyUtils; 17 | import org.apache.commons.beanutils.converters.DateConverter; 18 | import org.apache.commons.lang.StringUtils; 19 | import org.apache.log4j.Logger; 20 | import org.springframework.util.Assert; 21 | 22 | @SuppressWarnings("rawtypes") 23 | public class ReflectionUtil 24 | { 25 | private static Logger logger = Logger.getLogger(ReflectionUtil.class); 26 | 27 | public static Object invokeGetterMethod(Object target, String propertyName) 28 | { 29 | String getterMethodName = "get" + StringUtils.capitalize(propertyName); 30 | return invokeMethod(target, getterMethodName, new Class[0], new Object[0]); 31 | } 32 | 33 | public static void invokeSetterMethod(Object target, String propertyName, Object value) 34 | { 35 | invokeSetterMethod(target, propertyName, value, null); 36 | } 37 | 38 | public static void invokeSetterMethod(Object target, String propertyName, Object value, Class propertyType) 39 | { 40 | 41 | Class type = (propertyType != null) ? propertyType : value.getClass(); 42 | String setterMethodName = "set" + StringUtils.capitalize(propertyName); 43 | invokeMethod(target, setterMethodName, new Class[] { type }, new Object[] { value }); 44 | } 45 | 46 | public static Object getFieldValue(Object object, String fieldName) 47 | { 48 | Field field = getDeclaredField(object, fieldName); 49 | 50 | if (field == null) { 51 | throw new IllegalArgumentException("Could not find field [" + fieldName + "] on target [" + object + "]"); 52 | } 53 | 54 | makeAccessible(field); 55 | 56 | Object result = null; 57 | try { 58 | result = field.get(object); 59 | } catch (IllegalAccessException e) { 60 | logger.error("不可能抛出的异常{}", e); 61 | } 62 | return result; 63 | } 64 | 65 | public static void setFieldValue(Object object, String fieldName, Object value) 66 | { 67 | Field field = getDeclaredField(object, fieldName); 68 | 69 | if (field == null) { 70 | throw new IllegalArgumentException("Could not find field [" + fieldName + "] on target [" + object + "]"); 71 | } 72 | 73 | makeAccessible(field); 74 | try 75 | { 76 | field.set(object, value); 77 | } catch (IllegalAccessException e) { 78 | logger.error("不可能抛出的异常:{}"); 79 | } 80 | } 81 | 82 | public static void setFieldValueByFieldType(Object object, String fieldName, Object value) 83 | { 84 | Field field = getDeclaredField(object, fieldName); 85 | 86 | if (field == null) { 87 | throw new IllegalArgumentException("Could not find field [" + fieldName + "] on target [" + object + "]"); 88 | } 89 | setFieldValue(object, fieldName, convertStringToObject((String)value, field.getType())); 90 | } 91 | 92 | public static Object invokeMethod(Object object, String methodName, Class[] parameterTypes, Object[] parameters) 93 | { 94 | Method method = getDeclaredMethod(object, methodName, parameterTypes); 95 | if (method == null) { 96 | throw new IllegalArgumentException("Could not find method [" + methodName + "] on target [" + object + "]"); 97 | } 98 | 99 | method.setAccessible(true); 100 | try 101 | { 102 | return method.invoke(object, parameters); 103 | } catch (Exception e) { 104 | throw convertReflectionExceptionToUnchecked(e); 105 | } 106 | } 107 | 108 | public static Field getDeclaredField(Object object, String fieldName) 109 | { 110 | Assert.notNull(object, "object不能为空"); 111 | Assert.hasText(fieldName, "fieldName"); 112 | for (Class superClass = object.getClass(); superClass != Object.class; superClass = superClass.getSuperclass()) 113 | try 114 | { 115 | return superClass.getDeclaredField(fieldName); 116 | } 117 | catch (NoSuchFieldException e) 118 | { 119 | } 120 | return null; 121 | } 122 | 123 | protected static void makeAccessible(Field field) 124 | { 125 | if ((!(Modifier.isPublic(field.getModifiers()))) || (!(Modifier.isPublic(field.getDeclaringClass().getModifiers())))) 126 | field.setAccessible(true); 127 | } 128 | 129 | @SuppressWarnings("unchecked") 130 | protected static Method getDeclaredMethod(Object object, String methodName, Class[] parameterTypes) 131 | { 132 | Assert.notNull(object, "object不能为空"); 133 | 134 | for (Class superClass = object.getClass(); superClass != Object.class; superClass = superClass.getSuperclass()) 135 | try 136 | { 137 | return superClass.getDeclaredMethod(methodName, parameterTypes); 138 | } 139 | catch (NoSuchMethodException e) 140 | { 141 | } 142 | return null; 143 | } 144 | 145 | @SuppressWarnings("unchecked") 146 | public static Class getSuperClassGenricType(Class clazz) 147 | { 148 | return getSuperClassGenricType(clazz, 0); 149 | } 150 | 151 | public static Class getSuperClassGenricType(Class clazz, int index) 152 | { 153 | Type genType = clazz.getGenericSuperclass(); 154 | 155 | if (!(genType instanceof ParameterizedType)) { 156 | logger.warn(clazz.getSimpleName() + "'s superclass not ParameterizedType"); 157 | return Object.class; 158 | } 159 | 160 | Type[] params = ((ParameterizedType)genType).getActualTypeArguments(); 161 | 162 | if ((index >= params.length) || (index < 0)) { 163 | logger.warn("Index: " + index + ", Size of " + clazz.getSimpleName() + "'s Parameterized Type: " + params.length); 164 | 165 | return Object.class; 166 | } 167 | if (!(params[index] instanceof Class)) { 168 | logger.warn(clazz.getSimpleName() + " not set the actual class on superclass generic parameter"); 169 | return Object.class; 170 | } 171 | 172 | return ((Class)params[index]); 173 | } 174 | 175 | public static List convertElementPropertyToList(Collection collection, String propertyName) 176 | { 177 | List list = new ArrayList(); 178 | Iterator i$; 179 | try { 180 | for (i$ = collection.iterator(); i$.hasNext(); ) { Object obj = i$.next(); 181 | list.add(PropertyUtils.getProperty(obj, propertyName)); 182 | } 183 | } catch (Exception e) { 184 | throw convertReflectionExceptionToUnchecked(e); 185 | } 186 | 187 | return list; 188 | } 189 | 190 | public static String convertElementPropertyToString(Collection collection, String propertyName, String separator) 191 | { 192 | List list = convertElementPropertyToList(collection, propertyName); 193 | return StringUtils.join(list, separator); 194 | } 195 | 196 | public static Object convertStringToObject(String value, Class toType) 197 | { 198 | try 199 | { 200 | DateConverter dc = new DateConverter(); 201 | dc.setUseLocaleFormat(true); 202 | dc.setPatterns(new String[] { "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss" }); 203 | ConvertUtils.register(dc, Date.class); 204 | return ConvertUtils.convert(value, toType); 205 | } catch (Exception e) { 206 | throw convertReflectionExceptionToUnchecked(e); 207 | } 208 | } 209 | 210 | public static RuntimeException convertReflectionExceptionToUnchecked(Exception e) 211 | { 212 | if ((e instanceof IllegalAccessException) || (e instanceof IllegalArgumentException) || (e instanceof NoSuchMethodException)) 213 | { 214 | return new IllegalArgumentException("Reflection Exception.", e); } 215 | if (e instanceof InvocationTargetException) 216 | return new RuntimeException("Reflection Exception.", ((InvocationTargetException)e).getTargetException()); 217 | if (e instanceof RuntimeException) { 218 | return ((RuntimeException)e); 219 | } 220 | return new RuntimeException("Unexpected Checked Exception.", e); 221 | } 222 | 223 | static 224 | { 225 | DateConverter dc = new DateConverter(); 226 | dc.setUseLocaleFormat(true); 227 | dc.setPatterns(new String[] { "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss" }); 228 | ConvertUtils.register(dc, Date.class); 229 | } 230 | } -------------------------------------------------------------------------------- /create_member.sql: -------------------------------------------------------------------------------- 1 | #主键原则: 2 | #UUID全局唯一,缺点是占用空间,去掉中划线后,剩余32个字节;大表1000万数据,按照一行多出100Byte计算,则多出1G数据; 3 | #若是InnoDB引擎,因为其是索引组织表,创建的每个非簇索引,都会带上主键,这样占用存储空间更大,需要消耗更多内存和IO; 4 | #自增,是可以手工指定值的,而且对于任何修改自增列的情况会导致自增列的计数器增长,可能会因为这些问题在主备、主从机制产生破坏性影响,优点是:空间和性能略高; 5 | #自定义主键,比如订单号,商品编号,用程序保证唯一性,比如每次增加一个随机数; 6 | #故我们的规则是:常被使用的基础数据表,比如品牌、分类等,就用自增ID,对于业务表,比如商品、订单,就用升序生成的编号、单据号 7 | #参考: 8 | #http://www.cnblogs.com/chutianyao/archive/2012/11/04/2753995.html 9 | #http://blog.chinaunix.net/uid-20639775-id-3154234.html 10 | 11 | #BEGIN*************************表单列表***************************BEGIN 12 | #. m_member :会员表 13 | #. m_member_consignee :会员收货地址表 14 | #. m_commodity_comment :商品评论表 15 | #. m_member_log :会员日志表 16 | #. m_member_process_log :自动任务处理会员积分、等级日志表,基于效率性能考虑,会员积分、等级都是一天算一次 17 | #. m_member_money_io :会员虚拟账户IO表 18 | #. m_member_score_io :会员积分IO表 19 | #. m_dictionary : 字典表,状态类型等字典数据都要存储于此,方便使用 20 | #END***************************表单列表***************************END 21 | 22 | #会员表 23 | DROP TABLE IF EXISTS `m_member`; 24 | CREATE TABLE `m_member` ( 25 | `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增主键' , 26 | `username` varchar(30) NOT NULL DEFAULT '' COMMENT '会员名' , 27 | `password` varchar(50) NOT NULL DEFAULT '' COMMENT '密码' , 28 | `realname` varchar(30) NOT NULL DEFAULT '' COMMENT '真实姓名' , 29 | `province` varchar(20) NOT NULL DEFAULT '' COMMENT '省份' , 30 | `city` varchar(20) NOT NULL DEFAULT '' COMMENT '城市' , 31 | `area` varchar(20) NOT NULL DEFAULT '' COMMENT '地区' , 32 | `address` varchar(200) NOT NULL DEFAULT '' COMMENT '地址' , 33 | `postcode` varchar(6) NOT NULL DEFAULT '' COMMENT '邮编' , 34 | `telephone` varchar(30) NOT NULL DEFAULT '' COMMENT '电话' , 35 | `mobile` varchar(11) NOT NULL DEFAULT '' COMMENT '手机' , 36 | `email` varchar(50) NOT NULL DEFAULT '' COMMENT 'Email' , 37 | `gender` varchar(2) NOT NULL DEFAULT '' COMMENT '性别' , 38 | `question` varchar(50) NOT NULL DEFAULT '' COMMENT '密码提示问题' , 39 | `answer` varchar(50) NOT NULL DEFAULT '' COMMENT '提示问题答案' , 40 | `source_type_id` tinyint(4) NOT NULL DEFAULT 0 COMMENT '来源' , 41 | `level_type_id` tinyint(4) NOT NULL DEFAULT 0 COMMENT '等级' , 42 | `account_money` decimal(18,2) NOT NULL DEFAULT 0 COMMENT '会员虚拟账户金额' , 43 | `account_score` decimal(18,2) NOT NULL DEFAULT 0 COMMENT '会员购买积分' , 44 | `is_lock` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否锁定:1是0否' , 45 | `is_black` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否黑名单:1是0否' , 46 | `create_person` varchar(30) NOT NULL DEFAULT '' COMMENT '记录生成人' , 47 | `create_date` datetime NOT NULL COMMENT '记录生成时间' , 48 | `update_person` varchar(30) NOT NULL DEFAULT '' COMMENT '更新人' , 49 | `update_date` datetime NOT NULL COMMENT '更新时间' , 50 | PRIMARY KEY (`id`) 51 | ) 52 | COMMENT='会员表' 53 | ; 54 | 55 | #收货地址 56 | DROP TABLE IF EXISTS `m_member_consignee`; 57 | CREATE TABLE `m_member_consignee` ( 58 | `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增主键' , 59 | `member_id` int(11) NOT NULL DEFAULT 0 COMMENT '会员ID' , 60 | `province` varchar(20) NOT NULL DEFAULT '' COMMENT '省份' , 61 | `city` varchar(20) NOT NULL DEFAULT '' COMMENT '城市' , 62 | `area` varchar(20) NOT NULL DEFAULT '' COMMENT '地区' , 63 | `address` varchar(200) NOT NULL DEFAULT '' COMMENT '地址' , 64 | `postcode` varchar(6) NOT NULL DEFAULT '' COMMENT '邮编' , 65 | `consignee` varchar(50) NOT NULL DEFAULT '' COMMENT '收货人' , 66 | `telephone` varchar(30) NOT NULL DEFAULT '' COMMENT '电话' , 67 | `mobile` varchar(11) NOT NULL DEFAULT '' COMMENT '手机' , 68 | `email` varchar(50) NOT NULL DEFAULT '' COMMENT 'Email' , 69 | `is_delete` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否删除:1是0否' , 70 | `create_person` varchar(30) NOT NULL DEFAULT '' COMMENT '记录生成人' , 71 | `create_date` datetime NOT NULL COMMENT '记录生成时间' , 72 | `update_person` varchar(30) NOT NULL DEFAULT '' COMMENT '更新人' , 73 | `update_date` datetime NOT NULL COMMENT '更新时间' , 74 | PRIMARY KEY (`id`) 75 | ) 76 | COMMENT='收货地址' 77 | ; 78 | 79 | #商品评论表 80 | DROP TABLE IF EXISTS `m_commodity_comment`; 81 | CREATE TABLE `m_commodity_comment` ( 82 | `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增主键' , 83 | `no` varchar(15) NOT NULL DEFAULT '' COMMENT '商品编号' , 84 | `member_id` int(11) NOT NULL DEFAULT 0 COMMENT '会员ID' , 85 | `score` tinyint(4) NOT NULL DEFAULT 0 COMMENT '评分' , 86 | `size_type_id` tinyint(4) NOT NULL DEFAULT 0 COMMENT '尺码大小' , 87 | `remark` varchar(500) NOT NULL DEFAULT '' COMMENT '评价内容' , 88 | `reply` varchar(500) NOT NULL DEFAULT '' COMMENT '客服回复' , 89 | `status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '0新评论1已回复-1已删除' , 90 | `create_person` varchar(30) NOT NULL DEFAULT '' COMMENT '记录生成人' , 91 | `create_date` datetime NOT NULL COMMENT '记录生成时间' , 92 | `update_person` varchar(30) NOT NULL DEFAULT '' COMMENT '更新人' , 93 | `update_date` datetime NOT NULL COMMENT '更新时间' , 94 | PRIMARY KEY (`id`) 95 | ) 96 | COMMENT='商品评论表' 97 | ; 98 | 99 | #会员日志表 100 | DROP TABLE IF EXISTS `m_member_log`; 101 | CREATE TABLE `m_member_log` ( 102 | `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增主键' , 103 | `member_id` int(11) NOT NULL DEFAULT 0 COMMENT '会员ID' , 104 | `log_type_id` tinyint(4) NOT NULL DEFAULT 0 COMMENT '日志类型ID' , 105 | `log_content` varchar(200) NOT NULL DEFAULT '' COMMENT '日志内容' , 106 | `create_person` varchar(30) NOT NULL DEFAULT '' COMMENT '记录生成人' , 107 | `create_date` datetime NOT NULL COMMENT '记录生成时间' , 108 | `create_ip` varchar(20) NOT NULL COMMENT '记录生成IP' , 109 | PRIMARY KEY (`id`) , 110 | INDEX `idx_member_log_member_id` (`member_id`) USING BTREE 111 | ) 112 | COMMENT='会员日志表' 113 | ; 114 | 115 | #自动任务处理会员积分、等级日志表 116 | DROP TABLE IF EXISTS `m_member_process_log`; 117 | CREATE TABLE `m_member_process_log` ( 118 | `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增主键' , 119 | `member_id` int(11) NOT NULL DEFAULT 0 COMMENT '会员ID' , 120 | `log_type_id` tinyint(4) NOT NULL DEFAULT 0 COMMENT '日志类型ID' , 121 | `log_content` varchar(200) NOT NULL DEFAULT '' COMMENT '日志内容' , 122 | `create_person` varchar(30) NOT NULL DEFAULT '' COMMENT '记录生成人' , 123 | `create_date` datetime NOT NULL COMMENT '记录生成时间' , 124 | `create_ip` varchar(20) NOT NULL COMMENT '记录生成IP' , 125 | PRIMARY KEY (`id`) , 126 | INDEX `idx_member_process_log_member_id` (`member_id`) USING BTREE 127 | ) 128 | COMMENT='自动任务处理会员积分、等级日志表' 129 | ; 130 | 131 | #会员虚拟账户IO表 132 | DROP TABLE IF EXISTS `m_member_money_io`; 133 | CREATE TABLE `m_member_money_io` ( 134 | `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增主键' , 135 | `member_id` int(11) NOT NULL DEFAULT 0 COMMENT '会员ID' , 136 | `form_code` varchar(15) NOT NULL DEFAULT '' COMMENT '涉及订单号' , 137 | `refund_code` varchar(15) NOT NULL DEFAULT '' COMMENT '涉及退款单号' , 138 | `money_type_id` tinyint(4) NOT NULL DEFAULT 0 COMMENT '款项流转类型ID' , 139 | `operate_money` decimal(18,2) NOT NULL DEFAULT 0 COMMENT '本次操作金额,+入-出' , 140 | `before_money` decimal(18,2) NOT NULL DEFAULT 0 COMMENT '之前虚拟账户金额' , 141 | `after_money` decimal(18,2) NOT NULL DEFAULT 0 COMMENT '之后虚拟账户金额' , 142 | `remark` varchar(50) NOT NULL DEFAULT '' COMMENT '备注' , 143 | `create_person` varchar(30) NOT NULL DEFAULT '' COMMENT '记录生成人' , 144 | `create_date` datetime NOT NULL COMMENT '记录生成时间' , 145 | `create_ip` varchar(20) NOT NULL COMMENT '记录生成IP' , 146 | PRIMARY KEY (`id`) , 147 | INDEX `idx_member_money_io_member_id` (`member_id`) USING BTREE , 148 | INDEX `idx_member_money_io_form_code` (`form_code`) USING BTREE 149 | ) 150 | COMMENT='会员虚拟账户IO表' 151 | ; 152 | 153 | #会员积分IO表 154 | DROP TABLE IF EXISTS `m_member_score_io`; 155 | CREATE TABLE `m_member_score_io` ( 156 | `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增主键' , 157 | `member_id` int(11) NOT NULL DEFAULT 0 COMMENT '会员ID' , 158 | `form_code` varchar(15) NOT NULL DEFAULT '' COMMENT '涉及订单号' , 159 | `score_type_id` tinyint(4) NOT NULL DEFAULT 0 COMMENT '积分流转类型ID' , 160 | `operate_score` decimal(18,2) NOT NULL DEFAULT 0 COMMENT '本次操作积分,+入-出' , 161 | `before_score` decimal(18,2) NOT NULL DEFAULT 0 COMMENT '之前积分' , 162 | `after_score` decimal(18,2) NOT NULL DEFAULT 0 COMMENT '之后积分' , 163 | `remark` varchar(50) NOT NULL DEFAULT '' COMMENT '备注' , 164 | `create_person` varchar(30) NOT NULL DEFAULT '' COMMENT '记录生成人' , 165 | `create_date` datetime NOT NULL COMMENT '记录生成时间' , 166 | `create_ip` varchar(20) NOT NULL COMMENT '记录生成IP' , 167 | PRIMARY KEY (`id`) , 168 | INDEX `idx_member_score_io_member_id` (`member_id`) USING BTREE , 169 | INDEX `idx_member_score_io_form_code` (`form_code`) USING BTREE 170 | ) 171 | COMMENT='会员积分IO表' 172 | ; 173 | 174 | #类型状态字典表 175 | DROP TABLE IF EXISTS `m_dictionary`; 176 | CREATE TABLE `m_dictionary` ( 177 | `id` smallint(6) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '自增主键' , 178 | `group` varchar(50) NOT NULL COMMENT '状态分组' , 179 | `code` tinyint(4) NOT NULL COMMENT '状态代码' , 180 | `name` varchar(100) NOT NULL COMMENT '状态名称' , 181 | `sort_no` tinyint(4) NOT NULL DEFAULT 0 COMMENT '排序号' , 182 | `create_person` varchar(30) NOT NULL DEFAULT '' COMMENT '记录生成人' , 183 | `create_date` datetime NOT NULL COMMENT '记录生成时间' , 184 | PRIMARY KEY (`id`) , 185 | INDEX `idx_dictionary_group` (`group`) USING BTREE 186 | ) 187 | COMMENT='类型状态字典表' 188 | ; -------------------------------------------------------------------------------- /member-data/src/main/resources/com/cl/member/mapper/member/MemberConsigneeMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | id, member_id, province, city, area, address, postcode, consignee, telephone, mobile, 24 | email, is_delete, create_person, create_date, update_person, update_date 25 | 26 | 32 | 33 | delete from m_member_consignee 34 | where id = #{id,jdbcType=INTEGER} 35 | 36 | 37 | insert into m_member_consignee (id, member_id, province, 38 | city, area, address, 39 | postcode, consignee, telephone, 40 | mobile, email, is_delete, 41 | create_person, create_date, update_person, 42 | update_date) 43 | values (#{id,jdbcType=INTEGER}, #{memberId,jdbcType=INTEGER}, #{province,jdbcType=VARCHAR}, 44 | #{city,jdbcType=VARCHAR}, #{area,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, 45 | #{postcode,jdbcType=VARCHAR}, #{consignee,jdbcType=VARCHAR}, #{telephone,jdbcType=VARCHAR}, 46 | #{mobile,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, #{isDelete,jdbcType=BIT}, 47 | #{createPerson,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, #{updatePerson,jdbcType=VARCHAR}, 48 | #{updateDate,jdbcType=TIMESTAMP}) 49 | 50 | 51 | insert into m_member_consignee 52 | 53 | 54 | id, 55 | 56 | 57 | member_id, 58 | 59 | 60 | province, 61 | 62 | 63 | city, 64 | 65 | 66 | area, 67 | 68 | 69 | address, 70 | 71 | 72 | postcode, 73 | 74 | 75 | consignee, 76 | 77 | 78 | telephone, 79 | 80 | 81 | mobile, 82 | 83 | 84 | email, 85 | 86 | 87 | is_delete, 88 | 89 | 90 | create_person, 91 | 92 | 93 | create_date, 94 | 95 | 96 | update_person, 97 | 98 | 99 | update_date, 100 | 101 | 102 | 103 | 104 | #{id,jdbcType=INTEGER}, 105 | 106 | 107 | #{memberId,jdbcType=INTEGER}, 108 | 109 | 110 | #{province,jdbcType=VARCHAR}, 111 | 112 | 113 | #{city,jdbcType=VARCHAR}, 114 | 115 | 116 | #{area,jdbcType=VARCHAR}, 117 | 118 | 119 | #{address,jdbcType=VARCHAR}, 120 | 121 | 122 | #{postcode,jdbcType=VARCHAR}, 123 | 124 | 125 | #{consignee,jdbcType=VARCHAR}, 126 | 127 | 128 | #{telephone,jdbcType=VARCHAR}, 129 | 130 | 131 | #{mobile,jdbcType=VARCHAR}, 132 | 133 | 134 | #{email,jdbcType=VARCHAR}, 135 | 136 | 137 | #{isDelete,jdbcType=BIT}, 138 | 139 | 140 | #{createPerson,jdbcType=VARCHAR}, 141 | 142 | 143 | #{createDate,jdbcType=TIMESTAMP}, 144 | 145 | 146 | #{updatePerson,jdbcType=VARCHAR}, 147 | 148 | 149 | #{updateDate,jdbcType=TIMESTAMP}, 150 | 151 | 152 | 153 | 154 | update m_member_consignee 155 | 156 | 157 | member_id = #{memberId,jdbcType=INTEGER}, 158 | 159 | 160 | province = #{province,jdbcType=VARCHAR}, 161 | 162 | 163 | city = #{city,jdbcType=VARCHAR}, 164 | 165 | 166 | area = #{area,jdbcType=VARCHAR}, 167 | 168 | 169 | address = #{address,jdbcType=VARCHAR}, 170 | 171 | 172 | postcode = #{postcode,jdbcType=VARCHAR}, 173 | 174 | 175 | consignee = #{consignee,jdbcType=VARCHAR}, 176 | 177 | 178 | telephone = #{telephone,jdbcType=VARCHAR}, 179 | 180 | 181 | mobile = #{mobile,jdbcType=VARCHAR}, 182 | 183 | 184 | email = #{email,jdbcType=VARCHAR}, 185 | 186 | 187 | is_delete = #{isDelete,jdbcType=BIT}, 188 | 189 | 190 | create_person = #{createPerson,jdbcType=VARCHAR}, 191 | 192 | 193 | create_date = #{createDate,jdbcType=TIMESTAMP}, 194 | 195 | 196 | update_person = #{updatePerson,jdbcType=VARCHAR}, 197 | 198 | 199 | update_date = #{updateDate,jdbcType=TIMESTAMP}, 200 | 201 | 202 | where id = #{id,jdbcType=INTEGER} 203 | 204 | 205 | update m_member_consignee 206 | set member_id = #{memberId,jdbcType=INTEGER}, 207 | province = #{province,jdbcType=VARCHAR}, 208 | city = #{city,jdbcType=VARCHAR}, 209 | area = #{area,jdbcType=VARCHAR}, 210 | address = #{address,jdbcType=VARCHAR}, 211 | postcode = #{postcode,jdbcType=VARCHAR}, 212 | consignee = #{consignee,jdbcType=VARCHAR}, 213 | telephone = #{telephone,jdbcType=VARCHAR}, 214 | mobile = #{mobile,jdbcType=VARCHAR}, 215 | email = #{email,jdbcType=VARCHAR}, 216 | is_delete = #{isDelete,jdbcType=BIT}, 217 | create_person = #{createPerson,jdbcType=VARCHAR}, 218 | create_date = #{createDate,jdbcType=TIMESTAMP}, 219 | update_person = #{updatePerson,jdbcType=VARCHAR}, 220 | update_date = #{updateDate,jdbcType=TIMESTAMP} 221 | where id = #{id,jdbcType=INTEGER} 222 | 223 | -------------------------------------------------------------------------------- /member-data/src/main/resources/com/cl/member/mapper/member/MemberMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | id, username, password, realname, province, city, area, address, postcode, telephone, 33 | mobile, email, gender, question, answer, source_type_id, level_type_id, account_money, 34 | account_score, is_lock, is_black, create_person, create_date, update_person, update_date 35 | 36 | 42 | 43 | delete from m_member 44 | where id = #{id,jdbcType=INTEGER} 45 | 46 | 47 | insert into m_member (id, username, password, 48 | realname, province, city, 49 | area, address, postcode, 50 | telephone, mobile, email, 51 | gender, question, answer, 52 | source_type_id, level_type_id, account_money, 53 | account_score, is_lock, is_black, 54 | create_person, create_date, update_person, 55 | update_date) 56 | values (#{id,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, 57 | #{realname,jdbcType=VARCHAR}, #{province,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, 58 | #{area,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{postcode,jdbcType=VARCHAR}, 59 | #{telephone,jdbcType=VARCHAR}, #{mobile,jdbcType=VARCHAR}, #{email,jdbcType=VARCHAR}, 60 | #{gender,jdbcType=VARCHAR}, #{question,jdbcType=VARCHAR}, #{answer,jdbcType=VARCHAR}, 61 | #{sourceTypeId,jdbcType=TINYINT}, #{levelTypeId,jdbcType=TINYINT}, #{accountMoney,jdbcType=DECIMAL}, 62 | #{accountScore,jdbcType=DECIMAL}, #{isLock,jdbcType=BIT}, #{isBlack,jdbcType=BIT}, 63 | #{createPerson,jdbcType=VARCHAR}, #{createDate,jdbcType=TIMESTAMP}, #{updatePerson,jdbcType=VARCHAR}, 64 | #{updateDate,jdbcType=TIMESTAMP}) 65 | 66 | 67 | insert into m_member 68 | 69 | 70 | id, 71 | 72 | 73 | username, 74 | 75 | 76 | password, 77 | 78 | 79 | realname, 80 | 81 | 82 | province, 83 | 84 | 85 | city, 86 | 87 | 88 | area, 89 | 90 | 91 | address, 92 | 93 | 94 | postcode, 95 | 96 | 97 | telephone, 98 | 99 | 100 | mobile, 101 | 102 | 103 | email, 104 | 105 | 106 | gender, 107 | 108 | 109 | question, 110 | 111 | 112 | answer, 113 | 114 | 115 | source_type_id, 116 | 117 | 118 | level_type_id, 119 | 120 | 121 | account_money, 122 | 123 | 124 | account_score, 125 | 126 | 127 | is_lock, 128 | 129 | 130 | is_black, 131 | 132 | 133 | create_person, 134 | 135 | 136 | create_date, 137 | 138 | 139 | update_person, 140 | 141 | 142 | update_date, 143 | 144 | 145 | 146 | 147 | #{id,jdbcType=INTEGER}, 148 | 149 | 150 | #{username,jdbcType=VARCHAR}, 151 | 152 | 153 | #{password,jdbcType=VARCHAR}, 154 | 155 | 156 | #{realname,jdbcType=VARCHAR}, 157 | 158 | 159 | #{province,jdbcType=VARCHAR}, 160 | 161 | 162 | #{city,jdbcType=VARCHAR}, 163 | 164 | 165 | #{area,jdbcType=VARCHAR}, 166 | 167 | 168 | #{address,jdbcType=VARCHAR}, 169 | 170 | 171 | #{postcode,jdbcType=VARCHAR}, 172 | 173 | 174 | #{telephone,jdbcType=VARCHAR}, 175 | 176 | 177 | #{mobile,jdbcType=VARCHAR}, 178 | 179 | 180 | #{email,jdbcType=VARCHAR}, 181 | 182 | 183 | #{gender,jdbcType=VARCHAR}, 184 | 185 | 186 | #{question,jdbcType=VARCHAR}, 187 | 188 | 189 | #{answer,jdbcType=VARCHAR}, 190 | 191 | 192 | #{sourceTypeId,jdbcType=TINYINT}, 193 | 194 | 195 | #{levelTypeId,jdbcType=TINYINT}, 196 | 197 | 198 | #{accountMoney,jdbcType=DECIMAL}, 199 | 200 | 201 | #{accountScore,jdbcType=DECIMAL}, 202 | 203 | 204 | #{isLock,jdbcType=BIT}, 205 | 206 | 207 | #{isBlack,jdbcType=BIT}, 208 | 209 | 210 | #{createPerson,jdbcType=VARCHAR}, 211 | 212 | 213 | #{createDate,jdbcType=TIMESTAMP}, 214 | 215 | 216 | #{updatePerson,jdbcType=VARCHAR}, 217 | 218 | 219 | #{updateDate,jdbcType=TIMESTAMP}, 220 | 221 | 222 | 223 | 224 | update m_member 225 | 226 | 227 | username = #{username,jdbcType=VARCHAR}, 228 | 229 | 230 | password = #{password,jdbcType=VARCHAR}, 231 | 232 | 233 | realname = #{realname,jdbcType=VARCHAR}, 234 | 235 | 236 | province = #{province,jdbcType=VARCHAR}, 237 | 238 | 239 | city = #{city,jdbcType=VARCHAR}, 240 | 241 | 242 | area = #{area,jdbcType=VARCHAR}, 243 | 244 | 245 | address = #{address,jdbcType=VARCHAR}, 246 | 247 | 248 | postcode = #{postcode,jdbcType=VARCHAR}, 249 | 250 | 251 | telephone = #{telephone,jdbcType=VARCHAR}, 252 | 253 | 254 | mobile = #{mobile,jdbcType=VARCHAR}, 255 | 256 | 257 | email = #{email,jdbcType=VARCHAR}, 258 | 259 | 260 | gender = #{gender,jdbcType=VARCHAR}, 261 | 262 | 263 | question = #{question,jdbcType=VARCHAR}, 264 | 265 | 266 | answer = #{answer,jdbcType=VARCHAR}, 267 | 268 | 269 | source_type_id = #{sourceTypeId,jdbcType=TINYINT}, 270 | 271 | 272 | level_type_id = #{levelTypeId,jdbcType=TINYINT}, 273 | 274 | 275 | account_money = #{accountMoney,jdbcType=DECIMAL}, 276 | 277 | 278 | account_score = #{accountScore,jdbcType=DECIMAL}, 279 | 280 | 281 | is_lock = #{isLock,jdbcType=BIT}, 282 | 283 | 284 | is_black = #{isBlack,jdbcType=BIT}, 285 | 286 | 287 | create_person = #{createPerson,jdbcType=VARCHAR}, 288 | 289 | 290 | create_date = #{createDate,jdbcType=TIMESTAMP}, 291 | 292 | 293 | update_person = #{updatePerson,jdbcType=VARCHAR}, 294 | 295 | 296 | update_date = #{updateDate,jdbcType=TIMESTAMP}, 297 | 298 | 299 | where id = #{id,jdbcType=INTEGER} 300 | 301 | 302 | update m_member 303 | set username = #{username,jdbcType=VARCHAR}, 304 | password = #{password,jdbcType=VARCHAR}, 305 | realname = #{realname,jdbcType=VARCHAR}, 306 | province = #{province,jdbcType=VARCHAR}, 307 | city = #{city,jdbcType=VARCHAR}, 308 | area = #{area,jdbcType=VARCHAR}, 309 | address = #{address,jdbcType=VARCHAR}, 310 | postcode = #{postcode,jdbcType=VARCHAR}, 311 | telephone = #{telephone,jdbcType=VARCHAR}, 312 | mobile = #{mobile,jdbcType=VARCHAR}, 313 | email = #{email,jdbcType=VARCHAR}, 314 | gender = #{gender,jdbcType=VARCHAR}, 315 | question = #{question,jdbcType=VARCHAR}, 316 | answer = #{answer,jdbcType=VARCHAR}, 317 | source_type_id = #{sourceTypeId,jdbcType=TINYINT}, 318 | level_type_id = #{levelTypeId,jdbcType=TINYINT}, 319 | account_money = #{accountMoney,jdbcType=DECIMAL}, 320 | account_score = #{accountScore,jdbcType=DECIMAL}, 321 | is_lock = #{isLock,jdbcType=BIT}, 322 | is_black = #{isBlack,jdbcType=BIT}, 323 | create_person = #{createPerson,jdbcType=VARCHAR}, 324 | create_date = #{createDate,jdbcType=TIMESTAMP}, 325 | update_person = #{updatePerson,jdbcType=VARCHAR}, 326 | update_date = #{updateDate,jdbcType=TIMESTAMP} 327 | where id = #{id,jdbcType=INTEGER} 328 | 329 | --------------------------------------------------------------------------------