zhangkun лет назад: 5
Родитель
Сommit
bb25fa4c73

+ 35 - 12
代码/System.Model/T_Bus_Order.cs

@@ -25,9 +25,10 @@ namespace System.Model
25 25
 		private string _f_customerphone = "";
26 26
 		private int _f_vipid;
27 27
 		private decimal _f_score = 0.00M;
28
+		private decimal _f_usescore = 0.00M;
28 29
 		private int _f_state = 0;
29 30
 		private int _f_status = 0;
30
-		private DateTime _f_addtime = DateTime.Now;
31
+		private DateTime _f_addtime=DateTime.Now;
31 32
 		private DateTime? _f_submittime;
32 33
 		private DateTime? _f_checktime;
33 34
 		private DateTime? _f_stocktime;
@@ -38,18 +39,18 @@ namespace System.Model
38 39
 		private string _f_addusername;
39 40
 		private int _f_belong;
40 41
 		private string _f_belongname;
41
-		private decimal? _f_totleprice;
42
+		private decimal _f_totleprice;
42 43
 		private string _f_useactivity = "";
43
-		private decimal? _f_shouldprice;
44
-		private decimal? _f_realprice;
44
+		private string _f_useactivitydes = "";
45
+		private decimal _f_activitymoney;
46
+		private decimal _f_shouldprice;
47
+		private decimal _f_realprice;
45 48
 		private string _f_paytype = "";
46 49
 		private string _f_stock = "";
47 50
 		private string _f_express = "";
48 51
 		private string _f_remark = "";
49 52
 		private string _f_adfrom = "";
50 53
 		private string _f_type = "";
51
-
52
-
53 54
 		/// <summary>
54 55
 		/// 订单编号 BJ员工工号+T+时间
55 56
 		/// </summary>
@@ -171,6 +172,14 @@ namespace System.Model
171 172
 			get { return _f_score; }
172 173
 		}
173 174
 		/// <summary>
175
+		/// 使用积分
176
+		/// </summary>
177
+		public decimal F_UseScore
178
+		{
179
+			set { _f_usescore = value; }
180
+			get { return _f_usescore; }
181
+		}
182
+		/// <summary>
174 183
 		/// 订单状态 -1无效 0暂存 其他待定
175 184
 		/// </summary>
176 185
 		public int F_State
@@ -277,7 +286,7 @@ namespace System.Model
277 286
 		/// <summary>
278 287
 		/// 订单总额
279 288
 		/// </summary>
280
-		public decimal? F_TotlePrice
289
+		public decimal F_TotlePrice
281 290
 		{
282 291
 			set { _f_totleprice = value; }
283 292
 			get { return _f_totleprice; }
@@ -291,9 +300,25 @@ namespace System.Model
291 300
 			get { return _f_useactivity; }
292 301
 		}
293 302
 		/// <summary>
303
+		/// 使用活动描述
304
+		/// </summary>
305
+		public string F_UseActivityDes
306
+		{
307
+			set { _f_useactivitydes = value; }
308
+			get { return _f_useactivitydes; }
309
+		}
310
+		/// <summary>
311
+		/// 活动优惠金额    一般指满减
312
+		/// </summary>
313
+		public decimal F_ActivityMoney
314
+		{
315
+			set { _f_activitymoney = value; }
316
+			get { return _f_activitymoney; }
317
+		}
318
+		/// <summary>
294 319
 		/// 应收金额 交易金额
295 320
 		/// </summary>
296
-		public decimal? F_ShouldPrice
321
+		public decimal F_ShouldPrice
297 322
 		{
298 323
 			set { _f_shouldprice = value; }
299 324
 			get { return _f_shouldprice; }
@@ -301,7 +326,7 @@ namespace System.Model
301 326
 		/// <summary>
302 327
 		/// 实收金额
303 328
 		/// </summary>
304
-		public decimal? F_RealPrice
329
+		public decimal F_RealPrice
305 330
 		{
306 331
 			set { _f_realprice = value; }
307 332
 			get { return _f_realprice; }
@@ -338,7 +363,6 @@ namespace System.Model
338 363
 			set { _f_remark = value; }
339 364
 			get { return _f_remark; }
340 365
 		}
341
-
342 366
 		/// <summary>
343 367
 		/// 广告来源
344 368
 		/// </summary>
@@ -347,9 +371,8 @@ namespace System.Model
347 371
 			set { _f_adfrom = value; }
348 372
 			get { return _f_adfrom; }
349 373
 		}
350
-
351 374
 		/// <summary>
352
-		/// 订单类型
375
+		/// 订单类型  回访订单,热线订单==
353 376
 		/// </summary>
354 377
 		public string F_Type
355 378
 		{

+ 8 - 8
代码/System.Model/T_Bus_Product.cs

@@ -23,10 +23,10 @@ namespace System.Model
23 23
 		private string _f_factory="";
24 24
 		private string _f_address="";
25 25
 		private string _f_supplier="";
26
-		private decimal? _f_score=0.00M;
27
-		private decimal? _f_marketprice=0.00M;
28
-		private decimal? _f_memberprice = 0.00M;
29
-		private decimal? _f_specialprice = 0.00M;
26
+		private decimal _f_score=0.00M;
27
+		private decimal _f_marketprice=0.00M;
28
+		private decimal _f_memberprice = 0.00M;
29
+		private decimal _f_specialprice = 0.00M;
30 30
 		private int? _f_isdelete=0;
31 31
 		private string _f_des="";
32 32
 		private string _f_attribute;
@@ -154,7 +154,7 @@ namespace System.Model
154 154
 		/// <summary>
155 155
 		/// 兑换积分
156 156
 		/// </summary>
157
-		public decimal? F_Score
157
+		public decimal F_Score
158 158
 		{
159 159
 			set { _f_score = value; }
160 160
 			get { return _f_score; }
@@ -162,7 +162,7 @@ namespace System.Model
162 162
 		/// <summary>
163 163
 		/// 市场价
164 164
 		/// </summary>
165
-		public decimal? F_MarketPrice
165
+		public decimal F_MarketPrice
166 166
 		{
167 167
 			set { _f_marketprice = value; }
168 168
 			get { return _f_marketprice; }
@@ -170,7 +170,7 @@ namespace System.Model
170 170
 		/// <summary>
171 171
 		/// 会员价
172 172
 		/// </summary>
173
-		public decimal? F_MemberPrice
173
+		public decimal F_MemberPrice
174 174
 		{
175 175
 			set { _f_memberprice = value; }
176 176
 			get { return _f_memberprice; }
@@ -178,7 +178,7 @@ namespace System.Model
178 178
 		/// <summary>
179 179
 		/// 特价/优惠价
180 180
 		/// </summary>
181
-		public decimal? F_SpecialPrice
181
+		public decimal F_SpecialPrice
182 182
 		{
183 183
 			set { _f_specialprice = value; }
184 184
 			get { return _f_specialprice; }

+ 105 - 47
代码/TVShoppingCallCenter_ZLJ/Controllers/Order/OrderController.cs

@@ -80,13 +80,15 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.Order
80 80
             modelOrder.F_Stock = input.F_Stock;
81 81
             modelOrder.F_Remark = input.F_Remark;
82 82
 
83
+            modelOrder.F_RealPrice = input.F_RealPrice;
84
+
83 85
             //选填 关联属性
84 86
             modelOrder.F_VipId = input.F_VipId;
85 87
 
86 88
             modelOrder.F_Type = input.F_Type;
87 89
             modelOrder.F_State = input.F_State;
88 90
             modelOrder.F_Status = input.F_Status;
89
-            modelOrder.F_UseActivity = input.F_UseActivity;
91
+
90 92
             //必须属性 系统生成
91 93
             modelOrder.F_AddTime = DateTime.Now;
92 94
             modelOrder.F_AddUser = int.Parse(User.Claims.FirstOrDefault(c => c.Type == ClaimTypes.PrimarySid).Value, 0);
@@ -95,35 +97,87 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.Order
95 97
             //计算属性  商品计算
96 98
             decimal F_Score = 0.00M;
97 99
             decimal totle = 0.00M;
98
-            decimal F_ShouldPrice = 0.00M; 
99
-            decimal F_RealPrice = 0.00M;
100
+            decimal ActivityMoney = 0.00M;
101
+            string UseActivity = "";
102
+            string UseActivity4 = ",";
100 103
             List<T_Bus_OrderDetail> modelDetailList = new List<T_Bus_OrderDetail>();
101
-            if (input.OrderDetail != null && input.OrderDetail.Count > 0)
104
+
105
+
106
+            modelOrder.F_UseActivity = input.F_UseActivity;
107
+
108
+            if (input.OrderDetailList != null && input.OrderDetailList.Count > 0)
102 109
             {
103 110
                 int n = 1;
104
-                foreach (OrderDetailInput m in input.OrderDetail)
111
+                int n2 = input.OrderDetailList.Count + 1;
112
+                if (input.UseActList != null && input.UseActList.Count > 0)
113
+                {
114
+                    //遍历所有选中的活动
115
+                    foreach (UseActInput act in input.UseActList)
116
+                    {
117
+                        UseActivity += act + ",";
118
+                        //满赠,生日赠
119
+                        if (act.type == 1 || act.type == 2)
120
+                        {
121
+                            T_Bus_Product m = await bus_productRepository.GetSingle(b => b.F_ProductId == act.gift.ObjToInt()); ;
122
+
123
+                            T_Bus_OrderDetail modelDetail = new T_Bus_OrderDetail();
124
+                            modelDetail.F_ProductName = m.F_ProductName;
125
+                            modelDetail.F_ProductId = m.F_ProductId;
126
+                            modelDetail.F_Id = Guid.NewGuid().ToString().Replace("-", "");
127
+                            modelDetail.F_OrderId = input.F_Id;
128
+                            modelDetail.F_Count = 1;
129
+                            modelDetail.F_Price = 0.00M;
130
+                            modelDetail.F_DealPrice = 0.00M;
131
+                            modelDetail.F_Sort = n2;
132
+                            modelDetail.F_Remark = "赠品-活动:" + act.id;
133
+                            modelDetail.F_AddUser = modelOrder.F_AddUser;
134
+                            modelDetail.F_AddUserName = modelOrder.F_AddUserName;
135
+                            modelDetail.F_TotlePrice = 0.00M;
136
+                            modelDetail.F_Activity = act.id;
137
+
138
+                            modelDetailList.Add(modelDetail);
139
+
140
+                            n2++;
141
+                        }
142
+                        //满减
143
+                        else if (act.type == 3)
144
+                        {
145
+                            ActivityMoney += act.money;
146
+                        }
147
+                        else if (act.type == 4)
148
+                        {
149
+                            UseActivity4 += act.gift + ",";
150
+                        }
151
+                    }
152
+                    UseActivity = UseActivity.Trim(',');
153
+                }
154
+                foreach (OrderDetailInput m in input.OrderDetailList)
105 155
                 {
106
-                    T_Bus_Product modelProduct=await bus_productRepository.GetSingle(b => b.F_ProductId == m.F_ProductId);
156
+                    T_Bus_Product modelProduct = await bus_productRepository.GetSingle(b => b.F_ProductId == m.F_ProductId);
107 157
 
108 158
                     T_Bus_OrderDetail modelDetail = new T_Bus_OrderDetail();
109
-                    modelDetail.F_ProductName = m.F_ProductName;
110
-                    modelDetail.F_ProductId = m.F_ProductId;
159
+                    modelDetail.F_ProductName = modelProduct.F_ProductName;
160
+                    modelDetail.F_ProductId = modelProduct.F_ProductId;
111 161
                     modelDetail.F_Id = Guid.NewGuid().ToString().Replace("-", "");
112 162
                     modelDetail.F_OrderId = input.F_Id;
113 163
                     modelDetail.F_Count = m.F_Count;
114
-                    modelDetail.F_Price = m.F_Price;
115
-                    modelDetail.F_DealPrice = m.F_DealPrice;                   
164
+                    modelDetail.F_Price = modelProduct.F_MemberPrice;
165
+                    //参加活动特价
166
+                    if (UseActivity4.Contains("," + modelProduct.F_ProductId + ","))
167
+                        modelDetail.F_DealPrice = modelProduct.F_SpecialPrice;
168
+                    else
169
+                        modelDetail.F_DealPrice = modelProduct.F_MemberPrice;
116 170
                     modelDetail.F_Sort = n;
117 171
                     modelDetail.F_Remark = m.F_Remark;
118 172
                     modelDetail.F_AddUser = modelOrder.F_AddUser;
119 173
                     modelDetail.F_AddUserName = modelOrder.F_AddUserName;
120 174
                     modelDetail.F_TotlePrice = modelDetail.F_DealPrice * modelDetail.F_Count;
121
-                    modelDetail.F_Activity = 0; 
175
+                    modelDetail.F_Activity = 0;
122 176
                     //是否有活动标签
123 177
                     if (m.Tags.IndexOf(".") > -1)
124 178
                     {
125 179
                         string[] tagarry = m.Tags.Split(',');
126
-                        string tag=tagarry.First(a => a.StartsWith(".")).ToString();
180
+                        string tag = tagarry.First(a => a.StartsWith(".")).ToString();
127 181
                         T_Sys_Marketing modelactive = await bus_MarketingRepository.GetSingle(b => string.Format(",{0},", b.F_Commodity).Contains(string.Format(",{0},", tag)));
128 182
 
129 183
                         //此商品参加活动
@@ -132,44 +186,35 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.Order
132 186
                             modelDetail.F_Activity = modelactive.F_ID;
133 187
                         }
134 188
                     }
135
-                   
189
+
136 190
                     totle += modelDetail.F_TotlePrice;
191
+                    modelDetailList.Add(modelDetail);
137 192
 
138 193
                     n++;
139 194
                 }
140 195
 
141 196
 
142 197
             }
143
-            F_ShouldPrice = totle;
144
-            //计算活动  单独写个方法
145
-            if (modelOrder.F_UseActivity.Length>0)
146
-            {
147
-                //详细活动规则
148
-            }
198
+
149 199
 
150 200
             //计算结果
151 201
             modelOrder.F_Score = F_Score;
152 202
             modelOrder.F_TotlePrice = totle;
153
-            modelOrder.F_ShouldPrice = F_ShouldPrice;
154
-            modelOrder.F_RealPrice = F_RealPrice;
155
-            //Expression<Func<T_Bus_Product, bool>> eq = a => a.F_ProductName == input.ProductName;
156
-            //eq = eq.Or(b => b.F_PinyinShort == input.PinyinShort);
157
-            //eq = eq.Or(b => b.F_ProductId == input.ProductId);
158
-            //eq = eq.Or(b => b.F_ProductShortName == input.ProductShortName);
159
-            //if (await _productRepository.GetCount(eq) > 0)
160
-            //{
161
-            //    return Error("名称/条形码/简称 有重复");
162
-            //}
163
-
164
-            //List<ProductInput> inputlist = new List<ProductInput>();
165
-            //inputlist.Add(input);
203
+            modelOrder.F_ShouldPrice = modelOrder.F_TotlePrice- ActivityMoney;
204
+            modelOrder.F_ActivityMoney = ActivityMoney;
205
+            modelOrder.F_UseActivity = UseActivity;
206
+
207
+
166 208
             if (await bus_OrderRepository.Add(modelOrder) > 0)
167 209
             {
168
-                return Success("订单保存成功");
210
+                if (await bus_OrderDetailRepository.AddMany(modelDetailList))
211
+                   return Success("订单添加成功");
212
+                else
213
+                    return Error("订单添加失败,请重试!");
169 214
             }
170 215
             else
171 216
             {
172
-                return Error("订单保存失败,请重试!");
217
+                return Error("订单添加失败,请重试!");
173 218
             }
174 219
 
175 220
         }
@@ -182,7 +227,8 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.Order
182 227
         [HttpPost("getact")]
183 228
         public async Task<IActionResult> GetAct([FromBody]List<OrderDetailInput> input)
184 229
         {
185
-            if(input.Count<1)
230
+            decimal def = 0.00M;
231
+            if (input.Count < 1)
186 232
                 return Error("请选择商品/数量");
187 233
 
188 234
             //统计活动金额是否符合条件
@@ -190,6 +236,7 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.Order
190 236
 
191 237
             //选择活动
192 238
             Dictionary<int, string> chooseact = new Dictionary<int, string>();
239
+            List<UseActInput> actlist = new List<UseActInput>();
193 240
             foreach (OrderDetailInput m in input)
194 241
             {
195 242
                 T_Bus_Product modelProduct = await bus_productRepository.GetSingle(b => b.F_ProductId == m.F_ProductId);
@@ -200,7 +247,7 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.Order
200 247
                     string[] tagarry = m.Tags.Split(',');
201 248
                     string tag = tagarry.First(a => a.StartsWith(".")).ToString();
202 249
                     //标签内有效期
203
-                    T_Sys_Marketing modelactive = await bus_MarketingRepository.GetSingle(b => string.Format(",{0},", b.F_Commodity).Contains(string.Format(",{0},", tag))&&b.F_StartTime<=DateTime.Now&&b.F_EndTime>=DateTime.Now);
250
+                    T_Sys_Marketing modelactive = await bus_MarketingRepository.GetSingle(b => string.Format(",{0},", b.F_Commodity).Contains(string.Format(",{0},", tag)) && b.F_StartTime <= DateTime.Now && b.F_EndTime >= DateTime.Now);
204 251
 
205 252
                     //此商品参加活动
206 253
                     if (modelactive != null)
@@ -209,16 +256,21 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.Order
209 256
                         {
210 257
                             //满赠
211 258
                             //判断此人是否有参与活动的资格  默认暂不筛选
259
+                            if (chooseact.ContainsKey(modelactive.F_ID))
260
+                                continue;
212 261
                             if (totleact.ContainsKey(modelactive.F_ID))
213 262
                             {
214 263
                                 totleact[modelactive.F_ID] = (decimal)modelProduct.F_MemberPrice * m.F_Count + totleact[modelactive.F_ID].ObjToDecimal();
215 264
                             }
216 265
                             else
217 266
                             {
218
-                                totleact.Add(modelactive.F_ID, (decimal)modelProduct.F_MemberPrice * m.F_Count);                               
267
+                                totleact.Add(modelactive.F_ID, (decimal)modelProduct.F_MemberPrice * m.F_Count);
219 268
                             }
220 269
                             if ((decimal)modelactive.F_Money <= (decimal)totleact[modelactive.F_ID])
221
-                                chooseact.Add(modelactive.F_ID, modelactive.F_Gift);
270
+                            {
271
+                                chooseact.Add(modelactive.F_ID, "1_" + modelactive.F_Gift);
272
+                                actlist.Add(new UseActInput { id = modelactive.F_ID, type = 1, gift = modelactive.F_Gift, money = def });
273
+                            }
222 274
                         }
223 275
                         else if (modelactive.F_Type == 2)
224 276
                         {
@@ -226,7 +278,8 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.Order
226 278
                             //TODO 判断此人是否有参与活动的资格  默认暂不筛选  
227 279
                             if (chooseact.ContainsKey(modelactive.F_ID))
228 280
                                 continue;
229
-                            chooseact.Add(modelactive.F_ID, modelactive.F_Commodity);                           
281
+                            chooseact.Add(modelactive.F_ID, "2_" + modelactive.F_Commodity);
282
+                            actlist.Add(new UseActInput { id = modelactive.F_ID, type = 2, gift = modelactive.F_Gift, money = def });
230 283
                         }
231 284
                         else if (modelactive.F_Type == 3)
232 285
                         {
@@ -243,7 +296,13 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.Order
243 296
                                 totleact.Add(modelactive.F_ID, (decimal)modelProduct.F_MemberPrice * m.F_Count);
244 297
                             }
245 298
                             if ((decimal)modelactive.F_Money <= (decimal)totleact[modelactive.F_ID])
246
-                                chooseact.Add(modelactive.F_ID, modelactive.F_AmountRange.ToString());
299
+                            {
300
+                                chooseact.Add(modelactive.F_ID, "3_" + modelactive.F_AmountRange.ToString());
301
+
302
+                                decimal.TryParse(modelactive.F_AmountRange, out def);
303
+                                actlist.Add(new UseActInput { id = modelactive.F_ID, type = 3, gift = "", money = def });
304
+                                def = 0.00M;
305
+                            }
247 306
                         }
248 307
                         else if (modelactive.F_Type == 4)
249 308
                         {
@@ -251,24 +310,23 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.Order
251 310
                             //判断此人是否有参与活动的资格  默认暂不筛选
252 311
                             if (chooseact.ContainsKey(modelactive.F_ID))
253 312
                             {
254
-                                chooseact[modelactive.F_ID]= chooseact[modelactive.F_ID]+","+ m.F_ProductId.ToString();
313
+                                chooseact[modelactive.F_ID] = chooseact[modelactive.F_ID] + "," + m.F_ProductId.ToString();
314
+                                actlist.First(cc => cc.id == modelactive.F_ID).gift += "," + m.F_ProductId.ToString();
255 315
                             }
256 316
                             else
257 317
                             {
258
-                                chooseact.Add(modelactive.F_ID, m.F_ProductId.ToString());
318
+                                chooseact.Add(modelactive.F_ID, "4_" + m.F_ProductId.ToString());
319
+                                actlist.Add(new UseActInput { id = modelactive.F_ID, type = 4, gift = m.F_ProductId.ToString(), money = def });
259 320
                             }
260
-                            
261
-                        }
262
-
263 321
 
264 322
 
323
+                        }
265 324
                     }
266 325
                 }
267 326
 
268 327
             }
269 328
 
270
-
271
-                return Success("订单保存成功", chooseact);
329
+            return Success("参与活动", actlist);
272 330
 
273 331
 
274 332
         }

+ 21 - 16
代码/TVShoppingCallCenter_ZLJ/Controllers/Product/TagController.cs

@@ -28,7 +28,7 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.Product
28 28
 
29 29
 
30 30
         private readonly IBus_TagRepository _tagRepository;
31
-        public TagController( IBus_TagRepository tagRepository)
31
+        public TagController(IBus_TagRepository tagRepository)
32 32
         {
33 33
 
34 34
             _tagRepository = tagRepository;
@@ -50,7 +50,7 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.Product
50 50
 
51 51
             if (string.IsNullOrEmpty(input.TagName))
52 52
                 return Error("请输入分类名称");
53
-            if (input.CLass<1)
53
+            if (input.CLass < 1)
54 54
                 return Error("请输入标签分类");
55 55
             if (input.Type < 0)
56 56
                 input.Type = 1;
@@ -101,14 +101,14 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.Product
101 101
                 return Error("请输入标签名称");
102 102
             if (input.Type < 0)
103 103
                 input.Type = 1;
104
-            if (input.Sort <1)
104
+            if (input.Sort < 1)
105 105
                 return Error("请输入标签排序序号");
106 106
 
107 107
             #endregion
108 108
 
109 109
             Expression<Func<T_Bus_Tag, bool>> eq = a => a.F_TagName == input.TagName;
110 110
 
111
-            T_Bus_Tag T_Bus_TagModel = await _tagRepository.GetSingle(eq.And(b=>b.F_Type== input.Type));
111
+            T_Bus_Tag T_Bus_TagModel = await _tagRepository.GetSingle(eq.And(b => b.F_Type == input.Type));
112 112
             //除非某固定权限 定之后再加
113 113
             if (T_Bus_TagModel.F_CLass == 1)
114 114
             {
@@ -122,14 +122,20 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.Product
122 122
             T_Bus_TagModel.F_UserId = int.Parse(User.Claims.FirstOrDefault(c => c.Type == ClaimTypes.PrimarySid).Value, 0);
123 123
             T_Bus_TagModel.F_UpdateTime = DateTime.Now;
124 124
 
125
-            if (await _tagRepository.Update(T_Bus_TagModel))
125
+            
126
+            if (await _tagRepository.Delete(eq))
126 127
             {
127
-                return Success("更新标签成功");
128
-            }
129
-            else
130
-            {
131
-                return Error("标签重复或失败,请重试!");
128
+                if (await _tagRepository.Add(T_Bus_TagModel) > 0)
129
+                {
130
+                    return Success("更新标签成功");
131
+                }
132
+                else
133
+                {
134
+                    return Success("更新标签成功。");
135
+                }
132 136
             }
137
+            return Error("更新标签失败");
138
+
133 139
         }
134 140
 
135 141
         /// <summary>
@@ -144,13 +150,13 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.Product
144 150
 
145 151
             if (string.IsNullOrEmpty(input.TagName))
146 152
                 return Error("请选择标签");
147
-            if (input.CLass<2)
153
+            if (input.CLass < 2)
148 154
                 return Error("系统标签不能删除");
149 155
 
150 156
 
151 157
             Expression<Func<T_Bus_Tag, bool>> eq = a => a.F_TagName == input.TagName;
152 158
             //非系统标签可以随意删除,与商品没有关联
153
-            if (await _tagRepository.Delete(eq.And(b=>b.F_Type==input.Type)))
159
+            if (await _tagRepository.Delete(eq.And(b => b.F_Type == input.Type)))
154 160
             {
155 161
                 return Success("删除标签成功");
156 162
             }
@@ -169,7 +175,6 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.Product
169 175
         public async Task<IActionResult> GetTagAll(TagInput input)
170 176
         {
171 177
 
172
-
173 178
             #region  拼接条件
174 179
 
175 180
             Expression<Func<T_Bus_Tag, bool>> eq = a => a.F_Type == 1;
@@ -180,7 +185,7 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.Product
180 185
             {
181 186
                 eq = eq.And(a => a.F_CLass == input.CLass);
182 187
             }
183
-            if (! string.IsNullOrEmpty(input.TagName))
188
+            if (!string.IsNullOrEmpty(input.TagName))
184 189
             {
185 190
                 eq = eq.And(a => a.F_TagName.Contains(input.TagName));
186 191
             }
@@ -189,13 +194,13 @@ namespace TVShoppingCallCenter_ZLJ.Controllers.Product
189 194
             #endregion
190 195
 
191 196
 
192
-            List<T_Bus_Tag> list = await _tagRepository.GetListALL(eq,c=>c.F_Sort,OrderByType.Asc);
197
+            List<T_Bus_Tag> list = await _tagRepository.GetListALL(eq, c => c.F_Sort, OrderByType.Asc);
193 198
 
194 199
             return Success("成功", list);
195 200
 
196 201
         }
197 202
 
198 203
         #endregion
199
- 
204
+
200 205
     }
201 206
 }

+ 12 - 1
代码/TVShoppingCallCenter_ZLJ/Models/Inputs/OrderDetailInput.cs

@@ -5,7 +5,7 @@ namespace TVShoppingCallCenter_ZLJ.Models.Inputs
5 5
 	/// 订单详情表
6 6
 	/// </summary>
7 7
 	[Serializable]
8
-	public partial class OrderDetailInput:BaseInput
8
+	public partial class OrderDetailInput : BaseInput
9 9
 	{
10 10
 		public OrderDetailInput()
11 11
 		{ }
@@ -142,5 +142,16 @@ namespace TVShoppingCallCenter_ZLJ.Models.Inputs
142 142
 		#endregion Model
143 143
 
144 144
 	}
145
+	[Serializable]
146
+	public class UseActInput
147
+	{
148
+		public int id { get; set; }
149
+
150
+		public decimal money { get; set; }
151
+
152
+		public int type { get; set; }
153
+
154
+		public string gift { get; set; }
155
+	}
145 156
 }
146 157
 

+ 4 - 4
代码/TVShoppingCallCenter_ZLJ/Models/Inputs/OrderInput.cs

@@ -43,16 +43,16 @@ namespace TVShoppingCallCenter_ZLJ.Models.Inputs
43 43
 		private decimal? _f_totleprice;
44 44
 		private string _f_useactivity = "";
45 45
 		private decimal? _f_shouldprice;
46
-		private decimal? _f_realprice;
46
+		private decimal _f_realprice;
47 47
 		private string _f_paytype = "";
48 48
 		private string _f_stock = "";
49 49
 		private string _f_express = "";
50 50
 		private string _f_remark = "";
51 51
 		private string _f_adfrom = "";
52 52
 		private string _f_type = "";
53
-		public List<OrderDetailInput> OrderDetail { get; set; }
53
+		public List<OrderDetailInput> OrderDetailList { get; set; }
54
+		public List<UseActInput> UseActList { get; set; }
54 55
 
55
-	
56 56
 		/// <summary>
57 57
 		/// 订单编号 BJ员工工号+T+时间
58 58
 		/// </summary>
@@ -304,7 +304,7 @@ namespace TVShoppingCallCenter_ZLJ.Models.Inputs
304 304
 		/// <summary>
305 305
 		/// 实收金额
306 306
 		/// </summary>
307
-		public decimal? F_RealPrice
307
+		public decimal F_RealPrice
308 308
 		{
309 309
 			set { _f_realprice = value; }
310 310
 			get { return _f_realprice; }

+ 0 - 22
代码/TVShoppingCallCenter_ZLJ/Properties/PublishProfiles/FolderProfile.pubxml

@@ -1,22 +0,0 @@
1
-<?xml version="1.0" encoding="utf-8"?>
2
-<!--
3
-此文件由 Web 项目的发布/打包过程使用。可以通过编辑此 MSBuild 文件
4
-自定义此过程的行为。为了解与此相关的更多内容,请访问 https://go.microsoft.com/fwlink/?LinkID=208121。 
5
--->
6
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
7
-  <PropertyGroup>
8
-    <WebPublishMethod>FileSystem</WebPublishMethod>
9
-    <PublishProvider>FileSystem</PublishProvider>
10
-    <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
11
-    <LastUsedPlatform>Any CPU</LastUsedPlatform>
12
-    <SiteUrlToLaunchAfterPublish />
13
-    <LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
14
-    <ExcludeApp_Data>False</ExcludeApp_Data>
15
-    <ProjectGuid>5227bf8a-c03f-40d4-b5b6-18a891c1e474</ProjectGuid>
16
-    <publishUrl>E:\项目-6.0\ZLJ足力健\发布\WebSite</publishUrl>
17
-    <DeleteExistingFiles>True</DeleteExistingFiles>
18
-    <TargetFramework>netcoreapp2.2</TargetFramework>
19
-    <SelfContained>false</SelfContained>
20
-    <_IsPortable>true</_IsPortable>
21
-  </PropertyGroup>
22
-</Project>