|
@@ -22,6 +22,7 @@ import com.diagbot.dto.UserAndProdutDTO;
|
|
|
import com.diagbot.entity.OpenedProducts;
|
|
|
import com.diagbot.entity.ProductService;
|
|
|
import com.diagbot.entity.ServiceInfo;
|
|
|
+import com.diagbot.entity.UserRenewals;
|
|
|
import com.diagbot.enums.AccessTypeEnum;
|
|
|
import com.diagbot.enums.StatusEnum;
|
|
|
import com.diagbot.exception.CommonErrorCode;
|
|
@@ -46,7 +47,8 @@ public class OpenedProductsFacade extends OpenedProductsServiceImpl {
|
|
|
private ServiceInfoFacade serviceInfoFacade;
|
|
|
@Autowired
|
|
|
private ProductServiceFacade productServiceFacade;
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ private UserRenewalsFacade userRenewalsFacade;
|
|
|
public List<OpenedProducts> getByAppkeyAndSecretFac(Map map) {
|
|
|
return this.getByAppkeyAndSecret(map);
|
|
|
}
|
|
@@ -216,10 +218,20 @@ public class OpenedProductsFacade extends OpenedProductsServiceImpl {
|
|
|
openedProducts.setEndTime(DateUtil.parseDate(modifyOpeningTimeVO.getEndTime()));
|
|
|
openedProducts.setCreator(UserUtils.getCurrentPrincipleID());
|
|
|
openedProducts.setGmtCreate(DateUtil.now());
|
|
|
+ UserRenewals userRenewals = new UserRenewals();
|
|
|
+ userRenewals.setUserId(modifyOpeningTimeVO.getUserId());
|
|
|
+ userRenewals.setProductId(modifyOpeningTimeVO.getProductId());
|
|
|
+ userRenewals.setRenewalsStutas(1);
|
|
|
+ //修改续费时间
|
|
|
boolean res = modifyOpeningTime(openedProducts);
|
|
|
if (!res) {
|
|
|
throw new CommonException(CommonErrorCode.UPDATE_INFO_FAIL);
|
|
|
}
|
|
|
+ //修改续费状态
|
|
|
+ res = userRenewalsFacade.updateRenewalStutas(userRenewals);
|
|
|
+ if (!res) {
|
|
|
+ throw new CommonException(CommonErrorCode.UPDATE_INFO_FAIL);
|
|
|
+ }
|
|
|
return RespDTO.onSuc(res);
|
|
|
}
|
|
|
private String getDatePoor(Date endDate, Date nowDate) {
|