Commit 8c1fae39 by manxiaoqiang

Merge remote-tracking branch 'remotes/origin/feature_20180116_new'

* remotes/origin/feature_20180116_new: 客户表-1 app排序 # Conflicts: # .idea/workspace.xml
parents 95387e86 0b772f9a
package common.task;
import common.context.AppUtils;
import common.model.Account4Web;
import common.model.Contract;
import common.model.User;
import common.model.UserLog;
......@@ -12,6 +13,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import tkio.model.PackageType;
import tkio.repository.PackageTypeRepository;
import tkio.service.TkioAccountService;
import util.DateUtil;
import util.IPAddrUtil;
import util.MailUtils;
......@@ -30,6 +32,7 @@ public class ContractSendEmailThread
private PackageTypeRepository packageTypeRepository = AppUtils.getApplicationContext().getBean(PackageTypeRepository.class);
private UserRepository userRepository = AppUtils.getApplicationContext().getBean(UserRepository.class);
private TkioAccountService tkioAccountService = AppUtils.getApplicationContext().getBean(TkioAccountService.class);
private Contract contract;
......@@ -42,7 +45,8 @@ public class ContractSendEmailThread
{
Map<Long, String> packageMap = getPackageMap();
StringBuffer sb = new StringBuffer();
sb.append("账号 :" + this.contract.getEmail() + " 签约了," + " 套餐 :" +
Account4Web one = tkioAccountService.findOne(this.contract.getEmail());
sb.append("公司 : "+ one.getCompany() +" 账号 :" + this.contract.getEmail() + " 签约了," + " 套餐 :" +
packageMap.get(this.contract.getPriceLevel()) + ",开始时间 " + this.contract.getStartDate()
+ ",结束时间 " + this.contract.getEndDate());
User user = userRepository.findOne(this.contract.getSale());
......
......@@ -84,11 +84,15 @@ public class AccountTask {
}else {
account4Web.setIoStatus(true);
}
if((account4Web.getTrack().doubleValue() != 0) && (null != account4Web.getTrackLimit())){
if((account4Web.getTrack().doubleValue() / account4Web.getTrackLimit().doubleValue()) > f){
account4Web.setTrackStatus(false);
account4Web.setStatus("流量用尽");
}
if(account4Web.getIoLimit().doubleValue() == -1){
account4Web.setIoStatus(true);
account4Web.setStatus("已激活");
}
if(account4Web.getTrackLimit().doubleValue() == -1){
account4Web.setTrackStatus(true);
account4Web.setStatus("已激活");
}
}
account4Web.setUser(ac.getName());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment