Commit 5f0b7988f877155f9e0fcc565a66a75f7b3e922d
1 parent
59bd76fb
删除多余模块
Showing
32 changed files
with
181 additions
and
4570 deletions
Too many changes to show.
To preserve performance only 32 of 74 files are displayed.
diligrp-website-dao/pom.xml
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
5 | 5 | <modelVersion>4.0.0</modelVersion> |
6 | 6 | <parent> |
7 | - <groupId>com..website.web</groupId> | |
7 | + <groupId>com.b2c.website.web</groupId> | |
8 | 8 | <artifactId>diligrp-website</artifactId> |
9 | 9 | <version>0.0.1-SNAPSHOT</version> |
10 | 10 | </parent> |
... | ... | @@ -17,7 +17,7 @@ |
17 | 17 | </properties> |
18 | 18 | <dependencies> |
19 | 19 | <dependency> |
20 | - <groupId>com..website.web</groupId> | |
20 | + <groupId>com.b2c.website.web</groupId> | |
21 | 21 | <artifactId>diligrp-website-domain</artifactId> |
22 | 22 | <version>0.0.1-SNAPSHOT</version> |
23 | 23 | </dependency> | ... | ... |
diligrp-website-manager/src/main/java/com/diligrp/website/manager/MailManager.java deleted
100644 → 0
1 | -package com.diligrp.website.manager; | |
2 | - | |
3 | -import com.diligrp.website.domain.Mail; | |
4 | -import com.diligrp.website.util.dao.BaseQuery; | |
5 | -import com.diligrp.website.util.web.PageTemplate; | |
6 | - | |
7 | - | |
8 | -public interface MailManager { | |
9 | - | |
10 | - public boolean saveMail(Mail mh); | |
11 | - | |
12 | - public PageTemplate queryMail(BaseQuery query); | |
13 | - | |
14 | -} |
diligrp-website-manager/src/main/java/com/diligrp/website/manager/MemberCenterAuthenManager.java deleted
100644 → 0
1 | -package com.diligrp.website.manager; | |
2 | - | |
3 | -/** | |
4 | - * <B>Description</B> TODO <br /> | |
5 | - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> | |
6 | - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> | |
7 | - * <B>Company</B> 地利集团 | |
8 | - * @createTime 2014年6月20日 下午12:03:15 | |
9 | - * @author liujie | |
10 | - */ | |
11 | -public interface MemberCenterAuthenManager { | |
12 | - /** | |
13 | - * | |
14 | - * this method is 查询认证用户列表信息 | |
15 | - * @param bq | |
16 | - * @return | |
17 | - * @createTime 2014年6月20日 下午3:59:18 | |
18 | - * @author liujie | |
19 | - */ | |
20 | - //public PageTemplate getAuthenInfo(BaseQuery bq)throws Exception; | |
21 | - /** | |
22 | - * | |
23 | - * this method is 获取认证用户信息 | |
24 | - * @param userId | |
25 | - * @return | |
26 | - * @createTime 2014年6月20日 下午3:58:06 | |
27 | - * @author liujie | |
28 | - */ | |
29 | - //public UserExtension getUserInfoById(Long userId)throws Exception; | |
30 | - /** | |
31 | - * | |
32 | - * this method is 获取认真企业用户信息 | |
33 | - * @param companyId | |
34 | - * @return | |
35 | - * @createTime 2014年6月20日 下午3:58:18 | |
36 | - * @author liujie | |
37 | - */ | |
38 | - //public EnterpriseInfo getEnterpriseInfoById(Long companyId)throws Exception; | |
39 | - /** | |
40 | - * | |
41 | - * this method is 审批认真用户信息 | |
42 | - * @param userId | |
43 | - * @param userType | |
44 | - * @param authState | |
45 | - * @param auditReson | |
46 | - * @return | |
47 | - * @createTime 2014年6月20日 下午3:58:32 | |
48 | - * @author liujie | |
49 | - */ | |
50 | - //boolean approveAuthen(Long userId, Integer userType, Integer authState, String auditReson,Long operatorId)throws Exception; | |
51 | -} |
diligrp-website-manager/src/main/java/com/diligrp/website/manager/MemberManager.java deleted
100644 → 0
1 | -package com.diligrp.website.manager; | |
2 | - | |
3 | -import java.util.List; | |
4 | - | |
5 | -import com.diligrp.website.util.dao.BaseQuery; | |
6 | -import com.diligrp.website.util.web.PageTemplate; | |
7 | -import com.yqyw.user.rpc.client.domain.input.CreditLimitReq; | |
8 | -import com.yqyw.user.rpc.client.domain.input.FavoriteInfo; | |
9 | -import com.yqyw.user.rpc.client.domain.input.LockMemberReq; | |
10 | -import com.yqyw.user.rpc.client.domain.output.DefaultResp; | |
11 | -import com.yqyw.user.rpc.client.domain.output.EnterpriseInfoResp; | |
12 | -import com.yqyw.user.rpc.client.domain.output.ListFavoriteByPagingResp; | |
13 | -import com.yqyw.user.rpc.client.domain.output.LockMemberResp; | |
14 | -import com.yqyw.user.rpc.client.domain.output.MemberCreditInfoResp; | |
15 | -import com.yqyw.user.rpc.client.domain.output.MemberCreditOptionLogResp; | |
16 | -import com.yqyw.user.rpc.client.domain.output.UserExtensionResp; | |
17 | -import com.yqyw.user.rpc.client.domain.output.UserInfoResp; | |
18 | - | |
19 | - | |
20 | -public interface MemberManager { | |
21 | - | |
22 | - PageTemplate query(BaseQuery bq); | |
23 | - | |
24 | - LockMemberResp getLockUser(Long id); | |
25 | - | |
26 | - boolean lockMember(LockMemberReq req); | |
27 | - | |
28 | - boolean unlockMember(LockMemberReq req); | |
29 | - | |
30 | - List<MemberCreditOptionLogResp> getCreditHistory(Long memberId); | |
31 | - | |
32 | - MemberCreditInfoResp getCreditInfo(Long memberId); | |
33 | - | |
34 | - DefaultResp updateCreditLimit(CreditLimitReq req); | |
35 | - | |
36 | -// ListBrowseHistoryResp historyList(Integer type,Long userId, BaseQuery bq); | |
37 | - | |
38 | - UserInfoResp getMemberInfo(Long uid); | |
39 | - | |
40 | - UserExtensionResp getMemberExtension(Long uid); | |
41 | - | |
42 | - EnterpriseInfoResp getEnterpriseByUserId(Long uid); | |
43 | - | |
44 | - ListFavoriteByPagingResp getMemberFavorite(FavoriteInfo info, | |
45 | - Integer currPage, Integer pageSize); | |
46 | - | |
47 | -} |
diligrp-website-manager/src/main/java/com/diligrp/website/manager/OpenShopApplyManager.java deleted
100644 → 0
1 | -package com.diligrp.website.manager; | |
2 | - | |
3 | -import com.diligrp.pnr.sdk.domain.Shop; | |
4 | -import com.diligrp.website.util.web.PageTemplate; | |
5 | -import com.yqyw.user.rpc.client.domain.output.MemberQueryResp; | |
6 | - | |
7 | - | |
8 | -/** | |
9 | - * <B>Description</B> TODO <br /> | |
10 | - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> | |
11 | - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> | |
12 | - * <B>Company</B> 地利集团 | |
13 | - * | |
14 | - * @author liujie | |
15 | - * @createTime 2014年6月5日 下午3:41:26 | |
16 | - */ | |
17 | -public interface OpenShopApplyManager { | |
18 | - /** | |
19 | - * this method is 获取所有的开店申请详细信息 | |
20 | - * | |
21 | - * @param | |
22 | - * @return | |
23 | - * @createTime 2014年6月18日 下午5:29:39 | |
24 | - * @author liujie | |
25 | - */ | |
26 | - public PageTemplate getUserInfo(Integer pageSize, Integer pageIndex, String shopName, String member, String contactPhone, Long startTime, Long endTime, Integer state, String shopId, String cityId, String shopSource); | |
27 | - | |
28 | - Shop getShopInfoByShopId(Long shopId); | |
29 | - | |
30 | - boolean shopAudit(Long shopId, String auditRemark, Integer shopState); | |
31 | - | |
32 | - MemberQueryResp getUserAuthInfo(Long userId); | |
33 | -} |
diligrp-website-manager/src/main/java/com/diligrp/website/manager/ProductManager.java deleted
100644 → 0
1 | -package com.diligrp.website.manager; | |
2 | - | |
3 | -import java.util.List; | |
4 | - | |
5 | -import com.diligrp.titan.sdk.domain.Product; | |
6 | - | |
7 | - | |
8 | -/** | |
9 | - * <B>Description</B> 商品相关 | |
10 | - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> | |
11 | - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> | |
12 | - * <B>Company</B> 地利集团 | |
13 | - * @createTime 2014年5月21日 下午6:18:14 | |
14 | - * @author mengxf | |
15 | - */ | |
16 | -public interface ProductManager { | |
17 | - | |
18 | - | |
19 | - /** | |
20 | - * 查询多个商品详情 | |
21 | - * | |
22 | - * @param pids | |
23 | - * @return | |
24 | - * @createTime 2014年6月26日 下午2:37:07 | |
25 | - * @author Wang22 | |
26 | - */ | |
27 | - public List<Product> getProductInfos(List<Long> pids); | |
28 | - | |
29 | -} |
diligrp-website-manager/src/main/java/com/diligrp/website/manager/SMSManager.java deleted
100644 → 0
1 | -package com.diligrp.website.manager; | |
2 | - | |
3 | -import com.diligrp.website.domain.MobMessage; | |
4 | - | |
5 | -public interface SMSManager { | |
6 | - | |
7 | - /** | |
8 | - * | |
9 | - * 发送短信 | |
10 | - * @param mm | |
11 | - * @return | |
12 | - * @createTime 2014年6月4日 下午5:48:27 | |
13 | - * @author Wang22 | |
14 | - */ | |
15 | - public boolean sendSMS(MobMessage mm); | |
16 | - | |
17 | -} |
diligrp-website-manager/src/main/java/com/diligrp/website/manager/ShopCloseHistoryManager.java deleted
100644 → 0
1 | -package com.diligrp.website.manager; | |
2 | - | |
3 | -import com.diligrp.website.domain.ShopCloseHistory; | |
4 | -import com.diligrp.website.util.dao.BaseQuery; | |
5 | -import com.diligrp.website.util.web.PageTemplate; | |
6 | - | |
7 | - | |
8 | -public interface ShopCloseHistoryManager { | |
9 | - | |
10 | - PageTemplate query(BaseQuery query); | |
11 | - | |
12 | - boolean save(ShopCloseHistory shopCloseHistory); | |
13 | - | |
14 | - ShopCloseHistory getShopCloseHistoryById(Long id); | |
15 | - | |
16 | - ShopCloseHistory getAuditShopCloseHistoryByShopId(Long shopId); | |
17 | - | |
18 | - boolean edit(ShopCloseHistory shopCloseHistory); | |
19 | -} |
diligrp-website-manager/src/main/java/com/diligrp/website/manager/ShopNameModifyManager.java deleted
100644 → 0
1 | -package com.diligrp.website.manager; | |
2 | - | |
3 | -import com.diligrp.website.domain.ShopNameModify; | |
4 | -import com.diligrp.website.util.dao.BaseQuery; | |
5 | -import com.diligrp.website.util.web.PageTemplate; | |
6 | - | |
7 | -import java.util.List; | |
8 | - | |
9 | - | |
10 | -public interface ShopNameModifyManager { | |
11 | - | |
12 | - PageTemplate query(BaseQuery query); | |
13 | - | |
14 | - boolean save(ShopNameModify shopNameModify); | |
15 | - | |
16 | - boolean edit(ShopNameModify shopNameModify); | |
17 | - | |
18 | - List<ShopNameModify> getShopNameModifyByShopId(Long shopId); | |
19 | - | |
20 | - ShopNameModify getShopNameModifyById(Long id); | |
21 | - | |
22 | - ShopNameModify getShopNameModifyByNewShopName(String newShopName); | |
23 | -} |
diligrp-website-manager/src/main/java/com/diligrp/website/manager/UserManager.java deleted
100644 → 0
1 | -package com.diligrp.website.manager; | |
2 | - | |
3 | -import java.util.List; | |
4 | - | |
5 | -import com.diligrp.website.rpc.util.exception.GwException; | |
6 | -import com.yqyw.user.rpc.client.domain.input.BrowseHistoryReq; | |
7 | -import com.yqyw.user.rpc.client.domain.input.ConsigneeInfo; | |
8 | -import com.yqyw.user.rpc.client.domain.input.FavoriteInfo; | |
9 | -import com.yqyw.user.rpc.client.domain.output.MemberCreditInfoResp; | |
10 | -import com.yqyw.user.rpc.client.domain.output.ShoppingCartResp; | |
11 | -import com.yqyw.user.rpc.client.domain.output.UserInfoResp; | |
12 | - | |
13 | - | |
14 | -/** | |
15 | - * <B>Description</B>用户 | |
16 | - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> | |
17 | - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> | |
18 | - * <B>Company</B> 地利集团 | |
19 | - * @createTime 2014年5月29日 下午3:18:09 | |
20 | - * @author mengxf | |
21 | - */ | |
22 | -public interface UserManager { | |
23 | - | |
24 | - /** | |
25 | - * | |
26 | - * this method is 增加提货人信息 | |
27 | - * @param consigneeInfo | |
28 | - * @return | |
29 | - * @createTime 2014年5月29日 下午3:20:16 | |
30 | - * @author mengxf | |
31 | - */ | |
32 | - public long addConsignee(ConsigneeInfo consigneeInfo); | |
33 | - | |
34 | - /** | |
35 | - * | |
36 | - * this method is 删除提货人信息 | |
37 | - * @param ConsigneeId | |
38 | - * @return | |
39 | - * @createTime 2014年5月29日 下午3:20:45 | |
40 | - * @author mengxf | |
41 | - */ | |
42 | - public boolean delConsignee(long consigneeId,long userId); | |
43 | - | |
44 | - /** | |
45 | - * | |
46 | - * this method is 修改提货人信息 | |
47 | - * @param ConsigneeId | |
48 | - * @return | |
49 | - * @createTime 2014年5月29日 下午3:20:45 | |
50 | - * @author mengxf | |
51 | - */ | |
52 | - public boolean updateConsignee(ConsigneeInfo consigneeInfo); | |
53 | - | |
54 | - /** | |
55 | - * | |
56 | - * this method is 根据用户ID获取提货人信息列表 | |
57 | - * @param UserId | |
58 | - * @return | |
59 | - * @createTime 2014年5月29日 下午3:20:56 | |
60 | - * @author mengxf | |
61 | - */ | |
62 | - public List<ConsigneeInfo> getConsignees(long userId); | |
63 | - | |
64 | - /** | |
65 | - * | |
66 | - * this method is 增加收藏夹信息 | |
67 | - * @param favoriteInfo | |
68 | - * @return | |
69 | - * @createTime 2014年6月3日 下午3:20:16 | |
70 | - * @author jiangchengyong | |
71 | - */ | |
72 | - public long addFavoriteInfo(FavoriteInfo favoriteInfo); | |
73 | - | |
74 | - /** | |
75 | - * | |
76 | - * this method is 设置提货人为默认 | |
77 | - * @param consigneeId | |
78 | - * @param UserId | |
79 | - * @return | |
80 | - * @createTime 2014年6月6日 上午11:34:23 | |
81 | - * @author mengxf | |
82 | - */ | |
83 | - public boolean setDefault(long consigneeId,long userId); | |
84 | - | |
85 | - /** | |
86 | - * | |
87 | - * this method is 查询用下该类型的收藏数据 | |
88 | - * @param userId | |
89 | - * @param type | |
90 | - * @return | |
91 | - * @createTime 2014年6月24日 下午4:45:40 | |
92 | - * @author mengxf | |
93 | - */ | |
94 | - public List<FavoriteInfo> getFavoriteByUserIdAndType(long userId, int type); | |
95 | - | |
96 | - /** | |
97 | - * | |
98 | - * this method is 增加用户浏览记录 | |
99 | - * @param browseHistoryReq | |
100 | - * @return | |
101 | - * @createTime 2014年6月13日 下午2:10:11 | |
102 | - * @author mengxf | |
103 | - */ | |
104 | - public boolean addUserBrowseHistory(BrowseHistoryReq browseHistoryReq); | |
105 | - | |
106 | - /** | |
107 | - * 移除用户的cookie | |
108 | - * this method is TODO | |
109 | - * @param userId | |
110 | - * @return | |
111 | - * @createTime 2014年6月20日 下午5:39:41 | |
112 | - * @author ipangy | |
113 | - */ | |
114 | - public boolean removeAllCookie(Long userId); | |
115 | - | |
116 | - /** | |
117 | - * | |
118 | - * this method is 根据用户ID查询用户信息 | |
119 | - * @param userId | |
120 | - * @return | |
121 | - * @createTime 2014年6月20日 下午6:13:11 | |
122 | - * @author mengxf | |
123 | - */ | |
124 | - public UserInfoResp getUserInfoById(long userId); | |
125 | - | |
126 | - /** | |
127 | - * | |
128 | - * this method is 获取用户信用额度 | |
129 | - * @param userId | |
130 | - * @return | |
131 | - * @createTime 2014年6月24日 下午12:02:56 | |
132 | - * @author mengxf | |
133 | - */ | |
134 | - public MemberCreditInfoResp getUserCreditInfo(long userId); | |
135 | - | |
136 | - /** | |
137 | - * | |
138 | - * this method is 获取用户已删除的记录 | |
139 | - * @param userId | |
140 | - * @param count | |
141 | - * @return | |
142 | - * @throws GwException | |
143 | - * @createTime 2014年7月1日 上午11:12:46 | |
144 | - * @author jiangchengyong | |
145 | - */ | |
146 | - public List<ShoppingCartResp> getHistoryProduct(long userId,int count); | |
147 | - | |
148 | - | |
149 | -} |
diligrp-website-manager/src/main/java/com/diligrp/website/manager/cache/ProductCache.java deleted
100644 → 0
1 | -package com.diligrp.website.manager.cache; | |
2 | - | |
3 | -import java.util.List; | |
4 | - | |
5 | -import javax.annotation.Resource; | |
6 | - | |
7 | -import org.apache.commons.collections.CollectionUtils; | |
8 | -import org.apache.commons.lang3.StringUtils; | |
9 | -import org.slf4j.Logger; | |
10 | -import org.slf4j.LoggerFactory; | |
11 | -import org.springframework.stereotype.Service; | |
12 | - | |
13 | -import com.alibaba.fastjson.JSON; | |
14 | -import com.diligrp.titan.sdk.domain.Product; | |
15 | -import com.diligrp.website.domain.common.Constant; | |
16 | -import com.diligrp.website.rpc.ProductRPCService; | |
17 | -import com.diligrp.website.rpc.util.exception.GwException; | |
18 | -import com.diligrp.website.util.redis.RedisUtil; | |
19 | - | |
20 | - | |
21 | -/** | |
22 | - * <B>Description</B> 商品相关缓存 | |
23 | - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> | |
24 | - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> | |
25 | - * <B>Company</B> 地利集团 | |
26 | - * | |
27 | - * @author mengxf | |
28 | - * @createTime 2014年5月21日 下午5:48:23 | |
29 | - */ | |
30 | -@Service | |
31 | -public class ProductCache { | |
32 | - | |
33 | - private static final Logger log = LoggerFactory.getLogger(ProductCache.class); | |
34 | - | |
35 | - @Resource | |
36 | - private RedisUtil redisUtils; | |
37 | - | |
38 | - @Resource | |
39 | - private ProductRPCService productRPCService; | |
40 | - | |
41 | - public List<Product> getProductInfos(List<Long> pids) { | |
42 | - if(CollectionUtils.isEmpty(pids)){ | |
43 | - log.error("ProductCache.getProductInfos() 传递的pids为空!"); | |
44 | - return null; | |
45 | - } | |
46 | - String key = Constant.PRODUCT_CACHE_KEY + "pids_" + pids; | |
47 | - String jsonList = redisUtils.getString(key); | |
48 | - List<Product> list = null; | |
49 | - if(StringUtils.isNotEmpty(jsonList)){ | |
50 | - list = JSON.parseArray(jsonList, Product.class); | |
51 | - } | |
52 | - if(CollectionUtils.isEmpty(list)){ | |
53 | - try { | |
54 | - list = productRPCService.getProductInfos(pids); | |
55 | - if (CollectionUtils.isEmpty(list)) { | |
56 | - log.error("ProductCache.getProductInfos( pids : " + JSON.toJSONString(pids) + ") :批量获取商品接口为空!"); | |
57 | - } else { | |
58 | - redisUtils.setStringByExpire(key, JSON.toJSONString(list),Constant.CACHE_EXPIRE_TIME_MINUTE_ONE); | |
59 | - } | |
60 | - } catch (GwException e) { | |
61 | - log.error("ProductCache.getProductInfos( pids : " + JSON.toJSONString(pids) + ") : 批量获取商品接口异常" + e); | |
62 | - } | |
63 | - }else{ | |
64 | - log.info("ProductCache.getProductInfos( pids : " + JSON.toJSONString(pids)+ ") :获取获取服务器中购物车列表成功!"); | |
65 | - } | |
66 | - return list; | |
67 | - } | |
68 | - | |
69 | -} |
diligrp-website-manager/src/main/java/com/diligrp/website/manager/impl/MailManagerImpl.java deleted
100644 → 0
1 | -package com.diligrp.website.manager.impl; | |
2 | - | |
3 | -import java.util.List; | |
4 | - | |
5 | -import javax.annotation.Resource; | |
6 | - | |
7 | -import org.springframework.stereotype.Component; | |
8 | - | |
9 | -import com.diligrp.website.dao.MailDao; | |
10 | -import com.diligrp.website.domain.Mail; | |
11 | -import com.diligrp.website.domain.SysConfig; | |
12 | -import com.diligrp.website.manager.MailManager; | |
13 | -import com.diligrp.website.util.dao.BaseQuery; | |
14 | -import com.diligrp.website.util.web.PageTemplate; | |
15 | - | |
16 | -@Component("mailManager") | |
17 | -public class MailManagerImpl implements MailManager { | |
18 | - | |
19 | - @Resource | |
20 | - private MailDao mailDao; | |
21 | - | |
22 | - @Override | |
23 | - public boolean saveMail(Mail mh) { | |
24 | - return mailDao.save(mh); | |
25 | - } | |
26 | - | |
27 | - @Override | |
28 | - public PageTemplate queryMail(BaseQuery query) { | |
29 | - Integer totalSize = mailDao.getMailCount(query); | |
30 | - List<SysConfig> list = mailDao.getMailList(query); | |
31 | - return PageTemplate.create(query, totalSize, list); | |
32 | - } | |
33 | - | |
34 | -} |
diligrp-website-manager/src/main/java/com/diligrp/website/manager/impl/MemberCenterAuthenManagerImpl.java deleted
100644 → 0
1 | -package com.diligrp.website.manager.impl; | |
2 | - | |
3 | -import javax.annotation.Resource; | |
4 | - | |
5 | -import org.springframework.stereotype.Component; | |
6 | - | |
7 | -import com.diligrp.website.manager.MemberCenterAuthenManager; | |
8 | -import com.diligrp.website.rpc.MemberCenterAuthenRpcService; | |
9 | - | |
10 | - | |
11 | -/** | |
12 | - * <B>Description</B> TODO <br /> | |
13 | - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> | |
14 | - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> | |
15 | - * <B>Company</B> 地利集团 | |
16 | - * @createTime 2014年6月20日 下午12:03:39 | |
17 | - * @author liujie | |
18 | - */ | |
19 | -@Component | |
20 | -public class MemberCenterAuthenManagerImpl implements MemberCenterAuthenManager { | |
21 | - @Resource | |
22 | - private MemberCenterAuthenRpcService memberCenterAuthenRpcService; | |
23 | - | |
24 | - /* (non-Javadoc) | |
25 | - * @see com.diligrp.website.manager.MemberCenterAuthenManager#getAuthenInfo(com.diligrp.website.util.dao.BaseQuery) | |
26 | - */ | |
27 | -// @Override | |
28 | -// public PageTemplate getAuthenInfo(BaseQuery bq) throws Exception{ | |
29 | -// | |
30 | -// return memberCenterAuthenRpcService.getAuthenInfo(bq); | |
31 | -// } | |
32 | -// | |
33 | -// /* (non-Javadoc) | |
34 | -// * @see com.diligrp.website.manager.MemberCenterAuthenManager#getUserInfoById(java.lang.Long) | |
35 | -// */ | |
36 | -// @Override | |
37 | -// public UserExtension getUserInfoById(Long userId)throws Exception { | |
38 | -// return memberCenterAuthenRpcService.getUserInfoById(userId); | |
39 | -// } | |
40 | -// | |
41 | -// /* (non-Javadoc) | |
42 | -// * @see com.diligrp.website.manager.MemberCenterAuthenManager#getEnterpriseInfoById(java.lang.Long) | |
43 | -// */ | |
44 | -// @Override | |
45 | -// public EnterpriseInfo getEnterpriseInfoById(Long companyId)throws Exception { | |
46 | -// return memberCenterAuthenRpcService.getEnterpriseInfoById(companyId); | |
47 | -// } | |
48 | -// | |
49 | -// /* (non-Javadoc) | |
50 | -// * @see com.diligrp.website.manager.MemberCenterAuthenManager#approveAuthen(java.lang.Long, java.lang.Integer, java.lang.Integer, java.lang.String) | |
51 | -// */ | |
52 | -// @Override | |
53 | -// public boolean approveAuthen(Long userId, Integer userType, | |
54 | -// Integer authState, String auditReson,Long operatorId)throws Exception { | |
55 | -// return memberCenterAuthenRpcService.approveAuthen(userId, userType, authState, auditReson, operatorId); | |
56 | -// } | |
57 | -} |
diligrp-website-manager/src/main/java/com/diligrp/website/manager/impl/MemberManagerImpl.java deleted
100644 → 0
1 | -package com.diligrp.website.manager.impl; | |
2 | - | |
3 | -import java.util.List; | |
4 | - | |
5 | -import javax.annotation.Resource; | |
6 | - | |
7 | -import org.springframework.stereotype.Component; | |
8 | - | |
9 | -import com.diligrp.website.manager.MemberManager; | |
10 | -import com.diligrp.website.rpc.MemberRPCService; | |
11 | -import com.diligrp.website.util.dao.BaseQuery; | |
12 | -import com.diligrp.website.util.web.PageTemplate; | |
13 | -import com.yqyw.user.rpc.client.domain.input.CreditLimitReq; | |
14 | -import com.yqyw.user.rpc.client.domain.input.FavoriteInfo; | |
15 | -import com.yqyw.user.rpc.client.domain.input.LockMemberReq; | |
16 | -import com.yqyw.user.rpc.client.domain.output.DefaultResp; | |
17 | -import com.yqyw.user.rpc.client.domain.output.EnterpriseInfoResp; | |
18 | -import com.yqyw.user.rpc.client.domain.output.ListFavoriteByPagingResp; | |
19 | -import com.yqyw.user.rpc.client.domain.output.LockMemberResp; | |
20 | -import com.yqyw.user.rpc.client.domain.output.MemberCreditInfoResp; | |
21 | -import com.yqyw.user.rpc.client.domain.output.MemberCreditOptionLogResp; | |
22 | -import com.yqyw.user.rpc.client.domain.output.UserExtensionResp; | |
23 | -import com.yqyw.user.rpc.client.domain.output.UserInfoResp; | |
24 | - | |
25 | -@Component("memberManager") | |
26 | -public class MemberManagerImpl implements MemberManager { | |
27 | - | |
28 | - @Resource | |
29 | - private MemberRPCService memberRPCService; | |
30 | - | |
31 | - @Override | |
32 | - public PageTemplate query(BaseQuery bq) { | |
33 | - return memberRPCService.query(bq); | |
34 | - } | |
35 | - | |
36 | - @Override | |
37 | - public LockMemberResp getLockUser(Long id) { | |
38 | - return memberRPCService.getLockUser(id); | |
39 | - } | |
40 | - | |
41 | - @Override | |
42 | - public boolean lockMember(LockMemberReq req) { | |
43 | - return memberRPCService.lockMember(req); | |
44 | - } | |
45 | - | |
46 | - @Override | |
47 | - public boolean unlockMember(LockMemberReq req) { | |
48 | - return memberRPCService.unlockMember(req); | |
49 | - } | |
50 | - | |
51 | - @Override | |
52 | - public List<MemberCreditOptionLogResp> getCreditHistory(Long memberId) { | |
53 | - return memberRPCService.getCreditHistory(memberId); | |
54 | - } | |
55 | - | |
56 | - @Override | |
57 | - public MemberCreditInfoResp getCreditInfo(Long memberId) { | |
58 | - return memberRPCService.getCreditInfo(memberId); | |
59 | - } | |
60 | - | |
61 | - @Override | |
62 | - public DefaultResp updateCreditLimit(CreditLimitReq req) { | |
63 | - return memberRPCService.updateCreditLimit(req); | |
64 | - } | |
65 | - | |
66 | -// @Override | |
67 | -// public ListBrowseHistoryResp historyList(Integer type,Long userId, BaseQuery bq) { | |
68 | -// return memberRPCService.historyList(type, userId, bq); | |
69 | -// } | |
70 | - | |
71 | - @Override | |
72 | - public UserInfoResp getMemberInfo(Long uid) { | |
73 | - return memberRPCService.getMemberInfo(uid); | |
74 | - } | |
75 | - | |
76 | - @Override | |
77 | - public UserExtensionResp getMemberExtension(Long uid) { | |
78 | - return memberRPCService.getMemberExtension(uid); | |
79 | - } | |
80 | - | |
81 | - @Override | |
82 | - public EnterpriseInfoResp getEnterpriseByUserId(Long uid) { | |
83 | - return memberRPCService.getEnterpriseByUserId(uid); | |
84 | - } | |
85 | - | |
86 | - @Override | |
87 | - public ListFavoriteByPagingResp getMemberFavorite(FavoriteInfo info, | |
88 | - Integer currPage, Integer pageSize) { | |
89 | - return memberRPCService.getMemberFavorite(info, currPage, pageSize); | |
90 | - } | |
91 | - | |
92 | -} |
diligrp-website-manager/src/main/java/com/diligrp/website/manager/impl/OpenShopApplyManagerImpl.java deleted
100644 → 0
1 | -package com.diligrp.website.manager.impl; | |
2 | - | |
3 | -import javax.annotation.Resource; | |
4 | - | |
5 | -import org.springframework.stereotype.Service; | |
6 | - | |
7 | -import com.diligrp.pnr.sdk.domain.Shop; | |
8 | -import com.diligrp.website.manager.OpenShopApplyManager; | |
9 | -import com.diligrp.website.rpc.OpenShopApplyRpcService; | |
10 | -import com.diligrp.website.util.web.PageTemplate; | |
11 | -import com.yqyw.user.rpc.client.domain.output.MemberQueryResp; | |
12 | - | |
13 | - | |
14 | -/** | |
15 | - * <B>Description</B> TODO <br /> | |
16 | - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> | |
17 | - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> | |
18 | - * <B>Company</B> 地利集团 | |
19 | - * @createTime 2014年6月5日 下午3:42:29 | |
20 | - * @author liujie | |
21 | - */ | |
22 | -@Service | |
23 | -public class OpenShopApplyManagerImpl implements OpenShopApplyManager{ | |
24 | - @Resource | |
25 | - private OpenShopApplyRpcService openShopApplyRpcService; | |
26 | - | |
27 | - /* (non-Javadoc) | |
28 | - * @see com.diligrp.website.manager.AuthenticationManageManager#getUserInfo(com.diligrp.user.rpc.client.domain.input.ShopAuthenReq) | |
29 | - */ | |
30 | - @Override | |
31 | - public PageTemplate getUserInfo(Integer pageSize, Integer pageIndex, String shopName, String member, String contactPhone, Long startTime, Long endTime, Integer state, String shopId,String cityId,String shopSource) { | |
32 | - return openShopApplyRpcService.getUserInfo(pageSize,pageIndex,shopName,member,contactPhone,startTime,endTime,state,shopId,cityId,shopSource); | |
33 | - } | |
34 | - | |
35 | - /* (non-Javadoc) | |
36 | - * @see com.diligrp.website.manager.OpenShopApplyManager#getShopInfoByShopIdAndUserId(java.lang.Long, java.lang.Long) | |
37 | - */ | |
38 | - @Override | |
39 | - public Shop getShopInfoByShopId(Long shopId) { | |
40 | - return openShopApplyRpcService.getShopInfoByShopId(shopId); | |
41 | - } | |
42 | - | |
43 | - /* (non-Javadoc) | |
44 | - * @see com.diligrp.website.manager.OpenShopApplyManager#updateShopStatus(java.lang.Long, java.lang.String, java.lang.String) | |
45 | - */ | |
46 | - @Override | |
47 | - public boolean shopAudit(Long shopId, String auditRemark,Integer shopState) { | |
48 | - return openShopApplyRpcService.shopAudit(shopId, auditRemark, shopState); | |
49 | - } | |
50 | - | |
51 | - @Override | |
52 | - public MemberQueryResp getUserAuthInfo(Long userId){ | |
53 | - return openShopApplyRpcService.getUserAuthInfo(userId); | |
54 | - } | |
55 | - | |
56 | -} |
diligrp-website-manager/src/main/java/com/diligrp/website/manager/impl/ProductManagerImpl.java deleted
100644 → 0
1 | -package com.diligrp.website.manager.impl; | |
2 | - | |
3 | -import java.util.List; | |
4 | - | |
5 | -import javax.annotation.Resource; | |
6 | - | |
7 | -import org.springframework.stereotype.Service; | |
8 | - | |
9 | -import com.diligrp.titan.sdk.domain.Product; | |
10 | -import com.diligrp.website.manager.ProductManager; | |
11 | -import com.diligrp.website.manager.cache.ProductCache; | |
12 | - | |
13 | - | |
14 | -/** | |
15 | - * <B>Description</B> <br /> | |
16 | - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> | |
17 | - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> | |
18 | - * <B>Company</B> 地利集团 | |
19 | - * | |
20 | - * @author mengxf | |
21 | - * @createTime 2014年5月21日 下午6:20:36 | |
22 | - */ | |
23 | -@Service | |
24 | -public class ProductManagerImpl implements ProductManager { | |
25 | - | |
26 | - @Resource | |
27 | - private ProductCache productCahce; | |
28 | - | |
29 | - | |
30 | - @Override | |
31 | - public List<Product> getProductInfos(List<Long> pids) { | |
32 | - return productCahce.getProductInfos(pids); | |
33 | - } | |
34 | - | |
35 | - | |
36 | -} |
diligrp-website-manager/src/main/java/com/diligrp/website/manager/impl/SMSManagerImpl.java deleted
100644 → 0
1 | -package com.diligrp.website.manager.impl; | |
2 | - | |
3 | -import javax.annotation.Resource; | |
4 | - | |
5 | -import org.springframework.stereotype.Component; | |
6 | - | |
7 | -import com.diligrp.website.domain.MobMessage; | |
8 | -import com.diligrp.website.manager.SMSManager; | |
9 | -import com.diligrp.website.rpc.SMSRPCService; | |
10 | - | |
11 | -@Component("smsManager") | |
12 | -public class SMSManagerImpl implements SMSManager { | |
13 | - | |
14 | - @Resource(name = "smsRpcService") | |
15 | - private SMSRPCService smsRpcService; | |
16 | - | |
17 | - @Override | |
18 | - public boolean sendSMS(MobMessage mm) { | |
19 | - return smsRpcService.sendSMS(mm); | |
20 | - } | |
21 | - | |
22 | -} |
diligrp-website-manager/src/main/java/com/diligrp/website/manager/impl/ShopCloseHistoryManagerImpl.java deleted
100644 → 0
1 | -package com.diligrp.website.manager.impl; | |
2 | - | |
3 | -import com.diligrp.website.dao.ShopCloseHistoryDao; | |
4 | -import com.diligrp.website.domain.ShopCloseHistory; | |
5 | -import com.diligrp.website.manager.ShopCloseHistoryManager; | |
6 | -import com.diligrp.website.util.dao.BaseQuery; | |
7 | -import com.diligrp.website.util.web.PageTemplate; | |
8 | -import org.springframework.stereotype.Component; | |
9 | - | |
10 | -import javax.annotation.Resource; | |
11 | -import java.sql.Timestamp; | |
12 | -import java.util.List; | |
13 | - | |
14 | -@Component("shopCloseHistoryManager") | |
15 | -public class ShopCloseHistoryManagerImpl implements ShopCloseHistoryManager { | |
16 | - | |
17 | - @Resource | |
18 | - private ShopCloseHistoryDao shopCloseHistoryDao; | |
19 | - | |
20 | - @Override | |
21 | - public PageTemplate query(BaseQuery query) { | |
22 | - Integer totalSize = shopCloseHistoryDao.getShopCloseHistoryCount(query); | |
23 | - List<ShopCloseHistory> list = shopCloseHistoryDao.getShopCloseHistoryList(query); | |
24 | - return PageTemplate.create(query, totalSize, list); | |
25 | - } | |
26 | - | |
27 | - @Override | |
28 | - public boolean save(ShopCloseHistory shopCloseHistory) { | |
29 | - shopCloseHistory.setCreated(new Timestamp(System.currentTimeMillis())); | |
30 | - shopCloseHistory.setModified(shopCloseHistory.getCreated()); | |
31 | - shopCloseHistory.setYn(1); | |
32 | - return shopCloseHistoryDao.save(shopCloseHistory); | |
33 | - } | |
34 | - | |
35 | - @Override | |
36 | - public ShopCloseHistory getShopCloseHistoryById(Long id){ | |
37 | - return shopCloseHistoryDao.getShopCloseHistoryById(id); | |
38 | - } | |
39 | - | |
40 | - @Override | |
41 | - public ShopCloseHistory getAuditShopCloseHistoryByShopId(Long shopId){ | |
42 | - return shopCloseHistoryDao.getAuditShopCloseHistoryByShopId(shopId); | |
43 | - } | |
44 | - | |
45 | - @Override | |
46 | - public boolean edit(ShopCloseHistory shopCloseHistory) { | |
47 | - shopCloseHistory.setModified(new Timestamp(System.currentTimeMillis())); | |
48 | - return shopCloseHistoryDao.update(shopCloseHistory); | |
49 | - } | |
50 | -} |
diligrp-website-manager/src/main/java/com/diligrp/website/manager/impl/ShopNameModifyManagerImpl.java deleted
100644 → 0
1 | -package com.diligrp.website.manager.impl; | |
2 | - | |
3 | -import com.diligrp.website.dao.ShopNameModifyDao; | |
4 | -import com.diligrp.website.domain.ShopNameModify; | |
5 | -import com.diligrp.website.manager.ShopNameModifyManager; | |
6 | -import com.diligrp.website.util.dao.BaseQuery; | |
7 | -import com.diligrp.website.util.web.PageTemplate; | |
8 | -import org.springframework.stereotype.Component; | |
9 | - | |
10 | -import javax.annotation.Resource; | |
11 | -import java.sql.Timestamp; | |
12 | -import java.util.List; | |
13 | - | |
14 | -@Component("shopNameModifyManager") | |
15 | -public class ShopNameModifyManagerImpl implements ShopNameModifyManager { | |
16 | - | |
17 | - @Resource | |
18 | - private ShopNameModifyDao shopNameModifyDao; | |
19 | - | |
20 | - @Override | |
21 | - public PageTemplate query(BaseQuery query) { | |
22 | - Integer totalSize = shopNameModifyDao.getShopNameModifyCount(query); | |
23 | - List<ShopNameModify> list = shopNameModifyDao.getShopNameModifyList(query); | |
24 | - return PageTemplate.create(query, totalSize, list); | |
25 | - } | |
26 | - | |
27 | - @Override | |
28 | - public boolean save(ShopNameModify shopNameModify) { | |
29 | - shopNameModify.setCreated(new Timestamp(System.currentTimeMillis())); | |
30 | - shopNameModify.setModified(shopNameModify.getCreated()); | |
31 | - shopNameModify.setYn(1); | |
32 | - return shopNameModifyDao.save(shopNameModify); | |
33 | - } | |
34 | - | |
35 | - @Override | |
36 | - public boolean edit(ShopNameModify shopNameModify) { | |
37 | - shopNameModify.setModified(new Timestamp(System.currentTimeMillis())); | |
38 | - return shopNameModifyDao.update(shopNameModify); | |
39 | - } | |
40 | - | |
41 | - @Override | |
42 | - public List<ShopNameModify> getShopNameModifyByShopId(Long shopId) { | |
43 | - return shopNameModifyDao.getShopNameModifyByShopId(shopId); | |
44 | - } | |
45 | - | |
46 | - @Override | |
47 | - public ShopNameModify getShopNameModifyById(Long id){ | |
48 | - return shopNameModifyDao.getShopNameModifyById(id); | |
49 | - } | |
50 | - | |
51 | - @Override | |
52 | - public ShopNameModify getShopNameModifyByNewShopName(String newShopName){ | |
53 | - return shopNameModifyDao.getShopNameModifyByNewShopName(newShopName); | |
54 | - } | |
55 | -} |
diligrp-website-manweb/pom.xml
... | ... | @@ -39,155 +39,45 @@ |
39 | 39 | |
40 | 40 | <profiles> |
41 | 41 | <profile> |
42 | - <id>development</id> | |
43 | - <properties> | |
44 | - <!-- 显示模板 --> | |
45 | - <project.view.VMDefault>layout/default_content</project.view.VMDefault> | |
46 | - | |
47 | - <!-- redis 配置 --> | |
48 | - <project.redis.host1>10.28.6.152</project.redis.host1> | |
49 | - <project.redis.port1>6379</project.redis.port1> | |
50 | - | |
51 | - <!-- 商品详情链接地址 --> | |
52 | - <project.product.detail.path>http://www.nong12.com/product/</project.product.detail.path> | |
53 | - | |
54 | - <!-- 后台默认静态资源地址 --> | |
55 | - <project.default.assets.path>http://static.nong12.com/static/ace1.3/assets</project.default.assets.path> | |
56 | - | |
57 | - <!-- 公共样式引用 --> | |
58 | - <project.default.assets.common.path>http://static.nong12.com/static/</project.default.assets.common.path> | |
59 | - | |
60 | - <!-- 本地资源地址 --> | |
61 | - <project.default.local.path>/</project.default.local.path> | |
62 | - | |
63 | - <!-- 店铺域名 --> | |
64 | - <project.shop.domain>http://shop.nong12.com</project.shop.domain> | |
65 | - | |
66 | - <!-- sms.webchina.cn 短信发送接口的配置 --> | |
67 | - <project.sms.webchina.SMSKey>2cf3264488ee3beef224</project.sms.webchina.SMSKey> | |
68 | - <project.sms.webchina.userName>itly</project.sms.webchina.userName> | |
69 | - <project.sms.webchina.postURL>http://gbk.sms.webchinese.cn</project.sms.webchina.postURL> | |
70 | - | |
71 | - <!-- interface user --> | |
72 | - <website.user.baseUrl>http://user.nong12.com</website.user.baseUrl> | |
73 | - <website.user.token>token</website.user.token> | |
74 | - | |
75 | - <!-- interface titan --> | |
76 | - <website.titan.accesskey>accesskey</website.titan.accesskey> | |
77 | - <website.titan.secretkey>secretkey</website.titan.secretkey> | |
78 | - | |
79 | - <!-- 登录拦截器开关 --> | |
80 | - <project.manger.enabled>true</project.manger.enabled> | |
81 | - | |
82 | - <!-- 图片服务器地址配置 --> | |
83 | - <project.image.server.domain>nong12.com</project.image.server.domain> | |
84 | - <project.image.server.host>http://10.28.6.153</project.image.server.host> | |
85 | - | |
86 | - <!-- 数据库连接池配置文件 --> | |
87 | - <db.dbpool.jdbc.driver>org.mariadb.jdbc.Driver</db.dbpool.jdbc.driver> | |
88 | - <db.dbpool.jdbc.url>jdbc:mysql://10.28.6.151:3307/dili_website?useUnicode=true&characterEncoding=utf8</db.dbpool.jdbc.url> | |
89 | - <db.dbpool.jdbc.username>root</db.dbpool.jdbc.username> | |
90 | - <db.dbpool.jdbc.password>123456</db.dbpool.jdbc.password> | |
91 | - | |
92 | - <db.dbpool.init.initial.size>5</db.dbpool.init.initial.size> | |
93 | - <db.dbpool.init.min.idle>3</db.dbpool.init.min.idle> | |
94 | - <db.dbpool.init.max.active>5</db.dbpool.init.max.active> | |
95 | - | |
96 | - <db.dbpool.max.wait>60000</db.dbpool.max.wait> | |
97 | - <db.dbpool.time.between.millis>60000</db.dbpool.time.between.millis> | |
98 | - <db.dbpool.min.idle.time>300000</db.dbpool.min.idle.time> | |
99 | - | |
100 | - <!--权限相关配置 --> | |
101 | - <conf.manage.enable>false</conf.manage.enable> | |
102 | - <conf.manage.spider>true</conf.manage.spider> | |
103 | - <conf.manage.system>manweb</conf.manage.system> | |
104 | - <conf.manage.domain>http://manage.nong12.com/</conf.manage.domain> | |
105 | - <conf.manage.includes>^/$,^$,^/.*\.do</conf.manage.includes> | |
106 | - <conf.manage.excludes>^/noAccess.do$,^/welcome.do$,^/loginControl/.*,^/api/.*,^/city/.*,^/assets/.*</conf.manage.excludes> | |
107 | - | |
108 | - <!-- 短信发送开关 --> | |
109 | - <sms.switch>false</sms.switch> | |
110 | - | |
111 | - <!-- passport 注册配置 --> | |
112 | - <passport.register.url>http://passport.api.nong12.com/api/register/register.html</passport.register.url> | |
113 | - <passport.interface.sign>MTIzNDU2Nzg5</passport.interface.sign> | |
114 | - <passport.interface.pwd>nongfengwang</passport.interface.pwd> | |
115 | - | |
116 | - <!-- 店铺接口签名 --> | |
117 | - <manage.shopClient.sign>FzZGZxd2VycXdlYXNzZHZzdnp4Y3Z</manage.shopClient.sign> | |
118 | - | |
119 | - <!-- MQ --> | |
120 | - <conf.mq.namesrvAddr>10.28.6.124:9876</conf.mq.namesrvAddr> | |
121 | - <conf.mq.producerGroup>manweb_change</conf.mq.producerGroup> | |
122 | - | |
123 | - <!-- 物流 --> | |
124 | - <wl.url>http://wl.nong12.com/</wl.url> | |
125 | - <wl.sign>TqExJO5spMVhZLvr17FBR1MlNvMOc</wl.sign> | |
126 | - | |
127 | - </properties> | |
128 | - </profile> | |
129 | - | |
130 | - <profile> | |
131 | - <id>zmq-dev</id> | |
42 | + <id>dev</id> | |
132 | 43 | <activation> |
133 | 44 | <activeByDefault>true</activeByDefault> |
134 | 45 | </activation> |
135 | 46 | <properties> |
136 | 47 | <!-- 系统域名 --> |
137 | - <project.system.domain>http://manweb.1n4j.com</project.system.domain> | |
48 | + <project.system.domain>http://manweb.zandeapp.com</project.system.domain> | |
138 | 49 | <!-- 显示模板 --> |
139 | 50 | <project.view.VMDefault>layout/default_content</project.view.VMDefault> |
140 | 51 | |
141 | 52 | <!-- redis 配置 --> |
142 | - <project.redis.host1>10.28.10.208</project.redis.host1> | |
53 | + <project.redis.host1>10.28.11.205</project.redis.host1> | |
143 | 54 | <project.redis.port1>6379</project.redis.port1> |
144 | 55 | |
145 | 56 | <!-- 商品详情链接地址 --> |
146 | - <project.product.detail.path>http://www.1n4j.com/product/</project.product.detail.path> | |
57 | + <project.product.detail.path>http://www.zandeapp.com/product/</project.product.detail.path> | |
147 | 58 | |
148 | 59 | <!-- 后台默认静态资源地址 --> |
149 | - <project.default.assets.path>http://static.1n4j.com/static/ace1.3/assets</project.default.assets.path> | |
60 | + <project.default.assets.path>http://static.zandeapp.com/static/common/ace1.3/assets</project.default.assets.path> | |
150 | 61 | |
151 | 62 | <!-- 公共样式引用 --> |
152 | - <project.default.assets.common.path>http://static.1n4j.com/static/</project.default.assets.common.path> | |
63 | + <project.default.assets.common.path>http://static.zandeapp.com/static/common/</project.default.assets.common.path> | |
153 | 64 | |
154 | 65 | <!-- 本地资源地址 --> |
155 | 66 | <project.default.local.path>/</project.default.local.path> |
156 | 67 | |
157 | - <!-- 店铺域名 --> | |
158 | - <project.shop.domain>http://shop.1n4j.com</project.shop.domain> | |
159 | - <manage.shopClient.url>http://shop.1n4j.com</manage.shopClient.url> | |
160 | - <manage.shopClient.system>manweb</manage.shopClient.system> | |
161 | - <!-- 店铺接口签名 --> | |
162 | - <manage.shopClient.sign>FzZGZxd2VycXdlYXNzZHZzdnp4Y3Z</manage.shopClient.sign> | |
163 | - | |
164 | - <!-- sms.webchina.cn 短信发送接口的配置 --> | |
165 | - <project.sms.webchina.SMSKey>2cf3264488ee3beef224</project.sms.webchina.SMSKey> | |
166 | - <project.sms.webchina.userName>itly</project.sms.webchina.userName> | |
167 | - <project.sms.webchina.postURL>http://gbk.sms.webchinese.cn</project.sms.webchina.postURL> | |
168 | - | |
169 | - <!-- interface user --> | |
170 | - <website.user.baseUrl>http://user.1n4j.com</website.user.baseUrl> | |
171 | - <website.user.token>token</website.user.token> | |
172 | - | |
173 | - <!-- interface titan --> | |
174 | - <website.titan.accesskey>accesskey</website.titan.accesskey> | |
175 | - <website.titan.secretkey>secretkey</website.titan.secretkey> | |
176 | - | |
177 | 68 | <!-- 登录拦截器开关 --> |
178 | 69 | <project.manger.enabled>true</project.manger.enabled> |
179 | 70 | |
180 | 71 | <!-- 图片服务器地址配置 --> |
181 | - <project.image.server.domain>1n4j.com</project.image.server.domain> | |
182 | - <!-- <project.image.server.host>http://10.28.6.153</project.image.server.host> --> | |
183 | - <project.image.server.host>up.1n4j.com</project.image.server.host> | |
72 | + <project.image.server.domain>zandeapp.com</project.image.server.domain> | |
73 | + <project.image.server.host>up.zandeapp.com</project.image.server.host> | |
184 | 74 | <project.image.server.bucketname>free_trade_zone</project.image.server.bucketname> |
185 | 75 | <project.image.server.accesskey>d6a300418bd6fa2178b3bbb06a421f32</project.image.server.accesskey> |
186 | 76 | <project.image.server.secretkey>8d2d1ac5541dcfbbd78ac1793ce4f782</project.image.server.secretkey> |
187 | 77 | |
188 | 78 | <!-- 数据库连接池配置文件 --> |
189 | 79 | <db.dbpool.jdbc.driver>org.mariadb.jdbc.Driver</db.dbpool.jdbc.driver> |
190 | - <db.dbpool.jdbc.url>jdbc:mysql://10.28.10.188:3306/website?useUnicode=true&characterEncoding=utf8</db.dbpool.jdbc.url> | |
80 | + <db.dbpool.jdbc.url>jdbc:mysql://10.28.11.162:3306/manweb?useUnicode=true&characterEncoding=utf8</db.dbpool.jdbc.url> | |
191 | 81 | <db.dbpool.jdbc.username>root</db.dbpool.jdbc.username> |
192 | 82 | <db.dbpool.jdbc.password>123456</db.dbpool.jdbc.password> |
193 | 83 | |
... | ... | @@ -203,669 +93,17 @@ |
203 | 93 | <conf.manage.enable>false</conf.manage.enable> |
204 | 94 | <conf.manage.spider>true</conf.manage.spider> |
205 | 95 | <conf.manage.system>manweb</conf.manage.system> |
206 | - <conf.manage.domain>http://manage.1n4j.com/</conf.manage.domain> | |
96 | + <conf.manage.domain>http://manage.zandeapp.com/</conf.manage.domain> | |
207 | 97 | <conf.manage.includes>^/$,^$,^/.*\.do</conf.manage.includes> |
208 | 98 | <conf.manage.excludes>^/noAccess.do$,^/welcome.do$,^/loginControl/.*,^/api/.*,^/city/.*,^/assets/.*</conf.manage.excludes> |
209 | 99 | |
210 | 100 | <!-- 短信发送开关 --> |
211 | 101 | <sms.switch>false</sms.switch> |
212 | 102 | |
213 | - <!-- passport 注册配置 --> | |
214 | - <passport.register.url>http://passport.api.1n4j.com/api/register/register.html</passport.register.url> | |
215 | - <passport.interface.sign>MTIzNDU2Nzg5</passport.interface.sign> | |
216 | - <passport.interface.pwd>nongfengwang</passport.interface.pwd> | |
217 | - | |
218 | 103 | <!-- MQ --> |
219 | 104 | <conf.mq.namesrvAddr>10.28.6.124:9876</conf.mq.namesrvAddr> |
220 | 105 | <conf.mq.producerGroup>manweb_change</conf.mq.producerGroup> |
221 | 106 | |
222 | - <!-- 物流 --> | |
223 | - <wl.url>http://wl.1n4j.com/</wl.url> | |
224 | - <wl.sign>TqExJO5spMVhZLvr17FBR1MlNvMOc</wl.sign> | |
225 | - | |
226 | - </properties> | |
227 | - </profile> | |
228 | - | |
229 | - <profile> | |
230 | - <id>zmq-init-sql</id> | |
231 | - <properties> | |
232 | - <!-- 系统域名 --> | |
233 | - <project.system.domain>http://manweb.1n4j.com</project.system.domain> | |
234 | - <!-- 显示模板 --> | |
235 | - <project.view.VMDefault>layout/default_content</project.view.VMDefault> | |
236 | - | |
237 | - <!-- redis 配置 --> | |
238 | - <project.redis.host1>10.28.10.208</project.redis.host1> | |
239 | - <project.redis.port1>6379</project.redis.port1> | |
240 | - | |
241 | - <!-- 商品详情链接地址 --> | |
242 | - <project.product.detail.path>http://www.1n4j.com/product/</project.product.detail.path> | |
243 | - | |
244 | - <!-- 后台默认静态资源地址 --> | |
245 | - <project.default.assets.path>http://static.1n4j.com/static/ace1.3/assets</project.default.assets.path> | |
246 | - | |
247 | - <!-- 公共样式引用 --> | |
248 | - <project.default.assets.common.path>http://static.1n4j.com/static/</project.default.assets.common.path> | |
249 | - | |
250 | - <!-- 本地资源地址 --> | |
251 | - <project.default.local.path>/</project.default.local.path> | |
252 | - | |
253 | - <!-- 店铺域名 --> | |
254 | - <project.shop.domain>http://shop.1n4j.com</project.shop.domain> | |
255 | - <manage.shopClient.url>http://shop.1n4j.com</manage.shopClient.url> | |
256 | - <manage.shopClient.system>manweb</manage.shopClient.system> | |
257 | - <!-- 店铺接口签名 --> | |
258 | - <manage.shopClient.sign>FzZGZxd2VycXdlYXNzZHZzdnp4Y3Z</manage.shopClient.sign> | |
259 | - | |
260 | - <!-- sms.webchina.cn 短信发送接口的配置 --> | |
261 | - <project.sms.webchina.SMSKey>2cf3264488ee3beef224</project.sms.webchina.SMSKey> | |
262 | - <project.sms.webchina.userName>itly</project.sms.webchina.userName> | |
263 | - <project.sms.webchina.postURL>http://gbk.sms.webchinese.cn</project.sms.webchina.postURL> | |
264 | - | |
265 | - <!-- interface user --> | |
266 | - <website.user.baseUrl>http://user.1n4j.com</website.user.baseUrl> | |
267 | - <website.user.token>token</website.user.token> | |
268 | - | |
269 | - <!-- interface titan --> | |
270 | - <website.titan.accesskey>accesskey</website.titan.accesskey> | |
271 | - <website.titan.secretkey>secretkey</website.titan.secretkey> | |
272 | - | |
273 | - <!-- 登录拦截器开关 --> | |
274 | - <project.manger.enabled>true</project.manger.enabled> | |
275 | - | |
276 | - <!-- 图片服务器地址配置 --> | |
277 | - <project.image.server.domain>1n4j.com</project.image.server.domain> | |
278 | - <!-- <project.image.server.host>http://10.28.6.153</project.image.server.host> --> | |
279 | - <project.image.server.host>up.1n4j.com</project.image.server.host> | |
280 | - <project.image.server.bucketname>free_trade_zone</project.image.server.bucketname> | |
281 | - <project.image.server.accesskey>d6a300418bd6fa2178b3bbb06a421f32</project.image.server.accesskey> | |
282 | - <project.image.server.secretkey>8d2d1ac5541dcfbbd78ac1793ce4f782</project.image.server.secretkey> | |
283 | - | |
284 | - <!-- 数据库连接池配置文件 --> | |
285 | - <db.dbpool.jdbc.driver>org.mariadb.jdbc.Driver</db.dbpool.jdbc.driver> | |
286 | - <db.dbpool.jdbc.url>jdbc:mysql://10.28.10.188:3306/test_website?useUnicode=true&characterEncoding=utf8</db.dbpool.jdbc.url> | |
287 | - <db.dbpool.jdbc.username>root</db.dbpool.jdbc.username> | |
288 | - <db.dbpool.jdbc.password>123456</db.dbpool.jdbc.password> | |
289 | - | |
290 | - <db.dbpool.init.initial.size>5</db.dbpool.init.initial.size> | |
291 | - <db.dbpool.init.min.idle>3</db.dbpool.init.min.idle> | |
292 | - <db.dbpool.init.max.active>5</db.dbpool.init.max.active> | |
293 | - | |
294 | - <db.dbpool.max.wait>60000</db.dbpool.max.wait> | |
295 | - <db.dbpool.time.between.millis>60000</db.dbpool.time.between.millis> | |
296 | - <db.dbpool.min.idle.time>300000</db.dbpool.min.idle.time> | |
297 | - | |
298 | - <!--权限相关配置 --> | |
299 | - <conf.manage.enable>false</conf.manage.enable> | |
300 | - <conf.manage.spider>true</conf.manage.spider> | |
301 | - <conf.manage.system>manweb</conf.manage.system> | |
302 | - <conf.manage.domain>http://manage.1n4j.com/</conf.manage.domain> | |
303 | - <conf.manage.includes>^/$,^$,^/.*\.do</conf.manage.includes> | |
304 | - <conf.manage.excludes>^/noAccess.do$,^/welcome.do$,^/loginControl/.*,^/api/.*,^/city/.*,^/assets/.*</conf.manage.excludes> | |
305 | - | |
306 | - <!-- 短信发送开关 --> | |
307 | - <sms.switch>false</sms.switch> | |
308 | - | |
309 | - <!-- passport 注册配置 --> | |
310 | - <passport.register.url>http://passport.api.1n4j.com/api/register/register.html</passport.register.url> | |
311 | - <passport.interface.sign>MTIzNDU2Nzg5</passport.interface.sign> | |
312 | - <passport.interface.pwd>nongfengwang</passport.interface.pwd> | |
313 | - | |
314 | - <!-- MQ --> | |
315 | - <conf.mq.namesrvAddr>10.28.6.124:9876</conf.mq.namesrvAddr> | |
316 | - <conf.mq.producerGroup>manweb_change</conf.mq.producerGroup> | |
317 | - | |
318 | - <!-- 物流 --> | |
319 | - <wl.url>http://wl.1n4j.com/</wl.url> | |
320 | - <wl.sign>TqExJO5spMVhZLvr17FBR1MlNvMOc</wl.sign> | |
321 | - | |
322 | - </properties> | |
323 | - </profile> | |
324 | - | |
325 | - <profile> | |
326 | - <id>zmq-test</id> | |
327 | - <properties> | |
328 | - <!-- 系统域名 --> | |
329 | - <project.system.domain>http://manweb.1n4j.com</project.system.domain> | |
330 | - <!-- 显示模板 --> | |
331 | - <project.view.VMDefault>layout/default_content</project.view.VMDefault> | |
332 | - | |
333 | - <!-- redis 配置 --> | |
334 | - <project.redis.host1>10.28.10.207</project.redis.host1> | |
335 | - <project.redis.port1>6379</project.redis.port1> | |
336 | - | |
337 | - <!-- 商品详情链接地址 --> | |
338 | - <project.product.detail.path>http://www.1n4j.com/product/</project.product.detail.path> | |
339 | - | |
340 | - <!-- 后台默认静态资源地址 --> | |
341 | - <project.default.assets.path>http://static.1n4j.com/static/ace1.3/assets</project.default.assets.path> | |
342 | - | |
343 | - <!-- 公共样式引用 --> | |
344 | - <project.default.assets.common.path>http://static.1n4j.com/static/</project.default.assets.common.path> | |
345 | - | |
346 | - <!-- 本地资源地址 --> | |
347 | - <project.default.local.path>/</project.default.local.path> | |
348 | - | |
349 | - <!-- 店铺域名 --> | |
350 | - <project.shop.domain>http://shop.1n4j.com</project.shop.domain> | |
351 | - <manage.shopClient.url>http://shop.1n4j.com</manage.shopClient.url> | |
352 | - <manage.shopClient.system>manweb</manage.shopClient.system> | |
353 | - <!-- 店铺接口签名 --> | |
354 | - <manage.shopClient.sign>FzZGZxd2VycXdlYXNzZHZzdnp4Y3Z</manage.shopClient.sign> | |
355 | - | |
356 | - <!-- sms.webchina.cn 短信发送接口的配置 --> | |
357 | - <project.sms.webchina.SMSKey>2cf3264488ee3beef224</project.sms.webchina.SMSKey> | |
358 | - <project.sms.webchina.userName>itly</project.sms.webchina.userName> | |
359 | - <project.sms.webchina.postURL>http://gbk.sms.webchinese.cn</project.sms.webchina.postURL> | |
360 | - | |
361 | - <!-- interface user --> | |
362 | - <website.user.baseUrl>http://user.1n4j.com</website.user.baseUrl> | |
363 | - <website.user.token>token</website.user.token> | |
364 | - | |
365 | - <!-- interface titan --> | |
366 | - <website.titan.accesskey>accesskey</website.titan.accesskey> | |
367 | - <website.titan.secretkey>secretkey</website.titan.secretkey> | |
368 | - | |
369 | - <!-- 登录拦截器开关 --> | |
370 | - <project.manger.enabled>true</project.manger.enabled> | |
371 | - | |
372 | - <!-- 图片服务器地址配置 --> | |
373 | - <project.image.server.host>up.1n4j.com</project.image.server.host> | |
374 | - <project.image.server.bucketname>free_trade_zone</project.image.server.bucketname> | |
375 | - <project.image.server.accesskey>d6a300418bd6fa2178b3bbb06a421f32</project.image.server.accesskey> | |
376 | - <project.image.server.secretkey>8d2d1ac5541dcfbbd78ac1793ce4f782</project.image.server.secretkey> | |
377 | - | |
378 | - <!-- 数据库连接池配置文件 --> | |
379 | - <db.dbpool.jdbc.driver>org.mariadb.jdbc.Driver</db.dbpool.jdbc.driver> | |
380 | - <db.dbpool.jdbc.url>jdbc:mysql://10.28.6.55:3307/agriez_website?useUnicode=true&characterEncoding=utf8</db.dbpool.jdbc.url> | |
381 | - <db.dbpool.jdbc.username>root</db.dbpool.jdbc.username> | |
382 | - <db.dbpool.jdbc.password>123456</db.dbpool.jdbc.password> | |
383 | - | |
384 | - <db.dbpool.init.initial.size>5</db.dbpool.init.initial.size> | |
385 | - <db.dbpool.init.min.idle>3</db.dbpool.init.min.idle> | |
386 | - <db.dbpool.init.max.active>5</db.dbpool.init.max.active> | |
387 | - | |
388 | - <db.dbpool.max.wait>60000</db.dbpool.max.wait> | |
389 | - <db.dbpool.time.between.millis>60000</db.dbpool.time.between.millis> | |
390 | - <db.dbpool.min.idle.time>300000</db.dbpool.min.idle.time> | |
391 | - | |
392 | - <!--权限相关配置 --> | |
393 | - <conf.manage.enable>false</conf.manage.enable> | |
394 | - <conf.manage.spider>true</conf.manage.spider> | |
395 | - <conf.manage.system>manweb</conf.manage.system> | |
396 | - <conf.manage.domain>http://manage.1n4j.com/</conf.manage.domain> | |
397 | - <conf.manage.includes>^/$,^$,^/.*\.do</conf.manage.includes> | |
398 | - <conf.manage.excludes>^/noAccess.do$,^/welcome.do$,^/loginControl/.*,^/api/.*,^/city/.*,^/assets/.*</conf.manage.excludes> | |
399 | - | |
400 | - <!-- 短信发送开关 --> | |
401 | - <sms.switch>false</sms.switch> | |
402 | - | |
403 | - <!-- passport 注册配置 --> | |
404 | - <passport.register.url>http://passport.api.1n4j.com/api/register/register.html</passport.register.url> | |
405 | - <passport.interface.sign>MTIzNDU2Nzg5</passport.interface.sign> | |
406 | - <passport.interface.pwd>nongfengwang</passport.interface.pwd> | |
407 | - | |
408 | - <!-- MQ --> | |
409 | - <conf.mq.namesrvAddr>10.28.10.230:9876</conf.mq.namesrvAddr> | |
410 | - <conf.mq.producerGroup>manweb_change</conf.mq.producerGroup> | |
411 | - | |
412 | - <!-- 物流 --> | |
413 | - <wl.url>http://wl.1n4j.com/</wl.url> | |
414 | - <wl.sign>TqExJO5spMVhZLvr17FBR1MlNvMOc</wl.sign> | |
415 | - | |
416 | - </properties> | |
417 | - </profile> | |
418 | - | |
419 | - <profile> | |
420 | - <id>pre-online</id> | |
421 | - <properties> | |
422 | - <!-- 系统域名 --> | |
423 | - <project.system.domain>http://manweb.1n4j.com</project.system.domain> | |
424 | - <!-- 显示模板 --> | |
425 | - <project.view.VMDefault>layout/default_content</project.view.VMDefault> | |
426 | - | |
427 | - <!-- redis 配置 --> | |
428 | - <project.redis.host1>redis.1n4j.com</project.redis.host1> | |
429 | - <project.redis.port1>6379</project.redis.port1> | |
430 | - | |
431 | - <!-- 商品详情链接地址 --> | |
432 | - <project.product.detail.path>http://www.1n4j.com/product/</project.product.detail.path> | |
433 | - | |
434 | - <!-- 后台默认静态资源地址 --> | |
435 | - <project.default.assets.path>http://static.1n4j.com/static/ace1.3/assets</project.default.assets.path> | |
436 | - | |
437 | - <!-- 公共样式引用 --> | |
438 | - <project.default.assets.common.path>http://static.1n4j.com/static/</project.default.assets.common.path> | |
439 | - | |
440 | - <!-- 本地资源地址 --> | |
441 | - <project.default.local.path>/</project.default.local.path> | |
442 | - | |
443 | - <!-- 店铺域名 --> | |
444 | - <project.shop.domain>http://shop.1n4j.com</project.shop.domain> | |
445 | - <manage.shopClient.url>http://shop.1n4j.com</manage.shopClient.url> | |
446 | - <manage.shopClient.system>manweb</manage.shopClient.system> | |
447 | - <!-- 店铺接口签名 --> | |
448 | - <manage.shopClient.sign>FzZGZxd2VycXdlYXNzZHZzdnp4Y3Z</manage.shopClient.sign> | |
449 | - | |
450 | - <!-- sms.webchina.cn 短信发送接口的配置 --> | |
451 | - <project.sms.webchina.SMSKey>2cf3264488ee3beef224</project.sms.webchina.SMSKey> | |
452 | - <project.sms.webchina.userName>itly</project.sms.webchina.userName> | |
453 | - <project.sms.webchina.postURL>http://gbk.sms.webchinese.cn</project.sms.webchina.postURL> | |
454 | - | |
455 | - <!-- interface user --> | |
456 | - <website.user.baseUrl>http://user.1n4j.com</website.user.baseUrl> | |
457 | - <website.user.token>token</website.user.token> | |
458 | - | |
459 | - <!-- interface titan --> | |
460 | - <website.titan.accesskey>accesskey</website.titan.accesskey> | |
461 | - <website.titan.secretkey>secretkey</website.titan.secretkey> | |
462 | - | |
463 | - <!-- 登录拦截器开关 --> | |
464 | - <project.manger.enabled>true</project.manger.enabled> | |
465 | - | |
466 | - <!-- 图片服务器地址配置 --> | |
467 | - <project.image.server.domain>1n4j.com</project.image.server.domain> | |
468 | - <!-- <project.image.server.host>http://10.28.6.153</project.image.server.host> --> | |
469 | - <project.image.server.host>up.1n4j.com</project.image.server.host> | |
470 | - <project.image.server.bucketname>free_trade_zone</project.image.server.bucketname> | |
471 | - <project.image.server.accesskey>d6a300418bd6fa2178b3bbb06a421f32</project.image.server.accesskey> | |
472 | - <project.image.server.secretkey>8d2d1ac5541dcfbbd78ac1793ce4f782</project.image.server.secretkey> | |
473 | - | |
474 | - <!-- 数据库连接池配置文件 --> | |
475 | - <db.dbpool.jdbc.driver>org.mariadb.jdbc.Driver</db.dbpool.jdbc.driver> | |
476 | - <db.dbpool.jdbc.url>jdbc:mysql://manweb.db.1n4j.com:3306/agriez_manweb?useUnicode=true&characterEncoding=utf8</db.dbpool.jdbc.url> | |
477 | - <db.dbpool.jdbc.username>root</db.dbpool.jdbc.username> | |
478 | - <db.dbpool.jdbc.password>123456</db.dbpool.jdbc.password> | |
479 | - | |
480 | - <db.dbpool.init.initial.size>5</db.dbpool.init.initial.size> | |
481 | - <db.dbpool.init.min.idle>3</db.dbpool.init.min.idle> | |
482 | - <db.dbpool.init.max.active>5</db.dbpool.init.max.active> | |
483 | - | |
484 | - <db.dbpool.max.wait>60000</db.dbpool.max.wait> | |
485 | - <db.dbpool.time.between.millis>60000</db.dbpool.time.between.millis> | |
486 | - <db.dbpool.min.idle.time>300000</db.dbpool.min.idle.time> | |
487 | - | |
488 | - <!--权限相关配置 --> | |
489 | - <conf.manage.enable>false</conf.manage.enable> | |
490 | - <conf.manage.spider>true</conf.manage.spider> | |
491 | - <conf.manage.system>manweb</conf.manage.system> | |
492 | - <conf.manage.domain>http://manage.1n4j.com/</conf.manage.domain> | |
493 | - <conf.manage.includes>^/$,^$,^/.*\.do</conf.manage.includes> | |
494 | - <conf.manage.excludes>^/noAccess.do$,^/welcome.do$,^/loginControl/.*,^/api/.*,^/city/.*,^/assets/.*</conf.manage.excludes> | |
495 | - | |
496 | - <!-- 短信发送开关 --> | |
497 | - <sms.switch>false</sms.switch> | |
498 | - | |
499 | - <!-- passport 注册配置 --> | |
500 | - <passport.register.url>http://passport.api.1n4j.com/api/register/register.html</passport.register.url> | |
501 | - <passport.interface.sign>MTIzNDU2Nzg5</passport.interface.sign> | |
502 | - <passport.interface.pwd>nongfengwang</passport.interface.pwd> | |
503 | - | |
504 | - <!-- MQ --> | |
505 | - <conf.mq.namesrvAddr>20.28.6.51:9876</conf.mq.namesrvAddr> | |
506 | - <conf.mq.producerGroup>manweb_change</conf.mq.producerGroup> | |
507 | - | |
508 | - <!-- 物流 --> | |
509 | - <wl.url>http://wl.1n4j.com/</wl.url> | |
510 | - <wl.sign>TqExJO5spMVhZLvr17FBR1MlNvMOc</wl.sign> | |
511 | - | |
512 | - </properties> | |
513 | - </profile> | |
514 | - | |
515 | - <profile> | |
516 | - <id>online</id> | |
517 | - <properties> | |
518 | - <!-- 系统域名 --> | |
519 | - <project.system.domain>http://manweb.1n4j.com</project.system.domain> | |
520 | - <!-- 显示模板 --> | |
521 | - <project.view.VMDefault>layout/default_content</project.view.VMDefault> | |
522 | - | |
523 | - <!-- redis 配置 --> | |
524 | - <project.redis.host1>redis.1n4j.com</project.redis.host1> | |
525 | - <project.redis.port1>6379</project.redis.port1> | |
526 | - | |
527 | - <!-- 商品详情链接地址 --> | |
528 | - <project.product.detail.path>http://www.1n4j.com/product/</project.product.detail.path> | |
529 | - | |
530 | - <!-- 后台默认静态资源地址 --> | |
531 | - <project.default.assets.path>http://static.1n4j.com/static/ace1.3/assets</project.default.assets.path> | |
532 | - | |
533 | - <!-- 公共样式引用 --> | |
534 | - <project.default.assets.common.path>http://static.1n4j.com/static/</project.default.assets.common.path> | |
535 | - | |
536 | - <!-- 本地资源地址 --> | |
537 | - <project.default.local.path>/</project.default.local.path> | |
538 | - | |
539 | - <!-- 店铺域名 --> | |
540 | - <project.shop.domain>http://shop.1n4j.com</project.shop.domain> | |
541 | - <manage.shopClient.url>http://shop.1n4j.com</manage.shopClient.url> | |
542 | - <manage.shopClient.system>manweb</manage.shopClient.system> | |
543 | - <!-- 店铺接口签名 --> | |
544 | - <manage.shopClient.sign>FzZGZxd2VycXdlYXNzZHZzdnp4Y3Z</manage.shopClient.sign> | |
545 | - | |
546 | - <!-- sms.webchina.cn 短信发送接口的配置 --> | |
547 | - <project.sms.webchina.SMSKey>2cf3264488ee3beef224</project.sms.webchina.SMSKey> | |
548 | - <project.sms.webchina.userName>itly</project.sms.webchina.userName> | |
549 | - <project.sms.webchina.postURL>http://gbk.sms.webchinese.cn</project.sms.webchina.postURL> | |
550 | - | |
551 | - <!-- interface user --> | |
552 | - <website.user.baseUrl>http://user.1n4j.com</website.user.baseUrl> | |
553 | - <website.user.token>token</website.user.token> | |
554 | - | |
555 | - <!-- interface titan --> | |
556 | - <website.titan.accesskey>accesskey</website.titan.accesskey> | |
557 | - <website.titan.secretkey>secretkey</website.titan.secretkey> | |
558 | - | |
559 | - <!-- 登录拦截器开关 --> | |
560 | - <project.manger.enabled>true</project.manger.enabled> | |
561 | - | |
562 | - <!-- 图片服务器地址配置 --> | |
563 | - <project.image.server.domain>1n4j.com</project.image.server.domain> | |
564 | - <!-- <project.image.server.host>http://10.28.6.153</project.image.server.host> --> | |
565 | - <project.image.server.host>up.1n4j.com</project.image.server.host> | |
566 | - <project.image.server.bucketname>free_trade_zone</project.image.server.bucketname> | |
567 | - <project.image.server.accesskey>d6a300418bd6fa2178b3bbb06a421f32</project.image.server.accesskey> | |
568 | - <project.image.server.secretkey>8d2d1ac5541dcfbbd78ac1793ce4f782</project.image.server.secretkey> | |
569 | - | |
570 | - <!-- 数据库连接池配置文件 --> | |
571 | - <db.dbpool.jdbc.driver>org.mariadb.jdbc.Driver</db.dbpool.jdbc.driver> | |
572 | - <db.dbpool.jdbc.url>jdbc:mysql://manweb.db.1n4j.com:3306/agriez_manweb?useUnicode=true&characterEncoding=utf8</db.dbpool.jdbc.url> | |
573 | - <db.dbpool.jdbc.username>appAccPayor</db.dbpool.jdbc.username> | |
574 | - <db.dbpool.jdbc.password>iTDYVBtI6MX4NQ3Er2Oh</db.dbpool.jdbc.password> | |
575 | - | |
576 | - <db.dbpool.init.initial.size>5</db.dbpool.init.initial.size> | |
577 | - <db.dbpool.init.min.idle>3</db.dbpool.init.min.idle> | |
578 | - <db.dbpool.init.max.active>5</db.dbpool.init.max.active> | |
579 | - | |
580 | - <db.dbpool.max.wait>60000</db.dbpool.max.wait> | |
581 | - <db.dbpool.time.between.millis>60000</db.dbpool.time.between.millis> | |
582 | - <db.dbpool.min.idle.time>300000</db.dbpool.min.idle.time> | |
583 | - | |
584 | - <!--权限相关配置 --> | |
585 | - <conf.manage.enable>false</conf.manage.enable> | |
586 | - <conf.manage.spider>true</conf.manage.spider> | |
587 | - <conf.manage.system>manweb</conf.manage.system> | |
588 | - <conf.manage.domain>http://manage.1n4j.com/</conf.manage.domain> | |
589 | - <conf.manage.includes>^/$,^$,^/.*\.do</conf.manage.includes> | |
590 | - <conf.manage.excludes>^/noAccess.do$,^/welcome.do$,^/loginControl/.*,^/api/.*,^/city/.*,^/assets/.*</conf.manage.excludes> | |
591 | - | |
592 | - <!-- 短信发送开关 --> | |
593 | - <sms.switch>false</sms.switch> | |
594 | - | |
595 | - <!-- passport 注册配置 --> | |
596 | - <passport.register.url>http://passport.api.1n4j.com/api/register/register.html</passport.register.url> | |
597 | - <passport.interface.sign>MTIzNDU2Nzg5</passport.interface.sign> | |
598 | - <passport.interface.pwd>nongfengwang</passport.interface.pwd> | |
599 | - | |
600 | - <!-- MQ --> | |
601 | - <conf.mq.namesrvAddr>192.168.60.62:9876;192.168.60.63:9876</conf.mq.namesrvAddr> | |
602 | - <conf.mq.producerGroup>manweb_change</conf.mq.producerGroup> | |
603 | - | |
604 | - <!-- 物流 --> | |
605 | - <wl.url>http://wl.1n4j.com/</wl.url> | |
606 | - <wl.sign>TqExJO5spMVhZLvr17FBR1MlNvMOc</wl.sign> | |
607 | - | |
608 | - </properties> | |
609 | - </profile> | |
610 | - | |
611 | - <profile> | |
612 | - <id>test</id> | |
613 | - <properties> | |
614 | - <!-- 显示模板 --> | |
615 | - <project.view.VMDefault>layout/default_content</project.view.VMDefault> | |
616 | - | |
617 | - <!-- redis 配置 --> | |
618 | - <project.redis.host1>10.28.6.54</project.redis.host1> | |
619 | - <project.redis.port1>6379</project.redis.port1> | |
620 | - | |
621 | - <!-- 商品详情链接地址 --> | |
622 | - <project.product.detail.path>http://www.nong12.com/product/</project.product.detail.path> | |
623 | - | |
624 | - <!-- 后台默认静态资源地址 --> | |
625 | - <project.default.assets.path>http://static.nong12.com/static/ace1.3/assets</project.default.assets.path> | |
626 | - | |
627 | - <!-- 公共样式引用 --> | |
628 | - <project.default.assets.common.path>http://static.nong12.com/static/</project.default.assets.common.path> | |
629 | - | |
630 | - <!-- 本地资源地址 --> | |
631 | - <project.default.local.path>/</project.default.local.path> | |
632 | - | |
633 | - <!-- 店铺域名 --> | |
634 | - <project.shop.domain>http://shop.nong12.com</project.shop.domain> | |
635 | - | |
636 | - <!-- sms.webchina.cn 短信发送接口的配置 --> | |
637 | - <project.sms.webchina.SMSKey>2cf3264488ee3beef224</project.sms.webchina.SMSKey> | |
638 | - <project.sms.webchina.userName>itly</project.sms.webchina.userName> | |
639 | - <project.sms.webchina.postURL>http://gbk.sms.webchinese.cn</project.sms.webchina.postURL> | |
640 | - | |
641 | - <!-- interface user --> | |
642 | - <website.user.baseUrl>http://user.nong12.com</website.user.baseUrl> | |
643 | - <website.user.token>token</website.user.token> | |
644 | - | |
645 | - <!-- interface titan --> | |
646 | - <website.titan.accesskey>accesskey</website.titan.accesskey> | |
647 | - <website.titan.secretkey>secretkey</website.titan.secretkey> | |
648 | - | |
649 | - <!-- 登录拦截器开关 --> | |
650 | - <project.manger.enabled>true</project.manger.enabled> | |
651 | - | |
652 | - <!-- 图片服务器地址配置 --> | |
653 | - <project.image.server.domain>nong12.com</project.image.server.domain> | |
654 | - <project.image.server.host>http://10.28.6.153</project.image.server.host> | |
655 | - | |
656 | - | |
657 | - <!-- 数据库连接池配置文件 --> | |
658 | - <db.dbpool.jdbc.driver>org.mariadb.jdbc.Driver</db.dbpool.jdbc.driver> | |
659 | - <db.dbpool.jdbc.url>jdbc:mysql://10.28.6.55:3307/dili_website?useUnicode=true&characterEncoding=utf8</db.dbpool.jdbc.url> | |
660 | - <db.dbpool.jdbc.username>root</db.dbpool.jdbc.username> | |
661 | - <db.dbpool.jdbc.password>123456</db.dbpool.jdbc.password> | |
662 | - | |
663 | - <db.dbpool.init.initial.size>5</db.dbpool.init.initial.size> | |
664 | - <db.dbpool.init.min.idle>3</db.dbpool.init.min.idle> | |
665 | - <db.dbpool.init.max.active>5</db.dbpool.init.max.active> | |
666 | - | |
667 | - <db.dbpool.max.wait>60000</db.dbpool.max.wait> | |
668 | - <db.dbpool.time.between.millis>60000</db.dbpool.time.between.millis> | |
669 | - <db.dbpool.min.idle.time>300000</db.dbpool.min.idle.time> | |
670 | - | |
671 | - <!--权限相关配置 --> | |
672 | - <conf.manage.enable>true</conf.manage.enable> | |
673 | - <conf.manage.spider>true</conf.manage.spider> | |
674 | - <conf.manage.system>manweb</conf.manage.system> | |
675 | - <conf.manage.domain>http://manage.nong12.com/</conf.manage.domain> | |
676 | - <conf.manage.includes>^/.*\.do</conf.manage.includes> | |
677 | - <conf.manage.excludes>^/noAccess.do$,^/welcome.do$,^/loginControl/.*,^/api/.*,^/city/.*,^/assets/.*</conf.manage.excludes> | |
678 | - | |
679 | - <!-- 短信发送开关 --> | |
680 | - <sms.switch>false</sms.switch> | |
681 | - | |
682 | - <!-- passport 注册配置 --> | |
683 | - <passport.register.url>http://passport.api.nong12.com/api/register/register.html</passport.register.url> | |
684 | - <passport.interface.sign>MTIzNDU2Nzg5</passport.interface.sign> | |
685 | - <passport.interface.pwd>nongfengwang</passport.interface.pwd> | |
686 | - | |
687 | - <!-- 店铺接口签名 --> | |
688 | - <manage.shopClient.sign>FzZGZxd2VycXdlYXNzZHZzdnp4Y3Z</manage.shopClient.sign> | |
689 | - | |
690 | - <!-- MQ --> | |
691 | - <conf.mq.namesrvAddr>10.28.6.54:9876</conf.mq.namesrvAddr> | |
692 | - <conf.mq.producerGroup>manweb_change</conf.mq.producerGroup> | |
693 | - | |
694 | - <!-- 物流 --> | |
695 | - <wl.url>http://wl.nong12.com/</wl.url> | |
696 | - <wl.sign>TqExJO5spMVhZLvr17FBR1MlNvMOc</wl.sign> | |
697 | - </properties> | |
698 | - </profile> | |
699 | - | |
700 | - | |
701 | - <profile> | |
702 | - <id>product</id> | |
703 | - <properties> | |
704 | - <!-- 显示模板 --> | |
705 | - <project.view.VMDefault>layout/default_content</project.view.VMDefault> | |
706 | - | |
707 | - <!-- redis 配置 --> | |
708 | - <project.redis.host1>udlredis.nong12.com</project.redis.host1> | |
709 | - <project.redis.port1>6379</project.redis.port1> | |
710 | - | |
711 | - <!-- 商品详情链接地址 --> | |
712 | - <project.product.detail.path>http://www.nong12.com/product/</project.product.detail.path> | |
713 | - | |
714 | - <!-- 后台默认静态资源地址 --> | |
715 | - <project.default.assets.path>http://static.nong12.com/static/ace1.3/assets</project.default.assets.path> | |
716 | - | |
717 | - <!-- 公共样式引用 --> | |
718 | - <project.default.assets.common.path>http://static.nong12.com/static/</project.default.assets.common.path> | |
719 | - | |
720 | - <!-- 本地资源地址 --> | |
721 | - <project.default.local.path>/</project.default.local.path> | |
722 | - | |
723 | - <!-- 店铺域名 --> | |
724 | - <project.shop.domain>http://shop.nong12.com</project.shop.domain> | |
725 | - | |
726 | - <!-- sms.webchina.cn 短信发送接口的配置 --> | |
727 | - <project.sms.webchina.SMSKey>c0978121c3893cf9ddbc</project.sms.webchina.SMSKey> | |
728 | - <project.sms.webchina.userName>zhuxuegang@diligrp.com</project.sms.webchina.userName> | |
729 | - <project.sms.webchina.postURL>http://gbk.sms.webchinese.cn</project.sms.webchina.postURL> | |
730 | - | |
731 | - <!-- interface user --> | |
732 | - <website.user.baseUrl>http://user.nong12.com</website.user.baseUrl> | |
733 | - <website.user.token>token</website.user.token> | |
734 | - | |
735 | - <!-- interface titan --> | |
736 | - <website.titan.accesskey>accesskey</website.titan.accesskey> | |
737 | - <website.titan.secretkey>secretkey</website.titan.secretkey> | |
738 | - | |
739 | - <!-- 登录拦截器开关 --> | |
740 | - <project.manger.enabled>true</project.manger.enabled> | |
741 | - | |
742 | - <!-- 图片服务器地址配置 --> | |
743 | - <project.image.server.domain>nong12.com</project.image.server.domain> | |
744 | - <project.image.server.host>http://imageServer.nong12.com:8000</project.image.server.host> | |
745 | - | |
746 | - <!-- 数据库连接池配置文件 --> | |
747 | - <db.dbpool.jdbc.driver>org.mariadb.jdbc.Driver</db.dbpool.jdbc.driver> | |
748 | - <db.dbpool.jdbc.url>jdbc:mysql://dili_website.db.nong12.com:3306/dili_website?useUnicode=true&characterEncoding=utf8</db.dbpool.jdbc.url> | |
749 | - <db.dbpool.jdbc.username>FG_yunwei</db.dbpool.jdbc.username> | |
750 | - <db.dbpool.jdbc.password>vtA]7xU2h~ne_b</db.dbpool.jdbc.password> | |
751 | - | |
752 | - <db.dbpool.init.initial.size>5</db.dbpool.init.initial.size> | |
753 | - <db.dbpool.init.min.idle>3</db.dbpool.init.min.idle> | |
754 | - <db.dbpool.init.max.active>5</db.dbpool.init.max.active> | |
755 | - | |
756 | - <db.dbpool.max.wait>60000</db.dbpool.max.wait> | |
757 | - <db.dbpool.time.between.millis>60000</db.dbpool.time.between.millis> | |
758 | - <db.dbpool.min.idle.time>300000</db.dbpool.min.idle.time> | |
759 | - | |
760 | - <!--权限相关配置 --> | |
761 | - <conf.manage.enable>true</conf.manage.enable> | |
762 | - <conf.manage.spider>false</conf.manage.spider> | |
763 | - <conf.manage.system>manweb</conf.manage.system> | |
764 | - <conf.manage.domain>http://manage.nong12.com/</conf.manage.domain> | |
765 | - <conf.manage.includes>^/.*\.do</conf.manage.includes> | |
766 | - <conf.manage.excludes>^/noAccess.do$,^/welcome.do$,^/loginControl/.*,^/api/.*,^/city/.*,^/assets/.*</conf.manage.excludes> | |
767 | - | |
768 | - <!-- 短信发送开关 --> | |
769 | - <sms.switch>true</sms.switch> | |
770 | - | |
771 | - <!-- passport 注册配置 --> | |
772 | - <passport.register.url>http://passport.api.nong12.com/api/register/register.html</passport.register.url> | |
773 | - <passport.interface.sign>TkdqQUhyUFprVGdJM2U3UzZvUWdrQjZwYnpibmRK</passport.interface.sign> | |
774 | - <passport.interface.pwd>nongfengwang</passport.interface.pwd> | |
775 | - | |
776 | - <!-- 店铺接口签名 --> | |
777 | - <manage.shopClient.sign>FzZGZxd2VycXdlYXNzZHZzdnp4Y3Z</manage.shopClient.sign> | |
778 | - | |
779 | - <!-- MQ --> | |
780 | - <conf.mq.namesrvAddr>192.168.28.34:9876;192.168.28.35:9876</conf.mq.namesrvAddr> | |
781 | - <conf.mq.producerGroup>manweb_change</conf.mq.producerGroup> | |
782 | - | |
783 | - <!-- 物流 --> | |
784 | - <wl.url>http://wl.nong12.com/</wl.url> | |
785 | - <wl.sign>TqExJO5spMVhZLvr17FBR1MlNvMOc</wl.sign> | |
786 | - | |
787 | - </properties> | |
788 | - </profile> | |
789 | - | |
790 | - <profile> | |
791 | - <id>pnr-clone</id> | |
792 | - <properties> | |
793 | - <!-- 显示模板 --> | |
794 | - <project.view.VMDefault>layout/default_content</project.view.VMDefault> | |
795 | - | |
796 | - <!-- redis 配置 --> | |
797 | - <project.redis.host1>10.28.5.200</project.redis.host1> | |
798 | - <project.redis.port1>6379</project.redis.port1> | |
799 | - | |
800 | - <!-- 商品详情链接地址 --> | |
801 | - <project.product.detail.path>http://www.nong12.com/product/</project.product.detail.path> | |
802 | - | |
803 | - <!-- 后台默认静态资源地址 --> | |
804 | - <project.default.assets.path>http://static.nong12.com/static/ace1.3/assets</project.default.assets.path> | |
805 | - | |
806 | - <!-- 公共样式引用 --> | |
807 | - <project.default.assets.common.path>http://static.nong12.com/static/</project.default.assets.common.path> | |
808 | - | |
809 | - <!-- 本地资源地址 --> | |
810 | - <project.default.local.path>/</project.default.local.path> | |
811 | - | |
812 | - <!-- 店铺域名 --> | |
813 | - <project.shop.domain>http://shop.nong12.com</project.shop.domain> | |
814 | - | |
815 | - <!-- sms.webchina.cn 短信发送接口的配置 --> | |
816 | - <project.sms.webchina.SMSKey>2cf3264488ee3beef224</project.sms.webchina.SMSKey> | |
817 | - <project.sms.webchina.userName>itly</project.sms.webchina.userName> | |
818 | - <project.sms.webchina.postURL>http://gbk.sms.webchinese.cn</project.sms.webchina.postURL> | |
819 | - | |
820 | - <!-- interface user --> | |
821 | - <website.user.baseUrl>http://user.nong12.com</website.user.baseUrl> | |
822 | - <website.user.token>token</website.user.token> | |
823 | - | |
824 | - <!-- interface titan --> | |
825 | - <website.titan.accesskey>accesskey</website.titan.accesskey> | |
826 | - <website.titan.secretkey>secretkey</website.titan.secretkey> | |
827 | - | |
828 | - <!-- 登录拦截器开关 --> | |
829 | - <project.manger.enabled>true</project.manger.enabled> | |
830 | - | |
831 | - <!-- 图片服务器地址配置 --> | |
832 | - <project.image.server.domain>nong12.com</project.image.server.domain> | |
833 | - <project.image.server.host>http://upload.nong12.com</project.image.server.host> | |
834 | - | |
835 | - <!-- 数据库连接池配置文件 --> | |
836 | - <db.dbpool.jdbc.driver>org.mariadb.jdbc.Driver</db.dbpool.jdbc.driver> | |
837 | - <db.dbpool.jdbc.url>jdbc:mysql://10.28.5.201:3306/dili_website?useUnicode=true&characterEncoding=utf8</db.dbpool.jdbc.url> | |
838 | - <db.dbpool.jdbc.username>root</db.dbpool.jdbc.username> | |
839 | - <db.dbpool.jdbc.password>123456</db.dbpool.jdbc.password> | |
840 | - | |
841 | - <db.dbpool.init.initial.size>5</db.dbpool.init.initial.size> | |
842 | - <db.dbpool.init.min.idle>3</db.dbpool.init.min.idle> | |
843 | - <db.dbpool.init.max.active>5</db.dbpool.init.max.active> | |
844 | - | |
845 | - <db.dbpool.max.wait>60000</db.dbpool.max.wait> | |
846 | - <db.dbpool.time.between.millis>60000</db.dbpool.time.between.millis> | |
847 | - <db.dbpool.min.idle.time>300000</db.dbpool.min.idle.time> | |
848 | - | |
849 | - | |
850 | - <!--权限相关配置 --> | |
851 | - <conf.manage.enable>false</conf.manage.enable> | |
852 | - <conf.manage.spider>true</conf.manage.spider> | |
853 | - <conf.manage.system>manweb</conf.manage.system> | |
854 | - <conf.manage.domain>http://manage.nong12.com/</conf.manage.domain> | |
855 | - <conf.manage.includes>^/$,^$,^/.*\.do</conf.manage.includes> | |
856 | - <conf.manage.excludes>^/noAccess.do$,^/welcome.do$,^/loginControl/.*,^/api/.*,^/city/.*,^/assets/.*</conf.manage.excludes> | |
857 | - | |
858 | - <!-- 短信发送开关 --> | |
859 | - <sms.switch>false</sms.switch> | |
860 | - | |
861 | - <!-- passport 注册配置 --> | |
862 | - <passport.register.url>http://passport.api.nong12.com/api/register/register.html</passport.register.url> | |
863 | - <passport.interface.sign>MTIzNDU2Nzg5</passport.interface.sign> | |
864 | - <passport.interface.pwd>nongfengwang</passport.interface.pwd> | |
865 | - | |
866 | - <!-- 店铺接口签名 --> | |
867 | - <manage.shopClient.sign>FzZGZxd2VycXdlYXNzZHZzdnp4Y3Z</manage.shopClient.sign> | |
868 | - | |
869 | 107 | </properties> |
870 | 108 | </profile> |
871 | 109 | |
... | ... | @@ -890,18 +128,15 @@ |
890 | 128 | <dependency> |
891 | 129 | <groupId>com.b2c.website.web</groupId> |
892 | 130 | <artifactId>diligrp-website-api</artifactId> |
893 | - <version>1.0.2-SNAPSHOT</version> | |
131 | + <version>1.0.5-SNAPSHOT</version> | |
894 | 132 | </dependency> |
895 | 133 | <dependency> |
896 | 134 | <groupId>com.diligrp.store</groupId> |
897 | 135 | <artifactId>diligrp-store-sdk</artifactId> |
898 | 136 | <version>0.0.1-SNAPSHOT</version> |
899 | 137 | </dependency> |
900 | - <dependency> | |
901 | - <groupId>com.b2c</groupId> | |
902 | - <artifactId>passport-client</artifactId> | |
903 | - <version>0.0.10-SNAPSHOT</version> | |
904 | - </dependency> | |
138 | + <!-- <dependency> <groupId>com.b2c</groupId> <artifactId>passport-client</artifactId> | |
139 | + <version>0.0.10-SNAPSHOT</version> </dependency> --> | |
905 | 140 | |
906 | 141 | <!--<dependency> --> |
907 | 142 | <!--<groupId>com.diligrp.pnr.shop</groupId> --> | ... | ... |
diligrp-website-manweb/src/main/java/com/diligrp/website/manweb/controller/BatchRegister.java deleted
100644 → 0
1 | -package com.diligrp.website.manweb.controller; | |
2 | - | |
3 | -import java.io.IOException; | |
4 | -import java.io.PrintWriter; | |
5 | -import java.util.regex.Matcher; | |
6 | -import java.util.regex.Pattern; | |
7 | - | |
8 | -import javax.annotation.Resource; | |
9 | -import javax.servlet.http.HttpServletResponse; | |
10 | - | |
11 | -import org.apache.commons.lang.StringUtils; | |
12 | -import org.apache.http.HttpEntity; | |
13 | -import org.apache.http.HttpResponse; | |
14 | -import org.apache.http.client.ClientProtocolException; | |
15 | -import org.apache.http.client.methods.HttpPost; | |
16 | -import org.apache.http.entity.StringEntity; | |
17 | -import org.apache.http.util.EntityUtils; | |
18 | -import org.springframework.stereotype.Controller; | |
19 | -import org.springframework.web.bind.annotation.RequestMapping; | |
20 | -import org.springframework.web.bind.annotation.RequestParam; | |
21 | -import org.springframework.web.servlet.ModelAndView; | |
22 | - | |
23 | -import com.alibaba.fastjson.JSON; | |
24 | -import com.diligrp.website.domain.vo.RegResult; | |
25 | -import com.diligrp.website.util.http.HttpClientManager; | |
26 | -import com.diligrp.website.util.web.BaseController; | |
27 | - | |
28 | -/** | |
29 | - * 批量处理 | |
30 | - * @author Wang22 | |
31 | - * | |
32 | - */ | |
33 | -@Controller | |
34 | -@RequestMapping("batch") | |
35 | -public class BatchRegister extends BaseController { | |
36 | - | |
37 | - @Resource(name="passportRegUrl") | |
38 | - private String passportRegUrl; | |
39 | - | |
40 | - @Resource(name="passportRegSign") | |
41 | - private String passportRegSign; | |
42 | - | |
43 | - @Resource(name="passportRegPwd") | |
44 | - private String passportRegPwd; | |
45 | - | |
46 | - private static Pattern MOBILE_PATTERN = Pattern.compile("^1(3[0-9]|5[0-3]|45|47|5[5-9]|8[0-9]|70|7[6-8])\\d{8}$"); | |
47 | - | |
48 | - @RequestMapping("register") | |
49 | - public ModelAndView register() { | |
50 | - | |
51 | - return toVM("batch/register"); | |
52 | - } | |
53 | - | |
54 | - /** | |
55 | - * 批量注册 | |
56 | - * @throws IOException | |
57 | - * @throws InterruptedException | |
58 | - */ | |
59 | - @RequestMapping("doRegister") | |
60 | - public void doRegister(@RequestParam("mobiles") String mobiles, HttpServletResponse resp) throws IOException, InterruptedException { | |
61 | - PrintWriter out = resp.getWriter(); | |
62 | - if(StringUtils.isEmpty(mobiles)){ | |
63 | - out.println("手机号码为空,无法注册"); | |
64 | - out.flush(); | |
65 | - out.close(); | |
66 | - return ; | |
67 | - } | |
68 | - String[] mobs = mobiles.replace(",,", ",").split(","); | |
69 | - for (String m : mobs) { | |
70 | - Matcher mat = MOBILE_PATTERN.matcher(m); | |
71 | - if (mat.matches()) { | |
72 | - String json = reg(m, passportRegPwd); | |
73 | - RegResult rst = JSON.parseObject(json, RegResult.class); | |
74 | - if (rst.getCode() == RegResult.SUCCESS) { | |
75 | - out.println(m + " - 注册成功"); | |
76 | - } else if (rst.getCode() == RegResult.REGISTERD) { | |
77 | - out.println(m + " - 号码已被注册,无法完成注册"); | |
78 | - } else { | |
79 | - out.println(m + " - " + rst.getCode() + " " + rst.getMsg()); | |
80 | - } | |
81 | - | |
82 | - } else { | |
83 | - out.println(m + " - 不是正确的手机号码,无法注册"); | |
84 | - } | |
85 | - // 停顿20毫秒,避免连接暴增 | |
86 | - Thread.sleep(20); | |
87 | - } | |
88 | - out.flush(); | |
89 | - out.close(); | |
90 | - } | |
91 | - | |
92 | - public String reg(String mobile,String pwd) throws ClientProtocolException, IOException { | |
93 | - HttpPost post = new HttpPost(passportRegUrl); | |
94 | - post.setHeader("sign", passportRegSign); | |
95 | - | |
96 | - // modify 2015-07-29 wzp : 将注册来源修改为6(批量注册) | |
97 | - String json = "{\"mobile\": \"" + mobile + "\",\"password\": \"" + pwd + "\",\"userType\":1,\"source\":6}"; | |
98 | - | |
99 | - StringEntity bodyEntity = new StringEntity(json, "utf-8"); | |
100 | - bodyEntity.setContentType("application/json"); | |
101 | - | |
102 | - post.setEntity(bodyEntity); | |
103 | - | |
104 | - HttpResponse response = HttpClientManager.getHttpClient().execute(post); | |
105 | - if (response.getStatusLine().getStatusCode() != 200) { | |
106 | - HttpEntity entity = response.getEntity(); | |
107 | - String result = EntityUtils.toString(entity); | |
108 | - System.out.println("接口调用失败:" + result); | |
109 | - throw new IllegalStateException(response.getStatusLine().toString()); | |
110 | - } | |
111 | - HttpEntity entity = response.getEntity(); | |
112 | - String result = EntityUtils.toString(entity); | |
113 | - post.releaseConnection(); | |
114 | - return result; | |
115 | - } | |
116 | -} |
diligrp-website-manweb/src/main/java/com/diligrp/website/manweb/controller/CityController.java
... | ... | @@ -20,16 +20,17 @@ import com.diligrp.website.domain.DataDictionaryValue; |
20 | 20 | import com.diligrp.website.service.CityService; |
21 | 21 | import com.diligrp.website.service.DataDictionaryService; |
22 | 22 | import com.diligrp.website.util.domain.Result; |
23 | -import com.diligrp.website.util.hbase.HBaseUtils; | |
24 | 23 | import com.diligrp.website.util.web.BaseController; |
25 | 24 | import com.diligrp.website.web.interfaces.domain.output.CityResp; |
26 | 25 | |
27 | 26 | /** |
28 | 27 | * |
29 | 28 | * <B>Description</B> 城市级联 <br /> |
30 | - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> | |
29 | + * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. | |
30 | + * <br /> | |
31 | 31 | * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> |
32 | 32 | * <B>Company</B> 地利集团 |
33 | + * | |
33 | 34 | * @createTime 2014年5月14日 下午4:02:52 |
34 | 35 | * @author Wang22 |
35 | 36 | */ |
... | ... | @@ -37,198 +38,167 @@ import com.diligrp.website.web.interfaces.domain.output.CityResp; |
37 | 38 | @RequestMapping("city") |
38 | 39 | public class CityController extends BaseController { |
39 | 40 | |
40 | - @Resource | |
41 | - private CityService cityService; | |
42 | - | |
43 | - @Resource | |
44 | - private HBaseUtils hbaseUtils; | |
45 | - | |
46 | - @Resource | |
47 | - private DataDictionaryService dataDictionaryService; | |
48 | - | |
49 | - private final static String COUNTRY_CODE = "DIC_COUNTRY"; | |
50 | - | |
51 | - @RequestMapping("getCityList") | |
52 | - public ModelAndView getCityList( | |
53 | - @RequestParam(value = "parentId", defaultValue = "0") int parentId) { | |
54 | - | |
55 | - Result rst = cityService.getCityListByParentId(parentId); | |
56 | - | |
57 | - if (rst.isSuccess()) { | |
58 | - return toVM("content/city", rst.getAllResult()); | |
59 | - } | |
60 | - return null; | |
61 | - | |
62 | - } | |
63 | - | |
64 | - @SuppressWarnings("unchecked") | |
65 | - @RequestMapping("getCityJsonList") | |
66 | - public void getCityJsonList( | |
67 | - @RequestParam(value = "parentId", defaultValue = "0") int parentId, | |
68 | - HttpServletResponse resp) { | |
69 | - | |
70 | - Result rst = cityService.getCityListByParentId(parentId); | |
71 | - | |
72 | - if (rst.isSuccess()) { | |
73 | - List<City> city = (List<City>) rst.getResult("city"); | |
74 | - writeJSON(resp, city); | |
75 | - } | |
76 | - | |
77 | - } | |
78 | - | |
79 | - @SuppressWarnings("unchecked") | |
80 | - @RequestMapping("getCityJsonpList") | |
81 | - public void getCityJsonpList( | |
82 | - @RequestParam(value = "parentId", defaultValue = "0") int parentId, | |
83 | - @RequestParam(value = "callback") String callback, | |
84 | - HttpServletResponse resp) { | |
85 | - | |
86 | - Result rst = cityService.getCityListByParentId(parentId); | |
87 | - | |
88 | - if (rst.isSuccess()) { | |
89 | - List<City> city = (List<City>) rst.getResult("city"); | |
90 | - String jsonData = JSON.toJSONString(city); | |
91 | - String json = callback + "(" + jsonData + ")"; | |
92 | - write(resp, json, "text/javascript;charset=utf-8"); | |
93 | - } | |
94 | - | |
95 | - } | |
96 | - | |
97 | - @SuppressWarnings("unchecked") | |
98 | - @RequestMapping("getParentCityJsonpList") | |
99 | - public void getParentCityJsonpList( | |
100 | - @RequestParam(value = "cityId", defaultValue = "1") int cityId, | |
101 | - @RequestParam(value = "callback") String callback, | |
102 | - HttpServletResponse resp) { | |
103 | - | |
104 | - Result rst = cityService.getCityList(cityId); | |
105 | - List<City> cityList = (List<City>) rst.getResult("city"); | |
106 | - String jsonData = JSON.toJSONString(cityList); | |
107 | - String json = callback + "(" + jsonData + ")"; | |
108 | - write(resp, json, "text/javascript;charset=utf-8"); | |
109 | - } | |
110 | - | |
111 | - @SuppressWarnings({ "unchecked", "rawtypes" }) | |
112 | - @RequestMapping("getCityInfo") | |
113 | - @ResponseBody | |
114 | - public List<City> getCityInfo( | |
115 | - @RequestParam(value = "parentId", defaultValue = "0") int parentId) { | |
116 | - Result rst = cityService.getCityListByParentId(parentId); | |
117 | - Map map = rst.getAllResult(); | |
118 | - List<City> list = (List<City>) map.get("city"); | |
119 | - return list; | |
120 | - } | |
121 | - | |
122 | - @SuppressWarnings("unchecked") | |
123 | - @RequestMapping("getCountryJsonpList") | |
124 | - public void getCountryJsonpList( | |
125 | - @RequestParam(value = "parentId", defaultValue = "0") int parentId, | |
126 | - @RequestParam(value = "callback") String callback, | |
127 | - HttpServletResponse response) { | |
128 | - | |
129 | - List<CityResp> cityOut = new ArrayList<CityResp>(); | |
130 | - if (parentId == 0) { | |
131 | - DataDictionary datad = dataDictionaryService.getDataDictionaryByCode(COUNTRY_CODE); | |
132 | - List<DataDictionaryValue> values = dataDictionaryService.getDataDictionaryValue(datad.getId()); | |
133 | - if (values.size() > 0) { | |
134 | - for (DataDictionaryValue c : values) { | |
135 | - CityResp resp = new CityResp(); | |
136 | - Integer code = 0 - Integer.parseInt(c.getCode()); | |
137 | - resp.setRegionId(code); | |
138 | - resp.setRegionName(c.getName()); | |
139 | - resp.setSort(c.getSort()); | |
140 | - resp.setParentId(-9999); | |
141 | - cityOut.add(resp); | |
142 | - } | |
143 | - } | |
144 | - } else if (parentId == -10) { | |
145 | - Result rst = cityService.getCityListByParentId(0); | |
146 | - List<City> cityList = (List<City>) rst.getResult("city"); | |
147 | - cityOut = convertCity2Output(cityList); | |
148 | - } else if (parentId > 0) { | |
149 | - Result rst = cityService.getCityListByParentId(parentId); | |
150 | - List<City> cityList = (List<City>) rst.getResult("city"); | |
151 | - cityOut = convertCity2Output(cityList); | |
152 | - } | |
153 | - String jsonData = JSON.toJSONString(cityOut); | |
154 | - String json = callback + "(" + jsonData + ")"; | |
155 | - write(response, json, "text/javascript;charset=utf-8"); | |
156 | - } | |
157 | - | |
158 | - private List<CityResp> convertCity2Output(List<City> cityList) { | |
159 | - List<CityResp> cityOut = null; | |
160 | - if (cityList == null) { | |
161 | - return cityOut; | |
162 | - } | |
163 | - cityOut = new ArrayList<CityResp>(); | |
164 | - for (City city : cityList) { | |
165 | - CityResp out = new CityResp(); | |
166 | - out.setRegionId(city.getRegionId()); | |
167 | - out.setRegionName(city.getRegionName()); | |
168 | - out.setLevel(city.getLevel()); | |
169 | - out.setParentId(city.getParentId()); | |
170 | - out.setSort(city.getSort()); | |
171 | - cityOut.add(out); | |
172 | - } | |
173 | - return cityOut; | |
174 | - } | |
175 | - | |
176 | - | |
177 | - @SuppressWarnings("unchecked") | |
178 | - @RequestMapping("getParentCountryJsonpList") | |
179 | - public void getParentCountryJsonp( @RequestParam(value = "cityId", defaultValue = "0") int cityId, | |
180 | - @RequestParam(value = "callback") String callback, | |
181 | - HttpServletResponse response){ | |
182 | - Result rst = cityService.getCityList(cityId); | |
183 | - if(cityId<0){ | |
184 | - List<CityResp> cityOut = new ArrayList<CityResp>(); | |
185 | - DataDictionary datad = dataDictionaryService | |
186 | - .getDataDictionaryByCode(COUNTRY_CODE); | |
187 | - List<DataDictionaryValue> values = dataDictionaryService | |
188 | - .getDataDictionaryValue(datad.getId()); | |
189 | - if (values.size() > 0) { | |
190 | - for (DataDictionaryValue c : values) { | |
191 | - CityResp resp = new CityResp(); | |
192 | - Integer code = 0 - Integer.parseInt(c.getCode()); | |
193 | - if( cityId==code){ | |
194 | - resp.setRegionId(code); | |
195 | - resp.setRegionName(c.getName()); | |
196 | - resp.setSort(c.getSort()); | |
197 | - resp.setParentId(-9999); | |
198 | - cityOut.add(resp); | |
199 | - String jsonData = JSON.toJSONString(cityOut); | |
200 | - String json = callback + "(" + jsonData + ")"; | |
201 | - write(response, json, "text/javascript;charset=utf-8"); | |
202 | - } | |
203 | - } | |
204 | - } | |
205 | - }else{ | |
206 | - City c= new City(); | |
207 | - c.setRegionId(-10); | |
208 | - c.setRegionName("中国"); | |
209 | - c.setSort(10); | |
210 | - List<City> cityList = (List<City>) rst.getResult("city"); | |
211 | - cityList.add(c); | |
212 | - List<CityResp> cityOut = convertCity2Output(cityList); | |
213 | - String jsonData = JSON.toJSONString(cityOut); | |
214 | - String json = callback + "(" + jsonData + ")"; | |
215 | - write(response, json, "text/javascript;charset=utf-8"); | |
216 | - } | |
217 | - | |
218 | - } | |
41 | + @Resource | |
42 | + private CityService cityService; | |
43 | + | |
44 | + @Resource | |
45 | + private DataDictionaryService dataDictionaryService; | |
46 | + | |
47 | + private final static String COUNTRY_CODE = "DIC_COUNTRY"; | |
48 | + | |
49 | + @RequestMapping("getCityList") | |
50 | + public ModelAndView getCityList(@RequestParam(value = "parentId", defaultValue = "0") int parentId) { | |
51 | + | |
52 | + Result rst = cityService.getCityListByParentId(parentId); | |
53 | + | |
54 | + if (rst.isSuccess()) { | |
55 | + return toVM("content/city", rst.getAllResult()); | |
56 | + } | |
57 | + return null; | |
58 | + | |
59 | + } | |
60 | + | |
61 | + @SuppressWarnings("unchecked") | |
62 | + @RequestMapping("getCityJsonList") | |
63 | + public void getCityJsonList(@RequestParam(value = "parentId", defaultValue = "0") int parentId, | |
64 | + HttpServletResponse resp) { | |
65 | + | |
66 | + Result rst = cityService.getCityListByParentId(parentId); | |
67 | + | |
68 | + if (rst.isSuccess()) { | |
69 | + List<City> city = (List<City>) rst.getResult("city"); | |
70 | + writeJSON(resp, city); | |
71 | + } | |
72 | + | |
73 | + } | |
74 | + | |
75 | + @SuppressWarnings("unchecked") | |
76 | + @RequestMapping("getCityJsonpList") | |
77 | + public void getCityJsonpList(@RequestParam(value = "parentId", defaultValue = "0") int parentId, | |
78 | + @RequestParam(value = "callback") String callback, HttpServletResponse resp) { | |
79 | + | |
80 | + Result rst = cityService.getCityListByParentId(parentId); | |
81 | + | |
82 | + if (rst.isSuccess()) { | |
83 | + List<City> city = (List<City>) rst.getResult("city"); | |
84 | + String jsonData = JSON.toJSONString(city); | |
85 | + String json = callback + "(" + jsonData + ")"; | |
86 | + write(resp, json, "text/javascript;charset=utf-8"); | |
87 | + } | |
88 | + | |
89 | + } | |
90 | + | |
91 | + @SuppressWarnings("unchecked") | |
92 | + @RequestMapping("getParentCityJsonpList") | |
93 | + public void getParentCityJsonpList(@RequestParam(value = "cityId", defaultValue = "1") int cityId, | |
94 | + @RequestParam(value = "callback") String callback, HttpServletResponse resp) { | |
95 | + | |
96 | + Result rst = cityService.getCityList(cityId); | |
97 | + List<City> cityList = (List<City>) rst.getResult("city"); | |
98 | + String jsonData = JSON.toJSONString(cityList); | |
99 | + String json = callback + "(" + jsonData + ")"; | |
100 | + write(resp, json, "text/javascript;charset=utf-8"); | |
101 | + } | |
102 | + | |
103 | + @SuppressWarnings({ "unchecked", "rawtypes" }) | |
104 | + @RequestMapping("getCityInfo") | |
105 | + @ResponseBody | |
106 | + public List<City> getCityInfo(@RequestParam(value = "parentId", defaultValue = "0") int parentId) { | |
107 | + Result rst = cityService.getCityListByParentId(parentId); | |
108 | + Map map = rst.getAllResult(); | |
109 | + List<City> list = (List<City>) map.get("city"); | |
110 | + return list; | |
111 | + } | |
112 | + | |
113 | + @SuppressWarnings("unchecked") | |
114 | + @RequestMapping("getCountryJsonpList") | |
115 | + public void getCountryJsonpList(@RequestParam(value = "parentId", defaultValue = "0") int parentId, | |
116 | + @RequestParam(value = "callback") String callback, HttpServletResponse response) { | |
117 | + | |
118 | + List<CityResp> cityOut = new ArrayList<CityResp>(); | |
119 | + if (parentId == 0) { | |
120 | + DataDictionary datad = dataDictionaryService.getDataDictionaryByCode(COUNTRY_CODE); | |
121 | + List<DataDictionaryValue> values = dataDictionaryService.getDataDictionaryValue(datad.getId()); | |
122 | + if (values.size() > 0) { | |
123 | + for (DataDictionaryValue c : values) { | |
124 | + CityResp resp = new CityResp(); | |
125 | + Integer code = 0 - Integer.parseInt(c.getCode()); | |
126 | + resp.setRegionId(code); | |
127 | + resp.setRegionName(c.getName()); | |
128 | + resp.setSort(c.getSort()); | |
129 | + resp.setParentId(-9999); | |
130 | + cityOut.add(resp); | |
131 | + } | |
132 | + } | |
133 | + } else if (parentId == -10) { | |
134 | + Result rst = cityService.getCityListByParentId(0); | |
135 | + List<City> cityList = (List<City>) rst.getResult("city"); | |
136 | + cityOut = convertCity2Output(cityList); | |
137 | + } else if (parentId > 0) { | |
138 | + Result rst = cityService.getCityListByParentId(parentId); | |
139 | + List<City> cityList = (List<City>) rst.getResult("city"); | |
140 | + cityOut = convertCity2Output(cityList); | |
141 | + } | |
142 | + String jsonData = JSON.toJSONString(cityOut); | |
143 | + String json = callback + "(" + jsonData + ")"; | |
144 | + write(response, json, "text/javascript;charset=utf-8"); | |
145 | + } | |
146 | + | |
147 | + private List<CityResp> convertCity2Output(List<City> cityList) { | |
148 | + List<CityResp> cityOut = null; | |
149 | + if (cityList == null) { | |
150 | + return cityOut; | |
151 | + } | |
152 | + cityOut = new ArrayList<CityResp>(); | |
153 | + for (City city : cityList) { | |
154 | + CityResp out = new CityResp(); | |
155 | + out.setRegionId(city.getRegionId()); | |
156 | + out.setRegionName(city.getRegionName()); | |
157 | + out.setLevel(city.getLevel()); | |
158 | + out.setParentId(city.getParentId()); | |
159 | + out.setSort(city.getSort()); | |
160 | + cityOut.add(out); | |
161 | + } | |
162 | + return cityOut; | |
163 | + } | |
164 | + | |
165 | + @SuppressWarnings("unchecked") | |
166 | + @RequestMapping("getParentCountryJsonpList") | |
167 | + public void getParentCountryJsonp(@RequestParam(value = "cityId", defaultValue = "0") int cityId, | |
168 | + @RequestParam(value = "callback") String callback, HttpServletResponse response) { | |
169 | + Result rst = cityService.getCityList(cityId); | |
170 | + if (cityId < 0) { | |
171 | + List<CityResp> cityOut = new ArrayList<CityResp>(); | |
172 | + DataDictionary datad = dataDictionaryService.getDataDictionaryByCode(COUNTRY_CODE); | |
173 | + List<DataDictionaryValue> values = dataDictionaryService.getDataDictionaryValue(datad.getId()); | |
174 | + if (values.size() > 0) { | |
175 | + for (DataDictionaryValue c : values) { | |
176 | + CityResp resp = new CityResp(); | |
177 | + Integer code = 0 - Integer.parseInt(c.getCode()); | |
178 | + if (cityId == code) { | |
179 | + resp.setRegionId(code); | |
180 | + resp.setRegionName(c.getName()); | |
181 | + resp.setSort(c.getSort()); | |
182 | + resp.setParentId(-9999); | |
183 | + cityOut.add(resp); | |
184 | + String jsonData = JSON.toJSONString(cityOut); | |
185 | + String json = callback + "(" + jsonData + ")"; | |
186 | + write(response, json, "text/javascript;charset=utf-8"); | |
187 | + } | |
188 | + } | |
189 | + } | |
190 | + } else { | |
191 | + City c = new City(); | |
192 | + c.setRegionId(-10); | |
193 | + c.setRegionName("中国"); | |
194 | + c.setSort(10); | |
195 | + List<City> cityList = (List<City>) rst.getResult("city"); | |
196 | + cityList.add(c); | |
197 | + List<CityResp> cityOut = convertCity2Output(cityList); | |
198 | + String jsonData = JSON.toJSONString(cityOut); | |
199 | + String json = callback + "(" + jsonData + ")"; | |
200 | + write(response, json, "text/javascript;charset=utf-8"); | |
201 | + } | |
202 | + | |
203 | + } | |
219 | 204 | } |
220 | - | |
221 | - | |
222 | - | |
223 | - | |
224 | - | |
225 | - | |
226 | - | |
227 | - | |
228 | - | |
229 | - | |
230 | - | |
231 | - | |
232 | - | |
233 | - | |
234 | - | ... | ... |
diligrp-website-manweb/src/main/java/com/diligrp/website/manweb/controller/MailController.java deleted
100644 → 0
1 | -package com.diligrp.website.manweb.controller; | |
2 | - | |
3 | -import javax.annotation.Resource; | |
4 | - | |
5 | -import org.springframework.stereotype.Controller; | |
6 | -import org.springframework.web.bind.annotation.RequestMapping; | |
7 | -import org.springframework.web.servlet.ModelAndView; | |
8 | - | |
9 | -import com.diligrp.website.service.MailService; | |
10 | -import com.diligrp.website.util.dao.BaseQuery; | |
11 | -import com.diligrp.website.util.web.BaseController; | |
12 | -import com.diligrp.website.util.web.PageTemplate; | |
13 | - | |
14 | -/** | |
15 | - * | |
16 | - * <B>Description</B> 邮件服务 <br /> | |
17 | - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> | |
18 | - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> | |
19 | - * <B>Company</B> 地利集团 | |
20 | - * @createTime 2014年6月3日 下午3:22:15 | |
21 | - * @author Wang22 | |
22 | - */ | |
23 | -@Controller | |
24 | -@RequestMapping("mail") | |
25 | -public class MailController extends BaseController { | |
26 | - | |
27 | - @Resource | |
28 | - private MailService mailService; | |
29 | - | |
30 | - @RequestMapping("list") | |
31 | - public ModelAndView list(BaseQuery query){ | |
32 | - PageTemplate page = mailService.queryMail(query); | |
33 | - return toVM("mail/list",page); | |
34 | - } | |
35 | - | |
36 | -} |
diligrp-website-manweb/src/main/java/com/diligrp/website/manweb/controller/MemberCenterAuthenController.java deleted
100644 → 0
1 | -package com.diligrp.website.manweb.controller; | |
2 | - | |
3 | -import org.springframework.stereotype.Controller; | |
4 | -import org.springframework.web.bind.annotation.RequestMapping; | |
5 | - | |
6 | -import com.diligrp.website.util.web.BaseController; | |
7 | - | |
8 | -/** | |
9 | - * <B>Description</B> <br /> | |
10 | - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> | |
11 | - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> | |
12 | - * <B>Company</B> 地利集团 | |
13 | - * @createTime 2014年6月20日 下午2:03:54 | |
14 | - * @author liujie | |
15 | - */ | |
16 | -@Controller | |
17 | -@RequestMapping("memberCenterAuthen") | |
18 | -public class MemberCenterAuthenController extends BaseController { | |
19 | - | |
20 | -// @Resource | |
21 | -// private MemberCenterAuthenService memberCenterAuthenService; | |
22 | -// @Resource | |
23 | -// private OperateLogService operateLogService; | |
24 | -// @Resource | |
25 | -// private OperateLog operateLog; | |
26 | -// private static Map<Integer, String> typeMap = new HashMap<Integer, String>(); | |
27 | -// private static Map<Integer, String> statusMap = new HashMap<Integer, String>(); | |
28 | -// static { | |
29 | -// typeMap.put(0, "全部 "); | |
30 | -// typeMap.put(1, "实名认证 "); | |
31 | -// typeMap.put(2, "企业认证"); | |
32 | -// statusMap.put(0, "全部 "); | |
33 | -// statusMap.put(2, "审核中"); | |
34 | -// statusMap.put(1, "审核通过 "); | |
35 | -// statusMap.put(3, "审核未通过 "); | |
36 | -// } | |
37 | -// /** | |
38 | -// * | |
39 | -// * this method is 查询认证管理列表信息 | |
40 | -// * @param request | |
41 | -// * @param bq | |
42 | -// * @param model | |
43 | -// * @return | |
44 | -// * @createTime 2014年6月20日 下午6:19:53 | |
45 | -// * @author liujie | |
46 | -// */ | |
47 | -// @RequestMapping(value = "list") | |
48 | -// public ModelAndView list(HttpServletRequest request, BaseQuery bq, | |
49 | -// Model model) { | |
50 | -// Map<String,String> map= bq.getParam(); | |
51 | -// if(!map.isEmpty()){ | |
52 | -// if(map.get("state").equals("0")){ | |
53 | -// map.put("state", ""); | |
54 | -// } | |
55 | -// if(map.get("userType").equals("0")){ | |
56 | -// map.put("userType", ""); | |
57 | -// } | |
58 | -// bq.setParam(map); | |
59 | -// } | |
60 | -// // 获取界面参数 | |
61 | -// PageTemplate page = memberCenterAuthenService.getAuthenInfo(bq); | |
62 | -// if(page == null){ | |
63 | -// page = PageTemplate.create(bq, 0, null); | |
64 | -// } | |
65 | -// model.addAttribute("typeMap", typeMap); | |
66 | -// model.addAttribute("statusMap", statusMap); | |
67 | -// model.addAttribute("page", page); | |
68 | -// model.addAttribute("param", bq.getParam()); | |
69 | -// return toVM("member/authenList", model); | |
70 | -// } | |
71 | -// | |
72 | -// /** | |
73 | -// * this method is 获取条件查询输入参数 | |
74 | -// * @return | |
75 | -// * @createTime 2014年6月20日 下午2:33:23 | |
76 | -// * @author liujie | |
77 | -// */ | |
78 | -// /*private Map<String, String> getArguments(HttpServletRequest request) { | |
79 | -// String authenId = request.getParameter("authenId"); | |
80 | -// String accountName = request.getParameter("accountName"); | |
81 | -// String startTime = request.getParameter("startTime"); | |
82 | -// String endTime = request.getParameter("endTime"); | |
83 | -// String userType = request.getParameter("userType"); | |
84 | -// String state = request.getParameter("state"); | |
85 | -// Map<String, String> map = new HashMap<String, String>(); | |
86 | -// map.put("authenticationStateId", authenId); | |
87 | -// map.put("realName", accountName); | |
88 | -// map.put("state", state); | |
89 | -// map.put("userType", userType); | |
90 | -// map.put("startSubmitTime", startTime); | |
91 | -// map.put("endSubmitTime", endTime); | |
92 | -// return map; | |
93 | -// }*/ | |
94 | -// /** | |
95 | -// * | |
96 | -// * this method is 获取认证管理详细信息 | |
97 | -// * @param authenId | |
98 | -// * @param userType | |
99 | -// * @param applyTime | |
100 | -// * @param account | |
101 | -// * @param model | |
102 | -// * @return | |
103 | -// * @createTime 2014年6月20日 下午6:20:30 | |
104 | -// * @author liujie | |
105 | -// */ | |
106 | -// @RequestMapping(value = "getAuthenInfo") | |
107 | -// public ModelAndView getAuthenInfo(@RequestParam("authenId") Long authenId,@RequestParam("userId") Long userId, | |
108 | -// @RequestParam("userType") Long userType, Model model) { | |
109 | -// | |
110 | -// List<OperateLog> log = operateLogService.getOperateLog(userId,StateTypesUtil.authenManagerType); | |
111 | -// if(log.size()>0){ | |
112 | -// model.addAttribute("operateLog", log.get(0)); | |
113 | -// } | |
114 | -// if (userType == 1) { | |
115 | -// UserExtension user = memberCenterAuthenService | |
116 | -// .getUserInfoById(userId); | |
117 | -// model.addAttribute("authen", user); | |
118 | -// return toVM("member/showAuthen", model); | |
119 | -// }else{ | |
120 | -// EnterpriseInfo enterpriseInfo = memberCenterAuthenService.getEnterpriseInfoById(userId); | |
121 | -// model.addAttribute("authen", enterpriseInfo); | |
122 | -// System.out.println(enterpriseInfo); | |
123 | -// return toVM("member/showCompany", model); | |
124 | -// } | |
125 | -// | |
126 | -// | |
127 | -// } | |
128 | -// @RequestMapping(value = "approveAuthenInfo") | |
129 | -// @ResponseBody | |
130 | -// public boolean approveAuthen(@RequestParam("userId") Long userId, | |
131 | -// @RequestParam("userType") Integer userType, | |
132 | -// @RequestParam("authState") Integer authState, | |
133 | -// @RequestParam("auditReson") String auditReson){ | |
134 | -// boolean flag = false; | |
135 | -// SessionContext session = SessionContext.getSessionContext(); | |
136 | -// UserTicket user = session.getUserTicket(); | |
137 | -// if(authState==3&&StringUtils.isBlank(auditReson)){ | |
138 | -// return false; | |
139 | -// } | |
140 | -// if(auditReson.trim().length()>62){return false;} | |
141 | -// flag = memberCenterAuthenService.approveAuthen(userId, userType, authState, auditReson.trim(), user.getId()); | |
142 | -// if(flag){ | |
143 | -// operateLog.setOperateDataId(userId); | |
144 | -// operateLog.setOperateId(user.getId()); | |
145 | -// operateLog.setOperateRemark(auditReson.trim()); | |
146 | -// operateLog.setOperateType(StateTypesUtil.authenManagerType); | |
147 | -// operateLog.setOperateName(user.getRealName()); | |
148 | -// operateLogService.saveOperateLog(operateLog); | |
149 | -// } | |
150 | -// return flag; | |
151 | -// } | |
152 | -} |
diligrp-website-manweb/src/main/java/com/diligrp/website/manweb/controller/MemberController.java deleted
100644 → 0
1 | -package com.diligrp.website.manweb.controller; | |
2 | - | |
3 | -import java.text.ParseException; | |
4 | -import java.text.SimpleDateFormat; | |
5 | -import java.util.Calendar; | |
6 | -import java.util.Date; | |
7 | -import java.util.List; | |
8 | -import java.util.Map; | |
9 | - | |
10 | -import javax.annotation.Resource; | |
11 | -import javax.servlet.http.HttpServletResponse; | |
12 | - | |
13 | -import org.apache.commons.collections.MapUtils; | |
14 | -import org.apache.commons.lang3.StringUtils; | |
15 | -import org.springframework.beans.factory.annotation.Value; | |
16 | -import org.springframework.stereotype.Controller; | |
17 | -import org.springframework.web.bind.annotation.RequestMapping; | |
18 | -import org.springframework.web.bind.annotation.RequestParam; | |
19 | -import org.springframework.web.bind.annotation.ResponseBody; | |
20 | -import org.springframework.web.servlet.ModelAndView; | |
21 | - | |
22 | -import com.diligrp.log.util.LogData; | |
23 | -import com.diligrp.log.util.LogUtils; | |
24 | -import com.diligrp.manage.sdk.domain.UserTicket; | |
25 | -import com.diligrp.manage.sdk.session.SessionContext; | |
26 | -import com.diligrp.website.domain.AjaxResult; | |
27 | -import com.diligrp.website.service.MemberService; | |
28 | -import com.diligrp.website.util.dao.BaseQuery; | |
29 | -import com.diligrp.website.util.domain.Result; | |
30 | -import com.diligrp.website.util.format.MoneyUtils; | |
31 | -import com.diligrp.website.util.web.BaseController; | |
32 | -import com.diligrp.website.util.web.PageTemplate; | |
33 | -import com.google.common.collect.Maps; | |
34 | -import com.yqyw.user.rpc.client.domain.input.CreditLimitReq; | |
35 | -import com.yqyw.user.rpc.client.domain.input.LockMemberReq; | |
36 | -import com.yqyw.user.rpc.client.domain.output.DefaultResp; | |
37 | -import com.yqyw.user.rpc.client.domain.output.EnterpriseInfoResp; | |
38 | -import com.yqyw.user.rpc.client.domain.output.LockMemberResp; | |
39 | -import com.yqyw.user.rpc.client.domain.output.MemberCreditInfoResp; | |
40 | -import com.yqyw.user.rpc.client.domain.output.MemberCreditOptionLogResp; | |
41 | -import com.yqyw.user.rpc.client.domain.output.UserExtensionResp; | |
42 | -import com.yqyw.user.rpc.client.domain.output.UserInfoResp; | |
43 | - | |
44 | -/** | |
45 | - * | |
46 | - * <B>Description</B> 会员中心Controller <br /> | |
47 | - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. | |
48 | - * <br /> | |
49 | - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> | |
50 | - * <B>Company</B> 地利集团 | |
51 | - * | |
52 | - * @createTime 2014年6月12日 下午2:17:32 | |
53 | - * @author Wang22 | |
54 | - */ | |
55 | -@Controller | |
56 | -@RequestMapping("member") | |
57 | -public class MemberController extends BaseController { | |
58 | - | |
59 | - @Value("${project.system.domain}") | |
60 | - private String domain; | |
61 | - | |
62 | - @Resource | |
63 | - private MemberService memberService; | |
64 | - | |
65 | - private static final String permanent = "9999-MM-dd"; | |
66 | - | |
67 | - @RequestMapping("list") | |
68 | - public ModelAndView list(BaseQuery bq) { | |
69 | - PageTemplate page = memberService.query(bq); | |
70 | - Map<String, Object> param = Maps.newHashMap(); | |
71 | - param.put("model", page); | |
72 | - param.put("getLockUserFlag", | |
73 | - SessionContext.hasAccess("get", this.domain + "/member/getLockUser.do#getLockUser")); | |
74 | - param.put("lockUserFlag", SessionContext.hasAccess("get", this.domain + "/member/lockUser.do#lockUser")); | |
75 | - param.put("unlockUserFlag", SessionContext.hasAccess("get", this.domain + "/member/unlockUser.do#unlockUser")); | |
76 | - param.put("memberFavoriteFlag", | |
77 | - SessionContext.hasAccess("get", this.domain + "/member/memberFavorite.do#memberFavorite")); | |
78 | - return toVM("member/list", param); | |
79 | - } | |
80 | - | |
81 | - @RequestMapping("getLockUser") | |
82 | - public ModelAndView getLockUser(@RequestParam("uid") Long id, @RequestParam("accountName") String accountName) { | |
83 | - LockMemberResp resp = memberService.getLockUser(id); | |
84 | - Map<String, Object> param = Maps.newHashMap(); | |
85 | - param.put("model", resp); | |
86 | - param.put("accountName", accountName); | |
87 | - param.put("userId", id); | |
88 | - if (resp == null || !resp.getLockStatus().equals(1)) { | |
89 | - return toVM("member/lock", param); | |
90 | - } | |
91 | - // 计算时间差 | |
92 | - int day = dayDiff(resp.getStartLockTime(), resp.getEndLockTime()); | |
93 | - param.put("day", day); | |
94 | - return toVM("member/unlock", param); | |
95 | - } | |
96 | - | |
97 | - @RequestMapping("lockUser") | |
98 | - @ResponseBody | |
99 | - public AjaxResult lockUser(@RequestParam("date") String date, @RequestParam("reason") String reason, | |
100 | - @RequestParam("userId") Long userId, @RequestParam("accountName") String accountName) { | |
101 | - | |
102 | - Date curr = new Date(); | |
103 | - Date endDate = null; | |
104 | - int days = 0; | |
105 | - try { | |
106 | - if (!permanent.equals(date)) { | |
107 | - endDate = new SimpleDateFormat("yyyy-MM-dd").parse(date); | |
108 | - days = dayDiff(curr, endDate); | |
109 | - } | |
110 | - } catch (ParseException e) { | |
111 | - // 类型转换失败,调回列表页~! | |
112 | - return new AjaxResult(false, "类型转换失败,无法识别的日期类型!"); | |
113 | - } | |
114 | - | |
115 | - LockMemberReq req = new LockMemberReq(); | |
116 | - req.setLockType(LockMemberReq.LOCK_IS_LOCK); | |
117 | - req.setLockReason(reason); | |
118 | - req.setDays(days); | |
119 | - req.setUserId(userId); | |
120 | - SessionContext session = SessionContext.getSessionContext(); | |
121 | - UserTicket user = session.getUserTicket(); | |
122 | - req.setOperateId(user.getId()); | |
123 | - req.setOperateName(user.getRealName()); | |
124 | - | |
125 | - boolean flag = memberService.lockMember(req); | |
126 | - | |
127 | - AjaxResult result = null; | |
128 | - | |
129 | - if (flag) { | |
130 | - LogUtils.log(LogData.builder(user.getUserName(), "会员中心", userId + "").model("会员管理").operation("锁定") | |
131 | - .dataName(accountName).build()); | |
132 | - result = new AjaxResult(true, AjaxResult.MSG_SUCC); | |
133 | - } else { | |
134 | - result = new AjaxResult(false, "锁定用户失败"); | |
135 | - } | |
136 | - | |
137 | - return result; | |
138 | - } | |
139 | - | |
140 | - @RequestMapping("unlockUser") | |
141 | - @ResponseBody | |
142 | - public AjaxResult unlockUser(@RequestParam("userId") Long userId, @RequestParam("accountName") String accountName) { | |
143 | - if (userId == null || userId < 1) { | |
144 | - return new AjaxResult(false, "用户ID错误!"); | |
145 | - } | |
146 | - | |
147 | - LockMemberReq req = new LockMemberReq(); | |
148 | - req.setUserId(userId); | |
149 | - req.setLockType(LockMemberReq.LOCK_UNLOCK); | |
150 | - | |
151 | - SessionContext session = SessionContext.getSessionContext(); | |
152 | - UserTicket user = session.getUserTicket(); | |
153 | - req.setOperateId(user.getId()); | |
154 | - req.setOperateName(user.getRealName()); | |
155 | - | |
156 | - boolean flag = memberService.unlockMember(req); | |
157 | - | |
158 | - // ModelAndView model = null; | |
159 | - AjaxResult result = null; | |
160 | - | |
161 | - if (flag) { | |
162 | - result = new AjaxResult(true, AjaxResult.MSG_SUCC); | |
163 | - LogUtils.log(LogData.builder(user.getUserName(), "会员中心", userId + "").model("会员管理").operation("解锁") | |
164 | - .dataName(accountName).build()); | |
165 | - } else { | |
166 | - result = new AjaxResult(true, "解锁用户失败!"); | |
167 | - } | |
168 | - | |
169 | - return result; | |
170 | - } | |
171 | - | |
172 | - @RequestMapping("getCredit") | |
173 | - public ModelAndView getCredit(@RequestParam("uid") Long memberId) { | |
174 | - if (memberId == null || memberId < 0) { | |
175 | - return new ModelAndView("redirect:/member/list.do?succ=false"); | |
176 | - } | |
177 | - MemberCreditInfoResp infoResp = memberService.getCreditInfo(memberId); | |
178 | - // 接口数据异常 | |
179 | - if (infoResp != null && infoResp.getCode() == MemberCreditInfoResp.CODE_EXCEPTION) { | |
180 | - return new ModelAndView("redirect:/member/list.do?succ=false"); | |
181 | - } | |
182 | - List<MemberCreditOptionLogResp> logResp = memberService.getCreditHistory(memberId); | |
183 | - | |
184 | - String money = MoneyUtils.centToYuan(infoResp.getLimitValue()); | |
185 | - | |
186 | - Map<String, Object> param = Maps.newHashMap(); | |
187 | - param.put("info", infoResp); | |
188 | - param.put("log", logResp); | |
189 | - param.put("uid", memberId); | |
190 | - param.put("money", money); | |
191 | - | |
192 | - return toVM("member/credit", param); | |
193 | - } | |
194 | - | |
195 | - @RequestMapping("updateCreditLimit") | |
196 | - public ModelAndView updateCreditLimit(@RequestParam("uid") Long uid, @RequestParam("credit") String credit, | |
197 | - HttpServletResponse resp) { | |
198 | - | |
199 | - if (uid == null || uid < 0 || StringUtils.isEmpty(credit)) { | |
200 | - return new ModelAndView("redirect:/member/list.do?succ=false"); | |
201 | - } | |
202 | - | |
203 | - CreditLimitReq req = new CreditLimitReq(); | |
204 | - req.setCreditLimt(credit); | |
205 | - req.setMembeId(uid); | |
206 | - | |
207 | - SessionContext sessionContext = SessionContext.getSessionContext(); | |
208 | - UserTicket user = sessionContext.getUserTicket(); | |
209 | - if (user != null) { | |
210 | - req.setOpertorId(user.getId()); | |
211 | - req.setOpertorName(user.getUserName()); | |
212 | - } | |
213 | - | |
214 | - DefaultResp result = memberService.updateCreditLimit(req); | |
215 | - Map<String, Object> param = Maps.newHashMap(); | |
216 | - | |
217 | - param.put("result", result.getCode() == DefaultResp.CODE_SUCCESS); | |
218 | - writeJSON(resp, param); | |
219 | - | |
220 | - return null; | |
221 | - } | |
222 | - | |
223 | - @RequestMapping("memberInfo") | |
224 | - public ModelAndView memberInfo(@RequestParam("userId") Long uid) { | |
225 | - UserInfoResp userInfo = memberService.getMemberInfo(uid); | |
226 | - UserExtensionResp userExt = memberService.getMemberExtension(uid); | |
227 | - | |
228 | - Map<String, Object> param = Maps.newHashMap(); | |
229 | - param.put("model", userInfo); | |
230 | - param.put("userExt", userExt); | |
231 | - | |
232 | - if (userInfo.getUserType() == UserInfoResp.USER_TYPE_COMPANY) { | |
233 | - EnterpriseInfoResp enterResp = memberService.getEnterpriseByUserId(uid); | |
234 | - param.put("enter", enterResp); | |
235 | - } | |
236 | - | |
237 | - return toVM("member/memberInfo", param); | |
238 | - } | |
239 | - | |
240 | - @RequestMapping("memberFavorite") | |
241 | - public ModelAndView memberFavorite(@RequestParam("userId") Long uid, | |
242 | - @RequestParam(value = "dateType", defaultValue = "1") Integer type, | |
243 | - @RequestParam(value = "currPage", defaultValue = "0") Integer currPage, | |
244 | - @RequestParam(value = "pageSize", defaultValue = "20") Integer pageSize) { | |
245 | - | |
246 | - Result result = memberService.getMemberFavorite(uid, type, currPage, pageSize); | |
247 | - | |
248 | - Map<String, Object> param = result.getAllResult(); | |
249 | - | |
250 | - if (MapUtils.isEmpty(param)) { | |
251 | - param = Maps.newHashMap(); | |
252 | - param.put("type", type); | |
253 | - } | |
254 | - | |
255 | - return toVM("member/favorite", param); | |
256 | - } | |
257 | - | |
258 | - // @RequestMapping("memberBrowerHistory") | |
259 | - // public ModelAndView memberBrowerHistory( | |
260 | - // @RequestParam("userId") Long uid, | |
261 | - // @RequestParam(value = "dateType", defaultValue = "1") Integer type, | |
262 | - // @RequestParam(value = "currPage", defaultValue = "0") Integer currPage, | |
263 | - // @RequestParam(value = "pageSize", defaultValue = "20") Integer pageSize) | |
264 | - // { | |
265 | - // | |
266 | - // BaseQuery bq = new BaseQuery(); | |
267 | - // bq.setCurrPage(currPage); | |
268 | - // bq.setPageSize(pageSize); | |
269 | - // bq.addParam("userId", String.valueOf(uid)); | |
270 | - // | |
271 | - // Result result = memberService.historyList(type, uid, bq); | |
272 | - // | |
273 | - // return toVM("member/history", result.getAllResult()); | |
274 | - // } | |
275 | - | |
276 | - /** | |
277 | - * | |
278 | - * 计算时间差 | |
279 | - * | |
280 | - * @return | |
281 | - * @createTime 2014年6月20日 下午2:01:39 | |
282 | - * @author Wang22 | |
283 | - */ | |
284 | - private int dayDiff(Date start, Date end) { | |
285 | - if (start == null || end == null) { | |
286 | - return Integer.MAX_VALUE; | |
287 | - } | |
288 | - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | |
289 | - try { | |
290 | - start = sdf.parse(sdf.format(start)); | |
291 | - end = sdf.parse(sdf.format(end)); | |
292 | - } catch (ParseException e) { | |
293 | - return -1; | |
294 | - } | |
295 | - Calendar cal = Calendar.getInstance(); | |
296 | - cal.setTime(start); | |
297 | - long time1 = cal.getTimeInMillis(); | |
298 | - cal.setTime(end); | |
299 | - long time2 = cal.getTimeInMillis(); | |
300 | - long betweenDays = (time2 - time1) / (1000 * 3600 * 24); | |
301 | - | |
302 | - return Integer.parseInt(String.valueOf(betweenDays)); | |
303 | - } | |
304 | - | |
305 | -} |
diligrp-website-manweb/src/main/java/com/diligrp/website/manweb/controller/OpenShopApplyController.java deleted
100644 → 0
1 | -package com.diligrp.website.manweb.controller; | |
2 | - | |
3 | -import java.text.ParseException; | |
4 | -import java.text.SimpleDateFormat; | |
5 | -import java.util.ArrayList; | |
6 | -import java.util.HashMap; | |
7 | -import java.util.List; | |
8 | -import java.util.Map; | |
9 | - | |
10 | -import javax.annotation.Resource; | |
11 | -import javax.servlet.http.HttpServletRequest; | |
12 | -import javax.servlet.http.HttpServletResponse; | |
13 | - | |
14 | -import org.apache.commons.lang3.StringUtils; | |
15 | -import org.nutz.lang.meta.Pair; | |
16 | -import org.slf4j.Logger; | |
17 | -import org.slf4j.LoggerFactory; | |
18 | -import org.springframework.beans.factory.annotation.Value; | |
19 | -import org.springframework.stereotype.Controller; | |
20 | -import org.springframework.ui.Model; | |
21 | -import org.springframework.util.CollectionUtils; | |
22 | -import org.springframework.web.bind.annotation.RequestMapping; | |
23 | -import org.springframework.web.bind.annotation.RequestParam; | |
24 | -import org.springframework.web.bind.annotation.ResponseBody; | |
25 | -import org.springframework.web.servlet.ModelAndView; | |
26 | - | |
27 | -import com.diligrp.log.util.LogData; | |
28 | -import com.diligrp.log.util.LogUtils; | |
29 | -import com.diligrp.manage.sdk.domain.UserTicket; | |
30 | -import com.diligrp.manage.sdk.session.SessionContext; | |
31 | -import com.diligrp.pnr.sdk.domain.Shop; | |
32 | -import com.diligrp.titan.sdk.domain.Category; | |
33 | -import com.diligrp.website.domain.City; | |
34 | -import com.diligrp.website.domain.DataDictionary; | |
35 | -import com.diligrp.website.domain.DataDictionaryValue; | |
36 | -import com.diligrp.website.domain.OperateLog; | |
37 | -import com.diligrp.website.domain.PickUpPointDomain; | |
38 | -import com.diligrp.website.manweb.utils.StateTypesUtil; | |
39 | -import com.diligrp.website.manweb.utils.WebUtils; | |
40 | -import com.diligrp.website.rpc.ProductRPCService; | |
41 | -import com.diligrp.website.service.CityService; | |
42 | -import com.diligrp.website.service.DataDictionaryService; | |
43 | -import com.diligrp.website.service.OpenShopApplyService; | |
44 | -import com.diligrp.website.service.OperateLogService; | |
45 | -import com.diligrp.website.service.PickUpPointService; | |
46 | -import com.diligrp.website.service.ShopCloseHistoryService; | |
47 | -import com.diligrp.website.util.dao.BaseQuery; | |
48 | -import com.diligrp.website.util.domain.Result; | |
49 | -import com.diligrp.website.util.web.BaseController; | |
50 | -import com.diligrp.website.util.web.PageTemplate; | |
51 | -import com.google.common.collect.Maps; | |
52 | -import com.yqyw.user.rpc.client.domain.output.MemberQueryResp; | |
53 | - | |
54 | -/** | |
55 | - * <B>Description</B> TODO <br /> | |
56 | - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. | |
57 | - * <br /> | |
58 | - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> | |
59 | - * <B>Company</B> 地利集团 | |
60 | - * | |
61 | - * @author liujie | |
62 | - * @createTime 2014年6月4日 上午11:57:51 | |
63 | - */ | |
64 | -@Controller | |
65 | -@RequestMapping("openStore") | |
66 | -public class OpenShopApplyController extends BaseController { | |
67 | - private static final Logger logger = LoggerFactory.getLogger(OpenShopApplyController.class); | |
68 | - | |
69 | - private static Map<Integer, String> typeMap = new HashMap<Integer, String>(); | |
70 | - | |
71 | - static { | |
72 | - typeMap.put(0, "全部 "); | |
73 | - typeMap.put(1, "待审核"); | |
74 | - typeMap.put(2, "审核通过 "); | |
75 | - typeMap.put(3, "审核未通过"); | |
76 | - } | |
77 | - | |
78 | - @Value("${project.system.domain}") | |
79 | - private String domain; | |
80 | - @Resource | |
81 | - private OpenShopApplyService openShopApplyService; | |
82 | - @Resource | |
83 | - private OperateLogService operateLogService; | |
84 | - @Resource | |
85 | - private OperateLog operateLog; | |
86 | - @Resource | |
87 | - private DataDictionaryService dataDictionaryService; | |
88 | - @Resource | |
89 | - private CityService cityService; | |
90 | - @Resource | |
91 | - private PickUpPointService pickUpPointService; | |
92 | - @Resource | |
93 | - private ProductRPCService productRPCService; | |
94 | - @Resource | |
95 | - private ShopCloseHistoryService shopCloseHistoryService; | |
96 | - private static final String SHOP_SOURCE = "SHOP_SOURCE"; | |
97 | - | |
98 | - /** | |
99 | - * this method is 获取用户店铺信息列表 | |
100 | - * | |
101 | - * @param request | |
102 | - * @param bq | |
103 | - * @param model | |
104 | - * @return | |
105 | - * @createTime 2014年6月19日 下午3:50:03 | |
106 | - * @author liujie | |
107 | - */ | |
108 | - @RequestMapping(value = "list") | |
109 | - public ModelAndView list(HttpServletRequest request, BaseQuery bq, Model model) { | |
110 | - String shopId = request.getParameter("shopId"); | |
111 | - String shopName = request.getParameter("shopName"); | |
112 | - String telephone = request.getParameter("telephone"); | |
113 | - String stateStr = request.getParameter("state"); | |
114 | - String accountName = request.getParameter("accountName"); | |
115 | - String startTimeStr = request.getParameter("startTime"); | |
116 | - String endTimeStr = request.getParameter("endTime"); | |
117 | - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | |
118 | - Long startTime = null; | |
119 | - Long endTime = null; | |
120 | - Integer state = null; | |
121 | - if (!StringUtils.isEmpty(startTimeStr)) { | |
122 | - try { | |
123 | - startTime = sdf.parse(startTimeStr + " " + "00:00:00").getTime(); | |
124 | - } catch (ParseException e) { | |
125 | - e.printStackTrace(); | |
126 | - } | |
127 | - } | |
128 | - if (!StringUtils.isEmpty(endTimeStr)) { | |
129 | - try { | |
130 | - endTime = sdf.parse(endTimeStr + " " + "23:59:59").getTime(); | |
131 | - } catch (ParseException e) { | |
132 | - e.printStackTrace(); | |
133 | - } | |
134 | - } | |
135 | - if (!StringUtils.isEmpty(stateStr)) { | |
136 | - state = Integer.parseInt(stateStr); | |
137 | - } | |
138 | - if ("0".equals(stateStr)) { | |
139 | - state = null; | |
140 | - } | |
141 | - SessionContext session = SessionContext.getSessionContext(); | |
142 | - // 获取指定数据权限的所有集合 | |
143 | - List<Pair<String>> cityIds = session.dataAuth("city"); | |
144 | - String cityId = ""; | |
145 | - if (cityIds != null && cityIds.size() > 0) { | |
146 | - for (int i = 0; i < cityIds.size(); i++) { | |
147 | - cityId += cityIds.get(i).getName() + ","; | |
148 | - } | |
149 | - cityId = cityId.substring(0, cityId.length() - 1); | |
150 | - if ("-1".equals(cityId)) { | |
151 | - cityId = null;// 查全部 | |
152 | - } | |
153 | - } else { | |
154 | - cityId = "-1";// 无权限 | |
155 | - } | |
156 | - DataDictionary dd = this.dataDictionaryService.getDataDictionaryByCode(SHOP_SOURCE); | |
157 | - List<DataDictionaryValue> ddValues = null; | |
158 | - if (dd != null) { | |
159 | - ddValues = this.dataDictionaryService.getDataDictionaryValue(dd.getId()); | |
160 | - } | |
161 | - String shopSource = ""; | |
162 | - if (ddValues != null && !CollectionUtils.isEmpty(ddValues)) { | |
163 | - for (int i = 0; i < ddValues.size(); i++) { | |
164 | - shopSource += ddValues.get(i).getCode() + ","; | |
165 | - } | |
166 | - shopSource = shopSource.substring(0, shopSource.length() - 1); | |
167 | - if ("-1".equals(shopSource)) { | |
168 | - shopSource = null;// 查全部 | |
169 | - } | |
170 | - } else { | |
171 | - shopSource = "-1";// 无权限 | |
172 | - } | |
173 | - PageTemplate page = openShopApplyService.getUserInfo(shopId, shopName, telephone, accountName, state, startTime, | |
174 | - endTime, bq.getCurrPage() + 1, bq.getPageSize(), cityId, shopSource); | |
175 | - model.addAttribute("page", page); | |
176 | - model.addAttribute("type", typeMap); | |
177 | - model.addAttribute("shopId", shopId); | |
178 | - model.addAttribute("shopName", shopName); | |
179 | - model.addAttribute("telephone", telephone); | |
180 | - model.addAttribute("accountName", accountName); | |
181 | - model.addAttribute("startTime", startTimeStr); | |
182 | - model.addAttribute("endTime", endTimeStr); | |
183 | - model.addAttribute("state", stateStr); | |
184 | - model.addAttribute("viewFlag", | |
185 | - SessionContext.hasAccess("get", this.domain + "/openStore/getShopInfo.do#getShopInfo")); | |
186 | - model.addAttribute("auditFlag", | |
187 | - SessionContext.hasAccess("get", this.domain + "/openStore/shopAudit.do#shopAudit")); | |
188 | - return toVM("authen/list", model); | |
189 | - } | |
190 | - | |
191 | - /** | |
192 | - * this method is 获取用户店铺详细信息 | |
193 | - * | |
194 | - * @param userId | |
195 | - * @param shopId | |
196 | - * @param model | |
197 | - * @return | |
198 | - * @createTime 2014年6月19日 下午3:49:46 | |
199 | - * @author liujie | |
200 | - */ | |
201 | - @RequestMapping(value = "getShopInfo") | |
202 | - public ModelAndView getShopInfo(@RequestParam("userId") Long userId, @RequestParam("shopId") Long shopId, | |
203 | - Model model) { | |
204 | - Shop shop = openShopApplyService.getShopInfoByShopId(shopId); | |
205 | - if (shop != null) { | |
206 | - boolean flag1 = false; | |
207 | - boolean flag2 = false; | |
208 | - SessionContext session = SessionContext.getSessionContext(); | |
209 | - // 获取指定数据权限的所有集合 | |
210 | - List<Pair<String>> cityIds = session.dataAuth("city"); | |
211 | - if (cityIds != null && cityIds.size() > 0) { | |
212 | - for (int i = 0; i < cityIds.size(); i++) { | |
213 | - if ("-1".equals(cityIds.get(i).getName())) { | |
214 | - flag1 = true; | |
215 | - break; | |
216 | - } | |
217 | - if (cityIds.get(i).getName().equals(shop.getCityId().toString())) { | |
218 | - flag1 = true; | |
219 | - } | |
220 | - } | |
221 | - } | |
222 | - DataDictionary dd = this.dataDictionaryService.getDataDictionaryByCode(SHOP_SOURCE); | |
223 | - List<DataDictionaryValue> ddValues = null; | |
224 | - if (dd != null) { | |
225 | - ddValues = this.dataDictionaryService.getDataDictionaryValue(dd.getId()); | |
226 | - } | |
227 | - if (ddValues != null && !CollectionUtils.isEmpty(ddValues)) { | |
228 | - for (int i = 0; i < ddValues.size(); i++) { | |
229 | - if ("-1".equals(ddValues.get(i).getCode())) { | |
230 | - flag2 = true; | |
231 | - break; | |
232 | - } | |
233 | - if (ddValues.get(i).getCode().equals(shop.getShopSource().toString())) { | |
234 | - flag2 = true; | |
235 | - } | |
236 | - } | |
237 | - } | |
238 | - if (flag1 == false || flag2 == false) { | |
239 | - return new ModelAndView("redirect:/shop/list.do"); | |
240 | - } | |
241 | - // 1批发商户 2产地商户 3农户商户 4 零售商户 5代购商户 6物流商户 | |
242 | - if (shop.getShopSource() == 1 || shop.getShopSource() == 2 || shop.getShopSource() == 3 | |
243 | - || shop.getShopSource() == 4) { | |
244 | - // 经营类型 | |
245 | - DataDictionary dataDictionary = dataDictionaryService.getDataDictionaryByCode("SHOP_MANAGE_TYPE"); | |
246 | - if (dataDictionary != null) { | |
247 | - List<DataDictionaryValue> list = dataDictionaryService | |
248 | - .getDataDictionaryValue(dataDictionary.getId()); | |
249 | - if (list != null && list.size() > 0) { | |
250 | - for (int i = 0; i < list.size(); i++) { | |
251 | - DataDictionaryValue dataDictionaryValue = list.get(i); | |
252 | - if (dataDictionaryValue.getCode().equals(shop.getManageType().toString())) { | |
253 | - model.addAttribute("manageType", dataDictionaryValue.getName()); | |
254 | - break; | |
255 | - } | |
256 | - } | |
257 | - } | |
258 | - } | |
259 | - } | |
260 | - if (shop.getShopSource() == 1) { | |
261 | - // 店铺所在批发市场 | |
262 | - PickUpPointDomain pickUpPointDomain = pickUpPointService | |
263 | - .getPickUpPointDomainInfo(shop.getMarketId().longValue()); | |
264 | - if (pickUpPointDomain != null) { | |
265 | - model.addAttribute("pickName", pickUpPointDomain.getPickName()); | |
266 | - } | |
267 | - } | |
268 | - // 零售商户 | |
269 | - if (shop.getShopSource() == 4) { | |
270 | - // 店铺商户类型 | |
271 | - DataDictionary dataDictionary = dataDictionaryService.getDataDictionaryByCode("SHOP_MERCHANT_TYPE"); | |
272 | - if (dataDictionary != null) { | |
273 | - List<DataDictionaryValue> list = dataDictionaryService | |
274 | - .getDataDictionaryValue(dataDictionary.getId()); | |
275 | - if (list != null && list.size() > 0) { | |
276 | - for (int i = 0; i < list.size(); i++) { | |
277 | - DataDictionaryValue dataDictionaryValue = list.get(i); | |
278 | - if (dataDictionaryValue.getCode().equals(shop.getMerchantType().toString())) { | |
279 | - model.addAttribute("merchantType", dataDictionaryValue.getName()); | |
280 | - break; | |
281 | - } | |
282 | - } | |
283 | - } | |
284 | - } | |
285 | - } | |
286 | - // 代购商户 | |
287 | - if (shop.getShopSource() == 5) { | |
288 | - List<Long> buyAreaList = shop.getBuyArea(); | |
289 | - if (buyAreaList != null && buyAreaList.size() > 0) { | |
290 | - List cityAreaList = new ArrayList(); | |
291 | - for (int j = 0; j < buyAreaList.size(); j++) { | |
292 | - Long buyAreaId = buyAreaList.get(j); | |
293 | - // 代购辐射区域 | |
294 | - Result cityResult = cityService.getCityList(buyAreaId.intValue()); | |
295 | - List<City> cityList = (List) cityResult.getAllResult().get("city"); | |
296 | - if (cityList != null && cityList.size() > 0) { | |
297 | - String cityAreaP = ""; | |
298 | - String cityAreaC = ""; | |
299 | - String cityAreaA = ""; | |
300 | - for (int i = 0; i < cityList.size(); i++) { | |
301 | - City city = cityList.get(i); | |
302 | - if (city.getLevel() == 1) { | |
303 | - cityAreaP = city.getRegionName(); | |
304 | - } | |
305 | - if (city.getLevel() == 2) { | |
306 | - cityAreaC = city.getRegionName(); | |
307 | - } | |
308 | - if (city.getLevel() == 3) { | |
309 | - cityAreaA = city.getRegionName(); | |
310 | - } | |
311 | - } | |
312 | - String cityArea = cityAreaP + cityAreaC + cityAreaA; | |
313 | - cityAreaList.add(cityArea); | |
314 | - model.addAttribute("cityAreaList", cityAreaList); | |
315 | - } | |
316 | - } | |
317 | - } | |
318 | - // 代购品类 | |
319 | - List<Category> buyCategoryList = productRPCService.listCategoriesInfo(shop.getBuyCategory()); | |
320 | - model.addAttribute("buyCategoryList", buyCategoryList); | |
321 | - // 代购市场 | |
322 | - List<Long> buyMarketList = shop.getBuyMarket(); | |
323 | - if (buyMarketList != null && buyMarketList.size() > 0) { | |
324 | - List buyMarketNameList = new ArrayList(); | |
325 | - for (int k = 0; k < buyMarketList.size(); k++) { | |
326 | - PickUpPointDomain pickUpPointDomain = pickUpPointService | |
327 | - .getPickUpPointDomainInfo(buyMarketList.get(k)); | |
328 | - if (pickUpPointDomain != null) { | |
329 | - buyMarketNameList.add(pickUpPointDomain.getPickName()); | |
330 | - } | |
331 | - } | |
332 | - model.addAttribute("buyMarketNameList", buyMarketNameList); | |
333 | - } | |
334 | - } | |
335 | - // 物流商户 | |
336 | - if (shop.getShopSource() == 6) { | |
337 | - DataDictionary dataDictionary = dataDictionaryService.getDataDictionaryByCode("SHOP_LOGISTICS_TYPE_ID"); | |
338 | - if (dataDictionary != null) { | |
339 | - List<DataDictionaryValue> list = dataDictionaryService | |
340 | - .getDataDictionaryValue(dataDictionary.getId()); | |
341 | - if (list != null && list.size() > 0) { | |
342 | - for (int i = 0; i < list.size(); i++) { | |
343 | - DataDictionaryValue dataDictionaryValue = list.get(i); | |
344 | - if (shop.getLogisticsTypeId() != null | |
345 | - && dataDictionaryValue.getCode().equals(shop.getLogisticsTypeId().toString())) { | |
346 | - model.addAttribute("logistics", dataDictionaryValue.getName()); | |
347 | - break; | |
348 | - } | |
349 | - } | |
350 | - } | |
351 | - } | |
352 | - } | |
353 | - } | |
354 | - MemberQueryResp userAuth = openShopApplyService.getUserAuthInfo(userId); | |
355 | - List<OperateLog> log = operateLogService.getOperateLog(shopId, StateTypesUtil.shopAuthenTyupe); | |
356 | - if (log.size() > 0) { | |
357 | - model.addAttribute("operateLog", log.get(0)); | |
358 | - } | |
359 | - String detailAddress = ""; | |
360 | - String address = shop.getAddressText(); | |
361 | - DataDictionary dataDictionary = dataDictionaryService.getDataDictionaryByCode("DIC_SHOP_CHECK_REASON"); | |
362 | - List<DataDictionaryValue> list = dataDictionaryService.getDataDictionaryValue(dataDictionary.getId()); | |
363 | - if (!StringUtils.isBlank(address)) { | |
364 | - String addr[] = address.split("/"); | |
365 | - if (addr.length != 0) { | |
366 | - address = addr[0]; | |
367 | - if (addr.length > 1) { | |
368 | - detailAddress = addr[1]; | |
369 | - } | |
370 | - } | |
371 | - } | |
372 | - shop.setAddressText(address); | |
373 | - if (shop.getAddressId() != null) { | |
374 | - String countryAddress = cityService.getCountryAddress(Integer.parseInt(shop.getAddressId().toString())); | |
375 | - model.addAttribute("countryAddress", countryAddress); | |
376 | - } | |
377 | - model.addAttribute("shopInfo", shop); | |
378 | - model.addAttribute("userId", userId); | |
379 | - model.addAttribute("list", list); | |
380 | - model.addAttribute("detailAddress", detailAddress); | |
381 | - model.addAttribute("userAuth", userAuth); | |
382 | - return toVM("authen/show", model); | |
383 | - } | |
384 | - | |
385 | - /** | |
386 | - * this method is 审批用户开店申请信息 | |
387 | - * | |
388 | - * @param auditRemark | |
389 | - * @param shopState | |
390 | - * @param shopId | |
391 | - * @return | |
392 | - * @createTime 2014年6月19日 下午3:49:31 | |
393 | - * @author liujie | |
394 | - */ | |
395 | - @RequestMapping(value = "shopAudit") | |
396 | - @ResponseBody | |
397 | - public void shopAudit(@RequestParam("auditRemark") String auditRemark, @RequestParam("status") String shopState, | |
398 | - @RequestParam("shopName") String shopName, @RequestParam("shopId") Long shopId, HttpServletResponse resp) { | |
399 | - SessionContext session = SessionContext.getSessionContext(); | |
400 | - UserTicket user = session.getUserTicket(); | |
401 | - Shop shop = openShopApplyService.getShopInfoByShopId(shopId); | |
402 | - Map<String, Object> param = Maps.newHashMap(); | |
403 | - if (shop.getShopState() != 1) { | |
404 | - logger.info("该条记录已经被操作过了,不能再进行操作!"); | |
405 | - param.put("msg", "该条记录已经被操作过了,不能再进行操作!"); | |
406 | - writeJSON(resp, param); | |
407 | - return; | |
408 | - } | |
409 | - try { | |
410 | - if (auditRemark.trim().length() > 60) { | |
411 | - logger.info("审批用户描述信息超过指定字符串长度(60个)"); | |
412 | - param.put("msg", "审批用户描述信息超过指定字符串长度(60个)!"); | |
413 | - writeJSON(resp, param); | |
414 | - return; | |
415 | - } | |
416 | - logger.info("审批用户开店申请信息"); | |
417 | - boolean flag = openShopApplyService.shopAudit(shopId, auditRemark.trim(), Integer.parseInt(shopState)); | |
418 | - if (flag) { | |
419 | - if (shopState.equals("2")) { | |
420 | - LogUtils.log(LogData.builder(WebUtils.getCurrentUserName(), "会员中心", shopId + "").model("开店申请") | |
421 | - .operation("审核通过").dataName(shopName).build()); | |
422 | - } else { | |
423 | - BaseQuery bq = new BaseQuery(); | |
424 | - bq.addParam("shopId", shopId + ""); | |
425 | - bq.addParam("state", "2"); | |
426 | - bq.addParam("closeType", "4"); | |
427 | - PageTemplate pageTemplate = shopCloseHistoryService.getShopCloseHistoryList(bq); | |
428 | - if (pageTemplate != null) { | |
429 | - if (pageTemplate.getList() != null && pageTemplate.getList().size() > 0) { | |
430 | - openShopApplyService.shopAudit(shopId, auditRemark.trim(), 4); | |
431 | - } | |
432 | - } | |
433 | - LogUtils.log(LogData.builder(WebUtils.getCurrentUserName(), "会员中心", shopId + "").model("开店申请") | |
434 | - .operation("审核拒绝").dataName(shopName).build()); | |
435 | - } | |
436 | - logger.info("记录用户操作信息"); | |
437 | - operateLog.setOperateName(user.getRealName()); | |
438 | - operateLog.setOperateId(user.getId()); | |
439 | - operateLog.setOperateDataId(shopId); | |
440 | - operateLog.setOperateType(StateTypesUtil.shopAuthenTyupe); | |
441 | - operateLog.setOperateRemark(auditRemark.trim()); | |
442 | - operateLogService.saveOperateLog(operateLog); | |
443 | - } | |
444 | - } catch (Exception e) { | |
445 | - e.printStackTrace(); | |
446 | - logger.info("审批用户开店申请信息失败", e); | |
447 | - } | |
448 | - } | |
449 | - | |
450 | -} |
diligrp-website-manweb/src/main/java/com/diligrp/website/manweb/controller/ShopCloseHistoryController.java deleted
100644 → 0
1 | -package com.diligrp.website.manweb.controller; | |
2 | - | |
3 | -import com.alibaba.fastjson.JSONObject; | |
4 | -import com.diligrp.log.util.LogData; | |
5 | -import com.diligrp.log.util.LogUtils; | |
6 | -import com.diligrp.manage.sdk.domain.UserTicket; | |
7 | -import com.diligrp.manage.sdk.session.SessionContext; | |
8 | -import com.diligrp.website.domain.*; | |
9 | -import com.diligrp.website.manweb.utils.StateTypesUtil; | |
10 | -import com.diligrp.website.manweb.utils.WebUtils; | |
11 | -import com.diligrp.website.rpc.LogicRPCService; | |
12 | -import com.diligrp.website.rpc.OrdersRPCService; | |
13 | -import com.diligrp.website.rpc.PurchasingRPCService; | |
14 | -import com.diligrp.website.rpc.ShopRPCService; | |
15 | -import com.diligrp.website.service.DataDictionaryService; | |
16 | -import com.diligrp.website.service.OperateLogService; | |
17 | -import com.diligrp.website.service.ShopCloseHistoryService; | |
18 | -import com.diligrp.website.service.ShopNameModifyService; | |
19 | -import com.diligrp.website.util.dao.BaseQuery; | |
20 | -import com.diligrp.website.util.domain.Result; | |
21 | -import com.diligrp.website.util.web.BaseController; | |
22 | -import com.diligrp.website.util.web.PageTemplate; | |
23 | -import com.google.common.collect.Maps; | |
24 | -import org.apache.commons.lang3.StringUtils; | |
25 | -import org.springframework.beans.factory.annotation.Value; | |
26 | -import org.springframework.stereotype.Controller; | |
27 | -import org.springframework.ui.Model; | |
28 | -import org.springframework.web.bind.annotation.RequestMapping; | |
29 | -import org.springframework.web.bind.annotation.RequestParam; | |
30 | -import org.springframework.web.bind.annotation.ResponseBody; | |
31 | -import org.springframework.web.servlet.ModelAndView; | |
32 | - | |
33 | -import javax.annotation.Resource; | |
34 | -import javax.servlet.http.HttpServletRequest; | |
35 | -import javax.servlet.http.HttpServletResponse; | |
36 | -import java.util.HashMap; | |
37 | -import java.util.List; | |
38 | -import java.util.Map; | |
39 | - | |
40 | -/** | |
41 | - * <B>Description</B> <br /> | |
42 | - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. | |
43 | - * <br /> | |
44 | - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> | |
45 | - * <B>Company</B> 地利集团 | |
46 | - * | |
47 | - * @author LaiKui | |
48 | - * @createTime 2015年11月3日 | |
49 | - */ | |
50 | -@Controller | |
51 | -@RequestMapping("shopCloseHistory") | |
52 | -public class ShopCloseHistoryController extends BaseController { | |
53 | - | |
54 | - @Value("${project.system.domain}") | |
55 | - private String domain; | |
56 | - @Resource | |
57 | - private ShopCloseHistoryService shopCloseHistoryService; | |
58 | - @Resource | |
59 | - private ShopRPCService shopRPCService; | |
60 | - @Resource | |
61 | - private OperateLogService operateLogService; | |
62 | - @Resource | |
63 | - private OrdersRPCService ordersRPCService; | |
64 | - @Resource | |
65 | - private LogicRPCService logicRPCService; | |
66 | - @Resource | |
67 | - private DataDictionaryService dataDictionaryService; | |
68 | - @Resource | |
69 | - private ShopNameModifyService shopNameModifyService; | |
70 | - @Resource | |
71 | - private PurchasingRPCService purchasingRPCService; | |
72 | - | |
73 | - private static Map<Integer, String> typeMap = new HashMap<Integer, String>(); | |
74 | - | |
75 | - private static Map<Integer, String> closeTypeMap = new HashMap<Integer, String>(); | |
76 | - | |
77 | - static { | |
78 | - typeMap.put(0, "全部"); | |
79 | - typeMap.put(1, "待审核"); | |
80 | - typeMap.put(2, "审核通过"); | |
81 | - typeMap.put(3, "审核未通过"); | |
82 | - closeTypeMap.put(0, "全部"); | |
83 | - closeTypeMap.put(4, "关闭"); | |
84 | - closeTypeMap.put(5, "注销"); | |
85 | - } | |
86 | - | |
87 | - @RequestMapping(value = "list") | |
88 | - public ModelAndView list(HttpServletRequest request, BaseQuery bq, Model model) { | |
89 | - String id = request.getParameter("id"); | |
90 | - String shopName = request.getParameter("shopName"); | |
91 | - String mobile = request.getParameter("mobile"); | |
92 | - String stateStr = request.getParameter("state"); | |
93 | - String closeTypeStr = request.getParameter("closeType"); | |
94 | - String startTime = request.getParameter("startTime"); | |
95 | - String endTime = request.getParameter("endTime"); | |
96 | - if (StringUtils.isNotBlank(startTime)) { | |
97 | - bq.addParam("startTime", startTime + " " + "00:00:00"); | |
98 | - } | |
99 | - if (StringUtils.isNotBlank(endTime)) { | |
100 | - bq.addParam("endTime", endTime + " " + "23:59:59"); | |
101 | - } | |
102 | - if (StringUtils.isNotBlank(stateStr)) { | |
103 | - if ("0".equals(stateStr)) { | |
104 | - bq.addParam("state", null); | |
105 | - } else { | |
106 | - Integer state = Integer.parseInt(stateStr); | |
107 | - bq.addParam("state", state + ""); | |
108 | - } | |
109 | - } | |
110 | - if (StringUtils.isNotBlank(closeTypeStr)) { | |
111 | - if ("0".equals(closeTypeStr)) { | |
112 | - bq.addParam("closeType", null); | |
113 | - } else { | |
114 | - Integer closeType = Integer.parseInt(closeTypeStr); | |
115 | - bq.addParam("closeType", closeType + ""); | |
116 | - } | |
117 | - } | |
118 | - if (StringUtils.isNotBlank(mobile)) { | |
119 | - bq.addParam("mobile", mobile); | |
120 | - } | |
121 | - if (StringUtils.isNotBlank(id)) { | |
122 | - bq.addParam("id", id); | |
123 | - } | |
124 | - if (StringUtils.isNotBlank(shopName)) { | |
125 | - bq.addParam("shopName", shopName); | |
126 | - } | |
127 | - PageTemplate page = shopCloseHistoryService.getShopCloseHistoryList(bq); | |
128 | - model.addAttribute("page", page); | |
129 | - model.addAttribute("type", typeMap); | |
130 | - model.addAttribute("closeTypeMap", closeTypeMap); | |
131 | - model.addAttribute("mobile", mobile); | |
132 | - model.addAttribute("startTime", startTime); | |
133 | - model.addAttribute("endTime", endTime); | |
134 | - model.addAttribute("state", stateStr); | |
135 | - model.addAttribute("closeType", closeTypeStr); | |
136 | - model.addAttribute("shopName", shopName); | |
137 | - model.addAttribute("id", id); | |
138 | - model.addAttribute("reasonViewFlag", | |
139 | - SessionContext.hasAccess("get", this.domain + "/shopCloseHistory/reasonView.do#reasonView")); | |
140 | - model.addAttribute("auditFlag", | |
141 | - SessionContext.hasAccess("get", this.domain + "/shopCloseHistory/audit.do#audit")); | |
142 | - return toVM("shopCloseHistory/list", model); | |
143 | - } | |
144 | - | |
145 | - @RequestMapping("getAuditShopCloseHistoryByShopId") | |
146 | - @ResponseBody | |
147 | - public void getAuditShopCloseHistoryByShopId(@RequestParam Long shopId, HttpServletResponse resp) { | |
148 | - ShopCloseHistory shopCloseHistory = shopCloseHistoryService.getAuditShopCloseHistoryByShopId(shopId); | |
149 | - Map<String, Object> param = Maps.newHashMap(); | |
150 | - if (shopCloseHistory != null) { | |
151 | - param.put("msg", "此店铺已经提交过关店/注销申请,请等待审核结果!"); | |
152 | - writeJSON(resp, param); | |
153 | - } | |
154 | - } | |
155 | - | |
156 | - @RequestMapping("audit") | |
157 | - @ResponseBody | |
158 | - public void audit(@RequestParam("id") Long id, @RequestParam("state") Integer state, | |
159 | - @RequestParam("refuseReason") String refuseReason, HttpServletResponse resp) { | |
160 | - ShopCloseHistory shopCloseHistory = shopCloseHistoryService.getShopCloseHistoryById(id); | |
161 | - Map<String, Object> param = Maps.newHashMap(); | |
162 | - if (shopCloseHistory.getState() != 1) { | |
163 | - param.put("msg", "该条记录已经被操作过了,不能再进行操作!"); | |
164 | - writeJSON(resp, param); | |
165 | - return; | |
166 | - } | |
167 | - shopCloseHistory.setState(state); | |
168 | - shopCloseHistory.setRefuseReason(refuseReason); | |
169 | - Result rst = shopCloseHistoryService.editShopCloseHistory(shopCloseHistory); | |
170 | - OperateLog operateLog = new OperateLog(); | |
171 | - operateLog.setOperateDataId(shopCloseHistory.getShopId()); | |
172 | - SessionContext session = SessionContext.getSessionContext(); | |
173 | - UserTicket user = session.getUserTicket(); | |
174 | - operateLog.setOperateId(user.getId()); | |
175 | - operateLog.setOperateName(user.getRealName()); | |
176 | - operateLog.setOperateType(StateTypesUtil.shopAuthenTyupe); | |
177 | - String reasonCode = "967"; | |
178 | - String otherCode = "967"; | |
179 | - if (StringUtils.isNotEmpty(shopCloseHistory.getReason())) { | |
180 | - reasonCode = shopCloseHistory.getReason(); | |
181 | - } | |
182 | - if (StringUtils.isNotEmpty(shopCloseHistory.getOtherReason())) { | |
183 | - otherCode = shopCloseHistory.getOtherReason(); | |
184 | - } | |
185 | - if (state == 2) { | |
186 | - shopRPCService.updateShopClose(shopCloseHistory.getShopId(), reasonCode, otherCode, | |
187 | - shopCloseHistory.getCloseType()); | |
188 | - if (shopCloseHistory.getCloseType() == 4) { | |
189 | - operateLog.setOperateRemark("关店审核通过"); | |
190 | - } else { | |
191 | - operateLog.setOperateRemark("注销审核通过"); | |
192 | - } | |
193 | - BaseQuery bq = new BaseQuery(); | |
194 | - bq.addParam("shopId", shopCloseHistory.getShopId() + ""); | |
195 | - bq.addParam("state", "1"); | |
196 | - PageTemplate pageTemplate = shopNameModifyService.getShopNameModifyList(bq); | |
197 | - if (pageTemplate != null) { | |
198 | - if (pageTemplate.getList() != null && pageTemplate.getList().size() > 0) { | |
199 | - ShopNameModify shopNameModify = (ShopNameModify) pageTemplate.getList().get(0); | |
200 | - shopNameModify.setYn(2); | |
201 | - shopNameModifyService.editShopNameModify(shopNameModify); | |
202 | - } | |
203 | - } | |
204 | - } else { | |
205 | - if (shopCloseHistory.getCloseType() == 4) { | |
206 | - operateLog.setOperateRemark("关店审核拒绝:" + refuseReason); | |
207 | - } else { | |
208 | - operateLog.setOperateRemark("注销审核拒绝:" + refuseReason); | |
209 | - } | |
210 | - } | |
211 | - operateLogService.saveOperateLog(operateLog); | |
212 | - param.put("success", rst.isSuccess()); | |
213 | - param.put("code", rst.getCode()); | |
214 | - LogUtils.log(LogData.builder(WebUtils.getCurrentUserName(), "会员中心", shopCloseHistory.getId() + "") | |
215 | - .model("关闭店铺申请").operation("修改").dataName(rst.getMsg()).build()); | |
216 | - writeJSON(resp, param); | |
217 | - } | |
218 | - | |
219 | - @RequestMapping("/reasonView") | |
220 | - @ResponseBody | |
221 | - public void reasonView(@RequestParam("id") Long id, HttpServletResponse resp) { | |
222 | - ShopCloseHistory shopCloseHistory = shopCloseHistoryService.getShopCloseHistoryById(id); | |
223 | - Map<String, Object> param = Maps.newHashMap(); | |
224 | - if (shopCloseHistory != null) { | |
225 | - if (shopCloseHistory.getCloseType() == 4) { | |
226 | - param.put("closeTypeText", "该店铺提交关闭申请的原因:"); | |
227 | - param.put("refuseReasonText", "该店铺提交关闭申请后被拒绝的原因:"); | |
228 | - } else { | |
229 | - param.put("closeTypeText", "该店铺提交注销申请的原因:"); | |
230 | - param.put("refuseReasonText", "该店铺提交注销申请后被拒绝的原因:"); | |
231 | - } | |
232 | - String reason = ""; | |
233 | - if (StringUtils.isNotEmpty(shopCloseHistory.getReason())) { | |
234 | - String[] codeArray = shopCloseHistory.getReason().split(","); | |
235 | - DataDictionary dataDictionary = dataDictionaryService.getDataDictionaryByCode("SHOP_CLOSE_REASON"); | |
236 | - if (dataDictionary != null) { | |
237 | - List<DataDictionaryValue> list = dataDictionaryService | |
238 | - .getDataDictionaryValue(dataDictionary.getId()); | |
239 | - if (list != null && list.size() > 0) { | |
240 | - for (int i = 0; i < list.size(); i++) { | |
241 | - DataDictionaryValue dataDictionaryValue = list.get(i); | |
242 | - for (int j = 0; j < codeArray.length; j++) { | |
243 | - if (dataDictionaryValue.getCode().equals(codeArray[j])) { | |
244 | - reason += dataDictionaryValue.getName() + ";</br>"; | |
245 | - } | |
246 | - } | |
247 | - } | |
248 | - } | |
249 | - } | |
250 | - } | |
251 | - if (shopCloseHistory.getState() == 3) { | |
252 | - if (StringUtils.isEmpty(shopCloseHistory.getReason())) { | |
253 | - param.put("reason", shopCloseHistory.getOtherReason()); | |
254 | - } else if (StringUtils.isEmpty(shopCloseHistory.getOtherReason())) { | |
255 | - param.put("reason", reason); | |
256 | - } else { | |
257 | - param.put("reason", reason + shopCloseHistory.getOtherReason()); | |
258 | - } | |
259 | - param.put("refuseReason", shopCloseHistory.getRefuseReason()); | |
260 | - writeJSON(resp, param); | |
261 | - } else { | |
262 | - if (StringUtils.isEmpty(shopCloseHistory.getReason())) { | |
263 | - param.put("reason", shopCloseHistory.getOtherReason()); | |
264 | - } else if (StringUtils.isEmpty(shopCloseHistory.getOtherReason())) { | |
265 | - param.put("reason", reason); | |
266 | - } else { | |
267 | - param.put("reason", reason + shopCloseHistory.getOtherReason()); | |
268 | - } | |
269 | - writeJSON(resp, param); | |
270 | - } | |
271 | - } | |
272 | - } | |
273 | - | |
274 | - @RequestMapping("getValidOrderNumByShop") | |
275 | - @ResponseBody | |
276 | - public void getValidOrderNumByShop(@RequestParam Long shopId, @RequestParam Integer shopSource, | |
277 | - HttpServletResponse resp) { | |
278 | - Map<String, Object> param = Maps.newHashMap(); | |
279 | - // 物流 | |
280 | - if (shopSource == 6) { | |
281 | - JSONObject losJson = logicRPCService.shopLosOrdersCount(shopId); | |
282 | - if (losJson != null) { | |
283 | - Object code = losJson.get("code"); | |
284 | - if ("200".equals(code.toString())) { | |
285 | - int losNum = losJson.getIntValue("count"); | |
286 | - if (losNum != 0) { | |
287 | - param.put("msg", "此店铺还存在未完结的订单,不能提交注销申请!"); | |
288 | - } | |
289 | - } | |
290 | - } else { | |
291 | - param.put("msg", "获取数据出错!"); | |
292 | - } | |
293 | - // 代购 | |
294 | - } else if (shopSource == 5) { | |
295 | - Integer orderNum = purchasingRPCService.getValidOrderNumByShop(shopId); | |
296 | - if (orderNum == null) { | |
297 | - param.put("msg", "获取数据出错!"); | |
298 | - } else { | |
299 | - if (orderNum != 0) { | |
300 | - param.put("msg", "此店铺还存在未完结的订单,不能提交注销申请!"); | |
301 | - } | |
302 | - } | |
303 | - } else { | |
304 | - Integer orderNum = ordersRPCService.getValidOrderNumByShop(shopId); | |
305 | - if (orderNum == null) { | |
306 | - param.put("msg", "获取数据出错!"); | |
307 | - } else { | |
308 | - if (orderNum != 0) { | |
309 | - param.put("msg", "此店铺还存在未完结的订单,不能提交注销申请!"); | |
310 | - } | |
311 | - } | |
312 | - } | |
313 | - writeJSON(resp, param); | |
314 | - } | |
315 | - | |
316 | -} |
diligrp-website-manweb/src/main/java/com/diligrp/website/manweb/controller/ShopController.java deleted
100644 → 0
1 | -package com.diligrp.website.manweb.controller; | |
2 | - | |
3 | -import java.net.URLEncoder; | |
4 | -import java.sql.Timestamp; | |
5 | -import java.util.ArrayList; | |
6 | -import java.util.HashMap; | |
7 | -import java.util.List; | |
8 | -import java.util.Map; | |
9 | - | |
10 | -import javax.servlet.http.HttpServletRequest; | |
11 | -import javax.servlet.http.HttpServletResponse; | |
12 | - | |
13 | -import org.apache.commons.lang3.StringUtils; | |
14 | -import org.nutz.lang.meta.Pair; | |
15 | -import org.springframework.beans.factory.annotation.Autowired; | |
16 | -import org.springframework.beans.factory.annotation.Value; | |
17 | -import org.springframework.stereotype.Controller; | |
18 | -import org.springframework.util.CollectionUtils; | |
19 | -import org.springframework.web.bind.annotation.RequestMapping; | |
20 | -import org.springframework.web.bind.annotation.RequestMethod; | |
21 | -import org.springframework.web.bind.annotation.RequestParam; | |
22 | -import org.springframework.web.bind.annotation.ResponseBody; | |
23 | -import org.springframework.web.servlet.ModelAndView; | |
24 | - | |
25 | -import com.diligrp.log.util.LogData; | |
26 | -import com.diligrp.log.util.LogUtils; | |
27 | -import com.diligrp.manage.sdk.domain.UserTicket; | |
28 | -import com.diligrp.manage.sdk.session.SessionContext; | |
29 | -import com.diligrp.pnr.sdk.domain.PageResult; | |
30 | -import com.diligrp.pnr.sdk.domain.Shop; | |
31 | -import com.diligrp.pnr.sdk.domain.ShopGrade; | |
32 | -import com.diligrp.pnr.sdk.resp.BaseResp; | |
33 | -import com.diligrp.website.domain.AuthLevel; | |
34 | -import com.diligrp.website.domain.City; | |
35 | -import com.diligrp.website.domain.DataDictionary; | |
36 | -import com.diligrp.website.domain.DataDictionaryValue; | |
37 | -import com.diligrp.website.domain.OperateLog; | |
38 | -import com.diligrp.website.domain.PickUpPointDomain; | |
39 | -import com.diligrp.website.domain.ShopCloseHistory; | |
40 | -import com.diligrp.website.manweb.utils.StateTypesUtil; | |
41 | -import com.diligrp.website.manweb.utils.WebUtils; | |
42 | -import com.diligrp.website.rpc.input.ShopInfoListInput; | |
43 | -import com.diligrp.website.rpc.input.ShopProductCategoryListInput; | |
44 | -import com.diligrp.website.rpc.input.ShopProductRecommendListInput; | |
45 | -import com.diligrp.website.service.AuthLevelService; | |
46 | -import com.diligrp.website.service.CityService; | |
47 | -import com.diligrp.website.service.DataDictionaryService; | |
48 | -import com.diligrp.website.service.MemberService; | |
49 | -import com.diligrp.website.service.OperateLogService; | |
50 | -import com.diligrp.website.service.PickUpPointService; | |
51 | -import com.diligrp.website.service.ShopCloseHistoryService; | |
52 | -import com.diligrp.website.service.ShopService; | |
53 | -import com.diligrp.website.util.domain.Result; | |
54 | -import com.diligrp.website.util.format.DateFormatUtils; | |
55 | -import com.diligrp.website.util.web.BaseController; | |
56 | -import com.google.common.collect.Maps; | |
57 | -import com.yqyw.user.rpc.client.domain.output.UserInfoResp; | |
58 | - | |
59 | -/** | |
60 | - * <p> | |
61 | - * Title: 〈标题〉 | |
62 | - * </p> | |
63 | - * <p> | |
64 | - * Description: 〈描述〉 | |
65 | - * </p> | |
66 | - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. | |
67 | - * <br /> | |
68 | - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> | |
69 | - * <B>Company</B> 地利集团 | |
70 | - * <p> | |
71 | - * CreateTime:2014/6/19 | |
72 | - * </p> | |
73 | - * | |
74 | - * @author zhukai | |
75 | - */ | |
76 | -@Controller | |
77 | -@RequestMapping("/shop") | |
78 | -public class ShopController extends BaseController { | |
79 | - | |
80 | - @Value("${project.system.domain}") | |
81 | - private String domain; | |
82 | - @Autowired | |
83 | - private ShopService shopService; | |
84 | - @Autowired | |
85 | - private CityService cityService; | |
86 | - @Autowired | |
87 | - private PickUpPointService pickUpPointService; | |
88 | - @Autowired | |
89 | - private AuthLevelService authLevelService; | |
90 | - @Autowired | |
91 | - private MemberService memberService; | |
92 | - @Autowired | |
93 | - private ShopCloseHistoryService shopCloseHistoryService; | |
94 | - @Autowired | |
95 | - private OperateLogService operateLogService; | |
96 | - @Autowired | |
97 | - private DataDictionaryService ddService; | |
98 | - private static final String SHOP_SOURCE = "SHOP_SOURCE"; | |
99 | - | |
100 | - private static Map<Integer, String> gradeMap = new HashMap<Integer, String>(); | |
101 | - private static Map<Integer, String> dishonestyMap = new HashMap<Integer, String>(); | |
102 | - private static Map<Integer, String> placeMap = new HashMap<Integer, String>(); | |
103 | - private static Map<Integer, String> statisticsMarketMap = new HashMap<Integer, String>(); | |
104 | - private static Map<Integer, String> shopStatusQueryMap = new HashMap<Integer, String>(); | |
105 | - | |
106 | - static { | |
107 | - gradeMap.put(0, "全部"); | |
108 | - gradeMap.put(1, "否"); | |
109 | - gradeMap.put(2, "是"); | |
110 | - dishonestyMap.put(0, "全部"); | |
111 | - dishonestyMap.put(1, "否"); | |
112 | - dishonestyMap.put(2, "是"); | |
113 | - placeMap.put(0, "全部"); | |
114 | - placeMap.put(1, "否"); | |
115 | - placeMap.put(2, "是"); | |
116 | - statisticsMarketMap.put(0, "全部"); | |
117 | - statisticsMarketMap.put(1, "否"); | |
118 | - statisticsMarketMap.put(2, "是"); | |
119 | - shopStatusQueryMap.put(0, "全部"); | |
120 | - shopStatusQueryMap.put(4, "关闭"); | |
121 | - shopStatusQueryMap.put(2, "正常"); | |
122 | - } | |
123 | - | |
124 | - @RequestMapping("/list") | |
125 | - public ModelAndView list(ShopInfoListInput in, Integer currPage, HttpServletRequest req) throws Exception { | |
126 | - String listQuery = req.getQueryString(); | |
127 | - if (currPage != null) { | |
128 | - in.setCurrentPage(currPage + 1); | |
129 | - } else { | |
130 | - in.setCurrentPage(currPage); | |
131 | - } | |
132 | - in.setPageDataSize(20); | |
133 | - String startTimeStr = req.getParameter("startTime"); | |
134 | - String endTimeStr = req.getParameter("endTime"); | |
135 | - String mobile = req.getParameter("mobile"); | |
136 | - String gradeStateStr = req.getParameter("gradeState"); | |
137 | - String isDishonestyStr = req.getParameter("isDishonesty"); | |
138 | - String isSoptauthStr = req.getParameter("isSoptauth"); | |
139 | - String levelStateStr = req.getParameter("levelState"); | |
140 | - String marketStr = req.getParameter("market"); | |
141 | - String statisticsMarketStr = req.getParameter("statisticsMarket"); | |
142 | - String shopStatusStr = req.getParameter("shopStatus"); | |
143 | - if (!StringUtils.isEmpty(shopStatusStr)) { | |
144 | - Integer shopStatus = Integer.parseInt(shopStatusStr); | |
145 | - in.setShopStatus(shopStatus); | |
146 | - } | |
147 | - if (!StringUtils.isEmpty(marketStr)) { | |
148 | - Integer market = Integer.parseInt(marketStr); | |
149 | - in.setMarket(market); | |
150 | - } | |
151 | - if (!StringUtils.isEmpty(statisticsMarketStr)) { | |
152 | - Integer statisticsMarket = Integer.parseInt(statisticsMarketStr); | |
153 | - in.setStatisticsMarket(statisticsMarket); | |
154 | - } | |
155 | - if (!StringUtils.isEmpty(gradeStateStr)) { | |
156 | - Integer gradeState = Integer.parseInt(gradeStateStr); | |
157 | - in.setGradeState(gradeState); | |
158 | - } | |
159 | - if (!StringUtils.isEmpty(isDishonestyStr)) { | |
160 | - Integer isDishonesty = Integer.parseInt(isDishonestyStr); | |
161 | - in.setIsDishonesty(isDishonesty); | |
162 | - } | |
163 | - if (!StringUtils.isEmpty(isSoptauthStr)) { | |
164 | - Integer isSoptauth = Integer.parseInt(isSoptauthStr); | |
165 | - in.setIsSoptauth(isSoptauth); | |
166 | - } | |
167 | - if (!StringUtils.isEmpty(levelStateStr)) { | |
168 | - Integer levelState = Integer.parseInt(levelStateStr); | |
169 | - in.setLevelState(levelState); | |
170 | - } | |
171 | - if (!StringUtils.isEmpty(startTimeStr)) { | |
172 | - String startTime = startTimeStr + " " + "00:00:00"; | |
173 | - in.setStartTime(startTime); | |
174 | - } | |
175 | - if (!StringUtils.isEmpty(endTimeStr)) { | |
176 | - String endTime = endTimeStr + " " + "23:59:59"; | |
177 | - in.setEndTime(endTime); | |
178 | - } | |
179 | - if (!StringUtils.isEmpty(mobile)) { | |
180 | - in.setMobile(mobile); | |
181 | - } | |
182 | - SessionContext session = SessionContext.getSessionContext(); | |
183 | - // 获取当前登录用户 | |
184 | - // UserTicket user = session.getUserTicket(); | |
185 | - // 获取指定数据权限的所有集合 | |
186 | - List<Pair<String>> cityIds = session.dataAuth("city"); | |
187 | - if (cityIds != null && cityIds.size() > 0) { | |
188 | - String cityId = ""; | |
189 | - for (int i = 0; i < cityIds.size(); i++) { | |
190 | - cityId += cityIds.get(i).getName() + ","; | |
191 | - } | |
192 | - cityId = cityId.substring(0, cityId.length() - 1); | |
193 | - if ("-1".equals(cityId)) { | |
194 | - cityId = null;// 查全部 | |
195 | - } | |
196 | - in.setCityId(cityId); | |
197 | - } else { | |
198 | - in.setCityId("-1");// 无权限 | |
199 | - } | |
200 | - DataDictionary dd = this.ddService.getDataDictionaryByCode(SHOP_SOURCE); | |
201 | - List<DataDictionaryValue> ddValues = null; | |
202 | - if (dd != null) { | |
203 | - ddValues = this.ddService.getDataDictionaryValue(dd.getId()); | |
204 | - } | |
205 | - if (ddValues != null && !CollectionUtils.isEmpty(ddValues)) { | |
206 | - String shopSource = ""; | |
207 | - for (int i = 0; i < ddValues.size(); i++) { | |
208 | - shopSource += ddValues.get(i).getCode() + ","; | |
209 | - } | |
210 | - shopSource = shopSource.substring(0, shopSource.length() - 1); | |
211 | - if ("-1".equals(shopSource)) { | |
212 | - shopSource = null;// 查全部 | |
213 | - } | |
214 | - in.setShopSource(shopSource); | |
215 | - } else { | |
216 | - in.setShopSource("-1");// 无权限 | |
217 | - } | |
218 | - | |
219 | - Result result = shopService.list(in); | |
220 | - | |
221 | - BaseResp resp = (BaseResp) result.getAllResult().get("model"); | |
222 | - PageResult<Shop> pageResult = null; | |
223 | - if (resp != null) { | |
224 | - pageResult = resp.getPageResult(Shop.class); | |
225 | - } | |
226 | - List<Shop> list = null; | |
227 | - if (pageResult != null) { | |
228 | - list = pageResult.getList(); | |
229 | - } | |
230 | - Map<Integer, String> levelType = new HashMap<Integer, String>(); | |
231 | - List<AuthLevel> levelList = authLevelService.getAllAuthLevel(); | |
232 | - levelType.put(0, "全部"); | |
233 | - if (levelList != null && levelList.size() > 0) { | |
234 | - for (int i = 0; i < levelList.size(); i++) { | |
235 | - AuthLevel authLevelTemp = levelList.get(i); | |
236 | - levelType.put(authLevelTemp.getId().intValue(), authLevelTemp.getLevelName()); | |
237 | - } | |
238 | - } | |
239 | - result.addResult("levelType", levelType); | |
240 | - | |
241 | - List<PickUpPointDomain> marketList = new ArrayList<PickUpPointDomain>(); | |
242 | - List<PickUpPointDomain> marketListTemp = pickUpPointService.getAllMarketPickUpInfo(); | |
243 | - if (marketListTemp != null && marketListTemp.size() > 0) { | |
244 | - for (int i = 0; i < marketListTemp.size(); i++) { | |
245 | - PickUpPointDomain market = marketListTemp.get(i); | |
246 | - marketList.add(market); | |
247 | - } | |
248 | - } | |
249 | - result.addResult("marketList", marketList); | |
250 | - | |
251 | - List<Shop> shopList = new ArrayList<Shop>(); | |
252 | - if (list != null && list.size() > 0) { | |
253 | - for (int i = 0; i < list.size(); i++) { | |
254 | - Shop shop = list.get(i); | |
255 | - Long gradeId = shop.getGradeId(); | |
256 | - if (gradeId == null) { | |
257 | - shop.setGradeName("未认证"); | |
258 | - } else { | |
259 | - AuthLevel authLevel = authLevelService.getAuthLevelById(gradeId); | |
260 | - if (authLevel != null) { | |
261 | - shop.setGradeName(authLevel.getLevelName()); | |
262 | - } else { | |
263 | - shop.setGradeName("未认证"); | |
264 | - } | |
265 | - } | |
266 | - shopList.add(shop); | |
267 | - } | |
268 | - } | |
269 | - if (StringUtils.isNotBlank(listQuery)) { | |
270 | - result.addResult("listQuery", URLEncoder.encode(listQuery, "utf-8")); | |
271 | - } | |
272 | - result.addResult("showFlag", SessionContext.hasAccess("get", this.domain + "/shop/show.do#show")); | |
273 | - result.addResult("auditFlag", | |
274 | - SessionContext.hasAccess("get", this.domain + "/shop/shopAuthLevel.do#shopAuthLevel")); | |
275 | - result.addResult("productRecommendFlag", | |
276 | - SessionContext.hasAccess("get", this.domain + "/shop/productRecommend.do#productRecommend")); | |
277 | - result.addResult("categoryFlag", SessionContext.hasAccess("get", this.domain + "/shop/category.do#category")); | |
278 | - result.addResult("qualificationFlag", | |
279 | - SessionContext.hasAccess("get", this.domain + "/shop/qualification.do#qualification")); | |
280 | - result.addResult("relateMarketFlag", | |
281 | - SessionContext.hasAccess("get", this.domain + "/shop/relateMarket.do#relateMarket")); | |
282 | - result.addResult("belongFlag", | |
283 | - SessionContext.hasAccess("get", this.domain + "/shop/belongStatistics.do#belongStatistics")); | |
284 | - result.addResult("closeFlag", SessionContext.hasAccess("get", this.domain + "/shop/closeShop.do#closeShop")); | |
285 | - result.addResult("shopList", shopList); | |
286 | - if (!StringUtils.isEmpty(mobile)) { | |
287 | - result.addResult("mobile", mobile); | |
288 | - } | |
289 | - if (!StringUtils.isEmpty(startTimeStr)) { | |
290 | - result.addResult("startTime", startTimeStr); | |
291 | - } | |
292 | - if (!StringUtils.isEmpty(endTimeStr)) { | |
293 | - result.addResult("endTime", endTimeStr); | |
294 | - } | |
295 | - if (!StringUtils.isEmpty(in.getShopId())) { | |
296 | - result.addResult("shopId", in.getShopId()); | |
297 | - } | |
298 | - if (!StringUtils.isEmpty(in.getShopName())) { | |
299 | - result.addResult("shopName", in.getShopName()); | |
300 | - } | |
301 | - result.addResult("gradeStateMap", gradeMap); | |
302 | - result.addResult("dishonestyStateMap", dishonestyMap); | |
303 | - result.addResult("placeStateMap", placeMap); | |
304 | - result.addResult("statisticsMarketMap", statisticsMarketMap); | |
305 | - result.addResult("shopStatusQueryMap", shopStatusQueryMap); | |
306 | - result.addResult("gradeState", in.getGradeState()); | |
307 | - result.addResult("isDishonesty", in.getIsDishonesty()); | |
308 | - result.addResult("levelState", in.getLevelState()); | |
309 | - result.addResult("isSoptauth", in.getIsSoptauth()); | |
310 | - result.addResult("statisticsMarket", in.getStatisticsMarket()); | |
311 | - result.addResult("shopStatus", in.getShopStatus()); | |
312 | - result.addResult("market", in.getMarket()); | |
313 | - return toVM("/shop/list", result.getAllResult()); | |
314 | - } | |
315 | - | |
316 | - @RequestMapping("/qualification") | |
317 | - public ModelAndView qualification(Long shopId) { | |
318 | - Result resultShop = shopService.getShopInfoById(shopId); | |
319 | - Shop shop = (Shop) resultShop.getAllResult().get("model"); | |
320 | - if (shop != null) { | |
321 | - boolean flag1 = false; | |
322 | - boolean flag2 = false; | |
323 | - SessionContext session = SessionContext.getSessionContext(); | |
324 | - // 获取指定数据权限的所有集合 | |
325 | - List<Pair<String>> cityIds = session.dataAuth("city"); | |
326 | - if (cityIds != null && cityIds.size() > 0) { | |
327 | - for (int i = 0; i < cityIds.size(); i++) { | |
328 | - if ("-1".equals(cityIds.get(i).getName())) { | |
329 | - flag1 = true; | |
330 | - break; | |
331 | - } | |
332 | - if (cityIds.get(i).getName().equals(shop.getCityId().toString())) { | |
333 | - flag1 = true; | |
334 | - } | |
335 | - } | |
336 | - } | |
337 | - DataDictionary dd = this.ddService.getDataDictionaryByCode(SHOP_SOURCE); | |
338 | - List<DataDictionaryValue> ddValues = null; | |
339 | - if (dd != null) { | |
340 | - ddValues = this.ddService.getDataDictionaryValue(dd.getId()); | |
341 | - } | |
342 | - if (ddValues != null && !CollectionUtils.isEmpty(ddValues)) { | |
343 | - for (int i = 0; i < ddValues.size(); i++) { | |
344 | - if ("-1".equals(ddValues.get(i).getCode())) { | |
345 | - flag2 = true; | |
346 | - break; | |
347 | - } | |
348 | - if (ddValues.get(i).getCode().equals(shop.getShopSource().toString())) { | |
349 | - flag2 = true; | |
350 | - } | |
351 | - } | |
352 | - } | |
353 | - if (flag1 == false || flag2 == false) { | |
354 | - return new ModelAndView("redirect:/shop/list.do"); | |
355 | - } | |
356 | - } | |
357 | - Result result = shopService.getShopQualificationsByShopId(shopId); | |
358 | - result.addResult("checkQualificationFlag", | |
359 | - SessionContext.hasAccess("get", this.domain + "/shop/checkQualification.do#checkQualification")); | |
360 | - return toVM("/shop/qualification", result.getAllResult()); | |
361 | - } | |
362 | - | |
363 | - @RequestMapping(value = "/checkQualification", method = { RequestMethod.POST, | |
364 | - RequestMethod.GET }, produces = "application/json") | |
365 | - @ResponseBody | |
366 | - public String checkQualification(Long qid, int audit) { | |
367 | - return shopService.checkShopQualification(qid, audit); | |
368 | - } | |
369 | - | |
370 | - @RequestMapping(value = "/show", method = RequestMethod.GET) | |
371 | - public ModelAndView show(Long uid) { | |
372 | - Result result = shopService.show(uid); | |
373 | - Shop shop = (Shop) result.getAllResult().get("shop"); | |
374 | - if (shop != null) { | |
375 | - boolean flag1 = false; | |
376 | - boolean flag2 = false; | |
377 | - SessionContext session = SessionContext.getSessionContext(); | |
378 | - // 获取指定数据权限的所有集合 | |
379 | - List<Pair<String>> cityIds = session.dataAuth("city"); | |
380 | - if (cityIds != null && cityIds.size() > 0) { | |
381 | - for (int i = 0; i < cityIds.size(); i++) { | |
382 | - if ("-1".equals(cityIds.get(i).getName())) { | |
383 | - flag1 = true; | |
384 | - break; | |
385 | - } | |
386 | - if (cityIds.get(i).getName().equals(shop.getCityId().toString())) { | |
387 | - flag1 = true; | |
388 | - } | |
389 | - } | |
390 | - } | |
391 | - DataDictionary dd = this.ddService.getDataDictionaryByCode(SHOP_SOURCE); | |
392 | - List<DataDictionaryValue> ddValues = null; | |
393 | - if (dd != null) { | |
394 | - ddValues = this.ddService.getDataDictionaryValue(dd.getId()); | |
395 | - } | |
396 | - if (ddValues != null && !CollectionUtils.isEmpty(ddValues)) { | |
397 | - for (int i = 0; i < ddValues.size(); i++) { | |
398 | - if ("-1".equals(ddValues.get(i).getCode())) { | |
399 | - flag2 = true; | |
400 | - break; | |
401 | - } | |
402 | - if (ddValues.get(i).getCode().equals(shop.getShopSource().toString())) { | |
403 | - flag2 = true; | |
404 | - } | |
405 | - } | |
406 | - } | |
407 | - if (flag1 == false || flag2 == false) { | |
408 | - return new ModelAndView("redirect:/shop/list.do"); | |
409 | - } | |
410 | - Long addressId = shop.getAddressId(); | |
411 | - Result res = cityService.getCityList(addressId.intValue()); | |
412 | - List<City> cityList = (List) res.getAllResult().get("city"); | |
413 | - String addressName = ""; | |
414 | - String name1 = ""; | |
415 | - String name2 = ""; | |
416 | - String name3 = ""; | |
417 | - if (cityList != null && cityList.size() > 0) { | |
418 | - for (int i = 0; i < cityList.size(); i++) { | |
419 | - City city = cityList.get(i); | |
420 | - if (city.getLevel() == 3) { | |
421 | - name3 = city.getRegionName(); | |
422 | - } | |
423 | - if (city.getLevel() == 2) { | |
424 | - name2 = city.getRegionName(); | |
425 | - } | |
426 | - if (city.getLevel() == 1) { | |
427 | - name1 = city.getRegionName(); | |
428 | - } | |
429 | - } | |
430 | - addressName = name1 + name2 + name3 + shop.getAddressText(); | |
431 | - result.addResult("addressName", addressName); | |
432 | - } | |
433 | - } | |
434 | - if (result.isSuccess()) { | |
435 | - return toVM("/shop/show", result.getAllResult()); | |
436 | - } else { | |
437 | - ModelAndView view = new ModelAndView("redirect:/shop/list.do"); | |
438 | - view.addObject("succ", false); | |
439 | - view.addObject("msg", result.getMsg()); | |
440 | - return view; | |
441 | - } | |
442 | - } | |
443 | - | |
444 | - @RequestMapping(value = "/getSopInfo", method = RequestMethod.GET) | |
445 | - @ResponseBody | |
446 | - public Map<?, ?> getSopInfo(Long uid) { | |
447 | - try { | |
448 | - Result result = shopService.show(uid); | |
449 | - Shop shop = (Shop) result.getAllResult().get("shop"); | |
450 | - if (shop != null) { | |
451 | - boolean flag1 = false; | |
452 | - boolean flag2 = false; | |
453 | - SessionContext session = SessionContext.getSessionContext(); | |
454 | - // 获取指定数据权限的所有集合 | |
455 | - List<Pair<String>> cityIds = session.dataAuth("city"); | |
456 | - if (cityIds != null && cityIds.size() > 0) { | |
457 | - for (int i = 0; i < cityIds.size(); i++) { | |
458 | - if ("-1".equals(cityIds.get(i).getName())) { | |
459 | - flag1 = true; | |
460 | - break; | |
461 | - } | |
462 | - if (cityIds.get(i).getName().equals(shop.getCityId().toString())) { | |
463 | - flag1 = true; | |
464 | - } | |
465 | - } | |
466 | - } | |
467 | - DataDictionary dd = this.ddService.getDataDictionaryByCode(SHOP_SOURCE); | |
468 | - List<DataDictionaryValue> ddValues = null; | |
469 | - if (dd != null) { | |
470 | - ddValues = this.ddService.getDataDictionaryValue(dd.getId()); | |
471 | - } | |
472 | - if (ddValues != null && !CollectionUtils.isEmpty(ddValues)) { | |
473 | - for (int i = 0; i < ddValues.size(); i++) { | |
474 | - if ("-1".equals(ddValues.get(i).getCode())) { | |
475 | - flag2 = true; | |
476 | - break; | |
477 | - } | |
478 | - if (ddValues.get(i).getCode().equals(shop.getShopSource().toString())) { | |
479 | - flag2 = true; | |
480 | - } | |
481 | - } | |
482 | - } | |
483 | - if (flag1 == false || flag2 == false) { | |
484 | - return null; | |
485 | - } | |
486 | - } | |
487 | - if (result.isSuccess()) { | |
488 | - return result.getAllResult(); | |
489 | - } | |
490 | - } catch (Exception e) { | |
491 | - e.printStackTrace(); | |
492 | - } | |
493 | - return null; | |
494 | - } | |
495 | - | |
496 | - /** | |
497 | - * 商品推荐 | |
498 | - * | |
499 | - * @return | |
500 | - */ | |
501 | - @SuppressWarnings("deprecation") | |
502 | - @RequestMapping(value = "/productRecommend") | |
503 | - public ModelAndView productRecommend(ShopProductRecommendListInput in, Integer dateType, String listQuery) { | |
504 | - Result resultShop = shopService.show(in.getUserId()); | |
505 | - Shop shop = (Shop) resultShop.getAllResult().get("shop"); | |
506 | - if (shop != null) { | |
507 | - boolean flag1 = false; | |
508 | - boolean flag2 = false; | |
509 | - SessionContext session = SessionContext.getSessionContext(); | |
510 | - // 获取指定数据权限的所有集合 | |
511 | - List<Pair<String>> cityIds = session.dataAuth("city"); | |
512 | - if (cityIds != null && cityIds.size() > 0) { | |
513 | - for (int i = 0; i < cityIds.size(); i++) { | |
514 | - if ("-1".equals(cityIds.get(i).getName())) { | |
515 | - flag1 = true; | |
516 | - break; | |
517 | - } | |
518 | - if (cityIds.get(i).getName().equals(shop.getCityId().toString())) { | |
519 | - flag1 = true; | |
520 | - } | |
521 | - } | |
522 | - } | |
523 | - DataDictionary dd = this.ddService.getDataDictionaryByCode(SHOP_SOURCE); | |
524 | - List<DataDictionaryValue> ddValues = null; | |
525 | - if (dd != null) { | |
526 | - ddValues = this.ddService.getDataDictionaryValue(dd.getId()); | |
527 | - } | |
528 | - if (ddValues != null && !CollectionUtils.isEmpty(ddValues)) { | |
529 | - for (int i = 0; i < ddValues.size(); i++) { | |
530 | - if ("-1".equals(ddValues.get(i).getCode())) { | |
531 | - flag2 = true; | |
532 | - break; | |
533 | - } | |
534 | - if (ddValues.get(i).getCode().equals(shop.getShopSource().toString())) { | |
535 | - flag2 = true; | |
536 | - } | |
537 | - } | |
538 | - } | |
539 | - if (flag1 == false || flag2 == false) { | |
540 | - return new ModelAndView("redirect:/shop/list.do"); | |
541 | - } | |
542 | - } | |
543 | - if (dateType != null) { | |
544 | - Timestamp endTime = new Timestamp(System.currentTimeMillis()); | |
545 | - Timestamp startTime = new Timestamp(System.currentTimeMillis()); | |
546 | - switch (dateType) { | |
547 | - case 1: | |
548 | - startTime.setMonth(endTime.getMonth() - 1); | |
549 | - break; | |
550 | - case 2: | |
551 | - startTime.setMonth(endTime.getMonth() - 3); | |
552 | - break; | |
553 | - case 3: | |
554 | - startTime.setYear(endTime.getYear() - 1); | |
555 | - break; | |
556 | - default: | |
557 | - endTime = null; | |
558 | - startTime = null; | |
559 | - break; | |
560 | - } | |
561 | - in.setBeginTime(DateFormatUtils.format(startTime)); | |
562 | - in.setEndTime(DateFormatUtils.format(endTime)); | |
563 | - } | |
564 | - Result result = shopService.productRecommend(in); | |
565 | - result.addResult("dateType", dateType); | |
566 | - result.addResult("listQuery", listQuery); | |
567 | - return toVM("/shop/productRecommend", result.getAllResult()); | |
568 | - } | |
569 | - | |
570 | - /** | |
571 | - * 商品分类 | |
572 | - * | |
573 | - * @return | |
574 | - */ | |
575 | - @RequestMapping(value = "/category", method = RequestMethod.GET) | |
576 | - public ModelAndView category(ShopProductCategoryListInput in, String listQuery) { | |
577 | - Result resultShop = shopService.show(in.getUserId()); | |
578 | - Shop shop = (Shop) resultShop.getAllResult().get("shop"); | |
579 | - if (shop != null) { | |
580 | - boolean flag1 = false; | |
581 | - boolean flag2 = false; | |
582 | - SessionContext session = SessionContext.getSessionContext(); | |
583 | - // 获取指定数据权限的所有集合 | |
584 | - List<Pair<String>> cityIds = session.dataAuth("city"); | |
585 | - if (cityIds != null && cityIds.size() > 0) { | |
586 | - for (int i = 0; i < cityIds.size(); i++) { | |
587 | - if ("-1".equals(cityIds.get(i).getName())) { | |
588 | - flag1 = true; | |
589 | - break; | |
590 | - } | |
591 | - if (cityIds.get(i).getName().equals(shop.getCityId().toString())) { | |
592 | - flag1 = true; | |
593 | - } | |
594 | - } | |
595 | - } | |
596 | - DataDictionary dd = this.ddService.getDataDictionaryByCode(SHOP_SOURCE); | |
597 | - List<DataDictionaryValue> ddValues = null; | |
598 | - if (dd != null) { | |
599 | - ddValues = this.ddService.getDataDictionaryValue(dd.getId()); | |
600 | - } | |
601 | - if (ddValues != null && !CollectionUtils.isEmpty(ddValues)) { | |
602 | - for (int i = 0; i < ddValues.size(); i++) { | |
603 | - if ("-1".equals(ddValues.get(i).getCode())) { | |
604 | - flag2 = true; | |
605 | - break; | |
606 | - } | |
607 | - if (ddValues.get(i).getCode().equals(shop.getShopSource().toString())) { | |
608 | - flag2 = true; | |
609 | - } | |
610 | - } | |
611 | - } | |
612 | - if (flag1 == false || flag2 == false) { | |
613 | - return new ModelAndView("redirect:/shop/list.do"); | |
614 | - } | |
615 | - } | |
616 | - Result result = shopService.productCategory(in); | |
617 | - result.addResult("listQuery", listQuery); | |
618 | - return toVM("/shop/category", result.getAllResult()); | |
619 | - } | |
620 | - | |
621 | - /** | |
622 | - * this method is 关联店铺和市场 | |
623 | - * | |
624 | - * @param shopId | |
625 | - * @param marketId | |
626 | - * @return | |
627 | - * @createTime 2014年12月25日 下午6:39:39 | |
628 | - * @author liujie | |
629 | - */ | |
630 | - @RequestMapping(value = "/relateMarket", method = RequestMethod.POST) | |
631 | - @ResponseBody | |
632 | - public boolean relateMarket(@RequestParam Long shopId, @RequestParam Long marketId, @RequestParam String shopName) { | |
633 | - try { | |
634 | - boolean flag = shopService.relationMarketByStoreid(shopId, marketId); | |
635 | - LogUtils.log(LogData.builder(WebUtils.getCurrentUserName(), "会员中心", shopId + "").model("店铺管理") | |
636 | - .operation("修改").dataName(shopName).build()); | |
637 | - return flag; | |
638 | - } catch (Exception e) { | |
639 | - e.printStackTrace(); | |
640 | - } | |
641 | - return false; | |
642 | - } | |
643 | - | |
644 | - @RequestMapping("/shopAuthLevel") | |
645 | - public ModelAndView shopAuthLevel(Long shopId, String listQuery) { | |
646 | - Result result = shopService.getShopAuthLevelById(shopId); | |
647 | - Result resultShop = shopService.getShopInfoById(shopId); | |
648 | - Shop shop = (Shop) resultShop.getAllResult().get("model"); | |
649 | - if (shop != null) { | |
650 | - boolean flag1 = false; | |
651 | - boolean flag2 = false; | |
652 | - SessionContext session = SessionContext.getSessionContext(); | |
653 | - // 获取指定数据权限的所有集合 | |
654 | - List<Pair<String>> cityIds = session.dataAuth("city"); | |
655 | - if (cityIds != null && cityIds.size() > 0) { | |
656 | - for (int i = 0; i < cityIds.size(); i++) { | |
657 | - if ("-1".equals(cityIds.get(i).getName())) { | |
658 | - flag1 = true; | |
659 | - break; | |
660 | - } | |
661 | - if (cityIds.get(i).getName().equals(shop.getCityId().toString())) { | |
662 | - flag1 = true; | |
663 | - } | |
664 | - } | |
665 | - } | |
666 | - DataDictionary dd = this.ddService.getDataDictionaryByCode(SHOP_SOURCE); | |
667 | - List<DataDictionaryValue> ddValues = null; | |
668 | - if (dd != null) { | |
669 | - ddValues = this.ddService.getDataDictionaryValue(dd.getId()); | |
670 | - } | |
671 | - if (ddValues != null && !CollectionUtils.isEmpty(ddValues)) { | |
672 | - for (int i = 0; i < ddValues.size(); i++) { | |
673 | - if ("-1".equals(ddValues.get(i).getCode())) { | |
674 | - flag2 = true; | |
675 | - break; | |
676 | - } | |
677 | - if (ddValues.get(i).getCode().equals(shop.getShopSource().toString())) { | |
678 | - flag2 = true; | |
679 | - } | |
680 | - } | |
681 | - } | |
682 | - if (flag1 == false || flag2 == false) { | |
683 | - return new ModelAndView("redirect:/shop/list.do"); | |
684 | - } | |
685 | - } | |
686 | - ShopGrade shopGrade = (ShopGrade) result.getAllResult().get("model"); | |
687 | - Map<Integer, String> levelType = new HashMap<Integer, String>(); | |
688 | - if (shopGrade.getGradeId() != null && shopGrade.getGradeId() != 0) { | |
689 | - AuthLevel authLevel = authLevelService.getAuthLevelById(shopGrade.getGradeId()); | |
690 | - result.addResult("level", authLevel.getId()); | |
691 | - levelType.put(authLevel.getId().intValue(), authLevel.getLevelName()); | |
692 | - } | |
693 | - List<AuthLevel> levelList = authLevelService.getAllAuthLevel(); | |
694 | - levelType.put(0, "请选择诚信认证"); | |
695 | - if (levelList != null && levelList.size() > 0) { | |
696 | - for (int i = 0; i < levelList.size(); i++) { | |
697 | - AuthLevel authLevelTemp = levelList.get(i); | |
698 | - levelType.put(authLevelTemp.getId().intValue(), authLevelTemp.getLevelName()); | |
699 | - } | |
700 | - } | |
701 | - result.addResult("shopGrade", shopGrade); | |
702 | - result.addResult("levelType", levelType); | |
703 | - result.addResult("shopId", shopId); | |
704 | - // 保存查询条件 | |
705 | - result.addResult("listQuery", listQuery); | |
706 | - return toVM("/shop/authLevel", result.getAllResult()); | |
707 | - } | |
708 | - | |
709 | - @RequestMapping(value = "saveShopAuthLevel", method = RequestMethod.POST) | |
710 | - public ModelAndView saveShopAuthLevel(HttpServletRequest request, @RequestParam(value = "shopId") Long shopId, | |
711 | - @RequestParam(value = "level") Long levelId) { | |
712 | - String isDishonestyStr = request.getParameter("shopGrade.isDishonesty"); | |
713 | - String isSoptauthStr = request.getParameter("shopGrade.isSoptauth"); | |
714 | - String listQuery = request.getParameter("listQuery"); | |
715 | - Integer isDishonesty = 1; | |
716 | - Integer isSoptauth = 1; | |
717 | - if (StringUtils.isNotEmpty(isDishonestyStr)) { | |
718 | - isDishonesty = 2; | |
719 | - } | |
720 | - if (StringUtils.isNotEmpty(isSoptauthStr)) { | |
721 | - isSoptauth = 2; | |
722 | - } | |
723 | - if (levelId == 0) { | |
724 | - levelId = null; | |
725 | - } | |
726 | - shopService.saveShopAuthLevel(shopId, levelId, isDishonesty, isSoptauth); | |
727 | - return new ModelAndView("redirect:/shop/list.do?" + listQuery); | |
728 | - } | |
729 | - | |
730 | - @RequestMapping(value = "/shopNameShow", method = RequestMethod.GET) | |
731 | - public ModelAndView shopNameShow(Long uid) { | |
732 | - Result result = shopService.show(uid); | |
733 | - Shop shop = (Shop) result.getAllResult().get("shop"); | |
734 | - if (shop != null) { | |
735 | - Long addressId = shop.getAddressId(); | |
736 | - Result res = cityService.getCityList(addressId.intValue()); | |
737 | - List<City> cityList = (List) res.getAllResult().get("city"); | |
738 | - String addressName = ""; | |
739 | - String name1 = ""; | |
740 | - String name2 = ""; | |
741 | - String name3 = ""; | |
742 | - if (cityList != null && cityList.size() > 0) { | |
743 | - for (int i = 0; i < cityList.size(); i++) { | |
744 | - City city = cityList.get(i); | |
745 | - if (city.getLevel() == 3) { | |
746 | - name3 = city.getRegionName(); | |
747 | - } | |
748 | - if (city.getLevel() == 2) { | |
749 | - name2 = city.getRegionName(); | |
750 | - } | |
751 | - if (city.getLevel() == 1) { | |
752 | - name1 = city.getRegionName(); | |
753 | - } | |
754 | - } | |
755 | - addressName = name1 + name2 + name3 + shop.getAddressText(); | |
756 | - result.addResult("addressName", addressName); | |
757 | - } | |
758 | - } | |
759 | - if (result.isSuccess()) { | |
760 | - return toVM("/shop/show", result.getAllResult()); | |
761 | - } else { | |
762 | - return new ModelAndView("redirect:/shopNameModify/list.do"); | |
763 | - } | |
764 | - } | |
765 | - | |
766 | - /** | |
767 | - * this method is 统计归属 | |
768 | - * | |
769 | - * @param shopId | |
770 | - * @param marketId | |
771 | - * @createTime 2015年10月20日 上午10:39:39 | |
772 | - * @author LaiKui | |
773 | - */ | |
774 | - @RequestMapping(value = "/belongStatistics", method = RequestMethod.POST) | |
775 | - @ResponseBody | |
776 | - public boolean belongStatistics(@RequestParam Long shopId, @RequestParam Long marketId, | |
777 | - @RequestParam String shopName) { | |
778 | - try { | |
779 | - boolean flag = shopService.belongStatistics(shopId, marketId); | |
780 | - LogUtils.log(LogData.builder(WebUtils.getCurrentUserName(), "会员中心", shopId + "").model("店铺管理") | |
781 | - .operation("修改").dataName(shopName).build()); | |
782 | - return flag; | |
783 | - } catch (Exception e) { | |
784 | - e.printStackTrace(); | |
785 | - } | |
786 | - return false; | |
787 | - } | |
788 | - | |
789 | - /** | |
790 | - * this method is 关闭店铺申请 | |
791 | - * | |
792 | - * @param shopId | |
793 | - * @createTime 2015年11月2日 上午10:39:39 | |
794 | - * @author LaiKui | |
795 | - */ | |
796 | - @RequestMapping(value = "/closeShop", method = RequestMethod.POST) | |
797 | - @ResponseBody | |
798 | - public void closeShop(@RequestParam Long shopId, @RequestParam String reason, @RequestParam String otherReason, | |
799 | - @RequestParam Integer closeType, HttpServletResponse resp) { | |
800 | - Result resultShop = shopService.getShopInfoById(shopId); | |
801 | - Shop shop = (Shop) resultShop.getAllResult().get("model"); | |
802 | - Map<String, Object> param = Maps.newHashMap(); | |
803 | - if (shop != null) { | |
804 | - ShopCloseHistory shopCloseHistory = new ShopCloseHistory(); | |
805 | - shopCloseHistory.setState(1); | |
806 | - shopCloseHistory.setShopName(shop.getShopName()); | |
807 | - shopCloseHistory.setShopId(shop.getId()); | |
808 | - if (StringUtils.isNotEmpty(reason)) { | |
809 | - reason = reason.substring(0, reason.length() - 1); | |
810 | - shopCloseHistory.setReason(reason); | |
811 | - } | |
812 | - shopCloseHistory.setOtherReason(otherReason); | |
813 | - shopCloseHistory.setShopType(shop.getShopSource()); | |
814 | - shopCloseHistory.setIsCredit(shop.getIsDishonesty()); | |
815 | - shopCloseHistory.setPlaceAuth(shop.getIsSoptauth()); | |
816 | - shopCloseHistory.setCloseType(closeType); | |
817 | - AuthLevel authLevel = authLevelService.getAuthLevelById(shop.getGradeId()); | |
818 | - if (authLevel != null) { | |
819 | - shopCloseHistory.setCreditAuth(authLevel.getLevelName()); | |
820 | - } | |
821 | - UserInfoResp userInfoResp = memberService.getMemberInfo(shop.getUserId()); | |
822 | - if (userInfoResp != null) { | |
823 | - shopCloseHistory.setMobile(userInfoResp.getMobilePhone()); | |
824 | - } | |
825 | - shopCloseHistory.setOpenTime(shop.getAuditTime()); | |
826 | - shopCloseHistory.setReqCloseTime(new Timestamp(System.currentTimeMillis())); | |
827 | - shopCloseHistory.setCreated(new Timestamp(System.currentTimeMillis())); | |
828 | - shopCloseHistory.setYn(1); | |
829 | - shopCloseHistoryService.addShopCloseHistory(shopCloseHistory); | |
830 | - OperateLog operateLog = new OperateLog(); | |
831 | - operateLog.setOperateDataId(shopId); | |
832 | - SessionContext session = SessionContext.getSessionContext(); | |
833 | - UserTicket user = session.getUserTicket(); | |
834 | - operateLog.setOperateId(user.getId()); | |
835 | - operateLog.setOperateName(user.getRealName()); | |
836 | - operateLog.setOperateType(StateTypesUtil.shopAuthenTyupe); | |
837 | - if (closeType == 4) { | |
838 | - operateLog.setOperateRemark("申请关店"); | |
839 | - } else { | |
840 | - operateLog.setOperateRemark("申请注销"); | |
841 | - param.put("msg", "您已经提交注销店铺的申请,为了能够审核通过,请您下架该卖家的所有商品,避免在售商品产生未完结的订单而导致您的此次申请被审核失败。"); | |
842 | - } | |
843 | - operateLogService.saveOperateLog(operateLog); | |
844 | - LogUtils.log(LogData.builder(WebUtils.getCurrentUserName(), "会员中心", shopId + "").model("店铺管理") | |
845 | - .operation("提交关店/注销申请").dataName(shop.getShopName()).build()); | |
846 | - } | |
847 | - param.put("res", "success"); | |
848 | - writeJSON(resp, param); | |
849 | - } | |
850 | - | |
851 | -} |
diligrp-website-manweb/src/main/java/com/diligrp/website/manweb/controller/ShopNameModifyController.java deleted
100644 → 0
1 | -package com.diligrp.website.manweb.controller; | |
2 | - | |
3 | -import java.sql.Timestamp; | |
4 | -import java.util.HashMap; | |
5 | -import java.util.Map; | |
6 | -import java.util.regex.Matcher; | |
7 | -import java.util.regex.Pattern; | |
8 | - | |
9 | -import javax.annotation.Resource; | |
10 | -import javax.servlet.http.HttpServletRequest; | |
11 | -import javax.servlet.http.HttpServletResponse; | |
12 | - | |
13 | -import org.apache.commons.lang3.StringUtils; | |
14 | -import org.springframework.beans.factory.annotation.Value; | |
15 | -import org.springframework.stereotype.Controller; | |
16 | -import org.springframework.ui.Model; | |
17 | -import org.springframework.web.bind.annotation.RequestMapping; | |
18 | -import org.springframework.web.bind.annotation.RequestParam; | |
19 | -import org.springframework.web.bind.annotation.ResponseBody; | |
20 | -import org.springframework.web.servlet.ModelAndView; | |
21 | - | |
22 | -import com.diligrp.log.util.LogData; | |
23 | -import com.diligrp.log.util.LogUtils; | |
24 | -import com.diligrp.manage.sdk.domain.UserTicket; | |
25 | -import com.diligrp.manage.sdk.session.SessionContext; | |
26 | -import com.diligrp.website.domain.ShopNameModify; | |
27 | -import com.diligrp.website.manweb.utils.WebUtils; | |
28 | -import com.diligrp.website.rpc.ShopRPCService; | |
29 | -import com.diligrp.website.rpc.UserRPCService; | |
30 | -import com.diligrp.website.service.ShopNameModifyService; | |
31 | -import com.diligrp.website.util.dao.BaseQuery; | |
32 | -import com.diligrp.website.util.domain.Result; | |
33 | -import com.diligrp.website.util.web.BaseController; | |
34 | -import com.diligrp.website.util.web.PageTemplate; | |
35 | -import com.google.common.collect.Maps; | |
36 | -import com.yqyw.user.rpc.client.domain.output.UserInfoResp; | |
37 | - | |
38 | -/** | |
39 | - * <B>Description</B> <br /> | |
40 | - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> | |
41 | - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> | |
42 | - * <B>Company</B> 地利集团 | |
43 | - * | |
44 | - * @author LaiKui | |
45 | - * @createTime 2015年7月7日 | |
46 | - */ | |
47 | -@Controller | |
48 | -@RequestMapping("shopNameModify") | |
49 | -public class ShopNameModifyController extends BaseController { | |
50 | - | |
51 | - @Value("${project.system.domain}") | |
52 | - private String domain; | |
53 | - @Resource | |
54 | - private ShopNameModifyService shopNameModifyService; | |
55 | - @Resource | |
56 | - private UserRPCService userRPCService; | |
57 | - @Resource | |
58 | - private ShopRPCService shopRPCService; | |
59 | - private static Map<Integer, String> typeMap = new HashMap<Integer, String>(); | |
60 | - | |
61 | - static { | |
62 | - typeMap.put(0, "全部 "); | |
63 | - typeMap.put(1, "待审核"); | |
64 | - typeMap.put(2, "审核通过 "); | |
65 | - typeMap.put(3, "审核未通过"); | |
66 | - } | |
67 | - | |
68 | - @RequestMapping(value = "list") | |
69 | - public ModelAndView list(HttpServletRequest request, BaseQuery bq, | |
70 | - Model model) { | |
71 | - String mobile = request.getParameter("mobile"); | |
72 | - String stateStr = request.getParameter("state"); | |
73 | - String startTime = request.getParameter("startTime"); | |
74 | - String endTime = request.getParameter("endTime"); | |
75 | - if (StringUtils.isNotBlank(mobile)) { | |
76 | - Pattern p = Pattern.compile("^((13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$"); | |
77 | - Matcher m = p.matcher(mobile); | |
78 | - if (m.matches()) { | |
79 | - UserInfoResp userInfoResp = userRPCService.getUserInfoByMobile(mobile); | |
80 | - bq.addParam("userId", userInfoResp.getId() + ""); | |
81 | - } else { | |
82 | - bq.addParam("userId", "00000"); | |
83 | - } | |
84 | - } | |
85 | - if (StringUtils.isNotBlank(startTime)) { | |
86 | - bq.addParam("startTime", startTime + " " + "00:00:00"); | |
87 | - } | |
88 | - if (StringUtils.isNotBlank(endTime)) { | |
89 | - bq.addParam("endTime", endTime + " " + "23:59:59"); | |
90 | - } | |
91 | - if (StringUtils.isNotBlank(stateStr)) { | |
92 | - if ("0".equals(stateStr)) { | |
93 | - bq.addParam("state", null); | |
94 | - } else { | |
95 | - Integer state = Integer.parseInt(stateStr); | |
96 | - bq.addParam("state", state + ""); | |
97 | - } | |
98 | - } | |
99 | - PageTemplate page = shopNameModifyService.getShopNameModifyList(bq); | |
100 | - model.addAttribute("page", page); | |
101 | - model.addAttribute("type", typeMap); | |
102 | - model.addAttribute("mobile", mobile); | |
103 | - model.addAttribute("startTime", startTime); | |
104 | - model.addAttribute("endTime", endTime); | |
105 | - model.addAttribute("state", stateStr); | |
106 | - model.addAttribute("shopNameViewFlag", SessionContext.hasAccess("get", this.domain+"/openStore/getShopInfo.do#shopNameView")); | |
107 | - model.addAttribute("auditFlag", SessionContext.hasAccess("get", this.domain+"/shopNameModify/audit.do#audit")); | |
108 | - return toVM("shopNameModify/list", model); | |
109 | - } | |
110 | - | |
111 | - @RequestMapping("audit") | |
112 | - @ResponseBody | |
113 | - public void audit(@RequestParam("id") Long id, @RequestParam("state") Integer state, @RequestParam("refuseReason") String refuseReason, HttpServletResponse resp) { | |
114 | - ShopNameModify shopNameModify = shopNameModifyService.getShopNameModifyById(id); | |
115 | - Map<String, Object> param = Maps.newHashMap(); | |
116 | - if (shopNameModify.getState() != 1) { | |
117 | - param.put("msg", "该条记录已经被操作过了,不能再进行操作!"); | |
118 | - writeJSON(resp, param); | |
119 | - return; | |
120 | - } | |
121 | - SessionContext session = SessionContext.getSessionContext(); | |
122 | - //获取当前登录用户 | |
123 | - UserTicket user = session.getUserTicket(); | |
124 | - if (user != null) { | |
125 | - shopNameModify.setAuditUser(user.getRealName()); | |
126 | - } | |
127 | - shopNameModify.setState(state); | |
128 | - shopNameModify.setRefuseReason(refuseReason); | |
129 | - shopNameModify.setAuditTime(new Timestamp(System.currentTimeMillis())); | |
130 | - Result rst = shopNameModifyService.editShopNameModify(shopNameModify); | |
131 | - if (state == 2) { | |
132 | - shopRPCService.updateShopName(shopNameModify.getShopId(), shopNameModify.getNewShopName()); | |
133 | -// userRPCService.updateShopName(shopNameModify.getShopId(), shopNameModify.getNewShopName()); | |
134 | - } | |
135 | - param.put("success", rst.isSuccess()); | |
136 | - param.put("code", rst.getCode()); | |
137 | - LogUtils.log(LogData.builder(WebUtils.getCurrentUserName(), "会员中心", shopNameModify.getId() + "").model("店铺名称修改申请").operation("修改").dataName(rst.getMsg()).build()); | |
138 | - writeJSON(resp, param); | |
139 | - } | |
140 | - | |
141 | -} |
diligrp-website-manweb/src/main/java/com/diligrp/website/manweb/controller/WokerController.java deleted
100644 → 0
1 | -package com.diligrp.website.manweb.controller; | |
2 | - | |
3 | -import java.util.List; | |
4 | - | |
5 | -import javax.annotation.Resource; | |
6 | -import javax.servlet.http.HttpServletRequest; | |
7 | - | |
8 | -import org.springframework.stereotype.Controller; | |
9 | -import org.springframework.ui.Model; | |
10 | -import org.springframework.web.bind.annotation.RequestMapping; | |
11 | -import org.springframework.web.servlet.ModelAndView; | |
12 | - | |
13 | -import com.diligrp.website.service.WokerManWebService; | |
14 | -import com.diligrp.website.util.dao.BaseQuery; | |
15 | -import com.diligrp.website.util.web.BaseController; | |
16 | -import com.yqyw.user.rpc.client.domain.output.SpringWokerInfoResp; | |
17 | - | |
18 | -/** | |
19 | - * <B>Description</B> TODO <br /> | |
20 | - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> | |
21 | - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> | |
22 | - * <B>Company</B> 地利集团 | |
23 | - * @createTime 2014年8月7日 上午11:23:22 | |
24 | - * @author liujie | |
25 | - */ | |
26 | -@Controller | |
27 | -@RequestMapping("woker") | |
28 | -public class WokerController extends BaseController { | |
29 | - | |
30 | - @Resource | |
31 | - private WokerManWebService wokerManWebService; | |
32 | - /** | |
33 | - * | |
34 | - * this method is 获取定时任务列表 | |
35 | - * @param request | |
36 | - * @param bq | |
37 | - * @param model | |
38 | - * @return | |
39 | - * @createTime 2014年8月8日 上午11:53:49 | |
40 | - * @author liujie | |
41 | - */ | |
42 | - @RequestMapping(value = "list") | |
43 | - public ModelAndView list(HttpServletRequest request, BaseQuery bq, | |
44 | - Model model) { | |
45 | - List<SpringWokerInfoResp> list = wokerManWebService.getWokerList(); | |
46 | - model.addAttribute("list", list); | |
47 | - return toVM("woker/list", model); | |
48 | - } | |
49 | - /** | |
50 | - * | |
51 | - * this method is 启动定时任务 | |
52 | - * @param request | |
53 | - * @param bq | |
54 | - * @param model | |
55 | - * @return | |
56 | - * @createTime 2014年8月8日 上午11:54:00 | |
57 | - * @author liujie | |
58 | - */ | |
59 | - @RequestMapping(value = "start") | |
60 | - public String start(HttpServletRequest request, BaseQuery bq, Model model) { | |
61 | - String name = request.getParameter("jobName"); | |
62 | - try { | |
63 | - boolean flag = wokerManWebService.startJob(name); | |
64 | - return "redirect:/woker/list.do"; | |
65 | - } catch (Exception e) { | |
66 | - e.printStackTrace(); | |
67 | - return null; | |
68 | - } | |
69 | - | |
70 | - } | |
71 | - /** | |
72 | - * | |
73 | - * this method is 停止定时任务 | |
74 | - * @param request | |
75 | - * @param bq | |
76 | - * @param model | |
77 | - * @return | |
78 | - * @createTime 2014年8月8日 上午11:54:09 | |
79 | - * @author liujie | |
80 | - */ | |
81 | - @RequestMapping(value = "stop") | |
82 | - public String stop(HttpServletRequest request, BaseQuery bq, Model model) { | |
83 | - String name = request.getParameter("jobName"); | |
84 | - try { | |
85 | - boolean flag = wokerManWebService.stopJob(name); | |
86 | - return "redirect:/woker/list.do"; | |
87 | - } catch (Exception e) { | |
88 | - e.printStackTrace(); | |
89 | - return null; | |
90 | - } | |
91 | - } | |
92 | - /** | |
93 | - * | |
94 | - * this method is 执行一次定时任务 | |
95 | - * @param request | |
96 | - * @param bq | |
97 | - * @param model | |
98 | - * @return | |
99 | - * @createTime 2014年8月8日 上午11:54:20 | |
100 | - * @author liujie | |
101 | - */ | |
102 | - @RequestMapping(value = "runningOnce") | |
103 | - public String runningOnce(HttpServletRequest request, BaseQuery bq, | |
104 | - Model model) { | |
105 | - String name = request.getParameter("jobName"); | |
106 | - try { | |
107 | - boolean flag = wokerManWebService.runOnceJob(name); | |
108 | - return "redirect:/woker/list.do"; | |
109 | - } catch (Exception e) { | |
110 | - e.printStackTrace(); | |
111 | - return null; | |
112 | - } | |
113 | - } | |
114 | -} |
diligrp-website-manweb/src/main/java/com/diligrp/website/manweb/controller/api/MailApiController.java deleted
100644 → 0
1 | -package com.diligrp.website.manweb.controller.api; | |
2 | - | |
3 | -import java.util.HashMap; | |
4 | -import java.util.Map; | |
5 | - | |
6 | -import javax.annotation.Resource; | |
7 | -import javax.servlet.http.HttpServletRequest; | |
8 | -import javax.servlet.http.HttpServletResponse; | |
9 | - | |
10 | -import org.apache.commons.lang3.StringUtils; | |
11 | -import org.springframework.stereotype.Controller; | |
12 | -import org.springframework.web.bind.annotation.RequestMapping; | |
13 | -import org.springframework.web.bind.annotation.RequestMethod; | |
14 | -import org.springframework.web.bind.annotation.RequestParam; | |
15 | - | |
16 | -import com.alibaba.fastjson.JSON; | |
17 | -import com.diligrp.website.domain.Mail; | |
18 | -import com.diligrp.website.service.MailService; | |
19 | -import com.diligrp.website.util.code.ValidateUtils; | |
20 | -import com.diligrp.website.util.format.DateFormatUtils; | |
21 | -import com.diligrp.website.util.web.BaseController; | |
22 | -import com.diligrp.website.web.interfaces.domain.input.MailReq; | |
23 | -import com.diligrp.website.web.interfaces.domain.output.BaseResp; | |
24 | -import com.diligrp.website.web.interfaces.domain.output.MailResp; | |
25 | - | |
26 | -/** | |
27 | - * | |
28 | - * <B>Description</B> 邮件发送API <br /> | |
29 | - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br /> | |
30 | - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br /> | |
31 | - * <B>Company</B> 地利集团 | |
32 | - * @createTime 2014年6月3日 上午11:30:51 | |
33 | - * @author Wang22 | |
34 | - */ | |
35 | -@Controller | |
36 | -@RequestMapping("api/email") | |
37 | -public class MailApiController extends BaseController { | |
38 | - | |
39 | - @Resource | |
40 | - private MailService mailService; | |
41 | - | |
42 | - @RequestMapping(value = "sendEmail", method = RequestMethod.POST) | |
43 | - public void sendEmail(@RequestParam("emailJson") String emailJson, | |
44 | - HttpServletResponse resp, HttpServletRequest req) { | |
45 | - | |
46 | - BaseResp bresp = new BaseResp(); | |
47 | - | |
48 | - if (StringUtils.isEmpty(emailJson)) { | |
49 | - // 参数错误 | |
50 | - bresp.setCode(BaseResp.CODE_ILLEGAL_PARAM); | |
51 | - bresp.setMsg("argument is illegal !"); | |
52 | - writeJSON(resp, bresp); | |
53 | - return; | |
54 | - } | |
55 | - MailReq ereq = JSON.parseObject(emailJson, MailReq.class); | |
56 | - if (ereq == null) { | |
57 | - // 参数错误 | |
58 | - bresp.setCode(BaseResp.CODE_ILLEGAL_PARAM); | |
59 | - bresp.setMsg("argument is illegal !"); | |
60 | - writeJSON(resp, bresp); | |
61 | - return; | |
62 | - } | |
63 | - | |
64 | - if (!ValidateUtils.isEmail(ereq.getAddressee())) { | |
65 | - // 不是邮件格式 | |
66 | - bresp.setCode(BaseResp.CODE_ILLEGAL_PARAM); | |
67 | - bresp.setMsg("the email format error !"); | |
68 | - writeJSON(resp, bresp); | |
69 | - return; | |
70 | - } | |
71 | - | |
72 | - if (StringUtils.isEmpty(ereq.getSubject()) | |
73 | - || StringUtils.isEmpty(ereq.getContent())) { | |
74 | - // 主题和内容为空 | |
75 | - bresp.setCode(BaseResp.CODE_ILLEGAL_PARAM); | |
76 | - bresp.setMsg("the subject or content is empty !"); | |
77 | - writeJSON(resp, bresp); | |
78 | - return; | |
79 | - } | |
80 | - | |
81 | - Mail mh = makeMailHistoryByEamilReq(ereq, req.getRemoteAddr()); | |
82 | - boolean flag = mailService.sendMail(mh); | |
83 | - if (flag) { | |
84 | - bresp.setCode(BaseResp.CODE_SUCCESS); | |
85 | - } else { | |
86 | - bresp.setCode(BaseResp.CODE_FAIL); | |
87 | - bresp.setMsg("send email is fail !"); | |
88 | - } | |
89 | - | |
90 | - writeJSON(resp, bresp); | |
91 | - | |
92 | - } | |
93 | - | |
94 | - @RequestMapping(value = "sendMailByTemplate", method = RequestMethod.POST) | |
95 | - public void sendMailByTemplate(@RequestParam("emailJson") String emailJson, | |
96 | - @RequestParam("template") String template, | |
97 | - @RequestParam("paramJson") String paramJson, | |
98 | - HttpServletResponse resp, HttpServletRequest req) { | |
99 | - | |
100 | - MailResp bresp = new MailResp(); | |
101 | - | |
102 | - if (StringUtils.isEmpty(emailJson)) { | |
103 | - // 参数错误 | |
104 | - bresp.setCode(BaseResp.CODE_ILLEGAL_PARAM); | |
105 | - bresp.setMsg("argument is illegal !"); | |
106 | - writeJSON(resp, bresp); | |
107 | - return; | |
108 | - } | |
109 | - | |
110 | - MailReq ereq = JSON.parseObject(emailJson, MailReq.class); | |
111 | - if (ereq == null) { | |
112 | - // 参数错误 | |
113 | - bresp.setCode(BaseResp.CODE_ILLEGAL_PARAM); | |
114 | - bresp.setMsg("argument is illegal !"); | |
115 | - writeJSON(resp, bresp); | |
116 | - return; | |
117 | - } | |
118 | - | |
119 | - if (!ValidateUtils.isEmail(ereq.getAddressee())) { | |
120 | - // 不是邮件格式 | |
121 | - bresp.setCode(BaseResp.CODE_ILLEGAL_PARAM); | |
122 | - bresp.setMsg("the email format error !"); | |
123 | - writeJSON(resp, bresp); | |
124 | - return; | |
125 | - } | |
126 | - | |
127 | - if (StringUtils.isEmpty(ereq.getSubject())) { | |
128 | - // 主题为空 | |
129 | - bresp.setCode(BaseResp.CODE_ILLEGAL_PARAM); | |
130 | - bresp.setMsg("the subject is empty !"); | |
131 | - writeJSON(resp, bresp); | |
132 | - return; | |
133 | - } | |
134 | - @SuppressWarnings("unchecked") | |
135 | - Map<String, String> param = JSON.parseObject(paramJson, HashMap.class); | |
136 | - Mail mh = makeMailHistoryByEamilReq(ereq, req.getRemoteAddr()); | |
137 | - bresp = mailService.sendMailByTemplate(mh, template, param); | |
138 | - writeJSON(resp, bresp); | |
139 | - } | |
140 | - | |
141 | - private Mail makeMailHistoryByEamilReq(MailReq req, String ip) { | |
142 | - Mail mail = new Mail(); | |
143 | - mail.setIp(ip); | |
144 | - mail.setAddressee(req.getAddressee()); | |
145 | - mail.setSubject(req.getSubject()); | |
146 | - mail.setContent(req.getContent()); | |
147 | - mail.setCreated(DateFormatUtils.currTimestamp()); | |
148 | - mail.setModified(DateFormatUtils.currTimestamp()); | |
149 | - return mail; | |
150 | - } | |
151 | - | |
152 | -} |
diligrp-website-manweb/src/main/java/com/diligrp/website/manweb/controller/api/SMSApiController.java deleted
100644 → 0
1 | -package com.diligrp.website.manweb.controller.api; | |
2 | - | |
3 | -import javax.annotation.Resource; | |
4 | -import javax.servlet.http.HttpServletResponse; | |
5 | - | |
6 | -import com.dili.dd.monitor.MonitorLevel; | |
7 | -import com.dili.dd.monitor.MonitorService; | |
8 | -import com.dili.dd.monitor.UserMonitorType; | |
9 | -import org.apache.commons.lang3.StringUtils; | |
10 | -import org.slf4j.Logger; | |
11 | -import org.slf4j.LoggerFactory; | |
12 | -import org.springframework.stereotype.Controller; | |
13 | -import org.springframework.web.bind.annotation.RequestMapping; | |
14 | -import org.springframework.web.bind.annotation.RequestMethod; | |
15 | -import org.springframework.web.bind.annotation.RequestParam; | |
16 | - | |
17 | -import com.alibaba.fastjson.JSON; | |
18 | -import com.diligrp.website.domain.MobMessage; | |
19 | -import com.diligrp.website.service.SMSService; | |
20 | -import com.diligrp.website.util.web.BaseController; | |
21 | -import com.diligrp.website.web.interfaces.domain.input.SMSReq; | |
22 | -import com.diligrp.website.web.interfaces.domain.output.SMSResp; | |
23 | - | |
24 | -@Controller | |
25 | -@RequestMapping("api/sms") | |
26 | -public class SMSApiController extends BaseController { | |
27 | - | |
28 | - private static final Logger logger = LoggerFactory.getLogger(SMSApiController.class); | |
29 | - @Resource | |
30 | - private SMSService smsService; | |
31 | - @Resource | |
32 | - private String monitorName; | |
33 | - | |
34 | - /** | |
35 | - * 发送短信 | |
36 | - * | |
37 | - * @createTime 2014年6月4日 下午5:24:22 | |
38 | - * @author Wang22 | |
39 | - */ | |
40 | - @RequestMapping(value = "sendMSM", method = RequestMethod.POST) | |
41 | - public void sendMSM(@RequestParam("smsJson") String smsJson, | |
42 | - HttpServletResponse resp) { | |
43 | - try { | |
44 | - SMSResp smsResp = new SMSResp(); | |
45 | - if (StringUtils.isEmpty(smsJson)) { | |
46 | - // 非法参数 | |
47 | - returnResp(resp, smsResp, SMSResp.CODE_ILLEGAL_PARAM); | |
48 | - return; | |
49 | - } | |
50 | - | |
51 | - SMSReq smsReq = JSON.parseObject(smsJson, SMSReq.class); | |
52 | - | |
53 | - if (smsReq == null) { | |
54 | - // 参数错误 | |
55 | - returnResp(resp, smsResp, SMSResp.CODE_ILLEGAL_PARAM); | |
56 | - return; | |
57 | - } | |
58 | - | |
59 | - if (smsReq.getSmsMob() == null || smsReq.getSmsMob().length == 0 | |
60 | - || StringUtils.isEmpty(smsReq.getSmsText())) { | |
61 | - // 手机号码为空,或短信内容错误 | |
62 | - returnResp(resp, smsResp, SMSResp.CODE_ILLEGAL_PARAM); | |
63 | - return; | |
64 | - } | |
65 | - | |
66 | - if (smsReq.getSmsMob().length > 100) { | |
67 | - // 手机号码超过最大数 | |
68 | - returnResp(resp, smsResp, SMSResp.CODE_MOBILE_SIZE_TOO_MUCH); | |
69 | - return; | |
70 | - } | |
71 | - | |
72 | - MobMessage mm = convertSMSToMobMessage(smsReq); | |
73 | - boolean flag = smsService.sendSMS(mm); | |
74 | - if (flag) { | |
75 | - returnResp(resp, smsResp, SMSResp.CODE_SUCCESS); | |
76 | - } else { | |
77 | - returnResp(resp, smsResp, SMSResp.CODE_FAIL); | |
78 | - } | |
79 | - } catch (Exception e) { | |
80 | - logger.error("发送短信接口异常,参数:" + smsJson, e); | |
81 | - MonitorService monitorService = MonitorService.getMonitorService(monitorName); | |
82 | - monitorService.monitor("136", UserMonitorType.ERROR, MonitorLevel.LEVEL5, SMSApiController.class, "sendMSM", "发送短信接口异常,参数:" + smsJson); | |
83 | - } | |
84 | - } | |
85 | - | |
86 | - private MobMessage convertSMSToMobMessage(SMSReq req) { | |
87 | - MobMessage mm = new MobMessage(); | |
88 | - mm.setSmsMob(req.getSmsMob()); | |
89 | - mm.setSmsText(req.getSmsText()); | |
90 | - return mm; | |
91 | - } | |
92 | - | |
93 | - /** | |
94 | - * 发送返回 | |
95 | - * | |
96 | - * @param resp | |
97 | - * @param smsResp | |
98 | - * @param errCode | |
99 | - * @createTime 2014年6月4日 下午5:36:10 | |
100 | - * @author Wang22 | |
101 | - */ | |
102 | - private void returnResp(HttpServletResponse resp, SMSResp smsResp, | |
103 | - int errCode) { | |
104 | - smsResp.setCode(errCode); | |
105 | - writeJSON(resp, smsResp); | |
106 | - } | |
107 | - | |
108 | -} |