| | |
| | | import com.dsh.guns.modular.system.service.ICityService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.*; |
| | | |
| | |
| | | return PREFIX + "advertisement_benefits.html"; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 跳转到广告编辑页面 |
| | | */ |
| | |
| | | @ResponseBody |
| | | @RequestMapping(value = "/addAdvertisement") |
| | | public ResultUtil addAdvertisement(@RequestBody Banner banner) { |
| | | if (banner.getType().equals("请选择")){ |
| | | banner.setType(null); |
| | | } |
| | | if (banner.getPage().equals("请选择")){ |
| | | banner.setPage(null); |
| | | } |
| | | banner.setInsertTime(new Date()); |
| | | bannerClient.addAdvertisement(banner); |
| | | return ResultUtil.success("添加成功"); |
| | |
| | | if (banner.getImg().equals("")||banner==null){ |
| | | banner.setImg(byId.getImg()); |
| | | } |
| | | |
| | | if (banner.getType().equals("请选择")){ |
| | | banner.setType(null); |
| | | } |
| | | if (banner.getPage().equals("请选择")){ |
| | | banner.setPage(null); |
| | | } |
| | | |
| | | |
| | | bannerClient.updateAdvertisement(banner); |
| | | return ResultUtil.success("添加成功"); |
| | | } |