liaoyongfei ff71223238 配置 | 4 jaren geleden | |
---|---|---|
.mvn | 5 jaren geleden | |
lib | 5 jaren geleden | |
member-common | 4 jaren geleden | |
member-services | 4 jaren geleden | |
member-services-models | 4 jaren geleden | |
member-web | 4 jaren geleden | |
member-web-common | 4 jaren geleden | |
member-weixin-service | 4 jaren geleden | |
.gitignore | 4 jaren geleden | |
README.md | 4 jaren geleden | |
derby.log | 4 jaren geleden | |
mvnw | 5 jaren geleden | |
mvnw.cmd | 5 jaren geleden | |
pom.xml | 4 jaren geleden | |
spring-data-elasticsearch-3.2.3.RELEASE.jar | 5 jaren geleden | |
updateAndStart.sh | 5 jaren geleden |
使用Spring Boot + Spring-data-jpa 构建 接口文档使用swagger-ui管理, 文档url /doc.html
mvn启动命令mvn -f ./member-web/pom.xml spring-boot:run
服务器部署、启动命令:
screen -r MemberCenter (进入名为MemberCenter的screen)
(如果没有就用 screen -S MemberCenter 创建一个)
cd /usr/local/src/MemberCenter_DW/
git pull origin master
mvn clean package install
export workerid=0
export datacenterid=0
# export ALL_PROXY=http://192.168.50.32:1808 #使用50.32的服务器做代理
# java -Dhttps.proxyHost=192.168.50.32 -Dhttps.proxyPort=1808 -Dhttp.proxyHost=192.168.50.32 -Dhttp.proxyPort=1808 -jar member-web/target/member-web-0.0.1-SNAPSHOT.jar
java -jar member-web/target/member-web-0.0.1-SNAPSHOT.jar
ctrl + a (松开后按 d) 退出当前screen,让其后台运行
在使用新添加的sql查询导出excel的接口时,因为不知道为什么使用react框架的request来请求时,post不行,使用了blob也不行,就改成了get的方式,参数从sessionStorge里去取,然后编码提交,如下:
{
title:"测试表格",
url:{
read:"/japi/birdgird/readSql?dsId=4028b2a26daf6c2d016db34bc5ca00a5&sqlId=40288ad66df10dc9016df1101fe40001",
add:"/japi/birdgird/add?dsId=4028b2a26daf6c2d016db34bc5ca00a5&tableName=contract",
edit:"/japi/birdgird/edit?dsId=4028b2a26daf6c2d016db34bc5ca00a5&tableName=contract&pkColumn=id",
delete:"/japi/birdgird/delete?dsId=4028b2a26daf6c2d016db34bc5ca00a5&tableName=contract&pkColumn=id"
},
checkable:true,
actions:[{
name:"导出excel", onClick: function() {
let dtoStr = sessionStorage.getItem('queryDto');
dtoStr = encodeURI(dtoStr);
window.location = "http://localhost:8090/sqlExport/export?dsId=4028b2a26daf6c2d016db34bc5ca00a5&sqlId=40288a9d6e357e33016e3598b42a0000&requestStr="+dtoStr;
}
}],
columns:[
{title:"主编号", data:"t.id", type:"text",hide:true},
{title:"名称",data:"t.name", type:"text",editor: {}, query: true},
{title:"个人电话",data:"t.personal_phone", type:"text",editor: {}, query: true},
{title:"个人手机",data:"t.personal_cellphone", type:"text",editor: {}, query: true},
{title:"组名称",data:"t2.name",type:"text"},
{title:"操作",type:"command",actions:[{
name: '行内按钮',
onClick: (data) => {
console.log(data);
}
}]}
],
}
启动时需要添加proxy代理信息:
java -Dhttps.proxyHost=192.168.50.32 -Dhttps.proxyPort=1808 -Dhttp.proxyHost=192.168.50.32 -Dhttp.proxyPort=1808 -jar xxxx.jar
启动时需要添加机器编号和数据中心编号,为了使部分对象生成分布式ID
export workerid=0
export datacenterid=0
java -Dhttps.proxyHost=192.168.50.32 -Dhttps.proxyPort=1808 -Dhttp.proxyHost=192.168.50.32 -Dhttp.proxyPort=1808 -jar xxxx.jar
添加了动态请求查询参数,格式如下:
GET {url}?page=1&size=10
GET {url}?page=1&size=10&sortField=crtDate&sortDirection=DESC
sortField
是需要排序的字段 sortDirection
是升降序GET {url}?name=yourname&age=20&...
非关键字(上面两条中的)的参数,直接视为等于的操作。GET {url}?age=20&ageOperate=LessEqual&...
使用 字段名+Operate
的参数来表示判断类型:操作类型 | 说明 |
---|---|
Equal | 等于(默认) |
NotEqual | 不等于 |
Less | (数字类型)小于 |
LessEqual | (数字类型)不大于 |
Greater | (数字类型)大于 |
GreaterEqual | (数字类型)不小于 |
Contains | (字符串)包含 |
StartWith | (字符串)以开头 |
EndWith | (字符串)以结尾 |
com.liangjian.dataplatform.member.entity.token.DynamicParamGetter
取:
Service层:
//...
@Service
public class YourService extends DynamicQueryService<YourEntity> implements IYourService {
@Autowired
private YourRepository yourRepository;
@Overrive
public JpaSpecificationExecutor<YourEntity> getJpaRepository() {
return yourRepository;
}
//父类已经包含了动态查询返回Page和返回List的方法
}
Controller层:
@Controller
public class YourController {
//...
@Autowired
private IYourService iYourService;
//例子:
@GetMapping("/page")
public Page<YourEntity> page() {
var params = DynamicParamGetter.DynamicParams.get();
return iYourService.queryPageByCondition(params);
}
@GetMapping("/page")
public List<YourEntity> list() {
var params = DynamicParamGetter.DynamicParams.get();
return iYourService.queryListByCondition(params);
}
}
功能 | controller |
---|---|
标签库接口 | TagDatabaseController |
用户基本信息 | MemberextsController |
用户标签 | MemberextsController |
用户购药订单 | MemberOrderController |
用户用药信息 | MemberDrugUsageController |
代码地址 | 说明 | 部署地址 | 服务器目录 |
---|---|---|---|
http://192.168.20.122:3000/root/MemberCenter_DW | 会员中心java后台,微信公众号积分商城后台 | 192.168.50.41:8090 | /usr/local/src/MemberCenter_DW/ |
http://192.168.20.122:3000/huangshuwen/repurchase | 会员收获地址经纬度爬取,房价计算,复购标签 | 192.168.50.41:9099 | /usr/local/src/repurchase |
http://192.168.20.122:3000/huangshuwen/WebClient | 收集微信公众号用户登录日志 | 139.159.192.185 | /usr/local/src/tomcat/webapps |
http://192.168.20.122:3000/huangshuwen/datax-all_clickhouse | 新增datax_clickhouse插件,用户clickhouse数据读写 | datax任务部署在华为云上139.159.192.185,做Orders,OrderProducts等数据从sqlserver到clickhouse的抽取 | /data/software/datax_task |
http://192.168.20.122:3000/huangshuwen/pointgrowth | 定时计算会员的积分,订单数据数据从sqlserver (219.128.77.86:1433)数据库读取,积分数据写入Sqlserver数据库MemberData.dbo. mem_weixin_user_info | 192.168.50.41:8091 | /usr/local/src/pointgrowth |