修改流量方启动禁用
This commit is contained in:
parent
669a33ba34
commit
9c1d65f7c9
@ -11,6 +11,7 @@
|
||||
where operator_id_evcs = #{operatorIdEvcs}
|
||||
and cooperation_start_time <= now()
|
||||
and cooperation_end_time >= now()
|
||||
and status =0 and del_flag =0
|
||||
</select>
|
||||
|
||||
<select id="getXhpcStationInternetBlacklist" resultType="int">
|
||||
|
||||
@ -122,7 +122,9 @@ public class XhpcInternetUserController extends BaseController {
|
||||
sysUser.setNickName(xhpcInternetUser.getName());
|
||||
sysUser.setPhonenumber(xhpcInternetUser.getPhone());
|
||||
sysUser.setUserName(xhpcInternetUser.getPhone());
|
||||
iXhpcUserService.updateUser(sysUser);
|
||||
sysUser.setPassword("123456");
|
||||
sysUser.setInternetUserId(internetUserId);
|
||||
iXhpcUserService.updateInternetUser(sysUser);
|
||||
return toAjax(iXhpcInternetUserService.update(xhpcInternetUser));
|
||||
}
|
||||
|
||||
@ -137,9 +139,12 @@ public class XhpcInternetUserController extends BaseController {
|
||||
if (StringUtils.isEmpty(ids)) {
|
||||
return AjaxResult.error(HttpStatus.NOT_NULL, "流量用户信息不能为空");
|
||||
}
|
||||
iXhpcInternetUserService.deleteByIds(ids.split(","));
|
||||
boolean b = iXhpcInternetUserService.deleteByIds(ids.split(","));
|
||||
if(b){
|
||||
return AjaxResult.success();
|
||||
}
|
||||
return AjaxResult.error("删除失败请联系管理员");
|
||||
}
|
||||
|
||||
/**
|
||||
* 流量用户详情
|
||||
@ -173,9 +178,12 @@ public class XhpcInternetUserController extends BaseController {
|
||||
if (StringUtils.isEmpty(internetUserId)) {
|
||||
return AjaxResult.error(HttpStatus.NOT_NULL, "流量用户信息不能为空");
|
||||
}
|
||||
iXhpcInternetUserService.status(Long.parseLong(internetUserId));
|
||||
boolean b = iXhpcInternetUserService.status(Long.parseLong(internetUserId));
|
||||
if(b){
|
||||
return AjaxResult.success();
|
||||
}
|
||||
return AjaxResult.error("修改状态失败,请联系管理员");
|
||||
}
|
||||
|
||||
/**
|
||||
* 流量用户列表
|
||||
|
||||
@ -150,4 +150,13 @@ public interface XhpcUserMapper {
|
||||
public int getOrderTimeNumber(@Param("userId")String userId,@Param("startTime")String startTime,@Param("endTime")String endTime,@Param("tenantId")String tenantId);
|
||||
|
||||
List<Map<String,Object>> getUserDimension(@Param("userId")String userId,@Param("startTime")String startTime,@Param("endTime")String endTime,@Param("tenantId")String tenantId,@Param("activity")Integer activity,@Param("frequency")Integer frequency,@Param("amount") BigDecimal amount,@Param("phone")String phone);
|
||||
|
||||
|
||||
/**
|
||||
* 修改流量方用户信息
|
||||
*
|
||||
* @param sysUser 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInternetUser(SysUser sysUser);
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@ public interface IXhpcInternetUserService {
|
||||
* @param ids 需要删除的流量用户ID
|
||||
* @return 结果
|
||||
*/
|
||||
public void deleteByIds(String[] ids);
|
||||
public boolean deleteByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 流量用户详情
|
||||
@ -61,7 +61,7 @@ public interface IXhpcInternetUserService {
|
||||
* @param internetUserId 流量用户id
|
||||
* @return 结果
|
||||
*/
|
||||
public void status(Long internetUserId);
|
||||
public boolean status(Long internetUserId);
|
||||
|
||||
/**
|
||||
* 流量用户列表
|
||||
|
||||
@ -133,4 +133,13 @@ public interface IXhpcUserService {
|
||||
|
||||
|
||||
List<Map<String, Object>> getUserDimension(Integer activity, Integer frequency, BigDecimal amount, String startTime, String endTime,String phone);
|
||||
|
||||
|
||||
/**
|
||||
* 修改保存流量方用户信息
|
||||
*
|
||||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateInternetUser(SysUser user);
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@ public class XhpcInternetUserServiceImpl implements IXhpcInternetUserService {
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void deleteByIds(String[] ids) {
|
||||
public boolean deleteByIds(String[] ids) {
|
||||
for (String id : ids) {
|
||||
SysUser sysUser = xhpcInternetUserMapper.getUserByInternetUserId(Long.parseLong(id));
|
||||
if (null != sysUser) {
|
||||
@ -75,9 +75,11 @@ public class XhpcInternetUserServiceImpl implements IXhpcInternetUserService {
|
||||
xhpcOperatorMapper.deleteUserPostByUserId(sysUser.getUserId());
|
||||
sysUser.setDelFlag(String.valueOf(UserConstants.DEL_FLAG));
|
||||
xhpcOperatorMapper.deleteUserById(sysUser);
|
||||
}
|
||||
}
|
||||
xhpcInternetUserMapper.deleteByIds(ids);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -113,7 +115,7 @@ public class XhpcInternetUserServiceImpl implements IXhpcInternetUserService {
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void status(Long internetUserId) {
|
||||
public boolean status(Long internetUserId) {
|
||||
SysUser sysUser = xhpcInternetUserMapper.getUserByInternetUserId(internetUserId);
|
||||
if (null != sysUser) {
|
||||
sysUser.setStatus(String.valueOf(UserConstants.NORMAL == Integer.parseInt(sysUser.getStatus()) ? UserConstants.EXCEPTION : UserConstants.NORMAL));
|
||||
@ -122,7 +124,9 @@ public class XhpcInternetUserServiceImpl implements IXhpcInternetUserService {
|
||||
xhpcInternetUser.setInternetUserId(internetUserId);
|
||||
xhpcInternetUser.setStatus(Integer.parseInt(sysUser.getStatus()));
|
||||
update(xhpcInternetUser);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -238,5 +238,16 @@ public class XhpcUserServiceImpl extends BaseService implements IXhpcUserService
|
||||
return userDimension;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存流量方用户信息
|
||||
*
|
||||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateInternetUser(SysUser user) {
|
||||
return xhpcUserMapper.updateInternetUser(user);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -369,11 +369,32 @@
|
||||
</if>
|
||||
GROUP BY xaus.app_user_id
|
||||
order by totalPrice desc,number desc
|
||||
|
||||
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<update id="updateInternetUser">
|
||||
UPDATE sys_user
|
||||
<set>
|
||||
<if test="null != deptId and '' != deptId">dept_id = #{deptId},</if>
|
||||
<if test="null != userName and '' != userName">user_name = #{userName},</if>
|
||||
<if test="null != nickName and '' != nickName">nick_name = #{nickName},</if>
|
||||
<if test="null != userType and '' != userType">user_type = #{userType},</if>
|
||||
<if test="null != email and '' != email">email = #{email},</if>
|
||||
<if test="null != phonenumber and '' != phonenumber">phonenumber = #{phonenumber},</if>
|
||||
<if test="null != operatorId and '' != operatorId">operator_id = #{operatorId},</if>
|
||||
<if test="null != sex and '' != sex">sex = #{sex},</if>
|
||||
<if test="null != avatar and '' != avatar">avatar = #{avatar},</if>
|
||||
<if test="null != password and '' != password">password = #{password},</if>
|
||||
<if test="null != dataPowerType ">data_power_type = #{dataPowerType},</if>
|
||||
<if test="null != status">status = #{status},</if>
|
||||
<if test="null != delFlag and '' != delFlag">del_flag = #{delFlag},</if>
|
||||
<if test="null != loginIp and '' != loginIp">login_ip = #{loginIp},</if>
|
||||
<if test="null != loginDate and '' != loginDate">login_date = #{loginDate},</if>
|
||||
<if test="null != createBy and '' != createBy">create_by = #{createBy},</if>
|
||||
<if test="null != createTime ">create_time = #{createTime},</if>
|
||||
<if test="null != updateBy and '' != updateBy">update_by = #{updateBy},</if>
|
||||
<if test="null != updateTime ">update_time = #{updateTime},</if>
|
||||
<if test="null != remark and '' != remark">remark = #{remark}</if>
|
||||
</set>
|
||||
WHERE internet_user_id = #{internetUserId}
|
||||
</update>
|
||||
</mapper>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user