<commit_before>package com.seventeenkouer.service.impl;

import com.seventeenkouer.da.mapper.DisplayInfoMapper;
import com.seventeenkouer.da.model.DisplayInfo;
import com.seventeenkouer.service.DisplayInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.Assert;

/**
 * Created by <NAME>
 * User: wind
 * Date: 2018/6/26
 * Time: 上午10:26
 * To change this template use File | Settings | File Templates.
 */
@Service("displayInfoServiceImpl")
public class DisplayInfoServiceImpl implements DisplayInfoService {
    @Autowired
    DisplayInfoMapper displayInfoMapper;

    public Integer saveDisplayInfo(DisplayInfo displayInfo) {
        Assert.hasText(displayInfo.getDrugBcode(),"药品条码不能为空");
        Assert.hasText(displayInfo.getDrugName(),"药品名称不能为空");
        return displayInfoMapper.insertSelective(displayInfo);
    }
}<commit_msg>保存陈列信息字段处理<commit_after>package com.seventeenkouer.service.impl;

import com.seventeenkouer.da.mapper.DisplayInfoMapper;
import com.seventeenkouer.da.model.DisplayInfo;
import com.seventeenkouer.service.DisplayInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.Assert;

import java.util.Date;

/**
 * Created by <NAME>
 * User: wind
 * Date: 2018/6/26
 * Time: 上午10:26
 * To change this template use File | Settings | File Templates.
 */
@Service("displayInfoServiceImpl")
public class DisplayInfoServiceImpl implements DisplayInfoService {
    @Autowired
    DisplayInfoMapper displayInfoMapper;

    public Integer saveDisplayInfo(DisplayInfo displayInfo) {
        Assert.hasText(displayInfo.getDrugBcode(),"药品条码不能为空");
        Assert.hasText(displayInfo.getDrugName(),"药品名称不能为空");
        Long currentTime = System.currentTimeMillis();

        displayInfo.setCreatetime(new Date(currentTime));
        return displayInfoMapper.insertSelective(displayInfo);
    }
}
{'fraction_non_alphanumeric': 0.09945300845350571, 'fraction_numerical': 0.01093983092988563, 'mean_word_length': 5.26791277258567, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3440055', 'n_tokens_mistral': 629, 'n_tokens_neox': 634, 'n_words': 105}