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 f6530746
authored
Dec 22, 2020
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改客户重置状态SQL语句 yangll
1 parent
ab7d72b9
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
65 additions
and
8 deletions
rpc-openplatform-api/src/main/java/cn/com/glsx/openplatform/service/CustomerMgrService.java
rpc-openplatform-container/src/main/java/cn/com/glsx/openplatform/mapper/PlatformAdMapper.java
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/test/java/cn/com/glsx/openplatform/service/CustomerMgrServiceImplTest.java
rpc-openplatform-api/src/main/java/cn/com/glsx/openplatform/service/CustomerMgrService.java
View file @
f653074
...
@@ -32,7 +32,7 @@ public interface CustomerMgrService {
...
@@ -32,7 +32,7 @@ public interface CustomerMgrService {
* @param status
* @param status
* @return
* @return
*/
*/
int
startAndStop
(
int
id
,
int
status
);
Integer
startAndStop
(
Integer
id
,
Integer
status
);
/**
/**
* 客户总数据
* 客户总数据
...
...
rpc-openplatform-container/src/main/java/cn/com/glsx/openplatform/mapper/PlatformAdMapper.java
View file @
f653074
...
@@ -20,4 +20,6 @@ public interface PlatformAdMapper extends OreMapper<PlatformAd> {
...
@@ -20,4 +20,6 @@ public interface PlatformAdMapper extends OreMapper<PlatformAd> {
List
<
PlatformAd
>
getAdMgrList
();
List
<
PlatformAd
>
getAdMgrList
();
int
updateById
(
@Param
(
"id"
)
int
id
,
@Param
(
"status"
)
int
status
);
int
updateById
(
@Param
(
"id"
)
int
id
,
@Param
(
"status"
)
int
status
);
int
updateByAdId
(
PlatformAd
ad
);
}
}
\ No newline at end of file
\ No newline at end of file
rpc-openplatform-container/src/main/java/cn/com/glsx/openplatform/mapper/PlatformCustomerMapper.java
View file @
f653074
...
@@ -38,4 +38,6 @@ public interface PlatformCustomerMapper extends OreMapper<PlatformCustomer> {
...
@@ -38,4 +38,6 @@ public interface PlatformCustomerMapper extends OreMapper<PlatformCustomer> {
PlatformCustomer
selectOneByAppId
(
@Param
(
"appId"
)
int
appId
);
PlatformCustomer
selectOneByAppId
(
@Param
(
"appId"
)
int
appId
);
int
updateByCustomerId
(
@Param
(
"id"
)
int
id
,
@Param
(
"password"
)
String
password
);
int
updateByCustomerId
(
@Param
(
"id"
)
int
id
,
@Param
(
"password"
)
String
password
);
Integer
updateStatusByCustomerId
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"status"
)
Integer
status
);
}
}
rpc-openplatform-container/src/main/java/cn/com/glsx/openplatform/service/AdMgrServiceImpl.java
View file @
f653074
...
@@ -42,8 +42,9 @@ public class AdMgrServiceImpl implements AdMgrService {
...
@@ -42,8 +42,9 @@ public class AdMgrServiceImpl implements AdMgrService {
@Override
@Override
public
int
updateAd
(
PlatformAd
ad
)
{
public
int
updateAd
(
PlatformAd
ad
)
{
ad
.
setUpdateTime
(
new
Date
());
ad
.
setUpdateTime
(
new
Date
());
ad
.
setStatus
(
1
);
int
i
=
adMapper
.
updateByAdId
(
ad
);
return
adMapper
.
updateByPrimaryKeySelective
(
ad
);
LOGGER
.
info
(
"=i========"
+
i
);
return
i
;
}
}
@Override
@Override
...
...
rpc-openplatform-container/src/main/java/cn/com/glsx/openplatform/service/CustomerMgrServiceImpl.java
View file @
f653074
...
@@ -46,11 +46,8 @@ public class CustomerMgrServiceImpl implements CustomerMgrService {
...
@@ -46,11 +46,8 @@ public class CustomerMgrServiceImpl implements CustomerMgrService {
}
}
@Override
@Override
public
int
startAndStop
(
int
id
,
int
status
)
{
public
Integer
startAndStop
(
Integer
id
,
Integer
status
)
{
PlatformCustomer
customer
=
new
PlatformCustomer
();
return
customerMapper
.
updateStatusByCustomerId
(
id
,
status
);
customer
.
setId
(
id
);
customer
.
setStatus
(
status
);
return
customerMapper
.
updateByPrimaryKeySelective
(
customer
);
}
}
@Override
@Override
...
...
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformAdMapper.xml
View file @
f653074
...
@@ -47,4 +47,46 @@
...
@@ -47,4 +47,46 @@
remark
remark
from t_platform_ad
from t_platform_ad
</select>
</select>
<update
id=
"updateByAdId"
parameterType=
"cn.com.glsx.openplatform.model.PlatformAd"
>
<!--@mbg.generated-->
update t_platform_ad
<set>
<if
test=
"title != null and title != ''"
>
title = #{title,jdbcType=VARCHAR},
</if>
<if
test=
"image != null and image != ''"
>
image = #{image,jdbcType=VARCHAR},
</if>
<if
test=
"position != null"
>
`position` = #{position,jdbcType=TINYINT},
</if>
<if
test=
"interfaceType != null"
>
interface_type = #{interfaceType,jdbcType=TINYINT},
</if>
<if
test=
"interfaceUrl != null and interfaceUrl != ''"
>
interface_url = #{interfaceUrl,jdbcType=VARCHAR},
</if>
<if
test=
"status != null"
>
`status` = #{status,jdbcType=TINYINT},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy,jdbcType=INTEGER},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy,jdbcType=INTEGER},
</if>
<if
test=
"remark != null and remark != ''"
>
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
</mapper>
rpc-openplatform-container/src/main/resources/META-INF/orm/PlatformCustomerMapper.xml
View file @
f653074
...
@@ -157,6 +157,13 @@
...
@@ -157,6 +157,13 @@
where id = #{id,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
</update>
<update
id=
"updateStatusByCustomerId"
>
update t_platform_customer
set status = #{status,jdbcType=INTEGER},
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,
...
...
rpc-openplatform-container/src/test/java/cn/com/glsx/openplatform/service/CustomerMgrServiceImplTest.java
View file @
f653074
...
@@ -42,4 +42,10 @@ public class CustomerMgrServiceImplTest {
...
@@ -42,4 +42,10 @@ public class CustomerMgrServiceImplTest {
List
<
Area
>
addressOptionList
=
customerMgrService
.
getAddressOptionList
(
0
);
List
<
Area
>
addressOptionList
=
customerMgrService
.
getAddressOptionList
(
0
);
System
.
out
.
println
(
"addressOptionList = "
+
addressOptionList
.
toString
());
System
.
out
.
println
(
"addressOptionList = "
+
addressOptionList
.
toString
());
}
}
@Test
public
void
test2
()
{
int
i
=
customerMgrService
.
startAndStop
(
3
,
0
);
System
.
out
.
println
(
"i = "
+
i
);
}
}
}
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