parent
c426c1dc8d
commit
5b64648c89
|
|
@ -35,9 +35,9 @@ public class UserServiceImpl implements UserService {
|
|||
// 构建 userId 到 moneyVo 的映射,提升查找效率
|
||||
Map<String, UserInfoVo> moneyMap = moneyList.stream().collect(Collectors.toMap(UserInfoVo::getUserId, vo -> vo, (a, b) -> a));
|
||||
list.forEach(userInfoVo -> {
|
||||
if (userInfoVo.getPhone().length() > PHONE_LENGTH) {
|
||||
userInfoVo.setPhone(SM4EncryptUtils.sm4Decrypt(userInfoVo.getPhone()));
|
||||
}
|
||||
// if (userInfoVo.getPhone().length() > PHONE_LENGTH) {
|
||||
// userInfoVo.setPhone(SM4EncryptUtils.sm4Decrypt(userInfoVo.getPhone()));
|
||||
// }
|
||||
UserInfoVo money = moneyMap.get(userInfoVo.getUserId());
|
||||
if (money != null) {
|
||||
userInfoVo.setPersonalWalletBalance(money.getPersonalWalletBalance());
|
||||
|
|
|
|||
|
|
@ -18,4 +18,5 @@ public class ApkDTO extends BaseEntity {
|
|||
private String deployUser;
|
||||
private String type;
|
||||
private String canteenType;
|
||||
private String deviceType;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ public class DeviceAppVersion extends BaseEntity {
|
|||
|
||||
/** 食堂超市类别(1食堂,2商超) */
|
||||
private String canteenType;
|
||||
|
||||
/** 参考设备ENUM */
|
||||
private String deviceType;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,10 +102,10 @@ public class DeviceAppVersionServiceImpl implements IDeviceAppVersionService {
|
|||
@Override
|
||||
public AjaxResult uploadApk(ApkDTO dto) {
|
||||
try {
|
||||
ApkDTO apkDTO = deviceAppVersionMapper.getApkByType(dto.getCanteenType(), dto.getVersion());
|
||||
ApkDTO apkDTO = deviceAppVersionMapper.getApkByType(dto.getDeviceType(), dto.getVersion());
|
||||
if (apkDTO != null) {
|
||||
//检查最新的一条版本是否相同
|
||||
ApkDTO lastBean = deviceAppVersionMapper.getApkByType(dto.getCanteenType(), null);
|
||||
ApkDTO lastBean = deviceAppVersionMapper.getApkByType(dto.getDeviceType(), null);
|
||||
if (lastBean != null && !lastBean.getVersion().equals(dto.getVersion())){
|
||||
return AjaxResult.error("该版本已存在");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
deploy_time as deployTime,
|
||||
deploy_user as deployUser
|
||||
from device_app_version
|
||||
where canteen_type = #{type} and version > #{id}
|
||||
where device_type = #{type} and version > #{id}
|
||||
</select>
|
||||
<select id="getParamInfo" resultType="com.bonus.canteen.core.android.vo.ParamVO">
|
||||
SELECT
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="deployTime != null">deploy_time,</if>
|
||||
<if test="deployUser != null">deploy_user,</if>
|
||||
<if test="canteenType != null">canteen_type,</if>
|
||||
<if test="deviceType != null">device_type,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
|
|
@ -67,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="deployTime != null">#{deployTime},</if>
|
||||
<if test="deployUser != null">#{deployUser},</if>
|
||||
<if test="canteenType != null">#{canteenType},</if>
|
||||
<if test="deviceType != null">#{deviceType},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
|
|
@ -85,6 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="deployTime != null">deploy_time = #{deployTime},</if>
|
||||
<if test="deployUser != null">deploy_user = #{deployUser},</if>
|
||||
<if test="canteenType != null">canteen_type = #{canteenType},</if>
|
||||
<if test="deviceType != null">device_type = #{deviceType},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
|
|
@ -112,7 +115,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and version = #{version}
|
||||
</if>
|
||||
<if test="type != null and type != ''">
|
||||
and canteen_type = #{type}
|
||||
and device_type = #{type}
|
||||
</if>
|
||||
order by version desc
|
||||
limit 1
|
||||
|
|
@ -141,11 +144,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="type != null and type != ''">
|
||||
canteen_type = #{type},
|
||||
</if>
|
||||
<if test="deviceType != null and deviceType != ''">
|
||||
device_type = #{deviceType},
|
||||
</if>
|
||||
</set>
|
||||
where version = #{version}
|
||||
</update>
|
||||
<insert id="insertApk">
|
||||
insert into device_app_version(version, version_name, apk_name, apk_path, update_content, deploy_user, canteen_type)
|
||||
values (#{version}, #{versionName}, #{apkName}, #{apkPath}, #{updateContent}, #{deployUser}, #{type})
|
||||
insert into device_app_version(version, version_name, apk_name, apk_path, update_content, deploy_user, canteen_type,device_type)
|
||||
values (#{version}, #{versionName}, #{apkName}, #{apkPath}, #{updateContent}, #{deployUser}, #{type}, #{deviceType})
|
||||
</insert>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue