Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-api-boot-master
Commits
7958bb32
Commit
7958bb32
authored
May 27, 2024
by
lanbaoming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-05-27
parent
65fdb9d1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
133 additions
and
2 deletions
+133
-2
TreeNode.java
...iocoder/yudao/module/delivery/entity/deptex/TreeNode.java
+43
-0
CalculateOrderVValueListener.java
...odule/delivery/listener/CalculateOrderVValueListener.java
+2
-2
MyTest.java
.../java/cn/iocoder/yudao/module/delivery/mapper/MyTest.java
+31
-0
JsonFactory.java
...cn/iocoder/yudao/module/delivery/utility/JsonFactory.java
+27
-0
EmployeeMapper.xml
...elivery-rest/src/main/resources/mapper/EmployeeMapper.xml
+30
-0
No files found.
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/entity/deptex/TreeNode.java
0 → 100644
View file @
7958bb32
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
entity
.
deptex
;
import
java.util.List
;
public
class
TreeNode
{
private
int
id
;
// 节点id
private
String
text
;
// 节点名称
private
int
fid
;
// 父节点id
private
List
<
TreeNode
>
children
;
// 包含的子节点
public
int
getId
()
{
return
id
;
}
public
void
setId
(
int
id
)
{
this
.
id
=
id
;
}
public
String
getText
()
{
return
text
;
}
public
void
setText
(
String
text
)
{
this
.
text
=
text
;
}
public
int
getFid
()
{
return
fid
;
}
public
void
setFid
(
int
fid
)
{
this
.
fid
=
fid
;
}
public
List
<
TreeNode
>
getChildren
()
{
return
children
;
}
public
void
setChildren
(
List
<
TreeNode
>
children
)
{
this
.
children
=
children
;
}
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/listener/CalculateOrderVValueListener.java
View file @
7958bb32
...
@@ -58,7 +58,7 @@ public class CalculateOrderVValueListener {
...
@@ -58,7 +58,7 @@ public class CalculateOrderVValueListener {
if
(
orderDO
.
getTransportId
()
==
1
)
{
if
(
orderDO
.
getTransportId
()
==
1
)
{
//海运计算V值
//海运计算V值
temp
=
ecwVzService
.
getOne
(
new
LambdaQueryWrapperX
<
EcwVz
>()
temp
=
ecwVzService
.
getOne
(
new
LambdaQueryWrapperX
<
EcwVz
>()
.
eqIfPresent
(
EcwVz:
:
get
TitleZh
,
"M3"
));
.
eqIfPresent
(
EcwVz:
:
get
Fuhao
,
"M3"
));
if
(
temp
==
null
)
{
if
(
temp
==
null
)
{
throw
exception
(
VCONFIG_NOT_EXISTS
);
throw
exception
(
VCONFIG_NOT_EXISTS
);
}
}
...
@@ -66,7 +66,7 @@ public class CalculateOrderVValueListener {
...
@@ -66,7 +66,7 @@ public class CalculateOrderVValueListener {
}
else
if
(
orderDO
.
getTransportId
()
==
3
)
{
}
else
if
(
orderDO
.
getTransportId
()
==
3
)
{
//空运计算V值
//空运计算V值
temp
=
ecwVzService
.
getOne
(
new
LambdaQueryWrapperX
<
EcwVz
>()
temp
=
ecwVzService
.
getOne
(
new
LambdaQueryWrapperX
<
EcwVz
>()
.
eqIfPresent
(
EcwVz:
:
get
TitleZh
,
"KG"
));
.
eqIfPresent
(
EcwVz:
:
get
Fuhao
,
"KG"
));
if
(
temp
==
null
)
{
if
(
temp
==
null
)
{
throw
exception
(
VCONFIG_NOT_EXISTS
);
throw
exception
(
VCONFIG_NOT_EXISTS
);
}
}
...
...
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/mapper/MyTest.java
0 → 100644
View file @
7958bb32
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
mapper
;
import
cn.iocoder.yudao.module.delivery.entity.deptex.zTest
;
import
org.apache.ibatis.annotations.Insert
;
import
org.apache.ibatis.annotations.Options
;
import
org.apache.ibatis.annotations.Select
;
import
org.apache.ibatis.annotations.Update
;
import
java.util.List
;
/*
用注解实现简单的功能 lanbm 2024-05-26 add
*/
public
interface
MyTest
{
// 查询所有商品类型
@Select
(
"select * from z_test"
)
public
List
<
zTest
>
selectAll
();
// 根据类型编号查询商品类型
@Select
(
"select * from z_test where id = #{id}"
)
zTest
selectById
(
int
id
);
// 添加商品类型
@Insert
(
"insert into z_test(name) values(#{name})"
)
@Options
(
useGeneratedKeys
=
true
,
keyProperty
=
"id"
)
public
int
add
(
zTest
type
);
// 更新商品类型
@Update
(
"update z_test set name = #{name} where id = #{id}"
)
public
int
update
(
zTest
type
);
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/java/cn/iocoder/yudao/module/delivery/utility/JsonFactory.java
0 → 100644
View file @
7958bb32
package
cn
.
iocoder
.
yudao
.
module
.
delivery
.
utility
;
import
cn.iocoder.yudao.module.delivery.entity.deptex.TreeNode
;
import
java.util.ArrayList
;
import
java.util.List
;
/*
递归的例子 lanbm 2024-05-26 add
*/
public
class
JsonFactory
{
public
static
List
<
TreeNode
>
buildtree
(
List
<
TreeNode
>
nodes
,
int
id
)
{
List
<
TreeNode
>
treeNodes
=
new
ArrayList
<
TreeNode
>();
for
(
TreeNode
treeNode
:
nodes
)
{
TreeNode
node
=
new
TreeNode
();
node
.
setId
(
treeNode
.
getId
());
node
.
setText
(
treeNode
.
getText
());
if
(
id
==
treeNode
.
getFid
())
{
//递给调用buildtree方法给TreeNode中的children属性赋值
node
.
setChildren
(
buildtree
(
nodes
,
node
.
getId
()));
treeNodes
.
add
(
node
);
}
}
return
treeNodes
;
}
}
yudao-module-delivery/yudao-module-delivery-rest/src/main/resources/mapper/EmployeeMapper.xml
View file @
7958bb32
...
@@ -19,6 +19,36 @@
...
@@ -19,6 +19,36 @@
<!-- 通用查询结果列 2024-04-22-->
<!-- 通用查询结果列 2024-04-22-->
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, name, emp_gender, age, email
</sql>
id, name, emp_gender, age, email
</sql>
<!-- 目的:为dao接口方法提供sql语句配置 -->
<insert
id=
"addUser"
>
<!-- 具体的sql -->
insert into user(user_name,user_password,phone_number,day)
value (#{userName},#{userPassword},#{phoneNumber},#{day})
</insert>
<select
id=
"queryUserByname"
resultType=
"cn.iocoder.yudao.module.delivery.entity.Employee"
>
select *
from user
where user_name = #{userName}
</select>
<select
id=
"queryUser"
resultType=
"cn.iocoder.yudao.module.delivery.entity.Employee"
>
select *
from user
</select>
<update
id=
"updateUserDay"
>
UPDATE user
SET day=#{day}
WHERE user_name = #{userName}
</update>
<update
id=
"addUserOverdue"
>
UPDATE user
SET Overdue=Overdue + 1
WHERE user_name = #{userName}
</update>
</mapper>
</mapper>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment