Quellcode durchsuchen

打卡附带图片

Administrator vor 4 Jahren
Ursprung
Commit
97f3194191

+ 2 - 2
src/main/java/com/goafanti/admin/controller/AdminReleaseApiController.java

@@ -78,9 +78,9 @@ public class AdminReleaseApiController extends CertifyApiController{
 	 * @return
 	 */
 	@RequestMapping(value = "/publicReleaseClockIn", method = RequestMethod.POST)
-	public Result publicReleaseClockIn(Integer id){
+	public Result publicReleaseClockIn(Integer id,String photoUrl){
 		Result res =new Result();
-		res.setData(publicReleaseService.pushPublicReleaseClockIn(id));
+		res.setData(publicReleaseService.pushPublicReleaseClockIn(id,photoUrl));
 		return res;
 	}
 	/**

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

@@ -23,7 +23,7 @@ public interface PublicReleaseService {
 
 	int updatePublicRelease(InputPublicRelease in);
 
-	int pushPublicReleaseClockIn(Integer id);
+	int pushPublicReleaseClockIn(Integer id,String photoUrl);
 
 	OutPublicRelease dtails(Integer id);
 

+ 4 - 1
src/main/java/com/goafanti/admin/service/impl/PublicReleaseServiceImpl.java

@@ -67,6 +67,8 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 		publicReleaseMapper.insertSelectiveGetId(in);
 		Admin my=adminMapper.selectByPrimaryKey(TokenManager.getAdminId());
 		Admin a=adminMapper.selectByPrimaryKey(my.getSuperiorId());
+		PublicReleaseLog log=new PublicReleaseLog(in.getId(),TokenManager.getAdminId(),1,"发起外出申请",new Date());
+		publicReleaseLogMapper.insertSelective(log);
 		String openid=a.getOpenId();
 		if (openid!=null) {
 			return weChatUtils.addNotice(openid, in.getStatus(),date,my.getName(),"["+my.getName()+"]发起外出审核");
@@ -137,11 +139,12 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 	}
 
 	@Override
-	public int pushPublicReleaseClockIn(Integer id) {
+	public int pushPublicReleaseClockIn(Integer id,String photoUrl) {
 		PublicRelease p=new PublicRelease();
 		PublicRelease use=publicReleaseMapper.selectByPrimaryKey(id);
 		p.setId(id);
 		p.setClockIn(1);
+		p.setPhotoUrl(photoUrl);
 		p.setClockInTime(new Date());
 		if (use.getClockIn()==0) {
 			FollowBusinessBo fbb=new FollowBusinessBo();