|
@@ -1415,7 +1415,9 @@ public class MerchantServiceImpl extends BaseServiceImpl<Merchant, String> imple
|
|
|
Response response=new Response();
|
|
|
|
|
|
if(StringUtils.isNotEmpty(merchant.getId())){
|
|
|
-
|
|
|
+
|
|
|
+ boolean isSignType=false;
|
|
|
+ boolean isServiceMonth=false;
|
|
|
Merchant oldmerchant =this.getById(merchant.getId());
|
|
|
|
|
|
if(StringUtils.isNotEmpty(merchant.getLibId())) {
|
|
@@ -1426,6 +1428,13 @@ public class MerchantServiceImpl extends BaseServiceImpl<Merchant, String> imple
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ if(!oldmerchant.getSignType().equals(merchant.getSignType())) {
|
|
|
+ isSignType=true;
|
|
|
+ }
|
|
|
+ if(!oldmerchant.getLibServiceMonth().equals(merchant.getLibServiceMonth())) {
|
|
|
+ isServiceMonth=true;
|
|
|
+ }
|
|
|
oldmerchant.setDeputyName(merchant.getDeputyName());
|
|
|
oldmerchant.setDeputyPhone(merchant.getDeputyPhone());
|
|
|
oldmerchant.setLegalPerson(merchant.getLegalPerson());
|
|
@@ -1508,21 +1517,6 @@ public class MerchantServiceImpl extends BaseServiceImpl<Merchant, String> imple
|
|
|
consume.setCreateTime(new Date());
|
|
|
libJoinConsumeService.save(consume);
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
- //旧套餐大于新套餐的话,就服务降级
|
|
|
- if(oldmerchant.getSignType()>merchant.getSignType()
|
|
|
- && StringUtils.isNotEmpty(oldmerchant.getLibId())
|
|
|
- && merchant.getCurSummaryTime()!=null) {
|
|
|
-
|
|
|
- //调用openApi接口
|
|
|
- DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
- libVipServiceService.openApiServiceCRM(
|
|
|
- 3,
|
|
|
- oldmerchant.getLibId(),
|
|
|
- oldmerchant.getLibService(),
|
|
|
- format.format(DateHelper.getMonthDate(merchant.getCurSummaryTime(),merchant.getLibServiceMonth())));
|
|
|
- }
|
|
|
//更新套餐
|
|
|
oldmerchant.setSignType(merchant.getSignType());
|
|
|
}
|
|
@@ -1544,6 +1538,19 @@ public class MerchantServiceImpl extends BaseServiceImpl<Merchant, String> imple
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ //旧套餐大于新套餐的话,就服务降级
|
|
|
+ if(isSignType || isServiceMonth) {
|
|
|
+ //调用openApi接口
|
|
|
+ DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ libVipServiceService.openApiServiceCRM(
|
|
|
+ 3,
|
|
|
+ oldmerchant.getLibId(),
|
|
|
+ oldmerchant.getLibService(),
|
|
|
+ format.format(DateHelper.getMonthDate(oldmerchant.getCurSummaryTime(),oldmerchant.getLibServiceMonth())));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
this.syncRecordByMerchant(curadmin.getLoginName(), oldmerchant.getId(),"", "修改套餐商户");
|
|
|
|
|
|
}else{
|