|
|
@@ -85,10 +85,12 @@ func GetErmcpGoodses(lastUpdateTime string) ([]ErmcpGoods, error) {
|
|
|
engine := db.GetEngine()
|
|
|
|
|
|
// 对比数据库与终端的更新时间戳
|
|
|
- ermcpGoods := make([]ErmcpGoods, 0)
|
|
|
- engine.Table("GOODS G").Where(fmt.Sprintf("G.MODIFYTIME > to_date('%s','yyyy-MM-dd hh24:mi:ss')", lastUpdateTime)).Find(&ermcpGoods)
|
|
|
- if len(ermcpGoods) == 0 {
|
|
|
- return make([]ErmcpGoods, 0), nil
|
|
|
+ if len(lastUpdateTime) > 0 {
|
|
|
+ ermcpGoods := make([]ErmcpGoods, 0)
|
|
|
+ engine.Table("GOODS G").Where(fmt.Sprintf("G.MODIFYTIME > to_date('%s','yyyy-MM-dd hh24:mi:ss')", lastUpdateTime)).Find(&ermcpGoods)
|
|
|
+ if len(ermcpGoods) == 0 {
|
|
|
+ return make([]ErmcpGoods, 0), nil
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
goodses := make([]ErmcpGoods, 0)
|