Authored by qinchao

预存保证金回调接口,更新为入驻商户

... ... @@ -42,14 +42,14 @@ public class StoredSellerController {
* 更新商户为入驻商户
*/
@RequestMapping(params = "method=ufo.user.addUserAsStoredSeller")
public ApiResponse addUserAsStoredSeller(RealNameAuthorizeReqVO reqVO) throws GatewayException {
logger.info("enter StoredSellerController addUserAsStoredSeller param reqVO is {}", reqVO);
public ApiResponse addUserAsStoredSeller(@RequestParam("uid") Integer uid) throws GatewayException {
logger.info("enter StoredSellerController addUserAsStoredSeller param uid is {}", uid);
//(1) 优先校验请求的参数
if (reqVO == null || reqVO.getUid() <=0 ){
if (uid == null || uid <=0 ){
throw new GatewayException(400, "参数错误,uid不存在!");
}
storedSellerService.addUserAsStoredSeller(reqVO.getUid());
storedSellerService.addUserAsStoredSeller(uid);
return new ApiResponse();
}
... ...
... ... @@ -135,7 +135,7 @@ public class StoredSellerServiceImpl implements IStoredSellerService {
ZhiMaCert zhiMaCert=realNameAuthorizeService.getValidZhiMaCert(uid);
if(null==zhiMaCert){
logger.error("StoredSellerServiceImpl get zhi ma cert info is null , uid is {} ",uid);
throw new ServiceException(400,"商户没有实名认证,不允许更新为入驻商户");
throw new ServiceException(400,"商户没有实名认证通过,不允许入驻");
}
//@TODO 检查是否已经缴纳保证金
... ... @@ -156,7 +156,7 @@ public class StoredSellerServiceImpl implements IStoredSellerService {
int num=storedSellerDao.insert(storedSeller);
if(num<0){
logger.error("StoredSellerServiceImpl addUserAsStoredSeller error uid is {} , storedSeller {} ,insert num {} ",uid,storedSeller,num);
throw new ServiceException(400,"更新入驻用户信息错误");
throw new ServiceException(400,"薪资入驻用户信息错误");
}
//保存到redis
... ...