| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RequestParam;
|
| | |
| | | import com.yeshi.fanli.entity.bus.homemodule.SpecialCard;
|
| | | import com.yeshi.fanli.entity.bus.homemodule.SuperSpecialCard;
|
| | | import com.yeshi.fanli.entity.common.JumpDetailV2;
|
| | | import com.yeshi.fanli.entity.system.System;
|
| | | import com.yeshi.fanli.entity.system.BusinessSystem;
|
| | | import com.yeshi.fanli.service.AdminUserService;
|
| | | import com.yeshi.fanli.service.inter.common.JumpDetailV2Service;
|
| | | import com.yeshi.fanli.service.inter.config.BusinessSystemService;
|
| | | import com.yeshi.fanli.service.inter.config.SystemConfigService;
|
| | | import com.yeshi.fanli.service.inter.config.SystemService;
|
| | | import com.yeshi.fanli.service.inter.homemodule.SpecialCardService;
|
| | | import com.yeshi.fanli.service.inter.homemodule.SpecialService;
|
| | | import com.yeshi.fanli.service.inter.homemodule.SuperSpecialCardService;
|
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | | @Controller
|
| | | @RequestMapping("admin/new/api/v1/specialcard")
|
| | |
| | | private AdminUserService adminUserService;
|
| | |
|
| | | @Resource
|
| | | private SystemService systemService;
|
| | | private BusinessSystemService businessSystemService;
|
| | |
|
| | |
|
| | |
|
| | |
| | | specialCard.setUpdatetime(nowTime);
|
| | | specialCardService.insert(specialCard);
|
| | |
|
| | | List<System> systemList = systemService.getSystems();
|
| | | List<BusinessSystem> systemList = businessSystemService.getBusinessSystems();
|
| | | if (systemList != null && systemList.size() > 0) {
|
| | | for (System system: systemList) {
|
| | | for (BusinessSystem system: systemList) {
|
| | | SuperSpecialCard superCard = new SuperSpecialCard();
|
| | | superCard.setSpecialCard(specialCard);
|
| | | superCard.setSystem(system);
|
| | |
| | | SpecialCard specialCard = new SpecialCard();
|
| | | specialCard.setId(cardId);
|
| | |
|
| | | System system = new System();
|
| | | BusinessSystem system = new BusinessSystem();
|
| | | system.setId(systemId);
|
| | |
|
| | | SuperSpecialCard superCard = new SuperSpecialCard();
|
| | |
| | | }
|
| | |
|
| | | String params = record.getParams();
|
| | | if (params != null && params.trim().length() == 0) {
|
| | | params = null;
|
| | | }
|
| | | |
| | | if (!StringUtil.isNullOrEmpty(params)) {
|
| | | |
| | | String jumpValue = systemConfigService.get("jump");
|
| | | if (StringUtil.isNullOrEmpty(jumpValue)) {
|
| | | jumpValue = "{\"url\":\"#\"}";
|
| | | }
|
| | | |
| | | params = jumpValue.replace("#", params);
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | |
| | | |
| | | String name = record.getName();
|
| | | if (name != null && name.trim().length() == 0) {
|
| | | name = null;
|
| | | if (name != null && name.trim().length() > 0) {
|
| | | resultObj.setName(name);
|
| | | }
|
| | | |
| | | if (params != null && params.trim().length() > 0) {
|
| | | resultObj.setParams(params);
|
| | | }
|
| | | |
| | | String showType = record.getShowType();
|
| | | if (showType != null && showType.trim().length() > 0) {
|
| | | resultObj.setShowType(record.getShowType());
|
| | | }
|
| | |
|
| | | String remark = record.getRemark();
|
| | | if (remark != null && remark.trim().length() == 0) {
|
| | | remark = null;
|
| | | if (remark != null && remark.trim().length() > 0) {
|
| | | resultObj.setRemark(remark);
|
| | | }
|
| | | |
| | | resultObj.setName(name);
|
| | | resultObj.setParams(params);
|
| | | resultObj.setShowType(record.getShowType());
|
| | | resultObj.setRemark(remark);
|
| | |
|
| | | specialService.updateByPrimaryKey(resultObj);
|
| | |
|