|
|
@@ -120,7 +120,7 @@ public class tagents extends Controller {
|
|
|
tagents_msgchangeapp.setValue("fstatus", "审核", 11L);
|
|
|
tagents_msgchangeapp.setValue("checkby", username, 11L);
|
|
|
tagents_msgchangeapp.setValue("checkdate", sysdate, 11L);
|
|
|
- createSystemMessage(getMainUser(tagentsid).getLong("tenterprise_usersid"), "商户信息修改审核成功!");
|
|
|
+ createSystemMessage("商户", "商户审核通知", "商户信息修改审核成功!", userid);
|
|
|
}
|
|
|
}
|
|
|
tagents_msgchangeappSet.save();
|
|
|
@@ -200,6 +200,8 @@ public class tagents extends Controller {
|
|
|
tagents_cooperation.setValue("tagentsid", tcooperationagentsid, 11L);
|
|
|
tagents_cooperation.setValue("tcooperationagentsid", tagentsid, 11L);
|
|
|
tagents_cooperationSet.save();
|
|
|
+
|
|
|
+ createSystemMessageByAgentsid("商户", "申请合作通知", getAgent(tagentsid).getString("fbrand") + "申请建立合作关系!", tagents_cooperation.getUniqueIDValue(), "tagents_cooperation", tcooperationagentsid);
|
|
|
return getSucReturnObject().toString();
|
|
|
}
|
|
|
|
|
|
@@ -230,6 +232,8 @@ public class tagents extends Controller {
|
|
|
tagents_cooperation2.setValue("tcooperationagentsid", tagentsid, 11L);
|
|
|
|
|
|
tagents_cooperationSet.save();
|
|
|
+ createSystemMessageByAgentsid("商户", "新合作通知", "与" + getAgent(tagentsid).getString("fbrand") + "建立新合作成功!", tcooperationagentsid);
|
|
|
+ createSystemMessageByAgentsid("商户", "新合作通知", "与" + getAgent(tcooperationagentsid).getString("fbrand") + "建立新合作成功!", tagentsid);
|
|
|
return getSucReturnObject().toString();
|
|
|
}
|
|
|
|
|
|
@@ -247,6 +251,11 @@ public class tagents extends Controller {
|
|
|
PaoRemote tagents_cooperation = tagents_cooperationSet.getPao(0);
|
|
|
tagents_cooperation.setValue("ftype", ftype, 11L);//需要发布tcooperationagentsid商户进行设置,1:上游;2下游;3双向
|
|
|
tagents_cooperationSet.save();
|
|
|
+
|
|
|
+ Row row = getMainUser(tagents_cooperation.getLong("tcooperationagentsid"));
|
|
|
+ if (row != null) {
|
|
|
+ createSystemMessageByAgentsid("商户", "合作方式调整通知", "与" + getAgent(tcooperationagentsid).getString("fbrand") + "合作方式调整成功!", userid);
|
|
|
+ }
|
|
|
return getSucReturnObject().toString();
|
|
|
}
|
|
|
|
|
|
@@ -258,12 +267,17 @@ public class tagents extends Controller {
|
|
|
*/
|
|
|
public String delete_cooperation() throws P2Exception {
|
|
|
long tcooperationagentsid = content.getLong("tcooperationagentsid");//合作商ID
|
|
|
+
|
|
|
SQLFactory sqlFactory = new SQLFactory(this, "解除合作关系");
|
|
|
sqlFactory.addParameter("siteid", siteid);
|
|
|
sqlFactory.addParameter("tagentsid", tagentsid);
|
|
|
sqlFactory.addParameter("tcooperationagentsid", tcooperationagentsid);
|
|
|
String status = dbConnect.runSqlUpdate(sqlFactory.getSQL());
|
|
|
if ("true".equals(status)) {
|
|
|
+ Row row = getMainUser(tcooperationagentsid);
|
|
|
+ if (row != null) {
|
|
|
+ createSystemMessageByAgentsid("商户", "取消合作通知", "与" + getAgent(tcooperationagentsid).getString("fbrand") + "取消合作成功!", userid);
|
|
|
+ }
|
|
|
return getSucReturnObject().toString();
|
|
|
} else {
|
|
|
return getErrReturnObject().setErrMsg(status).toString();
|
|
|
@@ -280,12 +294,11 @@ public class tagents extends Controller {
|
|
|
SQLFactory sql = new SQLFactory(this, "合作经销商详情查询");
|
|
|
sql.addParameter("siteid", siteid);
|
|
|
sql.addParameter("tagentsid", content.getString("tagentsid"));
|
|
|
- sql.addParameter_SQL("orderby"," t2.changedate DESC,t1.changedate DESC");
|
|
|
- System.err.println(sql.getSQL());
|
|
|
+ sql.addParameter_SQL("orderby", " t2.changedate DESC,t1.changedate DESC");
|
|
|
Rows rows = dbConnect.runSqlQuery(sql.getSQL());
|
|
|
for (Row row : rows) {
|
|
|
row.put("saleprodclass", JSONArray.parseArray(row.getString("saleprodclass")));
|
|
|
- row.put("attinfos", getAttachmentUrl("tagents",content.getString("tagentsid")));
|
|
|
+ row.put("attinfos", getAttachmentUrl("tagents", content.getString("tagentsid")));
|
|
|
}
|
|
|
return getSucReturnObject().setData(rows).toString();
|
|
|
}
|