Bläddra i källkod

活动策划跳转

anderx 3 år sedan
förälder
incheckning
75f38a3c7e

+ 27 - 27
src/main/java/com/goafanti/news/controller/AdminPolicyApiController.java

@@ -33,14 +33,14 @@ import com.goafanti.news.service.PolicyService;
 @RestController
 @RequestMapping(value = "/api/admin/policy")
 public class AdminPolicyApiController extends BaseApiController {
-	
+
 	@Autowired
 	private JDBCIdGenerator	idGenerator;
 	@Resource
 	private PolicyService policyService;
 	/*
 	 * 新增
-	 * 
+	 *
 	 * */
 		@RequestMapping(value="/apply",method=RequestMethod.POST)
 		public Result insertPolicy(@Valid Policy policy,String[]publishPages,BindingResult bindingResult) {
@@ -48,7 +48,7 @@ public class AdminPolicyApiController extends BaseApiController {
 			if (bindingResult.hasErrors()) {
 				result.getError().add(
 						buildErrorByMsg(bindingResult.getFieldError()
-								.getDefaultMessage(), NewsFields 
+								.getDefaultMessage(), NewsFields
 								.getFieldDesc(bindingResult.getFieldError()
 										.getField())));
 				return result;
@@ -72,12 +72,12 @@ public class AdminPolicyApiController extends BaseApiController {
 			policy.setType(0);
 			if(policy.getAuditStatus()!=null &&policy.getAuditStatus() == 2) {
 				policy.setReleaseDate(new Date());
-			
+
 			}
 			result.setData(policyService.saveNewPolicy(policy, webPages, appPages));
 			return result;
 		}
-		
+
 
 		private void disposePolicyParams(Policy policy,Result result) {
 			if(StringUtils.isBlank(policy.getTitle())) {
@@ -102,9 +102,9 @@ public class AdminPolicyApiController extends BaseApiController {
 		}
 		/*
 		 * 删除
-		 * 
+		 *
 		 * */
-		
+
 		@RequestMapping(value="/delete",method=RequestMethod.POST)
 		public Result deleteById(Long id) {
 			Result result=new Result();
@@ -118,7 +118,7 @@ public class AdminPolicyApiController extends BaseApiController {
 			}
 			return result;
 		}
-		
+
 		/*
 		 * 详情
 		 * */
@@ -131,10 +131,10 @@ public class AdminPolicyApiController extends BaseApiController {
 			result.setData(policyService.getPolicyDetail(id));
 			return result;
 		}
-		
+
 		/*
 		 * 修改
-		 * 
+		 *
 		 * */
 			@RequestMapping(value="/update",method=RequestMethod.POST)
 		public Result updateNews(@Valid Policy policy,BindingResult bindingResult,String[] publishPages) {
@@ -142,7 +142,7 @@ public class AdminPolicyApiController extends BaseApiController {
 				if (bindingResult.hasErrors()) {
 					result.getError().add(
 							buildErrorByMsg(bindingResult.getFieldError()
-									.getDefaultMessage(), NewsFields 
+									.getDefaultMessage(), NewsFields
 									.getFieldDesc(bindingResult.getFieldError()
 											.getField())));
 					return result;
@@ -161,22 +161,22 @@ public class AdminPolicyApiController extends BaseApiController {
 				if(policy.getAuditStatus()!=null ) {
 					policy.setReleaseDate(new Date());
 					if(policy.getAuditStatus() ==2){
-						policy.setReleaseDate(new Date());
+
 						policyService.addJtCollectSearch(policy);
 						}
 					if(policy.getAuditStatus()==4) {
 						policyService.updateJtCollectSearch(policy);
 					}
-					
+
 				}
 				policy.setEditTime(new Date());
-		
-				result.setData(policyService.updateSelectively( policy,webPages,appPages)); 
-	
+
+				result.setData(policyService.updateSelectively( policy,webPages,appPages));
+
 				return result;
 			}
-			
-			
+
+
 			/*
 			 * 变更发布状态、发布时间
 			 * */
@@ -199,7 +199,7 @@ public class AdminPolicyApiController extends BaseApiController {
 						}
 						policy.setReleaseDate(new Date());}
 					if(auditStatus!=null) {
-						policy.setAuditStatus(auditStatus); 
+						policy.setAuditStatus(auditStatus);
 					if(auditStatus ==2){
 						policy.setReleaseDate(new Date());
 						policyService.updateJtCollectSearch(policy);
@@ -209,12 +209,12 @@ public class AdminPolicyApiController extends BaseApiController {
 						policyService.updateJtCollectSearch(policy);
 					}
 					}
-					
-					result.setData(policyService.updateSelectivelyWithoutPages(policy));  
+
+					result.setData(policyService.updateSelectivelyWithoutPages(policy));
 					return result;
-					
+
 				}
-				
+
 				/*
 				 * 政策搜索
 				 * */
@@ -226,8 +226,8 @@ public class AdminPolicyApiController extends BaseApiController {
 					result.setData(policyService.searchPolicy(title,auditStatus,startReleaseDate,endReleaseDate,publishPage,pageNo,pageSize,null));
 					return result;
 				}
-				
-				
-		
-		
+
+
+
+
 }

+ 1 - 1
src/main/webapp/WEB-INF/views/common.html

@@ -242,7 +242,7 @@
 					</li>
 					<li th:class="${subM}=='eventPlanning'?active:''" >
 						<div>
-							<a href="javascript:;" >活动策划</a>
+							<a th:href="@{/portal/thinkTank/policyList?type=0}" >活动策划</a>
 						</div>
 					</li>
                      <!-- <li th:class="${subM}=='special'?active:''" >