Commit 5f0b7988f877155f9e0fcc565a66a75f7b3e922d

Authored by Jiang
1 parent 59bd76fb

删除多余模块

Showing 74 changed files with 299 additions and 7835 deletions
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&amp;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&amp;characterEncoding=utf8</db.dbpool.jdbc.url>
  80 + <db.dbpool.jdbc.url>jdbc:mysql://10.28.11.162:3306/manweb?useUnicode=true&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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&amp;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   -}
diligrp-website-manweb/src/main/java/com/diligrp/website/manweb/controller/api/ShopNameModifyApi.java deleted 100644 → 0
1   -package com.diligrp.website.manweb.controller.api;
2   -
3   -import com.diligrp.website.domain.ShopNameModify;
4   -import com.diligrp.website.service.ShopNameModifyService;
5   -import com.diligrp.website.util.web.BaseController;
6   -import com.diligrp.website.web.interfaces.domain.output.BaseResp;
7   -import com.diligrp.website.web.interfaces.domain.output.ShopNameModifyResp;
8   -import org.apache.commons.lang3.StringUtils;
9   -import org.slf4j.Logger;
10   -import org.slf4j.LoggerFactory;
11   -import org.springframework.stereotype.Controller;
12   -import org.springframework.web.bind.annotation.RequestMapping;
13   -import org.springframework.web.bind.annotation.RequestParam;
14   -import org.springframework.web.bind.annotation.ResponseBody;
15   -
16   -import javax.annotation.Resource;
17   -import java.util.List;
18   -
19   -@Controller
20   -@RequestMapping("api/shopNameModify")
21   -public class ShopNameModifyApi extends BaseController {
22   -
23   - private static final Logger logger = LoggerFactory.getLogger(ShopNameModifyApi.class);
24   -
25   - @Resource
26   - private ShopNameModifyService shopNameModifyService;
27   -
28   - /**
29   - * this method is 验证店铺名称修改条件
30   - *
31   - * @param shopId,newShopName
32   - * @return ShopNameModifyResp
33   - * @createTime 2015年7月7日 上午10:33:10
34   - * @author LaiKui
35   - */
36   - @RequestMapping("checkShopNameModify")
37   - @ResponseBody
38   - public ShopNameModifyResp checkShopNameModify(@RequestParam(value = "shopId") Long shopId, String newShopName) {
39   - ShopNameModifyResp shopNameModifyResp = new ShopNameModifyResp();
40   - try {
41   - logger.debug("店铺ID:" + shopId + " 验证店铺名称修改");
42   - if (StringUtils.isNotBlank(newShopName)) {
43   - ShopNameModify shopNameModifyTemp = shopNameModifyService.getShopNameModifyByNewShopName(newShopName);
44   - if (shopNameModifyTemp != null) {
45   - shopNameModifyResp.setCode(500);
46   - shopNameModifyResp.setMsg("该店铺名称已存在申请");
47   - return shopNameModifyResp;
48   - }
49   - }
50   - List<ShopNameModify> list = shopNameModifyService.getShopNameModifyByShopId(shopId);
51   - if (list != null && list.size() > 0) {
52   - ShopNameModify shopNameModify = list.get(0);
53   - shopNameModifyResp.setCreateTime(shopNameModify.getCreated());
54   - shopNameModifyResp.setRefuseReason(shopNameModify.getRefuseReason());
55   - shopNameModifyResp.setState(shopNameModify.getState());
56   - }
57   - shopNameModifyResp.setCode(BaseResp.CODE_SUCCESS);
58   - } catch (Exception e) {
59   - logger.error("店铺ID:" + shopId + " 验证店铺名称修改出错", e);
60   - e.printStackTrace();
61   - shopNameModifyResp.setCode(BaseResp.CODE_FAIL);
62   - }
63   - return shopNameModifyResp;
64   - }
65   -
66   - /**
67   - * this method is 新增店铺名称修改申请
68   - *
69   - * @param shopId,userId,newShopName,oldShopName
70   - * @return boolean
71   - * @createTime 2015年7月7日 上午10:33:10
72   - * @author LaiKui
73   - */
74   - @RequestMapping("addShopNameModify")
75   - @ResponseBody
76   - public boolean addShopNameModify(@RequestParam(value = "shopId") Long shopId,@RequestParam(value = "userId") Long userId, @RequestParam(value = "newShopName") String newShopName,@RequestParam(value = "oldShopName") String oldShopName) {
77   - try {
78   - logger.debug("店铺ID:" + shopId + " 新增店铺名称修改申请");
79   - ShopNameModify shopNameModify = new ShopNameModify();
80   - shopNameModify.setShopId(shopId);
81   - shopNameModify.setUserId(userId);
82   - shopNameModify.setNewShopName(newShopName);
83   - shopNameModify.setOldShopName(oldShopName);
84   - shopNameModify.setState(1);
85   - return shopNameModifyService.addShopNameModify(shopNameModify);
86   - } catch (Exception e) {
87   - logger.error("店铺ID:" + shopId + " 新增店铺名称修改申请出错", e);
88   - e.printStackTrace();
89   - return false;
90   - }
91   - }
92   -
93   -}
diligrp-website-manweb/src/main/java/com/diligrp/website/manweb/utils/WebContent.java
... ... @@ -12,13 +12,11 @@ import javax.servlet.http.HttpServletResponse;
12 12  
13 13 import org.slf4j.Logger;
14 14 import org.slf4j.LoggerFactory;
15   -import org.slf4j.helpers.MessageFormatter;
16 15 import org.springframework.context.ApplicationContext;
17 16 import org.springframework.web.context.support.WebApplicationContextUtils;
18 17 import org.springframework.web.multipart.MultipartFile;
19 18  
20 19 import com.alibaba.fastjson.JSONObject;
21   -import com.dili.passport.common.model.DiliAuthTicket;
22 20 import com.diligrp.store.api.exception.ApiException;
23 21 import com.diligrp.store.api.upload.DiliStoreUpload;
24 22 import com.diligrp.website.util.security.Validator;
... ... @@ -172,26 +170,23 @@ public class WebContent {
172 170 result = storeUpload.handle(image.getInputStream(), bucketName, image.getOriginalFilename());
173 171 } catch (ApiException e) {
174 172 if (LOGGER.isErrorEnabled()) {
175   - DiliAuthTicket userInfo = DiliAuthTicket.getTicket();
176   - LOGGER.error(MessageFormatter.format("上传图片失败[accountName={}]", userInfo.getUsername()).getMessage(), e);
  173 + LOGGER.error("上传图片失败", e);
177 174 }
178 175 jon.put("success", false);
179 176 jon.put("message", "读取上传内容失败");
180 177 return jon;
181 178 } catch (IOException e) {
182 179 if (LOGGER.isErrorEnabled()) {
183   - DiliAuthTicket userInfo = DiliAuthTicket.getTicket();
184   - LOGGER.error(MessageFormatter.format("上传图片失败[accountName={}]", userInfo.getUsername()).getMessage(), e);
  180 + LOGGER.error("上传图片失败", e);
185 181 }
186 182 jon.put("success", false);
187 183 jon.put("message", "读取上传内容失败");
188 184 return jon;
189 185 }
190 186 // {"code":0,"data":{"OriginalFileName":"11.png","absoluteImgUrl":"/12/01/7C3DB75E3158C6F3F76387E5EEBD3CB5.png","imgUrls":[{"imgUrl":"http://img3.dlimg.com/images/shop/12/01/7C3DB75E3158C6F3F76387E5EEBD3CB5.png"}],"md5":"7C3DB75E3158C6F3F76387E5EEBD3CB5"},"errorMsg":"","success":true}
191   - DiliAuthTicket userInfo = DiliAuthTicket.getTicket();
192 187 if (Validator.isEmpty(result)) {
193 188 try {
194   - LOGGER.error(MessageFormatter.format("上传图片失败[accountName={}]", userInfo.getUsername()).getMessage());
  189 + LOGGER.warn("上传图片失败");
195 190 } catch (Exception e) {
196 191 LOGGER.warn(e.getMessage(), e);
197 192 }
... ... @@ -203,10 +198,7 @@ public class WebContent {
203 198 if (!object.getBoolean("success")) {
204 199 if (LOGGER.isWarnEnabled()) {
205 200 try {
206   - LOGGER.warn(
207   - MessageFormatter.format("上传图片失败[accountName={}, resultcode={}, resultmessage={}]",
208   - userInfo.getUsername()).getMessage(),
209   - object.getInteger("code"), object.getString("errorMsg"));
  201 + LOGGER.warn("上传图片失败");
210 202 } catch (Exception e) {
211 203 LOGGER.warn(e.getMessage(), e);
212 204 }
... ... @@ -217,15 +209,7 @@ public class WebContent {
217 209 }
218 210 jon.put("success", true);
219 211 String key = object.getString("key");
220   - // jon.put("shortUrl",
221   - // object.getJSONObject("data").getString("absoluteImgUrl"));
222   - // JSONArray jonArray =
223   - // object.getJSONObject("data").getJSONArray("imgUrls");
224 212 jon.put("shortUrl", String.format("%s/%s/%s", bucketName, el, key));
225   - // {"message":"http://img3.dlimg.com/images/shop/12/01/7C3DB75E3158C6F3F76387E5EEBD3CB5.png","shortUrl":"/12/01/7C3DB75E3158C6F3F76387E5EEBD3CB5.png","success":true}
226   - // jon.put("message", (index < 0) ? jonArray :
227   - // jonArray.getJSONObject(index).getString("imgUrl")); //
228   - // {"message":[{"imgUrl":"http://img3.dlimg.com/images/shop/12/01/7C3DB75E3158C6F3F76387E5EEBD3CB5.png"}],"shortUrl":"/12/01/7C3DB75E3158C6F3F76387E5EEBD3CB5.png","success":true}
229 213 jon.put("message", String.format("http://%s/%s/%s/%s", host, bucketName, el, key));
230 214 return jon;
231 215 }
... ...
diligrp-website-manweb/src/main/resources/log4j.xml
... ... @@ -34,7 +34,7 @@
34 34 </category>
35 35  
36 36 <root>
37   - <priority value="info" />
  37 + <priority value="debug" />
38 38 <appender-ref ref="ConsoleAppender" />
39 39 <appender-ref ref="RollingFileAppender" />
40 40 </root>
... ...
diligrp-website-manweb/src/main/resources/spring-hbase.xml deleted 100644 → 0
1   -<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2   -<beans xmlns="http://www.springframework.org/schema/beans"
3   - xmlns:context="http://www.springframework.org/schema/context"
4   - xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:p="http://www.springframework.org/schema/p"
5   - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6   - xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
7   - http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd"
8   - default-autowire="byName">
9   -
10   - <bean id="hbaseUtils" class="com.diligrp.website.util.hbase.HBaseUtils">
11   - <!-- 线程池数量 -->
12   - <constructor-arg value="10" />
13   - </bean>
14   -
15   -</beans>
diligrp-website-manweb/src/main/resources/spring-rpc.xml
... ... @@ -4,26 +4,12 @@
4 4 xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"
5 5 default-autowire="byName">
6 6  
7   - <bean id="userClient" class="com.yqyw.user.rpc.client.UserClient">
8   - <constructor-arg name="token" value="${website.user.token}" />
9   - <constructor-arg name="baseUrl" value="${website.user.baseUrl}" />
10   - </bean>
11   -
12 7 <bean id="websiteClient" class="com.diligrp.website.web.interfaces.WebsiteClient">
13 8 <constructor-arg name="token" value="${website.websiteClient.token}" />
14 9 <constructor-arg name="baseUrl"
15 10 value="${website.websiteClient.baseUrl}" />
16 11 </bean>
17 12  
18   - <bean id="titanClient" class="com.diligrp.titan.sdk.TitanClient">
19   - <constructor-arg name="accesskey" value="${website.titan.accesskey}" />
20   - <constructor-arg name="secretkey" value="${website.titan.secretkey}" />
21   - </bean>
22   -
23   - <bean id="orderClient" class="com.diligrp.orders.client.OrderClient">
24   - <constructor-arg value="aaa" />
25   - </bean>
26   -
27 13 <bean id="logicRPCServiceImpl" class="com.diligrp.website.rpc.impl.LogicRPCServiceImpl">
28 14 <property name="wlHost" value="${wl.url}"></property>
29 15 <property name="header">
... ... @@ -33,33 +19,6 @@
33 19 </property>
34 20 </bean>
35 21  
36   - <!-- 店铺接口 -->
37   - <bean id="shopClient" class="com.diligrp.pnr.sdk.client.ShopClient">
38   - <property name="sign" value="${manage.shopClient.sign}"></property>
39   - <property name="url" value="${manage.shopClient.url}"></property>
40   - <property name="system" value="${manage.shopClient.system}"></property>
41   - </bean>
42   -
43   - <bean class="java.lang.String" name="passportRegUrl">
44   - <constructor-arg value="${passport.register.url}" />
45   - </bean>
46   -
47   - <bean class="java.lang.String" name="passportRegSign">
48   - <constructor-arg value="${passport.interface.sign}" />
49   - </bean>
50   -
51   - <bean class="java.lang.String" name="passportRegPwd">
52   - <constructor-arg value="${passport.interface.pwd}" />
53   - </bean>
54   -
55   - <!-- <bean id="imageUploadService" class="com.dili.imageserver.sdk.service.ImageUploadService">
56   - Required Properties <property name="IMAGE_UPLOAD_URL_PREFIX" value="${project.image.server.host}"
57   - /> <property name="AUTH_TOKEN" value="LeaDOqaef8mo4G6bSq8o2bh7lEPlViRU" />
58   - Optional Properties <property name="ENCODING" value="UTF-8" /> <property
59   - name="DEFAULT_MAX_PER_ROUTE" value="20" /> <property name="MAX_TOTAL" value="100"
60   - /> Optional Domain Configuration <property name="IMAGE_SERVER_DOMAIN" value="${project.image.server.domain}"
61   - /> </bean> -->
62   -
63 22 <bean id="diliStoreUpload" class="com.diligrp.store.api.upload.DiliStoreUpload">
64 23 <constructor-arg name="url" value="${project.image.server.host}" />
65 24 <constructor-arg name="accessKey"
... ... @@ -75,17 +34,4 @@
75 34  
76 35 <bean id="md5Utils" class="com.diligrp.website.util.code.MD5Utils" />
77 36  
78   - <!-- 中国建网(sms.webchinese.cn) SMS短信发送接口实现 -->
79   - <bean id="smsRpcService"
80   - class="com.diligrp.website.rpc.impl.SMSWebChineseRPCServiceImpl">
81   - <property name="smsSwitch" value="${sms.switch}" />
82   - <property name="md5Utils" ref="md5Utils" />
83   - <property name="SMSConfig">
84   - <map>
85   - <entry key="SMSKey" value="${project.sms.webchina.SMSKey}" />
86   - <entry key="userName" value="${project.sms.webchina.userName}" />
87   - <entry key="postURL" value="${project.sms.webchina.postURL}" />
88   - </map>
89   - </property>
90   - </bean>
91 37 </beans>
92 38 \ No newline at end of file
... ...
diligrp-website-manweb/src/main/resources/spring.xml
... ... @@ -55,6 +55,5 @@
55 55 <import resource="classpath:spring-dao.xml" />
56 56 <import resource="classpath:spring-redis.xml" />
57 57 <import resource="classpath:spring-rpc.xml" />
58   - <import resource="classpath:spring-hbase.xml" />
59 58 <import resource="classpath:spring-rocketmq.xml" />
60 59 </beans>
... ...
diligrp-website-rpc/pom.xml
... ... @@ -11,7 +11,6 @@
11 11 </parent>
12 12  
13 13 <artifactId>diligrp-website-rpc</artifactId>
14   - <version>0.0.1-SNAPSHOT</version>
15 14 <name>diligrp-website-rpc</name>
16 15 <url>http://maven.apache.org</url>
17 16 <properties>
... ... @@ -41,21 +40,21 @@
41 40 </dependency>
42 41  
43 42 <!-- 接口依赖 -->
44   - <dependency>
  43 + <!-- <dependency>
45 44 <groupId>com.b2c.orders</groupId>
46 45 <artifactId>orders-client</artifactId>
47 46 <version>1.1.0-SNAPSHOT</version>
48   - </dependency>
  47 + </dependency> -->
49 48  
50   - <dependency>
  49 + <!-- <dependency>
51 50 <groupId>com.b2c.titan</groupId>
52 51 <artifactId>titan-sdk</artifactId>
53 52 <version>0.0.2-SNAPSHOT</version>
54   - </dependency>
  53 + </dependency> -->
55 54 <dependency>
56   - <groupId>com.diligrp.website.web</groupId>
  55 + <groupId>com.b2c.website.web</groupId>
57 56 <artifactId>diligrp-website-api</artifactId>
58   - <version>0.0.1-SNAPSHOT</version>
  57 + <version>1.0.5-SNAPSHOT</version>
59 58 </dependency>
60 59  
61 60 </dependencies>
... ...
diligrp-website-rpc/src/main/java/com/diligrp/website/rpc/MemberCenterAuthenRpcService.java deleted 100644 → 0
1   -package com.diligrp.website.rpc;
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日 上午11:19:20
9   - * @author liujie
10   - */
11   -public interface MemberCenterAuthenRpcService {
12   - /**
13   - *
14   - * this method is 查询用户认证列表信息
15   - * @param bq
16   - * @return
17   - * @createTime 2014年6月20日 下午3:58:47
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   - * @param operatorId
47   - * @return
48   - * @createTime 2014年6月20日 下午3:58:32
49   - * @author liujie
50   - */
51   - // boolean approveAuthen(Long userId, Integer userType, Integer authState, String auditReson,Long operatorId) throws Exception;
52   -}
diligrp-website-rpc/src/main/java/com/diligrp/website/rpc/MemberRPCService.java deleted 100644 → 0
1   -package com.diligrp.website.rpc;
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 MemberRPCService {
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-rpc/src/main/java/com/diligrp/website/rpc/OpenShopApplyRpcService.java deleted 100644 → 0
1   -package com.diligrp.website.rpc;
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月4日 下午2:22:33
16   - */
17   -public interface OpenShopApplyRpcService {
18   - /**
19   - * this method is 获取所有开店申请列表
20   - *
21   - * @param req
22   - * @return
23   - * @createTime 2014年6月18日 下午5:21:37
24   - * @author liujie
25   - */
26   - 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   - /**
29   - * this method is 获取店铺的详细信息
30   - *
31   - * @param userId
32   - * @param shopId
33   - * @return
34   - * @createTime 2014年6月20日 上午11:26:00
35   - * @author liujie
36   - */
37   - Shop getShopInfoByShopId(Long shopId);
38   -
39   - /**
40   - * this method is 审批开店申请的店铺信息
41   - *
42   - * @param shopId
43   - * @param auditRemark
44   - * @param status
45   - * @return
46   - * @createTime 2014年6月20日 上午11:26:13
47   - * @author liujie
48   - */
49   - boolean shopAudit(Long shopId, String auditRemark, Integer shopState);
50   -
51   - MemberQueryResp getUserAuthInfo(Long userId);
52   -}
diligrp-website-rpc/src/main/java/com/diligrp/website/rpc/OrdersRPCService.java deleted 100644 → 0
1   -package com.diligrp.website.rpc;
2   -
3   -/**
4   - * <B>Description</B> 订单接口
5   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
6   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
7   - * <B>Company</B> 地利集团
8   - * @createTime 2016年1月4日 下午5:21:52
9   - * @author LaiKui
10   - */
11   -public interface OrdersRPCService {
12   -
13   - /**
14   - *
15   - * 根据店铺id查询未完结订单数
16   - * @param shopId
17   - * @return
18   - * @createTime 2016年1月4日 下午5:42:13
19   - * @author LaiKui
20   - */
21   - public Integer getValidOrderNumByShop(Long shopId) ;
22   -
23   -}
diligrp-website-rpc/src/main/java/com/diligrp/website/rpc/ProductRPCService.java deleted 100644 → 0
1   -package com.diligrp.website.rpc;
2   -
3   -import java.util.List;
4   -
5   -import com.diligrp.titan.sdk.domain.Category;
6   -import com.diligrp.titan.sdk.domain.Product;
7   -import com.diligrp.website.rpc.util.exception.GwException;
8   -
9   -
10   -/**
11   - * <B>Description</B> 商品接口
12   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
13   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
14   - * <B>Company</B> 地利集团
15   - * @createTime 2014年5月21日 下午5:21:52
16   - * @author mengxf
17   - */
18   -public interface ProductRPCService {
19   -
20   - /**
21   - *
22   - * 查询多个商品详情
23   - * @param pids
24   - * @return
25   - * @createTime 2014年6月26日 下午2:42:13
26   - * @author Wang22
27   - */
28   - public List<Product> getProductInfos(List<Long> pids) throws GwException ;
29   -
30   - public List<Category> listCategoriesInfo(List cIds);
31   -}
diligrp-website-rpc/src/main/java/com/diligrp/website/rpc/PurchasingRPCService.java deleted 100644 → 0
1   -package com.diligrp.website.rpc;
2   -
3   -/**
4   - * <B>Description</B> 代购订单接口
5   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
6   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
7   - * <B>Company</B> 地利集团
8   - * @createTime 2016年3月9日 下午5:21:52
9   - * @author LaiKui
10   - */
11   -public interface PurchasingRPCService {
12   -
13   - /**
14   - *
15   - * 根据店铺id查询未完结订单数
16   - * @param shopId
17   - * @return
18   - * @createTime 2016年3月9日 下午5:42:13
19   - * @author LaiKui
20   - */
21   - public Integer getValidOrderNumByShop(Long shopId) ;
22   -
23   -}
diligrp-website-rpc/src/main/java/com/diligrp/website/rpc/SMSRPCService.java deleted 100644 → 0
1   -package com.diligrp.website.rpc;
2   -
3   -import com.diligrp.website.domain.MobMessage;
4   -
5   -/**
6   - *
7   - * <B>Description</B> 短信发送 <br />
8   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
9   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
10   - * <B>Company</B> 地利集团
11   - * @createTime 2014年6月4日 下午5:49:53
12   - * @author Wang22
13   - */
14   -public interface SMSRPCService {
15   -
16   - /**
17   - *
18   - * 发送短信
19   - * @param mm
20   - * @return
21   - * @createTime 2014年6月4日 下午5:52:06
22   - * @author Wang22
23   - */
24   - public boolean sendSMS(MobMessage mm);
25   -
26   -}
diligrp-website-rpc/src/main/java/com/diligrp/website/rpc/ShopRPCService.java deleted 100644 → 0
1   -package com.diligrp.website.rpc;
2   -
3   -import com.diligrp.pnr.sdk.domain.Shop;
4   -import com.diligrp.pnr.sdk.domain.ShopGrade;
5   -import com.diligrp.website.rpc.input.ShopInfoListInput;
6   -import com.diligrp.website.rpc.input.ShopProductCategoryListInput;
7   -import com.diligrp.website.rpc.input.ShopProductRecommendListInput;
8   -
9   -/**
10   - * <p>
11   - * Title: 〈标题〉
12   - * </p>
13   - * <p>
14   - * Description: 〈描述〉
15   - * </p>
16   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
17   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
18   - * <B>Company</B> 地利集团
19   - * <p>
20   - * CreateTime:2014/6/19
21   - * </p>
22   - *
23   - * @author zhukai
24   - */
25   -public interface ShopRPCService {
26   -
27   - /**
28   - * 查询店铺
29   - * @param in
30   - * @return
31   - */
32   - public Object list(ShopInfoListInput in);
33   -
34   - /**
35   - * 分类
36   - * @param in
37   - * @return
38   - */
39   - public Object productCategory(ShopProductCategoryListInput in);
40   -
41   - /**
42   - * 商品推荐
43   - * @param in
44   - * @return
45   - */
46   - public Object productRecommend(ShopProductRecommendListInput in);
47   -
48   - /**
49   - * 获取店铺信息
50   - * @param uid
51   - * @return
52   - */
53   - public Shop getShop(Long uid);
54   -
55   - /**
56   - *
57   - * this method is 获取店铺资质信息
58   - * @param shopId
59   - * @return
60   - * @createTime 2014年11月6日 下午5:05:08
61   - * @author mengxf
62   - */
63   - public Object getShopQualificationsByShopId(Long shopId,Integer current,Integer size);
64   -
65   - public boolean checkShopQualification(Long id,Integer state);
66   -
67   - boolean relationMarketByStoreid(Long id,Long marketId);
68   -
69   - boolean updateShopName(Long shopId,String shopName);
70   -
71   - public ShopGrade getShopAuthLevelById(Long shopId);
72   -
73   - boolean saveShopAuthLevel(Long shopId, Long levelId, Integer isDishonesty,Integer isSoptauth);
74   -
75   - public Shop getShopInfoById(Long shopId);
76   -
77   - boolean belongStatistics(Long id,Long marketId);
78   -
79   - boolean updateShopClose(Long shopId,String reason,String otherReason,Integer state);
80   -}
diligrp-website-rpc/src/main/java/com/diligrp/website/rpc/UserRPCService.java deleted 100644 → 0
1   -package com.diligrp.website.rpc;
2   -
3   -import java.util.List;
4   -
5   -import com.diligrp.website.rpc.util.exception.GwException;
6   -import com.yqyw.user.rpc.client.domain.output.MemberCreditInfoResp;
7   -import com.yqyw.user.rpc.client.domain.output.ShoppingCartResp;
8   -import com.yqyw.user.rpc.client.domain.output.UserInfoResp;
9   -
10   -public interface UserRPCService {
11   -
12   - /**
13   - * this method is 批量增加浏览历史
14   - * @param browseHistoryReq
15   - * @return
16   - * @throws GwException
17   - * @createTime 2014年6月20日 上午10:47:28
18   - * @author ipangy
19   - */
20   -// public boolean addUserBrowseBatch(List<BrowseHistoryReq> browseHistoryReq)
21   -// throws GwException;
22   -
23   - /**
24   - *
25   - * this method is 移除用户的cookie
26   - * @param userId
27   - * @return
28   - * @createTime 2014年6月20日 下午5:41:47
29   - * @author ipangy
30   - */
31   -// public boolean removeAllCookie(Long userId);
32   -
33   - /**
34   - *
35   - * this method is 根据用户ID获取用户信息
36   - * @param userId
37   - * @return
38   - * @throws GwException
39   - * @createTime 2014年6月20日 下午5:58:03
40   - * @author mengxf
41   - */
42   - public UserInfoResp getUserInfoById(long userId) throws GwException;
43   -
44   - /**
45   - *
46   - * this method is 获取用户信用额度
47   - * @param userId
48   - * @return
49   - * @throws GwException
50   - * @createTime 2014年6月24日 上午11:43:32
51   - * @author mengxf
52   - */
53   - public MemberCreditInfoResp getUserCredit(long userId) throws GwException;
54   -
55   - /**
56   - *
57   - * this method is 获取用户已删除的记录
58   - * @param userId
59   - * @param count
60   - * @return
61   - * @throws GwException
62   - * @createTime 2014年7月1日 上午11:12:46
63   - * @author jiangchengyong
64   - */
65   - public List<ShoppingCartResp> getHistoryProduct(long userId, int count)
66   - throws GwException;
67   -
68   - /**
69   - * 根据sku反查产品pid this method is TODO
70   - * @param skus
71   - * @return
72   - * @createTime 2014年7月7日 下午5:45:28
73   - * @author ipangy
74   - */
75   - public List<Long> getPidBySku(List<String> skus);
76   -
77   - public UserInfoResp getUserInfoByMobile(String mobile);
78   -
79   - public boolean updateShopName(Long shopId, String shopName);
80   -}
diligrp-website-rpc/src/main/java/com/diligrp/website/rpc/WokerRpcService.java deleted 100644 → 0
1   -package com.diligrp.website.rpc;
2   -
3   -import java.util.List;
4   -
5   -import com.yqyw.user.rpc.client.domain.output.SpringWokerInfoResp;
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   - * @createTime 2014年8月7日 上午11:18:58
14   - * @author liujie
15   - */
16   -public interface WokerRpcService {
17   - List<SpringWokerInfoResp> getWokerListInfo();
18   - public boolean startJob(String name);
19   - public boolean stopJob(String name);
20   - public boolean runOnceJob(String name);
21   -}
diligrp-website-rpc/src/main/java/com/diligrp/website/rpc/impl/MemberCenterAuthenRpcServiceImpl.java deleted 100644 → 0
1   -package com.diligrp.website.rpc.impl;
2   -
3   -import com.diligrp.website.rpc.MemberCenterAuthenRpcService;
4   -import org.springframework.stereotype.Component;
5   -
6   -
7   -/**
8   - * <B>Description</B> TODO <br />
9   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
10   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
11   - * <B>Company</B> 地利集团
12   - * @createTime 2014年6月20日 上午11:19:37
13   - * @author liujie
14   - */
15   -@Component
16   -public class MemberCenterAuthenRpcServiceImpl implements MemberCenterAuthenRpcService {
17   -// @Resource
18   -// private UserClient userClient;
19   -//
20   -// public PageTemplate getAuthenInfo(BaseQuery bq) throws Exception{
21   -// PageTemplate page =null;
22   -// if(page==null){
23   -// page = new PageTemplate();
24   -// }
25   -//
26   -// UserAuthenticationService user = userClient.getUserAuthenticationService();
27   -// ListUserAuthenticationStateResp list = user.getAuthenticationList(bq.getCurrPage(), bq.getPageSize(), bq.getParam());
28   -// page.setList(list.getData());
29   -// page.setPageSize(list.getPageSize());
30   -// page.setCurrPage(list.getPage());
31   -// page.setTotalSize(list.getTotal());
32   -// return page;
33   -// }
34   -//
35   -// /* (non-Javadoc)
36   -// * @see com.diligrp.website.rpc.MemberCenterAuthenRpcService#getUserInfoById(java.lang.Long)
37   -// */
38   -// @Override
39   -// public UserExtension getUserInfoById(Long userId) throws Exception{
40   -// return userClient.getUserAuthenticationService().getUserExtensionInfoByUserId(userId);
41   -// }
42   -//
43   -// /* (non-Javadoc)
44   -// * @see com.diligrp.website.rpc.MemberCenterAuthenRpcService#getEnterpriseInfoById(java.lang.Long)
45   -// */
46   -// @Override
47   -// public EnterpriseInfo getEnterpriseInfoById(Long companyId)throws Exception {
48   -// return userClient.getUserAuthenticationService().getUserEnterpriseInfoByUserId(companyId);
49   -// }
50   -//
51   -// /* (non-Javadoc)
52   -// * @see com.diligrp.website.rpc.MemberCenterAuthenRpcService#approveAuthen(java.lang.Long, java.lang.Integer, java.lang.Integer, java.lang.String)
53   -// */
54   -// @Override
55   -// public boolean approveAuthen(Long userId, Integer userType,
56   -// Integer authState, String auditReson,Long operatorId)throws Exception {
57   -// boolean flag = userClient.getUserAuthenticationService().submitAuditUserAuthentication(userId, userType, authState, auditReson, operatorId);
58   -// return flag;
59   -// }
60   -}
diligrp-website-rpc/src/main/java/com/diligrp/website/rpc/impl/MemberRPCServiceImpl.java deleted 100644 → 0
1   -package com.diligrp.website.rpc.impl;
2   -
3   -import java.sql.Timestamp;
4   -import java.text.ParseException;
5   -import java.text.SimpleDateFormat;
6   -import java.util.List;
7   -
8   -import javax.annotation.Resource;
9   -
10   -import org.apache.commons.lang3.StringUtils;
11   -import org.springframework.stereotype.Component;
12   -
13   -import com.diligrp.website.rpc.MemberRPCService;
14   -import com.diligrp.website.util.dao.BaseQuery;
15   -import com.diligrp.website.util.web.PageTemplate;
16   -import com.yqyw.user.rpc.client.UserClient;
17   -import com.yqyw.user.rpc.client.domain.input.CreditLimitReq;
18   -import com.yqyw.user.rpc.client.domain.input.FavoriteInfo;
19   -import com.yqyw.user.rpc.client.domain.input.LockMemberReq;
20   -import com.yqyw.user.rpc.client.domain.input.MemberQueryReq;
21   -import com.yqyw.user.rpc.client.domain.output.DefaultResp;
22   -import com.yqyw.user.rpc.client.domain.output.EnterpriseInfoResp;
23   -import com.yqyw.user.rpc.client.domain.output.ListFavoriteByPagingResp;
24   -import com.yqyw.user.rpc.client.domain.output.LockMemberResp;
25   -import com.yqyw.user.rpc.client.domain.output.MemberCreditInfoResp;
26   -import com.yqyw.user.rpc.client.domain.output.MemberCreditOptionLogResp;
27   -import com.yqyw.user.rpc.client.domain.output.MemberQueryResp;
28   -import com.yqyw.user.rpc.client.domain.output.UserExtensionResp;
29   -import com.yqyw.user.rpc.client.domain.output.UserInfoResp;
30   -
31   -@Component("memberRPCService")
32   -public class MemberRPCServiceImpl implements MemberRPCService {
33   -
34   - @Resource
35   - private UserClient userClient;
36   -
37   - @Override
38   - public PageTemplate query(BaseQuery bq) {
39   - MemberQueryReq req = convertReq(bq);
40   - MemberQueryResp resp = userClient.getMemberService().query(req);
41   - return convertPage(bq, resp);
42   - }
43   -
44   - @Override
45   - public LockMemberResp getLockUser(Long id) {
46   - return userClient.getMemberService().getLockMember(id);
47   - }
48   -
49   - @Override
50   - public boolean lockMember(LockMemberReq req) {
51   - DefaultResp resp = userClient.getMemberService().lockMember(req);
52   - return resp.getCode() == DefaultResp.CODE_SUCCESS;
53   - }
54   -
55   - @Override
56   - public boolean unlockMember(LockMemberReq req) {
57   - DefaultResp resp = userClient.getMemberService().lockMember(req);
58   - if(resp == null){
59   - return false;
60   - }
61   - return resp.getCode() == DefaultResp.CODE_SUCCESS;
62   - }
63   -
64   - @Override
65   - public List<MemberCreditOptionLogResp> getCreditHistory(Long memberId) {
66   - return userClient.getMemberService().getCreditHistory(memberId);
67   - }
68   -
69   - @Override
70   - public MemberCreditInfoResp getCreditInfo(Long memberId) {
71   - return userClient.getMemberService().getCreditInfo(memberId);
72   - }
73   -
74   - @Override
75   - public DefaultResp updateCreditLimit(CreditLimitReq req) {
76   - return userClient.getMemberService().updateCreditLimit(req);
77   - }
78   -
79   - @Override
80   - public UserInfoResp getMemberInfo(Long uid) {
81   - return userClient.getUserInfoService().getUserInfoById(uid);
82   - }
83   -
84   -// @Override
85   -// public ListBrowseHistoryResp historyList(Integer type,Long userId, BaseQuery bq) {
86   -// QueryDateTypeEnum date = null;
87   -// switch (type) {
88   -// case 1:
89   -// date = QueryDateTypeEnum.Month;
90   -// break;
91   -// case 2:
92   -// date = QueryDateTypeEnum.Quarter;
93   -// break;
94   -// case 3:
95   -// date = QueryDateTypeEnum.Year;
96   -// break;
97   -// default:
98   -// date = QueryDateTypeEnum.All;
99   -// break;
100   -// }
101   -// return userClient.getBrowseHistoryService().listByCondition(bq, userId, date);
102   -// }
103   -
104   - @Override
105   - public UserExtensionResp getMemberExtension(Long uid) {
106   - return userClient.getUserInfoService().getUserExtension(uid);
107   - }
108   -
109   - @Override
110   - public EnterpriseInfoResp getEnterpriseByUserId(Long uid) {
111   - return userClient.getUserInfoService().getUserEnterprise(uid);
112   - }
113   -
114   - @Override
115   - public ListFavoriteByPagingResp getMemberFavorite(FavoriteInfo info,
116   - Integer currPage, Integer pageSize) {
117   - return userClient.getFavoriteService().list(info, currPage, pageSize);
118   - }
119   -
120   - private MemberQueryReq convertReq(BaseQuery bq) {
121   - MemberQueryReq req = new MemberQueryReq();
122   - // 页码
123   - req.setPageIndex(bq.getCurrPage());
124   - req.setPageSize(bq.getPageSize());
125   - // 条件
126   - req.setAccountName(bq.getParam().get("accountName"));
127   - req.setTelephone(bq.getParam().get("telephone"));
128   - req.setUserId(bq.getParam().get("userId"));
129   - // 用户类型
130   - String tmp = bq.getParam().get("userType");
131   - Integer userType = StringUtils.isEmpty(tmp) ? null : Integer.parseInt(tmp);
132   - req.setUserType(userType);
133   - // 店铺类型
134   - tmp = bq.getParam().get("shopStatus");
135   - Integer shopStatus = StringUtils.isEmpty(tmp) ? null : Integer.parseInt(tmp);
136   - req.setShopStatus(shopStatus);
137   -
138   - SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
139   - Timestamp startTime = null;
140   - Timestamp endTime = null;
141   - try {
142   - // 开始时间,结束时间
143   - tmp = bq.getParam().get("startTime");
144   - startTime = StringUtils.isEmpty(tmp) ? null : new Timestamp(format.parse(tmp).getTime());
145   - tmp = bq.getParam().get("endTime");
146   - endTime = StringUtils.isEmpty(tmp) ? null : new Timestamp(format.parse(tmp).getTime());
147   - } catch (ParseException e) {
148   - // skip
149   - }
150   -
151   - req.setStartTime(startTime);
152   - req.setEndTime(endTime);
153   -
154   - return req;
155   - }
156   -
157   - private PageTemplate convertPage(BaseQuery bq, MemberQueryResp resp) {
158   - List<?> list = resp == null ? null : resp.getList();
159   - int totalSize = resp == null ? 0 : resp.getTotalSize();
160   - return PageTemplate.create(bq, totalSize, list);
161   - }
162   -
163   -}
diligrp-website-rpc/src/main/java/com/diligrp/website/rpc/impl/OpenShopApplyServiceRpcImpl.java deleted 100644 → 0
1   -package com.diligrp.website.rpc.impl;
2   -
3   -import javax.annotation.Resource;
4   -
5   -import org.springframework.stereotype.Component;
6   -
7   -import com.diligrp.pnr.sdk.client.ShopClient;
8   -import com.diligrp.pnr.sdk.domain.PageResult;
9   -import com.diligrp.pnr.sdk.domain.Shop;
10   -import com.diligrp.pnr.sdk.req.Param;
11   -import com.diligrp.pnr.sdk.resp.BaseResp;
12   -import com.diligrp.website.rpc.OpenShopApplyRpcService;
13   -import com.diligrp.website.util.web.PageTemplate;
14   -import com.yqyw.user.rpc.client.UserClient;
15   -import com.yqyw.user.rpc.client.domain.input.MemberQueryReq;
16   -import com.yqyw.user.rpc.client.domain.output.MemberQueryResp;
17   -
18   -
19   -/**
20   - * <B>Description</B> TODO <br />
21   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
22   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
23   - * <B>Company</B> 地利集团
24   - *
25   - * @author liujie
26   - * @createTime 2014年6月4日 下午2:23:08
27   - */
28   -@Component
29   -public class OpenShopApplyServiceRpcImpl implements OpenShopApplyRpcService {
30   - @Resource
31   - private UserClient userClient;
32   - @Resource
33   - private ShopClient shopClient;
34   -
35   - /* (non-Javadoc)
36   - * @see com.diligrp.website.rpc.AuthenticationManageService#getUserInfo()
37   - */
38   - @Override
39   - public PageTemplate getUserInfo(Integer pageSize, Integer pageIndex, String shopName, String contactUser, String contactPhone, Long startTime, Long endTime, Integer shopState, String id,String cityId,String shopSource) {
40   - // 设置请求参数
41   - Param param = Param.create();
42   - param.add("size", pageSize);
43   - param.add("current", pageIndex);
44   - param.add("shopName", shopName);
45   - param.add("accountName", contactUser);
46   - param.add("contactPhone", contactPhone);
47   - param.add("shopState", shopState);
48   - param.add("id", id);
49   - param.add("startTime", startTime);
50   - param.add("endTime", endTime);
51   - param.add("cityId", cityId);
52   - param.add("shopSource", shopSource);
53   -
54   - // 设置业务编码,传入请求参数
55   - BaseResp resp = shopClient.execute("shop.info.query", param);
56   - PageResult<Shop> pageResult = resp.getPageResult(Shop.class);
57   - PageTemplate page = new PageTemplate();
58   - page.setCurrPage(pageResult.getCurrPage());
59   - page.setPageSize(pageResult.getPageSize());
60   - page.setList(pageResult.getList());
61   - page.setTotalSize(pageResult.getTotalSize());
62   - return page;
63   - }
64   -
65   - /* (non-Javadoc)
66   - * @see com.diligrp.website.rpc.OpenShopApplyRpcService#getShopInfoByShopIdAndUserId(java.lang.Long, java.lang.Long)
67   - */
68   - @Override
69   - public Shop getShopInfoByShopId(Long shopId) {
70   - // 设置请求参数
71   - Param param = Param.create();
72   - param.add("shopId", shopId);
73   - // 设置业务编码,传入请求参数
74   - BaseResp resp = shopClient.execute("shop.info.getShopInfo", param);
75   - Shop shop = resp.getData(Shop.class);
76   - return shop;
77   - }
78   -
79   - /* (non-Javadoc)
80   - * @see com.diligrp.website.rpc.OpenShopApplyRpcService#updateShopStatus(java.lang.Long, java.lang.String, java.lang.String)
81   - */
82   - @Override
83   - public boolean shopAudit(Long shopId, String auditRemark, Integer shopState) {
84   - // 设置请求参数
85   - Param param = Param.create();
86   - param.add("id", shopId);
87   - param.add("shopState", shopState);
88   - param.add("auditRemark", auditRemark);
89   - // 设置业务编码,传入请求参数
90   - BaseResp resp = shopClient.execute("shop.info.audit", param);
91   - if (resp.getCode() == 200) {
92   - return true;
93   - }
94   - return false;
95   - }
96   -
97   - @Override
98   - public MemberQueryResp getUserAuthInfo(Long userId) {
99   - MemberQueryReq req = new MemberQueryReq();
100   - // 页码
101   - req.setPageIndex(0);
102   - req.setPageSize(20);
103   - // 条件
104   - req.setUserId(String.valueOf(userId));
105   - return userClient.getMemberService().query(req);
106   - }
107   -
108   -}
diligrp-website-rpc/src/main/java/com/diligrp/website/rpc/impl/OrdersRPCServiceImpl.java deleted 100644 → 0
1   -package com.diligrp.website.rpc.impl;
2   -
3   -import com.diligrp.orders.client.OrderClient;
4   -import com.diligrp.orders.client.domain.output.BaseOutput;
5   -import com.diligrp.website.rpc.OrdersRPCService;
6   -import org.slf4j.Logger;
7   -import org.slf4j.LoggerFactory;
8   -import org.springframework.stereotype.Service;
9   -
10   -import javax.annotation.Resource;
11   -
12   -
13   -/**
14   - * <B>Description</B> 商品接口
15   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
16   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
17   - * <B>Company</B> 地利集团
18   - *
19   - * @author mengxf
20   - * @createTime 2014年5月21日 下午5:32:34
21   - */
22   -@Service
23   -public class OrdersRPCServiceImpl implements OrdersRPCService {
24   -
25   - private static final Logger log = LoggerFactory.getLogger(OrdersRPCServiceImpl.class);
26   -
27   - @Resource
28   - private OrderClient orderClient;
29   -
30   - @Override
31   - public Integer getValidOrderNumByShop(Long shopId){
32   - try {
33   - BaseOutput<Integer> baseOutput = orderClient.getOrderService().getValidOrderNumByShop(shopId);
34   - if(baseOutput!=null){
35   - return baseOutput.getData();
36   - }
37   - } catch (Exception e) {
38   - log.error("获取未完结订单数量失败", e);
39   - }
40   - return null;
41   - }
42   -}
diligrp-website-rpc/src/main/java/com/diligrp/website/rpc/impl/ProductRPCServiceImpl.java deleted 100644 → 0
1   -package com.diligrp.website.rpc.impl;
2   -
3   -import java.util.List;
4   -
5   -import javax.annotation.Resource;
6   -
7   -import org.slf4j.Logger;
8   -import org.slf4j.LoggerFactory;
9   -import org.springframework.stereotype.Service;
10   -
11   -import com.diligrp.titan.sdk.TitanClient;
12   -import com.diligrp.titan.sdk.domain.Category;
13   -import com.diligrp.titan.sdk.domain.Product;
14   -import com.diligrp.titan.sdk.output.BaseOutput;
15   -import com.diligrp.website.rpc.ProductRPCService;
16   -import com.diligrp.website.rpc.util.exception.GwException;
17   -
18   -/**
19   - * <B>Description</B> 商品接口 <B>Copyright</B> Copyright (c) 2014 www.diligrp.com
20   - * All rights reserved. <br />
21   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
22   - * <B>Company</B> 地利集团
23   - *
24   - * @author mengxf
25   - * @createTime 2014年5月21日 下午5:32:34
26   - */
27   -@Service
28   -public class ProductRPCServiceImpl implements ProductRPCService {
29   -
30   - private static final Logger log = LoggerFactory.getLogger(ProductRPCServiceImpl.class);
31   -
32   - @Resource
33   - private TitanClient titanClient;
34   -
35   - @Override
36   - public List<Product> getProductInfos(List<Long> pids) throws GwException {
37   - BaseOutput<List<Product>> baseOutput;
38   - List<Product> list;
39   - String[] full = { "attribute", "auth", "video", "subCates", "cate" };
40   - try {
41   - baseOutput = titanClient.getProductService().getProductInfo(pids, full);
42   - list = baseOutput.getData();
43   - } catch (Exception e) {
44   - log.error("获取商品详情失败", e);
45   - throw new GwException("获取商品详情失败", e);
46   - }
47   - return list;
48   - }
49   -
50   - @Override
51   - public List<Category> listCategoriesInfo(List cIds) {
52   - BaseOutput<List<Category>> baseOutput;
53   - List<Category> list = null;
54   - try {
55   - baseOutput = titanClient.getCategoryService().listCategoriesInfo(cIds);
56   - list = baseOutput.getData();
57   - } catch (Exception e) {
58   - log.error("获取商品详情失败", e);
59   - }
60   - return list;
61   - }
62   -
63   -}
diligrp-website-rpc/src/main/java/com/diligrp/website/rpc/impl/PurchasingRPCServiceImpl.java deleted 100644 → 0
1   -package com.diligrp.website.rpc.impl;
2   -
3   -import com.diligrp.orders.client.OrderClient;
4   -import com.diligrp.orders.client.domain.output.BaseOutput;
5   -import com.diligrp.website.rpc.PurchasingRPCService;
6   -import org.slf4j.Logger;
7   -import org.slf4j.LoggerFactory;
8   -import org.springframework.stereotype.Service;
9   -
10   -import javax.annotation.Resource;
11   -
12   -
13   -/**
14   - * <B>Description</B> 代购订单接口
15   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
16   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
17   - * <B>Company</B> 地利集团
18   - *
19   - * @author mengxf
20   - * @createTime 2016年3月9日 下午5:32:34
21   - */
22   -@Service
23   -public class PurchasingRPCServiceImpl implements PurchasingRPCService {
24   -
25   - private static final Logger log = LoggerFactory.getLogger(PurchasingRPCServiceImpl.class);
26   -
27   - @Resource
28   - private OrderClient orderClient;
29   -
30   - @Override
31   - public Integer getValidOrderNumByShop(Long shopId){
32   - try {
33   -// BaseOutput<Integer> baseOutput = orderClient.getPurchaseOrderService().getValidOrderNumByShop(shopId);
34   -// if(baseOutput!=null){
35   -// return baseOutput.getData();
36   -// }
37   - return null;
38   - } catch (Exception e) {
39   - log.error("获取未完结订单数量失败", e);
40   - }
41   - return null;
42   - }
43   -}
diligrp-website-rpc/src/main/java/com/diligrp/website/rpc/impl/SMSWebChineseRPCServiceImpl.java deleted 100644 → 0
1   -package com.diligrp.website.rpc.impl;
2   -
3   -import java.util.Map;
4   -
5   -import org.apache.commons.httpclient.HttpClient;
6   -import org.apache.commons.httpclient.NameValuePair;
7   -import org.apache.commons.httpclient.methods.PostMethod;
8   -import org.apache.commons.lang3.StringUtils;
9   -import org.slf4j.Logger;
10   -import org.slf4j.LoggerFactory;
11   -
12   -import com.diligrp.website.domain.MobMessage;
13   -import com.diligrp.website.rpc.SMSRPCService;
14   -import com.diligrp.website.util.code.MD5Utils;
15   -import com.google.common.collect.Maps;
16   -
17   -/**
18   - *
19   - * <B>Description</B> 中国建网(sms.webchinese.cn) SMS短信发送接口实现 <br />
20   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
21   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
22   - * <B>Company</B> 地利集团
23   - * @createTime 2014年6月4日 下午5:52:35
24   - * @author Wang22
25   - */
26   -public class SMSWebChineseRPCServiceImpl implements SMSRPCService {
27   -
28   - private static final Logger LOG = LoggerFactory.getLogger(SMSWebChineseRPCServiceImpl.class);
29   -
30   - private Map<String, String> SMSConfig;
31   -
32   - private MD5Utils md5Utils = new MD5Utils();
33   -
34   - private boolean smsSwitch;
35   -
36   - public static void main(String[] args) {
37   -// <project.sms.webchina.SMSKey>2cf3264488ee3beef224</project.sms.webchina.SMSKey>
38   -// <project.sms.webchina.userName>itly</project.sms.webchina.userName>
39   -// <project.sms.webchina.postURL>http://gbk.sms.webchinese.cn</project.sms.webchina.postURL>
40   -// <entry key="SMSKey" value="${project.sms.webchina.SMSKey}" />
41   -// <entry key="userName" value="${project.sms.webchina.userName}" />
42   -// <entry key="postURL" value="${project.sms.webchina.postURL}" />
43   - Map<String, String> smsCfg = Maps.newHashMap();
44   - smsCfg.put("SMSKey", "2cf3264488ee3beef224");
45   - smsCfg.put("userName", "itly");
46   - smsCfg.put("postURL", "http://gbk.sms.webchinese.cn");
47   -
48   - SMSWebChineseRPCServiceImpl sms = new SMSWebChineseRPCServiceImpl();
49   - sms.setSMSConfig(smsCfg);
50   -
51   - MobMessage mm = new MobMessage();
52   - mm.setSmsMob("13693447275");
53   - mm.setSmsText("text");
54   - sms.sendSMS(mm);
55   -
56   - }
57   -
58   - @Override
59   - public boolean sendSMS(MobMessage mm) {
60   - // 如果短信发送关闭,直接返回true
61   - if(!smsSwitch){
62   - LOG.info("调用 sms.webchinese.cn 短信接口 ,手机号:" + StringUtils.join(mm.getSmsMob(), ",") + ",短信内容:" + mm.getSmsText());
63   - return true;
64   - }
65   - for (int i = 0; i < 5; i++) {
66   - SMSState state = postSMS(mm);
67   - if (state != SMSState.EXCEPTION) {
68   - return true;
69   - }
70   - LOG.info("调用接口异常,尝试重新调用,尝试第" + (i + 1) + "次");
71   - }
72   - return false;
73   - }
74   -
75   - /**
76   - *
77   - * 发送短信
78   - * @param mm 发送短信对象
79   - * @return
80   - * @throws Exception
81   - * @createTime 2014年7月17日 下午7:08:18
82   - * @author Wang22
83   - */
84   - private SMSState postSMS(MobMessage mm) {
85   - HttpClient client = new HttpClient();
86   - PostMethod post = new PostMethod(SMSConfig.get("postURL"));
87   - post.addRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=gbk");
88   -
89   - String md5Key = md5Utils.getMD5ofStr(SMSConfig.get("SMSKey"));
90   - String userName = SMSConfig.get("userName");
91   -
92   - String smsMobs = StringUtils.join(mm.getSmsMob(), ",");
93   -
94   - NameValuePair[] data = { new NameValuePair("Uid", userName),
95   - new NameValuePair("KeyMD5", md5Key),
96   - new NameValuePair("smsMob", smsMobs),
97   - new NameValuePair("smsText", mm.getSmsText()) };
98   -
99   - post.setRequestBody(data);
100   -
101   - SMSState state = SMSState.FAIL;
102   - try {
103   - LOG.info("调用 sms.webchinese.cn 短信接口 ,手机号:" + smsMobs + ",短信内容:" + mm.getSmsText());
104   - client.setTimeout(5000);
105   - client.executeMethod(post);
106   - int statusCode = post.getStatusCode();
107   - if (statusCode == 200) {
108   - String result = new String(post.getResponseBodyAsString().getBytes("gbk"));
109   - state = getSMSState(userName, smsMobs, Integer.parseInt(result));
110   - return state;
111   - } else {
112   - LOG.info("调用 sms.webchinese.cn 接口失败,可能由于接口放内部原因,返回码:" + statusCode);
113   - }
114   - throw new Exception();
115   - } catch (Exception e) {
116   - LOG.error("调用 sms.webchinese.cn 接口异常", e);
117   - state = SMSState.EXCEPTION;
118   - } finally {
119   - post.releaseConnection();
120   - }
121   - return state;
122   - }
123   -
124   - /**
125   - *
126   - * 获取调用状态
127   - * @param userName
128   - * @param smsMobs
129   - * @param state
130   - * @param rstCode
131   - * @return
132   - * @createTime 2014年7月17日 下午7:25:31
133   - * @author Wang22
134   - */
135   - private SMSState getSMSState(String userName, String smsMobs, int rstCode) {
136   - SMSState state = SMSState.FAIL;
137   - switch (rstCode) {
138   - case -1:
139   - LOG.info("调用 sms.webchinese.cn 短信接口失败,原因:没有该用户账户" + userName);
140   - break;
141   - case -2:
142   - LOG.info("调用 sms.webchinese.cn 短信接口失败,原因:接口密钥不正确");
143   - break;
144   - case -21:
145   - LOG.info("调用 sms.webchinese.cn 短信接口失败,原因:MD5接口密钥加密不正确");
146   - break;
147   - case -3:
148   - LOG.info("调用 sms.webchinese.cn 短信接口失败,原因:短信数量不足");
149   - break;
150   - case -11:
151   - LOG.info("调用 sms.webchinese.cn 短信接口失败,原因:该用户被禁用");
152   - break;
153   - case -14:
154   - LOG.info("调用 sms.webchinese.cn 短信接口失败,原因:短信内容出现非法字符");
155   - break;
156   - case -4:
157   - LOG.info("调用 sms.webchinese.cn 短信接口失败,原因:手机号格式不正确 " + smsMobs );
158   - break;
159   - case -41:
160   - LOG.info("调用 sms.webchinese.cn 短信接口失败,原因:手机号码为空");
161   - break;
162   - case -42:
163   - LOG.info("调用 sms.webchinese.cn 短信接口失败,原因:短信内容为空");
164   - break;
165   - case -51:
166   - LOG.info("调用 sms.webchinese.cn 短信接口失败,原因:短信签名格式不正确,接口签名格式为:【签名内容】");
167   - break;
168   - default:
169   - LOG.info("调用 sms.webchinese.cn 短信接口 ,短信发送成功,手机号:" + smsMobs);
170   - state = SMSState.SUCCESS;
171   - break;
172   - }
173   - return state;
174   - }
175   -
176   - /**
177   - * set value of SMSWebChineseRPCServiceImpl.sMSConfig
178   - * @param sMSConfig the sMSConfig to set
179   - * @createTime 2014年6月5日 下午1:40:06
180   - * @author Wang22
181   - */
182   - public void setSMSConfig(Map<String, String> sMSConfig) {
183   - SMSConfig = sMSConfig;
184   - }
185   -
186   - /**
187   - * set value of SMSWebChineseRPCServiceImpl.md5Utils
188   - * @param md5Utils the md5Utils to set
189   - * @createTime 2014年6月5日 下午1:40:06
190   - * @author Wang22
191   - */
192   - public void setMd5Utils(MD5Utils md5Utils) {
193   - this.md5Utils = md5Utils;
194   - }
195   -
196   - public enum SMSState {
197   - SUCCESS, FAIL, EXCEPTION
198   - }
199   -
200   - public boolean isSmsSwitch() {
201   - return smsSwitch;
202   - }
203   -
204   - public void setSmsSwitch(boolean smsSwitch) {
205   - this.smsSwitch = smsSwitch;
206   - }
207   -
208   -}
diligrp-website-rpc/src/main/java/com/diligrp/website/rpc/impl/ShopRPCServiceImpl.java deleted 100644 → 0
1   -package com.diligrp.website.rpc.impl;
2   -
3   -import javax.annotation.Resource;
4   -
5   -import org.slf4j.Logger;
6   -import org.slf4j.LoggerFactory;
7   -import org.springframework.stereotype.Component;
8   -
9   -import com.diligrp.pnr.sdk.client.ShopClient;
10   -import com.diligrp.pnr.sdk.domain.Shop;
11   -import com.diligrp.pnr.sdk.domain.ShopGrade;
12   -import com.diligrp.pnr.sdk.req.Param;
13   -import com.diligrp.pnr.sdk.resp.BaseResp;
14   -import com.diligrp.website.rpc.ShopRPCService;
15   -import com.diligrp.website.rpc.input.ShopInfoListInput;
16   -import com.diligrp.website.rpc.input.ShopProductCategoryListInput;
17   -import com.diligrp.website.rpc.input.ShopProductRecommendListInput;
18   -import com.yqyw.user.rpc.client.UserClient;
19   -
20   -/**
21   - * <p>
22   - * Title: 〈标题〉
23   - * </p>
24   - * <p>
25   - * Description: 〈描述〉
26   - * </p>
27   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
28   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
29   - * <B>Company</B> 地利集团
30   - * <p>
31   - * CreateTime:2014/6/19
32   - * </p>
33   - *
34   - * @author zhukai
35   - */
36   -@Component
37   -public class ShopRPCServiceImpl implements ShopRPCService {
38   -
39   - private static final Logger log = LoggerFactory
40   - .getLogger(ShopRPCServiceImpl.class);
41   - @Resource
42   - private UserClient userClient;
43   - @Resource
44   - private ShopClient shopClient;
45   -
46   - /**
47   - * 查询店铺
48   - *
49   - * @param in
50   - * @return
51   - */
52   - public Object list(ShopInfoListInput in) {
53   - // 设置请求参数
54   - Param param = Param.create();
55   - param.add("currentPage", in.getCurrentPage());
56   - param.add("pageDataSize", in.getPageDataSize());
57   - param.add("shopName", in.getShopName());
58   - param.add("msisdn", in.getMobile());
59   - param.add("shopId", in.getShopId());
60   - param.add("beginAuditTime", in.getStartTime());
61   - param.add("endAuditTime", in.getEndTime());
62   - if(!"0".equals(in.getGradeState()+"")){
63   - param.add("gradeState", in.getGradeState());
64   - }
65   - if(!"0".equals(in.getIsDishonesty()+"")){
66   - param.add("isDishonesty", in.getIsDishonesty());
67   - }
68   - if(!"0".equals(in.getIsSoptauth()+"")){
69   - param.add("isSoptauth", in.getIsSoptauth());
70   - }
71   - if(!"0".equals(in.getLevelState()+"")){
72   - param.add("levelState", in.getLevelState());
73   - }
74   - if(!"0".equals(in.getStatisticsMarket()+"")){
75   - param.add("isStatisticsMarket", in.getStatisticsMarket());
76   - }
77   - if(!"0".equals(in.getMarket()+"")){
78   - param.add("statisticsMarket", in.getMarket());
79   - }
80   - if (!"0".equals(in.getShopStatus() + "") && in.getShopStatus() != null) {
81   - param.add("shopState", in.getShopStatus());
82   - } else {
83   - param.add("shopState", "2,4");
84   - }
85   - param.add("cityId", in.getCityId());
86   - param.add("shopSource", in.getShopSource());
87   - try {
88   - BaseResp resp = shopClient.execute("shop.info.listShopInfo", param);
89   - if (resp.getCode() != 200) {
90   - log.warn("查询店铺信息出错!" + resp.getCode());
91   - return null;
92   - }
93   - return resp;
94   - } catch (Exception e) {
95   - log.warn(e.getMessage(), e);
96   - return null;
97   - }
98   - }
99   -
100   - /**
101   - * 分类
102   - *
103   - * @param in
104   - * @return
105   - */
106   - public Object productCategory(ShopProductCategoryListInput in) {
107   - // 设置请求参数
108   - Param param = Param.create();
109   - param.add("currentPage", in.getCurrentPage());
110   - param.add("pageDataSize", in.getPageDataSize());
111   - param.add("userId", in.getUserId());
112   - try {
113   - BaseResp resp = shopClient.execute("shop.info.shopProductCategory", param);
114   - if (resp.getCode() != 200) {
115   - log.warn("获取店铺分类信息出错!" + resp.getCode());
116   - return null;
117   - }
118   - return resp;
119   - } catch (Exception e) {
120   - log.warn(e.getMessage(), e);
121   - return null;
122   - }
123   - }
124   -
125   - /**
126   - * 商品推荐
127   - *
128   - * @param in
129   - * @return
130   - */
131   - public Object productRecommend(ShopProductRecommendListInput in) {
132   - // 设置请求参数
133   - Param param = Param.create();
134   - param.add("currentPage", in.getCurrentPage());
135   - param.add("pageDataSize", in.getPageDataSize());
136   - param.add("userId", in.getUserId());
137   - param.add("beginTime", in.getBeginTime());
138   - param.add("endTime", in.getEndTime());
139   - try {
140   - BaseResp resp = shopClient.execute("shop.info.shopProductRecommend", param);
141   - if (resp.getCode() != 200) {
142   - log.warn("获取店铺推荐商品信息出错!" + resp.getCode());
143   - return null;
144   - }
145   - return resp;
146   - } catch (Exception e) {
147   - log.warn(e.getMessage(), e);
148   - return null;
149   - }
150   - }
151   -
152   - /**
153   - * 获取店铺信息
154   - *
155   - * @param uid
156   - * @return
157   - */
158   - public Shop getShop(Long uid) {
159   - // 设置请求参数
160   - Param param = Param.create();
161   - param.add("userId", uid);
162   - try {
163   - BaseResp resp = shopClient.execute("shop.info.getShopInfo", param);
164   - if (resp.getCode() != 200) {
165   - log.warn("获取店铺信息出错!" + resp.getCode());
166   - return null;
167   - }
168   - return resp.getData(Shop.class);
169   - } catch (Exception e) {
170   - log.warn(e.getMessage(), e);
171   - return null;
172   - }
173   - }
174   -
175   - @Override
176   - public Object getShopQualificationsByShopId(Long shopId,Integer current,Integer size) {
177   - if (shopId == null) {
178   - log.error("ShopRPCServiceImpl.getShopQualificationsByShopId()入参输入有误!");
179   - return null;
180   - }
181   - // 设置请求参数
182   - Param param = Param.create();
183   - param.add("shopId", shopId);
184   - param.add("current", current);
185   - param.add("size", size);
186   - try {
187   - BaseResp resp = shopClient.execute("shop.qualifications.getByShopId", param);
188   - if (resp.getCode() != 200) {
189   - log.warn("获取店铺资质信息出错!" + resp.getCode());
190   - return null;
191   - }
192   - return resp;
193   - } catch (Exception e) {
194   - log.warn(e.getMessage(), e);
195   - return null;
196   - }
197   - }
198   -
199   - @Override
200   - public boolean checkShopQualification(Long id,Integer state) {
201   - if (id == null || state== null) {
202   - log.error("ShopRPCServiceImpl.checkShopQualification()入参输入有误!");
203   - return false;
204   - }
205   - // 设置请求参数
206   - Param param = Param.create();
207   - param.add("id", id);
208   - param.add("state", state);
209   - try {
210   - BaseResp resp = shopClient.execute("shop.qualifications.audit", param);
211   - if (resp.getCode() == 200) {
212   - return true;
213   - }else{
214   - log.warn("审核店铺资质信息出错!" + resp.getCode());
215   - return false;
216   - }
217   - } catch (Exception e) {
218   - log.warn(e.getMessage(), e);
219   - return false;
220   - }
221   - }
222   -
223   - /* (non-Javadoc)
224   - * @see com.diligrp.website.rpc.ShopRPCService#relationMarketByStoreid(java.lang.Long, java.lang.Long)
225   - */
226   - @Override
227   - public boolean relationMarketByStoreid(Long id, Long marketId) {
228   - // 设置请求参数
229   - Param param = Param.create();
230   - param.add("marketId", marketId);
231   - param.add("id", id);
232   - try {
233   - BaseResp resp = shopClient.execute("shop.market.relevance", param);
234   - if (resp.getCode() != 200) {
235   - log.warn("修改店铺关联市场出错!" + resp.getCode());
236   - return false;
237   - }
238   - return true;
239   - } catch (Exception e) {
240   - log.warn(e.getMessage(), e);
241   - return false;
242   - }
243   - }
244   -
245   - @Override
246   - public boolean updateShopName(Long shopId,String shopName){
247   - // 设置请求参数
248   - Param param = Param.create();
249   - param.add("id", shopId);
250   - param.add("shopName", shopName);
251   - try {
252   - BaseResp resp = shopClient.execute("shop.info.updateById", param);
253   - if (resp.getCode() != 200) {
254   - log.warn("根据店铺ID修改店铺名称出错!" + resp.getCode()+"shopId="+shopId+"newShopName="+shopName);
255   - return false;
256   - }
257   - return true;
258   - } catch (Exception e) {
259   - log.warn(e.getMessage(), e);
260   - return false;
261   - }
262   - }
263   -
264   - /**
265   - * 根据ID获取店铺信息
266   - * @param shopId
267   - * @return ShopGrade
268   - */
269   - public ShopGrade getShopAuthLevelById(Long shopId) {
270   - // 设置请求参数
271   - Param param = Param.create();
272   - param.add("shopId", shopId);
273   - try {
274   - BaseResp resp = shopClient.execute("shop.info.queryShopGrade", param);
275   - if (resp.getCode() != 200) {
276   - log.warn("获取店铺诚信等级信息出错!" + resp.getCode());
277   - return null;
278   - }
279   - return resp.getData(ShopGrade.class);
280   - } catch (Exception e) {
281   - log.warn(e.getMessage(), e);
282   - return null;
283   - }
284   - }
285   -
286   - /**
287   - * 设置诚信等级
288   - * @param shopId,levelId,isDishonesty,isSoptauth
289   - * @return boolean
290   - */
291   - public boolean saveShopAuthLevel(Long shopId, Long levelId, Integer isDishonesty,Integer isSoptauth) {
292   - // 设置请求参数
293   - Param param = Param.create();
294   - param.add("shopId", shopId);
295   - param.add("gradeId", levelId);
296   - param.add("isDishonesty", isDishonesty);
297   - param.add("isSoptauth", isSoptauth);
298   - try {
299   - BaseResp resp = shopClient.execute("shop.info.setShopGrade", param);
300   - if (resp.getCode() != 200) {
301   - log.warn("设置店铺诚信等级信息出错!" + resp.getCode());
302   - return false;
303   - }
304   - return true;
305   - } catch (Exception e) {
306   - log.warn(e.getMessage(), e);
307   - return false;
308   - }
309   - }
310   -
311   - /**
312   - * 获取店铺信息
313   - *
314   - * @param shopId
315   - * @return
316   - */
317   - public Shop getShopInfoById(Long shopId) {
318   - // 设置请求参数
319   - Param param = Param.create();
320   - param.add("shopId", shopId);
321   - try {
322   - BaseResp resp = shopClient.execute("shop.info.getShopInfo", param);
323   - if (resp.getCode() != 200) {
324   - log.warn("获取店铺信息出错!" + resp.getCode());
325   - return null;
326   - }
327   - return resp.getData(Shop.class);
328   - } catch (Exception e) {
329   - log.warn(e.getMessage(), e);
330   - return null;
331   - }
332   - }
333   -
334   - @Override
335   - public boolean belongStatistics(Long id, Long marketId) {
336   - // 设置请求参数
337   - Param param = Param.create();
338   - param.add("statisticsMarket", marketId);
339   - param.add("id", id);
340   - try {
341   - BaseResp resp = shopClient.execute("shop.info.updateById", param);
342   - if (resp.getCode() != 200) {
343   - log.warn("修改店铺归属统计出错!" + resp.getCode());
344   - return false;
345   - }
346   - return true;
347   - } catch (Exception e) {
348   - log.warn(e.getMessage(), e);
349   - return false;
350   - }
351   - }
352   -
353   - @Override
354   - public boolean updateShopClose(Long shopId, String reason, String otherReason, Integer state) {
355   - // 设置请求参数
356   - Param param = Param.create();
357   - param.add("id", shopId);
358   - param.add("reasonCode", reason);
359   - param.add("reasonOther", otherReason);
360   - param.add("shopState", state);
361   - try {
362   - BaseResp resp = shopClient.execute("shop.info.updateById", param);
363   - if (resp.getCode() != 200) {
364   - log.warn("关闭店铺更新状态出错!" + resp.getCode() + "shopId=" + shopId + "shopState=" + state);
365   - return false;
366   - }
367   - return true;
368   - } catch (Exception e) {
369   - log.warn(e.getMessage(), e);
370   - return false;
371   - }
372   - }
373   -
374   -}
diligrp-website-rpc/src/main/java/com/diligrp/website/rpc/impl/UserRPCServiceImpl.java deleted 100644 → 0
1   -package com.diligrp.website.rpc.impl;
2   -
3   -import java.util.ArrayList;
4   -import java.util.List;
5   -import java.util.Map;
6   -
7   -import javax.annotation.Resource;
8   -
9   -import org.apache.commons.collections.CollectionUtils;
10   -import org.slf4j.Logger;
11   -import org.slf4j.LoggerFactory;
12   -import org.springframework.stereotype.Service;
13   -
14   -import com.diligrp.titan.sdk.TitanClient;
15   -import com.diligrp.titan.sdk.domain.Product;
16   -import com.diligrp.titan.sdk.output.BaseOutput;
17   -import com.diligrp.website.rpc.UserRPCService;
18   -import com.diligrp.website.rpc.util.exception.GwException;
19   -import com.yqyw.user.rpc.client.UserClient;
20   -import com.yqyw.user.rpc.client.domain.output.MemberCreditInfoResp;
21   -import com.yqyw.user.rpc.client.domain.output.ShoppingCartResp;
22   -import com.yqyw.user.rpc.client.domain.output.UserInfoResp;
23   -
24   -@Service
25   -public class UserRPCServiceImpl implements UserRPCService {
26   -
27   - private static final Logger log = LoggerFactory.getLogger(UserRPCServiceImpl.class);
28   -
29   - @Resource
30   - private UserClient userClient;
31   -
32   - @Resource
33   - private TitanClient titanClient;
34   -
35   - @Override
36   - public UserInfoResp getUserInfoById(long userId) throws GwException {
37   - if (userId == 0) {
38   - log.error("UserRPCServiceImpl.getUserInfoById():input为空!");
39   - return null;
40   - }
41   - UserInfoResp userInfo = null;
42   - try {
43   - userInfo = userClient.getUserInfoService().getUserInfoById(userId);
44   - if (userInfo == null) {
45   - log.error("UserRPCServiceImpl.getUserInfoById():接口返回数据为空!");
46   - }
47   - } catch (Exception e) {
48   - log.error("UserRPCServiceImpl.getUserInfoById()查询用户信息接口异常!" + e);
49   - throw new GwException("UserRPCServiceImpl.getUserInfoById()查询用户信息接口异常!" + e);
50   - }
51   - return userInfo;
52   - }
53   -
54   - // @Override
55   - // public boolean addUserBrowseBatch(List<BrowseHistoryReq>
56   - // browseHistoryReqs)
57   - // throws GwException {
58   - // if(browseHistoryReqs == null || browseHistoryReqs.isEmpty()){
59   - // log.error("UserRPCServiceImpl.addUserBrowseBatch():input为空!");
60   - // }
61   - // try {
62   - // if(log.isInfoEnabled()){
63   - // log.info("UserRPCServiceImpl.addUserBrowseBatch(),browseHistoryReqs"
64   - // +browseHistoryReqs);
65   - // }
66   - // return userClient.getBrowseHistoryService().addBatch(browseHistoryReqs);
67   - // } catch (Exception e) {
68   - // log.error("UserRPCServiceImpl.addUserBrowseBatch()批量插入浏览历史信息接口异常!" + e);
69   - // throw new
70   - // GwException("UserRPCServiceImpl.addUserBrowseBatch()批量插入浏览历史信息接口异常!" +
71   - // e);
72   - // }
73   - // }
74   -
75   - // @Override
76   - // public boolean removeAllCookie(Long userId) {
77   - // return userClient.getBrowseHistoryService().removeAllHistory(userId);
78   - // }
79   -
80   - @Override
81   - public MemberCreditInfoResp getUserCredit(long userId) throws GwException {
82   - if (userId == 0) {
83   - log.error("UserRPCServiceImpl.getUserCredit():input为空!");
84   - }
85   - MemberCreditInfoResp resp = null;
86   - try {
87   - resp = userClient.getMemberService().getCreditInfo(userId);
88   - if (resp.getCode() == MemberCreditInfoResp.CODE_SUCCESS) {
89   - log.info("获取用户[" + userId + "]信用额度接口成功!");
90   - } else {
91   - log.error("获取用户[" + userId + "]信用额度接口返回数据异常!");
92   - }
93   - } catch (Exception e) {
94   - log.error("UserRPCServiceImpl.getUserCredit()获取用户[" + userId + "]信用额度接口异常" + e);
95   - throw new GwException("UserRPCServiceImpl.getUserCredit()获取用户[" + userId + "]信用额度接口异常" + e);
96   - }
97   -
98   - return resp;
99   - }
100   -
101   - @Override
102   - public List<ShoppingCartResp> getHistoryProduct(long userId, int count) throws GwException {
103   - if (userId == 0 || count == 0) {
104   - log.error("UserRPCServiceImpl.getHistoryProduct():input为空!");
105   - return null;
106   - }
107   - List<ShoppingCartResp> list = null;
108   - try {
109   - // list =
110   - // userClient.getShoppingCartService().getHistoryProduct(userId,
111   - // count);
112   - if (CollectionUtils.isEmpty(list)) {
113   - log.error("UserRPCServiceImpl.getHistoryProduct():接口返回数据为空!");
114   - }
115   - } catch (Exception e) {
116   - log.error("UserRPCServiceImpl.getHistoryProduct()查询用户[" + userId + "]已删除记录信息接口异常!" + e);
117   - throw new GwException("UserRPCServiceImpl.getHistoryProduct()查询用户[" + userId + "]已删除记录信息接口异常!" + e);
118   - }
119   - return list;
120   - }
121   -
122   - @Override
123   - public List<Long> getPidBySku(List<String> skus) {
124   - List<Long> pids = new ArrayList<Long>();
125   - if (skus == null || skus.size() == 0) {
126   - return pids;
127   - }
128   - // BaseOutput<List<SkuDetail>> output =
129   - // titanClient.getProductService().getSkuInfo(skus);
130   - BaseOutput<Map<String, Product>> output = this.titanClient.getProductService().getSkuInfoMap(skus);
131   - if (output == null || output.getCode() != 200) {
132   - log.error("UserRPCServiceImpl.getPidBySku()查询sku[" + skus + "]异常!");
133   - } else {
134   - // for (SkuDetail sku : output.getData()) {
135   - // pids.add(sku.getPid());
136   - // }
137   - for (Map.Entry<String, Product> entry : output.getData().entrySet()) {
138   - pids.add(entry.getValue().getPid());
139   - }
140   - }
141   - return pids;
142   - }
143   -
144   - @Override
145   - public UserInfoResp getUserInfoByMobile(String mobile) {
146   - UserInfoResp resp = null;
147   - try {
148   - resp = userClient.getUserInfoService().getUserInfoBymobile(mobile);
149   - } catch (Exception e) {
150   - log.error("UserRPCServiceImpl.getUserInfoByMobile()获取用户[" + mobile + "]接口异常" + e);
151   - }
152   - return resp;
153   - }
154   -
155   - @Override
156   - public boolean updateShopName(Long shopId, String shopName) {
157   - return userClient.getShoppingCartService().updateShopName(shopName, shopId);
158   - }
159   -}
diligrp-website-rpc/src/main/java/com/diligrp/website/rpc/impl/WokerRpcServiceImpl.java deleted 100644 → 0
1   -package com.diligrp.website.rpc.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.rpc.WokerRpcService;
10   -import com.yqyw.user.rpc.client.UserClient;
11   -import com.yqyw.user.rpc.client.domain.output.SpringWokerInfoResp;
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年8月7日 上午11:19:59
20   - * @author liujie
21   - */
22   -@Component
23   -public class WokerRpcServiceImpl implements WokerRpcService {
24   - @Resource
25   - private UserClient userClient;
26   - /* (non-Javadoc)
27   - * @see com.diligrp.user.rpc.client.WokerService#getWokerList()
28   - */
29   - @Override
30   - public List<SpringWokerInfoResp> getWokerListInfo() {
31   - return userClient.getWokerService().getWokerList();
32   - }
33   - /* (non-Javadoc)
34   - * @see com.diligrp.website.rpc.WokerRpcService#startJob(java.lang.String)
35   - */
36   - @Override
37   - public boolean startJob(String name) {
38   - return userClient.getWokerService().startJob(name);
39   - }
40   - /* (non-Javadoc)
41   - * @see com.diligrp.website.rpc.WokerRpcService#stopJob(java.lang.String)
42   - */
43   - @Override
44   - public boolean stopJob(String name) {
45   - return userClient.getWokerService().stopJob(name);
46   - }
47   - /* (non-Javadoc)
48   - * @see com.diligrp.website.rpc.WokerRpcService#runOnceJob(java.lang.String)
49   - */
50   - @Override
51   - public boolean runOnceJob(String name) {
52   - return userClient.getWokerService().runOnceJob(name);
53   - }
54   -
55   -}
diligrp-website-service/src/main/java/com/diligrp/website/service/MemberService.java deleted 100644 → 0
1   -package com.diligrp.website.service;
2   -
3   -import java.util.List;
4   -
5   -import com.diligrp.website.util.dao.BaseQuery;
6   -import com.diligrp.website.util.domain.Result;
7   -import com.diligrp.website.util.web.PageTemplate;
8   -import com.yqyw.user.rpc.client.domain.input.CreditLimitReq;
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.LockMemberResp;
13   -import com.yqyw.user.rpc.client.domain.output.MemberCreditInfoResp;
14   -import com.yqyw.user.rpc.client.domain.output.MemberCreditOptionLogResp;
15   -import com.yqyw.user.rpc.client.domain.output.UserExtensionResp;
16   -import com.yqyw.user.rpc.client.domain.output.UserInfoResp;
17   -
18   -public interface MemberService {
19   -
20   - public Result list(BaseQuery bq);
21   -
22   - public PageTemplate query(BaseQuery bq);
23   -
24   - public LockMemberResp getLockUser(Long id);
25   -
26   - public boolean lockMember(LockMemberReq req);
27   -
28   - public boolean unlockMember(LockMemberReq req);
29   -
30   - public List<MemberCreditOptionLogResp> getCreditHistory(Long memberId);
31   -
32   - public MemberCreditInfoResp getCreditInfo(Long memberId);
33   -
34   - public DefaultResp updateCreditLimit(CreditLimitReq req);
35   -
36   -// public Result historyList(Integer type,Long userId, BaseQuery bq);
37   -
38   - public UserInfoResp getMemberInfo(Long uid);
39   -
40   - public UserExtensionResp getMemberExtension(Long uid);
41   -
42   - public EnterpriseInfoResp getEnterpriseByUserId(Long uid);
43   -
44   - public Result getMemberFavorite(Long uid, Integer type, Integer currPage,
45   - Integer pageSize);
46   -
47   -}
diligrp-website-service/src/main/java/com/diligrp/website/service/OpenShopApplyService.java deleted 100644 → 0
1   -package com.diligrp.website.service;
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   - * <B>Description</B> TODO <br />
9   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
10   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
11   - * <B>Company</B> 地利集团
12   - * @createTime 2014年6月4日 下午2:18:48
13   - * @author liujie
14   - */
15   -public interface OpenShopApplyService {
16   -
17   - /**
18   - *
19   - * this method is 获取所有的开店申请详细信息
20   - * @param shopName 店铺名称
21   - * @param telephone 联系电话
22   - * @param accountName 账户名
23   - * @param state 状态
24   - * @param startTime 申请开始时间
25   - * @param endTime 申请结束时间
26   - * @param startRow 第几页
27   - * @param pageSize 每页大小
28   - * @return
29   - * @createTime 2014年6月18日 下午5:30:40
30   - * @author liujie
31   - */
32   - public PageTemplate getUserInfo(String shopId, String shopName, String telephone,
33   - String accountName, Integer state, Long startTime, Long endTime,
34   - Integer startRow, Integer pageSize,String cityId,String shopSource);
35   - /**
36   - *
37   - * this method is 获取开店申请账户的详细信息
38   - * @param userId
39   - * @param shopId
40   - * @return
41   - * @createTime 2014年6月19日 下午3:37:16
42   - * @author liujie
43   - */
44   - Shop getShopInfoByShopId(Long shopId);
45   - /**
46   - *
47   - * this method is 审批开店申请信息
48   - * @param shopId
49   - * @param auditRemark
50   - * @param status
51   - * @return
52   - * @createTime 2014年6月19日 下午3:37:48
53   - * @author liujie
54   - */
55   - boolean shopAudit(Long shopId,String auditRemark ,Integer shopState);
56   -
57   - MemberQueryResp getUserAuthInfo(Long userId);
58   -
59   -}
diligrp-website-service/src/main/java/com/diligrp/website/service/SMSService.java deleted 100644 → 0
1   -package com.diligrp.website.service;
2   -
3   -import com.diligrp.website.domain.MobMessage;
4   -
5   -
6   -/**
7   - *
8   - * <B>Description</B> 发送短信 <br />
9   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
10   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
11   - * <B>Company</B> 地利集团
12   - * @createTime 2014年6月4日 下午7:31:27
13   - * @author Wang22
14   - */
15   -public interface SMSService {
16   -
17   - /**
18   - *
19   - * 发送短信
20   - * @return
21   - * @createTime 2014年6月4日 下午7:31:50
22   - * @author Wang22
23   - */
24   - public boolean sendSMS(MobMessage mm);
25   -
26   -}
diligrp-website-service/src/main/java/com/diligrp/website/service/WokerManWebService.java deleted 100644 → 0
1   -package com.diligrp.website.service;
2   -
3   -import java.util.List;
4   -
5   -import com.yqyw.user.rpc.client.domain.output.SpringWokerInfoResp;
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   - * @createTime 2014年8月7日 上午11:21:10
14   - * @author liujie
15   - */
16   -public interface WokerManWebService {
17   - public List<SpringWokerInfoResp> getWokerList();
18   - public boolean startJob(String name);
19   - public boolean stopJob(String name);
20   - public boolean runOnceJob(String name);
21   -}
diligrp-website-service/src/main/java/com/diligrp/website/service/impl/DiliServiceServiceImpl.java
... ... @@ -10,8 +10,6 @@ import org.springframework.stereotype.Service;
10 10  
11 11 import com.diligrp.website.domain.DiliService;
12 12 import com.diligrp.website.manager.DiliServiceManager;
13   -import com.diligrp.website.rpc.UserRPCService;
14   -import com.diligrp.website.service.DataDictionaryService;
15 13 import com.diligrp.website.service.DiliServiceCoverageService;
16 14 import com.diligrp.website.service.DiliServiceService;
17 15 import com.diligrp.website.service.PickUpPointService;
... ... @@ -20,131 +18,119 @@ import com.diligrp.website.util.domain.Result;
20 18 import com.diligrp.website.util.web.BeanUtils;
21 19  
22 20 /**
23   - * <B>Description</B> <br />
24   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
  21 + * <B>Description</B> <br />
  22 + * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved.
  23 + * <br />
25 24 * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
26 25 * <B>Company</B> 地利集团
  26 + *
27 27 * @createTime 2014-6-3 11:33:00
28 28 * @author template
29 29 */
30 30 @Service
31 31 public class DiliServiceServiceImpl implements DiliServiceService {
32   - private final static Logger LOG = LoggerFactory
33   - .getLogger(DiliServiceServiceImpl.class);
34   -
35   - @Autowired
36   - private DiliServiceManager diliServiceManager;
37   -
38   - @Autowired
39   - private DataDictionaryService dataDictionaryService;
40   -
41   -
42   - @Autowired
43   - private DiliServiceCoverageService diliServiceCoverageService;
44   -
45   - @Autowired
46   - private UserRPCService userRPCService;
47   -
48   - @Autowired
49   - private PickUpPointService pickUpPointService;
50   - public Result findOne(Long pk) {
51   - return Result.create(diliServiceManager.findOne(pk));
52   - }
53   -
54   - public Result show(Long pk) {
55   - Result result = Result.create();
56   - DiliService service = diliServiceManager.findOne(pk);
57   - result.addResult(Result.RESULT_KEY_DEFAULT_VALUE, service);
58   - try{
59   - result.addResult("coverage", diliServiceCoverageService.findByService(pk).getAllResult());
60   - result.addResult("datas", pickUpPointService.getAllMarketPickUpInfo());
61   - }catch(Exception e){
62   - e.printStackTrace();
63   - }
64   -
65   -// try {
66   -// UserInfoResp user = userRPCService.getUserInfoById(service.getCreator());
67   -// result.addResult("creator", user);
68   -// } catch (Exception e) {
69   -// LOG.warn("查询用户信息出错");
70   -// }
71   - return result;
72   - }
73   -
74   - public Result save(DiliService diliService, Long[] coverages) {
75   - diliService.setCreated(new Timestamp(new Date().getTime()));
76   - diliService.setModified(new Timestamp(new Date().getTime()));
77   - if (diliService.getCode() == null || diliService.getCode().equals("")) {
78   - LOG.warn("必须填写CODE!");
79   - return Result.create(false);
80   - }
81   - DiliService item = diliServiceManager.findByCode(diliService.getCode());
82   - if (item != null) {
83   - LOG.warn("服务已存在");
84   - return Result.create(false);
85   - }
86   - //默认上架
87   - diliService.setPutawayDate(new Timestamp(new Date().getTime()));
88   -// diliService.setStatus(DiliService.STATUS_PUTAWAY);
89   - return Result.create(diliServiceManager.save(diliService, coverages));
90   - }
91   -
92   - public Result update(DiliService diliService, Long[] coverages) {
93   - DiliService up = diliServiceManager.findOne(diliService.getId());
94   - if (up == null) {
95   - return Result.create(false);
96   - }
97   - diliService.setCode(null);
98   - up = BeanUtils.merge(up, diliService);
99   - up.setModified(new Timestamp(new Date().getTime()));
100   -
101   - return Result.create(diliServiceManager.update(up, coverages));
102   - }
103   -
104   - @Override
105   - public Result updateStatus(DiliService ser, Long type, Timestamp date) {
106   - if (ser == null || ser.getId() == null) {
107   - return Result.create(false);
108   - }
109   - DiliService service = diliServiceManager.findOne(ser.getId());
110   - if (service == null) {
111   - return Result.create(false);
112   - }
113   - if (type == null || type == 0) {
114   - if (ser.getStatus().equals(DiliService.STATUS_PUTAWAY)) {
115   - service.setPutawayDate(new Timestamp(new Date().getTime()));
116   - } else{
117   - service.setDownDate(new Timestamp(new Date().getTime()));
118   - }
119   - } else {
120   - if (date == null) {
121   - date = new Timestamp(new Date().getTime());
122   - }
123   - if (ser.getStatus().equals(DiliService.STATUS_PUTAWAY)) {
124   - service.setPutawayDate(date);
125   - } else{
126   - service.setDownDate(date);
127   - }
128   - }
129   - service.setModified(new Timestamp(new Date().getTime()));
130   - return Result.create(diliServiceManager.update(service));
131   - }
132   -
133   - public Result find(BaseQuery bq) {
134   - return Result.create(diliServiceManager.find(bq));
135   - }
136   -
137   - public Result findAll(BaseQuery baseQuery) {
138   - return Result.create(diliServiceManager.findAll(baseQuery));
139   - }
140   -
141   - @Override
142   - public Result findByCode(String code) {
143   - return Result.create(diliServiceManager.findByCode(code));
144   - }
145   -
146   - public Result del(Long id){
147   - return Result.create(diliServiceManager.del(id));
148   - }
  32 + private final static Logger LOG = LoggerFactory.getLogger(DiliServiceServiceImpl.class);
  33 +
  34 + @Autowired
  35 + private DiliServiceManager diliServiceManager;
  36 +
  37 + @Autowired
  38 + private DiliServiceCoverageService diliServiceCoverageService;
  39 +
  40 + @Autowired
  41 + private PickUpPointService pickUpPointService;
  42 +
  43 + public Result findOne(Long pk) {
  44 + return Result.create(diliServiceManager.findOne(pk));
  45 + }
  46 +
  47 + public Result show(Long pk) {
  48 + Result result = Result.create();
  49 + DiliService service = diliServiceManager.findOne(pk);
  50 + result.addResult(Result.RESULT_KEY_DEFAULT_VALUE, service);
  51 + try {
  52 + result.addResult("coverage", diliServiceCoverageService.findByService(pk).getAllResult());
  53 + result.addResult("datas", pickUpPointService.getAllMarketPickUpInfo());
  54 + } catch (Exception e) {
  55 + e.printStackTrace();
  56 + }
  57 + return result;
  58 + }
  59 +
  60 + public Result save(DiliService diliService, Long[] coverages) {
  61 + diliService.setCreated(new Timestamp(new Date().getTime()));
  62 + diliService.setModified(new Timestamp(new Date().getTime()));
  63 + if (diliService.getCode() == null || diliService.getCode().equals("")) {
  64 + LOG.warn("必须填写CODE!");
  65 + return Result.create(false);
  66 + }
  67 + DiliService item = diliServiceManager.findByCode(diliService.getCode());
  68 + if (item != null) {
  69 + LOG.warn("服务已存在");
  70 + return Result.create(false);
  71 + }
  72 + // 默认上架
  73 + diliService.setPutawayDate(new Timestamp(new Date().getTime()));
  74 + // diliService.setStatus(DiliService.STATUS_PUTAWAY);
  75 + return Result.create(diliServiceManager.save(diliService, coverages));
  76 + }
  77 +
  78 + public Result update(DiliService diliService, Long[] coverages) {
  79 + DiliService up = diliServiceManager.findOne(diliService.getId());
  80 + if (up == null) {
  81 + return Result.create(false);
  82 + }
  83 + diliService.setCode(null);
  84 + up = BeanUtils.merge(up, diliService);
  85 + up.setModified(new Timestamp(new Date().getTime()));
  86 +
  87 + return Result.create(diliServiceManager.update(up, coverages));
  88 + }
  89 +
  90 + @Override
  91 + public Result updateStatus(DiliService ser, Long type, Timestamp date) {
  92 + if (ser == null || ser.getId() == null) {
  93 + return Result.create(false);
  94 + }
  95 + DiliService service = diliServiceManager.findOne(ser.getId());
  96 + if (service == null) {
  97 + return Result.create(false);
  98 + }
  99 + if (type == null || type == 0) {
  100 + if (ser.getStatus().equals(DiliService.STATUS_PUTAWAY)) {
  101 + service.setPutawayDate(new Timestamp(new Date().getTime()));
  102 + } else {
  103 + service.setDownDate(new Timestamp(new Date().getTime()));
  104 + }
  105 + } else {
  106 + if (date == null) {
  107 + date = new Timestamp(new Date().getTime());
  108 + }
  109 + if (ser.getStatus().equals(DiliService.STATUS_PUTAWAY)) {
  110 + service.setPutawayDate(date);
  111 + } else {
  112 + service.setDownDate(date);
  113 + }
  114 + }
  115 + service.setModified(new Timestamp(new Date().getTime()));
  116 + return Result.create(diliServiceManager.update(service));
  117 + }
  118 +
  119 + public Result find(BaseQuery bq) {
  120 + return Result.create(diliServiceManager.find(bq));
  121 + }
  122 +
  123 + public Result findAll(BaseQuery baseQuery) {
  124 + return Result.create(diliServiceManager.findAll(baseQuery));
  125 + }
  126 +
  127 + @Override
  128 + public Result findByCode(String code) {
  129 + return Result.create(diliServiceManager.findByCode(code));
  130 + }
  131 +
  132 + public Result del(Long id) {
  133 + return Result.create(diliServiceManager.del(id));
  134 + }
149 135  
150 136 }
... ...
diligrp-website-service/src/main/java/com/diligrp/website/service/impl/MailServiceImpl.java deleted 100644 → 0
1   -package com.diligrp.website.service.impl;
2   -
3   -import java.security.GeneralSecurityException;
4   -import java.util.List;
5   -import java.util.Map;
6   -import java.util.Properties;
7   -
8   -import javax.annotation.Resource;
9   -import javax.mail.Authenticator;
10   -import javax.mail.BodyPart;
11   -import javax.mail.Message;
12   -import javax.mail.Multipart;
13   -import javax.mail.PasswordAuthentication;
14   -import javax.mail.Session;
15   -import javax.mail.Transport;
16   -import javax.mail.internet.InternetAddress;
17   -import javax.mail.internet.MimeBodyPart;
18   -import javax.mail.internet.MimeMessage;
19   -import javax.mail.internet.MimeMultipart;
20   -
21   -import org.apache.commons.collections.CollectionUtils;
22   -import org.apache.commons.lang3.StringUtils;
23   -import org.slf4j.Logger;
24   -import org.slf4j.LoggerFactory;
25   -import org.springframework.stereotype.Component;
26   -
27   -import com.diligrp.website.domain.DataDictionary;
28   -import com.diligrp.website.domain.DataDictionaryValue;
29   -import com.diligrp.website.domain.Mail;
30   -import com.diligrp.website.manager.DataDictionaryManager;
31   -import com.diligrp.website.manager.MailManager;
32   -import com.diligrp.website.service.MailService;
33   -import com.diligrp.website.util.dao.BaseQuery;
34   -import com.diligrp.website.util.web.PageTemplate;
35   -import com.diligrp.website.web.interfaces.domain.output.MailResp;
36   -import com.google.common.collect.Maps;
37   -import com.sun.mail.util.MailSSLSocketFactory;
38   -
39   -@Component("mailService")
40   -public class MailServiceImpl implements MailService {
41   -
42   - private static final Logger LOG = LoggerFactory.getLogger(MailServiceImpl.class);
43   -
44   - @Resource
45   - private DataDictionaryManager dataDictionaryManager;
46   -
47   - @Resource
48   - private MailManager mailManager;
49   -
50   - @Override
51   - public boolean sendMail(Mail mail) {
52   -
53   - DataDictionary dd = dataDictionaryManager.getDataDictionaryByCode(DIC_EMAIL_CONFIG);
54   -
55   - if (dd == null) {
56   - LOG.error("数据字典中没有邮件服务器相关配置:" + DIC_EMAIL_CONFIG);
57   - return false;
58   - }
59   -
60   - List<DataDictionaryValue> dv = dataDictionaryManager.getDataDictionaryValue(dd.getId());
61   -
62   - if (CollectionUtils.isEmpty(dv)) {
63   - LOG.error("数据字典中没有找到相应的配置:" + DIC_EMAIL_CONFIG);
64   - return false;
65   - }
66   -
67   - Map<String, DataDictionaryValue> dicMap = makeDicDataMap(dv);
68   -
69   - boolean flag = doSendMail(dicMap, mail);
70   -
71   - if (flag) {
72   - flag = mailManager.saveMail(mail);
73   - }
74   -
75   - return flag;
76   - }
77   -
78   - @Override
79   - public MailResp sendMailByTemplate(Mail mh, String code, Map<String, String> param) {
80   -
81   - MailResp resp = new MailResp();
82   - DataDictionary ddCfg = dataDictionaryManager.getDataDictionaryByCode(DIC_EMAIL_CONFIG);
83   - if (ddCfg == null) {
84   - LOG.error("数据字典中没有邮件服务器相关配置:" + DIC_EMAIL_CONFIG);
85   - resp.setCode(MailResp.CODE_MAIL_CFG_IS_NOT_EMPTY);
86   - resp.setMsg("数据字典中没有邮件服务器相关配置:" + DIC_EMAIL_CONFIG);
87   - return resp;
88   - }
89   -
90   - List<DataDictionaryValue> dv = dataDictionaryManager.getDataDictionaryValue(ddCfg.getId());
91   -
92   - if (CollectionUtils.isEmpty(dv)) {
93   - LOG.error("数据字典中没有找到相应的配置:" + DIC_EMAIL_CONFIG);
94   - LOG.error("数据字典中没有邮件服务器相关配置:" + DIC_EMAIL_CONFIG);
95   - resp.setCode(MailResp.CODE_MAIL_CFG_IS_NOT_EMPTY);
96   - resp.setMsg("数据字典中没有邮件服务器相关配置:" + DIC_EMAIL_CONFIG);
97   - return resp;
98   - }
99   -
100   - Map<String, DataDictionaryValue> dicMap = makeDicDataMap(dv);
101   -
102   - DataDictionary ddTemplate = dataDictionaryManager.getDataDictionaryByCode(DIC_MAIL_TEMPLATE);
103   - if (ddTemplate == null) {
104   - LOG.error("数据字典中没有邮件模板配置:" + DIC_MAIL_TEMPLATE);
105   - resp.setCode(MailResp.CODE_CAN_NOT_FIND_MAIL_TEMPLATE);
106   - resp.setMsg("数据字典中没有邮件模板配置:" + DIC_MAIL_TEMPLATE);
107   - return resp;
108   - }
109   - DataDictionaryValue template = dataDictionaryManager.getDataDicValByCode(code, ddTemplate.getId().intValue());
110   - if (template == null) {
111   - LOG.error("数据字典中没有邮件模板:" + code);
112   - resp.setCode(MailResp.CODE_TEMPLATE_IS_NOT_EXISTS);
113   - resp.setMsg("数据字典中没有邮件模板:" + code);
114   - return resp;
115   - }
116   - String content = template.getRemark();
117   - if (!StringUtils.isEmpty(content)) {
118   - content = replaceTemplate(content, param);
119   - }
120   - mh.setContent(content);
121   - if (doSendMail(dicMap, mh)) {
122   - resp.setCode(MailResp.CODE_SUCCESS);
123   - } else {
124   - resp.setCode(MailResp.CODE_FAIL);
125   - }
126   - return resp;
127   - }
128   -
129   - private String replaceTemplate(String content, Map<String, String> param) {
130   - for (String key : param.keySet()) {
131   - content = content.replace(key, param.get(key));
132   - }
133   - return content;
134   - }
135   -
136   - private boolean doSendMail(Map<String, DataDictionaryValue> dicMap, Mail mail) {
137   -
138   - String host = dicMap.get(DIC_EMAIL_SMTP_HOST).getName();
139   - int port = Integer.parseInt(dicMap.get(DIC_EMAIL_SMTP_PORT).getName());
140   - String from = dicMap.get(DIC_EMAIL_SMTP_ACCOUNT).getName();
141   - final String username = dicMap.get(DIC_EMAIL_SMTP_ACCOUNT).getName();
142   - final String password = dicMap.get(DIC_EMAIL_SMTP_PASSWORD).getName();
143   -
144   - Properties props = new Properties();
145   - Boolean flag = Boolean.valueOf(dicMap.get(EMAIL_SMTP_ENABLESSL).getName());
146   - if (flag) {
147   - MailSSLSocketFactory sf;
148   - try {
149   - sf = new MailSSLSocketFactory();
150   - } catch (GeneralSecurityException e) {
151   - LOG.error("发送邮件失败:" + e.getMessage());
152   - return false;
153   - }
154   - sf.setTrustAllHosts(true);
155   - // or
156   - // sf.setTrustedHosts(new String[] { "my-server" });
157   - props.put("mail.smtp.ssl.enable", "true");
158   - // also use following for additional safety
159   - // props.put("mail.smtp.ssl.checkserveridentity", "true");
160   - props.put("mail.smtp.ssl.socketFactory", sf);
161   - }
162   -
163   - props.put("mail.smtp.host", host);
164   - props.put("mail.smtp.port", port);
165   - props.put("mail.smtp.auth", true);
166   -
167   - mail.setSender(from);
168   -
169   - LOG.info("开始发送邮件发送邮件:调用ip=" + mail.getIp() + ",发送地址:" + mail.getAddressee());
170   - LOG.info("发送邮件:主题=" + mail.getSubject() + ",发送内容:" + mail.getContent());
171   -
172   - Session session = Session.getDefaultInstance(props, new Authenticator() {
173   -
174   - @Override
175   - protected PasswordAuthentication getPasswordAuthentication() {
176   - return new PasswordAuthentication(username, password);
177   - }
178   - });
179   -
180   - Message message = new MimeMessage(session);
181   -
182   - try {
183   - BodyPart bodyPart = new MimeBodyPart();
184   - bodyPart.setContent(mail.getContent(), "text/html;charset=utf-8");
185   -
186   - Multipart multi = new MimeMultipart();
187   - multi.addBodyPart(bodyPart);
188   -
189   - message.setFrom(new InternetAddress(from));
190   - message.addRecipient(Message.RecipientType.TO, new InternetAddress(mail.getAddressee()));
191   - message.setSubject(mail.getSubject());
192   - message.setContent(multi);
193   - Transport.send(message);
194   - } catch (Exception e) {
195   - LOG.error("发送邮件失败! 邮件地址:" + mail.getAddressee(), e);
196   - return false;
197   - }
198   - LOG.info("邮件发送成功!邮件地址:" + mail.getAddressee());
199   - return true;
200   - }
201   -
202   - /*
203   - * public static void main(String[] args) { DataDictionaryValue host = new
204   - * DataDictionaryValue(); host.setName("mail.diligrp.com");
205   - * DataDictionaryValue port = new DataDictionaryValue(); port.setName("25");
206   - * DataDictionaryValue account = new DataDictionaryValue();
207   - * account.setName("system@diligrp.com"); DataDictionaryValue password = new
208   - * DataDictionaryValue(); password.setName("g@-GXAWF~Po.t+W"); Map<String,
209   - * DataDictionaryValue> dicMap = Maps.newHashMap();
210   - * dicMap.put("EMAIL_SMTP_HOST", host); dicMap.put("EMAIL_SMTP_PORT", port);
211   - * dicMap.put("EMAIL_SMTP_ACCOUNT", account);
212   - * dicMap.put("EMAIL_SMTP_PASSWORD", password); Mail mail = new Mail();
213   - * mail.setAddressee("wangzhipeng@diligrp.com"); mail.setSubject("test");
214   - * mail.setContent("content abs"); doSendMail(dicMap, mail); }
215   - */
216   -
217   - /**
218   - *
219   - * 创建数据字典Mp
220   - *
221   - * @param dv
222   - * @return
223   - * @createTime 2014年6月3日 下午1:46:15
224   - * @author Wang22
225   - */
226   - private Map<String, DataDictionaryValue> makeDicDataMap(List<DataDictionaryValue> dv) {
227   - Map<String, DataDictionaryValue> dicMap = Maps.newHashMap();
228   - for (DataDictionaryValue val : dv) {
229   - dicMap.put(val.getCode(), val);
230   - }
231   - return dicMap;
232   - }
233   -
234   - @Override
235   - public PageTemplate queryMail(BaseQuery query) {
236   - return mailManager.queryMail(query);
237   - }
238   -
239   -}
diligrp-website-service/src/main/java/com/diligrp/website/service/impl/MemberCenterAuthenServiceImpl.java deleted 100644 → 0
1   -package com.diligrp.website.service.impl;
2   -
3   -import javax.annotation.Resource;
4   -
5   -import org.slf4j.Logger;
6   -import org.slf4j.LoggerFactory;
7   -import org.springframework.stereotype.Service;
8   -
9   -import com.diligrp.website.manager.MemberCenterAuthenManager;
10   -import com.diligrp.website.service.MemberCenterAuthenService;
11   -
12   -
13   -/**
14   - * <B>Description</B> TODO <br />
15   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
16   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
17   - * <B>Company</B> 地利集团
18   - * @createTime 2014年6月20日 下午12:05:39
19   - * @author liujie
20   - */
21   -@Service
22   -public class MemberCenterAuthenServiceImpl implements MemberCenterAuthenService{
23   -
24   - private static final Logger logger = LoggerFactory.getLogger(MemberCenterAuthenServiceImpl.class);
25   -
26   - @Resource
27   - private MemberCenterAuthenManager memberCenterAuthenManager;
28   - /* (non-Javadoc)
29   - * @see com.diligrp.website.service.MemberCenterAuthenService#getAuthenInfo(com.diligrp.website.util.dao.BaseQuery)
30   - */
31   -// @Override
32   -// public PageTemplate getAuthenInfo(BaseQuery bq) {
33   -// try{
34   -// logger.info("操作:获取认证管理 信息列表,方法:getAuthenInfo(),参数:{BaseQuery:"+bq+"}");
35   -// return memberCenterAuthenManager.getAuthenInfo(bq);
36   -// }catch(Exception e){
37   -// logger.error("操作:获取认证管理 信息列表失败,方法:getAuthenInfo(),参数:{BaseQuery:"+bq+"}",e);
38   -// e.printStackTrace();
39   -// return null;
40   -// }
41   -// }
42   - /* (non-Javadoc)
43   - * @see com.diligrp.website.service.MemberCenterAuthenService#getUserInfoById(java.lang.Long)
44   - */
45   -// @Override
46   -// public UserExtension getUserInfoById(Long userId) {
47   -// try{
48   -// logger.info("操作:获取认证管理个人用户信息,方法:getUserInfoById(),参数:{userId:"+userId+"}");
49   -// return memberCenterAuthenManager.getUserInfoById(userId);
50   -//
51   -// }catch(Exception e){
52   -// logger.error("操作:获取认证管理个人用户信息失败,方法:getUserInfoById(),参数:{userId:"+userId+"}",e);
53   -// e.printStackTrace();
54   -// return null;
55   -// }
56   -// }
57   - /* (non-Javadoc)
58   - * @see com.diligrp.website.service.MemberCenterAuthenService#getEnterpriseInfoById(java.lang.Long)
59   - */
60   -// @Override
61   -// public EnterpriseInfo getEnterpriseInfoById(Long companyId) {
62   -// try{
63   -// logger.info("操作:获取认证管理企业用户信息,方法:getEnterpriseInfoById,参数:{companyId:"+companyId+"}");
64   -// return memberCenterAuthenManager.getEnterpriseInfoById(companyId);
65   -//
66   -// }catch(Exception e){
67   -// logger.error("操作:获取认证管理企业用户信息失败,方法:getEnterpriseInfoById,参数:{companyId:"+companyId+"}",e);
68   -// e.printStackTrace();
69   -// return null;
70   -// }
71   -// }
72   - /* (non-Javadoc)
73   - * @see com.diligrp.website.service.MemberCenterAuthenService#approveAuthen(java.lang.Long, java.lang.Integer, java.lang.Integer, java.lang.String)
74   - */
75   -// @Override
76   -// public boolean approveAuthen(Long userId, Integer userType,
77   -// Integer authState, String auditReson,Long operatorId) {
78   -// try{
79   -// logger.info("操作:审批认证管理用户,方法:approveAuthen,参数:userId:"+userId+",authState"+authState+",auditReson:"+auditReson+",operatorId:"+operatorId);
80   -// return memberCenterAuthenManager.approveAuthen(userId, userType, authState, auditReson, operatorId);
81   -//
82   -// }catch(Exception e){
83   -// logger.error("操作:审批认证管理用户失败,方法:approveAuthen,参数:userId:"+userId+",authState"+authState+",auditReson:"+auditReson+",operatorId:"+operatorId,e);
84   -//
85   -// e.printStackTrace();
86   -// return false;
87   -// }
88   -// }
89   -
90   -}
diligrp-website-service/src/main/java/com/diligrp/website/service/impl/MemberServiceImpl.java deleted 100644 → 0
1   -package com.diligrp.website.service.impl;
2   -
3   -import java.sql.Timestamp;
4   -import java.util.List;
5   -import java.util.Map;
6   -
7   -import javax.annotation.Resource;
8   -
9   -import org.springframework.stereotype.Component;
10   -import org.springframework.util.CollectionUtils;
11   -
12   -import com.diligrp.titan.sdk.domain.Product;
13   -import com.diligrp.website.manager.MemberManager;
14   -import com.diligrp.website.manager.ProductManager;
15   -import com.diligrp.website.service.MemberService;
16   -import com.diligrp.website.util.dao.BaseQuery;
17   -import com.diligrp.website.util.domain.Result;
18   -import com.diligrp.website.util.web.PageTemplate;
19   -import com.google.common.collect.Lists;
20   -import com.google.common.collect.Maps;
21   -import com.yqyw.user.rpc.client.domain.input.CreditLimitReq;
22   -import com.yqyw.user.rpc.client.domain.input.FavoriteInfo;
23   -import com.yqyw.user.rpc.client.domain.input.LockMemberReq;
24   -import com.yqyw.user.rpc.client.domain.output.DefaultResp;
25   -import com.yqyw.user.rpc.client.domain.output.EnterpriseInfoResp;
26   -import com.yqyw.user.rpc.client.domain.output.ListFavoriteByPagingResp;
27   -import com.yqyw.user.rpc.client.domain.output.LockMemberResp;
28   -import com.yqyw.user.rpc.client.domain.output.MemberCreditInfoResp;
29   -import com.yqyw.user.rpc.client.domain.output.MemberCreditOptionLogResp;
30   -import com.yqyw.user.rpc.client.domain.output.UserExtensionResp;
31   -import com.yqyw.user.rpc.client.domain.output.UserInfoResp;
32   -
33   -@Component("memberService")
34   -public class MemberServiceImpl implements MemberService {
35   -
36   - @Resource
37   - private MemberManager memberManager;
38   -
39   - @Resource
40   - private ProductManager productManager;
41   -
42   - @Override
43   - public Result list(BaseQuery bq) {
44   - return null;
45   - }
46   -
47   - @Override
48   - public PageTemplate query(BaseQuery bq) {
49   - return memberManager.query(bq);
50   - }
51   -
52   - @Override
53   - public LockMemberResp getLockUser(Long id) {
54   - return memberManager.getLockUser(id);
55   - }
56   -
57   - @Override
58   - public boolean lockMember(LockMemberReq req) {
59   - return memberManager.lockMember(req);
60   - }
61   -
62   - @Override
63   - public boolean unlockMember(LockMemberReq req) {
64   - return memberManager.unlockMember(req);
65   - }
66   -
67   - @Override
68   - public List<MemberCreditOptionLogResp> getCreditHistory(Long memberId) {
69   - return memberManager.getCreditHistory(memberId);
70   - }
71   -
72   - @Override
73   - public MemberCreditInfoResp getCreditInfo(Long memberId) {
74   - return memberManager.getCreditInfo(memberId);
75   - }
76   -
77   - @Override
78   - public DefaultResp updateCreditLimit(CreditLimitReq req) {
79   - return memberManager.updateCreditLimit(req);
80   - }
81   -
82   -// @Override
83   -// public Result historyList(Integer type,Long userId, BaseQuery bq) {
84   -// ListBrowseHistoryResp historyList = memberManager.historyList(type, userId, bq);
85   -// if(null == historyList || CollectionUtils.isEmpty(historyList.getData())){
86   -// return Result.create(false).addResult("type", type);
87   -// }
88   -// List<Long> pids = Lists.newArrayList();
89   -// for (BrowseHistoryResponse bh : historyList.getData()) {
90   -// pids.add(bh.getProductId());
91   -// }
92   -// List<Product> products = productManager.getProductInfos(pids);
93   -// Map<Long, Product> mapProduct = makeMapProduct(products);
94   -//
95   -// return Result.create().addResult("history", historyList)
96   -// .addResult("type", type).addResult("products", mapProduct)
97   -// .addResult("baseQuery", bq).addResult("userId", userId);
98   -// }
99   -
100   - @Override
101   - public UserInfoResp getMemberInfo(Long uid) {
102   - return memberManager.getMemberInfo(uid);
103   - }
104   -
105   - @Override
106   - public UserExtensionResp getMemberExtension(Long uid) {
107   - return memberManager.getMemberExtension(uid);
108   - }
109   -
110   - @Override
111   - public EnterpriseInfoResp getEnterpriseByUserId(Long uid) {
112   - return memberManager.getEnterpriseByUserId(uid);
113   - }
114   -
115   - @SuppressWarnings("deprecation")
116   - @Override
117   - public Result getMemberFavorite(Long uid, Integer type,
118   - Integer currPage, Integer pageSize) {
119   - Timestamp endTime = new Timestamp(System.currentTimeMillis());
120   - Timestamp startTime = new Timestamp(System.currentTimeMillis());
121   - switch (type) {
122   - case 1:
123   - startTime.setMonth(endTime.getMonth() - 1);
124   - break;
125   - case 2:
126   - startTime.setMonth(endTime.getMonth() - 3);
127   - break;
128   - case 3:
129   - startTime.setYear(endTime.getYear() - 1);
130   - break;
131   - default:
132   - endTime = null;
133   - startTime = null;
134   - break;
135   - }
136   - FavoriteInfo info = new FavoriteInfo();
137   - info.setUserId(uid);
138   - info.setType(1);
139   - info.setStartDate(startTime);
140   - info.setEndDate(endTime);
141   -
142   - ListFavoriteByPagingResp list = memberManager.getMemberFavorite(info, currPage, pageSize);
143   - if (list == null || CollectionUtils.isEmpty(list.getData())) {
144   - return Result.create(false);
145   - }
146   -
147   - List<Long> pids = Lists.newArrayList();
148   - for(FavoriteInfo fav : list.getData()){
149   - try{
150   - pids.add(fav.getResource());
151   - } catch (Exception e) {
152   - // skip
153   - }
154   - }
155   -
156   - List<Product> products = productManager.getProductInfos(pids);
157   - Map<Long, Product> mapProduct = makeMapProduct(products);
158   -
159   - Map<String, Object> page = Maps.newHashMap();
160   - page.put("totalPage", list.getTotalPage());
161   - page.put("currPage", list.getCurrPage());
162   - page.put("totalSize", list.getTotalSize());
163   -
164   - return Result.create()
165   - .addResult("page", page)
166   - .addResult("list", list.getData())
167   - .addResult("type", type)
168   - .addResult("products", mapProduct)
169   - .addResult("userId", uid);
170   - }
171   -
172   - private Map<Long, Product> makeMapProduct(List<Product> products){
173   - Map<Long, Product> mapProd = Maps.newHashMap();
174   - if(CollectionUtils.isEmpty(products)){
175   - return mapProd;
176   - }
177   - for (Product p : products) {
178   - mapProd.put(p.getPid(), p);
179   - }
180   - return mapProd;
181   - }
182   -}
diligrp-website-service/src/main/java/com/diligrp/website/service/impl/OpenShopApplyServiceImpl.java deleted 100644 → 0
1   -package com.diligrp.website.service.impl;
2   -
3   -import java.text.SimpleDateFormat;
4   -
5   -import javax.annotation.Resource;
6   -
7   -import org.slf4j.Logger;
8   -import org.slf4j.LoggerFactory;
9   -import org.springframework.stereotype.Service;
10   -
11   -import com.diligrp.pnr.sdk.domain.Shop;
12   -import com.diligrp.website.manager.OpenShopApplyManager;
13   -import com.diligrp.website.manager.SMSManager;
14   -import com.diligrp.website.service.OpenShopApplyService;
15   -import com.diligrp.website.util.web.PageTemplate;
16   -import com.yqyw.user.rpc.client.domain.output.MemberQueryResp;
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   - *
24   - * @author liujie
25   - * @createTime 2014年6月4日 下午2:21:18
26   - */
27   -@Service
28   -public class OpenShopApplyServiceImpl implements OpenShopApplyService {
29   -
30   - @Resource
31   - private OpenShopApplyManager openShopApplyManager;
32   -
33   - @Resource
34   - private SMSManager smsManager;
35   -
36   - private final static SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
37   -
38   - private static final Logger logger = LoggerFactory.getLogger(OpenShopApplyServiceImpl.class);
39   -
40   - /*
41   - * (non-Javadoc)
42   - * @see
43   - * com.diligrp.website.service.AuthenticationManageService#getUserInfo(java
44   - * .lang.String, java.lang.String, java.lang.String, java.lang.String,
45   - * java.lang.String, java.lang.String, java.lang.Integer, java.lang.Integer)
46   - */
47   - @Override
48   - public PageTemplate getUserInfo(String shopId, String shopName, String telephone,
49   - String accountName, Integer state, Long startTime, Long endTime,
50   - Integer pageIndex, Integer pageSize,String cityId,String shopSource) {
51   - try {
52   - logger.info("操作:查询用户开店信息列表;方法:getUserInfo");
53   - return openShopApplyManager.getUserInfo(pageSize, pageIndex, shopName, accountName, telephone, startTime, endTime, state, shopId,cityId,shopSource);
54   - } catch (Exception e) {
55   - logger.error("操作:查询用户开店信息列表失败;方法:getUserInfo", e);
56   - e.printStackTrace();
57   - return null;
58   - }
59   -
60   - }
61   -
62   - /*
63   - * (non-Javadoc)
64   - * @see
65   - * com.diligrp.website.service.OpenShopApplyService#getShopInfoByShopIdAndUserId
66   - * (java.lang.Long, java.lang.Long)
67   - */
68   - @Override
69   - public Shop getShopInfoByShopId(Long shopId) {
70   - try {
71   - logger.info("操作:获取用户店铺的详细信息;方法:getShopInfoByShopId();参数:shopId:" + shopId);
72   - return openShopApplyManager.getShopInfoByShopId(shopId);
73   - } catch (Exception e) {
74   - e.printStackTrace();
75   - logger.info(
76   - "操作:获取用户店铺的详细信息失败;方法:getShopInfoByShopId();参数:shopId:" + shopId, e);
77   - return null;
78   - }
79   -
80   - }
81   -
82   - /*
83   - * (non-Javadoc)
84   - * @see
85   - * com.diligrp.website.service.OpenShopApplyService#updateShopStatus(java
86   - * .lang.Long, java.lang.String, java.lang.String)
87   - */
88   - @Override
89   - public boolean shopAudit(Long shopId, String auditRemark,Integer shopState) {
90   - boolean flag = false;
91   - try {
92   - logger.info("操作:审批用户开店申请信息;方法:shopAudit();参数:shopId:"
93   - + shopId + ",auditRemark:" + auditRemark + ",shopState:"
94   - + shopState);
95   - flag = openShopApplyManager.shopAudit(shopId, auditRemark, shopState);
96   - return flag;
97   - } catch (Exception e) {
98   - e.printStackTrace();
99   - logger.error("操作:审批用户开店申请信息;方法:shopAudit();参数:shopId:"
100   - + shopId + ",auditRemark:" + auditRemark + ",shopState:"
101   - + shopState, e);
102   - return flag;
103   - }
104   -
105   - }
106   -
107   - @Override
108   - public MemberQueryResp getUserAuthInfo(Long userId) {
109   - return openShopApplyManager.getUserAuthInfo(userId);
110   - }
111   -
112   -}
diligrp-website-service/src/main/java/com/diligrp/website/service/impl/SMSServiceImpl.java deleted 100644 → 0
1   -package com.diligrp.website.service.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.service.SMSService;
10   -
11   -/**
12   - *
13   - * <B>Description</B> SMS短信发送实现 <br />
14   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
15   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
16   - * <B>Company</B> 地利集团
17   - * @createTime 2014年6月4日 下午7:30:37
18   - * @author Wang22
19   - */
20   -@Component("smsService")
21   -public class SMSServiceImpl implements SMSService {
22   -
23   - @Resource
24   - private SMSManager smsManager;
25   -
26   - @Override
27   - public boolean sendSMS(MobMessage mm) {
28   - return smsManager.sendSMS(mm);
29   - }
30   -
31   -}
diligrp-website-service/src/main/java/com/diligrp/website/service/impl/ShopCloseHistoryServiceImpl.java deleted 100644 → 0
1   -package com.diligrp.website.service.impl;
2   -
3   -import com.diligrp.website.domain.ShopCloseHistory;
4   -import com.diligrp.website.manager.ShopCloseHistoryManager;
5   -import com.diligrp.website.service.ShopCloseHistoryService;
6   -import com.diligrp.website.util.dao.BaseQuery;
7   -import com.diligrp.website.util.domain.Result;
8   -import com.diligrp.website.util.web.PageTemplate;
9   -import org.springframework.stereotype.Component;
10   -
11   -import javax.annotation.Resource;
12   -
13   -@Component("shopCloseHistoryService")
14   -public class ShopCloseHistoryServiceImpl implements ShopCloseHistoryService {
15   -
16   - @Resource
17   - private ShopCloseHistoryManager shopCloseHistoryManager;
18   -
19   - @Override
20   - public ShopCloseHistory getShopCloseHistoryById(Long id) {
21   - return shopCloseHistoryManager.getShopCloseHistoryById(id);
22   - }
23   -
24   - @Override
25   - public PageTemplate getShopCloseHistoryList(BaseQuery query) {
26   - return shopCloseHistoryManager.query(query);
27   - }
28   -
29   - @Override
30   - public boolean addShopCloseHistory(ShopCloseHistory shopCloseHistory) {
31   - return shopCloseHistoryManager.save(shopCloseHistory);
32   - }
33   -
34   - @Override
35   - public ShopCloseHistory getAuditShopCloseHistoryByShopId(Long shopId) {
36   - return shopCloseHistoryManager.getAuditShopCloseHistoryByShopId(shopId);
37   - }
38   -
39   - @Override
40   - public Result editShopCloseHistory(ShopCloseHistory shopCloseHistory) {
41   - boolean flag = shopCloseHistoryManager.edit(shopCloseHistory);
42   - return Result.create(flag);
43   - }
44   -}
diligrp-website-service/src/main/java/com/diligrp/website/service/impl/ShopNameModifyServiceImpl.java deleted 100644 → 0
1   -package com.diligrp.website.service.impl;
2   -
3   -import com.diligrp.website.domain.DataDictionary;
4   -import com.diligrp.website.domain.DataDictionaryValue;
5   -import com.diligrp.website.domain.ShopNameModify;
6   -import com.diligrp.website.manager.DataDictionaryManager;
7   -import com.diligrp.website.manager.ShopNameModifyManager;
8   -import com.diligrp.website.service.DataDictionaryService;
9   -import com.diligrp.website.service.ShopNameModifyService;
10   -import com.diligrp.website.util.dao.BaseQuery;
11   -import com.diligrp.website.util.domain.Result;
12   -import com.diligrp.website.util.web.PageTemplate;
13   -import com.google.common.base.Objects;
14   -import org.apache.commons.collections.CollectionUtils;
15   -import org.apache.commons.lang3.StringUtils;
16   -import org.springframework.stereotype.Component;
17   -
18   -import javax.annotation.Resource;
19   -import java.util.List;
20   -
21   -@Component("shopNameModifyService")
22   -public class ShopNameModifyServiceImpl implements ShopNameModifyService {
23   -
24   - @Resource
25   - private ShopNameModifyManager shopNameModifyManager;
26   -
27   - @Override
28   - public ShopNameModify getShopNameModifyById(Long id) {
29   - return shopNameModifyManager.getShopNameModifyById(id);
30   - }
31   -
32   - @Override
33   - public PageTemplate getShopNameModifyList(BaseQuery query) {
34   - return shopNameModifyManager.query(query);
35   - }
36   -
37   - @Override
38   - public boolean addShopNameModify(ShopNameModify shopNameModify) {
39   - return shopNameModifyManager.save(shopNameModify);
40   - }
41   -
42   - @Override
43   - public Result editShopNameModify(ShopNameModify shopNameModify) {
44   - boolean flag = shopNameModifyManager.edit(shopNameModify);
45   - return Result.create(flag);
46   - }
47   -
48   - @Override
49   - public List<ShopNameModify> getShopNameModifyByShopId(Long shopId) {
50   - return shopNameModifyManager.getShopNameModifyByShopId(shopId);
51   - }
52   -
53   - @Override
54   - public ShopNameModify getShopNameModifyByNewShopName(String newShopName) {
55   - return shopNameModifyManager.getShopNameModifyByNewShopName(newShopName);
56   - }
57   -
58   -}
diligrp-website-service/src/main/java/com/diligrp/website/service/impl/ShopServiceImpl.java deleted 100644 → 0
1   -package com.diligrp.website.service.impl;
2   -
3   -import com.diligrp.pnr.sdk.domain.Shop;
4   -import com.diligrp.titan.sdk.domain.Category;
5   -import com.diligrp.website.domain.*;
6   -import com.diligrp.website.rpc.ProductRPCService;
7   -import com.diligrp.website.rpc.ShopRPCService;
8   -import com.diligrp.website.rpc.input.ShopInfoListInput;
9   -import com.diligrp.website.rpc.input.ShopProductCategoryListInput;
10   -import com.diligrp.website.rpc.input.ShopProductRecommendListInput;
11   -import com.diligrp.website.service.*;
12   -import com.diligrp.website.util.domain.Result;
13   -import org.springframework.beans.factory.annotation.Autowired;
14   -import org.springframework.stereotype.Service;
15   -
16   -import javax.annotation.Resource;
17   -import java.util.ArrayList;
18   -import java.util.List;
19   -
20   -/**
21   - * <p>Title: 〈标题〉</p>
22   - * <p>Description: 〈描述〉</p>
23   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
24   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
25   - * <B>Company</B> 地利集团
26   - * <p>CreateTime:2014/6/19</p>
27   - *
28   - * @author zhukai
29   - */
30   -@Service
31   -public class ShopServiceImpl implements ShopService {
32   - @Autowired
33   - private ShopRPCService shopRPCService;
34   - @Autowired
35   - private OperateLogService operateLogService;
36   - @Autowired
37   - private DataDictionaryService dataDictionaryService;
38   - @Autowired
39   - private PickUpPointService pickUpPointService;
40   - @Autowired
41   - private CityService cityService;
42   - @Autowired
43   - private ProductRPCService productRPCService;
44   -
45   - /**
46   - * 查询店铺
47   - *
48   - * @param in
49   - * @return
50   - */
51   - public Result list(ShopInfoListInput in) {
52   - Result re = Result.create();
53   - if (in.getCurrentPage() == null) {
54   - in.setCurrentPage(0);
55   - }
56   - if (in.getPageDataSize() == null) {
57   - in.setPageDataSize(20);
58   - }
59   - re.addResult("obj", in);
60   - re.addResult(Result.RESULT_KEY_DEFAULT_VALUE, shopRPCService.list(in));
61   - return re;
62   - }
63   -
64   - public Result show(Long uid) {
65   - Result result = Result.create();
66   - Shop shop = shopRPCService.getShop(uid);
67   - if (shop != null) {
68   - result.addResult("shop", shop);
69   - //1批发商户 2产地商户 3农户商户 4 零售商户 5代购商户 6物流商户
70   - if (shop.getShopSource() == 1 || shop.getShopSource() == 2 || shop.getShopSource() == 3 || shop.getShopSource() == 4) {
71   - //经营类型
72   - DataDictionary dataDictionary = dataDictionaryService.getDataDictionaryByCode("SHOP_MANAGE_TYPE");
73   - if (dataDictionary != null) {
74   - List<DataDictionaryValue> list = dataDictionaryService.getDataDictionaryValue(dataDictionary.getId());
75   - if (list != null && list.size() > 0) {
76   - for (int i = 0; i < list.size(); i++) {
77   - DataDictionaryValue dataDictionaryValue = list.get(i);
78   - if (dataDictionaryValue.getCode().equals(shop.getManageType().toString())) {
79   - result.addResult("manageType", dataDictionaryValue.getName());
80   - break;
81   - }
82   - }
83   - }
84   - }
85   - }
86   - if (shop.getShopSource() == 1) {
87   - //店铺所在批发市场
88   - PickUpPointDomain pickUpPointDomain = pickUpPointService.getPickUpPointDomainInfo(shop.getMarketId().longValue());
89   - if (pickUpPointDomain != null) {
90   - result.addResult("pickName", pickUpPointDomain.getPickName());
91   - }
92   - }
93   - //零售商户
94   - if (shop.getShopSource() == 4) {
95   - //店铺商户类型
96   - DataDictionary dataDictionary = dataDictionaryService.getDataDictionaryByCode("SHOP_MERCHANT_TYPE");
97   - if (dataDictionary != null) {
98   - List<DataDictionaryValue> list = dataDictionaryService.getDataDictionaryValue(dataDictionary.getId());
99   - if (list != null && list.size() > 0) {
100   - for (int i = 0; i < list.size(); i++) {
101   - DataDictionaryValue dataDictionaryValue = list.get(i);
102   - if (dataDictionaryValue.getCode().equals(shop.getMerchantType().toString())) {
103   - result.addResult("merchantType", dataDictionaryValue.getName());
104   - break;
105   - }
106   - }
107   - }
108   - }
109   - }
110   - //代购商户
111   - if (shop.getShopSource() == 5) {
112   - List<Long> buyAreaList = shop.getBuyArea();
113   - if (buyAreaList != null && buyAreaList.size() > 0) {
114   - List cityAreaList = new ArrayList();
115   - for (int j = 0; j < buyAreaList.size(); j++) {
116   - Long buyAreaId = buyAreaList.get(j);
117   - //代购辐射区域
118   - Result cityResult = cityService.getCityList(buyAreaId.intValue());
119   - List<City> cityList = (List) cityResult.getAllResult().get("city");
120   - if (cityList != null && cityList.size() > 0) {
121   - String cityAreaP = "";
122   - String cityAreaC = "";
123   - String cityAreaA = "";
124   - for (int i = 0; i < cityList.size(); i++) {
125   - City city = cityList.get(i);
126   - if (city.getLevel() == 1) {
127   - cityAreaP = city.getRegionName();
128   - }
129   - if (city.getLevel() == 2) {
130   - cityAreaC = city.getRegionName();
131   - }
132   - if (city.getLevel() == 3) {
133   - cityAreaA = city.getRegionName();
134   - }
135   - }
136   - String cityArea = cityAreaP + cityAreaC + cityAreaA;
137   - cityAreaList.add(cityArea);
138   - result.addResult("cityAreaList", cityAreaList);
139   - }
140   - }
141   - }
142   - //代购品类
143   - List<Category> buyCategoryList = productRPCService.listCategoriesInfo(shop.getBuyCategory());
144   - result.addResult("buyCategoryList", buyCategoryList);
145   - //代购市场
146   - List<Long> buyMarketList = shop.getBuyMarket();
147   - if (buyMarketList != null && buyMarketList.size() > 0) {
148   - List buyMarketNameList = new ArrayList();
149   - for (int k = 0; k < buyMarketList.size(); k++) {
150   - PickUpPointDomain pickUpPointDomain = pickUpPointService.getPickUpPointDomainInfo(buyMarketList.get(k));
151   - if (pickUpPointDomain != null) {
152   - buyMarketNameList.add(pickUpPointDomain.getPickName());
153   - }
154   - }
155   - result.addResult("buyMarketNameList", buyMarketNameList);
156   - }
157   - }
158   - //物流商户
159   - if (shop.getShopSource() == 6) {
160   - DataDictionary dataDictionary = dataDictionaryService.getDataDictionaryByCode("SHOP_LOGISTICS_TYPE_ID");
161   - if (dataDictionary != null) {
162   - List<DataDictionaryValue> list = dataDictionaryService.getDataDictionaryValue(dataDictionary.getId());
163   - if (list != null && list.size() > 0) {
164   - for (int i = 0; i < list.size(); i++) {
165   - DataDictionaryValue dataDictionaryValue = list.get(i);
166   - if (shop.getLogisticsTypeId() != null && dataDictionaryValue.getCode().equals(shop.getLogisticsTypeId().toString())) {
167   - result.addResult("logistics", dataDictionaryValue.getName());
168   - break;
169   - }
170   - }
171   - }
172   - }
173   - }
174   -
175   - List<OperateLog> logs = operateLogService.getOperateLog(shop.getId(), 1);
176   - result.addResult("logs", logs);
177   - } else {
178   - result.setSuccess(false);
179   - result.addResult("success", false);
180   - result.addResult("msg", "没有获取到相关数据!");
181   - }
182   - return result;
183   - }
184   -
185   - @Override
186   - public Result getShopInfo(long uid) {
187   - return Result.create(shopRPCService.getShop(uid));
188   - }
189   -
190   - /**
191   - * 分类
192   - *
193   - * @param in
194   - * @return
195   - */
196   - public Result productCategory(ShopProductCategoryListInput in) {
197   - Result re = Result.create();
198   - if (in.getCurrentPage() == null) {
199   - in.setCurrentPage(0);
200   - }
201   - if (in.getPageDataSize() == null) {
202   - in.setPageDataSize(20);
203   - }
204   - re.addResult("obj", in);
205   - re.addResult(Result.RESULT_KEY_DEFAULT_VALUE, shopRPCService.productCategory(in));
206   - return re;
207   - }
208   -
209   -
210   - /**
211   - * 商品推荐
212   - *
213   - * @param in
214   - * @return
215   - */
216   - public Result productRecommend(ShopProductRecommendListInput in) {
217   - Result re = Result.create();
218   - if (in.getCurrentPage() == null) {
219   - in.setCurrentPage(0);
220   - }
221   - if (in.getPageDataSize() == null) {
222   - in.setPageDataSize(20);
223   - }
224   - re.addResult("obj", in);
225   - re.addResult(Result.RESULT_KEY_DEFAULT_VALUE, shopRPCService.productRecommend(in));
226   - return re;
227   - }
228   -
229   - @Override
230   - public Result getShopQualificationsByShopId(Long shopId) {
231   - Result re = Result.create();
232   - re.addResult("list", shopRPCService.getShopQualificationsByShopId(shopId, 0, 20));
233   - return re;
234   - }
235   -
236   - @Override
237   - public String checkShopQualification(Long qid, int state) {
238   - return "{result:" + shopRPCService.checkShopQualification(qid, state) + "}";
239   - }
240   -
241   - /* (non-Javadoc)
242   - * @see com.diligrp.website.service.ShopService#relationMarketByStoreid(java.lang.Long, java.lang.Integer)
243   - */
244   - @Override
245   - public boolean relationMarketByStoreid(Long id, Long marketId) {
246   - return shopRPCService.relationMarketByStoreid(id, marketId);
247   - }
248   -
249   - @Override
250   - public Result getShopAuthLevelById(Long shopId) {
251   - return Result.create(shopRPCService.getShopAuthLevelById(shopId));
252   - }
253   -
254   - @Override
255   - public boolean saveShopAuthLevel(Long shopId, Long levelId, Integer isDishonesty, Integer isSoptauth) {
256   - return shopRPCService.saveShopAuthLevel(shopId, levelId, isDishonesty, isSoptauth);
257   - }
258   -
259   - @Override
260   - public Result getShopInfoById(long shopId) {
261   - return Result.create(shopRPCService.getShopInfoById(shopId));
262   - }
263   -
264   - @Override
265   - public boolean belongStatistics(Long id, Long marketId) {
266   - return shopRPCService.belongStatistics(id, marketId);
267   - }
268   -}
diligrp-website-service/src/main/java/com/diligrp/website/service/impl/WokerManWebServiceImpl.java deleted 100644 → 0
1   -package com.diligrp.website.service.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.website.rpc.WokerRpcService;
10   -import com.diligrp.website.service.WokerManWebService;
11   -import com.yqyw.user.rpc.client.domain.output.SpringWokerInfoResp;
12   -
13   -/**
14   - * <B>Description</B> TODO <br />
15   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
16   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
17   - * <B>Company</B> 地利集团
18   - * @createTime 2014年8月7日 上午11:21:36
19   - * @author liujie
20   - */
21   -@Service
22   -public class WokerManWebServiceImpl implements WokerManWebService {
23   -
24   - @Resource
25   - private WokerRpcService wokerRpcService;
26   -
27   - /*
28   - * (non-Javadoc)
29   - * @see com.diligrp.user.rpc.client.WokerService#getWokerList()
30   - */
31   - @Override
32   - public List<SpringWokerInfoResp> getWokerList() {
33   - return wokerRpcService.getWokerListInfo();
34   - }
35   -
36   - /* (non-Javadoc)
37   - * @see com.diligrp.website.service.WokerManWebService#startJob(java.lang.String)
38   - */
39   - @Override
40   - public boolean startJob(String name) {
41   - return wokerRpcService.startJob(name);
42   - }
43   -
44   - /* (non-Javadoc)
45   - * @see com.diligrp.website.service.WokerManWebService#stopJob(java.lang.String)
46   - */
47   - @Override
48   - public boolean stopJob(String name) {
49   - return wokerRpcService.stopJob(name);
50   - }
51   -
52   - /* (non-Javadoc)
53   - * @see com.diligrp.website.service.WokerManWebService#runOnceJob(java.lang.String)
54   - */
55   - @Override
56   - public boolean runOnceJob(String name) {
57   - return wokerRpcService.runOnceJob(name);
58   - }
59   -
60   -}
... ... @@ -62,12 +62,6 @@
62 62 </dependency>
63 63  
64 64 <dependency>
65   - <groupId>com.b2c.user</groupId>
66   - <artifactId>diligrp-user-client</artifactId>
67   - <version>0.0.4-SNAPSHOT</version>
68   - </dependency>
69   -
70   - <dependency>
71 65 <groupId>com.diligrp.pnr.shop</groupId>
72 66 <artifactId>pnr-shop-sdk</artifactId>
73 67 <version>2.0.2-SNAPSHOT</version>
... ...