说明:1、nacos更换命名空间

pull/254/head
xjs 4 years ago
parent 3ae4960e84
commit 75fded8127

@ -23,3 +23,5 @@ spring:
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
#命名空间
namespace: xjs-666

@ -25,6 +25,8 @@ spring:
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
#命名空间
namespace: xjs-666
sentinel:
# 取消控制台懒加载
eager: true

@ -23,3 +23,5 @@ spring:
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
#命名空间
namespace: xjs-666

@ -23,3 +23,5 @@ spring:
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
#命名空间
namespace: xjs-666

@ -23,3 +23,5 @@ spring:
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
#命名空间
namespace: xjs-666

@ -23,3 +23,5 @@ spring:
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
#命名空间
namespace: xjs-666

@ -85,9 +85,9 @@
<el-table v-loading="loading" :data="wordList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="英语单词" align="center" prop="englishWord" />
<el-table-column label="中文" align="center" prop="chineseWord" />
<el-table-column label="排序" align="center" prop="sort" />
<el-table-column label="英语单词" align="center" prop="englishWord" :show-overflow-tooltip="true"/>
<el-table-column label="中文" align="center" prop="chineseWord" :show-overflow-tooltip="true"/>
<el-table-column label="排序" align="center" prop="sort" :show-overflow-tooltip="true"/>
<el-table-column label="收藏" align="center" prop="isCollect">
<template slot-scope="scope">
<dict-tag :options="dict.type.english_collect" :value="scope.row.isCollect"/>
@ -98,28 +98,22 @@
<dict-tag :options="dict.type.english_top" :value="scope.row.top"/>
</template>
</el-table-column>
<el-table-column label="查看次数" align="center" prop="lookCount" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<el-table-column label="查看次数" align="center" prop="lookCount" :show-overflow-tooltip="true"/>
<el-table-column label="创建时间" align="center" prop="createTime" :show-overflow-tooltip="true"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
<el-button circle
type="primary"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['english:word:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
></el-button>
<el-button circle
type="danger"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['english:word:remove']"
>删除</el-button>
></el-button>
</template>
</el-table-column>
</el-table>
@ -164,9 +158,6 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="查看次数" prop="lookCount">
<el-input v-model="form.lookCount" placeholder="请输入查看次数" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
@ -240,8 +231,8 @@ export default {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeCreateTime && '' != this.daterangeCreateTime) {
this.queryParams.params["beginCreateTime"] = this.daterangeCreateTime[0];
this.queryParams.params["endCreateTime"] = this.daterangeCreateTime[1];
this.queryParams.createTime = this.daterangeCreateTime[0];
this.queryParams.endCreateTime = this.daterangeCreateTime[1];
}
listWord(this.queryParams).then(response => {
this.wordList = response.rows;

@ -23,3 +23,5 @@ spring:
# 共享配置
shared-configs:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
#命名空间
namespace: xjs-666

@ -17,6 +17,7 @@
<modules>
<module>xjs-business-openapi</module>
<module>xjs-business-english</module>
<module>xjs-business-common</module>
</modules>
<properties>

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>xjs-business</artifactId>
<groupId>com.xjs</groupId>
<version>3.3.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>xjs-business-common</artifactId>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
</project>

@ -1,4 +1,4 @@
package com.xjs.common.config;
package com.xjs.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

@ -1,4 +1,4 @@
package com.xjs.common.config;
package com.xjs.config;
import feign.Logger;
import org.springframework.context.annotation.Bean;

@ -1,4 +1,4 @@
package com.xjs.common.config;
package com.xjs.config;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.alibaba.fastjson.serializer.ValueFilter;

@ -1,4 +1,4 @@
package com.xjs.common.config;
package com.xjs.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

@ -1,11 +1,10 @@
package com.xjs.common.handler;
package com.xjs.handler;
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.reflection.MetaObject;
import org.springframework.stereotype.Component;
import java.time.LocalDateTime;
import java.util.Date;
/**

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
Refer to https://manuals.jrebel.com/jrebel/standalone/config.html for more information.
-->
<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_3.xsd">
<id>xjs-business-common</id>
<classpath>
<dir name="D:/Dev/IdeaPerject/GitHub/RuoYi-Cloud/xjs-business/xjs-business-common/target/classes">
</dir>
</classpath>
</application>

@ -12,5 +12,13 @@
<artifactId>xjs-business-english</artifactId>
<dependencies>
<dependency>
<groupId>com.xjs</groupId>
<artifactId>xjs-business-common</artifactId>
<version>3.3.0</version>
</dependency>
</dependencies>
</project>

@ -1,10 +1,10 @@
package com.xjs.word.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.baomidou.mybatisplus.annotation.*;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import lombok.Data;
import java.util.Date;
/**
* english_word
@ -12,13 +12,14 @@ import com.ruoyi.common.core.web.domain.BaseEntity;
* @author xjs
* @date 2021-12-29
*/
public class EnglishWord extends BaseEntity {
private static final long serialVersionUID = 1L;
@Data
@TableName("english_word")
public class EnglishWord {
/**
* id
*/
@TableId
@TableId(type = IdType.ASSIGN_ID)
private Long id;
/**
@ -30,100 +31,39 @@ public class EnglishWord extends BaseEntity {
/**
*
*/
@Excel(name = "对应的中文")
@Excel(name = "中文")
private String chineseWord;
/**
* 1,2,3,4
*/
@Excel(name = "排序1,2,3,4")
@Excel(name = "排序")
private Integer sort;
/**
* 1 2
*/
@Excel(name = "是否收藏 1收藏 2不收藏")
@Excel(name = "是否收藏",readConverterExp = "1=收藏,2=不收藏")
private Integer isCollect;
/**
* 1 2
*/
@Excel(name = "置顶 1置顶 2不置顶")
@Excel(name = "置顶",readConverterExp = "1=置顶,2=不置顶")
private Integer top;
/**
*
*/
@Excel(name = "查看次数")
private Long lookCount;
public void setId(Long id) {
this.id = id;
}
public Long getId() {
return id;
}
public void setEnglishWord(String englishWord) {
this.englishWord = englishWord;
}
public String getEnglishWord() {
return englishWord;
}
public void setChineseWord(String chineseWord) {
this.chineseWord = chineseWord;
}
public String getChineseWord() {
return chineseWord;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public Integer getSort() {
return sort;
}
public void setIsCollect(Integer isCollect) {
this.isCollect = isCollect;
}
public Integer getIsCollect() {
return isCollect;
}
public void setTop(Integer top) {
this.top = top;
}
private Long lookCount = 0L;
public Integer getTop() {
return top;
}
@Excel(name = "创建时间",dateFormat = "yyyy-MM-dd HH:mm:ss")
@TableField(fill = FieldFill.INSERT)
private Date createTime;
public void setLookCount(Long lookCount) {
this.lookCount = lookCount;
}
public Long getLookCount() {
return lookCount;
}
@TableField(exist = false)
private Date endCreateTime;
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("englishWord", getEnglishWord())
.append("chineseWord", getChineseWord())
.append("sort", getSort())
.append("isCollect", getIsCollect())
.append("top", getTop())
.append("lookCount", getLookCount())
.append("createTime", getCreateTime())
.toString();
}
}

@ -1,5 +1,6 @@
package com.xjs.word.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xjs.word.domain.EnglishWord;
import java.util.List;
@ -10,7 +11,7 @@ import java.util.List;
* @author xjs
* @date 2021-12-29
*/
public interface EnglishWordMapper {
public interface EnglishWordMapper extends BaseMapper<EnglishWord> {
//------------------------代码自动生成-----------------------------------
@ -30,22 +31,6 @@ public interface EnglishWordMapper {
*/
List<EnglishWord> selectEnglishWordList(EnglishWord englishWord);
/**
*
*
* @param englishWord
* @return
*/
int insertEnglishWord(EnglishWord englishWord);
/**
*
*
* @param englishWord
* @return
*/
int updateEnglishWord(EnglishWord englishWord);
/**
*
*

@ -1,6 +1,5 @@
package com.xjs.word.service.impl;
import com.ruoyi.common.core.utils.DateUtils;
import com.xjs.word.domain.EnglishWord;
import com.xjs.word.mapper.EnglishWordMapper;
import com.xjs.word.service.IEnglishWordService;
@ -53,8 +52,7 @@ public class EnglishWordServiceImpl implements IEnglishWordService {
*/
@Override
public int insertEnglishWord(EnglishWord englishWord) {
englishWord.setCreateTime(DateUtils.getNowDate());
return englishWordMapper.insertEnglishWord(englishWord);
return englishWordMapper.insert(englishWord);
}
/**
@ -65,7 +63,7 @@ public class EnglishWordServiceImpl implements IEnglishWordService {
*/
@Override
public int updateEnglishWord(EnglishWord englishWord) {
return englishWordMapper.updateEnglishWord(englishWord);
return englishWordMapper.updateById(englishWord);
}
/**

@ -25,5 +25,7 @@ spring:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
#配置组
group: xjs
#命名空间
namespace: xjs-666

@ -36,8 +36,8 @@
<if test="chineseWord != null and chineseWord != ''">and chinese_word like concat('%', #{chineseWord},
'%')
</if>
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">
and create_time between #{params.beginCreateTime} and #{params.endCreateTime}
<if test="createTime != null and endCreateTime != null">
and create_time between #{createTime} and #{endCreateTime}
</if>
</where>
</select>
@ -47,44 +47,6 @@
where id = #{id}
</select>
<insert id="insertEnglishWord" parameterType="com.xjs.word.domain.EnglishWord">
insert into english_word
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="englishWord != null and englishWord != ''">english_word,</if>
<if test="chineseWord != null">chinese_word,</if>
<if test="sort != null">sort,</if>
<if test="isCollect != null">is_collect,</if>
<if test="top != null">top,</if>
<if test="lookCount != null">look_count,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="englishWord != null and englishWord != ''">#{englishWord},</if>
<if test="chineseWord != null">#{chineseWord},</if>
<if test="sort != null">#{sort},</if>
<if test="isCollect != null">#{isCollect},</if>
<if test="top != null">#{top},</if>
<if test="lookCount != null">#{lookCount},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateEnglishWord" parameterType="com.xjs.word.domain.EnglishWord">
update english_word
<trim prefix="SET" suffixOverrides=",">
<if test="englishWord != null and englishWord != ''">english_word = #{englishWord},</if>
<if test="chineseWord != null">chinese_word = #{chineseWord},</if>
<if test="sort != null">sort = #{sort},</if>
<if test="isCollect != null">is_collect = #{isCollect},</if>
<if test="top != null">top = #{top},</if>
<if test="lookCount != null">look_count = #{lookCount},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteEnglishWordById" parameterType="Long">
delete
from english_word

@ -17,4 +17,13 @@
<maven.compiler.target>11</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>com.xjs</groupId>
<artifactId>xjs-business-common</artifactId>
<version>3.3.0</version>
</dependency>
</dependencies>
</project>

@ -4,7 +4,7 @@ import cn.hutool.http.HttpStatus;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.xjs.common.client.TianXingJDTCFeignClient;
import com.xjs.common.config.TianXingProperties;
import com.xjs.config.TianXingProperties;
import com.xjs.common.consts.TianXingConst;
import com.xjs.common.exception.ApiException;
import com.xjs.copywriting.domain.CopyWriting;

@ -4,7 +4,7 @@ import cn.hutool.http.HttpStatus;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.xjs.common.client.TianXingMMMYFeignClient;
import com.xjs.common.config.TianXingProperties;
import com.xjs.config.TianXingProperties;
import com.xjs.common.consts.TianXingConst;
import com.xjs.common.exception.ApiException;
import com.xjs.copywriting.domain.CopyWriting;

@ -4,7 +4,7 @@ import cn.hutool.http.HttpStatus;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.xjs.common.client.TianXingPYQFeignClient;
import com.xjs.common.config.TianXingProperties;
import com.xjs.config.TianXingProperties;
import com.xjs.common.consts.TianXingConst;
import com.xjs.common.exception.ApiException;
import com.xjs.copywriting.domain.CopyWriting;

@ -4,7 +4,7 @@ import cn.hutool.http.HttpStatus;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.xjs.common.client.TianXingWYYFeignClient;
import com.xjs.common.config.TianXingProperties;
import com.xjs.config.TianXingProperties;
import com.xjs.common.consts.TianXingConst;
import com.xjs.common.exception.ApiException;
import com.xjs.copywriting.domain.CopyWriting;

@ -4,7 +4,7 @@ import cn.hutool.crypto.SecureUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.xjs.common.client.BaiduFeignClient;
import com.xjs.common.config.BaiduProperties;
import com.xjs.config.BaiduProperties;
import com.xjs.common.exception.ApiException;
import com.xjs.translation.domain.qo.translation.BaiDuTranslationQo;
import com.xjs.translation.domain.qo.translation.TranslationQo;

@ -25,3 +25,5 @@ spring:
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
#配置组
group: xjs
#命名空间
namespace: xjs-666

Loading…
Cancel
Save