| | |
| | | import com.dsh.guns.modular.system.service.TStoreOtherService; |
| | | import com.dsh.guns.modular.system.service.TTurnService; |
| | | import com.dsh.guns.modular.system.util.HttpRequestUtil; |
| | | import com.dsh.guns.modular.system.util.ImageUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | |
| | | }else{ |
| | | model.addAttribute("worldCupStores",worldCupStores); |
| | | } |
| | | //惠民卡 |
| | | //玩湃惠民卡 |
| | | StoreConfig c10 = storeConfigService.getOne(new LambdaQueryWrapper<StoreConfig>().eq(StoreConfig::getStoreId, id).eq(StoreConfig::getType,10)); |
| | | model.addAttribute("c10",c10); |
| | | return PREFIX + "TShop_imgAll.html"; |
| | |
| | | worldCupStore.setSort(sort); |
| | | worldCupStore.setId(id1); |
| | | worldCupStore.setBackgroundImage(backgroundImage); |
| | | if (ToolUtil.isNotEmpty(backgroundImage)) { |
| | | worldCupStore.setDisplayType(ImageUtils.getImageDimensions(backgroundImage).getDisplayType()); |
| | | } |
| | | worldCupStore.setIsOpen(isOpen); |
| | | worldCupStores.add(worldCupStore); |
| | | } |
| | |
| | | StoreConfig one = storeConfigService.getOne(new QueryWrapper<StoreConfig>() |
| | | .eq("storeId", id) |
| | | .eq("type", type)); |
| | | if (one!=null){ |
| | | one.setSort(sort); |
| | | one.setIsOpen(isOpen); |
| | | if(ToolUtil.isNotEmpty(img)){ |
| | | one.setBackgroundImage(img); |
| | | try { |
| | | if (one != null) { |
| | | one.setSort(sort); |
| | | one.setIsOpen(isOpen); |
| | | if (ToolUtil.isNotEmpty(img)) { |
| | | one.setBackgroundImage(img); |
| | | one.setDisplayType(ImageUtils.getImageDimensions(img).getDisplayType()); |
| | | } |
| | | } |
| | | if (one == null) { |
| | | StoreConfig storeConfig = new StoreConfig(); |
| | | storeConfig.setStoreId(id); |
| | | storeConfig.setType(type); |
| | | storeConfig.setIsOpen(isOpen); |
| | | storeConfig.setSort(sort); |
| | | storeConfig.setBackgroundImage(img); |
| | | if (ToolUtil.isNotEmpty(img)) { |
| | | storeConfig.setDisplayType(ImageUtils.getImageDimensions(img).getDisplayType()); |
| | | } |
| | | storeConfigService.save(storeConfig); |
| | | return storeConfig; |
| | | } |
| | | } catch (IOException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | if (one == null){ |
| | | StoreConfig storeConfig = new StoreConfig(); |
| | | storeConfig.setStoreId(id); |
| | | storeConfig.setType(type); |
| | | storeConfig.setIsOpen(isOpen); |
| | | storeConfig.setSort(sort); |
| | | storeConfig.setBackgroundImage(img); |
| | | storeConfigService.save(storeConfig); |
| | | return storeConfig; |
| | | } |
| | | |
| | | return one; |
| | | } |
| | | @RequestMapping(value = "/oneChangeNext") |