Merge remote-tracking branch 'origin/master'

This commit is contained in:
2023-08-11 13:44:27 +08:00
5 changed files with 65 additions and 9 deletions

View File

@@ -42,10 +42,10 @@ public class EleEpdPqdVO implements Serializable {
private String unit;
@ApiModelProperty(value = "数据开始谐波次数")
private Integer harmStart;
private Double harmStart;
@ApiModelProperty(value = "数据结束谐波次数")
private Integer harmEnd;
private Double harmEnd;
@ApiModelProperty(value = "统计方式")
private String statMethod;

View File

@@ -3,10 +3,36 @@
<mapper namespace="com.njcn.system.mapper.EleEpdPqdMapper">
<select id="page" resultType="EleEpdPqdVO">
SELECT
select
sdd.Name dataTypeName,
ele_epd_pqd.*
FROM
ele_epd_pqd.Id,
ele_epd_pqd.Name,
ele_epd_pqd.Other_Name otherName,
ele_epd_pqd.Show_Name showName,
ele_epd_pqd.Sort,
ele_epd_pqd.`Type` ,
ele_epd_pqd.Phase ,
ele_epd_pqd.Unit ,
case when ele_epd_pqd.Harm_Start = 1 then 0.5 else ele_epd_pqd.Harm_Start end harmStart,
case when ele_epd_pqd.Harm_Start = 1 then 49.5 else ele_epd_pqd.Harm_End end harmEnd ,
ele_epd_pqd.Stat_Method statMethod,
ele_epd_pqd.Class_Id classId,
ele_epd_pqd.System_Type systemType,
ele_epd_pqd.data_type dataType,
ele_epd_pqd.tran_flag tranFlag,
ele_epd_pqd.tran_rule tranRule,
ele_epd_pqd.event_type eventType,
ele_epd_pqd.store_flag storeFlag,
ele_epd_pqd.cur_sts curSts,
ele_epd_pqd.ctl_sts ctlSts,
ele_epd_pqd.max_num maxNum,
ele_epd_pqd.min_num minNum,
ele_epd_pqd.set_value setValue,
ele_epd_pqd.strlen ,
ele_epd_pqd.default_value defaultValue,
ele_epd_pqd.resources_id resourcesId,
ele_epd_pqd.status
from
ele_epd_pqd ele_epd_pqd
left join
sys_dict_data sdd

View File

@@ -164,4 +164,20 @@ public class AppUserController extends BaseController {
appUserService.rebindPhone(userId,phoneNew,code,devCode);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
}
/**
* 用户登录成功后,更新手机设备码
*/
@OperateInfo(info = LogEnum.SYSTEM_COMMON, operateType = OperateType.ADD)
@PostMapping("updateDevCode")
@ApiOperation("更新用户手机设备码")
@ApiImplicitParams({
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, paramType = "query"),
@ApiImplicitParam(name = "devCode", value = "设备码", required = true, paramType = "query")
})
public HttpResult<Object> updateDevCode(String userId,String devCode) {
String methodDescribe = getMethodDescribe("updateDevCode");
appUserService.updateDevCode(userId,devCode);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
}
}

View File

@@ -46,4 +46,9 @@ public interface IAppUserService {
*/
void rebindPhone(String userId, String phoneNew, String code, String devCode);
/**
* 更新用户设备码
*/
void updateDevCode(String userId, String devCode);
}

View File

@@ -8,6 +8,8 @@ import com.aliyuncs.exceptions.ClientException;
import com.aliyuncs.http.MethodType;
import com.aliyuncs.profile.DefaultProfile;
import com.aliyuncs.profile.IClientProfile;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.njcn.common.pojo.constant.PatternRegex;
import com.njcn.common.pojo.exception.BusinessException;
@@ -292,6 +294,13 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserMapper, User> impleme
this.updateById(user2);
}
@Override
public void updateDevCode(String userId, String devCode) {
LambdaUpdateWrapper<User> lambdaUpdateWrapper = new LambdaUpdateWrapper<>();
lambdaUpdateWrapper.set(User::getDevCode,devCode).eq(User::getId,userId);
this.update(lambdaUpdateWrapper);
}
/**
* 自定义获取验证码,固定为字母和数字的组合