Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
mall.oytour.com
Commits
c7819a02
Commit
c7819a02
authored
Jul 22, 2022
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
4c8c0057
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
294 additions
and
44 deletions
+294
-44
RB_Assess_Category.cs
Mall.Model/Entity/Assess/RB_Assess_Category.cs
+5
-0
AssessModule.cs
Mall.Module.Miai/AssessModule.cs
+113
-0
AssessController.cs
Mall.WebApi/Controllers/Miai/AssessController.cs
+131
-0
appsettings.json
Mall.WebApi/appsettings.json
+45
-44
No files found.
Mall.Model/Entity/Assess/RB_Assess_Category.cs
View file @
c7819a02
...
@@ -33,6 +33,11 @@ namespace Mall.Model.Entity.Assess
...
@@ -33,6 +33,11 @@ namespace Mall.Model.Entity.Assess
/// </summary>
/// </summary>
public
int
Enable
{
get
;
set
;
}
public
int
Enable
{
get
;
set
;
}
/// <summary>
/// 排序
/// </summary>
public
int
Sort
{
get
;
set
;
}
/// <summary>
/// <summary>
/// Status
/// Status
/// </summary>
/// </summary>
...
...
Mall.Module.Miai/AssessModule.cs
0 → 100644
View file @
c7819a02
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
Mall.Common
;
using
Mall.Common.Plugin
;
using
Newtonsoft.Json
;
using
VT.FW.DB
;
using
Mall.Repository.Assess
;
using
Mall.Model.Extend.Assess
;
using
Mall.Model.Entity.Assess
;
using
Mall.Repository.User
;
namespace
Mall.Module.Miai
{
/// <summary>
/// 估价处理层
/// </summary>
public
class
AssessModule
{
/// <summary>
/// 用户管理
/// </summary>
private
readonly
RB_Member_UserRepository
member_UserRepository
=
new
RB_Member_UserRepository
();
/// <summary>
/// 分类
/// </summary>
private
readonly
RB_Assess_CategoryRepository
assess_CategoryRepository
=
new
RB_Assess_CategoryRepository
();
/// <summary>
/// 品牌
/// </summary>
private
readonly
RB_Assess_BrandRepository
assess_BrandRepository
=
new
RB_Assess_BrandRepository
();
/// <summary>
/// 商品
/// </summary>
private
readonly
RB_Assess_GoodsRepository
assess_GoodsRepository
=
new
RB_Assess_GoodsRepository
();
#
region
估价分类
/// <summary>
/// 获取分类分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="count"></param>
/// <param name="demodel"></param>
/// <returns></returns>
public
List
<
RB_Assess_Category_Extend
>
GetCategoryPageList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Assess_Category_Extend
demodel
)
{
return
assess_CategoryRepository
.
GetPageList
(
pageIndex
,
pageSize
,
out
count
,
demodel
);
}
/// <summary>
/// 获取分类列表
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public
List
<
RB_Assess_Category_Extend
>
GetCategoryList
(
RB_Assess_Category_Extend
demodel
)
{
return
assess_CategoryRepository
.
GetList
(
demodel
);
}
/// <summary>
/// 保存修改分类
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public
string
SetCategoryInfo
(
RB_Assess_Category_Extend
demodel
)
{
if
(
demodel
.
Id
>
0
)
{
var
dmodel
=
assess_CategoryRepository
.
GetEntity
(
demodel
.
Id
);
dmodel
.
Name
=
demodel
.
Name
;
dmodel
.
Image
=
demodel
.
Image
;
dmodel
.
Enable
=
demodel
.
Enable
;
dmodel
.
Sort
=
demodel
.
Sort
;
dmodel
.
UpdateBy
=
demodel
.
UpdateBy
;
dmodel
.
UpdateDate
=
demodel
.
UpdateDate
;
bool
flag
=
assess_CategoryRepository
.
Update
(
dmodel
);
return
flag
?
""
:
"出错了,请联系管理员"
;
}
else
{
bool
flag
=
assess_CategoryRepository
.
Insert
(
demodel
)
>
0
;
return
flag
?
""
:
"出错了,请联系管理员"
;
}
}
/// <summary>
/// 删除分类
/// </summary>
/// <param name="categoryId"></param>
/// <returns></returns>
public
bool
DelCategoryInfo
(
int
categoryId
)
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Assess_Category_Extend
.
Status
),
1
},
{
nameof
(
RB_Assess_Category_Extend
.
UpdateDate
),
DateTime
.
Now
},
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Assess_Category_Extend
.
Id
),
FiledValue
=
categoryId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
return
assess_CategoryRepository
.
Update
(
keyValues
,
wheres
);
}
#
endregion
}
}
\ No newline at end of file
Mall.WebApi/Controllers/Miai/AssessController.cs
0 → 100644
View file @
c7819a02
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
Mall.Common.API
;
using
Mall.WebApi.Filter
;
using
Microsoft.AspNetCore.Cors
;
using
Microsoft.AspNetCore.Mvc
;
using
Newtonsoft.Json
;
using
Mall.Common.Plugin
;
using
Newtonsoft.Json.Linq
;
using
Mall.Common
;
using
Mall.Module.Miai
;
using
Mall.Model.Extend.Assess
;
using
Mall.Model.Extend.Assess
;
namespace
Mall.WebApi.Controllers.MallBase
{
[
Route
(
"api/[controller]/[action]"
)]
[
ApiExceptionFilter
]
[
ApiController
]
[
EnableCors
(
"AllowCors"
)]
public
class
AssessController
:
BaseController
{
private
readonly
AssessModule
assessModule
=
new
AssessModule
();
#
region
分类
/// <summary>
/// 获取分类分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetCategoryPageList
()
{
var
req
=
base
.
RequestParm
;
ResultPageModel
pagelist
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
req
.
msg
.
ToString
());
RB_Assess_Category_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Assess_Category_Extend
>(
req
.
msg
.
ToString
());
demodel
.
TenantId
=
Convert
.
ToInt32
(
req
.
uid
);
demodel
.
MallBaseId
=
req
.
MallBaseId
;
var
list
=
assessModule
.
GetCategoryPageList
(
pagelist
.
pageIndex
,
pagelist
.
pageSize
,
out
long
count
,
demodel
);
pagelist
.
count
=
Convert
.
ToInt32
(
count
);
pagelist
.
pageData
=
list
.
Select
(
x
=>
new
{
x
.
Id
,
x
.
Name
,
x
.
Image
,
x
.
Enable
,
x
.
Sort
,
CreateDate
=
x
.
CreateDate
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
});
return
ApiResult
.
Success
(
""
,
pagelist
);
}
/// <summary>
/// 获取分类下拉列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetCategoryDropList
()
{
var
req
=
base
.
RequestParm
;
RB_Assess_Category_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Assess_Category_Extend
>(
req
.
msg
.
ToString
());
demodel
.
TenantId
=
Convert
.
ToInt32
(
req
.
uid
);
demodel
.
MallBaseId
=
req
.
MallBaseId
;
demodel
.
Enable
=
1
;
var
list
=
assessModule
.
GetCategoryList
(
demodel
);
return
ApiResult
.
Success
(
""
,
list
.
OrderByDescending
(
x
=>
x
.
Sort
).
Select
(
x
=>
new
{
x
.
Id
,
x
.
Name
,
x
.
Image
,
x
.
Sort
,
CreateDate
=
x
.
CreateDate
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
}));
}
/// <summary>
/// 新增修改分类
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetCategoryInfo
()
{
var
req
=
RequestParm
;
RB_Assess_Category_Extend
demodel
=
JsonHelper
.
DeserializeObject
<
RB_Assess_Category_Extend
>(
req
.
msg
.
ToString
());
if
(
string
.
IsNullOrEmpty
(
demodel
.
Name
))
{
return
ApiResult
.
ParamIsNull
(
"请传递分类名称"
);
}
if
(
string
.
IsNullOrEmpty
(
demodel
.
Image
))
{
return
ApiResult
.
ParamIsNull
(
"请上传分类背景图片"
);
}
demodel
.
Enable
=
demodel
.
Enable
==
0
?
1
:
demodel
.
Enable
;
demodel
.
TenantId
=
req
.
TenantId
;
demodel
.
MallBaseId
=
req
.
MallBaseId
;
demodel
.
CreateBy
=
req
.
EmpId
;
demodel
.
CreateDate
=
DateTime
.
Now
;
demodel
.
UpdateBy
=
req
.
EmpId
;
string
msg
=
assessModule
.
SetCategoryInfo
(
demodel
);
if
(
msg
==
""
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
(
msg
);
}
}
/// <summary>
/// 删除分类
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
DelCategoryInfo
()
{
JObject
parms
=
JObject
.
Parse
(
base
.
RequestParm
.
msg
.
ToString
());
int
CategoryId
=
parms
.
GetInt
(
"CategoryId"
,
0
);
if
(
CategoryId
<=
0
)
{
return
ApiResult
.
ParamIsNull
();
}
bool
flag
=
assessModule
.
DelCategoryInfo
(
CategoryId
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
#
endregion
}
}
\ No newline at end of file
Mall.WebApi/appsettings.json
View file @
c7819a02
{
{
"ConnectionStrings"
:
{
"ConnectionStrings"
:
{
"DefaultConnection"
:
"server=192.168.10.214;user id=reborn;password=Reborn@2018;database=reborn_mall;CharSet=utf8mb4; Convert Zero Datetime=true; "
,
"DefaultConnection"
:
"server=192.168.10.214;user id=reborn;password=Reborn@2018;database=reborn_mall;CharSet=utf8mb4; Convert Zero Datetime=true; "
,
"DefaultConnectionPName"
:
"MySql.Data.MySqlClient"
,
"DefaultConnectionPName"
:
"MySql.Data.MySqlClient"
,
"FinanceConnection"
:
"server=192.168.10.214;user id=reborn;password=Reborn@2018;database=reborn_finance;CharSet=utf8mb4; Convert Zero Datetime=true; "
,
"FinanceConnection"
:
"server=192.168.10.214;user id=reborn;password=Reborn@2018;database=reborn_finance;CharSet=utf8mb4; Convert Zero Datetime=true; "
,
"FinanceConnectionPName"
:
"MySql.Data.MySqlClient"
,
"FinanceConnectionPName"
:
"MySql.Data.MySqlClient"
,
"UserConnection"
:
"server=192.168.10.214;user id=reborn;password=Reborn@2018;database=reborn_user;CharSet=utf8mb4; Convert Zero Datetime=true; "
,
"UserConnection"
:
"server=192.168.10.214;user id=reborn;password=Reborn@2018;database=reborn_user;CharSet=utf8mb4; Convert Zero Datetime=true; "
,
"UserConnectionPName"
:
"MySql.Data.MySqlClient"
,
"UserConnectionPName"
:
"MySql.Data.MySqlClient"
,
"PropertyConnection"
:
"server=192.168.10.214;user id=reborn;password=Reborn@2018;database=test_
property;CharSet=utf8mb4; Convert Zero Datetime=true; "
,
"PropertyConnection"
:
"server=192.168.10.214;user id=reborn;password=Reborn@2018;database=
property;CharSet=utf8mb4; Convert Zero Datetime=true; "
,
"PropertyConnectionPName"
:
"MySql.Data.MySqlClient"
,
"PropertyConnectionPName"
:
"MySql.Data.MySqlClient"
,
"EduConnection"
:
"server=192.168.10.214;user id=reborn;password=Reborn@2018;database=reborn_edu
;CharSet=utf8mb4; Convert Zero Datetime=true; "
,
"EduConnection"
:
"server=192.168.10.214;user id=reborn;password=Reborn@2018;database=test_edu2
;CharSet=utf8mb4; Convert Zero Datetime=true; "
,
"EduConnectionPName"
:
"MySql.Data.MySqlClient"
"EduConnectionPName"
:
"MySql.Data.MySqlClient"
},
},
"Logging"
:
{
"Logging"
:
{
"LogLevel"
:
{
"LogLevel"
:
{
"Default"
:
"Information"
,
"Default"
:
"Information"
,
"Microsoft"
:
"Warning"
,
"Microsoft"
:
"Warning"
,
"Microsoft.Hosting.Lifetime"
:
"Information"
"Microsoft.Hosting.Lifetime"
:
"Information"
}
}
},
},
"AliSms"
:
{
"AliSms"
:
{
"signName"
:
"印象之旅"
,
"signName"
:
"印象之旅"
,
"accessKeyId"
:
"LTAIwE7l9dImZSa3"
,
"accessKeyId"
:
"LTAIwE7l9dImZSa3"
,
"accessKeySecret"
:
"j47Ajn0d0WzUCIX8Biyj3P2r8QDltI"
"accessKeySecret"
:
"j47Ajn0d0WzUCIX8Biyj3P2r8QDltI"
},
},
"JwtSecretKey"
:
"@VIITTOREBORN*2018123"
,
"JwtSecretKey"
:
"@VIITTOREBORN*2018123"
,
"JwtExpirTime"
:
2592000
,
"JwtExpirTime"
:
2592000
,
...
@@ -55,12 +55,13 @@
...
@@ -55,12 +55,13 @@
"XuZongUserId"
:
111790
,
//徐总的id,用于区分线下订单
"XuZongUserId"
:
111790
,
//徐总的id,用于区分线下订单
"RebornDMC"
:
"reborn_dmc"
,
"RebornDMC"
:
"reborn_dmc"
,
"PropertyDB"
:
"test_property"
,
"PropertyDB"
:
"test_property"
,
"IncomeFinanceApi"
:
"http://192.168.10.
7
:8083/api/Mall/InsertFinanceBatchForMallIn"
,
"IncomeFinanceApi"
:
"http://192.168.10.
2
:8083/api/Mall/InsertFinanceBatchForMallIn"
,
"PaymentFinanceApi"
:
"http://192.168.10.
7
:8083/api/Mall/InsertFinanceBatchForMallOut"
,
"PaymentFinanceApi"
:
"http://192.168.10.
2
:8083/api/Mall/InsertFinanceBatchForMallOut"
,
"ZYRefundFinanceApi"
:
"http://192.168.10.
7
:8083/api/Mall/SetMallOrderSalesTheWayRefund"
,
"ZYRefundFinanceApi"
:
"http://192.168.10.
2
:8083/api/Mall/SetMallOrderSalesTheWayRefund"
,
"PropertyApi"
:
"http://192.168.1
.13
:8087/api/ECWorkFlow/SetECSuppliesStockInFlow"
,
"PropertyApi"
:
"http://192.168.1
0.2
:8087/api/ECWorkFlow/SetECSuppliesStockInFlow"
,
"EduOrderApi"
:
"http://192.168.10.
17
:8017/api/Order/SetBatchClassOrder"
,
"EduOrderApi"
:
"http://192.168.10.
2
:8017/api/Order/SetBatchClassOrder"
,
"EduUpdateGoodsSpecification"
:
"http://192.168.10.17:8017/api/Order/UpdateGoodsSpecification"
,
"EduUpdateGoodsSpecification"
:
"http://192.168.10.17:8017/api/Order/UpdateGoodsSpecification"
,
"EduPushOrderProperty"
:
"http://192.168.10.2:8085/api/EudGoods/SetMallOrderWeChatMessage"
,
"FinanceKey"
:
"FinanceMallInsertToERPViitto2020"
,
"FinanceKey"
:
"FinanceMallInsertToERPViitto2020"
,
"SettlementRate"
:
"0.60"
,
"SettlementRate"
:
"0.60"
,
"EduSettlementRate"
:
"0.54"
,
"EduSettlementRate"
:
"0.54"
,
...
@@ -69,40 +70,40 @@
...
@@ -69,40 +70,40 @@
"EduActivityExpendFinanceId"
:
"9"
,
"EduActivityExpendFinanceId"
:
"9"
,
"EduRollCallActionCode"
:
"ActivityRollCall"
,
"EduRollCallActionCode"
:
"ActivityRollCall"
,
"RabbitMqConfig"
:
{
"RabbitMqConfig"
:
{
"HostName"
:
"47.96.25.130"
,
"HostName"
:
"47.96.25.130"
,
"VirtualHost"
:
"/"
,
"VirtualHost"
:
"/"
,
"Port"
:
5672
,
"Port"
:
5672
,
"UserName"
:
"guest"
,
"UserName"
:
"guest"
,
"Password"
:
"viitto2019"
"Password"
:
"viitto2019"
},
},
"RedisSetting"
:
{
"RedisSetting"
:
{
"RedisServer"
:
"47.96.23.199"
,
"RedisServer"
:
"47.96.23.199"
,
"RedisPort"
:
"6379"
,
"RedisPort"
:
"6379"
,
"RedisPwd"
:
"Viitto2018"
"RedisPwd"
:
"Viitto2018"
},
},
"VirtualDirectory"
:
"WebFile"
,
"VirtualDirectory"
:
"WebFile"
,
"FileService"
:
"2"
,
"FileService"
:
"2"
,
"IsNormalServer"
:
2
,
"IsNormalServer"
:
2
,
"IsFirtsShopAutoExamine"
:
1
,
//首店企业认证是否字段审核
"IsFirtsShopAutoExamine"
:
1
,
//首店企业认证是否字段审核
"FinanceSetting"
:
{
"FinanceSetting"
:
{
"TenantId"
:
1
,
"TenantId"
:
1
,
"MallBaseId"
:
1
,
"MallBaseId"
:
1
,
"RemitTypeId"
:
10
,
"RemitTypeId"
:
10
,
"RemitAccountId"
:
3012
,
"RemitAccountId"
:
3012
,
"ProcurementCTId"
:
224
,
//以下采购
"ProcurementCTId"
:
224
,
//以下采购
"ProcurementFWId"
:
127
,
"ProcurementFWId"
:
127
,
"ProcurementDirector"
:
1756
,
"ProcurementDirector"
:
1756
,
"ProcurementBranchId"
:
49
,
"ProcurementBranchId"
:
49
,
"ProcurementDepartment"
:
331
,
"ProcurementDepartment"
:
331
,
"ProcurementCurrencyId"
:
1
"ProcurementCurrencyId"
:
1
},
},
"MinProfitRate"
:
{
"MinProfitRate"
:
{
"TenantId1"
:
0.1
"TenantId1"
:
0.1
},
},
"InitializeImages"
:
{
"InitializeImages"
:
{
"GradeEntranceImage"
:
"1234566778"
"GradeEntranceImage"
:
"1234566778"
},
},
"ShareConfig"
:
{
"ShareConfig"
:
{
"ShareImg"
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/zanyang.png"
"ShareImg"
:
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/zanyang.png"
}
}
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment