ZoneCapacityServiceImpl.java 1001 Bytes
package com.huaheng.pc.config.zoneCapacity.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.huaheng.common.utils.StringUtils;
import com.huaheng.common.utils.security.ShiroUtils;
import com.huaheng.framework.web.domain.AjaxResult;
import com.huaheng.pc.config.zoneCapacity.domain.ZoneCapacity;
import com.huaheng.pc.config.zoneCapacity.mapper.ZoneCapacityMapper;
import org.springframework.stereotype.Service;

@Service
public class ZoneCapacityServiceImpl extends ServiceImpl<ZoneCapacityMapper, ZoneCapacity> implements ZoneCapacityService {
    @Override
    public AjaxResult insertModel(ZoneCapacity zoneCapacity) {
        zoneCapacity.setCreatedBy(ShiroUtils.getLoginName());
        zoneCapacity.setLastUpdatedBy(ShiroUtils.getLoginName());
        if(StringUtils.isEmpty(zoneCapacity.getMaterialCode())){
            return AjaxResult.error("没有输入物料编码");
        }

        return AjaxResult.success("新增库区容量成功");
    }
}