|
@@ -1309,6 +1309,16 @@ public class AuditDetailController extends AbstractController{
|
|
|
displaceAuditBean.setAuditStatus("4");
|
|
|
|
|
|
|
|
|
+ //精品机判断是否是通票卖家
|
|
|
+ log.info("jpjgh===="+jpjgh);
|
|
|
+ log.info("saleId===="+displaceAuditBean.getSaleId());
|
|
|
+ if(jpjgh.equals(displaceAuditBean.getAgentId())){
|
|
|
+ String paltTpSet=displaceAuditService.findSaleInfoBySaleId(displaceAuditBean.getSaleId());
|
|
|
+ log.info("1paltTpSet===="+paltTpSet);
|
|
|
+ if(StringUtils.isNotBlank(paltTpSet)&&"0".equals(paltTpSet)){
|
|
|
+ displaceAuditBean.setIfDeposit("1");
|
|
|
+ }
|
|
|
+ }
|
|
|
// 补充信息
|
|
|
boolean flag = displaceAuditService.addInfoNew(displaceAuditBean);
|
|
|
if(!flag) {
|
|
@@ -1326,7 +1336,7 @@ public class AuditDetailController extends AbstractController{
|
|
|
wxsms = wxsms.replaceAll("first", "有一台设备正在寻找买家");
|
|
|
wxsms = wxsms.replaceAll("keyword1", sbmc+"");
|
|
|
if("3".equals(displaceAuditBean.getUpType())){
|
|
|
- wxsms = wxsms.replaceAll("keyword2", "最低价:"+displaceAuditBean.getMinPrice()+"万元-最高价:"+displaceAuditBean.getMaxPrice());
|
|
|
+ wxsms = wxsms.replaceAll("keyword2", "最低价:"+displaceAuditBean.getMinPrice()+"万元-最高价:"+displaceAuditBean.getMaxPrice()+"万元");
|
|
|
}else{
|
|
|
wxsms = wxsms.replaceAll("keyword2", displaceAuditBean.getMinMoney()+"万元");
|
|
|
}
|
|
@@ -1358,7 +1368,7 @@ public class AuditDetailController extends AbstractController{
|
|
|
param1.put("first",new TemplateData("有一台设备正在寻找买家","#696969"));
|
|
|
param1.put("keyword1",new TemplateData(sbmc+"","#696969"));
|
|
|
if("3".equals(displaceAuditBean.getUpType())){
|
|
|
- param1.put("keyword2",new TemplateData("最低价:"+displaceAuditBean.getMinPrice()+"万元-最高价:"+displaceAuditBean.getMaxPrice(),"#696969"));
|
|
|
+ param1.put("keyword2",new TemplateData("最低价:"+displaceAuditBean.getMinPrice()+"万元-最高价:"+displaceAuditBean.getMaxPrice()+"万元","#696969"));
|
|
|
}else{
|
|
|
param1.put("keyword2",new TemplateData(displaceAuditBean.getMinMoney()+"万元","#696969"));
|
|
|
}
|
|
@@ -1414,7 +1424,7 @@ public class AuditDetailController extends AbstractController{
|
|
|
param2.put("first",new TemplateData("有一台设备正在寻找买家","#696969"));
|
|
|
param2.put("keyword1",new TemplateData(sbmc+"","#696969"));
|
|
|
if("3".equals(displaceAuditBean.getUpType())){
|
|
|
- param2.put("keyword2",new TemplateData("最低价:"+displaceAuditBean.getMinPrice()+"万元-最高价:"+displaceAuditBean.getMaxPrice(),"#696969"));
|
|
|
+ param2.put("keyword2",new TemplateData("最低价:"+displaceAuditBean.getMinPrice()+"万元-最高价:"+displaceAuditBean.getMaxPrice()+"万元","#696969"));
|
|
|
}else{
|
|
|
param2.put("keyword2",new TemplateData(displaceAuditBean.getMinMoney()+"万元","#696969"));
|
|
|
}
|
|
@@ -1694,13 +1704,24 @@ public class AuditDetailController extends AbstractController{
|
|
|
displaceAuditBean.setAuditStatus("4");
|
|
|
|
|
|
|
|
|
+ //精品机判断是否是通票卖家
|
|
|
+ log.info("1jpjgh===="+jpjgh);
|
|
|
+ log.info("saleId===="+displaceAuditBean.getSaleId());
|
|
|
+ String saleId_f=StringUtils.isBlank(displaceAuditBean.getSaleId())?"":displaceAuditBean.getSaleId();
|
|
|
+ if(StringUtils.isBlank(displaceAuditBean.getSaleId())){
|
|
|
+ saleId_f=displaceAuditService.findDisPlaceInfoById(displaceAuditBean.getDisplaceId());
|
|
|
+ }
|
|
|
+ if(jpjgh.equals(displaceAuditBean.getAgentId())&&!("2").equals(displaceAuditBean.getIfDeposit())){
|
|
|
+ String paltTpSet=displaceAuditService.findSaleInfoBySaleId(saleId_f);
|
|
|
+ log.info("1paltTpSet===="+paltTpSet);
|
|
|
+ if(StringUtils.isNotBlank(paltTpSet)&&"0".equals(paltTpSet)){
|
|
|
+ displaceAuditBean.setIfDeposit("1");
|
|
|
+ }else{
|
|
|
+ displaceAuditBean.setIfDeposit("2");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
- // 补充信息
|
|
|
- boolean flag = displaceAuditService.addInfoNew(displaceAuditBean);
|
|
|
- if(!flag){
|
|
|
- resultBean= new PageResultBean(PageResultBean.FAIL_CODE,"系统繁忙,请稍后再来!");
|
|
|
- return;
|
|
|
- }
|
|
|
|
|
|
// 记录id
|
|
|
String id = super.getParameter(request, "id");
|
|
@@ -1728,109 +1749,164 @@ public class AuditDetailController extends AbstractController{
|
|
|
pubTimeStr = "";
|
|
|
}
|
|
|
|
|
|
- // 反馈内容
|
|
|
- // String diggerUrl = TemplateConstants.ZHSH_DIGGER_URL + "?agentId=" + agentId + "&id=" + id;
|
|
|
- String diggerUrl = "https://www.weigongcheng.net/wjj-api/index.html#/join" + "?agentId=" + agentId + "&displaceId="+displaceId+"&status="+displaceAuditBean.getAuditStatus()+"&id=" + id;
|
|
|
- String sms = TemplateConstants.ZHSH_DIGGER_UP_SMS;
|
|
|
- sms = sms.replaceAll("agentName", agentName);
|
|
|
- sms = sms.replaceAll("displaceId", displaceId);
|
|
|
- sms = sms.replaceAll("sbmc", sbmc);
|
|
|
-
|
|
|
- String wxsms = TemplateConstants.ZHSH_DIGGER_TEMPLATE_CONTENT;
|
|
|
- wxsms = wxsms.replaceAll("first", "有一台设备正在寻找买家");
|
|
|
- wxsms = wxsms.replaceAll("keyword1", sbmc+"");
|
|
|
- if("3".equals(displaceAuditBean.getUpType())){
|
|
|
- wxsms = wxsms.replaceAll("keyword2", "最低价:"+displaceAuditBean.getMinPrice()+"万元-最高价:"+displaceAuditBean.getMaxPrice());
|
|
|
- }else{
|
|
|
- wxsms = wxsms.replaceAll("keyword2", displaceAuditBean.getMinMoney()+"万元");
|
|
|
- }
|
|
|
- wxsms = wxsms.replaceAll("keyword3", displaceAuditBean.getMoneyRange()+"万元");
|
|
|
- wxsms = wxsms.replaceAll("keyword4", DateUtil.format(startTime, "yyyy年MM月dd日 HH:mm"));
|
|
|
- wxsms = wxsms.replaceAll("keyword5", displaceAuditBean.getBail()+"万元");
|
|
|
- wxsms = wxsms.replaceAll("remark", "点击【详情】前往查看!");
|
|
|
-
|
|
|
- List<PushRecordBean> list = new ArrayList<PushRecordBean>();
|
|
|
- PushRecordBean pushRecord = null;
|
|
|
-
|
|
|
- // 发送车商信息
|
|
|
- String[] diggers = ids.substring(0, ids.lastIndexOf(",")).split(",");
|
|
|
- for (int i = 0; i < diggers.length; i++) {
|
|
|
- //获取车商bean,并获取车商微信openid和其他信息
|
|
|
- DiggerBean digger = diggerBeanService.queryDiggerByID(diggers[i]);
|
|
|
- if(digger == null){
|
|
|
- continue;
|
|
|
- }
|
|
|
- String openId = digger.getWxOpenID();
|
|
|
- String wxnc = digger.getDaWxnc();
|
|
|
- String wxh = digger.getDaWxh();
|
|
|
- String name = digger.getDaName();
|
|
|
- String phone = digger.getDaPhone();
|
|
|
-
|
|
|
- // 组装车商微信内容
|
|
|
- Map<String,TemplateData> param1 = new HashMap<String,TemplateData>();
|
|
|
- param1.put("first",new TemplateData("有一台设备正在寻找买家","#696969"));
|
|
|
- param1.put("keyword1",new TemplateData(sbmc+"","#696969"));
|
|
|
- if("3".equals(displaceAuditBean.getUpType())){
|
|
|
- param1.put("keyword2",new TemplateData("最低价:"+displaceAuditBean.getMinPrice()+"万元-最高价:"+displaceAuditBean.getMaxPrice(),"#696969"));
|
|
|
- }else{
|
|
|
- param1.put("keyword2",new TemplateData(displaceAuditBean.getMinMoney()+"万元","#696969"));
|
|
|
- }
|
|
|
- param1.put("keyword3",new TemplateData(displaceAuditBean.getMoneyRange()+"万元","#696969"));
|
|
|
- param1.put("keyword4",new TemplateData(DateUtil.format(startTime, "yyyy年MM月dd日 HH:mm"),"#696969"));
|
|
|
- param1.put("keyword5",new TemplateData(displaceAuditBean.getBail()+"万元","#696969"));
|
|
|
- param1.put("remark",new TemplateData("点击【详情】前往查看!","#696969"));
|
|
|
-
|
|
|
- wxsms = wxsms.replaceAll("keyword1", wxnc);
|
|
|
- /* pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, "2",ConfigConstants.XXLB_SBSJ,
|
|
|
- appId, appSecret, sms, wxsms, param1, diggerUrl, "拍品上架通知");
|
|
|
- list.add(pushRecord);*/
|
|
|
- pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, "1",ConfigConstants.XXLB_SBSJ,
|
|
|
- appId, appSecret, sms, wxsms, param1, diggerUrl, "拍品上架通知");
|
|
|
- list.add(pushRecord);
|
|
|
+ //存储被推送人 ids
|
|
|
+ displaceAuditBean.setIds(ids);
|
|
|
+ // 补充信息
|
|
|
+ boolean flag = displaceAuditService.addInfoNew(displaceAuditBean);
|
|
|
+ if(!flag){
|
|
|
+ resultBean= new PageResultBean(PageResultBean.FAIL_CODE,"系统繁忙,请稍后再来!");
|
|
|
+ return;
|
|
|
}
|
|
|
|
|
|
- // 发送销售员信息
|
|
|
- if(StringUtils.isNotBlank(saleId)) {
|
|
|
- SalesBean salesBean = saleBeanService.getSaleBeanBySaleId(saleId);
|
|
|
- if(salesBean != null){
|
|
|
- String openId = salesBean.getWxOpenid();
|
|
|
- String wxnc = salesBean.getSaleWxnc();
|
|
|
- String wxh = salesBean.getSaleWxh();
|
|
|
- String name = salesBean.getSaleName();
|
|
|
- String phone = salesBean.getSalePhone();
|
|
|
- String xqurl="https://www.xxinjiyuan.com/wjj-api/index.html#/join?agentId=GZZSNJ&displaceId=GZZSNJ-ZH0044&status=finished&id=5c8adc199c7f44a8ac398d9edbcd4914";
|
|
|
- // String saleUrl = TemplateConstants.ZHSH_SALE_URL + "?agentId=" + agentId + "&id=" + id;
|
|
|
- String saleUrl = "https://www.weigongcheng.net/wjj-api/index.html#/join" + "?agentId=" + agentId + "&displaceId="+displaceId+"&status="+displaceAuditBean+"&id=" + id;
|
|
|
- // 组装销售员微信内容
|
|
|
- Map<String,TemplateData> param2 = new HashMap<String,TemplateData>();
|
|
|
- param2.put("first",new TemplateData("您上传的设备已上架成功,等待买家出价","#696969"));
|
|
|
- param2.put("keyword1",new TemplateData(wxnc,"#696969"));
|
|
|
- param2.put("keyword2",new TemplateData(sbmc,"#696969"));
|
|
|
- param2.put("keyword3",new TemplateData(pubTimeStr,"#696969"));
|
|
|
- param2.put("keyword4",new TemplateData("上架成功","#696969"));
|
|
|
-
|
|
|
- String upsms = TemplateConstants.ZHSH_SALE_UP_SMS;
|
|
|
- upsms = upsms.replace("sbmc", sbmc);
|
|
|
-
|
|
|
- String wxsms1 = TemplateConstants.ZHSH_SALE_TEMPLATE_CONTENT;
|
|
|
- wxsms1 = wxsms1.replaceAll("first", "您上传的设备已上架成功,等待买家出价");
|
|
|
- wxsms1 = wxsms1.replaceAll("keyword1", wxnc);
|
|
|
- wxsms1 = wxsms1.replaceAll("keyword2", sbmc);
|
|
|
- wxsms1 = wxsms1.replaceAll("keyword3", pubTimeStr);
|
|
|
- wxsms1 = wxsms1.replaceAll("keyword4", "上架成功");
|
|
|
- wxsms1 = wxsms1.replaceAll("remark", "赶快点击“详情”分享给大家吧!");
|
|
|
+ PushRecordBean pushRecord = null;
|
|
|
+ List<PushRecordBean> list = new ArrayList<PushRecordBean>();
|
|
|
+ //如果卖家不是通票会员,推送给卖家支付固定保证金
|
|
|
+ if("1".equals(displaceAuditBean.getIfDeposit())){
|
|
|
+ // 发送销售员信息
|
|
|
+ if(StringUtils.isNotBlank(saleId)) {
|
|
|
+ SalesBean salesBean = saleBeanService.getSaleBeanBySaleId(saleId);
|
|
|
+ if(salesBean != null){
|
|
|
+ String openId = salesBean.getWxOpenid();
|
|
|
+ String wxnc = salesBean.getSaleWxnc();
|
|
|
+ String wxh = salesBean.getSaleWxh();
|
|
|
+ String name = salesBean.getSaleName();
|
|
|
+ String phone = salesBean.getSalePhone();
|
|
|
+ String xqurl="https://www.xxinjiyuan.com/wjj-api/index.html#/join?agentId=GZZSNJ&displaceId=GZZSNJ-ZH0044&status=finished&id=5c8adc199c7f44a8ac398d9edbcd4914";
|
|
|
+ // String saleUrl = TemplateConstants.ZHSH_SALE_URL + "?agentId=" + agentId + "&id=" + id;
|
|
|
+ String saleUrl = "https://www.weigongcheng.net/wjj-api/index.html#/payment?" + "?agentId=" + agentId +"&id=" + id;
|
|
|
+ // 组装销售员微信内容
|
|
|
+ Map<String,TemplateData> param2 = new HashMap<String,TemplateData>();
|
|
|
+ param2.put("first",new TemplateData("您上传的设备已审核通过,请及时确认上架","#696969"));
|
|
|
+ param2.put("keyword1",new TemplateData(wxnc,"#696969"));
|
|
|
+ param2.put("keyword2",new TemplateData(sbmc,"#696969"));
|
|
|
+ param2.put("keyword3",new TemplateData(pubTimeStr,"#696969"));
|
|
|
+ param2.put("keyword4",new TemplateData("待上架","#696969"));
|
|
|
+
|
|
|
+ String upsms = TemplateConstants.ZHSH_SALE_UP_SMS;
|
|
|
+ upsms = upsms.replace("sbmc", sbmc);
|
|
|
+
|
|
|
+ String wxsms1 = TemplateConstants.ZHSH_SALE_TEMPLATE_CONTENT;
|
|
|
+ wxsms1 = wxsms1.replaceAll("first", "您上传的设备已上架成功,等待买家出价");
|
|
|
+ wxsms1 = wxsms1.replaceAll("keyword1", wxnc);
|
|
|
+ wxsms1 = wxsms1.replaceAll("keyword2", sbmc);
|
|
|
+ wxsms1 = wxsms1.replaceAll("keyword3", pubTimeStr);
|
|
|
+ wxsms1 = wxsms1.replaceAll("keyword4", "上架成功");
|
|
|
+ wxsms1 = wxsms1.replaceAll("remark", "点击详情立即确认");
|
|
|
|
|
|
/*pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, "2",ConfigConstants.XXLB_SBSJ,
|
|
|
appId, appSecret, upsms, wxsms1, param2, saleUrl, "审核结果通知");
|
|
|
list.add(pushRecord);*/
|
|
|
- pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, "1",ConfigConstants.XXLB_SBSJ,
|
|
|
- appId, appSecret, upsms, wxsms1, param2, saleUrl, "审核结果通知");
|
|
|
- list.add(pushRecord);
|
|
|
- }
|
|
|
- }
|
|
|
+ pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, "1",ConfigConstants.XXLB_SBSJ,
|
|
|
+ appId, appSecret, upsms, wxsms1, param2, saleUrl, "审核结果通知");
|
|
|
+ list.add(pushRecord);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- // 保存推送消息
|
|
|
- pushRecordBeanService.saveRecords(list);
|
|
|
+ // 保存推送消息
|
|
|
+ pushRecordBeanService.saveRecords(list);
|
|
|
+ }else {
|
|
|
+
|
|
|
+ // 反馈内容
|
|
|
+ // String diggerUrl = TemplateConstants.ZHSH_DIGGER_URL + "?agentId=" + agentId + "&id=" + id;
|
|
|
+ String diggerUrl = "https://www.weigongcheng.net/wjj-api/index.html#/join" + "?agentId=" + agentId + "&displaceId=" + displaceId + "&status=" + displaceAuditBean.getAuditStatus() + "&id=" + id;
|
|
|
+ String sms = TemplateConstants.ZHSH_DIGGER_UP_SMS;
|
|
|
+ sms = sms.replaceAll("agentName", agentName);
|
|
|
+ sms = sms.replaceAll("displaceId", displaceId);
|
|
|
+ sms = sms.replaceAll("sbmc", sbmc);
|
|
|
+
|
|
|
+ String wxsms = TemplateConstants.ZHSH_DIGGER_TEMPLATE_CONTENT;
|
|
|
+ wxsms = wxsms.replaceAll("first", "有一台设备正在寻找买家");
|
|
|
+ wxsms = wxsms.replaceAll("keyword1", sbmc + "");
|
|
|
+ if ("3".equals(displaceAuditBean.getUpType())) {
|
|
|
+ wxsms = wxsms.replaceAll("keyword2", "最低价:" + displaceAuditBean.getMinPrice() + "万元-最高价:" + displaceAuditBean.getMaxPrice() + "万元");
|
|
|
+ } else {
|
|
|
+ wxsms = wxsms.replaceAll("keyword2", displaceAuditBean.getMinMoney() + "万元");
|
|
|
+ }
|
|
|
+ wxsms = wxsms.replaceAll("keyword3", displaceAuditBean.getMoneyRange() + "万元");
|
|
|
+ wxsms = wxsms.replaceAll("keyword4", DateUtil.format(startTime, "yyyy年MM月dd日 HH:mm"));
|
|
|
+ wxsms = wxsms.replaceAll("keyword5", displaceAuditBean.getBail() + "万元");
|
|
|
+ wxsms = wxsms.replaceAll("remark", "点击【详情】前往查看!");
|
|
|
+
|
|
|
+ // 发送车商信息
|
|
|
+ String[] diggers = ids.substring(0, ids.lastIndexOf(",")).split(",");
|
|
|
+ for (int i = 0; i < diggers.length; i++) {
|
|
|
+ //获取车商bean,并获取车商微信openid和其他信息
|
|
|
+ DiggerBean digger = diggerBeanService.queryDiggerByID(diggers[i]);
|
|
|
+ if (digger == null) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ String openId = digger.getWxOpenID();
|
|
|
+ String wxnc = digger.getDaWxnc();
|
|
|
+ String wxh = digger.getDaWxh();
|
|
|
+ String name = digger.getDaName();
|
|
|
+ String phone = digger.getDaPhone();
|
|
|
+
|
|
|
+ // 组装车商微信内容
|
|
|
+ Map<String, TemplateData> param1 = new HashMap<String, TemplateData>();
|
|
|
+ param1.put("first", new TemplateData("有一台设备正在寻找买家", "#696969"));
|
|
|
+ param1.put("keyword1", new TemplateData(sbmc + "", "#696969"));
|
|
|
+ if ("3".equals(displaceAuditBean.getUpType())) {
|
|
|
+ param1.put("keyword2", new TemplateData("最低价:" + displaceAuditBean.getMinPrice() + "万元-最高价:" + displaceAuditBean.getMaxPrice() + "万元", "#696969"));
|
|
|
+ } else {
|
|
|
+ param1.put("keyword2", new TemplateData(displaceAuditBean.getMinMoney() + "万元", "#696969"));
|
|
|
+ }
|
|
|
+ param1.put("keyword3", new TemplateData(displaceAuditBean.getMoneyRange() + "万元", "#696969"));
|
|
|
+ param1.put("keyword4", new TemplateData(DateUtil.format(startTime, "yyyy年MM月dd日 HH:mm"), "#696969"));
|
|
|
+ param1.put("keyword5", new TemplateData(displaceAuditBean.getBail() + "万元", "#696969"));
|
|
|
+ param1.put("remark", new TemplateData("点击【详情】前往查看!", "#696969"));
|
|
|
+
|
|
|
+ wxsms = wxsms.replaceAll("keyword1", wxnc);
|
|
|
+ /* pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, "2",ConfigConstants.XXLB_SBSJ,
|
|
|
+ appId, appSecret, sms, wxsms, param1, diggerUrl, "拍品上架通知");
|
|
|
+ list.add(pushRecord);*/
|
|
|
+ pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, "1", ConfigConstants.XXLB_SBSJ,
|
|
|
+ appId, appSecret, sms, wxsms, param1, diggerUrl, "拍品上架通知");
|
|
|
+ list.add(pushRecord);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 发送销售员信息
|
|
|
+ if (StringUtils.isNotBlank(saleId)) {
|
|
|
+ SalesBean salesBean = saleBeanService.getSaleBeanBySaleId(saleId);
|
|
|
+ if (salesBean != null) {
|
|
|
+ String openId = salesBean.getWxOpenid();
|
|
|
+ String wxnc = salesBean.getSaleWxnc();
|
|
|
+ String wxh = salesBean.getSaleWxh();
|
|
|
+ String name = salesBean.getSaleName();
|
|
|
+ String phone = salesBean.getSalePhone();
|
|
|
+ String xqurl = "https://www.xxinjiyuan.com/wjj-api/index.html#/join?agentId=GZZSNJ&displaceId=GZZSNJ-ZH0044&status=finished&id=5c8adc199c7f44a8ac398d9edbcd4914";
|
|
|
+ // String saleUrl = TemplateConstants.ZHSH_SALE_URL + "?agentId=" + agentId + "&id=" + id;
|
|
|
+ String saleUrl = "https://www.weigongcheng.net/wjj-api/index.html#/join" + "?agentId=" + agentId + "&displaceId=" + displaceId + "&status=" + displaceAuditBean + "&id=" + id;
|
|
|
+ // 组装销售员微信内容
|
|
|
+ Map<String, TemplateData> param2 = new HashMap<String, TemplateData>();
|
|
|
+ param2.put("first", new TemplateData("您上传的设备已上架成功,等待买家出价", "#696969"));
|
|
|
+ param2.put("keyword1", new TemplateData(wxnc, "#696969"));
|
|
|
+ param2.put("keyword2", new TemplateData(sbmc, "#696969"));
|
|
|
+ param2.put("keyword3", new TemplateData(pubTimeStr, "#696969"));
|
|
|
+ param2.put("keyword4", new TemplateData("上架成功", "#696969"));
|
|
|
+
|
|
|
+ String upsms = TemplateConstants.ZHSH_SALE_UP_SMS;
|
|
|
+ upsms = upsms.replace("sbmc", sbmc);
|
|
|
+
|
|
|
+ String wxsms1 = TemplateConstants.ZHSH_SALE_TEMPLATE_CONTENT;
|
|
|
+ wxsms1 = wxsms1.replaceAll("first", "您上传的设备已上架成功,等待买家出价");
|
|
|
+ wxsms1 = wxsms1.replaceAll("keyword1", wxnc);
|
|
|
+ wxsms1 = wxsms1.replaceAll("keyword2", sbmc);
|
|
|
+ wxsms1 = wxsms1.replaceAll("keyword3", pubTimeStr);
|
|
|
+ wxsms1 = wxsms1.replaceAll("keyword4", "上架成功");
|
|
|
+ wxsms1 = wxsms1.replaceAll("remark", "赶快点击“详情”分享给大家吧!");
|
|
|
+
|
|
|
+ /*pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, "2",ConfigConstants.XXLB_SBSJ,
|
|
|
+ appId, appSecret, upsms, wxsms1, param2, saleUrl, "审核结果通知");
|
|
|
+ list.add(pushRecord);*/
|
|
|
+ pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, "1", ConfigConstants.XXLB_SBSJ,
|
|
|
+ appId, appSecret, upsms, wxsms1, param2, saleUrl, "审核结果通知");
|
|
|
+ list.add(pushRecord);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 保存推送消息
|
|
|
+ pushRecordBeanService.saveRecords(list);
|
|
|
+ }
|
|
|
} catch (Exception e) {
|
|
|
resultBean= new PageResultBean(PageResultBean.FAIL_CODE,"系统繁忙,请稍后再来!");
|
|
|
log.error("addInfo error!",e);
|
|
@@ -1840,7 +1916,210 @@ public class AuditDetailController extends AbstractController{
|
|
|
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ @RequestMapping("/appAddInfo2.do")
|
|
|
+ public void appAddInfo2(HttpServletRequest request, HttpServletResponse response, @ModelAttribute DisplaceAuditBean displaceAuditBean){
|
|
|
+ //返回页面数据
|
|
|
+ PageResultBean resultBean = new PageResultBean(PageResultBean.SUCCESS_CODE,"成功!");;
|
|
|
+
|
|
|
+ try {
|
|
|
+
|
|
|
+
|
|
|
+ Double min=Double.parseDouble(displaceAuditBean.getMinPrice());
|
|
|
+ Double max=Double.parseDouble(displaceAuditBean.getMaxPrice());
|
|
|
+ Double moneyRang=Double.parseDouble(displaceAuditBean.getMoneyRange());
|
|
|
+
|
|
|
+ String displaceId = super.getParameter(request, "displaceId");
|
|
|
+ //获取置换信息
|
|
|
+ displaceAuditBean=displaceAuditService.queryAuditAllByDisplaceId(displaceId);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ //修改状态为 已审核待上架
|
|
|
+
|
|
|
+/*
|
|
|
+ 修改设备状态为 已审核已上架
|
|
|
+ */
|
|
|
+/* if (null != displaceAuditBean.getAgentType() && displaceAuditBean.getAgentType() == 2) {
|
|
|
+ log.info("商家类型为代运营,更新为已审核待上架");
|
|
|
+ displaceAuditBean.setAuditStatus("4");
|
|
|
+ }
|
|
|
+ log.info("商家类型为自运营,更新为已审核待上架",displaceAuditBean.getAgentType());
|
|
|
+ if (displaceAuditBean.getAgentType() == 1) {
|
|
|
+ log.info("商家类型为自运营,更新为已审核待上架");
|
|
|
+ displaceAuditBean.setAuditStatus("4");
|
|
|
+ }*/
|
|
|
+
|
|
|
+ log.info("更新为已审核待上架");
|
|
|
+ displaceAuditBean.setAuditStatus("4");
|
|
|
+
|
|
|
+
|
|
|
+ //精品机判断是否是通票卖家
|
|
|
+ log.info("1jpjgh===="+jpjgh);
|
|
|
+ log.info("saleId===="+displaceAuditBean.getSaleId());
|
|
|
+
|
|
|
+ // 记录id
|
|
|
+ String id = super.getParameter(request, "id");
|
|
|
+ // 车商ID
|
|
|
+ String ids = super.getParameter(request, "ids");
|
|
|
+ if(StringUtils.isEmpty(ids)) {
|
|
|
+ resultBean = new PageResultBean(PageResultBean.FAIL_CODE, "请选择推送车商!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 销售员ID
|
|
|
+ String saleId = super.getParameter(request, "saleId");
|
|
|
+ //取出带过来的置换ID
|
|
|
+ DisplaceAuditBean displace = displaceAuditService.queryAuditPageByDisplaceId(displaceId);
|
|
|
+ //设备名称
|
|
|
+ String sbmc = displace.getAttrContent().get("sbpp") + " " + displace.getAttrContent().get("sbxh") + " " + displace.getAttrContent().get("sblx");
|
|
|
+ // 发布时间
|
|
|
+ String pubTimeStr = super.getParameter(request, "pubTimeStr");
|
|
|
+ Date pubTime = null;
|
|
|
+ try {
|
|
|
+ pubTime = DateUtil.parse(pubTimeStr, DateUtil.DEFAULT);
|
|
|
+ pubTimeStr = DateUtil.format(pubTime, "yyyy年MM月dd日 HH:mm");
|
|
|
+ } catch (Exception e) {
|
|
|
+ pubTimeStr = "";
|
|
|
+ }
|
|
|
+
|
|
|
+ //存储被推送人 ids
|
|
|
+ displaceAuditBean.setIds(ids);
|
|
|
+ // 补充信息
|
|
|
+ boolean flag = displaceAuditService.addInfoNew(displaceAuditBean);
|
|
|
+ if(!flag){
|
|
|
+ resultBean= new PageResultBean(PageResultBean.FAIL_CODE,"系统繁忙,请稍后再来!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ PushRecordBean pushRecord = null;
|
|
|
+ List<PushRecordBean> list = new ArrayList<PushRecordBean>();
|
|
|
+ String agentId=displaceAuditBean.getAgentId();
|
|
|
+ AgentBean agentBean = agentBeanService.getAgentBeanByAgentId(agentId);
|
|
|
+ if(agentBean == null) {
|
|
|
+ resultBean = new PageResultBean(PageResultBean.FAIL_CODE, "未查询到代理商信息!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ String agentName = agentBean.getAgentName();
|
|
|
+ String appId =agentBean.getPubAppId();
|
|
|
+ String appSecret = agentBean.getPubAppSecret();
|
|
|
+ Date startTime = displaceAuditBean.getStartTime();
|
|
|
+ Date endTime = displaceAuditBean.getEndTime();
|
|
|
+
|
|
|
+ // 反馈内容
|
|
|
+ // String diggerUrl = TemplateConstants.ZHSH_DIGGER_URL + "?agentId=" + agentId + "&id=" + id;
|
|
|
+ String diggerUrl = "https://www.weigongcheng.net/wjj-api/index.html#/join" + "?agentId=" + agentId + "&displaceId=" + displaceId + "&status=" + displaceAuditBean.getAuditStatus() + "&id=" + id;
|
|
|
+ String sms = TemplateConstants.ZHSH_DIGGER_UP_SMS;
|
|
|
+ sms = sms.replaceAll("agentName", agentName);
|
|
|
+ sms = sms.replaceAll("displaceId", displaceId);
|
|
|
+ sms = sms.replaceAll("sbmc", sbmc);
|
|
|
+
|
|
|
+ String wxsms = TemplateConstants.ZHSH_DIGGER_TEMPLATE_CONTENT;
|
|
|
+ wxsms = wxsms.replaceAll("first", "有一台设备正在寻找买家");
|
|
|
+ wxsms = wxsms.replaceAll("keyword1", sbmc + "");
|
|
|
+ if ("3".equals(displaceAuditBean.getUpType())) {
|
|
|
+ wxsms = wxsms.replaceAll("keyword2", "最低价:" + displaceAuditBean.getMinPrice() + "万元-最高价:" + displaceAuditBean.getMaxPrice() + "万元");
|
|
|
+ } else {
|
|
|
+ wxsms = wxsms.replaceAll("keyword2", displaceAuditBean.getMinMoney() + "万元");
|
|
|
+ }
|
|
|
+ wxsms = wxsms.replaceAll("keyword3", displaceAuditBean.getMoneyRange() + "万元");
|
|
|
+ wxsms = wxsms.replaceAll("keyword4", DateUtil.format(startTime, "yyyy年MM月dd日 HH:mm"));
|
|
|
+ wxsms = wxsms.replaceAll("keyword5", displaceAuditBean.getBail() + "万元");
|
|
|
+ wxsms = wxsms.replaceAll("remark", "点击【详情】前往查看!");
|
|
|
+
|
|
|
+ // 发送车商信息
|
|
|
+ String[] diggers = ids.substring(0, ids.lastIndexOf(",")).split(",");
|
|
|
+ for (int i = 0; i < diggers.length; i++) {
|
|
|
+ //获取车商bean,并获取车商微信openid和其他信息
|
|
|
+ DiggerBean digger = diggerBeanService.queryDiggerByID(diggers[i]);
|
|
|
+ if (digger == null) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ String openId = digger.getWxOpenID();
|
|
|
+ String wxnc = digger.getDaWxnc();
|
|
|
+ String wxh = digger.getDaWxh();
|
|
|
+ String name = digger.getDaName();
|
|
|
+ String phone = digger.getDaPhone();
|
|
|
+
|
|
|
+ // 组装车商微信内容
|
|
|
+ Map<String, TemplateData> param1 = new HashMap<String, TemplateData>();
|
|
|
+ param1.put("first", new TemplateData("有一台设备正在寻找买家", "#696969"));
|
|
|
+ param1.put("keyword1", new TemplateData(sbmc + "", "#696969"));
|
|
|
+ if ("3".equals(displaceAuditBean.getUpType())) {
|
|
|
+ param1.put("keyword2", new TemplateData("最低价:" + displaceAuditBean.getMinPrice() + "万元-最高价:" + displaceAuditBean.getMaxPrice() + "万元", "#696969"));
|
|
|
+ } else {
|
|
|
+ param1.put("keyword2", new TemplateData(displaceAuditBean.getMinMoney() + "万元", "#696969"));
|
|
|
+ }
|
|
|
+ param1.put("keyword3", new TemplateData(displaceAuditBean.getMoneyRange() + "万元", "#696969"));
|
|
|
+ param1.put("keyword4", new TemplateData(DateUtil.format(startTime, "yyyy年MM月dd日 HH:mm"), "#696969"));
|
|
|
+ param1.put("keyword5", new TemplateData(displaceAuditBean.getBail() + "万元", "#696969"));
|
|
|
+ param1.put("remark", new TemplateData("点击【详情】前往查看!", "#696969"));
|
|
|
+
|
|
|
+ wxsms = wxsms.replaceAll("keyword1", wxnc);
|
|
|
+ /* pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, "2",ConfigConstants.XXLB_SBSJ,
|
|
|
+ appId, appSecret, sms, wxsms, param1, diggerUrl, "拍品上架通知");
|
|
|
+ list.add(pushRecord);*/
|
|
|
+ pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, "1", ConfigConstants.XXLB_SBSJ,
|
|
|
+ appId, appSecret, sms, wxsms, param1, diggerUrl, "拍品上架通知");
|
|
|
+ list.add(pushRecord);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 发送销售员信息
|
|
|
+ if (StringUtils.isNotBlank(saleId)) {
|
|
|
+ SalesBean salesBean = saleBeanService.getSaleBeanBySaleId(saleId);
|
|
|
+ if (salesBean != null) {
|
|
|
+ String openId = salesBean.getWxOpenid();
|
|
|
+ String wxnc = salesBean.getSaleWxnc();
|
|
|
+ String wxh = salesBean.getSaleWxh();
|
|
|
+ String name = salesBean.getSaleName();
|
|
|
+ String phone = salesBean.getSalePhone();
|
|
|
+ String xqurl = "https://www.xxinjiyuan.com/wjj-api/index.html#/join?agentId=GZZSNJ&displaceId=GZZSNJ-ZH0044&status=finished&id=5c8adc199c7f44a8ac398d9edbcd4914";
|
|
|
+ // String saleUrl = TemplateConstants.ZHSH_SALE_URL + "?agentId=" + agentId + "&id=" + id;
|
|
|
+ String saleUrl = "https://www.weigongcheng.net/wjj-api/index.html#/join" + "?agentId=" + agentId + "&displaceId=" + displaceId + "&status=" + displaceAuditBean + "&id=" + id;
|
|
|
+ // 组装销售员微信内容
|
|
|
+ Map<String, TemplateData> param2 = new HashMap<String, TemplateData>();
|
|
|
+ param2.put("first", new TemplateData("您上传的设备已上架成功,等待买家出价", "#696969"));
|
|
|
+ param2.put("keyword1", new TemplateData(wxnc, "#696969"));
|
|
|
+ param2.put("keyword2", new TemplateData(sbmc, "#696969"));
|
|
|
+ param2.put("keyword3", new TemplateData(pubTimeStr, "#696969"));
|
|
|
+ param2.put("keyword4", new TemplateData("上架成功", "#696969"));
|
|
|
+
|
|
|
+ String upsms = TemplateConstants.ZHSH_SALE_UP_SMS;
|
|
|
+ upsms = upsms.replace("sbmc", sbmc);
|
|
|
+
|
|
|
+ String wxsms1 = TemplateConstants.ZHSH_SALE_TEMPLATE_CONTENT;
|
|
|
+ wxsms1 = wxsms1.replaceAll("first", "您上传的设备已上架成功,等待买家出价");
|
|
|
+ wxsms1 = wxsms1.replaceAll("keyword1", wxnc);
|
|
|
+ wxsms1 = wxsms1.replaceAll("keyword2", sbmc);
|
|
|
+ wxsms1 = wxsms1.replaceAll("keyword3", pubTimeStr);
|
|
|
+ wxsms1 = wxsms1.replaceAll("keyword4", "上架成功");
|
|
|
+ wxsms1 = wxsms1.replaceAll("remark", "赶快点击“详情”分享给大家吧!");
|
|
|
+
|
|
|
+ /*pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, "2",ConfigConstants.XXLB_SBSJ,
|
|
|
+ appId, appSecret, upsms, wxsms1, param2, saleUrl, "审核结果通知");
|
|
|
+ list.add(pushRecord);*/
|
|
|
+ pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, "1", ConfigConstants.XXLB_SBSJ,
|
|
|
+ appId, appSecret, upsms, wxsms1, param2, saleUrl, "审核结果通知");
|
|
|
+ list.add(pushRecord);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 保存推送消息
|
|
|
+ pushRecordBeanService.saveRecords(list);
|
|
|
+ } catch (Exception e) {
|
|
|
+ resultBean= new PageResultBean(PageResultBean.FAIL_CODE,"系统繁忙,请稍后再来!");
|
|
|
+ log.error("addInfo error!",e);
|
|
|
+ }finally{
|
|
|
+ super.printResult(request, response, resultBean.toString());
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
* 更新质保说明
|
|
|
* @param request
|
|
|
* @param response
|
|
@@ -2370,4 +2649,24 @@ public class AuditDetailController extends AbstractController{
|
|
|
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+ @RequestMapping("/checkUser.do")
|
|
|
+ public void checkUser(HttpServletRequest request, HttpServletResponse response){
|
|
|
+ final String apiUrl = apiDomain + "certification/getUserInfoBySaleIdPost";
|
|
|
+ String agentId = super.getParameter(request, "agentId");
|
|
|
+ String saleId = super.getParameter(request, "saleId");
|
|
|
+ Map<String, Object> requestParameter = new HashMap<>();
|
|
|
+ requestParameter.put("agentId", agentId);
|
|
|
+ requestParameter.put("saleId", saleId);
|
|
|
+
|
|
|
+
|
|
|
+ final HttpResult httpResult = HttpUtils.post(apiUrl, requestParameter);
|
|
|
+ if (httpResult.getStatusCode() != 200) {
|
|
|
+ log.info("请求wjj微信模板失败.statusCode:{}", httpResult.getStatusCode());
|
|
|
+ }
|
|
|
+
|
|
|
+ final String content = httpResult.getContent();
|
|
|
+ super.printResult(request, response, content);
|
|
|
+ }
|
|
|
}
|