批量更新草稿状态

zhangtao
dongdingding 1 year ago
parent 07326d8d6f
commit 7b3ad4852a

@ -225,8 +225,13 @@ public class BPlanEnterpriseController extends BaseController {
/**
*
*
*/
@ApiOperation(value = "查看计划明细")
@PostMapping("/updateIdList")
public AjaxResult updateIdList(String[] idList) {
bPlanEnterpriseService.updateIdList(idList);
return AjaxResult.success();
}
}

@ -176,7 +176,7 @@ public class BPlanEnterprise implements Serializable {
* 0稿 1
*/
@ApiModelProperty(value = "0草稿 1正式")
private Integer status =0;
private Integer status ;
/**

@ -98,5 +98,13 @@ public interface BPlanEnterpriseMapper extends BaseMapper<BPlanEnterprise> {
*/
List<BPlanEnterPriseTreeResponse>getShouYeMxList(@Param("req") BPlanEnterprisePageRequest req);
/**
*
* @param idList
*/
void updateIdList(String[] idList);
}

@ -93,5 +93,12 @@ public interface BPlanEnterpriseService extends IService<BPlanEnterprise> {
*/
List<BPlanEnterPriseTreeResponse> getShouyeList(BPlanEnterprisePageRequest req);
/**
*
* @param idList
*/
void updateIdList(String[] idList);
}

@ -104,6 +104,11 @@ public class BPlanEnterpriseServiceImpl extends ServiceImpl<BPlanEnterpriseMappe
return list;
}
@Override
public void updateIdList(String[] idList) {
bPlanEnterpriseMapper.updateIdList(idList);
}
}

@ -33,6 +33,7 @@
from b_plan_enterprise
</sql>
<select id="selectBPlanEnterpriseList" parameterType="BPlanEnterprise" resultType="BPlanEnterprise">
select a.id,
a. enterprise_id,
@ -250,5 +251,15 @@
</select>
<update id="updateIdList">
UPDATE b_plan_enterprise
SET status = 1
WHERE id in
<foreach item="item" collection="idList" open="(" separator="," close=")">
#{item}
</foreach>
</update>
</mapper>
Loading…
Cancel
Save