| | |
| | | import com.ycl.entity.NewsAdmin;
|
| | | import com.ycl.entity.NewsPolice;
|
| | | import com.ycl.service.NewsAdminService;
|
| | | import com.ycl.utils.MD5Util;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.beans.factory.annotation.Value;
|
| | | import org.springframework.stereotype.Service;
|
| | |
| | | public Integer autoCreateAdmin(NewsPolice newsPolice) {
|
| | | NewsAdmin admin = new NewsAdmin();
|
| | | admin.setUsername(newsPolice.getRname());
|
| | | admin.setPassword(defaultPassword);
|
| | | admin.setPassword(MD5Util.md5Encrypt32Lower(defaultPassword));
|
| | | admin.setCreateTime(new Date());
|
| | | admin.setStatus(1);
|
| | | admin.setNewsPoliceId(newsPolice.getId());
|