baibx 2 kuukautta sitten
vanhempi
commit
a9b2e5be4b

+ 4 - 2
com.sharemao.web.appserver/src/main/java/com/sharemao/app/service/impl/PackageServiceImpl.java

@@ -1828,7 +1828,7 @@ public class PackageServiceImpl extends AppBaseService implements PackageService
1828 1828
             return record;
1829 1829
         }
1830 1830
 
1831
-        String uusql = "SELECT ust.effect,ust.invalid,pkg.pkname"
1831
+        String uusql = "SELECT ust.effect,ust.invalid,pkg.price,pkg.pkname"
1832 1832
                 + "	 FROM usersuit ust left join packageview pkg on ust.packid=pkg.pkid"
1833 1833
                 + "	WHERE ust.packid>1 and ust.devid = '"+devid+"'"
1834 1834
                 + " ORDER BY ust.invalid  ";
@@ -1837,9 +1837,11 @@ public class PackageServiceImpl extends AppBaseService implements PackageService
1837 1837
         if (pkgLst==null){
1838 1838
             pkgLst= new ArrayList<Map<String, Object>>();
1839 1839
         }
1840
+        DecimalFormat df = new DecimalFormat("#.##");
1840 1841
         for (Map<String, Object> map : pkgLst) {
1841 1842
             map.put("effectDate", ProjectTools.timeInt2Date(String.valueOf(map.get("effect"))));
1842 1843
             map.put("invalidDate", ProjectTools.timeInt2Date(String.valueOf(map.get("invalid"))));
1844
+            map.put("price", df.format(Double.parseDouble(String.valueOf(map.get("price")))/1000));
1843 1845
         }
1844 1846
         record.put("msg", "OK");
1845 1847
         record.put("pkgs", pkgLst);
@@ -1880,8 +1882,8 @@ public class PackageServiceImpl extends AppBaseService implements PackageService
1880 1882
             sql += " ORDER BY pkv.reorder ASC";
1881 1883
             logger.info(sql);
1882 1884
             List<Map<String, Object>> pkgLst = baseDao.getMapList(sql);
1885
+            DecimalFormat df = new DecimalFormat("#.##");
1883 1886
             for (Map<String, Object> map : pkgLst) {
1884
-                DecimalFormat df = new DecimalFormat("#.##");
1885 1887
                 map.put("price", df.format(Double.parseDouble(String.valueOf(map.get("price")))/1000));
1886 1888
                 map.put("ts", CodecUtil.str2md5("zengnz"+map.get("price").toString()));
1887 1889
                 String expiryDay = String.valueOf(map.get("expiryDay"));