| | |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.common.service.BusParameterSettingService; |
| | | import com.matrix.system.hive.bean.SysBeauticianState; |
| | | import com.matrix.system.hive.bean.SysProjServices; |
| | | import com.matrix.system.hive.bean.SysShopInfo; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | |
| | | |
| | | SysBeauticianStateService sysBeauticianStateService; |
| | | |
| | | BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | BusParameterSettingService busParameterSettingService; |
| | | /** |
| | | * 预约成功短信提醒 |
| | | * |
| | | * @param services |
| | | */ |
| | | // @Async |
| | | @Async |
| | | public void sendYycgNotice(SysProjServices services) { |
| | | //短信接口为肽妍公司定制,暂时写死 |
| | | if (services.getCompanyId() != 17L) { |
| | | return; |
| | | } |
| | | if (isCloseSmsNotice(services)){ |
| | | return; |
| | | } |
| | | if (chackSetting(services)) return; |
| | | |
| | | SysVipInfo sysVipInfo = vipInfoDao.selectById(services.getVipId()); |
| | | SysShopInfo shopInfo = shopInfoService.findById(services.getShopId()); |
| | | String date = DateUtil.dateFormatStr(new Date(), "yyyy年MM月dd日"); |
| | |
| | | |
| | | |
| | | /** |
| | | * 判断是否开启了短信提醒 |
| | | * @param services |
| | | * @return |
| | | */ |
| | | private boolean isCloseSmsNotice(SysProjServices services) { |
| | | BusParameterSettings openSmsNoticeSetting = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.OPEN_SMS_NOTICE, services.getCompanyId()); |
| | | if (StringUtils.isBlank(openSmsNoticeSetting.getParamValue()) |
| | | || AppConstance.IS_N.equals(openSmsNoticeSetting.getParamValue())) { |
| | | LogUtil.debug("未开启短信提醒"); |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 项目划扣短信提醒 |
| | | * |
| | | * @param services |
| | | */ |
| | | // @Async |
| | | @Async |
| | | public void sendHkNotice(SysProjServices services) { |
| | | //短信接口为肽妍公司定制,暂时写死 |
| | | if (services.getCompanyId() != 17L) { |
| | | return; |
| | | } |
| | | if (isCloseSmsNotice(services)){ |
| | | return; |
| | | } |
| | | if (chackSetting(services)) return; |
| | | |
| | | SysVipInfo sysVipInfo = vipInfoDao.selectById(services.getVipId()); |
| | | SysShopInfo shopInfo = shopInfoService.findById(services.getShopId()); |
| | | String date = DateUtil.dateFormatStr(new Date(), "yyyy年MM月dd日"); |
| | |
| | | |
| | | } |
| | | |
| | | private boolean chackSetting(SysProjServices services) { |
| | | //短信接口为肽妍公司定制,暂时写死 |
| | | if (services.getCompanyId() != 17L) { |
| | | return true; |
| | | } |
| | | if (!busParameterSettingService.isSettingOpen(AppConstance.OPEN_SMS_NOTICE, services.getCompanyId())) { |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | |
| | | } |