Parcourir la source

补写本次目标,下次计划接口修改

anderx il y a 1 an
Parent
commit
35ccdf1e9f

+ 1 - 9
src/main/java/com/goafanti/weChat/controller/AdminReleaseApiController.java

@@ -135,7 +135,7 @@ public class AdminReleaseApiController extends CertifyApiController{
 	@RequestMapping(value = "/dtails", method = RequestMethod.GET)
 	public Result details(Integer id){
 		Result res =new Result();
-		res.setData(publicReleaseService.details(id));
+		res.setData(publicReleaseService.dtails(id));
 		return res;
 	}
 
@@ -365,14 +365,6 @@ public class AdminReleaseApiController extends CertifyApiController{
 			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"公出编号"));
 			return res;
 		}
-		if (supplement==null) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"本次公出目标总结"));
-			return res;
-		}
-		if (nextPlan==null) {
-			res.getError().add(buildError(ErrorConstants.PARAM_EMPTY_ERROR,"下次公出计划"));
-			return res;
-		}
 		res.setData(publicReleaseService.addSupplement( id ,supplement,nextPlan));
 		return res;
 	}

+ 1 - 1
src/main/java/com/goafanti/weChat/service/PublicReleaseService.java

@@ -29,7 +29,7 @@ public interface PublicReleaseService {
 
 	int pushPublicReleaseClockIn(Integer id,String photoUrl,Integer clockIn ,String clockInRemarks ,String uid);
 
-	OutPublicRelease details(Integer id);
+	OutPublicRelease dtails(Integer id);
 
 	Object publicReleaseStatistics(InputPublicStatistics in);
 

+ 2 - 3
src/main/java/com/goafanti/weChat/service/impl/PublicReleaseServiceImpl.java

@@ -1,6 +1,5 @@
 package com.goafanti.weChat.service.impl;
 
-import cn.jiguang.common.utils.StringUtils;
 import com.alibaba.fastjson.JSONArray;
 import com.goafanti.admin.bo.AdminListBo;
 import com.goafanti.admin.bo.AdminPublicReviewerBo;
@@ -1685,8 +1684,8 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 	public int addSupplement(Integer id, String supplement, String nextPlan) {
 		PublicRelease pr=new PublicRelease();
 		pr.setId(id);
-		pr.setSupplement(supplement);
-		pr.setNextPlan(nextPlan);
+		if (StringUtils.isNotEmpty(supplement)) pr.setSupplement(supplement);
+		if (StringUtils.isNotEmpty(nextPlan)) pr.setNextPlan(nextPlan);
 		return publicReleaseMapper.updateByPrimaryKeySelective(pr);
 	}