Commit 9302282c by rongkailun

【新增】提供商管理列表查询条件修改

parent aa9896d4
...@@ -67,6 +67,8 @@ public class PartnersController extends AbstractController { ...@@ -67,6 +67,8 @@ public class PartnersController extends AbstractController {
public R save(@RequestBody PartnersEntity partners){ public R save(@RequestBody PartnersEntity partners){
partners.setEditor(getUser().getUsername()); partners.setEditor(getUser().getUsername());
partners.setLasteditor(getUser().getUsername()); partners.setLasteditor(getUser().getUsername());
partners.setRegisterdate(new Date());
partners.setUpdatedate(new Date());
partnersService.save(partners); partnersService.save(partners);
return R.ok("新增成功!"); return R.ok("新增成功!");
} }
......
...@@ -26,7 +26,15 @@ ...@@ -26,7 +26,15 @@
</resultMap> </resultMap>
<select id="selectPartnersList" resultMap="partnersMap" parameterType="java.util.Map"> <select id="selectPartnersList" resultMap="partnersMap" parameterType="java.util.Map">
select * from Partners where levels>0 select * from Partners where 1=1
<choose>
<when test="params.levels == 0">
AND levels = #{params.levels}
</when>
<otherwise>
AND levels > 0
</otherwise>
</choose>
<if test="params.firmname !=null and params.firmname !=''"> <if test="params.firmname !=null and params.firmname !=''">
and firmname like concat('%',#{params.firmname},'%') and firmname like concat('%',#{params.firmname},'%')
</if> </if>
...@@ -42,11 +50,11 @@ ...@@ -42,11 +50,11 @@
<if test="params.service !=null and params.service !=''"> <if test="params.service !=null and params.service !=''">
and service = #{params.service} and service = #{params.service}
</if> </if>
<if test="params.levels !=''"> <if test="params.levels != null">
and levels = #{params.levels} and levels = #{params.levels}
</if> </if>
<if test="params.releaseTimeStart !=null and params.releaseTimeEnd !=null"> <if test="params.releaseTimeStart !=null and params.releaseTimeEnd !=null">
and releasedate BETWEEN #{params.releaseTimeStart} AND #{params.releaseTimeEnd} and registerdate BETWEEN #{params.releaseTimeStart} AND #{params.releaseTimeEnd}
</if> </if>
<if test="params.updateTimeStart !=null and params.updateTimeEnd !=null"> <if test="params.updateTimeStart !=null and params.updateTimeEnd !=null">
and updatedate BETWEEN #{params.updateTimeStart} AND #{params.updateTimeEnd} and updatedate BETWEEN #{params.updateTimeStart} AND #{params.updateTimeEnd}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment