Commit 70d905c0 authored by hanfeng's avatar hanfeng

Merge remote-tracking branch 'origin/dev' into dev

parents d9de7705 d4ece992
......@@ -174,6 +174,13 @@ public class AuthController {
return data;
}
@RequestMapping(value = "other/sendsms", method = RequestMethod.GET)
public JSONObject otherSendsms(@RequestParam(value="username",defaultValue="")String username, @RequestParam(value="type",defaultValue="0")Integer type)throws Exception{
log.info(username+"----require sendsms...");
return appAuthService.sendsms(username,type);
}
@RequestMapping(value = "/otherLogin", method = RequestMethod.POST)
public JSONObject otherLogin(@RequestBody Map<String,Object> params)throws Exception{
log.info("----require otherLogin...");
......@@ -188,8 +195,14 @@ public class AuthController {
if(result==null){
data.put("status",1001);
}else {
String token=appAuthService.getToken(username,result.getInteger("userId"));
data.put("token",token);
Integer positionId=result.getInteger("positionId")==null?0:result.getInteger("positionId");
if (positionId==4 || positionId==1 || positionId==2 || positionId==3){
String token=appAuthService.getToken(username,result.getInteger("userId"));
data.put("token",token);
}else {
data.put("status",ResultCode.FAILED_CODE);
data.put("message","非内部员工,无法登录");
}
}
}
return data;
......
......@@ -194,7 +194,7 @@ public class AppPermissionService {
}
// String sms = PassportUtil.SendSMS(phone, SystemConfig.SENDSMS_TITLE);
String mobilecode = null;
JSONObject data = thirdFeign.send("13265487972");
JSONObject data = thirdFeign.send(phone);
if (data != null && data.getInteger("status") == ResultCode.SUCCESS_CODE) {
mobilecode = data.getString("data");
}
......@@ -444,6 +444,7 @@ public class AppPermissionService {
data.put("userId", userid);
data.put("imUserId", userVo.getImUserid());
data.put("code", userVo.getCode());
data.put("positionId", userVo.getPositionId());
//更新登录时间 和 ip
String clientIp = getIp();
appUserLoginBiz.updateLoginInfo(userid, clientIp);
......
......@@ -106,7 +106,7 @@ public class ActivityPopularizeBiz extends BaseBiz<ActivityPopularizeMapper, Act
if (jsonArray != null) {
JSONObject jsonObject1 = jsonArray.getJSONObject(num - 1);
if (jsonObject1 != null) {
double amountString = jsonObject1.getInteger("amount");
double amountString = jsonObject1.getDouble("amount");
amount = amount + amountString;
}
}
......
......@@ -58,7 +58,7 @@
from activity_popularize_relation where `popularize_id`=#{activityId}
group by major_user_id) as `apr` on apr.major_user_id = apu.user_id
left join (select `user_id`, `activity_id`, group_concat(`prize_name`) as `prizes`
from `activity_winning_record` where `activity_id`=#{activityId}
from `activity_winning_record` where `activity_id`=#{activityId} and `has_winning`=1
group by user_id, `activity_id`) as `awr`
on awr.user_id = apu.user_id and awr.activity_id = apu.popularize_id
order by apu.current_progress desc
......
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