@源码地址来源: https://minglisoft.cn/honghu2/business.html

 会员控制类:

/*** Copyright &copy; 2012-2017 <a href="http://minglisoft.cn">HongHu</a> All rights reserved.*/
package com.honghu.cloud.controller;import java.io.IOException;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.TimeUnit;import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;import org.apache.commons.lang.StringUtils;
import org.apache.http.HttpException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;import com.google.common.collect.Maps;
import com.honghu.cloud.bean.Album;
import com.honghu.cloud.bean.CustomerService;
import com.honghu.cloud.bean.MemberFans;
import com.honghu.cloud.bean.Menu;
import com.honghu.cloud.bean.PredepositLog;
import com.honghu.cloud.bean.PullUserOrder;
import com.honghu.cloud.bean.Role;
import com.honghu.cloud.bean.User;
import com.honghu.cloud.bean.UserCard;
import com.honghu.cloud.bean.VerifyidCard;
import com.honghu.cloud.code.MemberResponseCode;
import com.honghu.cloud.code.ResponseCode;
import com.honghu.cloud.code.ResponseVO;
import com.honghu.cloud.constant.Globals;
import com.honghu.cloud.dto.AccessoryDto;
import com.honghu.cloud.dto.AreaDto;
import com.honghu.cloud.dto.IntegralLogDto;
import com.honghu.cloud.dto.ModularClassDto;
import com.honghu.cloud.dto.StoreDto;
import com.honghu.cloud.dto.SysConfigDto;
import com.honghu.cloud.dto.TemplateDto;
import com.honghu.cloud.dto.UserDto;
import com.honghu.cloud.dto.VerifyCodeDto;
import com.honghu.cloud.feign.AccessoryFeignClient;
import com.honghu.cloud.feign.AreaFeignClient;
import com.honghu.cloud.feign.CouponInfoFeignClient;
import com.honghu.cloud.feign.IntegralLogFeignClient;
import com.honghu.cloud.feign.IntegralToolsFeignClient;
import com.honghu.cloud.feign.ModularClassFeignClient;
import com.honghu.cloud.feign.MsgToolsFeignClient;
import com.honghu.cloud.feign.OrderFormFeignClient;
import com.honghu.cloud.feign.QrCodeFeignClient;
import com.honghu.cloud.feign.StoreFeignClient;
import com.honghu.cloud.feign.SysConfigFeignClient;
import com.honghu.cloud.feign.TemplateFeignClient;
import com.honghu.cloud.feign.TencentIMFeignClient;
import com.honghu.cloud.feign.VerifyCodeFeignClient;
import com.honghu.cloud.redis.RedisUtil;
import com.honghu.cloud.service.IAlbumService;
import com.honghu.cloud.service.ICustomerService;
import com.honghu.cloud.service.IFavoriteService;
import com.honghu.cloud.service.IFootPointService;
import com.honghu.cloud.service.IMemberFansService;
import com.honghu.cloud.service.IPredepositLogService;
import com.honghu.cloud.service.IPullUserOrderService;
import com.honghu.cloud.service.IRoleService;
import com.honghu.cloud.service.IUserCardService;
import com.honghu.cloud.service.IUserService;
import com.honghu.cloud.service.IVerifyidCardService;
import com.honghu.cloud.tools.SecurityUserHolder;
import com.honghu.cloud.utils.CommUtil;
import com.honghu.cloud.utils.JWT;
import com.honghu.cloud.utils.beans.BeanUtils;
import com.honghu.cloud.utils.tools.Md5Encrypt;import net.sf.json.JSONObject;/*** 用户Controller* @author Administrator* @param <V>**/
@SuppressWarnings({"rawtypes","unchecked"})
@RestController
@RequestMapping(value = "/user")
/*/*@CrossOrigin(origins = "*", maxAge = 3600, methods = { RequestMethod.GET, RequestMethod.POST, RequestMethod.DELETE,RequestMethod.PUT })*/
public class UserController  {private static final Logger logger = LoggerFactory.getLogger(UserController.class);@Autowiredprivate IUserService userService;@Autowiredprivate IFootPointService footPointService;@Autowiredprivate CouponInfoFeignClient couponInfoFeignClient;@Autowiredprivate OrderFormFeignClient orderFormFeignClient;@Autowiredprivate SysConfigFeignClient sysConfigFeignClient;@Autowiredprivate AccessoryFeignClient accessoryFeignClient;@Autowiredprivate VerifyCodeFeignClient verifyCodeFeignClient;@Autowiredprivate MsgToolsFeignClient msgToolsFeignClient;@Autowiredprivate IPullUserOrderService pullUserOrderService;@Autowiredprivate QrCodeFeignClient qrCodeFeignClient;@Autowiredprivate IRoleService roleService;@Autowiredprivate AreaFeignClient areaFeignClient;@Autowiredprivate IntegralLogFeignClient integralLogFeignClient;@Autowiredprivate TemplateFeignClient templateFeignClient;@Autowiredprivate ModularClassFeignClient modularClassFeignClient;@Autowiredprivate ICustomerService customerService;@Autowiredprivate IAlbumService albumService;@Autowiredprivate IFavoriteService favoriteService;@Autowiredprivate RedisUtil redisUtil;@Autowiredprivate IVerifyidCardService verifyidCardService;@Autowiredprivate StoreFeignClient storeFeignClient;@Autowiredprivate TencentIMFeignClient tencentIMFeignClient;@Autowiredprivate IUserCardService userCardService;@Autowiredprivate IPredepositLogService predepositLogService;@Autowiredprivate IMemberFansService memberFansService;@Autowiredprivate IntegralToolsFeignClient integralToolsFeignClient;@RequestMapping(value = "/apiForFeign/selectByIds", method = RequestMethod.POST)public List<User> selectByIds(@RequestBody Map<String, Object> params) {return userService.selectByIds(params);}@RequestMapping(value = "/apiForFeign/getMsgSubUsers", method = RequestMethod.GET)public List<User> getMsgSubUsers(@RequestParam("parent_id") Long parent_id){return userService.getMsgSubUsers(parent_id);}@RequestMapping(value = "/apiForFeign/auditNoteUser", method = RequestMethod.GET)public List<User> auditNoteUser(){return userService.auditNoteUser();}@RequestMapping(value = "/apiForFeign/selectCount", method = RequestMethod.GET)public int selectCount(@RequestParam("params")Map<String, Object> params){return userService.selectCount(params);}@RequestMapping(value = "/apiForFeign/whetherFans", method = RequestMethod.GET)public boolean whetherFans(@RequestParam("mid") Long mid, @RequestParam("fansid") Long fansid) {MemberFans memberFans = memberFansService.whetherFans(mid, fansid);if (memberFans != null)return true;return false;}/*** 根据用户id查询用户* @param congelationDto* @return*/@RequestMapping(value = "/apiForFeign/selectByPrimaryKey", method = RequestMethod.GET)public User selectByPrimaryKey(@RequestParam("id") Long id) {User user = userService.selectByPrimaryKey(id);if(user != null && user.getPhoto_id() != null){user.setPhoto(accessoryFeignClient.selectByPrimaryKey(user.getPhoto_id()));}return user;}@RequestMapping(value = "/apiForFeign/selectUserCardByUserId", method = RequestMethod.GET)public UserCard selectUserCardByUserId(@RequestParam("id") Long id) {return userCardService.selectByUserId(id);}@RequestMapping(value = "/apiForFeign/queryPageList", method = RequestMethod.GET)public List<User> queryPageList(@RequestParam("params")Map<String, Object> params) {return userService.queryPageList(params, null, null);}@RequestMapping(value = "/apiForFeign/verityUserNamePassword", method = RequestMethod.POST)public List<User> verityUserNamePassword(@RequestBody Map<String, Object> params) {return userService.verityUserNamePassword(params);}@RequestMapping(value = "/apiForFeign/selectPullByOrderId", method = RequestMethod.GET)public PullUserOrder selectPullByOrderId(@RequestParam("id") Long id) {PullUserOrder obj = pullUserOrderService.selectPullByOrderId(id);return obj;}@RequestMapping(value = "/apiForFeign/savePullUserOrder", method = RequestMethod.POST)public void savePullUserOrder(@RequestBody PullUserOrder obj) {pullUserOrderService.saveEntity(obj);}/*** 根据订单id查询拉新用户表 ,进行删除* @param id*/@RequestMapping(value = "/apiForFeign/delPullByOrderId", method = RequestMethod.GET)public void delPullByOrderId(@RequestParam("id") Long id) {pullUserOrderService.deleteByOrderId(id);}@RequestMapping(value = "/apiForFeign/queryByProperty", method = RequestMethod.POST)public User queryByProperty(@RequestParam("params")Map<String, Object> params) {return userService.queryByProperty(params);}@RequestMapping(value = "/apiForFeign/updateById", method = RequestMethod.POST)public void updateById(@RequestBody User obj) {userService.updateById(obj);}@RequestMapping(value = "/apiForFeign/update", method = RequestMethod.POST)public void update(@RequestBody User obj) {userService.update(obj);}@RequestMapping(value = "/apiForFeign/saveEntity", method = RequestMethod.POST)public User saveEntity(@RequestBody User obj) {return userService.saveEntity(obj);}@RequestMapping(value = "/apiForFeign/saveUserCard", method = RequestMethod.POST)public void saveUserCard(@RequestBody UserCard obj) {userCardService.saveEntity(obj);}/*** 根据unionid查询用户* @param unionid* @return*/@RequestMapping(value = "/apiForFeign/selectByUnionid", method = RequestMethod.POST)public User selectByUnionid(@RequestParam("unionid") String unionid){return userService.selectByUnionid(unionid);}@RequestMapping(value = "/apiForFeign/selectByWxOpenId", method = RequestMethod.POST)public User selectByWxOpenId(@RequestParam("openid") String openid){return userService.selectByWxOpenId(openid);}@RequestMapping(value = "/apiForFeign/getUserByStoreId", method = RequestMethod.GET)public User getUserByStoreId(@RequestParam("id") Long id) {return userService.getUserByStoreId(id);}@RequestMapping(value = "/apiForFeign/deleteUserMenu", method = RequestMethod.GET)public void deleteUserMenu(@RequestParam("id") Long id) {userService.deleteUserMenu(id);}@RequestMapping(value = "/apiForFeign/updateLiveById", method = RequestMethod.GET)public void updateLiveById(@RequestParam("id") Long id) {userService.updateLiveById(id);}@RequestMapping(value = "/apiForFeign/saveUserMenu", method = RequestMethod.POST)public void saveUserMenu(@RequestParam("id") Long id,@RequestBody List<Menu> ms) {userService.saveUserMenu(id,ms);}/*** 客服列表* @param request* @param response* @return* @throws Exception */@RequestMapping(value="/buyer/customerServiceList", method = RequestMethod.POST)public Map<String, Object> customerServiceList(HttpServletRequest request,HttpServletResponse response)  {Map<String,Object> params = Maps.newHashMap();List<CustomerService> list = customerService.queryPages(params);HashMap<String, Object> result = new HashMap<>();result.put("list", list);System.out.println(result);return ResponseCode.buildSuccessMap(result);}/*** 用户中心完善资料* @param request* @param response* @return*/@RequestMapping(value="/buyer/account")public Map<String, Object> account(HttpServletRequest request,HttpServletResponse response) {Map<String, Object> result = new HashMap<String, Object>();long user_id = SecurityUserHolder.getCurrentUser(request).getId().longValue();User user = selectByPrimaryKey(user_id);if(user == null){return ResponseCode.buildEnumMap(ResponseCode.USER_NOT_EXISTS_ERROR, null);}result.put("obj", user);result.put("imageFilesize", Integer.valueOf(sysConfigFeignClient.getSysConfig().getImageFilesize()));return ResponseCode.buildSuccessMap(result);}/*** 用户中心完善资料* @param request* @param response* @return*/@RequestMapping(value="/buyer/liveCode")public Map<String, Object> liveCode(HttpServletRequest request,HttpServletResponse response) {HashMap<String, Object> result = new HashMap<>();User user = userService.selectByPrimaryKey(SecurityUserHolder.getCurrentUserId(request));result.put("liveCode", user.getLive_code());return ResponseCode.buildSuccessMap(result);}/*** 用户中资料保存* @param request* @param response* @param USER_AGE* @param card* @param userName* @param sex* @return* @throws Exception*/@RequestMapping(value="/buyer/account_save", method = RequestMethod.POST)public Map<String, Object> account_saveEntity(HttpServletRequest request,HttpServletResponse response,@RequestBody JSONObject json) throws Exception {String userName = json.optString("userName");String nickName = json.optString("nickName");String sex = json.optString("sex");String photo_id = json.optString("photo_id");String USER_AGE = json.optString("USER_AGE");User user = this.userService.selectByPrimaryKey(SecurityUserHolder.getCurrentUser(request).getId());if ((userName != null) && (!userName.equals(""))) {user.setTrueName(userName);}if ((USER_AGE != null) && (!USER_AGE.equals(""))) {user.setBirthday(CommUtil.formatDate(USER_AGE));}if ((nickName != null) && (!nickName.equals(""))) {user.setNickName(nickName);}if ((sex != null) && (!sex.equals(""))) {user.setSex(CommUtil.null2Int(sex));}if(StringUtils.isNotBlank(photo_id)){user.setPhoto_id(CommUtil.null2Long(photo_id));}this.userService.updateById(user);try{//腾讯IM账号资料更改UserDto userDto = new UserDto();BeanUtils.copyProperties(user, userDto);tencentIMFeignClient.portraitSet(userDto);}catch (Exception e) {logger.error("UserController >> account_saveEntity >> IM portraitSet  "+ e.getMessage());}return ResponseCode.buildSuccessMap(null);}/*** 手机客户端商城首页* @param request* @param response* @param store_id* @return*/@RequestMapping(value="/center", method = RequestMethod.POST)public Map<String, Object> center(HttpServletRequest request, HttpServletResponse response) {Map<String, Object> result = new HashMap<String, Object>();UserDto u = SecurityUserHolder.getCurrentUser(request);if ((u != null) && (!u.equals(""))) {User user = this.userService.selectByPrimaryKey(SecurityUserHolder.getCurrentUser(request).getId());if (user!=null&&user.getPhoto_id()!=null) {AccessoryDto photo = accessoryFeignClient.selectByPrimaryKey(user.getPhoto_id());user.setPhoto(photo);}int selectCount = footPointService.selectSumCount(user.getId());/*Map<String,Object> foot_params = Maps.newHashMap();foot_params.put("fp_user_id", user.getId());foot_params.put("deleteStatus", 0);//List<FootPoint> fps = footPointService.queryPageList(foot_params);//result.put("objs", fps);*/		result.put("footsize", selectCount);Map<String, Object> params = Maps.newHashMap();params.put("user_id", user.getId());params.put("status", Integer.valueOf(0));result.put("couponInfos",Integer.valueOf(couponInfoFeignClient.selectCount(params)));/*	params.clear();params.put("status", Integer.valueOf(10));params.put("user_id", user.getId().toString());result.put("orders_10",Integer.valueOf(orderFormFeignClient.selectCount(params)));*/// result.put("integralViewTools", this.integralViewTools);params.clear();params.put("type", Integer.valueOf(0));params.put("user_id", user.getId());int favorite_goods = favoriteService.selectCount(params);result.put("favorite_goods", favorite_goods);params.clear();params.put("type", Integer.valueOf(1));params.put("user_id", user.getId());result.put("favorite_store",favoriteService.selectCount(params));params.clear();params.put("order_status", Integer.valueOf(10));params.put("user_id", user.getId().toString());//params.put("order_main", Integer.valueOf(1));//List<OrderFormDto> order_nopays = orderFormFeignClient.queryPageList(params);Integer order_nopays = orderFormFeignClient.selectCount(params);String order_nopay = "";if (order_nopays > 99) {order_nopay = "99+";} else {order_nopay = order_nopays + "";}result.put("order_nopay", order_nopay);params.clear();params.put("order_status1", Integer.valueOf(14));params.put("order_status2", Integer.valueOf(20));params.put("user_id", user.getId().toString());//params.put("order_main", Integer.valueOf(1));//List<OrderFormDto> order_noships = orderFormFeignClient.queryPageList(params);Integer order_noships = orderFormFeignClient.selectCount(params);String order_noship = "";if (order_noships > 99) {order_noship = "99+";} else {order_noship = order_noships + "";}result.put("order_noship", order_noship);params.clear();params.put("order_status1", Integer.valueOf(30));params.put("order_status2", Integer.valueOf(35));params.put("user_id", user.getId().toString());//params.put("order_main", Integer.valueOf(1));//List<OrderFormDto> order_notakes = orderFormFeignClient.queryPageList(params);Integer order_notakes = orderFormFeignClient.selectCount(params);String order_notake = "";if (order_notakes > 99) {order_notake = "99+";} else {order_notake = order_notakes + "";}result.put("order_notake", order_notake);params.clear();params.put("order_status", Integer.valueOf(40));params.put("user_id", user.getId().toString());Integer order_noevaluate = orderFormFeignClient.selectCount(params);String noevaluate = "0";if (order_noevaluate > 99) {noevaluate = "99+";} else {noevaluate = order_noevaluate + "";}result.put("noevaluate", noevaluate);params.clear();/*	params.put("status", Integer.valueOf(0));params.put("user_id", user.getId());params.put("parent", -1);List<MessageDto> msgs  = messageFeignClient.queryPageList(params);result.put("msg_size", msgs.get(0));*/result.put("user", user);// result.put("integralViewTools", this.integralViewTools);result.put("level", integralToolsFeignClient.query_user_level(String.valueOf(user.getId())));Integer	store_status=0;if (user.getStore_id()!=null) {StoreDto store = storeFeignClient.selectByPrimaryKey(user.getStore_id());if (store!=null) {store_status = store.getStore_status();ModularClassDto ModularClassDto = modularClassFeignClient.selectByStoreId(store.getId());if (ModularClassDto!=null) {result.put("timely", ModularClassDto.isTimely());}else{result.put("timely",false);}}}result.put("store_status", store_status);//是否是代理商(业务员:推荐开店能获取店铺收益的那种)Integer platAgent = userService.agentCount(user.getId());result.put("platAgent", platAgent);}return ResponseCode.buildSuccessMap(result);}/*** 个人二维码* @param request* @param response* @return* @throws Exception */@RequestMapping(value="/buyer/myQrcode", method = RequestMethod.GET)public Map<String, Object> myQrcode(HttpServletRequest request,HttpServletResponse response) throws Exception {UserDto userDto = SecurityUserHolder.getCurrentUser(request);User user = userService.selectByPrimaryKey(userDto.getId());if(StringUtils.isEmpty(user.getDirect_selling_qr_path())) {if(null != user.getPhoto_id()){user.setPhoto(accessoryFeignClient.selectByPrimaryKey(user.getPhoto_id()));}BeanUtils.copyProperties(user, userDto);// 生成用户分销二维码String myQrcode = qrCodeFeignClient.myQrcode(userDto);user.setDirect_selling_qr_path(myQrcode);userService.updateById(user);}return ResponseCode.buildSuccessMap(user.getDirect_selling_qr_path());}/*** 用户中心支付密码修改* @param request* @param response* @return@RequestMapping(value="/buyer/account_pay_password", method = RequestMethod.GET)public Map<String, Object> account_pay_password(HttpServletRequest request,HttpServletResponse response) {Map<String, Object> result = new HashMap<String, Object>();User user = this.userService.selectByPrimaryKey(SecurityUserHolder.getCurrentUser().getId());result.put("user", user);if ((user.getMobile() != null) && (!user.getMobile().equals(""))) {String show_tel = user.getMobile();result.put("show_tel", show_tel);result.put("first", Integer.valueOf(-1));} else {result.put("first", "1");}return ResponseCode.buildSuccessMap(result);}*//*** 修改支付密码提交* @param request* @param response* @param pay_password* @param pay_password_confirm* @param phone_number* @param code* @param t* @return*/@RequestMapping(value="/buyer/account_pay_password_save", method = RequestMethod.POST)public Map<String, Object> account_pay_password_saveEntity(HttpServletRequest request,HttpServletResponse response, String pay_password, String pay_password_confirm, String phone_number, String code) {Map<String, Object> result = new HashMap<String, Object>();if(null == code || StringUtils.isEmpty(code)){result.put("op_title", "验证码不能为空,支付密码修改失败");result.put("url", CommUtil.getURL(request) + "/buyer/account_pay_password");return ResponseCode.buildCodeMap("20004", "不要做违规操作,超过一定次数将冻结预存款", result);}VerifyCodeDto vc = verifyCodeFeignClient.getObjByProperty("mobile", "=",  phone_number);if (vc == null) {result.put("op_title", "不要做违规操作,超过一定次数将冻结预存款");result.put("url", CommUtil.getURL(request) + "/buyer/account_pay_password");return ResponseCode.buildCodeMap("20003", "不要做违规操作,超过一定次数将冻结预存款", result);} if (!code.equalsIgnoreCase(vc.getCode())) {result.put("op_title", "验证码错误,支付密码修改失败");result.put("url", CommUtil.getURL(request) + "/buyer/account_pay_password");return ResponseCode.buildCodeMap("20002", "验证码错误,支付密码修改失败", result);}if (StringUtils.isEmpty(pay_password) || StringUtils.isEmpty(pay_password_confirm)|| !StringUtils.equals(pay_password, pay_password_confirm)){result.put("op_title", "两次密码输入不相同");result.put("url", CommUtil.getURL(request) + "/buyer/account_pay_password");return ResponseCode.buildCodeMap("20001", "两次密码输入不相同", result);}User user = this.userService.selectByPrimaryKey(SecurityUserHolder.getCurrentUser(request).getId());user.setMobile(phone_number);user.setPay_password(Md5Encrypt.md5(pay_password));this.userService.updateById(user);result.put("op_title", "支付密码修改成功");result.put("url", CommUtil.getURL(request) + "/index");return ResponseCode.buildSuccessMap(result);}/**手机短信密码修改 TODO:(小程序没有* @param request* @param response* @param password  密码* @param mobile  手机号* @param mobile_code  验证码* @return*//*@RequestMapping({ "/mobile_account_password_save" })@ResponseBodypublic String mobile_account_password_save(HttpServletRequest request,HttpServletResponse response,String password,String mobile ,String mobile_code,String password_or) {if(mobile == null || "".equals(mobile)){return "403";}if(mobile_code == null || "".equals(mobile_code)){return "404";}Jedis jedis = RedisCache.getJedis();if(jedis.exists(SerializeUtil.serialize(mobile))){byte[] bs = jedis.get(SerializeUtil.serialize(mobile));Object deserialize = SerializeUtil.deserialize(bs);if(deserialize != null){if(!CommUtil.null2String(mobile_code).equals(deserialize.toString())){return "402";}}}else{return "401";}if(jedis != null){jedis.close();}if(password != null && password_or != null){if(password.equals(password_or)){if(!CommUtil.null2String(mobile).equals("")){List<User> users=this.userService.selectByMobileOrUserName(mobile);if(users != null && users.size() > 0){User user = users.get(0);user.setPassword(Md5Encrypt.md5(password));this.userService.updateById(user);}else{return "400";}}}else{return "406";}}else{return "405";}return "200";}*//*	*//*** 修改支付密码-手机短信发送* @param request* @param response* @param mobile*//*@RequestMapping(value="/buyer/account_mobile_sms", method = RequestMethod.POST)public Map<String, Object> account_mobile_sms(HttpServletRequest request,HttpServletResponse response, String mobile) {SysConfigDto sysConfigDto = sysConfigFeignClient.getSysConfig();if (!sysConfigDto.getSmsEnbale()) {return ResponseCode.buildCodeMap("20002", "短信服务未开启", null);}String code = CommUtil.randomInt(4);String content = "尊敬的" + SecurityUserHolder.getCurrentUser(request).getUserName()+ "您好,您在试图修改" + sysConfigDto.getWebsiteName() + "的支付密码," + "手机验证码为:" + code + "。[" + sysConfigDto.getTitle() + "]";boolean ret_op = msgToolsFeignClient.sendSMS(mobile, content);if (!ret_op) {return ResponseCode.buildCodeMap("20001", "发送短信失败", null);}VerifyCodeDto mvc = verifyCodeFeignClient.getObjByProperty("mobile","=",  mobile);if (mvc == null) {mvc = new VerifyCodeDto();}mvc.setAddTime(new Date());mvc.setCode(code);mvc.setMobile(mobile);verifyCodeFeignClient.updateById(mvc);return ResponseCode.buildSuccessMap(null);}*//*** 修改绑定手机* @param request* @param response* @return@RequestMapping(value="/buyer/account_mobile_bind", method = RequestMethod.POST)public Map<String, Object> account_mobile_password(HttpServletRequest request,HttpServletResponse response) {Map<String, Object> result = new HashMap<String, Object>();User user = this.userService.selectByPrimaryKey(SecurityUserHolder.getCurrentUser().getId());if ((user.getMobile() != null) && (!user.getMobile().equals(""))) {String show_tel = user.getMobile().substring(0, 3) + "*****"+ user.getMobile().substring(8, 11);result.put("show_tel", show_tel);result.put("first", "-1");} else {result.put("first", "1");}return ResponseCode.buildSuccessMap(result);}*//**//*** 手机号码绑定提交* @param request* @param response* @param code* @param new_mobile* @param t* @return* @throws Exception*//*@RequestMapping(value="/buyer/account_mobile_bind_save", method = RequestMethod.POST)public Map<String, Object> account_mobile_bind_saveEntity(HttpServletRequest request,HttpServletResponse response, String code, String new_mobile,String t) throws Exception {Map<String, Object> result = new HashMap<String, Object>();if (StringUtils.isEmpty(code)) {result.put("op_title", "验证码不能为空,支付密码修改失败");result.put("url", CommUtil.getURL(request) + "/buyer/account_mobile_bind");return ResponseCode.buildCodeMap("20004", "验证码不能为空,支付密码修改失败", result);}VerifyCodeDto mvc = verifyCodeFeignClient.getObjByProperty("mobile","=",  new_mobile);if (mvc == null) {result.put("op_title", "请填写正确的验证码和手机号码,手机绑定失败");result.put("url", CommUtil.getURL(request) + "/buyer/account_mobile_bind");return ResponseCode.buildCodeMap("20003", "请填写正确的验证码和手机号码,手机绑定失败", result);}if (!StringUtils.equals(mvc.getCode(), code)) {result.put("op_title", "验证码错误,手机绑定失败");result.put("url", CommUtil.getURL(request) + "/buyer/account_mobile_bind");return ResponseCode.buildCodeMap("20002", "验证码错误,手机绑定失败", result);}User user = this.userService.selectByPrimaryKey(SecurityUserHolder.getCurrentUser(request).getId());if (new_mobile.equals(user.getMobile())) {result.put("op_title", "新旧输入电话号码不能相同,手机绑定失败");result.put("url", CommUtil.getURL(request) + "/buyer/account_mobile_bind");return ResponseCode.buildCodeMap("20001", "新旧输入电话号码不能相同,手机绑定失败", result);}user.setMobile(new_mobile);this.userService.updateById(user);verifyCodeFeignClient.deleteById(mvc.getId());result.put("op_title", "手机绑定成功");String content = "尊敬的" + SecurityUserHolder.getCurrentUser(request).getUserName() + "您好,您于" + CommUtil.formatLongDate(new Date())+ "绑定手机号成功。["+ sysConfigFeignClient.getSysConfig().getTitle() + "]";msgToolsFeignClient.sendSMS(user.getMobile(), content);result.put("op_title", "手机绑定成功");result.put("url", CommUtil.getURL(request) + "/buyer/account_safe");return ResponseCode.buildSuccessMap(result);}*//*** 手机绑定短信发送* @param request* @param response* @param new_mobile* @param t*//*@RequestMapping(value="/buyer/account_mobile_bind_sms", method = RequestMethod.POST)public Map<String, Object> account_mobile_bind_sms(HttpServletRequest request,HttpServletResponse response, String new_mobile) {SysConfigDto configDto = sysConfigFeignClient.getSysConfig();if (!configDto.getSmsEnbale()) {return ResponseCode.buildCodeMap("20002", "短信服务未开启", null);}String code = CommUtil.randomInt(4);String content = "";content = "尊敬的" + SecurityUserHolder.getCurrentUser(request).getUserName()+ "您好,您在试图修改" + configDto.getWebsiteName() + "的绑定手机号码," + "手机验证码为:" + code + "。[" + configDto.getTitle() + "]";boolean ret_op = msgToolsFeignClient.sendSMS(new_mobile, content);if (!ret_op) {return ResponseCode.buildCodeMap("20001", "发送短信失败", null);}VerifyCodeDto mvc = verifyCodeFeignClient.getObjByProperty("mobile","=",  new_mobile);if (mvc == null) {mvc = new VerifyCodeDto();}mvc.setAddTime(new Date());mvc.setCode(code);mvc.setMobile(new_mobile);verifyCodeFeignClient.updateById(mvc);return ResponseCode.buildSuccessMap(null);}*//*** 已有账号绑定保存* @param request* @param response* @param userName* @param password* @param mobile_verify_code* @param mobile*/@RequestMapping(value="/buyer/datum2", method = RequestMethod.POST)public Map<String, Object> datum2(HttpServletRequest request,HttpServletResponse response, String userName, String password,String mobile_verify_code, String mobile){Map<String, Object> result = new HashMap<String, Object>();VerifyCodeDto mvc = verifyCodeFeignClient.getObjByProperty("mobile","=",  mobile);if (mvc == null) {result.put("op_title", "请填写正确的验证码和手机号码,手机绑定失败");result.put("url", CommUtil.getURL(request) + "/buyer/account_mobile_bind");return ResponseCode.buildCodeMap("20003", "请填写正确的验证码和手机号码,手机绑定失败", result);}String passwd = Md5Encrypt.md5(password).toLowerCase();Map<String, Object> map = Maps.newHashMap();map.put("userName", userName);map.put("passwd", passwd);List<User> users = this.userService.queryPageList(map);if ((mvc != null) && (mvc.getCode().equalsIgnoreCase(mobile_verify_code))&& (users.size() > 0)) {User bind_user = (User) users.get(0);if (CommUtil.null2String(bind_user.getOpenId()).equals("")) {User current_user = this.userService.selectByPrimaryKey(SecurityUserHolder.getCurrentUser(request).getId());if (current_user != null) {bind_user.setOpenId(current_user.getOpenId());bind_user.setUserMark(null);this.userService.updateById(bind_user);Map<String,Object> json = Maps.newHashMap();json.put("login", Boolean.valueOf(true));json.put("userName", userName);json.put("passwd", passwd);json.put("userId", current_user.getId());return ResponseCode.buildSuccessMap(json);}}return ResponseCode.buildCodeMap("20001", "参数错误", null);} else {return ResponseCode.buildCodeMap("20002", "验证码错误", null);}}/*** 已有账号绑定保存错误提示* @param request* @param response* @return@RequestMapping(value="/buyer/datum_error", method = RequestMethod.GET)public Map<String, Object> datum_error(HttpServletRequest request,HttpServletResponse response) {Map<String, Object> result = new HashMap<String, Object>();result.put("op_title", "用户名或验证码输入错误!");result.put("url", CommUtil.getURL(request) + "/buyer/center");return ResponseCode.buildSuccessMap(result);}*/@RequestMapping(value = "/test", method = RequestMethod.POST)public ResponseVO login1( HttpServletRequest request){return MemberResponseCode.buildEnumResponseVO(MemberResponseCode.RESPONSE_CODE_USER_PASSWORD_NOT_EMPTY, null);}/*** 用户登录(WAP)* @param request* @return*/@RequestMapping(value = "/login", method = RequestMethod.POST)public ResponseVO login(@RequestBody JSONObject json, HttpServletRequest request){//获取数据String username = json.optString("username");String password = json.optString("password");//验证用户是否为空;if(StringUtils.isEmpty(username)){return MemberResponseCode.buildEnumResponseVO(MemberResponseCode.RESPONSE_CODE_USER_NAME_NOT_EMPTY, null);}//验证密码是否为空;if(StringUtils.isEmpty(password)){return MemberResponseCode.buildEnumResponseVO(MemberResponseCode.RESPONSE_CODE_USER_PASSWORD_NOT_EMPTY, null);}HashMap<String, Object> params = new HashMap<String, Object>();params.put("userName", username);List<User> User_list = userService.queryPageList(params);if(User_list == null||User_list.size()<1){return MemberResponseCode.buildEnumResponseVO(MemberResponseCode.RESPONSE_CODE_USER_DOES_NOT_EXIST, null);}User info = User_list.get(0);//判断用户是否禁用if( -1== info.getStatus()){return MemberResponseCode.buildEnumResponseVO(MemberResponseCode.RESPONSE_CODE_USER_NAME_IS_DISABLE, null);}//用户密码是否匹配if(!StringUtils.equals(Md5Encrypt.md5(password), info.getPassword())){return MemberResponseCode.buildEnumResponseVO(MemberResponseCode.RESPONSE_CODE_USER_PASSWORD_NOT_VALIDATE, null);}String token = JWT.sign(info.getId() + ";" + System.currentTimeMillis()+";"+"app", 0);// 将token存到redis中,有效期24小时 redisUtil.set(Globals.ANDROID_LOGIN_MARK + info.getId(), token, Globals.USER_INFO_EXPIRE_TIME);// 覆盖redis用户信息UserDto userDto = new UserDto();BeanUtils.copyProperties(info, userDto);redisUtil.set(Globals.USER_INFO_MARK + info.getId(), userDto, Globals.USER_INFO_EXPIRE_TIME);//加密用户名、密码 /* String token = JWT.sign(info.getId(), 0);//将用户名密码生成的token信息放入redis缓存redisUtil.set(Globals.WAP_LOGIN_MARK + info.getId(), token);*/Map<String, Object> result = new HashMap<String, Object>();//根据uid查询member信息User user = userService.selectByPrimaryKey(info.getId());/*if (user.getPhoto_id()!=null) {AccessoryDto accessoryDto = accessoryFeignClient.selectByPrimaryKey(user.getPhoto_id());if (accessoryDto!=null) user.setPhoto(accessoryDto);}*/result.put("userInfo", user);result.put("token", token);return ResponseCode.buildEnumResponseVO(ResponseCode.SUCCESS, result);}private static final String REGEX1 = "(.*管理员.*)";private static final String REGEX2 = "(.*admin.*)";/*** 注册完成* @param request* @param response* @param userName* @param password* @param email* @param code* @param user_type* @return* @throws HttpException* @throws IOException* @throws InterruptedException*/@RequestMapping(value="/register_finish", method = RequestMethod.POST)public Map<String, Object> register_finish(@RequestBody JSONObject json,HttpServletRequest request, HttpServletResponse response) throws HttpException, IOException, InterruptedException {// 获取数据String userName = json.optString("username");String password = json.optString("password");String user_type = json.optString("user_type");String directSellingParent_id = json.optString("directSellingParent_id");String email = json.optString("email");// 验证用户是否为空;if (StringUtils.isEmpty(userName)) {return ResponseCode.buildFailMap("10004", "参数错误");}// 验证密码是否为空;if (StringUtils.isEmpty(password)) {return ResponseCode.buildFailMap("10004", "参数错误");}SysConfigDto sysConfig = sysConfigFeignClient.getSysConfig();//查询是否有用户名HashMap<String, Object> map = new HashMap<String, Object>();map.put("userName", userName);List<User> User_list = userService.queryPageList(map);if (User_list.size() > 0) {return ResponseCode.buildFailMap("10003", "该用户名已注册");}try {boolean reg = true;if ((userName.matches(REGEX1)) || (userName.toLowerCase().matches(REGEX2))) {reg = false;}if (reg) {User user = new User();user.setUserName(userName);user.setUserRole("BUYER");user.setAddTime(new Date());user.setEmail(email);user.setAvailableBalance(BigDecimal.valueOf(0L));user.setFreezeBlance(BigDecimal.valueOf(0L));if (directSellingParent_id != null) {User directSellingParent = this.userService.selectByPrimaryKey(CommUtil.null2Long(directSellingParent_id));user.setDirectSellingParent(directSellingParent);}if ((user_type != null) && (!user_type.equals(""))) {user.setUser_type(CommUtil.null2Int(user_type));user.setContact_user(request.getParameter("contact_user"));user.setDepartment(request.getParameter("department"));user.setTelephone(request.getParameter("telephone"));user.setMobile(request.getParameter("mobile"));user.setCompany_name(request.getParameter("company_name"));AreaDto area = this.areaFeignClient.selectByPrimaryKey(CommUtil.null2Long(request.getParameter("area_id")));user.setCompany_address(area.getParent().getParent().getAreaName()+ area.getParent().getAreaName()+ area.getAreaName()+ " "+ request.getParameter("company_address"));if (request.getParameter("company_purpose") != null) {if (!request.getParameter("company_purpose").equals("")) {user.setCompany_purpose(request.getParameter("company_purpose").substring(0,request.getParameter("company_purpose").length() - 1));}}user.setCompany_url(request.getParameter("company_url"));user.setCompany_person_num(request.getParameter("company_person_num"));user.setCompany_trade(request.getParameter("company_trade"));user.setCompany_nature(request.getParameter("company_nature"));}user.setPassword(Md5Encrypt.md5(password).toLowerCase());Map<String, Object> params = Maps.newHashMap();params.put("type", "BUYER");List<Role> roles = this.roleService.queryPageList(params);this.userService.saveUserRole(user.getId(), roles);if (sysConfig.getIntegral()) {user.setIntegral(sysConfig.getMemberRegister());try {this.userService.saveEntity(user);} catch (Exception e) {e.printStackTrace();}IntegralLogDto log = new IntegralLogDto();log.setAddTime(new Date());log.setContent("用户注册增加"+ sysConfig.getMemberRegister() + "分");log.setIntegral(sysConfig.getMemberRegister());log.setIntegral_user_id(user.getId());log.setType("reg");integralLogFeignClient.saveEntity(log);} else {this.userService.saveEntity(user);}Album album = new Album();album.setAddTime(new Date());album.setAlbum_default(true);album.setAlbum_name("默认相册");album.setAlbum_sequence(55536);album.setUser_id(user.getId());this.albumService.saveEntity(album);return ResponseCode.buildSuccessMap(null);}return ResponseCode.buildFailMap("10001", "请求失败");} catch (Exception e) {}return ResponseCode.buildSuccessMap(null);}/**发送短信   (用户登录界面)* @param mobile* @return*/@RequestMapping(value ="/mobile_send", method = RequestMethod.POST)public Map<String, Object> mobile_send(@RequestBody JSONObject json) {// 获取数据String mobile = json.optString("mobile");String type = json.optString("type");if (mobile == null || "".equals(mobile)) {return ResponseCode.buildReturnMap(ResponseCode.RESPONSE_CODE_USER_MOBILE_OR_TELEPHONE_NOT_EMPTY,"联系方式不能为空");}/*	// 系统配置是否开启短信功能  (后面有做验证)SysConfigDto sysConfig = sysConfigFeignClient.getSysConfig();if (sysConfig.getSmsEnbale() == false) {return ResponseCode.buildReturnMap(ResponseCode.RESPONSE_CODE_SMS_CLOSE,"系统尚未开启短信服务");}*/// 短信模板(固定模板,一个是注册,一个登陆) 登录验证码String mark = "sms_tobuyer_user_login_notify"; // 后台短信模板登录标识if (CommUtil.null2String(type).equals("find")) {mark = "sms_tobuyer_find_password_notify"; // 重置密码} else if (CommUtil.null2String(type).equals("bind")) {mark = "sms_tobuyer_user_login_notify"; // 通用验证码} else {List<User> users = this.userService.selectByMobileOrUserName(mobile);// (手机号唯一),通过手机号(账号),查询用户if (users != null && users.size() > 0) {mark = "sms_tobuyer_user_login_notify"; // 登录验证码} else {mark = "sms_tobuyer_tips_notify";}}// 根据短信模板标识(固定)查询模板信息HashMap<String, Object> hashMap = new HashMap<String, Object>();hashMap.put("mark", mark); // 模板标识hashMap.put("open", 1); // 开启List<TemplateDto> templatedto_list = templateFeignClient.queryPageList(hashMap);if (templatedto_list.size()==0) {return ResponseCode.buildReturnMap(ResponseCode.RESPONSE_CODE_SMS_CLOSE,"系统尚未开启短信服务");}ThreadLocalRandom current = ThreadLocalRandom.current();int muber = current.nextInt(100000, 1000000);if (!redisUtil.existsHashKey("mobile", mobile)) {    //查询是否存在redisUtil.setHashvValueTimeout("mobile", mobile, muber, 5, TimeUnit.MINUTES);       //不存在,则创建,超时时间为5分钟//TODO(待修改,动态)  目前是阿里的内容String content = "{\"code\":\"" + muber + "\"}";msgToolsFeignClient.sendSMS(mobile,templatedto_list.get(0).getSms_mark(),content);     //发送短信请求} else {Object hashValue = redisUtil.getHashValue("mobile", mobile);String content = "{\"code\":\"" + hashValue.toString() + "\"}";msgToolsFeignClient.sendSMS(mobile, templatedto_list.get(0).getSms_mark(), content);}//RedisCache.removeObject(mobile);return ResponseCode.buildSuccessMap("短信已发送");}/**短信验证* @param mobile* @param code* @return*//*@RequestMapping({"/code_validate"})public String  code_validate(@RequestBody JSONObject json){String mobile = json.optString("mobile");String code = json.optString("code");if(mobile == null || "".equals(mobile)){return "404";}if(code == null || "".equals(code)){return "404";}Jedis jedis = RedisCache.getJedis();if(jedis.exists(SerializeUtil.serialize(mobile))){byte[] bs = jedis.get(SerializeUtil.serialize(mobile));Object deserialize = SerializeUtil.deserialize(bs);if(deserialize != null){if(CommUtil.null2String(code).equals(deserialize.toString())){return "200";}else{return "400";}}}if(jedis != null){jedis.close();}return "401";}*//**短信验证* @param mobile* @param code* @return*//*@RequestMapping({"/code_validate"})public  Boolean code_validate(String mobile,String code){if(mobile == null || "".equals(mobile)){return false;}if(code == null || "".equals(code)){return false;}Jedis jedis = RedisCache.getJedis();if(jedis.exists(SerializeUtil.serialize(mobile))){byte[] bs = jedis.get(SerializeUtil.serialize(mobile));Object deserialize = SerializeUtil.deserialize(bs);if(deserialize != null){if(CommUtil.null2String(code).equals(deserialize.toString())){RedisCache.removeObject(mobile);return true;}}}if(jedis != null){jedis.close();}return false;}*//*** 用户申请主播,* 已是主播则进行更换上级* @param request* @param response* @return*/@RequestMapping({ "/buyer/add_livecode" })public Map<String, Object> add_livecode(HttpServletRequest request, HttpServletResponse response,@RequestBody JSONObject json) {HashMap<String, Object> result = new HashMap<>();User user = userService.selectByPrimaryKey(SecurityUserHolder.getCurrentUserId(request));// 如果是审核通过的主播,则进行更换result.put("Is_live", user.getIs_live());// 是否是主播result.put("Live_code_up", user.getLive_code_up());result.put("goods_id", 502); // 增值服务商品idreturn ResponseCode.buildSuccessMap(result);}//进身份证验证页面@RequestMapping({ "/inLiveCode" })public Map<String, Object> inLiveCode(HttpServletRequest request, HttpServletResponse response) {UserDto userDto = SecurityUserHolder.getCurrentUser(request);if(userDto == null){return ResponseCode.buildEnumMap(ResponseCode.TOKEN_EXPIRE, null);}User currentUser = userService.selectByPrimaryKey(userDto.getId());HashMap<String, Object> result = new HashMap<>();result.put("is_live", currentUser.getIs_live());if(currentUser.getIs_live() == 1){VerifyidCard vc = verifyidCardService.selectByUserId(currentUser.getId());if(vc != null){result.put("vc", vc);}}return ResponseCode.buildSuccessMap(result);}/*** 校验邀请码(添加了身份证验证功能)* @param request* @param response* @return*/@RequestMapping({ "/checkLiveCode" })public Map<String, Object> checkLiveCode(HttpServletRequest request, HttpServletResponse response,@RequestBody JSONObject json) {String liveCode = json.optString("liveCode");String name = json.optString("name");String code = json.optString("code");String phone = json.optString("phone");Long img_id1 = json.optLong("img_id1");Long img_id2 = json.optLong("img_id2");Long img_id3 = json.optLong("img_id3");if(StringUtils.isBlank(name) || StringUtils.isBlank(code) || StringUtils.isBlank(phone) || img_id1 == null ||  img_id2 == null || img_id3 == null){return ResponseCode.buildEnumMap(ResponseCode.REQ_CANNOT_EMPTY, null);}if(StringUtils.isBlank(liveCode)){liveCode = "100000";}UserDto userDto = SecurityUserHolder.getCurrentUser(request);if(userDto == null){return ResponseCode.buildEnumMap(ResponseCode.TOKEN_EXPIRE, null);}HashMap<String, Object> result = new HashMap<>();User currentUser = userService.selectByPrimaryKey(userDto.getId());User user = userService.selectByLiveCode(CommUtil.null2Long(liveCode));//100086boolean isflag=false;if (user!=null) {  //不能是自己的邀请码并且这个邀请码存在currentUser.setLive_code_up(CommUtil.null2Long(liveCode));userService.updateById(currentUser);isflag=true;}result.put("check", isflag);result.put("goods_id", 502); // 增值服务商品idVerifyidCard vc = verifyidCardService.selectByUserId(currentUser.getId());boolean bol = false;if(vc == null){//保存用户身份证信息vc = new VerifyidCard();vc.setAddTime(new Date());vc.setDeleteStatus(0);bol = true;}vc.setName(name);vc.setCode(code);vc.setPhone(phone);vc.setImg_id1(img_id1);vc.setImg_id2(img_id2);vc.setImg_id3(img_id3);vc.setUid(currentUser.getId());if(bol){verifyidCardService.saveEntity(vc);}else{verifyidCardService.updateById(vc);}return ResponseCode.buildSuccessMap(result);}/*** 判断店铺是否开通主播(用户名+密码)* @param paraMap* @return 不为空表示已经开通*/@RequestMapping(value = "/apiForFeign/checkingAccount", method = RequestMethod.POST)public Long checkingAccount(@RequestBody Map<String, String> paraMap){String userName = paraMap.get("userName");String password = paraMap.get("password");User user = userService.selectByUserName(userName);if(user == null){return null;}if(!StringUtils.equals(password, user.getPassword())){return null;}if(user.getIs_live() != 2){return null;}return user.getId();}/*** 判断店铺是否开通主播(用户名)* @param paraMap* @return 不为空表示已经开通*/@RequestMapping(value = "/apiForFeign/checkingUserName", method = RequestMethod.POST)public Long checkingUserName(@RequestBody Map<String, String> paraMap){String userName = paraMap.get("userName");User user = userService.selectByUserName(userName);if(user == null){return null;}if(user.getIs_live() != 2){return null;}return user.getId();}/*** 根据用户名查询用户* @param username* @return*/@RequestMapping(value = "/apiForFeign/selectByUserName", method = RequestMethod.POST)public User selectByUserName(@RequestParam("userName")String userName){return userService.selectByUserName(userName);}//将邀请注册奖金提现到余额@RequestMapping(value ="/invProChangeBalance", method = RequestMethod.POST)public Map<String, Object> invProChangeBalance(HttpServletRequest request, HttpServletResponse response, @RequestBody JSONObject json) {String money = json.optString("money");if(StringUtils.isBlank(money)){return ResponseCode.buildEnumMap(ResponseCode.REQ_CANNOT_EMPTY, null);}UserDto user = SecurityUserHolder.getCurrentUser(request);if(user == null || user.getId() == null){return ResponseCode.buildEnumMap(ResponseCode.TOKEN_EXPIRE, null);}User inviter = userService.selectByPrimaryKey(user.getId());//判断是否超过额度if(new BigDecimal(money).compareTo(inviter.getInvitation_profit()) == 1){return ResponseCode.buildCodeMap("21001", "超过可转额度", null);}//判断金额是不是20的倍数Integer changeMoney = Integer.parseInt(money);if(changeMoney >= 0 && changeMoney%20 == 0){inviter.setInvitation_profit(inviter.getInvitation_profit().subtract(new BigDecimal(money)));BigDecimal before = inviter.getAvailableBalance();inviter.setAvailableBalance(inviter.getAvailableBalance().add(new BigDecimal(money)));userService.updateById(inviter);try{//添加记录PredepositLog log = new PredepositLog();log.setPd_log_user_id(inviter.getId());log.setPd_log_amount(new BigDecimal(money));log.setAmount_before(before);log.setAmount_after(inviter.getAvailableBalance());log.setAddTime(new Date());log.setDeleteStatus(0);log.setPd_log_info("邀请注册收益转余额");log.setPd_op_type("分销结算收益");log.setPd_type("可用预存款");predepositLogService.saveEntity(log);}catch (Exception e) {logger.error("UserController >> invProChangeBalance >> Exception:"+ e.getMessage());}}return ResponseCode.buildSuccessMap(true);}/*** 下单显示  (随机100个用户 )* @param request* @param response* @return*/@RequestMapping({ "/userIndex" })public Map<String, Object> userIndex(HttpServletRequest request, HttpServletResponse response) {//UserDto userDto = SecurityUserHolder.getCurrentUser(request);Map<String, Object> params = Maps.newHashMap();/*if (userDto!=null) {params.put("id_no", userDto.getId());}*/params.put("deleteStatus", 0);params.put("weixin_unionID_is_no", "weixin_unionID_is_no");// 总用户数量int selectCount = userService.selectCount(params);int c = 0;int nextInt =0;if (selectCount<100) {c=1;}else{c = (int) selectCount / 100;Random random = new Random();nextInt = random.nextInt(c);}HashMap<String, Object> result = new HashMap<>();// 用户列表//List<User> list = new ArrayList<User>();List<User> list = (List<User>) redisUtil.get("userIndexList");/*result.put("userIndexList", list);return ResponseCode.buildSuccessMap(result);*/if (null == list || list.size() < 1) {params.clear();params.put("start", nextInt);params.put("weixin_unionID_is_no", "weixin_unionID_is_no");list = userService.listIndex(params);//设置成一天过期long oneday=24*60*60;redisUtil.set("userIndexList", list,oneday);result.put("userIndexList", list);} else {result.put("userIndexList", list);}return ResponseCode.buildSuccessMap(result);}/*** 查看用户是否有公众号openid (没有则去鱼易库里查,在没有就提示给前端)* @param request* @param response* @return*//*@RequestMapping({ "/buyer/selectWxOpenId" })public Map<String, Object> selectWxOpenId(HttpServletRequest request, HttpServletResponse response,@RequestBody JSONObject json) {HashMap<String, Object> result = new HashMap<>();User user = userService.selectByPrimaryKey(SecurityUserHolder.getCurrentUserId(request));if(user==null){// 用户不存在return ResponseCode.buildFailMap("用户不存在", null);}boolean isfalg=false;String openid=user.getWx_open_id();//为空则去鱼易数据库查if(StringUtils.isEmpty(openid)){JSONObject paramJson = new JSONObject();paramJson.put("username", user.getMobile());String data =  "";try {// 加密datadata = AESUtil.getInstance().Encrypt(paramJson.toString(), AESUtil.akk_secret);} catch (Exception e) {log.error("加密请求参数出错,错误信息"+Exceptions.getStackTraceAsString(e));}Map<String,String> params = new HashMap<String, String>();params.put("data", data);String url = "https://www.fishmq.cn/apply/synchroOpenid";String result1 = HttpClientUtils.doPostReturn(url, params, "application/json; charset=UTF-8"); //UTF-8//{"msg":"您的账号未绑定渔易水产科技公众号","code":500}Map map = (Map)JSON.parse(result1);Integer code = (Integer)map.get("code");if(code == 200){openid=(String) map.get("msg");isfalg=true;//将openid 保存进用户表user.setWx_open_id(openid);userService.updateById(user);}}//如果openid还为空则返回false,需要用户关注公众号result.put("isfalg", isfalg);return ResponseCode.buildSuccessMap(result);}*/@RequestMapping(value = "/logoff", method = RequestMethod.POST)public Map<String,Object> logoff(HttpServletRequest request,@RequestBody JSONObject json){UserDto currentUser = SecurityUserHolder.getCurrentUser(request);User user = this.userService.selectByPrimaryKey(currentUser.getId());// 注销用户user.setUserName("logoff_" + user.getUserName());user.setMobile("logoff_" + user.getMobile());user.setStatus(-2);user.setWeixin_unionID("logoff_"+user.getWeixin_unionID());user.setOpenId("logoff_"+user.getOpenId());user.setWx_open_id("logoff_"+user.getWx_open_id());user.setDeleteStatus(1);// 修改登录信息user.setLastLoginDate(new Date());user.setLastLoginIp(CommUtil.getIpAddr(request));userService.updateById(user);// 将token删除redisUtil.remove(Globals.ANDROID_LOGIN_MARK + user.getId());// 返回结果集return ResponseCode.buildSuccessMap(new HashMap<>());}}
@源码地址来源: https://minglisoft.cn/honghu2/business.html

查看全文
如若内容造成侵权/违法违规/事实不符,请联系编程学习网邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!

相关文章

  1. 艾库尔解读大厂元宇宙布局

    2022年1月10日&#xff0c;西部证券发布了题为"元宇宙会是互联网下一个方向吗&#xff1f;”的分析报告&#xff0c;报告中以案例讲解的方式分析了包括腾讯、百度、芒果超媒等媒体大厂在元宇宙板块的布局战略。   根据报告&#xff0c;大厂在元宇宙的布局分为虚拟人和虚…...

    2024/4/5 4:20:32
  2. spring常见用法之安全模块(注册登录模块)

    安全是非常重要的&#xff01;&#xff01;&#xff01; 1.1依赖&#xff1a;我们构建Web类型的安全项目时&#xff0c;spring-security-config、spring-security-core、spring-security-web三个依赖都是必须添加的。 1.2 注册时加密存如DB Autowired private PasswordEncod…...

    2024/4/15 5:48:35
  3. 电子书沦为“压泡面”神器,其实高端电子书就该从这两个里边选

    相比于纸质图书&#xff0c;电子书带来的好处显而易见&#xff0c;首先电子书携带十分方便&#xff0c;查找书籍内容的速度也很快&#xff0c;如果觉得字体太小&#xff0c;还可以调整放大。而且电子书的内部存储空间十分充足&#xff0c;可以下载成千上万本书。不受空间时间限…...

    2024/4/14 6:32:53
  4. Unity UGUI Batches合批规则详解

    Unity UGUI Batches合批规则详解 在处理UGUI DrawCall问题的时候&#xff0c;我们经常遇到各式各样的问题。 问题1&#xff1a;在处理UGUI合批的时候&#xff0c;发现了一个面板父节点发生旋转&#xff0c;底下的UI合批顺序会被打乱。 更多问题见知乎&#xff1a;UGUI 3D界面/…...

    2024/4/7 16:33:09
  5. Vue 中 $listeners 的使用方法

    $listeners 的官方介绍&#xff1a; 包含了父作用域中的 (不含 .native 修饰器的) v-on 事件监听器。它可以通过 v-on"$listeners" 传入内部组件——在创建更高层次的组件时非常有用。 下面代码中包含一个子组件和一个父组件&#xff0c;子组件需要调用父组件中的方…...

    2024/4/17 10:05:38
  6. MongoDB——常用命令

    小黄自我修炼之Mongo篇&#xff0c;课程视频来自于黑马程序员 点击跳转 关于Mongo的简介和安装网上一搜一大堆&#xff0c;小黄的博客用来记录如何使用Mongo 本文的例子来自于现实中出现的情况&#xff1a;文章评论功能&#xff0c;自始至终都会贯彻这个例子 MongoDB常用命令 …...

    2024/4/18 0:52:47
  7. 耶鲁博弈论 第1节 导论——五个入门结论

    耶鲁博弈论 第1节 导论——五个入门结论 本系列笔记来自耶鲁博弈论&#xff0c;课程视频来自b站耶鲁大学&#xff1a;博弈论&#xff0c;笔记不定期更新。 一、开胃菜——成绩博弈 开场游戏&#xff1a;你和你的同桌在完全不知情的情况下&#xff0c;填写自己的成绩 ααα 和 …...

    2024/4/18 15:22:03
  8. 学了计算机后的觉悟:劝退别人学计算机的人,都不是好人。

    今天在知乎看到了这个话题&#xff0c;说真的&#xff0c;我愣住了&#xff1a; 校招总包一年接近 40w&#xff0c;不得不说&#xff0c;计算机 yyds&#xff01; 回想这几年&#xff0c;似乎每一年的校招薪资开奖之后&#xff0c;都会引起一波热议&#xff0c;每年都是再创新…...

    2024/4/7 16:33:04
  9. Ubuntu 20.04安装VTK

    今天安装了VTK 8.1.0&#xff0c;过程记录如下&#xff1a; 因为之前没有安装过&#xff0c;所以找了一个比较基础的教程&#xff0c;链接如下&#xff1a; vtk在linux下的安裝&#xff08;12月8日更新&#xff09; - IT閱讀https://www.itread01.com/content/1547814967.htm…...

    2024/4/14 6:32:18
  10. wireshark之文件还原

    目录预备知识实验目的实验环境实验步骤一实验步骤二实验步骤三预备知识 Wireshark的功能上来看&#xff0c;只是监听网络流量信息并完整的记录下来&#xff0c;起到还原现场的作用。Winhex是一款非常优秀的16进制收费的编辑器。本节使用的是winhex的评估版本&#xff0c;可以满…...

    2024/4/15 12:02:20
  11. 基于pandas的成绩分析可视化

    文章目录各科目挂科人数分析各科挂科人数占比及各班挂科人数各班绩点分布班级平均绩点单人挂科数量分析最终成绩分析报告期末考试结束&#xff0c;辅导员让我做个成绩分析&#xff0c;于是就简单的写个python做做&#xff0c;写的很乱&#xff0c;将就看吧。用到了pandas&#…...

    2024/4/14 6:32:18
  12. MPLS BGP 跨域方案A

    应用场景 当公司地理位置跨度较大&#xff0c;跨多个运营商时就需要使用跨域技术解决路由传递问题 例如北方主要使用联通网络&#xff0c;南方主要使用电信网络&#xff0c;如果两个公司一个在北京一个在广东就需要使用到跨域方案解决MPLS BGP路由传递问题 一、option A方案…...

    2024/4/18 6:48:01
  13. 如何通过Facebook营销引流到博客

    相信大部分用户在使用Facebook时&#xff0c;都在考虑如何用Facebook营销引入更大的流量&#xff0c;毕竟博客要是可以被分享、访问、评论&#xff0c;都是可以帮助排名有相应的提升。 利用视频将你的博客活跃起来 制作短视频&#xff0c;就算视频时间较长也尽量不要超过三分钟…...

    2024/4/14 6:32:48
  14. Android安卓开发-Helloworld

    安装Android Studio教程 https://blog.csdn.net/aiqq136/article/details/122663018 Helloworld 新建项目 Name项目名字 Package name包名&#xff1a;一般为网址倒写 Save location保存位置 Language使用语言 Minimum SDK最低版本支持 创建自己的虚拟设备 下载安卓镜像 使用…...

    2024/4/14 6:32:53
  15. CRM系统的职能作用

    数字化浪潮中有的企业顺势而为&#xff0c;在数字浪潮中精准转型&#xff0c;推动了企业的稳定发展。然而也有的企业在数字化浪潮中迷失方向&#xff0c;寸步难行。值得注意的是数字化浪潮中企业客户关系模式发生了很大的变化&#xff0c;唯有赢得客户才能获得市场。然而要想获…...

    2024/4/19 9:15:46
  16. CRM系统流程标准化管理

    时代不断发展的背景下&#xff0c;推动了企业朝着信息化、科技化的趋势发展。企业要想实现转型&#xff0c;就必须掌握相关的管理系统&#xff0c;才能优化内部管理&#xff0c;实现企业转型。而CRM系统能够帮助搜集相关数据信息&#xff0c;自动生成可视化报告&#xff0c;为企…...

    2024/4/7 16:32:56
  17. Edge使用功能整理(参考地址在下面)

    文章目录只读模式&#xff08;考试作弊&#xff09;页面源码模式&#xff08;你懂得&#xff09;数学求解器&#xff08;本人不用&#xff09;PDF文件文本朗读&#xff08;这个一定要用&#xff09;垂直标签页&#xff08;整洁&#xff09;几个常用快捷键快速关闭当前页关闭浏览…...

    2024/4/14 6:32:18
  18. 软考系统集成项目管理工程师模拟题

    《中国制造2025》在战略任务和重点中提出“推进信息化与工业化深度融合”&#xff0c;其中()的工作内容包括在重点领域试点建设智能工厂/数字化车间&#xff0c;加快人机智能交互、工业机器人、智能物流管理等技术和装备在生产过程中的应用&#xff0c;促进制造工艺的仿真优化、…...

    2024/4/18 12:29:59
  19. 记一次晋升

    俗话说&#xff1a;不打无准备的仗。既然要去打&#xff0c;就要准备的充分。 从12月20几号询问到这次有机会去晋升。但是不一定成功。于是就开始准备材料&#xff0c;越早越好毕竟。 对着材料的模板&#xff0c;发现平时做的东西&#xff0c;没几个能写上去的&#xff0c;业务…...

    2024/4/19 20:36:35
  20. 阿里云MaxComputer SQL学习之内置函数

    &#x1f638;在上一节中&#xff0c;我们学习了MaxComputer SQL的DML语言&#xff0c;并用DataWork给大家演示了一遍&#xff0c;今天我们进入内置函数的学习&#xff0c;这一部分中&#xff0c;我们接触到的内置函数比较多&#xff0c;大家只要记住一些常用的&#xff0c;其他…...

    2024/4/14 6:33:34

最新文章

  1. C++运算符重载和日期类的实现

    运算符重载 参数个数与操作个数应该一致(双目操作符就是2个参数,同时参数中包括this) 不能被重载的运算符 " .* "运算符的作用 .*就是用来调用成员函数指针的 调用 1.显式调用 运算符重载可以显式调用 eg. 2.转换调用 运算符重载增强了程序的可读性 bool operato…...

    2024/4/19 21:57:26
  2. 梯度消失和梯度爆炸的一些处理方法

    在这里是记录一下梯度消失或梯度爆炸的一些处理技巧。全当学习总结了如有错误还请留言&#xff0c;在此感激不尽。 权重和梯度的更新公式如下&#xff1a; w w − η ⋅ ∇ w w w - \eta \cdot \nabla w ww−η⋅∇w 个人通俗的理解梯度消失就是网络模型在反向求导的时候出…...

    2024/3/20 10:50:27
  3. JVM笔记

    1.JVM与Java体系结构 1.1. 前言 作为Java工程师的你曾被伤害过吗&#xff1f;你是否也遇到过这些问题&#xff1f; 运行着的线上系统突然卡死&#xff0c;系统无法访问&#xff0c;甚至直接OOM想解决线上JVM GC问题&#xff0c;但却无从下手新项目上线&#xff0c;对各种JVM…...

    2024/4/19 11:46:53
  4. 2024 年高效开发的 React 生态系统

    要使用 React 制作应用程序&#xff0c;需要熟悉正确的库来添加您需要的功能。例如&#xff0c;要添加某个功能&#xff08;例如身份验证或样式&#xff09;&#xff0c;您需要找到一个好的第三方库来处理它。 在这份综合指南中&#xff0c;我将向您展示我建议您在 2024 年使用…...

    2024/4/16 21:54:03
  5. 【外汇早评】美通胀数据走低,美元调整

    原标题:【外汇早评】美通胀数据走低,美元调整昨日美国方面公布了新一期的核心PCE物价指数数据,同比增长1.6%,低于前值和预期值的1.7%,距离美联储的通胀目标2%继续走低,通胀压力较低,且此前美国一季度GDP初值中的消费部分下滑明显,因此市场对美联储后续更可能降息的政策…...

    2024/4/19 14:24:02
  6. 【原油贵金属周评】原油多头拥挤,价格调整

    原标题:【原油贵金属周评】原油多头拥挤,价格调整本周国际劳动节,我们喜迎四天假期,但是整个金融市场确实流动性充沛,大事频发,各个商品波动剧烈。美国方面,在本周四凌晨公布5月份的利率决议和新闻发布会,维持联邦基金利率在2.25%-2.50%不变,符合市场预期。同时美联储…...

    2024/4/19 18:20:22
  7. 【外汇周评】靓丽非农不及疲软通胀影响

    原标题:【外汇周评】靓丽非农不及疲软通胀影响在刚结束的周五,美国方面公布了新一期的非农就业数据,大幅好于前值和预期,新增就业重新回到20万以上。具体数据: 美国4月非农就业人口变动 26.3万人,预期 19万人,前值 19.6万人。 美国4月失业率 3.6%,预期 3.8%,前值 3…...

    2024/4/19 11:57:31
  8. 【原油贵金属早评】库存继续增加,油价收跌

    原标题:【原油贵金属早评】库存继续增加,油价收跌周三清晨公布美国当周API原油库存数据,上周原油库存增加281万桶至4.692亿桶,增幅超过预期的74.4万桶。且有消息人士称,沙特阿美据悉将于6月向亚洲炼油厂额外出售更多原油,印度炼油商预计将每日获得至多20万桶的额外原油供…...

    2024/4/19 11:57:31
  9. 【外汇早评】日本央行会议纪要不改日元强势

    原标题:【外汇早评】日本央行会议纪要不改日元强势近两日日元大幅走强与近期市场风险情绪上升,避险资金回流日元有关,也与前一段时间的美日贸易谈判给日本缓冲期,日本方面对汇率问题也避免继续贬值有关。虽然今日早间日本央行公布的利率会议纪要仍然是支持宽松政策,但这符…...

    2024/4/19 11:57:52
  10. 【原油贵金属早评】欧佩克稳定市场,填补伊朗问题的影响

    原标题:【原油贵金属早评】欧佩克稳定市场,填补伊朗问题的影响近日伊朗局势升温,导致市场担忧影响原油供给,油价试图反弹。此时OPEC表态稳定市场。据消息人士透露,沙特6月石油出口料将低于700万桶/日,沙特已经收到石油消费国提出的6月份扩大出口的“适度要求”,沙特将满…...

    2024/4/19 11:57:53
  11. 【外汇早评】美欲与伊朗重谈协议

    原标题:【外汇早评】美欲与伊朗重谈协议美国对伊朗的制裁遭到伊朗的抗议,昨日伊朗方面提出将部分退出伊核协议。而此行为又遭到欧洲方面对伊朗的谴责和警告,伊朗外长昨日回应称,欧洲国家履行它们的义务,伊核协议就能保证存续。据传闻伊朗的导弹已经对准了以色列和美国的航…...

    2024/4/19 11:58:14
  12. 【原油贵金属早评】波动率飙升,市场情绪动荡

    原标题:【原油贵金属早评】波动率飙升,市场情绪动荡因中美贸易谈判不安情绪影响,金融市场各资产品种出现明显的波动。随着美国与中方开启第十一轮谈判之际,美国按照既定计划向中国2000亿商品征收25%的关税,市场情绪有所平复,已经开始接受这一事实。虽然波动率-恐慌指数VI…...

    2024/4/19 11:58:20
  13. 【原油贵金属周评】伊朗局势升温,黄金多头跃跃欲试

    原标题:【原油贵金属周评】伊朗局势升温,黄金多头跃跃欲试美国和伊朗的局势继续升温,市场风险情绪上升,避险黄金有向上突破阻力的迹象。原油方面稍显平稳,近期美国和OPEC加大供给及市场需求回落的影响,伊朗局势并未推升油价走强。近期中美贸易谈判摩擦再度升级,美国对中…...

    2024/4/19 11:58:32
  14. 【原油贵金属早评】市场情绪继续恶化,黄金上破

    原标题:【原油贵金属早评】市场情绪继续恶化,黄金上破周初中国针对于美国加征关税的进行的反制措施引发市场情绪的大幅波动,人民币汇率出现大幅的贬值动能,金融市场受到非常明显的冲击。尤其是波动率起来之后,对于股市的表现尤其不安。隔夜美国股市出现明显的下行走势,这…...

    2024/4/19 11:58:39
  15. 【外汇早评】美伊僵持,风险情绪继续升温

    原标题:【外汇早评】美伊僵持,风险情绪继续升温昨日沙特两艘油轮再次发生爆炸事件,导致波斯湾局势进一步恶化,市场担忧美伊可能会出现摩擦生火,避险品种获得支撑,黄金和日元大幅走强。美指受中美贸易问题影响而在低位震荡。继5月12日,四艘商船在阿联酋领海附近的阿曼湾、…...

    2024/4/19 11:58:51
  16. 【原油贵金属早评】贸易冲突导致需求低迷,油价弱势

    原标题:【原油贵金属早评】贸易冲突导致需求低迷,油价弱势近日虽然伊朗局势升温,中东地区几起油船被袭击事件影响,但油价并未走高,而是出于调整结构中。由于市场预期局势失控的可能性较低,而中美贸易问题导致的全球经济衰退风险更大,需求会持续低迷,因此油价调整压力较…...

    2024/4/19 18:09:34
  17. 氧生福地 玩美北湖(上)——为时光守候两千年

    原标题:氧生福地 玩美北湖(上)——为时光守候两千年一次说走就走的旅行,只有一张高铁票的距离~ 所以,湖南郴州,我来了~ 从广州南站出发,一个半小时就到达郴州西站了。在动车上,同时改票的南风兄和我居然被分到了一个车厢,所以一路非常愉快地聊了过来。 挺好,最起…...

    2024/4/19 11:59:15
  18. 氧生福地 玩美北湖(中)——永春梯田里的美与鲜

    原标题:氧生福地 玩美北湖(中)——永春梯田里的美与鲜一觉醒来,因为大家太爱“美”照,在柳毅山庄去寻找龙女而错过了早餐时间。近十点,向导坏坏还是带着饥肠辘辘的我们去吃郴州最富有盛名的“鱼头粉”。说这是“十二分推荐”,到郴州必吃的美食之一。 哇塞!那个味美香甜…...

    2024/4/19 11:59:23
  19. 氧生福地 玩美北湖(下)——奔跑吧骚年!

    原标题:氧生福地 玩美北湖(下)——奔跑吧骚年!让我们红尘做伴 活得潇潇洒洒 策马奔腾共享人世繁华 对酒当歌唱出心中喜悦 轰轰烈烈把握青春年华 让我们红尘做伴 活得潇潇洒洒 策马奔腾共享人世繁华 对酒当歌唱出心中喜悦 轰轰烈烈把握青春年华 啊……啊……啊 两…...

    2024/4/19 11:59:44
  20. 扒开伪装医用面膜,翻六倍价格宰客,小姐姐注意了!

    原标题:扒开伪装医用面膜,翻六倍价格宰客,小姐姐注意了!扒开伪装医用面膜,翻六倍价格宰客!当行业里的某一品项火爆了,就会有很多商家蹭热度,装逼忽悠,最近火爆朋友圈的医用面膜,被沾上了污点,到底怎么回事呢? “比普通面膜安全、效果好!痘痘、痘印、敏感肌都能用…...

    2024/4/19 11:59:48
  21. 「发现」铁皮石斛仙草之神奇功效用于医用面膜

    原标题:「发现」铁皮石斛仙草之神奇功效用于医用面膜丽彦妆铁皮石斛医用面膜|石斛多糖无菌修护补水贴19大优势: 1、铁皮石斛:自唐宋以来,一直被列为皇室贡品,铁皮石斛生于海拔1600米的悬崖峭壁之上,繁殖力差,产量极低,所以古代仅供皇室、贵族享用 2、铁皮石斛自古民间…...

    2024/4/19 12:00:06
  22. 丽彦妆\医用面膜\冷敷贴轻奢医学护肤引导者

    原标题:丽彦妆\医用面膜\冷敷贴轻奢医学护肤引导者【公司简介】 广州华彬企业隶属香港华彬集团有限公司,专注美业21年,其旗下品牌: 「圣茵美」私密荷尔蒙抗衰,产后修复 「圣仪轩」私密荷尔蒙抗衰,产后修复 「花茵莳」私密荷尔蒙抗衰,产后修复 「丽彦妆」专注医学护…...

    2024/4/19 16:57:22
  23. 广州械字号面膜生产厂家OEM/ODM4项须知!

    原标题:广州械字号面膜生产厂家OEM/ODM4项须知!广州械字号面膜生产厂家OEM/ODM流程及注意事项解读: 械字号医用面膜,其实在我国并没有严格的定义,通常我们说的医美面膜指的应该是一种「医用敷料」,也就是说,医用面膜其实算作「医疗器械」的一种,又称「医用冷敷贴」。 …...

    2024/4/19 12:00:25
  24. 械字号医用眼膜缓解用眼过度到底有无作用?

    原标题:械字号医用眼膜缓解用眼过度到底有无作用?医用眼膜/械字号眼膜/医用冷敷眼贴 凝胶层为亲水高分子材料,含70%以上的水分。体表皮肤温度传导到本产品的凝胶层,热量被凝胶内水分子吸收,通过水分的蒸发带走大量的热量,可迅速地降低体表皮肤局部温度,减轻局部皮肤的灼…...

    2024/4/19 12:00:40
  25. 配置失败还原请勿关闭计算机,电脑开机屏幕上面显示,配置失败还原更改 请勿关闭计算机 开不了机 这个问题怎么办...

    解析如下&#xff1a;1、长按电脑电源键直至关机&#xff0c;然后再按一次电源健重启电脑&#xff0c;按F8健进入安全模式2、安全模式下进入Windows系统桌面后&#xff0c;按住“winR”打开运行窗口&#xff0c;输入“services.msc”打开服务设置3、在服务界面&#xff0c;选中…...

    2022/11/19 21:17:18
  26. 错误使用 reshape要执行 RESHAPE,请勿更改元素数目。

    %读入6幅图像&#xff08;每一幅图像的大小是564*564&#xff09; f1 imread(WashingtonDC_Band1_564.tif); subplot(3,2,1),imshow(f1); f2 imread(WashingtonDC_Band2_564.tif); subplot(3,2,2),imshow(f2); f3 imread(WashingtonDC_Band3_564.tif); subplot(3,2,3),imsho…...

    2022/11/19 21:17:16
  27. 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机...

    win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”问题的解决方法在win7系统关机时如果有升级系统的或者其他需要会直接进入一个 等待界面&#xff0c;在等待界面中我们需要等待操作结束才能关机&#xff0c;虽然这比较麻烦&#xff0c;但是对系统进行配置和升级…...

    2022/11/19 21:17:15
  28. 台式电脑显示配置100%请勿关闭计算机,“准备配置windows 请勿关闭计算机”的解决方法...

    有不少用户在重装Win7系统或更新系统后会遇到“准备配置windows&#xff0c;请勿关闭计算机”的提示&#xff0c;要过很久才能进入系统&#xff0c;有的用户甚至几个小时也无法进入&#xff0c;下面就教大家这个问题的解决方法。第一种方法&#xff1a;我们首先在左下角的“开始…...

    2022/11/19 21:17:14
  29. win7 正在配置 请勿关闭计算机,怎么办Win7开机显示正在配置Windows Update请勿关机...

    置信有很多用户都跟小编一样遇到过这样的问题&#xff0c;电脑时发现开机屏幕显现“正在配置Windows Update&#xff0c;请勿关机”(如下图所示)&#xff0c;而且还需求等大约5分钟才干进入系统。这是怎样回事呢&#xff1f;一切都是正常操作的&#xff0c;为什么开时机呈现“正…...

    2022/11/19 21:17:13
  30. 准备配置windows 请勿关闭计算机 蓝屏,Win7开机总是出现提示“配置Windows请勿关机”...

    Win7系统开机启动时总是出现“配置Windows请勿关机”的提示&#xff0c;没过几秒后电脑自动重启&#xff0c;每次开机都这样无法进入系统&#xff0c;此时碰到这种现象的用户就可以使用以下5种方法解决问题。方法一&#xff1a;开机按下F8&#xff0c;在出现的Windows高级启动选…...

    2022/11/19 21:17:12
  31. 准备windows请勿关闭计算机要多久,windows10系统提示正在准备windows请勿关闭计算机怎么办...

    有不少windows10系统用户反映说碰到这样一个情况&#xff0c;就是电脑提示正在准备windows请勿关闭计算机&#xff0c;碰到这样的问题该怎么解决呢&#xff0c;现在小编就给大家分享一下windows10系统提示正在准备windows请勿关闭计算机的具体第一种方法&#xff1a;1、2、依次…...

    2022/11/19 21:17:11
  32. 配置 已完成 请勿关闭计算机,win7系统关机提示“配置Windows Update已完成30%请勿关闭计算机”的解决方法...

    今天和大家分享一下win7系统重装了Win7旗舰版系统后&#xff0c;每次关机的时候桌面上都会显示一个“配置Windows Update的界面&#xff0c;提示请勿关闭计算机”&#xff0c;每次停留好几分钟才能正常关机&#xff0c;导致什么情况引起的呢&#xff1f;出现配置Windows Update…...

    2022/11/19 21:17:10
  33. 电脑桌面一直是清理请关闭计算机,windows7一直卡在清理 请勿关闭计算机-win7清理请勿关机,win7配置更新35%不动...

    只能是等着&#xff0c;别无他法。说是卡着如果你看硬盘灯应该在读写。如果从 Win 10 无法正常回滚&#xff0c;只能是考虑备份数据后重装系统了。解决来方案一&#xff1a;管理员运行cmd&#xff1a;net stop WuAuServcd %windir%ren SoftwareDistribution SDoldnet start WuA…...

    2022/11/19 21:17:09
  34. 计算机配置更新不起,电脑提示“配置Windows Update请勿关闭计算机”怎么办?

    原标题&#xff1a;电脑提示“配置Windows Update请勿关闭计算机”怎么办&#xff1f;win7系统中在开机与关闭的时候总是显示“配置windows update请勿关闭计算机”相信有不少朋友都曾遇到过一次两次还能忍但经常遇到就叫人感到心烦了遇到这种问题怎么办呢&#xff1f;一般的方…...

    2022/11/19 21:17:08
  35. 计算机正在配置无法关机,关机提示 windows7 正在配置windows 请勿关闭计算机 ,然后等了一晚上也没有关掉。现在电脑无法正常关机...

    关机提示 windows7 正在配置windows 请勿关闭计算机 &#xff0c;然后等了一晚上也没有关掉。现在电脑无法正常关机以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容&#xff0c;让我们赶快一起来看一下吧&#xff01;关机提示 windows7 正在配…...

    2022/11/19 21:17:05
  36. 钉钉提示请勿通过开发者调试模式_钉钉请勿通过开发者调试模式是真的吗好不好用...

    钉钉请勿通过开发者调试模式是真的吗好不好用 更新时间:2020-04-20 22:24:19 浏览次数:729次 区域: 南阳 > 卧龙 列举网提醒您:为保障您的权益,请不要提前支付任何费用! 虚拟位置外设器!!轨迹模拟&虚拟位置外设神器 专业用于:钉钉,外勤365,红圈通,企业微信和…...

    2022/11/19 21:17:05
  37. 配置失败还原请勿关闭计算机怎么办,win7系统出现“配置windows update失败 还原更改 请勿关闭计算机”,长时间没反应,无法进入系统的解决方案...

    前几天班里有位学生电脑(windows 7系统)出问题了&#xff0c;具体表现是开机时一直停留在“配置windows update失败 还原更改 请勿关闭计算机”这个界面&#xff0c;长时间没反应&#xff0c;无法进入系统。这个问题原来帮其他同学也解决过&#xff0c;网上搜了不少资料&#x…...

    2022/11/19 21:17:04
  38. 一个电脑无法关闭计算机你应该怎么办,电脑显示“清理请勿关闭计算机”怎么办?...

    本文为你提供了3个有效解决电脑显示“清理请勿关闭计算机”问题的方法&#xff0c;并在最后教给你1种保护系统安全的好方法&#xff0c;一起来看看&#xff01;电脑出现“清理请勿关闭计算机”在Windows 7(SP1)和Windows Server 2008 R2 SP1中&#xff0c;添加了1个新功能在“磁…...

    2022/11/19 21:17:03
  39. 请勿关闭计算机还原更改要多久,电脑显示:配置windows更新失败,正在还原更改,请勿关闭计算机怎么办...

    许多用户在长期不使用电脑的时候&#xff0c;开启电脑发现电脑显示&#xff1a;配置windows更新失败&#xff0c;正在还原更改&#xff0c;请勿关闭计算机。。.这要怎么办呢&#xff1f;下面小编就带着大家一起看看吧&#xff01;如果能够正常进入系统&#xff0c;建议您暂时移…...

    2022/11/19 21:17:02
  40. 还原更改请勿关闭计算机 要多久,配置windows update失败 还原更改 请勿关闭计算机,电脑开机后一直显示以...

    配置windows update失败 还原更改 请勿关闭计算机&#xff0c;电脑开机后一直显示以以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内容&#xff0c;让我们赶快一起来看一下吧&#xff01;配置windows update失败 还原更改 请勿关闭计算机&#x…...

    2022/11/19 21:17:01
  41. 电脑配置中请勿关闭计算机怎么办,准备配置windows请勿关闭计算机一直显示怎么办【图解】...

    不知道大家有没有遇到过这样的一个问题&#xff0c;就是我们的win7系统在关机的时候&#xff0c;总是喜欢显示“准备配置windows&#xff0c;请勿关机”这样的一个页面&#xff0c;没有什么大碍&#xff0c;但是如果一直等着的话就要两个小时甚至更久都关不了机&#xff0c;非常…...

    2022/11/19 21:17:00
  42. 正在准备配置请勿关闭计算机,正在准备配置windows请勿关闭计算机时间长了解决教程...

    当电脑出现正在准备配置windows请勿关闭计算机时&#xff0c;一般是您正对windows进行升级&#xff0c;但是这个要是长时间没有反应&#xff0c;我们不能再傻等下去了。可能是电脑出了别的问题了&#xff0c;来看看教程的说法。正在准备配置windows请勿关闭计算机时间长了方法一…...

    2022/11/19 21:16:59
  43. 配置失败还原请勿关闭计算机,配置Windows Update失败,还原更改请勿关闭计算机...

    我们使用电脑的过程中有时会遇到这种情况&#xff0c;当我们打开电脑之后&#xff0c;发现一直停留在一个界面&#xff1a;“配置Windows Update失败&#xff0c;还原更改请勿关闭计算机”&#xff0c;等了许久还是无法进入系统。如果我们遇到此类问题应该如何解决呢&#xff0…...

    2022/11/19 21:16:58
  44. 如何在iPhone上关闭“请勿打扰”

    Apple’s “Do Not Disturb While Driving” is a potentially lifesaving iPhone feature, but it doesn’t always turn on automatically at the appropriate time. For example, you might be a passenger in a moving car, but your iPhone may think you’re the one dri…...

    2022/11/19 21:16:57