Showing
6 changed files
with
17 additions
and
13 deletions
@@ -3,7 +3,7 @@ package com.yohoufo.dal.order; | @@ -3,7 +3,7 @@ package com.yohoufo.dal.order; | ||
3 | import com.yohoufo.dal.order.model.StoredSeller; | 3 | import com.yohoufo.dal.order.model.StoredSeller; |
4 | import org.apache.ibatis.annotations.Param; | 4 | import org.apache.ibatis.annotations.Param; |
5 | 5 | ||
6 | -public interface IStoredSellerDao { | 6 | +public interface StoredSellerMapper { |
7 | //获取生效的信息 | 7 | //获取生效的信息 |
8 | StoredSeller selectValidByUid(int uid); | 8 | StoredSeller selectValidByUid(int uid); |
9 | 9 |
1 | <?xml version="1.0" encoding="UTF-8" ?> | 1 | <?xml version="1.0" encoding="UTF-8" ?> |
2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
3 | -<mapper namespace="com.yohoufo.dal.order.IStoredSellerDao" > | 3 | +<mapper namespace="com.yohoufo.dal.order.StoredSellerMapper" > |
4 | <resultMap id="BaseResultMap" type="com.yohoufo.dal.order.model.StoredSeller" > | 4 | <resultMap id="BaseResultMap" type="com.yohoufo.dal.order.model.StoredSeller" > |
5 | <id column="id" property="id" jdbcType="INTEGER" /> | 5 | <id column="id" property="id" jdbcType="INTEGER" /> |
6 | <result column="uid" property="uid" jdbcType="INTEGER" /> | 6 | <result column="uid" property="uid" jdbcType="INTEGER" /> |
@@ -4,7 +4,7 @@ import com.yoho.error.exception.ServiceException; | @@ -4,7 +4,7 @@ import com.yoho.error.exception.ServiceException; | ||
4 | import com.yoho.tools.common.beans.ApiResponse; | 4 | import com.yoho.tools.common.beans.ApiResponse; |
5 | import com.yohobuy.ufo.model.enums.StoredSellerStatusEnum; | 5 | import com.yohobuy.ufo.model.enums.StoredSellerStatusEnum; |
6 | import com.yohoufo.common.caller.UfoServiceCaller; | 6 | import com.yohoufo.common.caller.UfoServiceCaller; |
7 | -import com.yohoufo.dal.order.IStoredSellerDao; | 7 | +import com.yohoufo.dal.order.StoredSellerMapper; |
8 | import com.yohoufo.dal.order.model.StoredSeller; | 8 | import com.yohoufo.dal.order.model.StoredSeller; |
9 | import com.yohoufo.dal.user.model.ZhiMaCert; | 9 | import com.yohoufo.dal.user.model.ZhiMaCert; |
10 | import com.yohoufo.order.service.IStoredSellerService; | 10 | import com.yohoufo.order.service.IStoredSellerService; |
@@ -23,7 +23,7 @@ public class StoreSellerServiceImpl implements IStoredSellerService { | @@ -23,7 +23,7 @@ public class StoreSellerServiceImpl implements IStoredSellerService { | ||
23 | private final Logger logger = LoggerFactory.getLogger(StoreSellerServiceImpl.class); | 23 | private final Logger logger = LoggerFactory.getLogger(StoreSellerServiceImpl.class); |
24 | 24 | ||
25 | @Autowired | 25 | @Autowired |
26 | - private IStoredSellerDao storedSellerDao; | 26 | + private StoredSellerMapper storedSellerMapper; |
27 | 27 | ||
28 | @Autowired | 28 | @Autowired |
29 | private InBoxFacade inBoxFacade; | 29 | private InBoxFacade inBoxFacade; |
@@ -60,7 +60,7 @@ public class StoreSellerServiceImpl implements IStoredSellerService { | @@ -60,7 +60,7 @@ public class StoreSellerServiceImpl implements IStoredSellerService { | ||
60 | } | 60 | } |
61 | 61 | ||
62 | //如果不存在,则从数据库获取 | 62 | //如果不存在,则从数据库获取 |
63 | - storedSeller= storedSellerDao.selectValidByUid(uid); | 63 | + storedSeller= storedSellerMapper.selectValidByUid(uid); |
64 | logger.info("StoredSellerServiceImpl get valid store seller uid is {} ,database info is {} ",uid,storedSeller); | 64 | logger.info("StoredSellerServiceImpl get valid store seller uid is {} ,database info is {} ",uid,storedSeller); |
65 | if(storedSeller!=null){ | 65 | if(storedSeller!=null){ |
66 | // 保存到redis | 66 | // 保存到redis |
@@ -91,7 +91,7 @@ public class StoreSellerServiceImpl implements IStoredSellerService { | @@ -91,7 +91,7 @@ public class StoreSellerServiceImpl implements IStoredSellerService { | ||
91 | storedSeller.setCreateTime(ts); | 91 | storedSeller.setCreateTime(ts); |
92 | storedSeller.setUpdateTime(ts); | 92 | storedSeller.setUpdateTime(ts); |
93 | logger.info("StoredSellerServiceImpl addUserAsStoredSeller insert uid is {} , storedSeller {} ",uid,storedSeller); | 93 | logger.info("StoredSellerServiceImpl addUserAsStoredSeller insert uid is {} , storedSeller {} ",uid,storedSeller); |
94 | - int num=storedSellerDao.insert(storedSeller); | 94 | + int num=storedSellerMapper.insert(storedSeller); |
95 | if(num<0){ | 95 | if(num<0){ |
96 | logger.error("StoredSellerServiceImpl addUserAsStoredSeller error uid is {} , storedSeller {} ,insert num {} ",uid,storedSeller,num); | 96 | logger.error("StoredSellerServiceImpl addUserAsStoredSeller error uid is {} , storedSeller {} ,insert num {} ",uid,storedSeller,num); |
97 | throw new ServiceException(400,"新增入驻商户信息错误"); | 97 | throw new ServiceException(400,"新增入驻商户信息错误"); |
@@ -12,7 +12,7 @@ import com.yohobuy.ufo.model.user.resp.AuthorizeResultRespVO; | @@ -12,7 +12,7 @@ import com.yohobuy.ufo.model.user.resp.AuthorizeResultRespVO; | ||
12 | import com.yohoufo.common.caller.UfoServiceCaller; | 12 | import com.yohoufo.common.caller.UfoServiceCaller; |
13 | import com.yohoufo.common.exception.UfoServiceException; | 13 | import com.yohoufo.common.exception.UfoServiceException; |
14 | import com.yohoufo.dal.order.EntrySellerRechargeOrderMapper; | 14 | import com.yohoufo.dal.order.EntrySellerRechargeOrderMapper; |
15 | -import com.yohoufo.dal.order.IStoredSellerDao; | 15 | +import com.yohoufo.dal.order.StoredSellerMapper; |
16 | import com.yohoufo.dal.order.model.EntrySellerRechargeOrder; | 16 | import com.yohoufo.dal.order.model.EntrySellerRechargeOrder; |
17 | import com.yohoufo.dal.order.model.StoredSeller; | 17 | import com.yohoufo.dal.order.model.StoredSeller; |
18 | import com.yohoufo.order.common.Payment; | 18 | import com.yohoufo.order.common.Payment; |
@@ -21,6 +21,7 @@ import com.yohoufo.order.model.response.OrderSubmitResponse; | @@ -21,6 +21,7 @@ import com.yohoufo.order.model.response.OrderSubmitResponse; | ||
21 | import com.yohoufo.order.service.IStoredSellerService; | 21 | import com.yohoufo.order.service.IStoredSellerService; |
22 | import com.yohoufo.order.service.IStoredSellerDepositService; | 22 | import com.yohoufo.order.service.IStoredSellerDepositService; |
23 | import com.yohoufo.order.service.MerchantOrderPaymentService; | 23 | import com.yohoufo.order.service.MerchantOrderPaymentService; |
24 | +import com.yohoufo.order.service.cache.StoredSellerCacheService; | ||
24 | import com.yohoufo.order.service.proxy.InBoxFacade; | 25 | import com.yohoufo.order.service.proxy.InBoxFacade; |
25 | import com.yohoufo.order.service.support.codegenerator.OrderCodeGenerator; | 26 | import com.yohoufo.order.service.support.codegenerator.OrderCodeGenerator; |
26 | import org.apache.commons.lang3.StringUtils; | 27 | import org.apache.commons.lang3.StringUtils; |
@@ -59,7 +60,7 @@ public class StoredSellerDepositServiceImpl implements IStoredSellerDepositServi | @@ -59,7 +60,7 @@ public class StoredSellerDepositServiceImpl implements IStoredSellerDepositServi | ||
59 | MerchantOrderPaymentService merchantOrderPaymentService; | 60 | MerchantOrderPaymentService merchantOrderPaymentService; |
60 | 61 | ||
61 | @Autowired | 62 | @Autowired |
62 | - private IStoredSellerDao storedSellerDao; | 63 | + private StoredSellerMapper storedSellerMapper; |
63 | 64 | ||
64 | @Autowired | 65 | @Autowired |
65 | private InBoxFacade inBoxFacade; | 66 | private InBoxFacade inBoxFacade; |
@@ -67,6 +68,9 @@ public class StoredSellerDepositServiceImpl implements IStoredSellerDepositServi | @@ -67,6 +68,9 @@ public class StoredSellerDepositServiceImpl implements IStoredSellerDepositServi | ||
67 | @Autowired | 68 | @Autowired |
68 | private IStoredSellerService storedSellerService; | 69 | private IStoredSellerService storedSellerService; |
69 | 70 | ||
71 | + @Autowired | ||
72 | + StoredSellerCacheService storedSellerCacheService; | ||
73 | + | ||
70 | /** | 74 | /** |
71 | * 充值保证金 | 75 | * 充值保证金 |
72 | */ | 76 | */ |
@@ -323,9 +327,9 @@ public class StoredSellerDepositServiceImpl implements IStoredSellerDepositServi | @@ -323,9 +327,9 @@ public class StoredSellerDepositServiceImpl implements IStoredSellerDepositServi | ||
323 | 327 | ||
324 | //更新为退驻 | 328 | //更新为退驻 |
325 | logger.info("StoredSellerServiceImpl updateStoredSellerQuitStatus begin ,uid is {} ,ts {} ",uid,ts); | 329 | logger.info("StoredSellerServiceImpl updateStoredSellerQuitStatus begin ,uid is {} ,ts {} ",uid,ts); |
326 | - int num = storedSellerDao.updateStatusByUid(uid,StoredSellerStatusEnum.quit.getId(),expectStatus,ts); | ||
327 | - //TODO 状态变化,清掉缓存 | ||
328 | - //cacheService.removeStoredSeller(uid); | 330 | + int num = storedSellerMapper.updateStatusByUid(uid,StoredSellerStatusEnum.quit.getId(),expectStatus,ts); |
331 | + // 状态变化,清掉缓存 | ||
332 | + storedSellerCacheService.removeStoredSeller(uid); | ||
329 | 333 | ||
330 | logger.info("StoredSellerServiceImpl updateStoredSellerQuitStatus end ,uid is {} ,update num {}",uid,num); | 334 | logger.info("StoredSellerServiceImpl updateStoredSellerQuitStatus end ,uid is {} ,update num {}",uid,num); |
331 | 335 |
@@ -56,7 +56,7 @@ datasources: | @@ -56,7 +56,7 @@ datasources: | ||
56 | - com.yohoufo.dal.order.SellerWalletDetailMapper | 56 | - com.yohoufo.dal.order.SellerWalletDetailMapper |
57 | - com.yohoufo.dal.order.OrderCouponMapper | 57 | - com.yohoufo.dal.order.OrderCouponMapper |
58 | - com.yohoufo.dal.order.EntrySellerRechargeOrderMapper | 58 | - com.yohoufo.dal.order.EntrySellerRechargeOrderMapper |
59 | - - com.yohoufo.dal.order.IStoredSellerDao | 59 | + - com.yohoufo.dal.order.StoredSellerMapper |
60 | 60 | ||
61 | 61 | ||
62 | ufo_promotion: | 62 | ufo_promotion: |
@@ -56,7 +56,7 @@ datasources: | @@ -56,7 +56,7 @@ datasources: | ||
56 | - com.yohoufo.dal.order.SellerWalletDetailMapper | 56 | - com.yohoufo.dal.order.SellerWalletDetailMapper |
57 | - com.yohoufo.dal.order.OrderCouponMapper | 57 | - com.yohoufo.dal.order.OrderCouponMapper |
58 | - com.yohoufo.dal.order.EntrySellerRechargeOrderMapper | 58 | - com.yohoufo.dal.order.EntrySellerRechargeOrderMapper |
59 | - - com.yohoufo.dal.order.IStoredSellerDao | 59 | + - com.yohoufo.dal.order.StoredSellerMapper |
60 | 60 | ||
61 | 61 | ||
62 | ufo_promotion: | 62 | ufo_promotion: |
-
Please register or login to post a comment