wangchuanjin 2 лет назад
Родитель
Сommit
6a93b1ab8f

+ 1 - 1
public/entity/base_power.go

@@ -144,6 +144,6 @@ func (b *base_power) OpenPower(goods_spec_id int64, appid, goods_code string, ac
 //取消权益
 func (b *base_power) CancelPower(appid, goods_code string, spec_id, account_id int64) bool {
 	return Mysql_BaseService.UpdateOrDeleteBySql(`update base_power a inner join base_goods_spec_power b 
-				on (a.appid=? and a.account_id=? and a.status=1 and b.appid=? and b.goods_code=? and b.spec_id=? and b.power_type=2 and a.function_code=b.function_code) 
+				on (a.appid=? and a.account_id=? and a.status=1 and b.appid=? and b.goods_code=? and b.spec_id=? and a.function_code=b.function_code) 
 				set a.status=-1,update_time=?`, appid, account_id, appid, goods_code, spec_id, NowFormat(Date_Full_Layout)) > 0
 }

+ 1 - 1
public/service/deduction_test.go

@@ -13,7 +13,7 @@ func TestDeduction(t *testing.T) {
 	// 医疗机构画像	lyh_yl_yljghx
 	// 医疗机构认领	lyh_yl_yljgrl
 	// 经销商认领		lyh_yl_jxsrl
-	status, err := Deduction("10000", "lyh_yl_yljgrl", 68773, 0, 1, []string{"test"})
+	status, err := Deduction("10000", "lyh_yl_yljgrl", 13485, 1, []string{"test"})
 	assert.Nil(t, err)
 	assert.Equal(t, int64(1), status)
 }

+ 8 - 6
public/service/power_test.go

@@ -7,25 +7,27 @@ import (
 )
 
 func TestOpenPower(t *testing.T) {
-	//站内社交
-	//OpenPower("10000", "xxfb_gyxx", 4, 0, 14184, 1)
+	//信息发布
+	err := OpenPower("10000", "xxfb_gyxx", 4, 0, 14184, 1, "", "")
 	//医疗领域化
-	err := OpenPower("10000", "lyh", 13, 68773, 0, 1)
+	//err := OpenPower("10000", "lyh", 13, 13485, 0, 1, "", "")
 	assert.Nil(t, err)
 }
 
 func TestCancelPower(t *testing.T) {
+	//信息发布
+	b, err := CancelPower("10000", "xxfb_gyxx", 4, 11686)
 	//医疗领域化
-	b, err := CancelPower("10000", "lyh", 13, 68773, 0)
+	//b, err := CancelPower("10000", "lyh", 13, 13485)
 	assert.Nil(t, err)
 	assert.True(t, b)
 }
 
 func TestHasPowers(t *testing.T) {
 	//企业
-	//powers, err := HasPowers("10000", 0, 14184, 4271)
+	powers, err := HasPowers("10000", 11686, 14184, 4271)
 	//个人
-	powers, err := HasPowers("10000", 69946, 0, 0)
+	//powers, err := HasPowers("10000", 13485, 0, 0)
 	assert.Nil(t, err)
 	t.Log(powers)
 }

+ 1 - 1
public/service/recharge_test.go

@@ -9,7 +9,7 @@ import (
 func TestRecharge(t *testing.T) {
 	// 医疗机构认领	lyh_yl_yljgrl
 	// 经销商认领		lyh_yl_jxsrl
-	status, err := Recharge("10000", "lyh_yl_yljgrl", 68773, 0, 1, []string{"test"})
+	status, err := Recharge("10000", "lyh_yl_yljgrl", 13485, 1, []string{"test"})
 	assert.Nil(t, err)
 	assert.Equal(t, int64(1), status)
 }

+ 2 - 2
public/service/surplus_test.go

@@ -6,12 +6,12 @@ import (
 
 func TestSurplus(t *testing.T) {
 	//供应信息发布
-	//t.Log(Surplus("10000", "xxfb_gyxx_add", 0, 14184, 0))
+	t.Log(Surplus("10000", "xxfb_gyxx_add", 0, 14184, 0))
 	// 医疗标讯搜索	lyh_yl_ylbxss
 	// 医疗机构搜索	lyh_yl_yljgss
 	// 经销商搜索		lyh_yl_jxsss
 	// 医疗机构画像	lyh_yl_yljghx
 	// 医疗机构认领	lyh_yl_yljgrl
 	// 经销商认领		lyh_yl_jxsrl
-	t.Log(Surplus("10000", "lyh_yl_yldy", 68773, 0, 0))
+	//t.Log(Surplus("10000", "lyh_yl_yldy", 13485, 0, 0))
 }