wuxw
2022-07-19 05683f2b2bdbdbe21cf17ad523c21ab338bd1c54
service-community/src/main/java/com/java110/community/cmd/room/UpdateRoomCmd.java
@@ -5,7 +5,7 @@
import com.java110.core.annotation.Java110Cmd;
import com.java110.core.annotation.Java110Transactional;
import com.java110.core.context.ICmdDataFlowContext;
import com.java110.core.event.cmd.AbstractServiceCmdListener;
import com.java110.core.event.cmd.Cmd;
import com.java110.core.event.cmd.CmdEvent;
import com.java110.core.factory.GenerateCodeFactory;
import com.java110.dto.UnitDto;
@@ -26,7 +26,7 @@
import java.util.List;
@Java110Cmd(serviceCode = "room.updateRoom")
public class UpdateRoomCmd extends AbstractServiceCmdListener {
public class UpdateRoomCmd extends Cmd {
    @Autowired
    private IUnitV1InnerServiceSMO unitV1InnerServiceSMOImpl;
@@ -161,6 +161,23 @@
        JSONObject businessUnit = new JSONObject();
        businessUnit.putAll(paramInJson);
        RoomPo roomPo = BeanConvertUtil.covertBean(businessUnit, RoomPo.class);
        if (paramInJson.containsKey("apartment1") && paramInJson.getString("apartment1").equals("10")) {
            roomPo.setSection("1");
        } else if (paramInJson.containsKey("apartment1") && paramInJson.getString("apartment1").equals("20")) {
            roomPo.setSection("2");
        } else if (paramInJson.containsKey("apartment1") && paramInJson.getString("apartment1").equals("30")) {
            roomPo.setSection("3");
        } else if (paramInJson.containsKey("apartment1") && paramInJson.getString("apartment1").equals("40")) {
            roomPo.setSection("4");
        } else if (paramInJson.containsKey("apartment1") && paramInJson.getString("apartment1").equals("50")) {
            roomPo.setSection("5");
        } else if (paramInJson.containsKey("apartment1") && paramInJson.getString("apartment1").equals("60")) {
            roomPo.setSection("6");
        } else if (paramInJson.containsKey("apartment1") && paramInJson.getString("apartment1").equals("70")) {
            roomPo.setSection("7");
        } else if (paramInJson.containsKey("apartment1") && paramInJson.getString("apartment1").equals("80")) {
            roomPo.setSection("8");
        }
        int flag = roomV1InnerServiceSMOImpl.updateRoom(roomPo);
        if (flag < 1) {
            throw new CmdException("修改房屋失败");