This commit is contained in:
ziming 2025-07-02 10:08:01 +08:00
parent 1b960df589
commit 72a6da5ce4
2 changed files with 9 additions and 1 deletions

View File

@ -179,7 +179,7 @@ func (this *VoucherBiz) WarningSend(ctx context.Context, product *bo.ProductBo,
return err return err
} }
var warningPerson []*do.WarningPerson var warningPerson []do.WarningPerson
if err := json.Unmarshal([]byte(product.WarningPerson), &warningPerson); err != nil { if err := json.Unmarshal([]byte(product.WarningPerson), &warningPerson); err != nil {
return err return err
} }

View File

@ -44,6 +44,14 @@ func TestSendSMS(t *testing.T) {
} }
func TestWarningSend(t *testing.T) { func TestWarningSend(t *testing.T) {
warningPersonStr := `[{"tag": "CMB", "name": "李子铭", "mobile": "18666173766"}, {"tag": "LSXD", "name": "赵晋琪", "mobile": "13474987525"}]`
var warningPerson []do.WarningPerson
if err := json.Unmarshal([]byte(warningPersonStr), &warningPerson); err != nil {
t.Error(err)
return
}
req := &do.WxResp{ req := &do.WxResp{
Amount: 2, Amount: 2,
AllBudget: 70010, AllBudget: 70010,