|
@@ -23,6 +23,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
+import com.cloudcross.ssp.listener.ApplicationListener;
|
|
|
+import com.cloudcross.ssp.loader.AdvertiserLoader;
|
|
|
import com.cloudcross.ssp.model.Account;
|
|
|
import com.cloudcross.ssp.model.Advertiser;
|
|
|
import com.cloudcross.ssp.model.Industry;
|
|
@@ -32,6 +34,7 @@ import com.cloudcross.ssp.service.IAdvertiserService;
|
|
|
import com.cloudcross.ssp.service.IIndustryService;
|
|
|
import com.cloudcross.ssp.service.ILogService;
|
|
|
import com.cloudcross.ssp.service.IMessageService;
|
|
|
+import com.cloudcross.ssp.base.dao.GenericIBatisDao;
|
|
|
import com.cloudcross.ssp.base.utils.freemarker.FreemarkerTemplateProcessor;
|
|
|
import com.cloudcross.ssp.base.web.SimpleController;
|
|
|
import com.cloudcross.ssp.base.web.result.AjaxResult;
|
|
@@ -57,6 +60,8 @@ public class AdvertiserController extends SimpleController {
|
|
|
private IMessageService messageService;
|
|
|
@Autowired
|
|
|
private FreemarkerTemplateProcessor templateProcessor;
|
|
|
+ @Autowired
|
|
|
+ private GenericIBatisDao myBatisDao;
|
|
|
/**
|
|
|
* @return 返回到广告主管理第一页。
|
|
|
*/
|
|
@@ -202,6 +207,8 @@ public class AdvertiserController extends SimpleController {
|
|
|
t.setOperatorId(new Long(0));
|
|
|
}
|
|
|
if (advertiserService.add(t)) {
|
|
|
+ //广告主创建成功,重新广告主信息
|
|
|
+ loadAdvertiser();
|
|
|
//添加广告主后的资质审核消息
|
|
|
Message message = new Message();
|
|
|
Boolean flag = ("".equals(t.getCpiPath())&&"".equals(t.getIdPath())&&"".equals(t.getLicencePath())&&"".equals(t.getOrgPath()));
|
|
@@ -228,6 +235,7 @@ public class AdvertiserController extends SimpleController {
|
|
|
|
|
|
|
|
|
}
|
|
|
+
|
|
|
} else {
|
|
|
Advertiser formerAdvertiser = advertiserService.findById(t.getId());
|
|
|
Industry formerIndustry = industryService.findByIndustryId(formerAdvertiser.getIndustryId());
|
|
@@ -532,5 +540,13 @@ public class AdvertiserController extends SimpleController {
|
|
|
}
|
|
|
return false;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 加载广告主信息
|
|
|
+ */
|
|
|
+ public void loadAdvertiser(){
|
|
|
+ //项目启动时,放在内存的广告主信息处理完毕后,集合会被清空,再次加载广告主信息前不需要再次清空
|
|
|
+ new ApplicationListener().initAdvertiser(myBatisDao);
|
|
|
+ }
|
|
|
|
|
|
}
|