|
@@ -60,6 +60,8 @@ import com.ssj.service.weixin.push.service.PushTemplateService;
|
|
|
import com.ssj.service.weixin.sales.service.LibVipServiceService;
|
|
|
import com.ssj.taskthread.ThreadPool;
|
|
|
|
|
|
+import sun.swing.StringUIClientPropertyKey;
|
|
|
+
|
|
|
|
|
|
@Service
|
|
|
public class MerchantServiceImpl extends BaseServiceImpl<Merchant, String> implements MerchantService {
|
|
@@ -1416,6 +1418,7 @@ public class MerchantServiceImpl extends BaseServiceImpl<Merchant, String> imple
|
|
|
|
|
|
if(StringUtils.isNotEmpty(merchant.getId())){
|
|
|
|
|
|
+ boolean isLibId=false;
|
|
|
boolean isSignType=false;
|
|
|
boolean isServiceMonth=false;
|
|
|
Merchant oldmerchant =this.getById(merchant.getId());
|
|
@@ -1443,6 +1446,11 @@ public class MerchantServiceImpl extends BaseServiceImpl<Merchant, String> imple
|
|
|
if(!oldmerchant.getLibServiceMonth().equals(merchant.getLibServiceMonth())) {
|
|
|
isServiceMonth=true;
|
|
|
}
|
|
|
+ if(StringUtils.isNotEmpty(merchant.getLibId())) {
|
|
|
+ if(!merchant.getLibId().equals(oldmerchant.getLibId())) {
|
|
|
+ isLibId=true;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
oldmerchant.setDeputyName(merchant.getDeputyName());
|
|
|
oldmerchant.setDeputyPhone(merchant.getDeputyPhone());
|
|
@@ -1553,20 +1561,23 @@ public class MerchantServiceImpl extends BaseServiceImpl<Merchant, String> imple
|
|
|
}
|
|
|
|
|
|
|
|
|
- if(isSignType || isServiceMonth) {
|
|
|
- //记录套餐更改记录
|
|
|
- for (int i = oldMonth+1; i <= month; i++) {
|
|
|
- TbLibJoinConsume consume=new TbLibJoinConsume();
|
|
|
- consume.setToLibId(merchant.getLibId());
|
|
|
- consume.setToMerchantId(merchant.getId());
|
|
|
- consume.setLibService(oldmerchant.getLibService());
|
|
|
- consume.setPlatformService(0);
|
|
|
- consume.setType(6);
|
|
|
- consume.setSignType(merchant.getSignType());
|
|
|
- consume.setComputeNum(merchant.getCurIsSummary());
|
|
|
- consume.setRemarks("服务包开通【服务包更改:第"+i+"月】");
|
|
|
- consume.setCreateTime(new Date());
|
|
|
- libJoinConsumeService.save(consume);
|
|
|
+ if(isSignType || isServiceMonth || isLibId) {
|
|
|
+
|
|
|
+ if(isSignType || isServiceMonth) {
|
|
|
+ //记录套餐更改记录
|
|
|
+ for (int i = oldMonth+1; i <= month; i++) {
|
|
|
+ TbLibJoinConsume consume=new TbLibJoinConsume();
|
|
|
+ consume.setToLibId(merchant.getLibId());
|
|
|
+ consume.setToMerchantId(merchant.getId());
|
|
|
+ consume.setLibService(oldmerchant.getLibService());
|
|
|
+ consume.setPlatformService(0);
|
|
|
+ consume.setType(6);
|
|
|
+ consume.setSignType(merchant.getSignType());
|
|
|
+ consume.setComputeNum(merchant.getCurIsSummary());
|
|
|
+ consume.setRemarks("服务包开通【服务包更改:第"+i+"月】");
|
|
|
+ consume.setCreateTime(new Date());
|
|
|
+ libJoinConsumeService.save(consume);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
//调用openApi接口
|
|
@@ -1724,6 +1735,17 @@ public class MerchantServiceImpl extends BaseServiceImpl<Merchant, String> imple
|
|
|
libJoinConsumeService.save(consume);
|
|
|
}
|
|
|
|
|
|
+ //调用openApi接口
|
|
|
+ if(StringUtils.isNotEmpty(merchant.getLibId())) {
|
|
|
+ DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ libVipServiceService.openApiServiceCRM(
|
|
|
+ 3,
|
|
|
+ merchant.getLibId(),
|
|
|
+ merchant.getSignType(),
|
|
|
+ merchant.getLibService(),
|
|
|
+ format.format(DateHelper.getMonthDate(merchant.getComputeTime(),merchant.getLibServiceMonth())));
|
|
|
+ }
|
|
|
+
|
|
|
this.syncRecordByMerchant(curadmin.getLoginName(), merchant.getId(),"", "新增套餐商户");
|
|
|
}
|
|
|
|