Commit 0309a7cb authored by yangshuxing's avatar yangshuxing

bug优化

parent 3f8a664d
...@@ -65,4 +65,6 @@ public interface CmptMapper { ...@@ -65,4 +65,6 @@ public interface CmptMapper {
Cmpt getCmptFromEnroll(Integer cmptId); Cmpt getCmptFromEnroll(Integer cmptId);
void updateUserCmptById(@Param("cmpt") UserCmpt cmpt); void updateUserCmptById(@Param("cmpt") UserCmpt cmpt);
int getEnrollInfoCount(@Param("cmptId") Integer cmptId,@Param("phone") String phone);
} }
...@@ -196,4 +196,10 @@ ...@@ -196,4 +196,10 @@
common.neucmpt a inner join raceenroll.competition b on a.gcmptid = b.cmptid common.neucmpt a inner join raceenroll.competition b on a.gcmptid = b.cmptid
where a.gtcmptid=#{cmptid} where a.gtcmptid=#{cmptid}
</select> </select>
<select id="getEnrollInfoCount" resultType="int">
select count(1)
from common.neucmpt a inner join raceenroll.competitionusermap b on a.gcmptid=b.cmptId
where b.callPhone=#{phone} and a.gtcmptid=#{cmptId} and b.isDelete=0 and b.isTeam=0
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -170,4 +170,8 @@ public class CmptService { ...@@ -170,4 +170,8 @@ public class CmptService {
public Cmpt getCmptFromEnroll(Integer cmptId) { public Cmpt getCmptFromEnroll(Integer cmptId) {
return cmptMapper.getCmptFromEnroll(cmptId); return cmptMapper.getCmptFromEnroll(cmptId);
} }
public int getEnrollInfoCount(Integer cmptId, String phone) {
return cmptMapper.getEnrollInfoCount(cmptId,phone);
}
} }
...@@ -136,8 +136,12 @@ public class MicroApiController { ...@@ -136,8 +136,12 @@ public class MicroApiController {
log.info("userId:" + userId + ",phone:" + phone + ",cmptId:" + cmptId); log.info("userId:" + userId + ",phone:" + phone + ",cmptId:" + cmptId);
EnrollInfo info = cmptService.bind(userId, phone, cmptId); EnrollInfo info = cmptService.bind(userId, phone, cmptId);
if (info == null) { if (info == null) {
int count = cmptService.getEnrollInfoCount(cmptId,phone);
if(count == 0){
return Result.fail().setMsg("该用户未报名!"); return Result.fail().setMsg("该用户未报名!");
}else{
return Result.fail().setMsg("报名成功,未查询到组委会分配的号码牌!");
}
} }
return Result.success().setMsg("绑定成功!").setContent(info); return Result.success().setMsg("绑定成功!").setContent(info);
} }
...@@ -189,7 +193,12 @@ public class MicroApiController { ...@@ -189,7 +193,12 @@ public class MicroApiController {
log.info("获取的手机是:" + purePhoneNumber); log.info("获取的手机是:" + purePhoneNumber);
EnrollInfo info = cmptService.bind(userId, purePhoneNumber, cmptId); EnrollInfo info = cmptService.bind(userId, purePhoneNumber, cmptId);
if (info == null) { if (info == null) {
return Result.fail().setMsg("此手机号未报名!"); int count = cmptService.getEnrollInfoCount(cmptId,purePhoneNumber);
if(count == 0){
return Result.fail().setMsg("该用户未报名!");
}else{
return Result.fail().setMsg("报名成功,未查询到组委会分配的号码牌!");
}
} }
return Result.success().setMsg("绑定成功!").setContent(info); return Result.success().setMsg("绑定成功!").setContent(info);
......
...@@ -44,14 +44,13 @@ ...@@ -44,14 +44,13 @@
border-radius: 4px; border-radius: 4px;
letter-spacing: 1px; letter-spacing: 1px;
cursor: pointer; cursor: pointer;
font-size: 20px; font-size: 16px;
} }
.input{ .input{
height: 50px; height: 50px;
width: 420px; width: 680px;
line-height: 50px; line-height: 50px;
border: 2px solid #F4F4F4; border: 2px solid #F4F4F4;
border-left: 0px !important;
border-radius:4px; border-radius:4px;
margin-right: 30px; margin-right: 30px;
margin-left: 0px; margin-left: 0px;
...@@ -61,6 +60,16 @@ ...@@ -61,6 +60,16 @@
font-size: 24px; font-size: 24px;
color: #333333; color: #333333;
} }
.section{
display: flex;
justify-content: center;
margin: 30px 0px;
height: 130px;
align-items: center;
background: rgba(255,255,255,1);
box-shadow: 0px 0px 10px 0px rgba(238,235,235,1);
border-radius: 4px;
}
</style> </style>
</head> </head>
<body> <body>
...@@ -71,7 +80,7 @@ ...@@ -71,7 +80,7 @@
<div class="title-new"> <div class="title-new">
<span class="title">赛事客服</span> <span class="title">赛事客服</span>
</div> </div>
<div style="display: flex;margin: auto;justify-content: center;margin: 30px 0px; align-items: center;"> <div class="section">
<input class="input" type="text" v-model="customer.mobile" placeholder="请输入客服电话"> <input class="input" type="text" v-model="customer.mobile" placeholder="请输入客服电话">
<span v-on:click="save" class="submit">保存</span> <span v-on:click="save" class="submit">保存</span>
</div> </div>
......
...@@ -199,6 +199,7 @@ ...@@ -199,6 +199,7 @@
position: relative; position: relative;
padding: 20px; padding: 20px;
background: white; background: white;
z-index: 9999;
} }
#dialog{ #dialog{
display: none; display: none;
......
...@@ -68,10 +68,12 @@ var score = new Vue({ ...@@ -68,10 +68,12 @@ var score = new Vue({
changeRoad:function () { changeRoad:function () {
console.log(score.$data.selectedRoadId) console.log(score.$data.selectedRoadId)
reviewPage.reloadPage(); reviewPage.reloadPage();
reviewPage.getStatistic();
}, },
changeRule:function () { changeRule:function () {
console.log(score.$data.selectedRuleId); console.log(score.$data.selectedRuleId);
reviewPage.reloadPage(); reviewPage.reloadPage();
reviewPage.getStatistic();
}, },
next:function () { next:function () {
if((score.$data.param.page+2) > Math.ceil(score.$data.totalPage/10)){ if((score.$data.param.page+2) > Math.ceil(score.$data.totalPage/10)){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment