|
@@ -198,9 +198,9 @@ public class SocialServiceImpl implements SocialServiceI {
|
198
|
198
|
* @return
|
199
|
199
|
*/
|
200
|
200
|
@Override
|
201
|
|
- public TpActivity findActivityDetail(Integer activityId, Integer communityId, Integer userId) {
|
|
201
|
+ public TpActivity findActivityDetail(Integer activityId, Integer communityId, UserElement userElement) {
|
202
|
202
|
//更新查看次数
|
203
|
|
- Integer allViewNum = updateSocialView(userId, Constant.ACTIVITY, communityId, activityId);
|
|
203
|
+ Integer allViewNum = updateSocialView(userElement.getId(), Constant.ACTIVITY, communityId, activityId);
|
204
|
204
|
if (null != allViewNum) {
|
205
|
205
|
TpActivity activity = new TpActivity();
|
206
|
206
|
activity.setId(activityId);
|
|
@@ -217,12 +217,12 @@ public class SocialServiceImpl implements SocialServiceI {
|
217
|
217
|
tpActivity.setUserName(tpUser.getUserName());
|
218
|
218
|
}
|
219
|
219
|
//查看当前人是否签到
|
220
|
|
- TpActivitySignIn tpActivitySignIn = tpActivitySignInMapper.selectSing(activityId, userId,communityId);
|
|
220
|
+ TpActivitySignIn tpActivitySignIn = tpActivitySignInMapper.selectSing(activityId, userElement.getId(),communityId);
|
221
|
221
|
Integer signType = tpActivitySignIn == null ? 0 : 1;
|
222
|
222
|
tpActivity.setSignType(signType);
|
223
|
223
|
|
224
|
224
|
//返回报名状态
|
225
|
|
- Integer signNum = tpActivitySignupMapper.findTpActivetitySignByUserId(tpActivity.getId(), communityId, userId);
|
|
225
|
+ Integer signNum = tpActivitySignupMapper.findTpActivetitySignByUserId(tpActivity.getId(), communityId, userElement.getUserVerifyId());
|
226
|
226
|
String signStatus = signNum != 0 ? Constant.STATUS_SIGNED : Constant.STATUS_UNSIGN;
|
227
|
227
|
tpActivity.setSignStatus(signStatus);
|
228
|
228
|
|
|
@@ -838,7 +838,10 @@ public class SocialServiceImpl implements SocialServiceI {
|
838
|
838
|
public ResponseBean insertActivitySignUp(UserElement userElement, TpActivity tpActivity, Integer communityId, String remark) {
|
839
|
839
|
ResponseBean responseBean = new ResponseBean();
|
840
|
840
|
//判断是否已经报名
|
841
|
|
- Integer signNum = tpActivitySignupMapper.findTpActivetitySignByUserId(tpActivity.getId(), communityId, userElement.getId());
|
|
841
|
+ /**
|
|
842
|
+ * 活动报名表:ta_user_id 字段存储 审核id,所以查询的时候,用户审核id
|
|
843
|
+ */
|
|
844
|
+ Integer signNum = tpActivitySignupMapper.findTpActivetitySignByUserId(tpActivity.getId(), communityId, userElement.getUserVerifyId());
|
842
|
845
|
if (signNum != 0) {
|
843
|
846
|
responseBean.addError("9996", "您已报名,请勿重复报名");
|
844
|
847
|
return responseBean;
|