| | |
| | | import com.zy.crm.manager.entity.Plan; |
| | | import com.zy.crm.manager.mapper.PlanMapper; |
| | | import com.zy.crm.manager.service.PlanService; |
| | | import io.swagger.models.License; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Service("planService") |
| | | public class PlanServiceImpl extends ServiceImpl<PlanMapper, Plan> implements PlanService { |
| | |
| | | public Plan selectByUuid(Long hostId, String uuid) { |
| | | return this.baseMapper.selectByUuid(hostId, uuid); |
| | | } |
| | | |
| | | @Override |
| | | public void increasePlanUrl(int planId, String url,String name,Long size) { |
| | | this.baseMapper.increasePlanUrl(planId, url,name,size); |
| | | } |
| | | |
| | | @Override |
| | | public List<Integer> selectPlanUrlId(int planId) { |
| | | return this.baseMapper.selectPlanUrlId(planId); |
| | | } |
| | | |
| | | @Override |
| | | public String selectPlanUrlPlanIdUrl(int id) { |
| | | return this.baseMapper.selectPlanUrlPlanIdUrl(id); |
| | | } |
| | | |
| | | @Override |
| | | public String selectPlanUrlPlanIdName(int id) { |
| | | return this.baseMapper.selectPlanUrlPlanIdName(id); |
| | | } |
| | | |
| | | @Override |
| | | public Long selectPlanUrlPlanIdSize(int id) { |
| | | return this.baseMapper.selectPlanUrlPlanIdSize(id); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public String getUuid(Long hostId) { |
| | |
| | | private String getNextUuid(Long hostId) { |
| | | Plan plan = this.baseMapper.selectPlanByNewestUuid(hostId); |
| | | if (plan == null) { |
| | | return "0001"; |
| | | return "00001"; |
| | | } |
| | | return zerofill(String.valueOf(Integer.parseInt(plan.getUuid()) + 1), 4); |
| | | return zerofill(String.valueOf(Integer.parseInt(plan.getUuid()) + 1), 5); |
| | | } |
| | | |
| | | public static String zerofill(String msg, Integer count){ |