|
|
@@ -1485,23 +1485,23 @@ func (this *OilSupplierController) GetEntityByName() {
|
|
|
// @Title 获取实体
|
|
|
// @Description 判断统一社会码
|
|
|
// @Success 200 {object} supplier.OilSupplier
|
|
|
-// @router /getbycomminercialno [get]
|
|
|
+// @router /getbycomminercialno/commercialNo [get]
|
|
|
func (this *OilSupplierController) GetEntityComminercialNo() {
|
|
|
- comminercialno := this.GetString("comminercialno")
|
|
|
+ commercialNo := this.Ctx.Input.Param(":commercialNo")
|
|
|
svc := supplier.GetOilSupplierService(utils.DBE)
|
|
|
- var datainfo ErrorDataInfo
|
|
|
- var sqlsus string
|
|
|
- sqlsus = "select Id from OilSupplier where CommercialNo= '" + comminercialno + "'"
|
|
|
+ var dataInfo ErrorDataInfo
|
|
|
+ var sqlSus string
|
|
|
+ sqlSus = "select Id from OilSupplier where CommercialNo= '" + commercialNo + "'"
|
|
|
var tempMap []map[string]string
|
|
|
- tempMap, _ = svc.DBE.QueryString(sqlsus)
|
|
|
+ tempMap, _ = svc.DBE.QueryString(sqlSus)
|
|
|
|
|
|
if tempMap != nil && tempMap[0]["Id"] != "" {
|
|
|
- datainfo.Code = 1
|
|
|
- this.Data["json"] = &datainfo
|
|
|
+ dataInfo.Code = 1
|
|
|
+ this.Data["json"] = &dataInfo
|
|
|
this.ServeJSON()
|
|
|
} else {
|
|
|
- datainfo.Code = 0
|
|
|
- this.Data["json"] = &datainfo
|
|
|
+ dataInfo.Code = 0
|
|
|
+ this.Data["json"] = &dataInfo
|
|
|
this.ServeJSON()
|
|
|
}
|
|
|
}
|