|
@@ -1083,7 +1083,6 @@ public class AuditDetailController extends AbstractController{
|
|
|
public void addInfo(HttpServletRequest request, HttpServletResponse response, @ModelAttribute DisplaceAuditBean displaceAuditBean){
|
|
|
//返回页面数据
|
|
|
PageResultBean resultBean = new PageResultBean(PageResultBean.SUCCESS_CODE,"成功!");;
|
|
|
-
|
|
|
try {
|
|
|
//获取登录信息
|
|
|
HttpSession session = request.getSession();
|
|
@@ -1310,13 +1309,19 @@ public class AuditDetailController extends AbstractController{
|
|
|
|
|
|
|
|
|
//精品机判断是否是通票卖家
|
|
|
- log.info("jpjgh===="+jpjgh);
|
|
|
+ log.info("1jpjgh===="+jpjgh);
|
|
|
log.info("saleId===="+displaceAuditBean.getSaleId());
|
|
|
- if(jpjgh.equals(displaceAuditBean.getAgentId())){
|
|
|
- String paltTpSet=displaceAuditService.findSaleInfoBySaleId(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");
|
|
|
}
|
|
|
}
|
|
|
// 补充信息
|
|
@@ -1325,14 +1330,20 @@ public class AuditDetailController extends AbstractController{
|
|
|
resultBean = new PageResultBean(PageResultBean.FAIL_CODE,"系统繁忙,请稍后再来!");
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
+ boolean flowFlag=false;
|
|
|
+ if(jpjgh.equals(displaceAuditBean.getAgentId())){
|
|
|
+ flowFlag=true;
|
|
|
+ }
|
|
|
String agentName = agentBean.getAgentName();
|
|
|
String appId = agentBean.getPubAppId();
|
|
|
String appSecret = agentBean.getPubAppSecret();
|
|
|
|
|
|
// 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+"&id=" + id;
|
|
|
- String wxsms = TemplateConstants.ZHSH_DIGGER_TEMPLATE_CONTENT;
|
|
|
+ if("3".equals(displaceAuditBean.getUpType())){
|
|
|
+ diggerUrl = "https://www.weigongcheng.net/wjj-api/index.html#/goodDetail" + "?agentId=" + agentId + "&displaceId=" + displaceId + "&status=" + displaceAuditBean.getAuditStatus() + "&id=" + id;
|
|
|
+ }
|
|
|
+ String wxsms = TemplateConstants.ZHSH_DIGGER_TEMPLATE_CONTENT;
|
|
|
wxsms = wxsms.replaceAll("first", "有一台设备正在寻找买家");
|
|
|
wxsms = wxsms.replaceAll("keyword1", sbmc+"");
|
|
|
if("3".equals(displaceAuditBean.getUpType())){
|
|
@@ -1348,156 +1359,206 @@ public class AuditDetailController extends AbstractController{
|
|
|
List<PushRecordBean> list = new ArrayList<PushRecordBean>();
|
|
|
PushRecordBean pushRecord = null;
|
|
|
|
|
|
- // 发送车商信息
|
|
|
- if(StringUtils.isNotBlank(ids)) {
|
|
|
- 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"));
|
|
|
-
|
|
|
- if(StringUtils.isNotBlank(pushWx)){
|
|
|
- pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, ConfigConstants.TSFS_WXXX, ConfigConstants.XXLB_SBSJ,
|
|
|
- appId, appSecret, sms, wxsms, param1, diggerUrl, "拍品上架通知");
|
|
|
- list.add(pushRecord);
|
|
|
- }
|
|
|
-
|
|
|
- if(StringUtils.isNotBlank(pushSms)){
|
|
|
- pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, ConfigConstants.TSFS_DXX, ConfigConstants.XXLB_SBSJ,
|
|
|
- appId, appSecret, sms, wxsms, param1, diggerUrl, "拍品上架通知");
|
|
|
- list.add(pushRecord);
|
|
|
- }
|
|
|
+ if("1".equals(displaceAuditBean.getIfDeposit())&&flowFlag){
|
|
|
+ // 发送销售员信息
|
|
|
+ if(StringUtils.isNotBlank(saleId_f)) {
|
|
|
+ SalesBean salesBean = saleBeanService.getSaleBeanBySaleId(saleId_f);
|
|
|
+ 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 +"&displaceId=" + displaceId;
|
|
|
+ // 组装销售员微信内容
|
|
|
+ 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);
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- // 发送微工程信息
|
|
|
- if(StringUtils.isNotBlank(wgcids)) {
|
|
|
- String wgcAgentName = "";
|
|
|
- String wgcAppId = "";
|
|
|
- String wgcAppSecret = "";
|
|
|
- String wgcPriceLink = "";
|
|
|
- if("1".equals(agentBean.getIsAttent()) || "y".equals(agentBean.getIsAttent()) || ConfigConstants.WGC_ID.equals(agentId)) {
|
|
|
- // 微工程信息
|
|
|
- AgentBean wgcBean = agentBeanService.getAgentBeanByAgentId(ConfigConstants.WGC_ID);
|
|
|
- wgcAgentName = wgcBean.getAgentName();;
|
|
|
- wgcAppId = wgcBean.getPubAppId();
|
|
|
- wgcAppSecret = wgcBean.getPubAppSecret();
|
|
|
- //wgcPriceLink = wgcBean.getPriceLink();
|
|
|
- wgcPriceLink ="https://www.weigongcheng.net/wjj-api/index.html#/join?agentId=WGC000"+"&status="+displace.getAuditStatus()+"&id="+displace.getId();
|
|
|
- String[] wgcdiggers = wgcids.substring(0, wgcids.lastIndexOf(",")).split(",");
|
|
|
- for (int i = 0; i < wgcdiggers.length; i++) {
|
|
|
- //获取车商bean,并获取车商微信openid和其他信息
|
|
|
- DiggerBean digger = diggerBeanService.queryDiggerByID(wgcdiggers[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();
|
|
|
+ // 保存推送消息
|
|
|
+ pushRecordBeanService.saveRecords(list);
|
|
|
+ }else{
|
|
|
|
|
|
- // 组装车商微信内容
|
|
|
- Map<String,TemplateData> param2 = new HashMap<String,TemplateData>();
|
|
|
- param2.put("first",new TemplateData("有一台设备正在寻找买家","#696969"));
|
|
|
- param2.put("keyword1",new TemplateData(sbmc+"","#696969"));
|
|
|
+ // 发送车商信息
|
|
|
+ if(StringUtils.isNotBlank(ids)) {
|
|
|
+ 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())){
|
|
|
- param2.put("keyword2",new TemplateData("最低价:"+displaceAuditBean.getMinPrice()+"万元-最高价:"+displaceAuditBean.getMaxPrice()+"万元","#696969"));
|
|
|
+ param1.put("keyword2",new TemplateData("最低价:"+displaceAuditBean.getMinPrice()+"万元-最高价:"+displaceAuditBean.getMaxPrice()+"万元","#696969"));
|
|
|
}else{
|
|
|
- param2.put("keyword2",new TemplateData(displaceAuditBean.getMinMoney()+"万元","#696969"));
|
|
|
+ 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"));
|
|
|
+
|
|
|
+ if(StringUtils.isNotBlank(pushWx)){
|
|
|
+ pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, ConfigConstants.TSFS_WXXX, ConfigConstants.XXLB_SBSJ,
|
|
|
+ appId, appSecret, sms, wxsms, param1, diggerUrl, "拍品上架通知");
|
|
|
+ list.add(pushRecord);
|
|
|
}
|
|
|
- param2.put("keyword3",new TemplateData(displaceAuditBean.getMoneyRange()+"万元","#696969"));
|
|
|
- param2.put("keyword4",new TemplateData(DateUtil.format(startTime, "yyyy年MM月dd日 HH:mm"),"#696969"));
|
|
|
- param2.put("keyword5",new TemplateData(displaceAuditBean.getBail()+"万元","#696969"));
|
|
|
- param2.put("remark",new TemplateData("点击【详情】前往查看!","#696969"));
|
|
|
|
|
|
- wxsms = wxsms.replaceAll("keyword1", wxnc+"");
|
|
|
+ if(StringUtils.isNotBlank(pushSms)){
|
|
|
+ pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, ConfigConstants.TSFS_DXX, ConfigConstants.XXLB_SBSJ,
|
|
|
+ appId, appSecret, sms, wxsms, param1, diggerUrl, "拍品上架通知");
|
|
|
+ list.add(pushRecord);
|
|
|
+ }
|
|
|
|
|
|
- if(StringUtils.isNotBlank(pushWx)){
|
|
|
- pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, ConfigConstants.WGC_ID, wgcAgentName, openId, wxnc, wxh, name, phone, ConfigConstants.TSFS_WXXX,ConfigConstants.XXLB_SBSJ,
|
|
|
- wgcAppId, wgcAppSecret, sms, wxsms, param2, wgcPriceLink, "拍品上架通知");
|
|
|
- list.add(pushRecord);
|
|
|
- }
|
|
|
- if(StringUtils.isNotBlank(pushSms)){
|
|
|
- pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, ConfigConstants.WGC_ID, wgcAgentName, openId, wxnc, wxh, name, phone, ConfigConstants.TSFS_DXX,ConfigConstants.XXLB_SBSJ,
|
|
|
- wgcAppId, wgcAppSecret, sms, wxsms, param2, wgcPriceLink, "拍品上架通知");
|
|
|
- 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();
|
|
|
+ // 发送微工程信息
|
|
|
+ if(StringUtils.isNotBlank(wgcids)) {
|
|
|
+ String wgcAgentName = "";
|
|
|
+ String wgcAppId = "";
|
|
|
+ String wgcAppSecret = "";
|
|
|
+ String wgcPriceLink = "";
|
|
|
+ if("1".equals(agentBean.getIsAttent()) || "y".equals(agentBean.getIsAttent()) || ConfigConstants.WGC_ID.equals(agentId)) {
|
|
|
+ // 微工程信息
|
|
|
+ AgentBean wgcBean = agentBeanService.getAgentBeanByAgentId(ConfigConstants.WGC_ID);
|
|
|
+ wgcAgentName = wgcBean.getAgentName();;
|
|
|
+ wgcAppId = wgcBean.getPubAppId();
|
|
|
+ wgcAppSecret = wgcBean.getPubAppSecret();
|
|
|
+ //wgcPriceLink = wgcBean.getPriceLink();
|
|
|
+ wgcPriceLink ="https://www.weigongcheng.net/wjj-api/index.html#/join?agentId=WGC000"+"&status="+displace.getAuditStatus()+"&id="+displace.getId();
|
|
|
+ String[] wgcdiggers = wgcids.substring(0, wgcids.lastIndexOf(",")).split(",");
|
|
|
+ for (int i = 0; i < wgcdiggers.length; i++) {
|
|
|
+ //获取车商bean,并获取车商微信openid和其他信息
|
|
|
+ DiggerBean digger = diggerBeanService.queryDiggerByID(wgcdiggers[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> param2 = new HashMap<String,TemplateData>();
|
|
|
+ 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"));
|
|
|
+ }else{
|
|
|
+ param2.put("keyword2",new TemplateData(displaceAuditBean.getMinMoney()+"万元","#696969"));
|
|
|
+ }
|
|
|
+ param2.put("keyword3",new TemplateData(displaceAuditBean.getMoneyRange()+"万元","#696969"));
|
|
|
+ param2.put("keyword4",new TemplateData(DateUtil.format(startTime, "yyyy年MM月dd日 HH:mm"),"#696969"));
|
|
|
+ param2.put("keyword5",new TemplateData(displaceAuditBean.getBail()+"万元","#696969"));
|
|
|
+ param2.put("remark",new TemplateData("点击【详情】前往查看!","#696969"));
|
|
|
|
|
|
- // 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;
|
|
|
+ wxsms = wxsms.replaceAll("keyword1", wxnc+"");
|
|
|
|
|
|
- // 组装销售员微信内容
|
|
|
- Map<String,TemplateData> param3 = new HashMap<String,TemplateData>();
|
|
|
- param3.put("first",new TemplateData("您上传的设备已上架成功,等待买家出价","#696969"));
|
|
|
- param3.put("keyword1",new TemplateData(wxnc,"#696969"));
|
|
|
- param3.put("keyword2",new TemplateData(sbmc,"#696969"));
|
|
|
- param3.put("keyword3",new TemplateData(pubTimeStr,"#696969"));
|
|
|
- param3.put("keyword4",new TemplateData("上架成功","#696969"));
|
|
|
- param3.put("remark",new TemplateData("赶快点击“详情”分享给大家吧!","#696969"));
|
|
|
+ if(StringUtils.isNotBlank(pushWx)){
|
|
|
+ pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, ConfigConstants.WGC_ID, wgcAgentName, openId, wxnc, wxh, name, phone, ConfigConstants.TSFS_WXXX,ConfigConstants.XXLB_SBSJ,
|
|
|
+ wgcAppId, wgcAppSecret, sms, wxsms, param2, wgcPriceLink, "拍品上架通知");
|
|
|
+ list.add(pushRecord);
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotBlank(pushSms)){
|
|
|
+ pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, ConfigConstants.WGC_ID, wgcAgentName, openId, wxnc, wxh, name, phone, ConfigConstants.TSFS_DXX,ConfigConstants.XXLB_SBSJ,
|
|
|
+ wgcAppId, wgcAppSecret, sms, wxsms, param2, wgcPriceLink, "拍品上架通知");
|
|
|
+ list.add(pushRecord);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- String upsms = TemplateConstants.ZHSH_SALE_UP_SMS;
|
|
|
- upsms = upsms.replace("sbmc", sbmc+"");
|
|
|
+ // 发送销售员信息
|
|
|
+ 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 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", "赶快点击“详情”分享给大家吧!");
|
|
|
+ // 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> param3 = new HashMap<String,TemplateData>();
|
|
|
+ param3.put("first",new TemplateData("您上传的设备已上架成功,等待买家出价","#696969"));
|
|
|
+ param3.put("keyword1",new TemplateData(wxnc,"#696969"));
|
|
|
+ param3.put("keyword2",new TemplateData(sbmc,"#696969"));
|
|
|
+ param3.put("keyword3",new TemplateData(pubTimeStr,"#696969"));
|
|
|
+ param3.put("keyword4",new TemplateData("上架成功","#696969"));
|
|
|
+ param3.put("remark",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", "赶快点击“详情”分享给大家吧!");
|
|
|
+
|
|
|
+ if(StringUtils.isNotBlank(pushWx)){
|
|
|
+ pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, ConfigConstants.TSFS_WXXX,ConfigConstants.XXLB_SBSJ,
|
|
|
+ appId, appSecret, upsms,wxsms1, param3, saleUrl, "审核结果通知");
|
|
|
+ list.add(pushRecord);
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotBlank(pushSms)){
|
|
|
+ pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, ConfigConstants.TSFS_DXX,ConfigConstants.XXLB_SBSJ,
|
|
|
+ appId, appSecret, upsms,wxsms1, param3, saleUrl, "审核结果通知");
|
|
|
+ list.add(pushRecord);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ // 保存推送消息
|
|
|
+ pushRecordBeanService.saveRecords(list);
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
- if(StringUtils.isNotBlank(pushWx)){
|
|
|
- pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, ConfigConstants.TSFS_WXXX,ConfigConstants.XXLB_SBSJ,
|
|
|
- appId, appSecret, upsms,wxsms1, param3, saleUrl, "审核结果通知");
|
|
|
- list.add(pushRecord);
|
|
|
- }
|
|
|
- if(StringUtils.isNotBlank(pushSms)){
|
|
|
- pushRecord = displaceAuditService.pushSms(displaceId, id, sbmc, ConfigConstants.CDMC_ZHSH, agentId, agentName, openId, wxnc, wxh, name, phone, ConfigConstants.TSFS_DXX,ConfigConstants.XXLB_SBSJ,
|
|
|
- appId, appSecret, upsms,wxsms1, param3, saleUrl, "审核结果通知");
|
|
|
- list.add(pushRecord);
|
|
|
- }
|
|
|
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
- // 保存推送消息
|
|
|
- pushRecordBeanService.saveRecords(list);
|
|
|
} catch (Exception e) {
|
|
|
resultBean= new PageResultBean(PageResultBean.FAIL_CODE,"系统繁忙,请稍后再来!");
|
|
|
log.error("addInfo error!",e);
|
|
@@ -1721,7 +1782,10 @@ public class AuditDetailController extends AbstractController{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ boolean flowFlag=false;
|
|
|
+ if(jpjgh.equals(displaceAuditBean.getAgentId())){
|
|
|
+ flowFlag=true;
|
|
|
+ }
|
|
|
|
|
|
// 记录id
|
|
|
String id = super.getParameter(request, "id");
|
|
@@ -1761,10 +1825,10 @@ public class AuditDetailController extends AbstractController{
|
|
|
PushRecordBean pushRecord = null;
|
|
|
List<PushRecordBean> list = new ArrayList<PushRecordBean>();
|
|
|
//如果卖家不是通票会员,推送给卖家支付固定保证金
|
|
|
- if("1".equals(displaceAuditBean.getIfDeposit())){
|
|
|
+ if("1".equals(displaceAuditBean.getIfDeposit())&&flowFlag){
|
|
|
// 发送销售员信息
|
|
|
- if(StringUtils.isNotBlank(saleId)) {
|
|
|
- SalesBean salesBean = saleBeanService.getSaleBeanBySaleId(saleId);
|
|
|
+ if(StringUtils.isNotBlank(saleId_f)) {
|
|
|
+ SalesBean salesBean = saleBeanService.getSaleBeanBySaleId(saleId_f);
|
|
|
if(salesBean != null){
|
|
|
String openId = salesBean.getWxOpenid();
|
|
|
String wxnc = salesBean.getSaleWxnc();
|
|
@@ -1773,7 +1837,7 @@ public class AuditDetailController extends AbstractController{
|
|
|
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;
|
|
|
+ String saleUrl = "https://www.weigongcheng.net/wjj-api/index.html#/payment?" + "?agentId=" + agentId +"&displaceId=" + displaceId;
|
|
|
// 组装销售员微信内容
|
|
|
Map<String,TemplateData> param2 = new HashMap<String,TemplateData>();
|
|
|
param2.put("first",new TemplateData("您上传的设备已审核通过,请及时确认上架","#696969"));
|
|
@@ -1809,6 +1873,9 @@ public class AuditDetailController extends AbstractController{
|
|
|
// 反馈内容
|
|
|
// 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;
|
|
|
+ if("3".equals(displaceAuditBean.getUpType())){
|
|
|
+ diggerUrl = "https://www.weigongcheng.net/wjj-api/index.html#/goodDetail" + "?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);
|
|
@@ -1916,42 +1983,14 @@ public class AuditDetailController extends AbstractController{
|
|
|
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
@RequestMapping("/appAddInfo2.do")
|
|
|
- public void appAddInfo2(HttpServletRequest request, HttpServletResponse response, @ModelAttribute DisplaceAuditBean displaceAuditBean){
|
|
|
+ public void appAddInfo2(String displaceId){
|
|
|
//返回页面数据
|
|
|
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");
|
|
|
- }*/
|
|
|
+ DisplaceAuditBean displaceAuditBean=displaceAuditService.queryAuditAllByDisplaceId(displaceId);
|
|
|
|
|
|
log.info("更新为已审核待上架");
|
|
|
displaceAuditBean.setAuditStatus("4");
|
|
@@ -1962,25 +2001,24 @@ public class AuditDetailController extends AbstractController{
|
|
|
log.info("saleId===="+displaceAuditBean.getSaleId());
|
|
|
|
|
|
// 记录id
|
|
|
- String id = super.getParameter(request, "id");
|
|
|
+ String id = displaceAuditBean.getId();
|
|
|
// 车商ID
|
|
|
- String ids = super.getParameter(request, "ids");
|
|
|
+ String ids = displaceAuditBean.getIds();
|
|
|
if(StringUtils.isEmpty(ids)) {
|
|
|
resultBean = new PageResultBean(PageResultBean.FAIL_CODE, "请选择推送车商!");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
// 销售员ID
|
|
|
- String saleId = super.getParameter(request, "saleId");
|
|
|
+ String saleId = displaceAuditBean.getSaleId();
|
|
|
//取出带过来的置换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;
|
|
|
+ String pubTimeStr = "";
|
|
|
+ Date pubTime = displaceAuditBean.getPubTime();
|
|
|
try {
|
|
|
- pubTime = DateUtil.parse(pubTimeStr, DateUtil.DEFAULT);
|
|
|
pubTimeStr = DateUtil.format(pubTime, "yyyy年MM月dd日 HH:mm");
|
|
|
} catch (Exception e) {
|
|
|
pubTimeStr = "";
|
|
@@ -1988,13 +2026,6 @@ public class AuditDetailController extends AbstractController{
|
|
|
|
|
|
//存储被推送人 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();
|
|
@@ -2113,7 +2144,7 @@ public class AuditDetailController extends AbstractController{
|
|
|
resultBean= new PageResultBean(PageResultBean.FAIL_CODE,"系统繁忙,请稍后再来!");
|
|
|
log.error("addInfo error!",e);
|
|
|
}finally{
|
|
|
- super.printResult(request, response, resultBean.toString());
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|