Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fmupdate
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李定达
fmupdate
Commits
348339ac
Commit
348339ac
authored
Nov 10, 2016
by
ss.dai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
将合作商户ID由配置文件改到写死在程序里
parent
398024b8
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
14 deletions
+40
-14
fmscupd/changes.txt
+2
-1
fmscupd/fmcontrol.cpp
+0
-2
fmscupd/fmscupd.pro
+3
-0
fmscupd/fmtools.cpp
+29
-10
fmscupd/fmtools.h
+5
-0
fmscupd/update.ini
+1
-1
No files found.
fmscupd/changes.txt
View file @
348339ac
...
@@ -2,4 +2,4 @@
...
@@ -2,4 +2,4 @@
version 1.0.2
version 1.0.2
Fixes:
Fixes:
1
:未杀完进程就替换文件导致升级失败的问题
1
:未杀完进程就替换文件导致升级失败的问题
\ No newline at end of file
fmscupd/fmcontrol.cpp
View file @
348339ac
...
@@ -239,9 +239,7 @@ void FmControl::onCheckUpdate()
...
@@ -239,9 +239,7 @@ void FmControl::onCheckUpdate()
_CheckFilesDiff
(
sFilesMap
,
dFilesMap
);
_CheckFilesDiff
(
sFilesMap
,
dFilesMap
);
if
(
dFilesMap
.
count
()
==
0
)
if
(
dFilesMap
.
count
()
==
0
)
{
{
reportError
=
QString
(
"no diff file"
);
QLOG_ERROR
()
<<
reportError
;
QLOG_ERROR
()
<<
reportError
;
result
=
false
;
goto
end
;
goto
end
;
}
}
...
...
fmscupd/fmscupd.pro
View file @
348339ac
...
@@ -8,6 +8,9 @@ QT -= gui
...
@@ -8,6 +8,9 @@ QT -= gui
CONFIG
+=
c
++
11
CONFIG
+=
c
++
11
DEFINES
+=
QUAZIP_STATIC
DEFINES
+=
QUAZIP_STATIC
DEFINES
+=
SHAN_LIN
#DEFINES += XIAN_FENG
#DEFINES += TODAY
TARGET
=
fmscupd
TARGET
=
fmscupd
CONFIG
+=
windows
CONFIG
+=
windows
...
...
fmscupd/fmtools.cpp
View file @
348339ac
...
@@ -14,6 +14,26 @@ FmTools::FmTools()
...
@@ -14,6 +14,26 @@ FmTools::FmTools()
{
{
QString
iniPath
=
QString
(
"%1/%2"
).
arg
(
QCoreApplication
::
applicationDirPath
(),
INIFILE_NAME
);
QString
iniPath
=
QString
(
"%1/%2"
).
arg
(
QCoreApplication
::
applicationDirPath
(),
INIFILE_NAME
);
m_config
=
new
QSettings
(
iniPath
,
QSettings
::
IniFormat
);
m_config
=
new
QSettings
(
iniPath
,
QSettings
::
IniFormat
);
#ifdef SHAN_LIN
m_partnerId
=
"1234"
;
m_siIniPath
=
"D:/hspos/PosCfg.ini"
;
m_keyStoreId
=
"POS/ORGCODE"
;
m_keyPosId
=
"POS/POSNO"
;
#endif
#ifdef XIAN_FENG
m_partnerId
=
"1418"
;
m_siIniPath
=
QString
(
"%1/storeinfo.ini"
).
arg
(
QCoreApplication
::
applicationDirPath
());
m_keyStoreId
=
"info/store_id"
;
m_keyPosId
=
"info/pos_no"
;
#endif
#ifdef TODAY
m_partnerId
=
"1377"
;
m_siIniPath
=
QString
(
"%1/todaypos.ini"
).
arg
(
QCoreApplication
::
applicationDirPath
());
m_keyStoreId
=
"store_id"
;
m_keyPosId
=
"pos_no"
;
#endif
}
}
FmTools
::~
FmTools
()
FmTools
::~
FmTools
()
...
@@ -62,12 +82,11 @@ QString FmTools::GetReportUrl()
...
@@ -62,12 +82,11 @@ QString FmTools::GetReportUrl()
QByteArray
FmTools
::
GetUpdateData
()
QByteArray
FmTools
::
GetUpdateData
()
{
{
QString
iniPath
=
QString
(
"%1/todaypos.ini"
).
arg
(
QCoreApplication
::
applicationDirPath
());
QSettings
setting
(
m_siIniPath
,
QSettings
::
IniFormat
);
QSettings
setting
(
iniPath
,
QSettings
::
IniFormat
);
QJsonObject
rObj
;
QJsonObject
rObj
;
rObj
.
insert
(
JSON_PARTNERID
,
GetPartnerId
()
);
rObj
.
insert
(
JSON_PARTNERID
,
m_partnerId
);
rObj
.
insert
(
JSON_STOREID
,
setting
.
value
(
"store_id"
).
toString
());
rObj
.
insert
(
JSON_STOREID
,
setting
.
value
(
m_keyStoreId
).
toString
());
rObj
.
insert
(
JSON_POSNO
,
setting
.
value
(
"pos_no"
).
toString
());
rObj
.
insert
(
JSON_POSNO
,
setting
.
value
(
m_keyPosId
).
toString
());
rObj
.
insert
(
JSON_VERSION
,
GetVersion
());
rObj
.
insert
(
JSON_VERSION
,
GetVersion
());
return
QJsonDocument
(
rObj
).
toJson
(
QJsonDocument
::
Compact
);
return
QJsonDocument
(
rObj
).
toJson
(
QJsonDocument
::
Compact
);
}
}
...
@@ -91,12 +110,12 @@ QByteArray FmTools::GetReportData(QString planid, QString msg, QString updateSta
...
@@ -91,12 +110,12 @@ QByteArray FmTools::GetReportData(QString planid, QString msg, QString updateSta
file1
.
close
();
file1
.
close
();
}
}
}
}
QString
iniPath
=
QString
(
"%1/todaypos.ini"
).
arg
(
QCoreApplication
::
applicationDirPath
());
QSettings
setting
(
i
niPath
,
QSettings
::
IniFormat
);
QSettings
setting
(
m_siI
niPath
,
QSettings
::
IniFormat
);
QJsonObject
rObj
;
QJsonObject
rObj
;
rObj
.
insert
(
JSON_PARTNERID
,
GetPartnerId
()
);
rObj
.
insert
(
JSON_PARTNERID
,
m_partnerId
);
rObj
.
insert
(
JSON_STOREID
,
setting
.
value
(
"store_id"
).
toString
());
rObj
.
insert
(
JSON_STOREID
,
setting
.
value
(
m_keyStoreId
).
toString
());
rObj
.
insert
(
JSON_POSNO
,
setting
.
value
(
"pos_no"
).
toString
());
rObj
.
insert
(
JSON_POSNO
,
setting
.
value
(
m_keyPosId
).
toString
());
rObj
.
insert
(
JSON_PLANID
,
planid
);
rObj
.
insert
(
JSON_PLANID
,
planid
);
rObj
.
insert
(
JSON_UPDATESTATE
,
updateState
);
rObj
.
insert
(
JSON_UPDATESTATE
,
updateState
);
rObj
.
insert
(
JSON_MSG
,
msg
);
rObj
.
insert
(
JSON_MSG
,
msg
);
...
...
fmscupd/fmtools.h
View file @
348339ac
...
@@ -65,6 +65,11 @@ private:
...
@@ -65,6 +65,11 @@ private:
private
:
private
:
QSettings
*
m_config
;
QSettings
*
m_config
;
QString
m_partnerId
;
// 商户编号
QString
m_siIniPath
;
// 门店信息配置文件路径
QString
m_keyStoreId
;
// 门店编号key
QString
m_keyPosId
;
// POS编号key
};
};
#endif // FMTOOLS_H
#endif // FMTOOLS_H
fmscupd/update.ini
View file @
348339ac
...
@@ -10,7 +10,7 @@ report=http://115.159.33.143/api/fork/PosPlanState
...
@@ -10,7 +10,7 @@ report=http://115.159.33.143/api/fork/PosPlanState
;版本信息
;版本信息
version
=
1.0.1
version
=
1.0.1
;合作商户ID
;合作商户ID
partnerId
=
1224
partnerId
=
;下载文件超时时间(秒)
;下载文件超时时间(秒)
timeout0=300
timeout0=300
;请求数据超时时间(秒)
;请求数据超时时间(秒)
...
...
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