commit
This commit is contained in:
+17
-1
@@ -14,6 +14,7 @@ import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import io.v.nutz.zhgh.activity.models.*;
|
||||
import io.v.nutz.zhgh.mobile.activity.Sports.service.MobileActivityApplyService;
|
||||
import org.apache.shiro.authz.annotation.RequiresAuthentication;
|
||||
import org.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
@@ -63,6 +64,7 @@ public class mobileActivityListController {
|
||||
@RequiresAuthentication
|
||||
public Object doActivity(@Param(value = "activityId", required = false) String activityId,
|
||||
@Param(value = "eventId", required = false) String eventId,
|
||||
@Param(value = "applyUserSign", required = false) String applyUserSign,
|
||||
@Param(value = "teamId", required = false) String teamId,
|
||||
@Param(value = "teamName", required = false) String teamName) {
|
||||
|
||||
@@ -92,6 +94,7 @@ public class mobileActivityListController {
|
||||
schoolApply.setLoginname(user.getLoginname());
|
||||
schoolApply.setUsername(user.getUsername());
|
||||
schoolApply.setBirthday(user.getBirthday());
|
||||
schoolApply.setApplyUserSign(applyUserSign);
|
||||
baseService.insert(schoolApply);
|
||||
return null;
|
||||
}
|
||||
@@ -173,6 +176,7 @@ public class mobileActivityListController {
|
||||
IF (sum(apply.`status`=2) IS NULL, 0, sum(apply.`status`=2)) AS successUserApply,
|
||||
count(apply.id) userApply,
|
||||
apply.applyUser,
|
||||
apply.applyUserSign,
|
||||
(SELECT ast.`name` FROM activity_school_apply app LEFT JOIN activity_school_team ast ON ast.id = app.teamId WHERE app.eventId = ase.eventId AND app.activityId = ase.activityId AND app.userId = @userId) activityTeamName,
|
||||
(select GROUP_CONCAT(username) FROM activity_school_apply WHERE status=2 and eventId = ase.eventId
|
||||
AND activityId = ase.activityId AND applyUser AND (applyUser=@userId or userId=@userId)) userApplyNames,
|
||||
@@ -283,7 +287,8 @@ public class mobileActivityListController {
|
||||
activityUnionName unionName,
|
||||
activityUnionId unionId,
|
||||
eventId,
|
||||
applyUser
|
||||
applyUser,
|
||||
applyUserSign
|
||||
FROM
|
||||
activity_school_apply
|
||||
$condition
|
||||
@@ -302,5 +307,16 @@ public class mobileActivityListController {
|
||||
return null;
|
||||
}
|
||||
|
||||
@At
|
||||
@ViReturn
|
||||
@RequiresAuthentication
|
||||
public Object doSign(String activityId, String eventId,String applyUserSign) {
|
||||
mobileActivityApplyService.update(Chain.make("applyUserSign",applyUserSign),
|
||||
Cnd.where("activityId", "=", activityId)
|
||||
.and("eventId", "=", eventId)
|
||||
.and("userId", "=", ShiroUtil.getUserId()));
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user