智慧校园话务模块
This commit is contained in:
parent
3001e20b0d
commit
82d00f1c5b
|
@ -0,0 +1,11 @@
|
||||||
|
package net.shapelight.common.annotation;
|
||||||
|
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
@Target(ElementType.METHOD)
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
public @interface Snowflake {
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
package net.shapelight.common.aspect;
|
||||||
|
|
||||||
|
import net.shapelight.common.utils.SnowflakeIdWorker;
|
||||||
|
import org.aspectj.lang.ProceedingJoinPoint;
|
||||||
|
import org.aspectj.lang.annotation.Around;
|
||||||
|
import org.aspectj.lang.annotation.Aspect;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
@Aspect
|
||||||
|
public class SnowflakeAspect {
|
||||||
|
|
||||||
|
@Around("@annotation(net.shapelight.common.annotation.Snowflake)")
|
||||||
|
public Object generateSnowflakeId(ProceedingJoinPoint joinPoint) throws Throwable {
|
||||||
|
// 生成Snowflake ID
|
||||||
|
SnowflakeIdWorker snowflakeIdWorker = new SnowflakeIdWorker();
|
||||||
|
long snowflakeId = snowflakeIdWorker.nextId();
|
||||||
|
|
||||||
|
// 修改方法参数或者返回值来设置Snowflake ID
|
||||||
|
Object[] args = joinPoint.getArgs();
|
||||||
|
if (args != null && args.length > 0) {
|
||||||
|
// 假设第一个参数是传递Snowflake ID的参数
|
||||||
|
args[0] = snowflakeId;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 继续执行原方法,并且可以返回修改后的结果
|
||||||
|
return joinPoint.proceed(args);
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,10 +4,8 @@ import com.alibaba.fastjson.JSONObject;
|
||||||
import net.shapelight.modules.fegin.config.OpFeignConfig;
|
import net.shapelight.modules.fegin.config.OpFeignConfig;
|
||||||
import org.springframework.cloud.openfeign.FeignClient;
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
|
||||||
|
|
||||||
import javax.annotation.PostConstruct;
|
import javax.annotation.PostConstruct;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -17,7 +15,7 @@ import java.util.Map;
|
||||||
* path 指定调用接口所在Controller的@RequestMapping对应路径,没有则不填
|
* path 指定调用接口所在Controller的@RequestMapping对应路径,没有则不填
|
||||||
* 青桔话务平台
|
* 青桔话务平台
|
||||||
*/
|
*/
|
||||||
@FeignClient(name = "operator-service", url = "${global.wx.url}",configuration = OpFeignConfig.class)
|
@FeignClient(name = "operator-service", url = "${global.qingju.url}",configuration = OpFeignConfig.class)
|
||||||
@Component
|
@Component
|
||||||
public interface OpFeignClient {
|
public interface OpFeignClient {
|
||||||
|
|
||||||
|
@ -32,53 +30,7 @@ public interface OpFeignClient {
|
||||||
@PostMapping("/submitData")
|
@PostMapping("/submitData")
|
||||||
JSONObject submitData(@RequestBody Map<String,Object> params);
|
JSONObject submitData(@RequestBody Map<String,Object> params);
|
||||||
|
|
||||||
/*
|
@PostMapping("/getData")
|
||||||
获取token
|
JSONObject getData(@RequestBody Map<String,Object> params);
|
||||||
*/
|
|
||||||
@GetMapping("cgi-bin/token")
|
|
||||||
JSONObject getToken(@RequestParam Map<String, Object> params);
|
|
||||||
|
|
||||||
/*
|
|
||||||
创建设备组
|
|
||||||
*/
|
|
||||||
@PostMapping("wxa/business/group/createid")
|
|
||||||
JSONObject createIotGroupId(@RequestBody Map<String,Object> params);
|
|
||||||
|
|
||||||
/*
|
|
||||||
删除设备组设备
|
|
||||||
*/
|
|
||||||
@PostMapping("wxa/business/group/removedevice")
|
|
||||||
JSONObject removeIotGroupDevice(@RequestBody Map<String,Object> params);
|
|
||||||
|
|
||||||
/*
|
|
||||||
新增设备组设备
|
|
||||||
*/
|
|
||||||
@PostMapping("wxa/business/group/adddevice")
|
|
||||||
JSONObject addIotGroupDevice(@RequestBody Map<String,Object> params);
|
|
||||||
|
|
||||||
/*
|
|
||||||
获取设备组信息
|
|
||||||
*/
|
|
||||||
@PostMapping("wxa/business/group/getinfo")
|
|
||||||
JSONObject getIotGroupInfo(@RequestBody Map<String,Object> params);
|
|
||||||
|
|
||||||
/*
|
|
||||||
激活licence
|
|
||||||
*/
|
|
||||||
@PostMapping("wxa/business/license/activedevice")
|
|
||||||
JSONObject activeLicenseDevice(@RequestBody Map<String,Object> params);
|
|
||||||
|
|
||||||
/*
|
|
||||||
查询license资源包列表
|
|
||||||
*/
|
|
||||||
@PostMapping("wxa/business/license/getdeviceinfo")
|
|
||||||
JSONObject getLicenseDeviceInfo(@RequestBody Map<String,Object> params);
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("v3/pay/transactions/jsapi")
|
|
||||||
JSONObject createOrder(@RequestBody Map<String,Object> params);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,72 @@
|
||||||
|
package net.shapelight.modules.fegin;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import net.shapelight.modules.fegin.config.OpFeignConfig;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
|
||||||
|
import javax.annotation.PostConstruct;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* name 指定调用rest接口对应服务名
|
||||||
|
* path 指定调用接口所在Controller的@RequestMapping对应路径,没有则不填
|
||||||
|
* 青桔话务平台
|
||||||
|
*/
|
||||||
|
@FeignClient(name = "operator-service", url = "${global.wx.url}",configuration = OpFeignConfig.class)
|
||||||
|
@Component
|
||||||
|
public interface WxFeignClient {
|
||||||
|
/*
|
||||||
|
获取token
|
||||||
|
*/
|
||||||
|
@GetMapping("cgi-bin/token")
|
||||||
|
JSONObject getToken(@RequestParam Map<String, Object> params);
|
||||||
|
|
||||||
|
/*
|
||||||
|
创建设备组
|
||||||
|
*/
|
||||||
|
@PostMapping("wxa/business/group/createid")
|
||||||
|
JSONObject createIotGroupId(@RequestBody Map<String,Object> params);
|
||||||
|
|
||||||
|
/*
|
||||||
|
删除设备组设备
|
||||||
|
*/
|
||||||
|
@PostMapping("wxa/business/group/removedevice")
|
||||||
|
JSONObject removeIotGroupDevice(@RequestBody Map<String,Object> params);
|
||||||
|
|
||||||
|
/*
|
||||||
|
新增设备组设备
|
||||||
|
*/
|
||||||
|
@PostMapping("wxa/business/group/adddevice")
|
||||||
|
JSONObject addIotGroupDevice(@RequestBody Map<String,Object> params);
|
||||||
|
|
||||||
|
/*
|
||||||
|
获取设备组信息
|
||||||
|
*/
|
||||||
|
@PostMapping("wxa/business/group/getinfo")
|
||||||
|
JSONObject getIotGroupInfo(@RequestBody Map<String,Object> params);
|
||||||
|
|
||||||
|
/*
|
||||||
|
激活licence
|
||||||
|
*/
|
||||||
|
@PostMapping("wxa/business/license/activedevice")
|
||||||
|
JSONObject activeLicenseDevice(@RequestBody Map<String,Object> params);
|
||||||
|
|
||||||
|
/*
|
||||||
|
查询license资源包列表
|
||||||
|
*/
|
||||||
|
@PostMapping("wxa/business/license/getdeviceinfo")
|
||||||
|
JSONObject getLicenseDeviceInfo(@RequestBody Map<String,Object> params);
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("v3/pay/transactions/jsapi")
|
||||||
|
JSONObject createOrder(@RequestBody Map<String,Object> params);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -16,6 +16,7 @@ import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import net.shapelight.common.base.BaseEntity;
|
import net.shapelight.common.base.BaseEntity;
|
||||||
|
import net.shapelight.modules.mobile.entity.MobileContact;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 人员表
|
* 人员表
|
||||||
|
@ -369,6 +370,6 @@ public class TenPersonEntity extends BaseEntity implements Serializable {
|
||||||
private Integer featureType;
|
private Integer featureType;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private TenRelation tenRelation;
|
private List<MobileContact> mobileContactList;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,8 @@ import net.shapelight.modules.excel.listener.PersonExcelListener;
|
||||||
import net.shapelight.modules.excel.model.PersonModel;
|
import net.shapelight.modules.excel.model.PersonModel;
|
||||||
import net.shapelight.modules.face.dto.FaceRecognitionResDTO;
|
import net.shapelight.modules.face.dto.FaceRecognitionResDTO;
|
||||||
import net.shapelight.modules.face.service.FaceEngineService;
|
import net.shapelight.modules.face.service.FaceEngineService;
|
||||||
|
import net.shapelight.modules.mobile.entity.MobileContact;
|
||||||
|
import net.shapelight.modules.mobile.service.MobileContactService;
|
||||||
import net.shapelight.modules.nettyapi.service.ServerApiService;
|
import net.shapelight.modules.nettyapi.service.ServerApiService;
|
||||||
import net.shapelight.modules.sys.entity.SysDictEntity;
|
import net.shapelight.modules.sys.entity.SysDictEntity;
|
||||||
import net.shapelight.modules.sys.service.impl.SysDictServiceImpl;
|
import net.shapelight.modules.sys.service.impl.SysDictServiceImpl;
|
||||||
|
@ -106,6 +108,8 @@ public class TenPersonServiceImpl implements TenPersonService {
|
||||||
private FaceEngineService faceEngineService;
|
private FaceEngineService faceEngineService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private TenRelationMapper tenRelationMapper;
|
private TenRelationMapper tenRelationMapper;
|
||||||
|
@Autowired
|
||||||
|
private MobileContactService mobileContactService;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue