Merge branch 'dev_qc693' into test6.9.3
Showing
4 changed files
with
4 additions
and
83 deletions
@@ -3,7 +3,6 @@ package com.yohoufo.order.service.impl; | @@ -3,7 +3,6 @@ package com.yohoufo.order.service.impl; | ||
3 | import com.google.common.cache.Cache; | 3 | import com.google.common.cache.Cache; |
4 | import com.google.common.cache.CacheBuilder; | 4 | import com.google.common.cache.CacheBuilder; |
5 | import com.yohoufo.dal.order.BuyerOrderGoodsMapper; | 5 | import com.yohoufo.dal.order.BuyerOrderGoodsMapper; |
6 | -import com.yohoufo.dal.order.EntrySellerRechargeOrderMapper; | ||
7 | import com.yohoufo.dal.order.SellerOrderGoodsMapper; | 6 | import com.yohoufo.dal.order.SellerOrderGoodsMapper; |
8 | import com.yohoufo.dal.order.TradeBillsMapper; | 7 | import com.yohoufo.dal.order.TradeBillsMapper; |
9 | import com.yohoufo.dal.order.model.BuyerOrderGoods; | 8 | import com.yohoufo.dal.order.model.BuyerOrderGoods; |
@@ -27,7 +26,6 @@ import java.util.concurrent.Callable; | @@ -27,7 +26,6 @@ import java.util.concurrent.Callable; | ||
27 | import java.util.concurrent.ExecutionException; | 26 | import java.util.concurrent.ExecutionException; |
28 | import java.util.concurrent.TimeUnit; | 27 | import java.util.concurrent.TimeUnit; |
29 | import java.util.function.Function; | 28 | import java.util.function.Function; |
30 | -import java.util.stream.Collector; | ||
31 | import java.util.stream.Collectors; | 29 | import java.util.stream.Collectors; |
32 | 30 | ||
33 | /**资产 | 31 | /**资产 |
@@ -37,8 +35,7 @@ import java.util.stream.Collectors; | @@ -37,8 +35,7 @@ import java.util.stream.Collectors; | ||
37 | public class AssetsService { | 35 | public class AssetsService { |
38 | final Logger logger = LoggerFactory.getLogger(getClass()); | 36 | final Logger logger = LoggerFactory.getLogger(getClass()); |
39 | 37 | ||
40 | - private Cache<String,List<TradeBillsBo>> localContentCache = CacheBuilder.newBuilder().maximumSize(1000).expireAfterAccess(5, TimeUnit.MINUTES).build(); | ||
41 | - private Cache<Integer,TradeBillsSummaryBo> localTradeBillsSummaryBoCache = CacheBuilder.newBuilder().maximumSize(1000).expireAfterAccess(1, TimeUnit.MINUTES).build(); | 38 | + private Cache<Integer,TradeBillsSummaryBo> localTradeBillsSummaryBoCache = CacheBuilder.newBuilder().maximumSize(2000).expireAfterWrite(1, TimeUnit.MINUTES).build(); |
42 | 39 | ||
43 | @Autowired | 40 | @Autowired |
44 | private TradeBillsMapper tradeBillsMapper; | 41 | private TradeBillsMapper tradeBillsMapper; |
@@ -49,9 +46,6 @@ public class AssetsService { | @@ -49,9 +46,6 @@ public class AssetsService { | ||
49 | @Autowired | 46 | @Autowired |
50 | private SellerOrderGoodsMapper sellerOrderGoodsMapper; | 47 | private SellerOrderGoodsMapper sellerOrderGoodsMapper; |
51 | 48 | ||
52 | - @Autowired | ||
53 | - private EntrySellerRechargeOrderMapper entrySellerRechargeOrderMapper; | ||
54 | - | ||
55 | public AssetsResp getAssetsDetails(int uid, int page, int pageSize){ | 49 | public AssetsResp getAssetsDetails(int uid, int page, int pageSize){ |
56 | 50 | ||
57 | //TODO get count | 51 | //TODO get count |
@@ -89,24 +83,6 @@ public class AssetsService { | @@ -89,24 +83,6 @@ public class AssetsService { | ||
89 | List<TradeBillsBo> buildTradeBills(int uid,int page, int pageSize){ | 83 | List<TradeBillsBo> buildTradeBills(int uid,int page, int pageSize){ |
90 | //现在是降序排列,不再缓存第一页 | 84 | //现在是降序排列,不再缓存第一页 |
91 | return loadTradeBillFromDb(uid,page,pageSize); | 85 | return loadTradeBillFromDb(uid,page,pageSize); |
92 | - | ||
93 | - //把第一页缓存 | ||
94 | - /*String key=uid+"-"+page+"-"+pageSize; | ||
95 | - if(page==1){ | ||
96 | - try{ | ||
97 | - return localContentCache.get(key, new Callable<List<TradeBillsBo>>() { | ||
98 | - @Override | ||
99 | - public List<TradeBillsBo> call() throws Exception { | ||
100 | - | ||
101 | - return loadTradeBillFromDb(uid,page,pageSize); | ||
102 | - } | ||
103 | - }); | ||
104 | - }catch (ExecutionException e){ | ||
105 | - throw new RuntimeException(e); | ||
106 | - } | ||
107 | - }else{ | ||
108 | - return loadTradeBillFromDb(uid,page,pageSize); | ||
109 | - }*/ | ||
110 | } | 86 | } |
111 | 87 | ||
112 | private List<TradeBillsBo> loadTradeBillFromDb(int uid,int page, int pageSize){ | 88 | private List<TradeBillsBo> loadTradeBillFromDb(int uid,int page, int pageSize){ |
@@ -186,25 +162,6 @@ public class AssetsService { | @@ -186,25 +162,6 @@ public class AssetsService { | ||
186 | } | 162 | } |
187 | } | 163 | } |
188 | 164 | ||
189 | - //计算支出 | ||
190 | - /*List<Map<String, Object>> spendList=tradeBillsMapper.selectSpendAmountByUid(uid); | ||
191 | - if(CollectionUtils.isNotEmpty(spendList)){ | ||
192 | - for(Map<String, Object> tmpMap:spendList){ | ||
193 | - if(tmpMap.get("tradeType")==null||tmpMap.get("allAmount")==null){ | ||
194 | - continue; | ||
195 | - } | ||
196 | - Integer key = (Integer)tmpMap.get("tradeType"); | ||
197 | - if(TradeType.goods_income.getCode()==key.intValue()){ | ||
198 | - goods_income = goods_income.subtract((BigDecimal)tmpMap.get("allAmount")); | ||
199 | - } | ||
200 | - | ||
201 | - if(TradeType.compensateIncome.getCode()==key.intValue()){ | ||
202 | - compensate_income = compensate_income.subtract((BigDecimal)tmpMap.get("allAmount")); | ||
203 | - } | ||
204 | - | ||
205 | - } | ||
206 | - }*/ | ||
207 | - | ||
208 | summary.setGoods_income(goods_income); | 165 | summary.setGoods_income(goods_income); |
209 | summary.setGoodsIncome(goods_income.setScale(2,BigDecimal.ROUND_HALF_UP).toPlainString()); | 166 | summary.setGoodsIncome(goods_income.setScale(2,BigDecimal.ROUND_HALF_UP).toPlainString()); |
210 | summary.setCompensate_income(compensate_income); | 167 | summary.setCompensate_income(compensate_income); |
@@ -47,10 +47,6 @@ public class StoreSellerServiceImpl implements IStoredSellerService { | @@ -47,10 +47,6 @@ public class StoreSellerServiceImpl implements IStoredSellerService { | ||
47 | @Autowired | 47 | @Autowired |
48 | StoredSellerCacheService storedSellerCacheService; | 48 | StoredSellerCacheService storedSellerCacheService; |
49 | 49 | ||
50 | - | ||
51 | - //@Value("${zhimacert.switch:true}") | ||
52 | - //private boolean zhiMaCertSwitch; | ||
53 | - | ||
54 | @Autowired | 50 | @Autowired |
55 | private SellerService sellerService; | 51 | private SellerService sellerService; |
56 | 52 | ||
@@ -98,16 +94,7 @@ public class StoreSellerServiceImpl implements IStoredSellerService { | @@ -98,16 +94,7 @@ public class StoreSellerServiceImpl implements IStoredSellerService { | ||
98 | logger.info("StoredSellerServiceImpl entryStatus uid is {} ",uid); | 94 | logger.info("StoredSellerServiceImpl entryStatus uid is {} ",uid); |
99 | Boolean isZhiMaCert=false; | 95 | Boolean isZhiMaCert=false; |
100 | ZhiMaCert zhiMaCert = null; | 96 | ZhiMaCert zhiMaCert = null; |
101 | - /* | ||
102 | - if(zhiMaCertSwitch){ | ||
103 | - zhiMaCert = getZhiMaCertInfo(uid); | ||
104 | - if(null != zhiMaCert){ | ||
105 | - isZhiMaCert = true; | ||
106 | - } | ||
107 | - }else{ | ||
108 | - isZhiMaCert = true; | ||
109 | - } | ||
110 | - */ | 97 | + |
111 | zhiMaCert = getZhiMaCertInfo(uid); | 98 | zhiMaCert = getZhiMaCertInfo(uid); |
112 | if(null != zhiMaCert){ | 99 | if(null != zhiMaCert){ |
113 | isZhiMaCert = true; | 100 | isZhiMaCert = true; |
@@ -254,11 +241,6 @@ public class StoreSellerServiceImpl implements IStoredSellerService { | @@ -254,11 +241,6 @@ public class StoreSellerServiceImpl implements IStoredSellerService { | ||
254 | ZhiMaCert zhiMaCert = getZhiMaCertInfo(uid); | 241 | ZhiMaCert zhiMaCert = getZhiMaCertInfo(uid); |
255 | 242 | ||
256 | int breakZhiMaCert=0; | 243 | int breakZhiMaCert=0; |
257 | - //芝麻认证没开启,并且没有认证 | ||
258 | - /*if(!zhiMaCertSwitch&&zhiMaCert==null){ | ||
259 | - zhiMaCert = new ZhiMaCert(); | ||
260 | - breakZhiMaCert=1; | ||
261 | - }*/ | ||
262 | 244 | ||
263 | if(null == zhiMaCert){ | 245 | if(null == zhiMaCert){ |
264 | logger.error("StoredSellerServiceImpl get zhi ma cert info is null , uid is {} ",uid); | 246 | logger.error("StoredSellerServiceImpl get zhi ma cert info is null , uid is {} ",uid); |
@@ -309,14 +291,4 @@ public class StoreSellerServiceImpl implements IStoredSellerService { | @@ -309,14 +291,4 @@ public class StoreSellerServiceImpl implements IStoredSellerService { | ||
309 | return null; | 291 | return null; |
310 | } | 292 | } |
311 | 293 | ||
312 | - /*private boolean isPhotoCheckExceedLimit(int targetUid) { | ||
313 | - ApiResponse<Boolean> resp = ufoServiceCaller.call("ufo.user.photoCheckExceedLimit", ApiResponse.class, targetUid); | ||
314 | - if (resp != null&&resp.getCode()==200) { | ||
315 | - if (resp.getData() != null) { | ||
316 | - return (Boolean)resp.getData(); | ||
317 | - } | ||
318 | - } | ||
319 | - return false; | ||
320 | - }*/ | ||
321 | - | ||
322 | } | 294 | } |
@@ -138,6 +138,7 @@ public class RealNameAuthorizeController { | @@ -138,6 +138,7 @@ public class RealNameAuthorizeController { | ||
138 | return new ApiResponse(isZhiMaCert); | 138 | return new ApiResponse(isZhiMaCert); |
139 | } | 139 | } |
140 | 140 | ||
141 | + /* 退出入驻时,不再清除芝麻认证信息,该方法不再使用了 | ||
141 | @RequestMapping(params = "method=ufo.user.clearZhiMaCertInfo") | 142 | @RequestMapping(params = "method=ufo.user.clearZhiMaCertInfo") |
142 | public ApiResponse clearZhiMaCertInfo(@RequestParam("uid") Integer uid) throws GatewayException { | 143 | public ApiResponse clearZhiMaCertInfo(@RequestParam("uid") Integer uid) throws GatewayException { |
143 | logger.info("enter realNameAuthorize.clearZhiMaCertInfo param uid is {}", uid); | 144 | logger.info("enter realNameAuthorize.clearZhiMaCertInfo param uid is {}", uid); |
@@ -146,6 +147,7 @@ public class RealNameAuthorizeController { | @@ -146,6 +147,7 @@ public class RealNameAuthorizeController { | ||
146 | apiResponse.setData(deleteNum); | 147 | apiResponse.setData(deleteNum); |
147 | return apiResponse; | 148 | return apiResponse; |
148 | } | 149 | } |
150 | + */ | ||
149 | 151 | ||
150 | @RequestMapping(params = "method=ufo.user.zhiMaCertInfo") | 152 | @RequestMapping(params = "method=ufo.user.zhiMaCertInfo") |
151 | public ApiResponse zhiMaCertInfo(@RequestParam("uid") Integer uid) throws GatewayException { | 153 | public ApiResponse zhiMaCertInfo(@RequestParam("uid") Integer uid) throws GatewayException { |
@@ -70,11 +70,6 @@ public class RealNameAuthorizeServiceImpl implements IRealNameAuthorizeService { | @@ -70,11 +70,6 @@ public class RealNameAuthorizeServiceImpl implements IRealNameAuthorizeService { | ||
70 | @Autowired | 70 | @Autowired |
71 | private CertPhotoSwitchComponent certPhotoSwitchComponent; | 71 | private CertPhotoSwitchComponent certPhotoSwitchComponent; |
72 | 72 | ||
73 | - | ||
74 | - | ||
75 | - //@Value("${zhimacert.switch:true}") | ||
76 | - //private boolean zhiMaCertSwitch; | ||
77 | - | ||
78 | @Autowired | 73 | @Autowired |
79 | private ConfigReader configReader; | 74 | private ConfigReader configReader; |
80 | 75 | ||
@@ -280,11 +275,6 @@ public class RealNameAuthorizeServiceImpl implements IRealNameAuthorizeService { | @@ -280,11 +275,6 @@ public class RealNameAuthorizeServiceImpl implements IRealNameAuthorizeService { | ||
280 | } | 275 | } |
281 | 276 | ||
282 | public boolean isValidZhiMaCert(int uid){ | 277 | public boolean isValidZhiMaCert(int uid){ |
283 | - //如果芝麻认知没有开启,默认芝麻认证通过 | ||
284 | - /*if(!zhiMaCertSwitch){ | ||
285 | - return true; | ||
286 | - }*/ | ||
287 | - | ||
288 | //否则,从db查询认证信息 | 278 | //否则,从db查询认证信息 |
289 | if(null!=this.getValidZhiMaCert(uid)){ | 279 | if(null!=this.getValidZhiMaCert(uid)){ |
290 | return true; | 280 | return true; |
-
Please register or login to post a comment