|
@@ -175,7 +175,7 @@ func UsePersonList(this *entmanageapplication.UsePersonListReq) *entmanageapplic
|
|
|
|
|
|
func BuyProductList(this *entmanageapplication.BuyProductListReq) *entmanageapplication.BuyProductListResp {
|
|
|
nowTime := time.Now().Format("2006-01-02 15:04:05")
|
|
|
- data := JyMysql.SelectBySql(`SELECT a.id,SUM(IF(c.id IS NULL || b.status IS NULL || b.status<0,0,1)) AS use_count,a.empower_count,a.province_count,a.end_time,a.product_type FROM entniche_wait_empower a
|
|
|
+ data := JyMysql.SelectBySql(`SELECT a.id,SUM(IF(c.id IS NULL || b.status IS NULL || b.status<0,0,1)) AS use_count,a.empower_count,a.province_count,a.end_time,a.product_type,a.product_code FROM entniche_wait_empower a
|
|
|
LEFT JOIN entniche_power b ON (a.ent_id=? AND a.end_time>=? AND a.id=b.wait_empower_id AND b.status=1)
|
|
|
LEFT JOIN entniche_user c ON (b.ent_user_id=c.id)
|
|
|
WHERE a.ent_id=? AND a.end_time>=? GROUP BY a.id ORDER BY a.create_time DESC`, this.EntId, nowTime, this.EntId, nowTime)
|
|
@@ -207,22 +207,11 @@ func BuyProductList(this *entmanageapplication.BuyProductListReq) *entmanageappl
|
|
|
ProvinceCount: common.Int64All(v["province_count"]),
|
|
|
EndTime: common.ObjToString(v["end_time"]),
|
|
|
EmpowerNolimit: empowerNolimit,
|
|
|
+ Key: common.ObjToString(v["product_code"]),
|
|
|
}
|
|
|
arr = append(arr, obj)
|
|
|
}
|
|
|
}
|
|
|
- resp, err := entity.ResourceRpc.WaitEmpowerDetail(context.Background(), &pb.WaitEmpowerDetailReq{
|
|
|
- Appid: "10000",
|
|
|
- EntId: this.EntId,
|
|
|
- FunctionCode: "qysjllb",
|
|
|
- })
|
|
|
- if err == nil && resp != nil {
|
|
|
- arr = append(arr, &entmanageapplication.BuyProductList{
|
|
|
- ProductType: "企业数据流量包",
|
|
|
- EndTime: resp.EndTime,
|
|
|
- Key: "qysjllb",
|
|
|
- })
|
|
|
- }
|
|
|
return &entmanageapplication.BuyProductListResp{
|
|
|
ErrorCode: 0,
|
|
|
Data: arr,
|