Commit 0309a7cb authored by yangshuxing's avatar yangshuxing

bug优化

parent 3f8a664d
......@@ -65,4 +65,6 @@ public interface CmptMapper {
Cmpt getCmptFromEnroll(Integer cmptId);
void updateUserCmptById(@Param("cmpt") UserCmpt cmpt);
int getEnrollInfoCount(@Param("cmptId") Integer cmptId,@Param("phone") String phone);
}
......@@ -196,4 +196,10 @@
common.neucmpt a inner join raceenroll.competition b on a.gcmptid = b.cmptid
where a.gtcmptid=#{cmptid}
</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>
\ No newline at end of file
......@@ -170,4 +170,8 @@ public class CmptService {
public Cmpt getCmptFromEnroll(Integer cmptId) {
return cmptMapper.getCmptFromEnroll(cmptId);
}
public int getEnrollInfoCount(Integer cmptId, String phone) {
return cmptMapper.getEnrollInfoCount(cmptId,phone);
}
}
......@@ -136,8 +136,12 @@ public class MicroApiController {
log.info("userId:" + userId + ",phone:" + phone + ",cmptId:" + cmptId);
EnrollInfo info = cmptService.bind(userId, phone, cmptId);
if (info == null) {
return Result.fail().setMsg("该用户未报名!");
int count = cmptService.getEnrollInfoCount(cmptId,phone);
if(count == 0){
return Result.fail().setMsg("该用户未报名!");
}else{
return Result.fail().setMsg("报名成功,未查询到组委会分配的号码牌!");
}
}
return Result.success().setMsg("绑定成功!").setContent(info);
}
......@@ -189,7 +193,12 @@ public class MicroApiController {
log.info("获取的手机是:" + purePhoneNumber);
EnrollInfo info = cmptService.bind(userId, purePhoneNumber, cmptId);
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);
......
......@@ -44,14 +44,13 @@
border-radius: 4px;
letter-spacing: 1px;
cursor: pointer;
font-size: 20px;
font-size: 16px;
}
.input{
height: 50px;
width: 420px;
width: 680px;
line-height: 50px;
border: 2px solid #F4F4F4;
border-left: 0px !important;
border-radius:4px;
margin-right: 30px;
margin-left: 0px;
......@@ -61,6 +60,16 @@
font-size: 24px;
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>
</head>
<body>
......@@ -71,7 +80,7 @@
<div class="title-new">
<span class="title">赛事客服</span>
</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="请输入客服电话">
<span v-on:click="save" class="submit">保存</span>
</div>
......
......@@ -199,6 +199,7 @@
position: relative;
padding: 20px;
background: white;
z-index: 9999;
}
#dialog{
display: none;
......
......@@ -68,10 +68,12 @@ var score = new Vue({
changeRoad:function () {
console.log(score.$data.selectedRoadId)
reviewPage.reloadPage();
reviewPage.getStatistic();
},
changeRule:function () {
console.log(score.$data.selectedRuleId);
reviewPage.reloadPage();
reviewPage.getStatistic();
},
next:function () {
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