|
@@ -220,7 +220,7 @@ func (s *distributorService) Create(ctx context.Context, req *model.AddDistribut
|
|
|
if req.ProvinceId == 0 || req.BelongSaleId == 0 || req.Capital == 0 || req.RegisterDistrict == "" || req.BusinessScope == "" || req.SaleNum == 0 || req.CustomerType == "" || req.ExistedProduct == "" || req.HistoryCustomer == "" {
|
|
if req.ProvinceId == 0 || req.BelongSaleId == 0 || req.Capital == 0 || req.RegisterDistrict == "" || req.BusinessScope == "" || req.SaleNum == 0 || req.CustomerType == "" || req.ExistedProduct == "" || req.HistoryCustomer == "" {
|
|
|
msg := g.MapStrStr{
|
|
msg := g.MapStrStr{
|
|
|
"msgTitle": "经销商信息完善提醒",
|
|
"msgTitle": "经销商信息完善提醒",
|
|
|
- "msgContent": fmt.Sprintf("<p>经销商:%s 的必要信息未填写完整,请及时完善</p>", req.DistName),
|
|
|
|
|
|
|
+ "msgContent": fmt.Sprintf("<p>经销商:<a href='%s'>%s</a> 的必要信息未填写完整,请及时完善</p>", distUrl(*DistributorData), req.DistName),
|
|
|
"msgType": "20",
|
|
"msgType": "20",
|
|
|
"recvUserIds": strconv.Itoa(req.BelongSaleId),
|
|
"recvUserIds": strconv.Itoa(req.BelongSaleId),
|
|
|
"msgStatus": "10",
|
|
"msgStatus": "10",
|
|
@@ -233,6 +233,13 @@ func (s *distributorService) Create(ctx context.Context, req *model.AddDistribut
|
|
|
return id, nil
|
|
return id, nil
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+func distUrl(ent model.BaseDistributor) string {
|
|
|
|
|
+ if ent.DistType == "20" {
|
|
|
|
|
+ return fmt.Sprintf("#/base/agentDetails?id=%d", ent.Id)
|
|
|
|
|
+ }
|
|
|
|
|
+ return fmt.Sprintf("#/base/info?id=%d", ent.Id)
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
var ProcessCodeDistProxyCreate = "PROC-9494B87D-DE96-49EE-B676-D3913911BE21" // 创建代理商
|
|
var ProcessCodeDistProxyCreate = "PROC-9494B87D-DE96-49EE-B676-D3913911BE21" // 创建代理商
|
|
|
|
|
|
|
|
func (s *distributorService) createDingtalkProcess(ctx context.Context, ent *model.BaseDistributor, contractFileName string) error {
|
|
func (s *distributorService) createDingtalkProcess(ctx context.Context, ent *model.BaseDistributor, contractFileName string) error {
|
|
@@ -1342,7 +1349,7 @@ func notifyToComplete() {
|
|
|
|
|
|
|
|
msg := g.MapStrStr{
|
|
msg := g.MapStrStr{
|
|
|
"msgTitle": "经销商信息完善提醒",
|
|
"msgTitle": "经销商信息完善提醒",
|
|
|
- "msgContent": fmt.Sprintf("<p>经销商:%s 的必要信息未填写完整,请及时完善</p>", d.DistName),
|
|
|
|
|
|
|
+ "msgContent": fmt.Sprintf("<p>经销商:<a href='%s'>%s</a> 的必要信息未填写完整,请及时完善</p>", distUrl(*d), d.DistName),
|
|
|
"msgType": "20",
|
|
"msgType": "20",
|
|
|
"recvUserIds": strings.Join(recvUserIdString, ","),
|
|
"recvUserIds": strings.Join(recvUserIdString, ","),
|
|
|
"msgStatus": "10",
|
|
"msgStatus": "10",
|