raojiaolong@163.com 2 лет назад
Родитель
Сommit
d1d2aa81bd

+ 4 - 1
mhotel/src/com/happy/action/hotelAction.java

@@ -85,7 +85,10 @@ public class hotelAction extends ActionSupport implements ServletRequestAware {
             hotelEto = gson.fromJson(json.toString(), new TypeToken<HotelEto>() {}.getType());
             hotelEto = gson.fromJson(json.toString(), new TypeToken<HotelEto>() {}.getType());
             Hotel hotel = new Hotel();
             Hotel hotel = new Hotel();
             BeanUtils.copyProperties(hotelEto,hotel);
             BeanUtils.copyProperties(hotelEto,hotel);
-            int hotelId = hotel.getId()!= null ? hotel.getId():Math.toIntExact(UUIDUtil.generateID());
+            int hotelId = hotel.getId()!=null ? hotel.getId():Math.toIntExact(UUIDUtil.generateID());
+            if(hotelId==0){
+                hotelId = Math.toIntExact(UUIDUtil.generateID());
+            }
             int m = 0;
             int m = 0;
             //详细图附件
             //详细图附件
             List<FileInfo> fileList = JSONArray.parseArray(fileListJson, FileInfo.class);
             List<FileInfo> fileList = JSONArray.parseArray(fileListJson, FileInfo.class);

+ 1 - 1
mhotel/src/com/happy/dao/impl/HotelDictImplDao.java

@@ -139,7 +139,7 @@ public class HotelDictImplDao implements HotelDictDao {
 
 
     @Override
     @Override
     public String setConfig(String ids){
     public String setConfig(String ids){
-        String sql = "select GROUP_CONCAT(id) id from hotel_dict where status=1 and FIND_IN_SET(id,:ids) group by id";
+        String sql = "select GROUP_CONCAT(id) id from hotel_dict where status=1 and FIND_IN_SET(id,'"+ids+"')";
         MapSqlParameterSource sps = new MapSqlParameterSource();
         MapSqlParameterSource sps = new MapSqlParameterSource();
         sps.addValue("ids", ids);
         sps.addValue("ids", ids);
         String config = "";
         String config = "";