Merge branch 'template' into develop

This commit is contained in:
曹鹏飞 2025-07-02 11:39:18 +08:00
commit bf9b500af8
5 changed files with 17 additions and 5 deletions

View File

@ -453,8 +453,10 @@ public class UserControllerService {
if (Objects.isNull(userSupplier)) {
userSupplier = new UserSupplier();
user = new User();
user.setId(IdUtil.getSnowflakeNextId());
user.setCreateBy(UserUtil.getUserName());
user.setCreateTime(LocalDateTime.now());
userSupplier.setUserId(user.getId());
} else {
user = uService.getById(userSupplier.getUserId());
user.setUpdateBy(UserUtil.getUserName());

View File

@ -22,7 +22,9 @@ public interface DictionaryItemMapper extends BaseMapper<DictionaryItem> {
String getName(String dictionaryCode, String itemCode);
List<DictionaryItem> getListByDictionaryCode(String code, String language);
List<DictionaryItem> getListByDictionaryCode(String code);
DictionaryItem getByCode(String dictionaryCode, String dictionaryItemCode);
List<DictionaryItem> getLanguageListByDictionaryCode(String code, String language);
}

View File

@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.nflg.wms.common.constant.Constant;
import com.nflg.wms.common.pojo.qo.DictionaryItemSearchQO;
import com.nflg.wms.common.pojo.qo.SaveDictionaryItemQO;
import com.nflg.wms.common.pojo.qo.TranslateMap;
@ -127,12 +126,12 @@ public class DictionaryItemServiceImpl extends ServiceImpl<DictionaryItemMapper,
@Override
public List<DictionaryItem> getListByDictionaryCode(String code) {
return getListByDictionaryCode(code, Constant.DEFAULT_LANGUAGE_CODE);
return baseMapper.getListByDictionaryCode(code);
}
@Override
public List<DictionaryItem> getListByDictionaryCode(String code, String language) {
return baseMapper.getListByDictionaryCode(code, language);
return baseMapper.getLanguageListByDictionaryCode(code, language);
}
@Override

View File

@ -24,4 +24,13 @@
WHERE d.code = #{dictionaryCode}
AND di.code = #{dictionaryItemCode}
</select>
<select id="getLanguageListByDictionaryCode" resultType="com.nflg.wms.repository.entity.DictionaryItem">
SELECT di.id,di.dictionary_id,di.name,di.code,COALESCE(dit.value,di.value) as "value",di.create_by,di.create_time,di.update_by,di.update_time
FROM dictionary d
INNER JOIN dictionary_item di ON d.id = di.dictionary_id
inner join dictionary_item_translate dit on di.id = dit.dictionary_item_id
WHERE d.code = #{code} and dit.language_code = #{language}
ORDER BY di.id
</select>
</mapper>

View File

@ -3,7 +3,7 @@
<mapper namespace="com.nflg.wms.repository.mapper.UserRoleMapMapper">
<select id="getRoleList" resultType="com.nflg.wms.common.pojo.vo.RoleVO">
SELECT r.*
SELECT distinct r.*
FROM user_role_map urm
INNER JOIN "role" r ON urm.role_id=r."id"
WHERE urm.user_id=#{id}