Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
open-source
/
rpc-openplatform
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ab7d72b9
authored
Dec 22, 2020
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改插入和修改广告的的SQL语句 yangll
1 parent
40928ed9
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
9 deletions
rpc-openplatform-container/src/main/java/cn/com/glsx/openplatform/mapper/PlatformCustomerMapper.java
rpc-openplatform-container/src/main/java/cn/com/glsx/openplatform/service/AdMgrServiceImpl.java
rpc-openplatform-container/src/main/java/cn/com/glsx/openplatform/service/CustomerMgrServiceImpl.java
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformAdMapper.xml
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformCustomerMapper.xml
rpc-openplatform-container/src/main/java/cn/com/glsx/openplatform/mapper/PlatformCustomerMapper.java
View file @
ab7d72b
...
@@ -36,4 +36,6 @@ public interface PlatformCustomerMapper extends OreMapper<PlatformCustomer> {
...
@@ -36,4 +36,6 @@ public interface PlatformCustomerMapper extends OreMapper<PlatformCustomer> {
int
register
(
PlatformCustomer
customer
);
int
register
(
PlatformCustomer
customer
);
PlatformCustomer
selectOneByAppId
(
@Param
(
"appId"
)
int
appId
);
PlatformCustomer
selectOneByAppId
(
@Param
(
"appId"
)
int
appId
);
int
updateByCustomerId
(
@Param
(
"id"
)
int
id
,
@Param
(
"password"
)
String
password
);
}
}
rpc-openplatform-container/src/main/java/cn/com/glsx/openplatform/service/AdMgrServiceImpl.java
View file @
ab7d72b
...
@@ -35,12 +35,14 @@ public class AdMgrServiceImpl implements AdMgrService {
...
@@ -35,12 +35,14 @@ public class AdMgrServiceImpl implements AdMgrService {
@Override
@Override
public
int
insertAd
(
PlatformAd
ad
)
{
public
int
insertAd
(
PlatformAd
ad
)
{
ad
.
setCreateTime
(
new
Date
());
ad
.
setCreateTime
(
new
Date
());
ad
.
setStatus
(
1
);
return
adMapper
.
insert
(
ad
);
return
adMapper
.
insert
(
ad
);
}
}
@Override
@Override
public
int
updateAd
(
PlatformAd
ad
)
{
public
int
updateAd
(
PlatformAd
ad
)
{
ad
.
setUpdateTime
(
new
Date
());
ad
.
setUpdateTime
(
new
Date
());
ad
.
setStatus
(
1
);
return
adMapper
.
updateByPrimaryKeySelective
(
ad
);
return
adMapper
.
updateByPrimaryKeySelective
(
ad
);
}
}
...
...
rpc-openplatform-container/src/main/java/cn/com/glsx/openplatform/service/CustomerMgrServiceImpl.java
View file @
ab7d72b
...
@@ -41,10 +41,8 @@ public class CustomerMgrServiceImpl implements CustomerMgrService {
...
@@ -41,10 +41,8 @@ public class CustomerMgrServiceImpl implements CustomerMgrService {
@Override
@Override
public
int
reset
(
int
id
)
{
public
int
reset
(
int
id
)
{
PlatformCustomer
customer
=
new
PlatformCustomer
();
String
password
=
"12345678"
;
customer
.
setId
(
id
);
return
customerMapper
.
updateByCustomerId
(
id
,
password
);
customer
.
setPassword
(
"12345678"
);
return
customerMapper
.
updateByPrimaryKeySelective
(
customer
);
}
}
@Override
@Override
...
...
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformAdMapper.xml
View file @
ab7d72b
...
@@ -8,10 +8,10 @@
...
@@ -8,10 +8,10 @@
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<result
column=
"title"
jdbcType=
"VARCHAR"
property=
"title"
/>
<result
column=
"title"
jdbcType=
"VARCHAR"
property=
"title"
/>
<result
column=
"image"
jdbcType=
"VARCHAR"
property=
"image"
/>
<result
column=
"image"
jdbcType=
"VARCHAR"
property=
"image"
/>
<result
column=
"position"
jdbcType=
"
TINYINT
"
property=
"position"
/>
<result
column=
"position"
jdbcType=
"
INTEGER
"
property=
"position"
/>
<result
column=
"interface_type"
jdbcType=
"
TINYINT
"
property=
"interfaceType"
/>
<result
column=
"interface_type"
jdbcType=
"
INTEGER
"
property=
"interfaceType"
/>
<result
column=
"interface_url"
jdbcType=
"VARCHAR"
property=
"interfaceUrl"
/>
<result
column=
"interface_url"
jdbcType=
"VARCHAR"
property=
"interfaceUrl"
/>
<result
column=
"status"
jdbcType=
"
TINYINT
"
property=
"status"
/>
<result
column=
"status"
jdbcType=
"
INTEGER
"
property=
"status"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"create_by"
jdbcType=
"INTEGER"
property=
"createBy"
/>
<result
column=
"create_by"
jdbcType=
"INTEGER"
property=
"createBy"
/>
...
@@ -31,9 +31,20 @@
...
@@ -31,9 +31,20 @@
where id = #{id,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
</update>
<select
id=
"getAdMgrList"
result
Type=
"cn.com.glsx.openplatform.model.PlatformAd
"
>
<select
id=
"getAdMgrList"
result
Map=
"BaseResultMap
"
>
select
select
<include
refid=
"Base_Column_List"
/>
id,
title,
image,
`position`,
interface_type,
interface_url,
`status`,
create_time,
update_time,
create_by,
update_by,
remark
from t_platform_ad
from t_platform_ad
</select>
</select>
</mapper>
</mapper>
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformCustomerMapper.xml
View file @
ab7d72b
...
@@ -150,6 +150,13 @@
...
@@ -150,6 +150,13 @@
</trim>
</trim>
</insert>
</insert>
<update
id=
"updateByCustomerId"
>
update t_platform_customer
set password = #{password,jdbcType=VARCHAR},
update_time = NOW()
where id = #{id,jdbcType=INTEGER}
</update>
<select
id=
"getCustomerMgrList"
resultMap=
"BaseResultMap"
>
<select
id=
"getCustomerMgrList"
resultMap=
"BaseResultMap"
>
select a.id,
select a.id,
a.customer_name,
a.customer_name,
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment