|
@@ -234,22 +234,24 @@ public class StoreApplyHelper
|
|
|
{
|
|
|
int StoreId = int.Parse(jsonObj["Data"]["StoreId"].ToString());
|
|
|
int BrandId = int.Parse(jsonObj["Data"]["BrandId"].ToString());
|
|
|
- int OpStoreNum = int.Parse(jsonObj["Data"]["OpStoreNum"].ToString());
|
|
|
+ string OpStorrString = jsonObj["Data"]["OpStoreNum"].ToString();
|
|
|
+ int OpType = OpStorrString.StartsWith("-") ? 0 : 1;
|
|
|
+ int OpStoreNum = int.Parse(OpStorrString.Replace("-", ""));
|
|
|
StoreHouse store = db.StoreHouse.FirstOrDefault(m => m.Id == StoreId);
|
|
|
if(store != null)
|
|
|
{
|
|
|
decimal Amount = 0;
|
|
|
if(BrandId == 1 || BrandId == 2 || BrandId == 4 || BrandId == 6 || BrandId == 7 || BrandId == 8)
|
|
|
{
|
|
|
- Amount += 200;
|
|
|
+ Amount += 200 * OpStoreNum;
|
|
|
}
|
|
|
else if(BrandId == 3 || BrandId == 5 || BrandId == 9)
|
|
|
{
|
|
|
- Amount += 300;
|
|
|
+ Amount += 300 * OpStoreNum;
|
|
|
}
|
|
|
if(Amount > 0)
|
|
|
{
|
|
|
- AddAmount(db, store.UserId, Amount, 1);
|
|
|
+ AddAmount(db, store.UserId, Amount, OpType);
|
|
|
}
|
|
|
}
|
|
|
}
|