|
@@ -13,18 +13,22 @@ import com.caimei365.user.model.dto.ScanBindDto;
|
|
|
import com.caimei365.user.model.dto.SuperVipDto;
|
|
|
import com.caimei365.user.model.po.OperationPo;
|
|
|
import com.caimei365.user.model.po.SuperVipPo;
|
|
|
-import com.caimei365.user.model.vo.LoginFailRecordVo;
|
|
|
-import com.caimei365.user.model.vo.UserLoginVo;
|
|
|
+import com.caimei365.user.model.vo.*;
|
|
|
import com.caimei365.user.service.LoginService;
|
|
|
import com.caimei365.user.utils.JwtUtil;
|
|
|
import com.caimei365.user.utils.Md5Util;
|
|
|
+import com.github.pagehelper.PageHelper;
|
|
|
+import com.github.pagehelper.PageInfo;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.http.HttpHeaders;
|
|
|
+import org.springframework.scheduling.annotation.Scheduled;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import java.text.ParseException;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
|
|
|
/**
|
|
@@ -55,6 +59,8 @@ public class LoginServiceImpl implements LoginService {
|
|
|
private AsyncService asyncService;
|
|
|
@Resource
|
|
|
private SellerMapper sellerMapper;
|
|
|
+ @Resource
|
|
|
+ private MessageCenterMapper messageCenterMapper;
|
|
|
/**
|
|
|
* 小程序邀请码过期天数
|
|
|
*/
|
|
@@ -72,7 +78,7 @@ public class LoginServiceImpl implements LoginService {
|
|
|
* @return BaseUser
|
|
|
*/
|
|
|
@Override
|
|
|
- public ResponseJson<UserLoginVo> passwordLogin(LoginPasswordDto loginPasswordDto) {
|
|
|
+ public ResponseJson<UserLoginVo> passwordLogin(LoginPasswordDto loginPasswordDto) throws ParseException {
|
|
|
String mobileOrEmail = loginPasswordDto.getMobileOrEmail();
|
|
|
String password = loginPasswordDto.getPassword();
|
|
|
String unionId = loginPasswordDto.getUnionId();
|
|
@@ -97,6 +103,23 @@ public class LoginServiceImpl implements LoginService {
|
|
|
}
|
|
|
// 如果前端传入unionId,则存入返回前端
|
|
|
baseUser.setUnionId(unionId);
|
|
|
+
|
|
|
+ Integer clubId=messageCenterMapper.clubIdCule(baseUser.getUserId());
|
|
|
+ Integer savedCount=null;
|
|
|
+ if(baseUser.getUserId()!=null){
|
|
|
+ Integer shopID=messageCenterMapper.shopID(baseUser.getUserId());
|
|
|
+ Integer newReceiptType= messageCenterMapper.newReceiptType(shopID);
|
|
|
+ if(shopID==null){
|
|
|
+ savedCount= messageCenterMapper.Count(1,clubId);
|
|
|
+ System.out.println(savedCount);
|
|
|
+ }else {
|
|
|
+ savedCount= messageCenterMapper.Count(2,shopID);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Timerw(baseUser.getUserId());
|
|
|
+ Timesjf(baseUser.getUserId());
|
|
|
+
|
|
|
+
|
|
|
// 比对密码
|
|
|
String md5Password = Md5Util.md5(password);
|
|
|
String dbPassword = baseUser.getPassword();
|
|
@@ -128,7 +151,7 @@ public class LoginServiceImpl implements LoginService {
|
|
|
* @param headers HttpHeaders
|
|
|
*/
|
|
|
@Override
|
|
|
- public ResponseJson<UserLoginVo> appletsAuthorization(String code, String encryptedData, String iv, HttpHeaders headers) {
|
|
|
+ public ResponseJson<UserLoginVo> appletsAuthorization(String code, String encryptedData, String iv, HttpHeaders headers) throws ParseException {
|
|
|
if (StringUtils.isBlank(code)) {
|
|
|
return ResponseJson.error("没有获取到微信授权code", null);
|
|
|
}
|
|
@@ -160,6 +183,22 @@ public class LoginServiceImpl implements LoginService {
|
|
|
log.info("小程序授权登录,返回unionId给前端,用户数据存入Redis,key:wxInfo:applets:" + unionId);
|
|
|
// 协销授权登录
|
|
|
UserLoginVo seller = loginMapper.getServiceProviderUserByOpenId(openId);
|
|
|
+ Integer userID=messageCenterMapper.userId(openId);
|
|
|
+ Integer clubId=messageCenterMapper.clubIdCule(userID);
|
|
|
+ Integer savedCount=null;
|
|
|
+if(userID!=null) {
|
|
|
+ Integer shopID = messageCenterMapper.shopID(userID);
|
|
|
+ Integer newReceiptType = messageCenterMapper.newReceiptType(shopID);
|
|
|
+ if (shopID == null) {
|
|
|
+ savedCount = messageCenterMapper.Count(1, clubId);
|
|
|
+ System.out.println(savedCount);
|
|
|
+ } else {
|
|
|
+ savedCount = messageCenterMapper.Count(2, shopID);
|
|
|
+ }
|
|
|
+
|
|
|
+ Timerw(userID);
|
|
|
+ Timesjf(userID);
|
|
|
+ }
|
|
|
if (null != seller) {
|
|
|
loginMapper.updateServiceProviderUnionId(seller.getUserId(), unionId);
|
|
|
String token = JwtUtil.createToken(seller.getUserId());
|
|
@@ -179,6 +218,280 @@ public class LoginServiceImpl implements LoginService {
|
|
|
return operationAuthLogin(openId, unionId, "mini");
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public ResponseJson<Map<String, Object>> ClubMessageCount(Integer messageType,Integer commonId){
|
|
|
+
|
|
|
+ Integer count=messageCenterMapper.Count(1,commonId);
|
|
|
+ Integer tradeCount= messageCenterMapper.MessageCount(1,1,commonId);
|
|
|
+ Integer accountCount=messageCenterMapper.MessageCount(1,2,commonId);
|
|
|
+ Integer notificationCount= messageCenterMapper.MessageCount(1,3,commonId);
|
|
|
+ Integer promotionCount=messageCenterMapper.MessageCount(1,4,commonId);
|
|
|
+ Map<String, Object> map = new HashMap(10);
|
|
|
+ map.put("count", count);
|
|
|
+ map.put("tradeCount", tradeCount);
|
|
|
+ map.put("account",accountCount);
|
|
|
+ map.put("notificationCount", notificationCount);
|
|
|
+ map.put("promotionCount",promotionCount);
|
|
|
+
|
|
|
+
|
|
|
+ return ResponseJson.success(map);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public ResponseJson<Map<String, Object>> shopMessageCount(Integer messageType,Integer commonId){
|
|
|
+ Integer count=messageCenterMapper.Count(2,commonId);
|
|
|
+ Integer tradeCount= messageCenterMapper.MessageCount(2,1,commonId);
|
|
|
+ Integer accountCount=messageCenterMapper.MessageCount(2,2,commonId);
|
|
|
+ Integer notificationCount= messageCenterMapper.MessageCount(2,3,commonId);
|
|
|
+ Integer promotionCount=messageCenterMapper.MessageCount(2,4,commonId);
|
|
|
+ Map<String, Object> map = new HashMap(10);
|
|
|
+ map.put("count", count);
|
|
|
+ map.put("tradeCount", tradeCount);
|
|
|
+ map.put("accountCount",accountCount);
|
|
|
+ map.put("notificationCount", notificationCount);
|
|
|
+ map.put("promotionCount",promotionCount);
|
|
|
+ return ResponseJson.success(map);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public ResponseJson<Map<String, Object>> ShopCount(Integer messageType,Integer commonId){
|
|
|
+ Integer count=messageCenterMapper.Count(2,commonId);
|
|
|
+ Map<String, Object> map = new HashMap(10);
|
|
|
+ map.put("count", count);
|
|
|
+ return ResponseJson.success(map);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public ResponseJson<Map<String, Object>> ClubCount(Integer messageType,Integer commonId){
|
|
|
+ Integer count=messageCenterMapper.Count(1,commonId);
|
|
|
+ Map<String, Object> map = new HashMap(10);
|
|
|
+ map.put("count", count);
|
|
|
+ return ResponseJson.success(map);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Integer updateMessageAsRead(Integer messageType,Integer commonId){
|
|
|
+
|
|
|
+ return messageCenterMapper.updateMessageAsRead(1,messageType,commonId);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Integer updateShopMessageAsRead(Integer messageType,Integer commonId){
|
|
|
+
|
|
|
+ return messageCenterMapper.updateMessageAsRead(2,messageType,commonId);
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public Integer deleteMessage(String id){
|
|
|
+ Integer num=0;
|
|
|
+ String[] IdArr = id.split(",");
|
|
|
+ for (int i = 0; i < IdArr.length; i++) {
|
|
|
+ num= messageCenterMapper.deleteMessage(IdArr[i]);
|
|
|
+ }
|
|
|
+ return num;
|
|
|
+ }
|
|
|
+ @Override
|
|
|
+ public Integer updateRead(Integer userType,String Id){
|
|
|
+ Integer num=0;
|
|
|
+ String[] IdArr = Id.split(",");
|
|
|
+ for (int i = 0; i < IdArr.length; i++) {
|
|
|
+ num= messageCenterMapper.updateRead(userType,IdArr[i]);
|
|
|
+ }
|
|
|
+
|
|
|
+ return num;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public ResponseJson<PageInfo<MessageCenter>> ClubMessageList(Integer commonId,Integer messageType,Integer source,int pageNum, int pageSize){
|
|
|
+
|
|
|
+ PageHelper.startPage(pageNum, pageSize);
|
|
|
+ List<MessageCenter> list=messageCenterMapper.MessageList(1,messageType,commonId);
|
|
|
+ list.forEach(mess -> {
|
|
|
+ if(mess.getClubId()!=null){
|
|
|
+ MessageCenter messageCenter= messageCenterMapper.MainImage(1,commonId);
|
|
|
+ if(messageCenter!=null){
|
|
|
+ mess.setMainImage(messageCenter.getMainImage());
|
|
|
+ mess.setOnlinePayFlag(messageCenter.getOnlinePayFlag());
|
|
|
+ if(messageCenter.getProductName().length()>10){
|
|
|
+ mess.setProductName(StringUtils.strip(messageCenter.getProductName().substring(0, 11)));
|
|
|
+ }else {
|
|
|
+ mess.setProductName(messageCenter.getProductName());
|
|
|
+ }
|
|
|
+ mess.setProductCount(messageCenter.getProductCount());
|
|
|
+ mess.setRefundType(messageCenter.getRefundType());
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if(source ==2){
|
|
|
+ messageCenterMapper.updateMessageAsRead(1,messageType,commonId);
|
|
|
+ }
|
|
|
+
|
|
|
+ PageInfo<MessageCenter> pageData = new PageInfo<>(list);
|
|
|
+ return ResponseJson.success(pageData);
|
|
|
+}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public ResponseJson<PageInfo<MessageCenter>> shopMessageList(Integer commonId,Integer messageType,Integer source, int pageNum, int pageSize){
|
|
|
+ PageHelper.startPage(pageNum, pageSize);
|
|
|
+ List<MessageCenter> list=messageCenterMapper.MessageList(2,messageType,commonId);
|
|
|
+ list.forEach(mess -> {
|
|
|
+ if(mess.getShopId()!=null){
|
|
|
+ MessageCenter messageCenter= messageCenterMapper.MainImage(2,commonId);
|
|
|
+ if(messageCenter!=null){
|
|
|
+ mess.setMainImage(messageCenter.getMainImage());
|
|
|
+ mess.setOnlinePayFlag(messageCenter.getOnlinePayFlag());
|
|
|
+ if(messageCenter.getProductName().length()>10){
|
|
|
+ mess.setProductName(StringUtils.strip(messageCenter.getProductName().substring(0, 11)));
|
|
|
+ }else {
|
|
|
+ mess.setProductName(messageCenter.getProductName());
|
|
|
+ }
|
|
|
+ mess.setProductCount(messageCenter.getProductCount());
|
|
|
+ mess.setRefundType(messageCenter.getRefundType());
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+ if(source ==2) {
|
|
|
+ messageCenterMapper.updateMessageAsRead(2, messageType, commonId);
|
|
|
+ }
|
|
|
+ PageInfo<MessageCenter> pageData = new PageInfo<>(list);
|
|
|
+ return ResponseJson.success(pageData);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 每天下午3点判断
|
|
|
+ */
|
|
|
+ @Scheduled(cron = "0 0 15 * * ?")
|
|
|
+ private Void Timesjf(Integer userId) throws ParseException {
|
|
|
+ Integer shopID=messageCenterMapper.shopID(userId);
|
|
|
+ if(shopID!=null){
|
|
|
+ String receiptDate= messageCenterMapper.receiptDate(shopID);
|
|
|
+ Calendar calendar = Calendar.getInstance();
|
|
|
+
|
|
|
+ Integer clubId=messageCenterMapper.clubIdCule(userId);
|
|
|
+ if(clubId!=null){
|
|
|
+ Date d=new Date();
|
|
|
+ //1.日期格式
|
|
|
+ SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
|
|
|
+ Date time = sdf.parse(receiptDate);
|
|
|
+ calendar.setTime(time);
|
|
|
+ calendar.add(Calendar.YEAR, 1);
|
|
|
+ String dateStrings= sdf.format(calendar.getTime());
|
|
|
+ //2.到期时间
|
|
|
+ Date da1=sdf.parse(dateStrings);
|
|
|
+ //到期时间-当前时间=还剩多少天
|
|
|
+ Long s=(da1.getTime()-d.getTime())/24/60/60/1000;
|
|
|
+ //3.输出间隔天数 getTime获取的是毫秒
|
|
|
+ log.info("输出间隔天数----------->",s);
|
|
|
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+ String current = dateFormat.format(new Date());
|
|
|
+ MessageCenter messageCenter=new MessageCenter();
|
|
|
+ //推送信息中心-上架费服务通知
|
|
|
+ if(s==30){
|
|
|
+ messageCenter.setShopId(shopID);
|
|
|
+ messageCenter.setClubId(null);
|
|
|
+ messageCenter.setUserType(2);
|
|
|
+ messageCenter.setMessageType(3);
|
|
|
+ messageCenter.setShopTieredType(1);
|
|
|
+ messageCenter.setContent(s+"日后");
|
|
|
+ messageCenter.setTime(current);
|
|
|
+ messageCenterMapper.addMessageCenter(messageCenter);
|
|
|
+ }
|
|
|
+ if(s==7){
|
|
|
+ messageCenter.setShopId(shopID);
|
|
|
+ messageCenter.setClubId(null);
|
|
|
+ messageCenter.setUserType(2);
|
|
|
+ messageCenter.setMessageType(3);
|
|
|
+ messageCenter.setShopTieredType(1);
|
|
|
+ messageCenter.setContent(s+"日后");
|
|
|
+ messageCenter.setTime(current);
|
|
|
+ messageCenterMapper.addMessageCenter(messageCenter);
|
|
|
+ }
|
|
|
+ if(s==1){
|
|
|
+ messageCenter.setShopId(shopID);
|
|
|
+ messageCenter.setClubId(null);
|
|
|
+ messageCenter.setUserType(2);
|
|
|
+ messageCenter.setMessageType(3);
|
|
|
+ messageCenter.setShopTieredType(1);
|
|
|
+ messageCenter.setContent("今日");
|
|
|
+ messageCenter.setTime(current);
|
|
|
+ messageCenterMapper.addMessageCenter(messageCenter);
|
|
|
+ }
|
|
|
+ if(s<=0){
|
|
|
+ messageCenter.setShopId(shopID);
|
|
|
+ messageCenter.setClubId(null);
|
|
|
+ messageCenter.setUserType(2);
|
|
|
+ messageCenter.setMessageType(3);
|
|
|
+ messageCenter.setShopTieredType(1);
|
|
|
+ messageCenter.setContent("已过期");
|
|
|
+ messageCenter.setTime(current);
|
|
|
+ messageCenterMapper.addMessageCenter(messageCenter);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 每天下午3点判断
|
|
|
+ */
|
|
|
+ @Scheduled(cron = "0 0 15 * * ?")
|
|
|
+ private Void Timerw(Integer userId) throws ParseException {
|
|
|
+ SuperVipPo superVip = vipMapper.findSuperVip(userId);
|
|
|
+ Integer clubId=messageCenterMapper.clubIdCule(userId);
|
|
|
+ if(clubId!=null){
|
|
|
+ if(superVip!=null){
|
|
|
+ Date d=new Date();
|
|
|
+ //1.日期格式
|
|
|
+ SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
|
|
|
+ String endTime = sdf.format(superVip.getEndTime());
|
|
|
+ //2.某天的日期
|
|
|
+ Date da1=sdf.parse(endTime);
|
|
|
+ Long s=(d.getTime()-da1.getTime())/24/60/60/1000;
|
|
|
+ //3.输出间隔天数 getTime获取的是毫秒
|
|
|
+ log.info("输出间隔天数----------->",s);
|
|
|
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+ String current = dateFormat.format(new Date());
|
|
|
+ MessageCenter messageCenter=new MessageCenter();
|
|
|
+ //推送信息中心-账户通知
|
|
|
+ if(s==7){
|
|
|
+ messageCenter.setShopId(null);
|
|
|
+ messageCenter.setClubId(clubId);
|
|
|
+ messageCenter.setUserType(1);
|
|
|
+ messageCenter.setMessageType(2);
|
|
|
+ messageCenter.setAccountType(3);
|
|
|
+ messageCenter.setContent(s+"日后");
|
|
|
+ messageCenter.setTime(current);
|
|
|
+ messageCenterMapper.addMessageCenter(messageCenter);
|
|
|
+ }
|
|
|
+ if(s==1){
|
|
|
+ messageCenter.setShopId(null);
|
|
|
+ messageCenter.setClubId(clubId);
|
|
|
+ messageCenter.setUserType(1);
|
|
|
+ messageCenter.setMessageType(2);
|
|
|
+ messageCenter.setAccountType(3);
|
|
|
+ messageCenter.setContent("今日后");
|
|
|
+ messageCenter.setTime(current);
|
|
|
+ messageCenterMapper.addMessageCenter(messageCenter);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 微信公众号授权链接(www)
|
|
|
*
|
|
@@ -386,7 +699,7 @@ public class LoginServiceImpl implements LoginService {
|
|
|
* @return UserLoginVo
|
|
|
*/
|
|
|
@Override
|
|
|
- public ResponseJson<UserLoginVo> qrCodeAuthScanResult(String state) {
|
|
|
+ public ResponseJson<UserLoginVo> qrCodeAuthScanResult(String state) throws ParseException {
|
|
|
if (StringUtils.isBlank(state)) {
|
|
|
return ResponseJson.error("参数异常:state不能为空!", null);
|
|
|
}
|
|
@@ -403,6 +716,23 @@ public class LoginServiceImpl implements LoginService {
|
|
|
String unionId = (String) infoData.get(WeChatService.Keys.UNION_ID);
|
|
|
String openId = (String) infoData.get(WeChatService.Keys.OPEN_ID);
|
|
|
log.info(">>>>>>pc商城unionId:" + unionId + " ,openId:" + openId);
|
|
|
+
|
|
|
+ Integer userId=messageCenterMapper.userId(openId);
|
|
|
+ Integer clubId=messageCenterMapper.clubIdCule(userId);
|
|
|
+ Integer savedCount=null;
|
|
|
+ if(userId!=null){
|
|
|
+ Integer shopID=messageCenterMapper.shopID(userId);
|
|
|
+ Integer newReceiptType= messageCenterMapper.newReceiptType(shopID);
|
|
|
+ if(shopID==null){
|
|
|
+ savedCount= messageCenterMapper.Count(1,clubId);
|
|
|
+ System.out.println(savedCount);
|
|
|
+ }else {
|
|
|
+ savedCount= messageCenterMapper.Count(2,shopID);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Timerw(userId);
|
|
|
+ Timesjf(userId);
|
|
|
+
|
|
|
// 用户数据存入Redis,key前缀:wxInfo:website:
|
|
|
String infoDataStr = JSON.toJSONString(infoData);
|
|
|
Map<String, Object> infoDataMap = JSON.parseObject(infoDataStr);
|
|
@@ -564,16 +894,42 @@ public class LoginServiceImpl implements LoginService {
|
|
|
operationPo.setAvatarUrl(avatarUrl);
|
|
|
// 绑定状态,1未绑定,2已绑定
|
|
|
operationPo.setStatus(2);
|
|
|
+
|
|
|
if (1 == userIdentity) {
|
|
|
// 机构Id
|
|
|
operationPo.setClubId(operation.getClubId());
|
|
|
// 用户类型
|
|
|
operationPo.setUserType(1);
|
|
|
+
|
|
|
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+ String current = dateFormat.format(new Date());
|
|
|
+ MessageCenter messageCenter = new MessageCenter();
|
|
|
+ messageCenter.setShopId(null);
|
|
|
+ messageCenter.setClubId(operation.getClubId());
|
|
|
+ messageCenter.setUserType(1);
|
|
|
+ messageCenter.setMessageType(2);
|
|
|
+ messageCenter.setAccountType(7);
|
|
|
+ messageCenter.setContent(nickName);
|
|
|
+ messageCenter.setTime(current);
|
|
|
+ messageCenterMapper.addMessageCenter(messageCenter);
|
|
|
+
|
|
|
} else {
|
|
|
// 供应商Id
|
|
|
operationPo.setShopId(operation.getShopId());
|
|
|
// 用户类型
|
|
|
operationPo.setUserType(2);
|
|
|
+
|
|
|
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+ String current = dateFormat.format(new Date());
|
|
|
+ MessageCenter messageCenter = new MessageCenter();
|
|
|
+ messageCenter.setShopId(operation.getShopId());
|
|
|
+ messageCenter.setClubId(null);
|
|
|
+ messageCenter.setUserType(2);
|
|
|
+ messageCenter.setMessageType(2);
|
|
|
+ messageCenter.setShopMessType(2);
|
|
|
+ messageCenter.setContent(nickName);
|
|
|
+ messageCenter.setTime(current);
|
|
|
+ messageCenterMapper.addMessageCenter(messageCenter);
|
|
|
}
|
|
|
// 更新运营人员信息
|
|
|
operationMapper.updateOperationByInvitation(operationPo);
|
|
@@ -654,10 +1010,37 @@ public class LoginServiceImpl implements LoginService {
|
|
|
if (user != null && 3 == user.getUserIdentity()) {
|
|
|
operation.setShopId(user.getShopId());
|
|
|
operation.setUserType(2);
|
|
|
+
|
|
|
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+ String current = dateFormat.format(new Date());
|
|
|
+ MessageCenter messageCenter = new MessageCenter();
|
|
|
+ messageCenter.setShopId(operation.getShopId());
|
|
|
+ messageCenter.setClubId(null);
|
|
|
+ messageCenter.setUserType(2);
|
|
|
+ messageCenter.setMessageType(2);
|
|
|
+ messageCenter.setShopMessType(2);
|
|
|
+ messageCenter.setContent(nickName);
|
|
|
+ messageCenter.setTime(current);
|
|
|
+ messageCenterMapper.addMessageCenter(messageCenter);
|
|
|
+
|
|
|
} else if (user != null) {
|
|
|
operation.setClubId(user.getClubId());
|
|
|
operation.setUserType(1);
|
|
|
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+ String current = dateFormat.format(new Date());
|
|
|
+ MessageCenter messageCenter = new MessageCenter();
|
|
|
+ messageCenter.setShopId(null);
|
|
|
+ messageCenter.setClubId(user.getClubId());
|
|
|
+ messageCenter.setUserType(1);
|
|
|
+ messageCenter.setMessageType(2);
|
|
|
+ messageCenter.setAccountType(7);
|
|
|
+ messageCenter.setContent(nickName);
|
|
|
+ messageCenter.setTime(current);
|
|
|
+ messageCenterMapper.addMessageCenter(messageCenter);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
// 绑定状态
|
|
|
operation.setStatus(2);
|
|
|
// 删除标识
|