This commit is contained in:
2024-09-20 10:42:19 +08:00
parent ebcc80d71a
commit 33650aad94
4 changed files with 32 additions and 5 deletions

View File

@@ -1,12 +1,13 @@
package com.chaozhanggui.system.cashierservice.controller;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject;
import com.chaozhanggui.system.cashierservice.dao.TbPlatformDictMapper;
import com.chaozhanggui.system.cashierservice.dao.TbShopExtendMapper;
import com.chaozhanggui.system.cashierservice.entity.TbPlatformDict;
import com.chaozhanggui.system.cashierservice.entity.dto.WxMsgSubDTO;
import com.chaozhanggui.system.cashierservice.entity.vo.DistrictVo;
import com.chaozhanggui.system.cashierservice.exception.MsgException;
import com.chaozhanggui.system.cashierservice.netty.PushToClientChannelHandlerAdapter;
import com.chaozhanggui.system.cashierservice.redis.RedisCst;
import com.chaozhanggui.system.cashierservice.redis.RedisUtil;
import com.chaozhanggui.system.cashierservice.service.FileService;
@@ -174,6 +175,18 @@ public class CommonController {
return new Result(CodeEnum.SUCCESS, extendMapper.queryByShopIdAndAutoKey(Integer.valueOf(map.get("shopId").toString()),map.get("autokey")));
}
/**
* 交班
*/
@GetMapping("common/handoverData")
public Result handoverData(String shopId) {
JSONObject jsonObject1 = new JSONObject();
jsonObject1.put("type", "handover");
PushToClientChannelHandlerAdapter.getInstance().AppSendInfo(jsonObject1.toString(),shopId);
return Result.success(CodeEnum.SUCCESS);
}
// 检查手机号格式是否正确的方法
private boolean isValidPhoneNumber(String phone) {
return phone.matches("^1[3-9]\\d{9}$");