同步会员新增user_longin信息
This commit is contained in:
parent
3fbec6b4c6
commit
7793e8c88d
@ -467,6 +467,11 @@ public class AccountController {
|
|||||||
return accountUserBaseService.saveBatchAccountInfo(accountUserInfoList);
|
return accountUserBaseService.saveBatchAccountInfo(accountUserInfoList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/saveBatchAccountUserLogin", method = RequestMethod.POST)
|
||||||
|
public ThirdApiRes saveBatchAccountUserLogin(@RequestBody List<AccountUserLogin> accountUserLoginList) {
|
||||||
|
return accountUserBaseService.saveBatchAccountUserLogin(accountUserLoginList);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping(value = "/findOneAccountUserBase", method = RequestMethod.POST)
|
@RequestMapping(value = "/findOneAccountUserBase", method = RequestMethod.POST)
|
||||||
public AccountUserBase findOneAccountUserBase(@RequestBody AccountUserBase accountUserBase) {
|
public AccountUserBase findOneAccountUserBase(@RequestBody AccountUserBase accountUserBase) {
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import com.suisung.mall.common.api.CommonResult;
|
|||||||
import com.suisung.mall.common.domain.UserDto;
|
import com.suisung.mall.common.domain.UserDto;
|
||||||
import com.suisung.mall.common.modules.account.AccountUserBase;
|
import com.suisung.mall.common.modules.account.AccountUserBase;
|
||||||
import com.suisung.mall.common.modules.account.AccountUserInfo;
|
import com.suisung.mall.common.modules.account.AccountUserInfo;
|
||||||
|
import com.suisung.mall.common.modules.account.AccountUserLogin;
|
||||||
import com.suisung.mall.common.pojo.req.WxUserInfoReq;
|
import com.suisung.mall.common.pojo.req.WxUserInfoReq;
|
||||||
import com.suisung.mall.common.pojo.res.ThirdApiRes;
|
import com.suisung.mall.common.pojo.res.ThirdApiRes;
|
||||||
import com.suisung.mall.core.web.service.IBaseService;
|
import com.suisung.mall.core.web.service.IBaseService;
|
||||||
@ -296,4 +297,11 @@ public interface AccountUserBaseService extends IBaseService<AccountUserBase> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
ThirdApiRes saveBatchAccountInfo(List<AccountUserInfo> accountUserInfoList);
|
ThirdApiRes saveBatchAccountInfo(List<AccountUserInfo> accountUserInfoList);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量保存accountInfo
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
ThirdApiRes saveBatchAccountUserLogin(List<AccountUserLogin> accountUserLoginList);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3803,6 +3803,23 @@ public class AccountUserBaseServiceImpl extends BaseServiceImpl<AccountUserBaseM
|
|||||||
return new ThirdApiRes().fail(250, "保存异常");
|
return new ThirdApiRes().fail(250, "保存异常");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ThirdApiRes saveBatchAccountUserLogin(List<AccountUserLogin> accountUserLoginList) {
|
||||||
|
boolean result = false;
|
||||||
|
if (!accountUserLoginList.isEmpty()) {
|
||||||
|
try {
|
||||||
|
result = accountUserLoginService.saveBatch(accountUserLoginList, accountUserLoginList.size());
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException("保存AccountUserLogin报错:" + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (result) {
|
||||||
|
return new ThirdApiRes().success("成功");
|
||||||
|
}
|
||||||
|
return new ThirdApiRes().fail(250, "保存异常");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检查并修复商户店铺信息
|
* 检查并修复商户店铺信息
|
||||||
* 重要(补偿机制),检查修复商户入驻店铺信息(商家账号关联入驻店铺Id,给商家账户创立公司员工账号和权限)
|
* 重要(补偿机制),检查修复商户入驻店铺信息(商家账号关联入驻店铺Id,给商家账户创立公司员工账号和权限)
|
||||||
|
|||||||
@ -278,6 +278,15 @@ public interface AccountService {
|
|||||||
@PostMapping(value = "/admin/account/accountController/saveBatchAccountInfo")
|
@PostMapping(value = "/admin/account/accountController/saveBatchAccountInfo")
|
||||||
ThirdApiRes saveBatchAccountInfo(@RequestBody List<AccountUserInfo> accountUserInfoList);
|
ThirdApiRes saveBatchAccountInfo(@RequestBody List<AccountUserInfo> accountUserInfoList);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量保存accountUserLogin
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping(value = "/admin/account/accountController/saveBatchAccountUserLogin")
|
||||||
|
ThirdApiRes saveBatchAccountUserLogin(@RequestBody List<AccountUserLogin> accountUserLoginList);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量保存accountInfo
|
* 批量保存accountInfo
|
||||||
*
|
*
|
||||||
|
|||||||
@ -22,6 +22,7 @@ import com.suisung.mall.common.feignService.AccountService;
|
|||||||
import com.suisung.mall.common.feignService.PayService;
|
import com.suisung.mall.common.feignService.PayService;
|
||||||
import com.suisung.mall.common.modules.account.AccountUserBase;
|
import com.suisung.mall.common.modules.account.AccountUserBase;
|
||||||
import com.suisung.mall.common.modules.account.AccountUserInfo;
|
import com.suisung.mall.common.modules.account.AccountUserInfo;
|
||||||
|
import com.suisung.mall.common.modules.account.AccountUserLogin;
|
||||||
import com.suisung.mall.common.modules.base.ShopBaseProductBrand;
|
import com.suisung.mall.common.modules.base.ShopBaseProductBrand;
|
||||||
import com.suisung.mall.common.modules.base.ShopBaseProductCategory;
|
import com.suisung.mall.common.modules.base.ShopBaseProductCategory;
|
||||||
import com.suisung.mall.common.modules.base.ShopBaseProductSpec;
|
import com.suisung.mall.common.modules.base.ShopBaseProductSpec;
|
||||||
@ -608,6 +609,8 @@ public abstract class SyncBaseThirdSxAbstract{
|
|||||||
List<AccountUserBase> addAccountUserBases=new ArrayList<>();
|
List<AccountUserBase> addAccountUserBases=new ArrayList<>();
|
||||||
List<AccountUserInfo> addAcountUserInfo=new ArrayList<>();
|
List<AccountUserInfo> addAcountUserInfo=new ArrayList<>();
|
||||||
List<PayUserResource> addPayUserResource=new ArrayList<>();
|
List<PayUserResource> addPayUserResource=new ArrayList<>();
|
||||||
|
List<AccountUserLogin> accountUserLogins=new ArrayList<>();
|
||||||
|
Date today=new Date();
|
||||||
for (int i = 0; i < accountBaseIds.size(); i++) {
|
for (int i = 0; i < accountBaseIds.size(); i++) {
|
||||||
// account_user_base
|
// account_user_base
|
||||||
SyncThirdMemberReq syncThirdMemberReq=addMemberList.get(i);
|
SyncThirdMemberReq syncThirdMemberReq=addMemberList.get(i);
|
||||||
@ -648,6 +651,14 @@ public abstract class SyncBaseThirdSxAbstract{
|
|||||||
accountUserInfo.setUser_birthday(DateTimeUtils.parseDate(syncThirdMemberReq.getUser_birthday(), "yyyy-MM-dd"));
|
accountUserInfo.setUser_birthday(DateTimeUtils.parseDate(syncThirdMemberReq.getUser_birthday(), "yyyy-MM-dd"));
|
||||||
}
|
}
|
||||||
addAcountUserInfo.add(accountUserInfo);
|
addAcountUserInfo.add(accountUserInfo);
|
||||||
|
|
||||||
|
//account
|
||||||
|
AccountUserLogin accountUserLogin = new AccountUserLogin();
|
||||||
|
accountUserLogin.setUser_id(userId);
|
||||||
|
accountUserLogin.setUser_active_time(today);
|
||||||
|
accountUserLogin.setUser_reg_date(today);
|
||||||
|
accountUserLogin.setUser_reg_time(today.getTime());
|
||||||
|
accountUserLogins.add(accountUserLogin);
|
||||||
if (syncThirdMemberReq.getUser_money() != null || syncThirdMemberReq.getUser_points() != null) {
|
if (syncThirdMemberReq.getUser_money() != null || syncThirdMemberReq.getUser_points() != null) {
|
||||||
// pay_user_resource 用户支付资源,积分,余额
|
// pay_user_resource 用户支付资源,积分,余额
|
||||||
PayUserResource payUserResource = new PayUserResource();
|
PayUserResource payUserResource = new PayUserResource();
|
||||||
@ -673,13 +684,18 @@ public abstract class SyncBaseThirdSxAbstract{
|
|||||||
throw new ApiException(ResultCode.FAILED,"addAcountUserInfo保存异常");
|
throw new ApiException(ResultCode.FAILED,"addAcountUserInfo保存异常");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!addPayUserResource.isEmpty()){
|
if(!addPayUserResource.isEmpty()){
|
||||||
ThirdApiRes thirdApiRes= payService.saveBatchPayUserResources(addPayUserResource);
|
ThirdApiRes thirdApiRes= payService.saveBatchPayUserResources(addPayUserResource);
|
||||||
if(thirdApiRes.getError_code()!=0){
|
if(thirdApiRes.getError_code()!=0){
|
||||||
throw new ApiException(ResultCode.FAILED);
|
throw new ApiException(ResultCode.FAILED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(!accountUserLogins.isEmpty()){
|
||||||
|
ThirdApiRes thirdApiRes= accountService.saveBatchAccountUserLogin(accountUserLogins);
|
||||||
|
if(thirdApiRes.getError_code()!=0){
|
||||||
|
throw new ApiException(ResultCode.FAILED,"accountUserLogin保存异常");
|
||||||
|
}
|
||||||
|
}
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user