Преглед изворни кода

ias 修改手机号调整,支付查询调整

master
chenchaod пре 4 дана
родитељ
комит
c36be34f35

+ 2
- 0
zhywpt-service-ias/src/main/java/cn/com/taiji/ias/manager/order/OrderPayQueryManager.java Прегледај датотеку

@@ -72,6 +72,8 @@ public class OrderPayQueryManager extends AbstractOrderManager<OrderPayQueryRequ
}
orderPayRepo.persistAll(orderPays);
dataStream.put(ORDERPAY, orderPays);
}else {
updateOrder(order);
}
// 保存业务日志
// bizServiceLog(request.getOpenId(), ServiceType.PAYCONTRACT, order, order.getOrderNo());

+ 10
- 0
zhywpt-service-ias/src/main/java/cn/com/taiji/ias/manager/portal/ChangeMobileByCodeManager.java Прегледај датотеку

@@ -4,6 +4,7 @@ import cn.com.taiji.common.manager.net.http.ServiceHandleException;
import cn.com.taiji.core.entity.dict.basic.SourceType;
import cn.com.taiji.core.entity.log.IasInterfaceLog;
import cn.com.taiji.core.entity.user.AccountInfo;
import cn.com.taiji.core.entity.user.Staff;
import cn.com.taiji.core.manager.cache.RedisKeyGenerator;
import cn.com.taiji.core.manager.comm.LogManager;
import cn.com.taiji.core.model.comm.protocol.ias.portal.ChangeMobileByCodeRequest;
@@ -11,6 +12,7 @@ import cn.com.taiji.core.model.comm.protocol.ias.portal.ChangeMobileByCodeRespon
import cn.com.taiji.core.model.comm.protocol.valid.GlyServiceError;
import cn.com.taiji.core.repo.jpa.log.IasInterfaceLogRepo;
import cn.com.taiji.core.repo.jpa.user.AccountInfoRepo;
import cn.com.taiji.core.repo.jpa.user.StaffRepo;
import com.google.common.collect.Lists;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -27,6 +29,8 @@ public class ChangeMobileByCodeManager extends AbstractLoginManager implements L
private AccountInfoRepo accountInfoRepo;
@Autowired
private IasInterfaceLogRepo logRepo;
@Autowired
private StaffRepo staffRepo;

public ChangeMobileByCodeResponse serviceHandle(ChangeMobileByCodeRequest request) throws ServiceHandleException {
try {
@@ -50,6 +54,12 @@ public class ChangeMobileByCodeManager extends AbstractLoginManager implements L
accountInfo.setMobile(request.getNewMobile());
accountInfo.setUpdateTime(LocalDateTime.now());
accountInfoRepo.save(accountInfo);
Staff staff = staffRepo.findByOpenId(accountInfo.getOpenId());
if (staff!=null){
staff.setStaffId(request.getNewMobile());
staff.setMobile(request.getNewMobile());
staffRepo.merge(staff);
}
redisManager.delete(RedisKeyGenerator.getSmsCodeKey(request.getNewMobile(), request.getLoginSource().name(), 3));
deleteTokenCache(request.getAccessToken());
return onSuccess(request, new ChangeMobileByCodeResponse(), IasInterfaceLog.class, System.currentTimeMillis() - begin);

Loading…
Откажи
Сачувај