Commit 9302282c by rongkailun

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

parent aa9896d4
......@@ -67,6 +67,8 @@ public class PartnersController extends AbstractController {
public R save(@RequestBody PartnersEntity partners){
partners.setEditor(getUser().getUsername());
partners.setLasteditor(getUser().getUsername());
partners.setRegisterdate(new Date());
partners.setUpdatedate(new Date());
partnersService.save(partners);
return R.ok("新增成功!");
}
......
......@@ -26,7 +26,15 @@
</resultMap>
<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 !=''">
and firmname like concat('%',#{params.firmname},'%')
</if>
......@@ -42,11 +50,11 @@
<if test="params.service !=null and params.service !=''">
and service = #{params.service}
</if>
<if test="params.levels !=''">
<if test="params.levels != null">
and levels = #{params.levels}
</if>
<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 test="params.updateTimeStart !=null and params.updateTimeEnd !=null">
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