Browse Source

--update invite();

zzy.zhiyuan.foxmail 8 years ago
parent
commit
28eb1a7b93

+ 2 - 1
src/main/java/com/ekexiu/portal/service/GrowthLogService.java

@ -380,12 +380,13 @@ public class GrowthLogService {
380 380
	 * @param professorId 用户ID
381 381
	 * @throws SQLException
382 382
	 */
383
	public void invite(@JdbcConn(true) Connection con,String professorId)throws SQLException{
383
	public void invite(@JdbcConn(true) Connection con,String professorId,String invitePro)throws SQLException{
384 384
		GrowthLog growthLog = new GrowthLog();
385 385
		growthLog.setId(StringUtil.buildUUID());
386 386
		growthLog.setProfessorId(professorId);
387 387
		growthLog.setOperate("1");
388 388
		growthLog.setScore(this.rule.getInviteProfessor());
389
		growthLog.setInvitePro(invitePro);
389 390
		this.growthLogDao.insert(con, growthLog);
390 391
		this.professorDao.updateScoreValue(con, professorId, growthLog.getScore());
391 392
		this.professorDao.updateGrowthValue(con, professorId, growthLog.getScore());

+ 2 - 2
src/main/java/com/ekexiu/portal/service/SysService.java

@ -732,7 +732,7 @@ public class SysService {
732 732
	        user.setActiveTime(DATE.format(new Date()));
733 733
			this.userDao.insert(con, user);
734 734
			if(inviterId != null){
735
				this.growthLogService.invite(con, inviterId);
735
				this.growthLogService.invite(con, inviterId, user.getId());
736 736
			}
737 737
			return user.getId();
738 738
		} finally {
@ -771,7 +771,7 @@ public class SysService {
771 771
			this.userDao.insert(con, user);
772 772
			con.commit();
773 773
			if(sc.getValue() != null){
774
				this.growthLogService.invite(con, sc.getValue());
774
				this.growthLogService.invite(con, sc.getValue(), user.getId());
775 775
			}
776 776
		} catch (SQLException e) {
777 777
			try {