Authored by qinchao

规范命名

... ... @@ -3,7 +3,7 @@ package com.yohoufo.dal.order;
import com.yohoufo.dal.order.model.StoredSeller;
import org.apache.ibatis.annotations.Param;
public interface IStoredSellerDao {
public interface StoredSellerMapper {
//获取生效的信息
StoredSeller selectValidByUid(int uid);
... ...
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.yohoufo.dal.order.IStoredSellerDao" >
<mapper namespace="com.yohoufo.dal.order.StoredSellerMapper" >
<resultMap id="BaseResultMap" type="com.yohoufo.dal.order.model.StoredSeller" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="uid" property="uid" jdbcType="INTEGER" />
... ...
... ... @@ -4,7 +4,7 @@ import com.yoho.error.exception.ServiceException;
import com.yoho.tools.common.beans.ApiResponse;
import com.yohobuy.ufo.model.enums.StoredSellerStatusEnum;
import com.yohoufo.common.caller.UfoServiceCaller;
import com.yohoufo.dal.order.IStoredSellerDao;
import com.yohoufo.dal.order.StoredSellerMapper;
import com.yohoufo.dal.order.model.StoredSeller;
import com.yohoufo.dal.user.model.ZhiMaCert;
import com.yohoufo.order.service.IStoredSellerService;
... ... @@ -23,7 +23,7 @@ public class StoreSellerServiceImpl implements IStoredSellerService {
private final Logger logger = LoggerFactory.getLogger(StoreSellerServiceImpl.class);
@Autowired
private IStoredSellerDao storedSellerDao;
private StoredSellerMapper storedSellerMapper;
@Autowired
private InBoxFacade inBoxFacade;
... ... @@ -60,7 +60,7 @@ public class StoreSellerServiceImpl implements IStoredSellerService {
}
//如果不存在,则从数据库获取
storedSeller= storedSellerDao.selectValidByUid(uid);
storedSeller= storedSellerMapper.selectValidByUid(uid);
logger.info("StoredSellerServiceImpl get valid store seller uid is {} ,database info is {} ",uid,storedSeller);
if(storedSeller!=null){
// 保存到redis
... ... @@ -91,7 +91,7 @@ public class StoreSellerServiceImpl implements IStoredSellerService {
storedSeller.setCreateTime(ts);
storedSeller.setUpdateTime(ts);
logger.info("StoredSellerServiceImpl addUserAsStoredSeller insert uid is {} , storedSeller {} ",uid,storedSeller);
int num=storedSellerDao.insert(storedSeller);
int num=storedSellerMapper.insert(storedSeller);
if(num<0){
logger.error("StoredSellerServiceImpl addUserAsStoredSeller error uid is {} , storedSeller {} ,insert num {} ",uid,storedSeller,num);
throw new ServiceException(400,"新增入驻商户信息错误");
... ...
... ... @@ -12,7 +12,7 @@ import com.yohobuy.ufo.model.user.resp.AuthorizeResultRespVO;
import com.yohoufo.common.caller.UfoServiceCaller;
import com.yohoufo.common.exception.UfoServiceException;
import com.yohoufo.dal.order.EntrySellerRechargeOrderMapper;
import com.yohoufo.dal.order.IStoredSellerDao;
import com.yohoufo.dal.order.StoredSellerMapper;
import com.yohoufo.dal.order.model.EntrySellerRechargeOrder;
import com.yohoufo.dal.order.model.StoredSeller;
import com.yohoufo.order.common.Payment;
... ... @@ -21,6 +21,7 @@ import com.yohoufo.order.model.response.OrderSubmitResponse;
import com.yohoufo.order.service.IStoredSellerService;
import com.yohoufo.order.service.IStoredSellerDepositService;
import com.yohoufo.order.service.MerchantOrderPaymentService;
import com.yohoufo.order.service.cache.StoredSellerCacheService;
import com.yohoufo.order.service.proxy.InBoxFacade;
import com.yohoufo.order.service.support.codegenerator.OrderCodeGenerator;
import org.apache.commons.lang3.StringUtils;
... ... @@ -59,7 +60,7 @@ public class StoredSellerDepositServiceImpl implements IStoredSellerDepositServi
MerchantOrderPaymentService merchantOrderPaymentService;
@Autowired
private IStoredSellerDao storedSellerDao;
private StoredSellerMapper storedSellerMapper;
@Autowired
private InBoxFacade inBoxFacade;
... ... @@ -67,6 +68,9 @@ public class StoredSellerDepositServiceImpl implements IStoredSellerDepositServi
@Autowired
private IStoredSellerService storedSellerService;
@Autowired
StoredSellerCacheService storedSellerCacheService;
/**
* 充值保证金
*/
... ... @@ -323,9 +327,9 @@ public class StoredSellerDepositServiceImpl implements IStoredSellerDepositServi
//更新为退驻
logger.info("StoredSellerServiceImpl updateStoredSellerQuitStatus begin ,uid is {} ,ts {} ",uid,ts);
int num = storedSellerDao.updateStatusByUid(uid,StoredSellerStatusEnum.quit.getId(),expectStatus,ts);
//TODO 状态变化,清掉缓存
//cacheService.removeStoredSeller(uid);
int num = storedSellerMapper.updateStatusByUid(uid,StoredSellerStatusEnum.quit.getId(),expectStatus,ts);
// 状态变化,清掉缓存
storedSellerCacheService.removeStoredSeller(uid);
logger.info("StoredSellerServiceImpl updateStoredSellerQuitStatus end ,uid is {} ,update num {}",uid,num);
... ...
... ... @@ -56,7 +56,7 @@ datasources:
- com.yohoufo.dal.order.SellerWalletDetailMapper
- com.yohoufo.dal.order.OrderCouponMapper
- com.yohoufo.dal.order.EntrySellerRechargeOrderMapper
- com.yohoufo.dal.order.IStoredSellerDao
- com.yohoufo.dal.order.StoredSellerMapper
ufo_promotion:
... ...
... ... @@ -56,7 +56,7 @@ datasources:
- com.yohoufo.dal.order.SellerWalletDetailMapper
- com.yohoufo.dal.order.OrderCouponMapper
- com.yohoufo.dal.order.EntrySellerRechargeOrderMapper
- com.yohoufo.dal.order.IStoredSellerDao
- com.yohoufo.dal.order.StoredSellerMapper
ufo_promotion:
... ...