feat:平台账号
This commit is contained in:
@@ -126,7 +126,7 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
||||
//生成密码和盐值
|
||||
byte[] saltBytes = PasswordUtil.generateSalt();
|
||||
String salt = PasswordUtil.bytesToHex(saltBytes);
|
||||
String password = PasswordUtil.encryptPassword(substring, saltBytes);
|
||||
String password = PasswordUtil.encryptPassword(substring, salt);
|
||||
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(lineInfo.getPartnerId());
|
||||
hyPartnerUserInfoDO.setDownstreamSystemPassword(password);
|
||||
hyPartnerUserInfoDO.setDownstreamSystemSalting(salt);
|
||||
@@ -169,4 +169,5 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
||||
response.setBigRegionId(byLineId.getBigRegionId());
|
||||
return response;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ public class PushServiceImpl implements PushService {
|
||||
|
||||
@Override
|
||||
public Boolean pushDataToPOS(ZxjpApiRequest zxjpApiRequest) {
|
||||
String apiUrl = url + "XXX";
|
||||
String apiUrl = url + "/dzgV1/zxcrm/shop/upsert";
|
||||
return executeApiCall(apiUrl,zxjpApiRequest, Boolean.class,username,secret);
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ public class PushServiceImpl implements PushService {
|
||||
}
|
||||
|
||||
private Boolean modifyPosPassword(ModifyPasswordDTO dto) {
|
||||
String apiUrl = url + "XXX";
|
||||
String apiUrl = url + "/dzgV1/zxcrm/business_user/modifyPassword";
|
||||
return executeApiCall(apiUrl,dto, Boolean.class,username,secret);
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ public class PushServiceImpl implements PushService {
|
||||
public Boolean modifyDownstreamSystem(ModifyPasswordDTO modifyPasswordDTO) {
|
||||
try {
|
||||
this.modifyPosPassword(modifyPasswordDTO);
|
||||
this.modifyXGJPassword(modifyPasswordDTO);
|
||||
//this.modifyXGJPassword(modifyPasswordDTO);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException(ErrorCodeEnum.THIRD_API_ERROR);
|
||||
}
|
||||
@@ -123,7 +123,7 @@ public class PushServiceImpl implements PushService {
|
||||
|
||||
@Override
|
||||
public String getPosToken(GetAccessTokenDTO dto) {
|
||||
String apiUrl = url + "XXX";
|
||||
String apiUrl = url + "/dzgV1/zxcrm/business_user/generateToken";
|
||||
return executeApiCall(apiUrl,dto, String.class,username,secret);
|
||||
}
|
||||
|
||||
|
||||
@@ -94,20 +94,20 @@ public class ShopAccountServiceImpl implements ShopAccountService {
|
||||
}
|
||||
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(shopInfo.getPartnerId());
|
||||
hyPartnerUserInfoDO.setDownstreamSystemPassword(modifyPasswordDTO.getPassword());
|
||||
hyPartnerUserInfoDO.setDownstreamSystemSecondaryPassword(modifyPasswordDTO.getPasswordSecondary());
|
||||
hyPartnerUserInfoDO.setDownstreamSystemSalting(modifyPasswordDTO.getPasswordSalt());
|
||||
hyPartnerUserInfoDO.setUpdateTime(new Date());
|
||||
hyPartnerUserInfoDAO.updatePasswordByPartnerId(hyPartnerUserInfoDO);
|
||||
|
||||
List<MiniShopsResponse> shopListSuccessOpen = shopService.getShopListSuccessOpen(shopInfo.getLineId());
|
||||
//修改数据
|
||||
List<Long> shopIdList = shopListSuccessOpen.stream().map(MiniShopsResponse::getShopId).collect(Collectors.toList());
|
||||
List<Long> shopIdList = shopInfoDAO.getShopIdList(shopInfo.getLineId());
|
||||
|
||||
//批量修改密码 密码盐
|
||||
shopAccountDAO.batchUpdatePasswordByShopIds(shopIdList,modifyPasswordDTO.getPassword(),modifyPasswordDTO.getPasswordSalt(),new Date());
|
||||
shopAccountDAO.batchUpdatePasswordByShopIds(shopIdList,modifyPasswordDTO.getPassword(),modifyPasswordDTO.getPasswordSecondary(),modifyPasswordDTO.getPasswordSalt(),new Date());
|
||||
|
||||
//当前加盟商所有开店成功的CODE
|
||||
List<String> shopCodeList = shopListSuccessOpen.stream().map(MiniShopsResponse::getShopCode).collect(Collectors.toList());
|
||||
List<String> shopCodeList = shopInfoDAO.getShopCodeList(shopInfo.getLineId());
|
||||
modifyPasswordDTO.setShopCode(shopCodeList);
|
||||
modifyPasswordDTO.setMobile(hyPartnerUserInfoDO.getMobile());
|
||||
|
||||
//推送下游系统
|
||||
pushService.modifyDownstreamSystem(modifyPasswordDTO);
|
||||
@@ -202,7 +202,9 @@ public class ShopAccountServiceImpl implements ShopAccountService {
|
||||
// TODO: 2025/4/8 suzhuhong_
|
||||
try {
|
||||
if (DownSystemTypeEnum.POS.equals(downSystemTypeEnum)){
|
||||
pushService.pushDataToPOS(data);
|
||||
Boolean successFlag = pushService.pushDataToPOS(data);
|
||||
OpenStatusEnum openStatusEnum = successFlag ? OpenStatusEnum.OPENSTATUSENUM_5 : OpenStatusEnum.OPENSTATUSENUM_6;
|
||||
shopAccountDAO.updateEntryStatusByShopIdAndSystemName(accountAuditDTO.getShopId(),Arrays.asList(ShopAccountEnum.HUOMA.getSystemName()),openStatusEnum.getCode());
|
||||
}else {
|
||||
pushService.pushDataToXGJ(data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user